re-add source tree to restore compile error-free state
diff --git a/org.eclipse.viatra2.core2/.classpath b/org.eclipse.viatra2.core2/.classpath
new file mode 100644
index 0000000..ad32c83
--- /dev/null
+++ b/org.eclipse.viatra2.core2/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.viatra2.core2/.project b/org.eclipse.viatra2.core2/.project
new file mode 100644
index 0000000..70d0c56
--- /dev/null
+++ b/org.eclipse.viatra2.core2/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.viatra2.core2</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.viatra2.core2/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra2.core2/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..8aebd6a
--- /dev/null
+++ b/org.eclipse.viatra2.core2/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,263 @@
+#Wed Jan 12 11:16:12 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
diff --git a/org.eclipse.viatra2.core2/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.viatra2.core2/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..b6dbbc6
--- /dev/null
+++ b/org.eclipse.viatra2.core2/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,10 @@
+#Mon Jul 10 11:23:28 CEST 2006
+eclipse.preferences.version=1
+formatter_profile=org.eclipse.jdt.ui.default.eclipse_profile
+formatter_settings_version=10
+internal.default.compliance=default
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
diff --git a/org.eclipse.viatra2.core2/META-INF/MANIFEST.MF b/org.eclipse.viatra2.core2/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..92ed559
--- /dev/null
+++ b/org.eclipse.viatra2.core2/META-INF/MANIFEST.MF
@@ -0,0 +1,44 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: VIATRA2 R3 Core
+Bundle-SymbolicName: org.eclipse.viatra2.core2;singleton:=true
+Bundle-Version: 3.3.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.viatra2.ViatraPlugin
+Bundle-Vendor: BUTE-FTSRG
+Export-Package: org.eclipse.viatra2,
+ org.eclipse.viatra2.buffers,
+ org.eclipse.viatra2.codegen,
+ org.eclipse.viatra2.copier,
+ org.eclipse.viatra2.core,
+ org.eclipse.viatra2.core.constraint,
+ org.eclipse.viatra2.core.notification,
+ org.eclipse.viatra2.core.simple,
+ org.eclipse.viatra2.core.simple.cache,
+ org.eclipse.viatra2.core.simple.constraint,
+ org.eclipse.viatra2.core.simple.notification,
+ org.eclipse.viatra2.core.simple.tempdata,
+ org.eclipse.viatra2.core.tracebased,
+ org.eclipse.viatra2.core.tracebased.tracetree,
+ org.eclipse.viatra2.errors,
+ org.eclipse.viatra2.errors.info,
+ org.eclipse.viatra2.errors.reporting,
+ org.eclipse.viatra2.exports,
+ org.eclipse.viatra2.framework,
+ org.eclipse.viatra2.framework.properties,
+ org.eclipse.viatra2.framework.properties.providers,
+ org.eclipse.viatra2.imports,
+ org.eclipse.viatra2.interpreters,
+ org.eclipse.viatra2.interpreters.debugInterface,
+ org.eclipse.viatra2.loaders,
+ org.eclipse.viatra2.logger,
+ org.eclipse.viatra2.merger,
+ org.eclipse.viatra2.modelChecker,
+ org.eclipse.viatra2.modelChecker.impl,
+ org.eclipse.viatra2.natives,
+ org.eclipse.viatra2.tags,
+ org.eclipse.viatra2.tags.impl
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/org.eclipse.viatra2.core2/about.html b/org.eclipse.viatra2.core2/about.html
new file mode 100644
index 0000000..1262b8c
--- /dev/null
+++ b/org.eclipse.viatra2.core2/about.html
@@ -0,0 +1,28 @@
+<!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>About</title>

+</head>

+<body lang="EN-US">

+<h2>About This Content</h2>

+ 

+<p>July 4th, 2008</p>	

+<h3>License</h3>

+

+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 

+indicated below, the Content 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 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>If you did not receive this Content directly from the Eclipse Foundation, the Content is 

+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may

+apply to your use of any object code in the Content.  Check the Redistributor's license that was 

+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise

+indicated below, the terms and conditions of the EPL still apply to any source code in the Content

+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>

+

+</body>

+</html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.core2/build.properties b/org.eclipse.viatra2.core2/build.properties
new file mode 100644
index 0000000..9b31074
--- /dev/null
+++ b/org.eclipse.viatra2.core2/build.properties
@@ -0,0 +1,8 @@
+bin.includes = model/,\
+               plugin.xml,\
+               schema/,\
+               META-INF/,\
+               .
+source.. = src/
+src.includes = schema/,\
+               model/
diff --git a/org.eclipse.viatra2.core2/model/vpmcore.vpml b/org.eclipse.viatra2.core2/model/vpmcore.vpml
new file mode 100644
index 0000000..0d4fba8
--- /dev/null
+++ b/org.eclipse.viatra2.core2/model/vpmcore.vpml
@@ -0,0 +1,105 @@
+<?xml version="1.0" ?>
+<VPM>
+<PROPERTIES>
+<PROPERTY name="codeout@class" value="unknown"/>
+<PROPERTY name="codeout@efile.autolinefeed" value="yes"/>
+<PROPERTY name="codeout@efile.basedir" value=""/>
+<PROPERTY name="codeout@efile.project" value=""/>
+<PROPERTY name="codeout@file.autolinefeed" value="yes"/>
+<PROPERTY name="codeout@initial" value="unknown"/>
+<PROPERTY name="codeout@simple.autolinefeed" value="yes"/>
+<PROPERTY name="codeout@simple.output" value="screen"/>
+<PROPERTY name="codeout@window.autolinefeed" value="yes"/>
+<PROPERTY name="log@level" value="3"/>
+<PROPERTY name="log@output" value="screen"/>
+<PROPERTY name="viatra_tree_editor@formatstring_entity" value="%n%&#91;20]{ {$%}}v%{ : $}t%{ &#91;$]}s"/>
+<PROPERTY name="viatra_tree_editor@formatstring_relation" value="%n (-&#62; %target)%{ : $}t%{ &#91;$]}s"/>
+</PROPERTIES>
+<MODEL>
+<ROOTENTITY id="0"/>
+<ENTITIES>
+<ENTITY id="1">
+<NAME>datatypes</NAME>
+<ISFINALTYPE>false</ISFINALTYPE>
+<PARENT><ENTITY idref="0"/></PARENT>
+<VALUE></VALUE>
+</ENTITY>
+<ENTITY id="2">
+<NAME>String</NAME>
+<ISFINALTYPE>false</ISFINALTYPE>
+<PARENT><ENTITY idref="1"/></PARENT>
+<VALUE></VALUE>
+</ENTITY>
+<ENTITY id="3">
+<NAME>Boolean</NAME>
+<VIEWINFO>Inheritance from Constant should not be allowed.</VIEWINFO>
+<ISFINALTYPE>false</ISFINALTYPE>
+<PARENT><ENTITY idref="1"/></PARENT>
+<VALUE></VALUE>
+</ENTITY>
+<ENTITY id="4">
+<NAME>false</NAME>
+<ISFINALTYPE>false</ISFINALTYPE>
+<TYPE><MODELELEMENT idref="3"/></TYPE>
+<PARENT><ENTITY idref="3"/></PARENT>
+<VALUE></VALUE>
+</ENTITY>
+<ENTITY id="5">
+<NAME>true</NAME>
+<ISFINALTYPE>false</ISFINALTYPE>
+<TYPE><MODELELEMENT idref="3"/></TYPE>
+<PARENT><ENTITY idref="3"/></PARENT>
+<VALUE></VALUE>
+</ENTITY>
+<ENTITY id="6">
+<NAME>Integer</NAME>
+<ISFINALTYPE>false</ISFINALTYPE>
+<PARENT><ENTITY idref="1"/></PARENT>
+<VALUE></VALUE>
+</ENTITY>
+<ENTITY id="7">
+<NAME>Double</NAME>
+<ISFINALTYPE>false</ISFINALTYPE>
+<PARENT><ENTITY idref="1"/></PARENT>
+<VALUE></VALUE>
+</ENTITY>
+<ENTITY id="8">
+<NAME>MultiplicityKind</NAME>
+<VIEWINFO>Multiplicity kind of relations in the VPM modelspace.</VIEWINFO>
+<ISFINALTYPE>false</ISFINALTYPE>
+<PARENT><ENTITY idref="1"/></PARENT>
+<VALUE></VALUE>
+</ENTITY>
+<ENTITY id="9">
+<NAME>one_to_one</NAME>
+<ISFINALTYPE>false</ISFINALTYPE>
+<TYPE><MODELELEMENT idref="8"/></TYPE>
+<PARENT><ENTITY idref="8"/></PARENT>
+<VALUE></VALUE>
+</ENTITY>
+<ENTITY id="10">
+<NAME>one_to_many</NAME>
+<ISFINALTYPE>false</ISFINALTYPE>
+<TYPE><MODELELEMENT idref="8"/></TYPE>
+<PARENT><ENTITY idref="8"/></PARENT>
+<VALUE></VALUE>
+</ENTITY>
+<ENTITY id="11">
+<NAME>many_to_one</NAME>
+<ISFINALTYPE>false</ISFINALTYPE>
+<TYPE><MODELELEMENT idref="8"/></TYPE>
+<PARENT><ENTITY idref="8"/></PARENT>
+<VALUE></VALUE>
+</ENTITY>
+<ENTITY id="12">
+<NAME>many_to_many</NAME>
+<ISFINALTYPE>false</ISFINALTYPE>
+<TYPE><MODELELEMENT idref="8"/></TYPE>
+<PARENT><ENTITY idref="8"/></PARENT>
+<VALUE></VALUE>
+</ENTITY>
+</ENTITIES>
+<RELATIONS>
+</RELATIONS>
+</MODEL>
+</VPM>
diff --git a/org.eclipse.viatra2.core2/model/vpmcore.vtml b/org.eclipse.viatra2.core2/model/vpmcore.vtml
new file mode 100644
index 0000000..e941f72
--- /dev/null
+++ b/org.eclipse.viatra2.core2/model/vpmcore.vtml
@@ -0,0 +1,26 @@
+entity('datatypes')

+{

+	entity('datatypes'.'Boolean')

+	{

+		entity('datatypes'.'Boolean'.'false');

+		entity('datatypes'.'Boolean'.'true');

+	}

+	entity('datatypes'.'Double');

+	entity('datatypes'.'Integer');

+	entity('datatypes'.'MultiplicityKind')
+	{

+		entity('datatypes'.'MultiplicityKind'.'many_to_many');

+		entity('datatypes'.'MultiplicityKind'.'many_to_one');

+		entity('datatypes'.'MultiplicityKind'.'one_to_many');

+		entity('datatypes'.'MultiplicityKind'.'one_to_one');

+	}

+	entity('datatypes'.'String');

+}

+

+instanceOf('datatypes'.'Boolean'.'false','datatypes'.'Boolean');

+instanceOf('datatypes'.'Boolean'.'true','datatypes'.'Boolean');

+instanceOf('datatypes'.'MultiplicityKind'.'many_to_many','datatypes'.'MultiplicityKind');

+instanceOf('datatypes'.'MultiplicityKind'.'many_to_one','datatypes'.'MultiplicityKind');

+instanceOf('datatypes'.'MultiplicityKind'.'one_to_many','datatypes'.'MultiplicityKind');

+instanceOf('datatypes'.'MultiplicityKind'.'one_to_one','datatypes'.'MultiplicityKind');

+

diff --git a/org.eclipse.viatra2.core2/plugin.xml b/org.eclipse.viatra2.core2/plugin.xml
new file mode 100644
index 0000000..7fff545
--- /dev/null
+++ b/org.eclipse.viatra2.core2/plugin.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+     <extension-point id="modelimport" name="Model Import Interface" schema="schema/modelimport.exsd"/>
+   <extension-point id="programloader" name="Program Model Loader Interface" schema="schema/programloader.exsd"/>
+   <extension-point id="nativefunction" name="Native Function Extension Point" schema="schema/nativefunction.exsd"/>
+   <extension-point id="codeout" name="code output plugin" schema="schema/codeout.exsd"/>
+   <extension-point id="logger" name="logger" schema="schema/logger.exsd"/>
+   <extension-point id="interpreter" name="interpreter" schema="schema/interpreter.exsd"/>
+   <extension-point id="properties" name="properties" schema="schema/properties.exsd"/>
+   <extension-point id="wizardcontributor" name="New Modelspace Wizard Contributor" schema="schema/wizardcontributor.exsd"/>

+   <extension-point id="frameworkservice" name="VIATRA Framework Service" schema="schema/frameworkservice.exsd"/>
+ <extension
+         point="org.eclipse.viatra2.core2.codeout">
+      <codeout
+            class="org.eclipse.viatra2.codegen.FileCodeFormatter"/>
+   </extension>
+   <extension
+         point="org.eclipse.viatra2.core2.logger">
+      <logger class="org.eclipse.viatra2.logger.SimpleLoggerFactory"/>
+   </extension>
+   <extension
+         point="org.eclipse.viatra2.core2.nativefunction">
+      <function class="org.eclipse.viatra2.natives.AdderFunction"/>
+      <function class="org.eclipse.viatra2.natives.ExistsFunction"/>
+      <function class="org.eclipse.viatra2.natives.SysTimeFunction"/>
+      <function class="org.eclipse.viatra2.natives.CleanFunction"/>
+      <function class="org.eclipse.viatra2.buffers.GetBuffer"/>
+      <function
+            class="org.eclipse.viatra2.natives.GetVIATRAID">
+      </function>
+      <function
+            class="org.eclipse.viatra2.natives.MeasureMemoryFootprintFunction">
+      </function>
+      <function class="org.eclipse.viatra2.buffers.ClearBuffer"/>
+      <function class="org.eclipse.viatra2.buffers.FlushBuffer"/>
+      <function
+            class="org.eclipse.viatra2.natives.RandomDoubleFunction">
+      </function>
+      <function
+            class="org.eclipse.viatra2.natives.RandomIntegerFunction">
+      </function>
+      
+     
+   </extension>
+   <extension
+         point="org.eclipse.viatra2.core2.wizardcontributor">
+      <category
+            id="vpm"
+            name="VPM Core"/>
+      <model
+            categoryID="vpm"
+            description="The Visual and Precise Metamodeling language core metamodel by Daniel Varro"
+            file_vpml="model/vpmcore.vpml"
+            file_vtml="model/vpmcore.vtml"
+            id="org.eclipse.viatra2.core2.vpmcoremodel"
+            name="VPM Core and Datatypes metamodel"/>
+   </extension>
+   <extension
+         point="org.eclipse.viatra2.core2.properties">
+      <propertyprovider class="org.eclipse.viatra2.framework.properties.providers.VPMLoggerPropertyProvider"/>
+      <propertyprovider
+            class="org.eclipse.viatra2.framework.properties.providers.VPMCorePropertyProvider">
+      </propertyprovider>
+      <!-- <propertyprovider
+            class="org.eclipse.viatra2.modelChecker.ModelCheckerPropertyProvider">
+      </propertyprovider> -->
+   </extension>
+   <extension
+         point="org.eclipse.core.runtime.adapters">
+      <factory
+            adaptableType="org.eclipse.core.resources.IResource"
+            class="org.eclipse.viatra2.errors.reporting.internal.FileToMarkerManager">
+         <adapter
+               type="org.eclipse.viatra2.errors.reporting.IErrorReporter">
+         </adapter>
+      </factory>
+   </extension>
+ 
+</plugin>
diff --git a/org.eclipse.viatra2.core2/schema/codeout.exsd b/org.eclipse.viatra2.core2/schema/codeout.exsd
new file mode 100644
index 0000000..02b7e37
--- /dev/null
+++ b/org.eclipse.viatra2.core2/schema/codeout.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>

+<!-- Schema file written by PDE -->

+<schema targetNamespace="org.eclipse.viatra2.core2" xmlns="http://www.w3.org/2001/XMLSchema">

+<annotation>

+      <appinfo>

+         <meta.schema plugin="org.eclipse.viatra2.core2" id="codeout" name="code output plugin"/>

+      </appinfo>

+      <documentation>

+         [Enter description of this extension point.]

+      </documentation>

+   </annotation>

+

+   <element name="extension">

+      <annotation>

+         <appinfo>

+            <meta.element />

+         </appinfo>

+      </annotation>

+      <complexType>

+         <sequence>

+            <element ref="codeout" minOccurs="1" maxOccurs="unbounded"/>

+         </sequence>

+         <attribute name="point" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appinfo>

+                  <meta.attribute translatable="true"/>

+               </appinfo>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <element name="codeout">

+      <complexType>

+         <attribute name="class" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appinfo>

+                  <meta.attribute kind="java" basedOn=":org.eclipse.viatra2.codegen.CodeOutputPlugin"/>

+               </appinfo>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="since"/>

+      </appinfo>

+      <documentation>

+         [Enter the first release in which this extension point appears.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="examples"/>

+      </appinfo>

+      <documentation>

+         [Enter extension point usage example here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="apiInfo"/>

+      </appinfo>

+      <documentation>

+         [Enter API information here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="implementation"/>

+      </appinfo>

+      <documentation>

+         [Enter information about supplied implementation of this extension point.]

+      </documentation>

+   </annotation>

+

+

+</schema>

diff --git a/org.eclipse.viatra2.core2/schema/frameworkservice.exsd b/org.eclipse.viatra2.core2/schema/frameworkservice.exsd
new file mode 100644
index 0000000..9048e1b
--- /dev/null
+++ b/org.eclipse.viatra2.core2/schema/frameworkservice.exsd
@@ -0,0 +1,112 @@
+<?xml version='1.0' encoding='UTF-8'?>

+<!-- Schema file written by PDE -->

+<schema targetNamespace="org.eclipse.viatra2.core2">

+<annotation>

+      <appInfo>

+         <meta.schema plugin="org.eclipse.viatra2.core2" id="frameworkservice" name="VIATRA Framework Service"/>

+      </appInfo>

+      <documentation>

+         Provides an extension point for plugins offering core VIATRA2 Framework services.

+      </documentation>

+   </annotation>

+

+   <element name="extension">

+      <complexType>

+         <choice>

+            <element ref="factory"/>

+         </choice>

+         <attribute name="point" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appInfo>

+                  <meta.attribute translatable="true"/>

+               </appInfo>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <element name="factory">

+      <complexType>

+         <attribute name="factoryclass" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appInfo>

+                  <meta.attribute kind="java" basedOn=":org.eclipse.viatra2.framework.IFrameworkServiceFactory"/>

+               </appInfo>

+            </annotation>

+         </attribute>

+         <attribute name="servicename" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="since"/>

+      </appInfo>

+      <documentation>

+         VIATRA2 R3.1

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="examples"/>

+      </appInfo>

+      <documentation>

+         [Enter extension point usage example here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="apiInfo"/>

+      </appInfo>

+      <documentation>

+         [Enter API information here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="implementation"/>

+      </appInfo>

+      <documentation>

+         [Enter information about supplied implementation of this extension point.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="copyright"/>

+      </appInfo>

+      <documentation>

+         

+      </documentation>

+   </annotation>

+

+</schema>

diff --git a/org.eclipse.viatra2.core2/schema/interpreter.exsd b/org.eclipse.viatra2.core2/schema/interpreter.exsd
new file mode 100644
index 0000000..957b36a
--- /dev/null
+++ b/org.eclipse.viatra2.core2/schema/interpreter.exsd
@@ -0,0 +1,130 @@
+<?xml version='1.0' encoding='UTF-8'?>

+<!-- Schema file written by PDE -->

+<schema targetNamespace="org.eclipse.viatra2.core2" xmlns="http://www.w3.org/2001/XMLSchema">

+<annotation>

+      <appinfo>

+         <meta.schema plugin="org.eclipse.viatra2.core2" id="interpreter" name="interpreter"/>

+      </appinfo>

+      <documentation>

+         [Enter description of this extension point.]

+      </documentation>

+   </annotation>

+

+   <element name="extension">

+      <annotation>

+         <appinfo>

+            <meta.element />

+         </appinfo>

+      </annotation>

+      <complexType>

+         <sequence>

+            <element ref="interpreter"/>

+         </sequence>

+         <attribute name="point" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appinfo>

+                  <meta.attribute translatable="true"/>

+               </appinfo>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <element name="interpreter">

+      <complexType>

+         <attribute name="class" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appinfo>

+                  <meta.attribute kind="java" basedOn=":org.eclipse.viatra2.interpreters.ModelInterpreter"/>

+               </appinfo>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="description" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="interpretedClasses" type="string" use="required">

+            <annotation>

+               <documentation>

+                  Java FQN of interpretable classes.

+               </documentation>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="since"/>

+      </appinfo>

+      <documentation>

+         [Enter the first release in which this extension point appears.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="examples"/>

+      </appinfo>

+      <documentation>

+         [Enter extension point usage example here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="apiInfo"/>

+      </appinfo>

+      <documentation>

+         [Enter API information here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="implementation"/>

+      </appinfo>

+      <documentation>

+         [Enter information about supplied implementation of this extension point.]

+      </documentation>

+   </annotation>

+

+

+</schema>

diff --git a/org.eclipse.viatra2.core2/schema/logger.exsd b/org.eclipse.viatra2.core2/schema/logger.exsd
new file mode 100644
index 0000000..0d43ad3
--- /dev/null
+++ b/org.eclipse.viatra2.core2/schema/logger.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>

+<!-- Schema file written by PDE -->

+<schema targetNamespace="org.eclipse.viatra2.core2" xmlns="http://www.w3.org/2001/XMLSchema">

+<annotation>

+      <appinfo>

+         <meta.schema plugin="org.eclipse.viatra2.core2" id="logger" name="logger"/>

+      </appinfo>

+      <documentation>

+         [Enter description of this extension point.]

+      </documentation>

+   </annotation>

+

+   <element name="extension">

+      <annotation>

+         <appinfo>

+            <meta.element />

+         </appinfo>

+      </annotation>

+      <complexType>

+         <sequence>

+            <element ref="logger"/>

+         </sequence>

+         <attribute name="point" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appinfo>

+                  <meta.attribute translatable="true"/>

+               </appinfo>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <element name="logger">

+      <complexType>

+         <attribute name="class" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appinfo>

+                  <meta.attribute kind="java" basedOn=":org.eclipse.viatra2.logger.Logger"/>

+               </appinfo>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="since"/>

+      </appinfo>

+      <documentation>

+         [Enter the first release in which this extension point appears.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="examples"/>

+      </appinfo>

+      <documentation>

+         [Enter extension point usage example here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="apiInfo"/>

+      </appinfo>

+      <documentation>

+         [Enter API information here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="implementation"/>

+      </appinfo>

+      <documentation>

+         [Enter information about supplied implementation of this extension point.]

+      </documentation>

+   </annotation>

+

+

+</schema>

diff --git a/org.eclipse.viatra2.core2/schema/modelimport.exsd b/org.eclipse.viatra2.core2/schema/modelimport.exsd
new file mode 100644
index 0000000..f6edb1c
--- /dev/null
+++ b/org.eclipse.viatra2.core2/schema/modelimport.exsd
@@ -0,0 +1,128 @@
+<?xml version='1.0' encoding='UTF-8'?>

+<!-- Schema file written by PDE -->

+<schema targetNamespace="org.eclipse.viatra2.core2" xmlns="http://www.w3.org/2001/XMLSchema">

+<annotation>

+      <appinfo>

+         <meta.schema plugin="org.eclipse.viatra2.core2" id="modelimport" name="Model Import Interface"/>

+      </appinfo>

+      <documentation>

+         The importer.class must implement the org.eclipse.viatra2.imports.NativeImporterFactory interface.

+      </documentation>

+   </annotation>

+

+   <element name="extension">

+      <annotation>

+         <appinfo>

+            <meta.element />

+         </appinfo>

+      </annotation>

+      <complexType>

+         <sequence>

+            <element ref="importer" minOccurs="1" maxOccurs="unbounded"/>

+         </sequence>

+         <attribute name="point" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <element name="importer">

+      <complexType>

+         <attribute name="class" type="string" use="required">

+            <annotation>

+               <documentation>

+                  Must implement Interface: 

+org.eclipse.viatra2.imports.NativeImporter

+               </documentation>

+               <appinfo>

+                  <meta.attribute kind="java" basedOn=":org.eclipse.viatra2.imports.NativeImporter"/>

+               </appinfo>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="fileExtensionList" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="description" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="since"/>

+      </appinfo>

+      <documentation>

+         [Enter the first release in which this extension point appears.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="examples"/>

+      </appinfo>

+      <documentation>

+         [Enter extension point usage example here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="apiInfo"/>

+      </appinfo>

+      <documentation>

+         [Enter API information here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="implementation"/>

+      </appinfo>

+      <documentation>

+         [Enter information about supplied implementation of this extension point.]

+      </documentation>

+   </annotation>

+

+

+</schema>

diff --git a/org.eclipse.viatra2.core2/schema/nativefunction.exsd b/org.eclipse.viatra2.core2/schema/nativefunction.exsd
new file mode 100644
index 0000000..35a7265
--- /dev/null
+++ b/org.eclipse.viatra2.core2/schema/nativefunction.exsd
@@ -0,0 +1,99 @@
+<?xml version='1.0' encoding='UTF-8'?>

+<!-- Schema file written by PDE -->

+<schema targetNamespace="org.eclipse.viatra2.core2" xmlns="http://www.w3.org/2001/XMLSchema">

+<annotation>

+      <appinfo>

+         <meta.schema plugin="org.eclipse.viatra2.core2" id="nativefunction" name="Native Function Extension Point"/>

+      </appinfo>

+      <documentation>

+         [Enter description of this extension point.]

+      </documentation>

+   </annotation>

+

+   <element name="extension">

+      <annotation>

+         <appinfo>

+            <meta.element />

+         </appinfo>

+      </annotation>

+      <complexType>

+         <sequence minOccurs="1" maxOccurs="unbounded">

+            <element ref="function"/>

+         </sequence>

+         <attribute name="point" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <element name="function">

+      <complexType>

+         <attribute name="class" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appinfo>

+                  <meta.attribute kind="java" basedOn=":org.eclipse.viatra2.natives.ASMNativeFunction"/>

+               </appinfo>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="since"/>

+      </appinfo>

+      <documentation>

+         [Enter the first release in which this extension point appears.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="examples"/>

+      </appinfo>

+      <documentation>

+         [Enter extension point usage example here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="apiInfo"/>

+      </appinfo>

+      <documentation>

+         [Enter API information here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="implementation"/>

+      </appinfo>

+      <documentation>

+         [Enter information about supplied implementation of this extension point.]

+      </documentation>

+   </annotation>

+

+

+</schema>

diff --git a/org.eclipse.viatra2.core2/schema/programloader.exsd b/org.eclipse.viatra2.core2/schema/programloader.exsd
new file mode 100644
index 0000000..d15859f
--- /dev/null
+++ b/org.eclipse.viatra2.core2/schema/programloader.exsd
@@ -0,0 +1,127 @@
+<?xml version='1.0' encoding='UTF-8'?>

+<!-- Schema file written by PDE -->

+<schema targetNamespace="org.eclipse.viatra2.core2" xmlns="http://www.w3.org/2001/XMLSchema">

+<annotation>

+      <appinfo>

+         <meta.schema plugin="org.eclipse.viatra2.core2" id="modelimport" name="Model Import Interface"/>

+      </appinfo>

+      <documentation>

+         The importer.class must implement the org.eclipse.viatra2.imports.NativeImporterFactory interface.

+      </documentation>

+   </annotation>

+

+   <element name="extension">

+      <annotation>

+         <appinfo>

+            <meta.element />

+         </appinfo>

+      </annotation>

+      <complexType>

+         <sequence>

+            <element ref="loader" minOccurs="1" maxOccurs="unbounded"/>

+         </sequence>

+         <attribute name="point" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <element name="loader">

+      <complexType>

+         <attribute name="class" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appinfo>

+                  <meta.attribute kind="java" basedOn=":org.eclipse.viatra2.loaders.Loader"/>

+               </appinfo>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="fileExtensionList" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="description" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="since"/>

+      </appinfo>

+      <documentation>

+         [Enter the first release in which this extension point appears.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="examples"/>

+      </appinfo>

+      <documentation>

+         [Enter extension point usage example here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="apiInfo"/>

+      </appinfo>

+      <documentation>

+         [Enter API information here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="implementation"/>

+      </appinfo>

+      <documentation>

+         [Enter information about supplied implementation of this extension point.]

+      </documentation>

+   </annotation>

+

+

+</schema>

diff --git a/org.eclipse.viatra2.core2/schema/properties.exsd b/org.eclipse.viatra2.core2/schema/properties.exsd
new file mode 100644
index 0000000..803c382
--- /dev/null
+++ b/org.eclipse.viatra2.core2/schema/properties.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>

+<!-- Schema file written by PDE -->

+<schema targetNamespace="org.eclipse.viatra2.core2" xmlns="http://www.w3.org/2001/XMLSchema">

+<annotation>

+      <appinfo>

+         <meta.schema plugin="org.eclipse.viatra2.core2" id="properties" name="properties"/>

+      </appinfo>

+      <documentation>

+         [Enter description of this extension point.]

+      </documentation>

+   </annotation>

+

+   <element name="extension">

+      <annotation>

+         <appinfo>

+            <meta.element />

+         </appinfo>

+      </annotation>

+      <complexType>

+         <sequence>

+            <element ref="propertyprovider" minOccurs="1" maxOccurs="unbounded"/>

+         </sequence>

+         <attribute name="point" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appinfo>

+                  <meta.attribute translatable="true"/>

+               </appinfo>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <element name="propertyprovider">

+      <complexType>

+         <attribute name="class" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appinfo>

+                  <meta.attribute kind="java" basedOn=":org.eclipse.viatra2.framework.properties.IViatraPropertyProvider"/>

+               </appinfo>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="since"/>

+      </appinfo>

+      <documentation>

+         [Enter the first release in which this extension point appears.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="examples"/>

+      </appinfo>

+      <documentation>

+         [Enter extension point usage example here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="apiInfo"/>

+      </appinfo>

+      <documentation>

+         [Enter API information here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="implementation"/>

+      </appinfo>

+      <documentation>

+         [Enter information about supplied implementation of this extension point.]

+      </documentation>

+   </annotation>

+

+

+</schema>

diff --git a/org.eclipse.viatra2.core2/schema/wizardcontributor.exsd b/org.eclipse.viatra2.core2/schema/wizardcontributor.exsd
new file mode 100644
index 0000000..317a4a3
--- /dev/null
+++ b/org.eclipse.viatra2.core2/schema/wizardcontributor.exsd
@@ -0,0 +1,178 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.viatra2.core2">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.viatra2.core2" id="wizardcontributor" name="New Modelspace Wizard Contributor"/>
+      </appInfo>
+      <documentation>
+         This extension point provides support for plugins to contribute modelspace fragments to the New Modelspace Wizard provided by the Viatra Tree Editor R2.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <complexType>
+         <sequence minOccurs="1" maxOccurs="unbounded">
+            <element ref="category"/>
+            <element ref="model" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="category">
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="model">
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="requiredIDs" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="forbiddenIDs" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="containedIDs" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="categoryID" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="description" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="file_vtml" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="file_vpml" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         [Enter the first release in which this extension point appears.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         [Enter extension point usage example here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         [Enter API information here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/EclipseExtensionProvider.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/EclipseExtensionProvider.java
new file mode 100644
index 0000000..397265b
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/EclipseExtensionProvider.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2;
+
+import org.eclipse.viatra2.codegen.CodeOutputPluginFactory;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.simple.SimpleModelSpace;
+import org.eclipse.viatra2.core.tracebased.TraceModelSpace;
+import org.eclipse.viatra2.framework.ExtensionProvider;
+import org.eclipse.viatra2.framework.FrameworkException;
+import org.eclipse.viatra2.framework.properties.IViatraPropertyProvider;
+import org.eclipse.viatra2.framework.properties.VPMProperties;
+import org.eclipse.viatra2.framework.properties.providers.VPMCorePropertyProvider;
+import org.eclipse.viatra2.imports.NativeImporterFactory;
+import org.eclipse.viatra2.interpreters.ModelInterpreterFactory;
+import org.eclipse.viatra2.loaders.LoaderFactory;
+import org.eclipse.viatra2.logger.Logger;
+import org.eclipse.viatra2.logger.LoggerFactory;
+import org.eclipse.viatra2.natives.ASMNativeFunction;
+
+/**
+ * The extension loader in Eclipse environment. Extensions for the VPM modeling
+ * core are found and loaded as Eclipse plugins.
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public class EclipseExtensionProvider implements ExtensionProvider {
+	Logger logger;
+
+	public Logger getDefaultLogger() {
+		return ViatraPlugin.getDefault().getEclipseLogger();
+	}
+
+	public void setLogger(Logger l) {
+		logger = l;
+	}
+
+	public LoggerFactory[] getAvailableLoggers() {
+		return ViatraPlugin.getDefault().initLoggerPlugins().toArray(
+				new LoggerFactory[0]);
+	}
+
+	public CodeOutputPluginFactory[] getCodeOutputPlugins() {
+		return ViatraPlugin.getDefault().initCodeOutPlugins().toArray(
+				new CodeOutputPluginFactory[0]);
+	}
+
+	public NativeImporterFactory[] getNativeImporters(VPMProperties p) {
+		return ViatraPlugin.getDefault().getImporterPlugins();
+	}
+
+	public LoaderFactory[] getLoaders(VPMProperties p) {
+		return ViatraPlugin.getDefault().getLoaderPlugins();
+	}
+
+	/*
+	 * public InputStream getPropertyStream() throws IOException { return
+	 * ViatraPlugin.getDefault().getPropertyStream(); }
+	 */
+
+	public VPMProperties getDefaultProperties() throws FrameworkException {
+		// XXX VPMProperties is instantiated here

+		VPMProperties props = new VPMProperties();
+		for (IViatraPropertyProvider p : getPropertyProviders()) {
+			props.addPropertyProvider(p);
+			for (String key : p.getAllPropertyIds()) {
+				props.setRuntimeProperty(p.getProviderID(), key, p
+						.getDefaultPropertyValue(key));
+			}
+		}
+		return props;
+	}
+
+	public ASMNativeFunction[] getNativeFunctions() {
+		return ViatraPlugin.getDefault().initNativeFunctionPlugins().toArray(
+				new ASMNativeFunction[0]);
+	}
+
+	public IModelSpace getEmptyModelspace(VPMProperties props) {
+		if (props.isRuntimePropertySet(
+				VPMCorePropertyProvider.VPM_CORE_PROVIDER_NAME,
+				VPMCorePropertyProvider.VPM_CORE_PROVIDER_MANAGER_PROPERTY)) {
+			if (props
+					.getRuntimeProperty(
+							VPMCorePropertyProvider.VPM_CORE_PROVIDER_NAME,
+							VPMCorePropertyProvider.VPM_CORE_PROVIDER_MANAGER_PROPERTY)
+					.equals(VPMCorePropertyProvider.VPM_CORE_PROVIDER_TRACEBASED_VALUE)) {
+				return new TraceModelSpace();
+			}
+		}
+		return new SimpleModelSpace();
+	}
+
+	public ModelInterpreterFactory[] getInterpreters() {
+		return ViatraPlugin.getDefault().initInterpreterPlugins().toArray(
+				new ModelInterpreterFactory[0]);
+	}
+
+	public IViatraPropertyProvider[] getPropertyProviders() {
+		return ViatraPlugin.getDefault().getPropertyProviders().toArray(
+				new IViatraPropertyProvider[0]);
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/GeneralCodeoutFactory.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/GeneralCodeoutFactory.java
new file mode 100644
index 0000000..7e504f5
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/GeneralCodeoutFactory.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.viatra2.codegen.CodeOutputPlugin;
+import org.eclipse.viatra2.codegen.CodeOutputPluginFactory;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.imports.NativeImporter;
+
+public class GeneralCodeoutFactory implements CodeOutputPluginFactory {
+	String name;
+
+	String id;
+
+	NativeImporter importer;
+
+	String[] fileExtensionList;
+
+	IConfigurationElement el;
+
+	public GeneralCodeoutFactory(String id, String name,
+			IConfigurationElement el) {
+		this.id = id;
+		this.name = name;
+		this.el = el;
+	}
+
+	public void setFileExtensionList(String[] fileExtensionList) {
+		this.fileExtensionList = fileExtensionList;
+	}
+
+	public CodeOutputPlugin createCodeoutPlugin(IFramework fw) {
+		try {
+			CodeOutputPlugin o = (CodeOutputPlugin) el
+					.createExecutableExtension("class");
+			return o;
+		} catch (Exception e) {
+			// TODO Auto-generated catch block

+			e.printStackTrace();
+		}
+		return null;
+	}
+
+	public String getCodeOutName() {
+		return name;
+	}
+
+	public String getCodeOutId() {
+		return id;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/GeneralInterpreterFactory.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/GeneralInterpreterFactory.java
new file mode 100644
index 0000000..e29b89e
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/GeneralInterpreterFactory.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2;
+
+import java.util.StringTokenizer;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.viatra2.interpreters.ModelInterpreter;
+import org.eclipse.viatra2.interpreters.ModelInterpreterFactory;
+
+public class GeneralInterpreterFactory implements ModelInterpreterFactory {
+	IConfigurationElement className;
+
+	public GeneralInterpreterFactory(IConfigurationElement name2) {
+		className = name2;
+	}
+
+	public String getDescription() {
+		return className.getAttribute("description");
+	}
+
+	public String getId() {
+		return className.getAttribute("id");
+	}
+
+	public String getName() {
+		return className.getAttribute("name");
+	}
+
+	public ModelInterpreter getInterpreter() {
+		ModelInterpreter o = null;
+		try {
+			o = (ModelInterpreter) className.createExecutableExtension("class");
+		} catch (CoreException e) {
+			// TODO Auto-generated catch block

+			e.printStackTrace();
+		}
+		return o;
+	}
+
+	public String[] getInterpretedClasses() {
+		String ret = className.getAttribute("interpretedClasses");
+		if (ret == null)
+			return null;
+		if (ret.length() > 0) {
+			StringTokenizer tok = new StringTokenizer(ret, ",");
+			String[] args = new String[tok.countTokens()];
+			for (int i = 0; i < args.length; ++i) {
+				args[i] = tok.nextToken();
+			}
+			return args;
+		} else {
+			return null;
+		}
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/GeneralLoaderFactory.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/GeneralLoaderFactory.java
new file mode 100644
index 0000000..3cbba86
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/GeneralLoaderFactory.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.loaders.Loader;
+import org.eclipse.viatra2.loaders.LoaderFactory;
+
+public class GeneralLoaderFactory implements LoaderFactory {
+	String loaderName;
+
+	String id;
+
+	IConfigurationElement loader;
+
+	String[] fileExtensionList;
+
+	public GeneralLoaderFactory(String id, String name,
+			IConfigurationElement loader, String[] fileExtensionList) {
+		this.id = id;
+		loaderName = name;
+		this.loader = loader;
+		this.fileExtensionList = fileExtensionList;
+	}
+
+	public String getLoaderName() {
+		return loaderName;
+	}
+
+	public Loader getLoaderInstance() throws VPMRuntimeException {
+		try {
+			return (Loader) loader.createExecutableExtension("class");
+		} catch (CoreException e) {
+			throw new VPMRuntimeException("error instantiating loader class", e);
+		}
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public String[] getFileExtensionList() {
+		return fileExtensionList;
+	}
+
+	public void setFileExtensionList(String[] fileExtensionList) {
+		this.fileExtensionList = fileExtensionList;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/GeneralNativeImporterFactory.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/GeneralNativeImporterFactory.java
new file mode 100644
index 0000000..d72a7e5
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/GeneralNativeImporterFactory.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.imports.NativeImporter;
+import org.eclipse.viatra2.imports.NativeImporterFactory;
+
+public class GeneralNativeImporterFactory implements NativeImporterFactory {
+	String importerName;
+
+	String id;
+
+	IConfigurationElement importer;
+
+	String[] fileExtensionList;
+
+	public GeneralNativeImporterFactory(String id, String name,
+			IConfigurationElement importer, String[] fileExtensionList) {
+		this.id = id;
+		importerName = name;
+		this.importer = importer;
+		this.fileExtensionList = fileExtensionList;
+	}
+
+	public String getImporterName() {
+		return importerName;
+	}
+
+	public NativeImporter getImporterInstance() throws VPMRuntimeException {
+		try {
+			return (NativeImporter) importer.createExecutableExtension("class");
+		} catch (CoreException e) {
+			throw new VPMRuntimeException("error instantiating importer class",
+					e);
+		}
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public String[] getFileExtensionList() {
+		return fileExtensionList;
+	}
+
+	public void setFileExtensionList(String[] fileExtensionList) {
+		this.fileExtensionList = fileExtensionList;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/ViatraPlugin.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/ViatraPlugin.java
new file mode 100644
index 0000000..79d1711
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/ViatraPlugin.java
@@ -0,0 +1,465 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Preferences;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.viatra2.codegen.CodeOutputPluginFactory;
+import org.eclipse.viatra2.framework.FrameworkManager;
+import org.eclipse.viatra2.framework.properties.IViatraPropertyProvider;
+import org.eclipse.viatra2.imports.NativeImporterFactory;
+import org.eclipse.viatra2.interpreters.ModelInterpreterFactory;
+import org.eclipse.viatra2.loaders.LoaderFactory;
+import org.eclipse.viatra2.logger.EclipseLogger;
+import org.eclipse.viatra2.logger.Logger;
+import org.eclipse.viatra2.logger.LoggerFactory;
+import org.eclipse.viatra2.natives.ASMNativeFunction;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class ViatraPlugin extends Plugin// Plugin

+{
+	// The shared instance.

+	private static ViatraPlugin plugin;
+
+	// Resource bundle.

+//	private ResourceBundle resourceBundle;
+
+	/**
+	 * The constructor.
+	 */
+
+	public ViatraPlugin() {
+
+		super();
+
+		plugin = this;
+/*		try {
+			resourceBundle = ResourceBundle
+					.getBundle("org.eclipse.viatra2.ViatraPluginResources");
+
+		} catch (MissingResourceException x) {
+			resourceBundle = null;
+
+		}
+		*/
+		FrameworkManager.getInstance().setExtensionProvider(
+				new EclipseExtensionProvider());
+	}
+
+	/*
+	 * public ViatraPlugin(IPluginDescriptor pdesc) {
+	 * 
+	 * super(pdesc);
+	 * 
+	 * 
+	 * plugin = this; try { resourceBundle =
+	 * ResourceBundle.getBundle("org.eclipse.viatra2.ViatraPluginResources");
+	 * 
+	 * } catch (MissingResourceException x) { resourceBundle = null;
+	 * 
+	 * } }
+	 */
+
+	static final String import_ext_id = "org.eclipse.viatra2.core2.modelimport";
+
+	static final String loader_ext_id = "org.eclipse.viatra2.core2.programloader";
+
+	static final String native_ext_id = "org.eclipse.viatra2.core2.nativefunction";
+
+	static final String codeout_ext_id = "org.eclipse.viatra2.core2.codeout";
+
+	static final String logger_ext_id = "org.eclipse.viatra2.core2.logger";
+
+	static final String interpreter_ext_id = "org.eclipse.viatra2.core2.interpreter";
+
+	static final String properties_ext_id = "org.eclipse.viatra2.core2.properties";
+
+	private List<IViatraPropertyProvider> initPropertyProviders() {
+		IExtensionRegistry reg = Platform.getExtensionRegistry();
+		IExtensionPoint poi = reg.getExtensionPoint(properties_ext_id);
+		ArrayList<IViatraPropertyProvider> r = new ArrayList<IViatraPropertyProvider>();
+		if (poi == null)
+			return r;
+		IExtension[] exts = poi.getExtensions();
+		for (int i = 0; i < exts.length; i++) {
+			IConfigurationElement[] el = exts[i].getConfigurationElements();
+			for (int j = 0; j < el.length; j++) {
+				try {
+					Object o = el[j].createExecutableExtension("class");
+					if (o instanceof IViatraPropertyProvider) {
+						r.add((IViatraPropertyProvider) o);
+					}
+				} catch (Exception e) {
+
+				}
+			}
+		}
+
+		initPrefs(r);
+
+		return r;
+	}
+
+	List<IViatraPropertyProvider> propProviders;
+
+	public List<IViatraPropertyProvider> getPropertyProviders() {
+		if (propProviders == null)
+			propProviders = initPropertyProviders();
+		return propProviders;
+	}
+
+	/**
+	 * Load default if not yet present.
+	 */
+	private void initPrefs(List<IViatraPropertyProvider> providers) {
+//		IPreferenceStore prefs = ViatraPlugin.getDefault().getPreferenceStore();
+		Preferences prefs = ViatraPlugin.getDefault().getPluginPreferences();
+		for (IViatraPropertyProvider p : providers) {
+			for (String prop_id : p.getAllPropertyIds()) {
+				if (!prefs.contains(p.getProviderID() + "::" + prop_id)) {
+					switch (p.getPropertyKind(prop_id)) {
+					case STRING:
+						prefs.setDefault(p.getProviderID() + "::" + prop_id, p
+								.getDefaultPropertyValue(prop_id));
+						break;
+					case INTEGER:
+						prefs.setDefault(p.getProviderID() + "::" + prop_id,
+								Integer.parseInt(p
+										.getDefaultPropertyValue(prop_id)));
+						break;
+					case BOOLEAN:
+						prefs.setDefault(p.getProviderID() + "::" + prop_id,
+								Boolean.parseBoolean(p
+										.getDefaultPropertyValue(prop_id)));
+						break;
+					case PATH:
+						prefs.setDefault(p.getProviderID() + "::" + prop_id, p
+								.getDefaultPropertyValue(prop_id));
+						break;
+					}
+				}
+			}
+
+		}
+	}
+
+	public List<ASMNativeFunction> initNativeFunctionPlugins() {
+		IExtensionRegistry reg = Platform.getExtensionRegistry();
+		IExtensionPoint poi = reg.getExtensionPoint(native_ext_id);
+		ArrayList<ASMNativeFunction> ret = new ArrayList<ASMNativeFunction>();
+		if (poi == null)
+			return ret;
+		IExtension[] exts = poi.getExtensions();
+		for (int i = 0; i < exts.length; i++) {
+			IConfigurationElement[] el = exts[i].getConfigurationElements();
+			for (int j = 0; j < el.length; j++) {
+				try {
+					Object o = el[j].createExecutableExtension("class");
+					if (o instanceof ASMNativeFunction) {
+						ret.add((ASMNativeFunction) o);
+					}
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+			}
+		}
+		return ret;
+	}
+
+	public Vector<LoaderFactory> initLoaderPlugins() {
+		IExtensionRegistry reg = Platform.getExtensionRegistry();
+		IExtensionPoint poi = reg.getExtensionPoint(loader_ext_id);
+		Vector<LoaderFactory> v = new Vector<LoaderFactory>();
+		if (poi == null)
+			return v;
+		IExtension[] exts = poi.getExtensions();
+		for (int i = 0; i < exts.length; i++) {
+			IConfigurationElement[] el = exts[i].getConfigurationElements();
+			for (int j = 0; j < el.length; j++) {
+				try {
+					String name = el[j].getAttribute("name");
+					String id = el[j].getAttribute("id");
+					String fileExtensionList = el[j]
+							.getAttribute("fileExtensionList");
+					String[] list = new String[0];
+					try {
+						StringTokenizer tok = new StringTokenizer(
+								fileExtensionList, ",");
+						list = new String[tok.countTokens()];
+						for (int k = 0; k < list.length; ++k) {
+							list[k] = tok.nextToken();
+						}
+					} catch (Exception e) {
+
+					}
+					LoaderFactory fact = new GeneralLoaderFactory(id, name,
+							el[j], list);
+					v.add(fact);
+				} catch (Exception e) {
+					e.printStackTrace();
+					// TODO megjeleniteni valahogy

+				}
+			}
+		}
+		return v;
+	}
+
+	public Vector<NativeImporterFactory> initModelImportPlugins() {
+		IExtensionRegistry reg = Platform.getExtensionRegistry();
+		IExtensionPoint poi = reg.getExtensionPoint(import_ext_id);
+		Vector<NativeImporterFactory> v = new Vector<NativeImporterFactory>();
+		if (poi == null)
+			return v;
+		IExtension[] exts = poi.getExtensions();
+		for (int i = 0; i < exts.length; i++) {
+			IConfigurationElement[] el = exts[i].getConfigurationElements();
+			for (int j = 0; j < el.length; j++) {
+				try {
+					String name = el[j].getAttribute("name");
+					String id = el[j].getAttribute("id");
+					String fileExtensionList = el[j]
+							.getAttribute("fileExtensionList");
+					String[] list = new String[0];
+					try {
+						StringTokenizer tok = new StringTokenizer(
+								fileExtensionList, ",");
+						list = new String[tok.countTokens()];
+						for (int k = 0; k < list.length; ++k) {
+							list[k] = tok.nextToken();
+						}
+					} catch (Exception e) {
+
+					}
+					NativeImporterFactory fact = new GeneralNativeImporterFactory(
+							id, name, el[j], list);
+					v.add(fact);
+				} catch (Exception e) {
+					e.printStackTrace();
+					// TODO megjeleniteni valahogy

+				}
+			}
+		}
+		return v;
+	}
+
+	public Vector<CodeOutputPluginFactory> initCodeOutPlugins() {
+		// TODO

+		IExtensionRegistry reg = Platform.getExtensionRegistry();
+
+		IExtensionPoint poi = reg.getExtensionPoint(codeout_ext_id);
+
+		if (poi == null)
+			return new Vector<CodeOutputPluginFactory>();
+		IExtension[] exts = poi.getExtensions();
+
+		Vector<CodeOutputPluginFactory> v = new Vector<CodeOutputPluginFactory>();
+		for (int i = 0; i < exts.length; i++) {
+			IConfigurationElement[] el = exts[i].getConfigurationElements();
+			for (int j = 0; j < el.length; j++) {
+				try {
+					// CodeOutputPlugin o =
+					// (CodeOutputPlugin)el[j].createExecutableExtension
+					// ("class");

+					String id = el[j].getAttribute("id");
+					String name = el[j].getAttribute("name");
+					GeneralCodeoutFactory fact = new GeneralCodeoutFactory(id,
+							name, el[j]);
+					v.add(fact);
+				} catch (Exception e) {
+					e.printStackTrace();
+					// TODO megjeleniteni valahogy

+				}
+			}
+		}
+		return v;
+	}
+
+	public Vector<LoggerFactory> initLoggerPlugins() {
+		// TODO

+		IExtensionRegistry reg = Platform.getExtensionRegistry();
+
+		IExtensionPoint poi = reg.getExtensionPoint(logger_ext_id);
+
+		if (poi == null)
+			return new Vector<LoggerFactory>();
+		IExtension[] exts = poi.getExtensions();
+
+		Vector<LoggerFactory> v = new Vector<LoggerFactory>();
+		for (int i = 0; i < exts.length; i++) {
+			IConfigurationElement[] el = exts[i].getConfigurationElements();
+			for (int j = 0; j < el.length; j++) {
+				try {
+					LoggerFactory o = (LoggerFactory) el[j]
+							.createExecutableExtension("class");
+					v.add(o);
+				} catch (Exception e) {
+					e.printStackTrace();
+					// TODO megjeleniteni valahogy

+				}
+			}
+		}
+		return v;
+	}
+
+	public Vector<ModelInterpreterFactory> initInterpreterPlugins() {
+		// TODO

+		IExtensionRegistry reg = Platform.getExtensionRegistry();
+
+		IExtensionPoint poi = reg.getExtensionPoint(interpreter_ext_id);
+
+		if (poi == null)
+			return new Vector<ModelInterpreterFactory>();
+		IExtension[] exts = poi.getExtensions();
+
+		Vector<ModelInterpreterFactory> v = new Vector<ModelInterpreterFactory>();
+		for (int i = 0; i < exts.length; i++) {
+			IConfigurationElement[] el = exts[i].getConfigurationElements();
+			for (int j = 0; j < el.length; j++) {
+				try {
+					// (ModelInterpreterFactory)el[j].createExecutableExtension(
+					// "class")

+					ModelInterpreterFactory o = new GeneralInterpreterFactory(
+							el[j]);
+					v.add(o);
+				} catch (Exception e) {
+					e.printStackTrace();
+					// TODO megjeleniteni valahogy

+				}
+			}
+		}
+		return v;
+	}
+
+	/**
+	 * This method is called upon plug-in activation
+	 */
+
+	public ILog log;
+
+	List<NativeImporterFactory> nativeImporterPlugins;
+
+	List<LoaderFactory> loaderPlugins;
+
+//	List<ASMNativeFunction> nativeFunctions;
+
+	private BundleContext context;
+
+	@Override
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		this.context = context;
+		log = Platform.getLog(context.getBundle());
+		try {
+			// FrameWorkManager fw = FrameWorkManager.getInstance();

+			nativeImporterPlugins = initModelImportPlugins();
+			loaderPlugins = initLoaderPlugins();
+//			nativeFunctions = initNativeFunctionPlugins();
+		} catch (Exception e) {
+			logError("error : " + e.getLocalizedMessage());
+		}
+	}
+
+	public NativeImporterFactory[] getImporterPlugins() {
+		return nativeImporterPlugins.toArray(new NativeImporterFactory[0]);
+	}
+
+	public LoaderFactory[] getLoaderPlugins() {
+		return loaderPlugins.toArray(new LoaderFactory[0]);
+	}
+
+	public void logError(String s) {
+		Status st = new Status(Status.ERROR, "ViatraCore", 1, s, null);
+		log.log(st);
+	}
+
+	public void logInfo(String s) {
+		Status st = new Status(Status.INFO, "ViatraCore", 1, s, null);
+		log.log(st);
+
+	}
+
+	/**
+	 * This method is called when the plug-in is stopped
+	 */
+	@Override
+	public void stop(BundleContext context) throws Exception {
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance.
+	 */
+	public static ViatraPlugin getDefault() {
+		return plugin;
+	}
+
+	/**
+	 * Returns the string from the plugin's resource bundle, or 'key' if not
+	 * found.
+	 */
+	/*
+	public static String getResourceString(String key) {
+		ResourceBundle bundle = ViatraPlugin.getDefault().getResourceBundle();
+		try {
+			return (bundle != null) ? bundle.getString(key) : key;
+		} catch (MissingResourceException e) {
+			return key;
+		}
+	}
+*/
+	/**
+	 * Returns the plugin's resource bundle,
+	 */
+//	public ResourceBundle getResourceBundle() {
+//		return resourceBundle;
+//	}
+
+	public Logger getEclipseLogger() {
+		ILog elog = ViatraPlugin.getDefault().log;
+		Logger eclLogger = new EclipseLogger(elog);
+		eclLogger.init(null);
+		// XXX Eclipse logger is inited with null properties

+		return eclLogger;
+	}
+
+	/*
+	 * public InputStream getPropertyStream () throws IOException { return
+	 * openStream(new Path("vpm.properties")); }
+	 */
+	/*
+	public List<ASMNativeFunction> getNativeFunctions() {
+		// null would be returned if VIATRA is running in a console
+		// environment... Andras Balogh

+		if (nativeFunctions == null)
+			nativeFunctions = new ArrayList<ASMNativeFunction>();
+		return nativeFunctions;
+	}
+*/
+	public BundleContext getContext() {
+		return context;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/buffers/BufferPrint.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/buffers/BufferPrint.java
new file mode 100644
index 0000000..82c2934
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/buffers/BufferPrint.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.buffers;
+
+import java.io.StringWriter;
+
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.natives.ASMNativeFunction;
+
+public class BufferPrint implements ASMNativeFunction {
+
+	public Object evaluate(IModelSpace msp, Object[] params)
+			throws VPMRuntimeException {
+		if (params[0] instanceof StringWriter) {
+			StringWriter out = (StringWriter) params[0];
+			int ctr = 0;
+			for (int i = 1; i < params.length; i++) {
+				String s = params[i].toString();
+				out.write(s);
+				ctr += s.length();
+			}
+			return ctr;
+		} else
+			return 0;
+	}
+
+	public String getDescription() {
+		return "Prints output to the given buffer.";
+	}
+
+	public String getID() {
+		return "bufferPrint";
+	}
+
+	public String getName() {
+		return "bufferPrint";
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/buffers/BufferStore.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/buffers/BufferStore.java
new file mode 100644
index 0000000..d71f74b
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/buffers/BufferStore.java
@@ -0,0 +1,344 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.buffers;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.StringBufferInputStream;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.viatra2.core.IModelSpace;
+
+/**
+ * Buffer store singleton to manage output buffers for VIATRA2.
+ * @author Istvan Rath
+ *
+ */
+public class BufferStore {
+
+	private static BufferStore _instance = new BufferStore();
+
+	private HashMap<IModelSpace, HashMap<String, StringWriter>> core_buffers = new HashMap<IModelSpace, HashMap<String, StringWriter>>();
+
+	private HashMap<IModelSpace, HashMap<String, FileWriter>> file_buffers = new HashMap<IModelSpace, HashMap<String, FileWriter>>();
+
+	public static synchronized void removeBuffer(IModelSpace m, String pURI) {
+		String key = pURI;
+		HashMap<String, StringWriter> target = _instance.core_buffers.get(m);
+		if (target != null) {
+			target.remove(key);
+		}
+		HashMap<String, FileWriter> _target = _instance.file_buffers.get(m);
+		if (_target != null) {
+			_target.remove(key);
+		}
+	}
+
+	public static synchronized void removeFileBuffers(IModelSpace m) {
+		_instance.file_buffers.remove(m);
+		// refresh workspace

+		try {
+			ResourcesPlugin.getWorkspace().getRoot().refreshLocal(
+					IResource.DEPTH_INFINITE, new NullProgressMonitor());
+		} catch (CoreException e) {
+			m.getFramework().getLogger().fatal(e.getMessage());
+		}
+	}
+
+	/**
+	 * Clear operation is only supported for "core://" buffers.
+	 * @param m
+	 * @param pURI
+	 * @throws URISyntaxException 
+	 */
+	public static synchronized void clearBuffer(IModelSpace m, String pURI) throws URISyntaxException
+	{
+		// parse URI
+		URI uri = new URI(pURI);
+		String key = pURI;
+		if ("core".equals(uri.getScheme())) {
+			// write to in-memory buffer
+			HashMap<String, StringWriter> target = _instance.core_buffers
+					.get(m);
+			if (target == null) {
+				target = new HashMap<String, StringWriter>();
+				_instance.core_buffers.put(m, target);
+			}
+			StringWriter ret = target.get(key);
+			if (ret == null) {
+				// designated buffer does not exist
+				// do nothing
+			}
+			else
+			{
+				ret.getBuffer().delete(0, ret.getBuffer().length());
+				//ret = new StringWriter(); // this causes a problem if there
+				// is a state reference at VTCL level (see #186)
+				
+				//target.put(key, ret);
+			}
+		} else if ("file".equals(uri.getScheme())) 
+		{
+			HashMap<String, FileWriter> target = _instance.file_buffers.get(m);
+			if (target==null) {
+				target = new HashMap<String, FileWriter>();
+				_instance.file_buffers.put(m, target);
+			}
+			FileWriter ret = target.get(key);
+			if (ret == null)
+			{
+				// do nothing
+			}
+			else {
+				String path = uri.getAuthority() + uri.getPath();
+				IFile ifile = ResourcesPlugin.getWorkspace().getRoot().getFile(
+						new Path(path));
+				if (ifile.exists())
+				{
+					// only do something if the file exists
+					try {
+						
+					ifile.setContents(new StringBufferInputStream(""), true, false, null);
+					//ifile.delete(true, null);
+					//ifile.create(new StringBufferInputStream(""), true, null);
+					/*
+						FileWriter fw = new FileWriter(
+								new File(ifile.getLocation().toOSString()), false);
+						fw.write("");
+						fw.flush();
+						fw.close();
+						*/
+					}
+					catch (Exception e) {
+						m.getFramework().getLogger().error("Error encountered while attempting to clear file buffer: "+e.getMessage());
+						m.getFramework().getLogger().printStackTrace(e);
+					}
+				}
+			}
+		} else if("os".equals(uri.getScheme())) {
+			HashMap<String, FileWriter> target = _instance.file_buffers.get(m);
+			if (target==null) {
+				target = new HashMap<String, FileWriter>();
+				_instance.file_buffers.put(m, target);
+			}
+			FileWriter ret = target.get(key);
+			if (ret == null)
+			{
+				// do nothing
+			}
+			else {
+				String path = uri.getAuthority() + uri.getPath();
+				File f = new File(path);
+				if(f.exists()) {
+					FileWriter fw;
+					try {
+						fw = new FileWriter(f, false);
+						fw.write("");
+						fw.flush();
+						fw.close();
+					} catch (Exception e) {
+						m.getFramework().getLogger().error("Error encountered while attempting to clear os buffer: "+e.getMessage());
+						m.getFramework().getLogger().printStackTrace(e);
+					}
+				}
+			}
+		}
+	}
+	
+	/**
+	 * Retrieves a reference to a <code>java.io.Writer</code> which can be used as a VIATRA2
+	 * output buffer.
+	 * @param m
+	 * @param pURI
+	 * @return
+	 * @throws URISyntaxException
+	 * @throws IOException
+	 */
+	public static synchronized Writer getBuffer(IModelSpace m, String pURI, boolean append)
+			throws URISyntaxException, IOException {
+		// parse URI

+		URI uri = new URI(pURI);
+		String key = pURI;
+		if ("core".equals(uri.getScheme())) {
+			// write to in-memory buffer

+			HashMap<String, StringWriter> target = _instance.core_buffers
+					.get(m);
+			if (target == null) {
+				target = new HashMap<String, StringWriter>();
+				_instance.core_buffers.put(m, target);
+			}
+			StringWriter ret = target.get(key);
+			if (ret == null) {
+				ret = new StringWriter();
+				target.put(key, ret);
+				notifyAdded(key);
+			}
+			return ret;
+		} else if ("file".equals(uri.getScheme())) {
+			// write to workspace-relative file

+			String path = uri.getAuthority() + uri.getPath();
+			// check whether the path exists

+			// if not, create projects

+			// ResourcesPlugin.getWorkspace().newProjectDescription("teszt");

+
+			HashMap<String, FileWriter> target = _instance.file_buffers.get(m);
+			if (target == null) {
+				target = new HashMap<String, FileWriter>();
+				_instance.file_buffers.put(m, target);
+			}
+			FileWriter ret = target.get(key);
+			if (ret == null) {
+				IFile ifile = ResourcesPlugin.getWorkspace().getRoot().getFile(
+						new Path(path));
+				IProject p = ResourcesPlugin.getWorkspace().getRoot()
+						.getProject(uri.getAuthority());
+				IProgressMonitor mon = new NullProgressMonitor();
+				try {
+					if (!p.exists()) {
+						p.create(mon);
+					}
+					p.open(mon);
+				} catch (CoreException cex) {
+					throw new IOException(
+							"Target project cannot be created/opened");
+				}
+
+				// make sure project-relative path exists

+				try {
+					String[] segments = uri.getPath().split("/");
+					if (segments.length > 2) // first segment is always "" due
+												// to path beginning with '/'

+					{
+						// there is at least one directory below the project
+						// root

+						IFolder curr = null;
+						for (int i = 1; i < segments.length - 1; i++) // last
+																		// segment
+																		// will
+																		// always
+																		// be
+																		// the
+																		// file
+																		// name

+						{
+							if (curr == null)
+								curr = p.getFolder(segments[i]);
+							else
+								curr = curr.getFolder(segments[i]);
+							if (!curr.exists())
+								curr.create(true, true, mon);
+						}
+					}
+				} catch (CoreException cex) {
+					throw new IOException(
+							"Target folder structure cannot be created");
+				}
+				// open writer to the file

+				ret = new FileWriter(
+						new File(ifile.getLocation().toOSString()), append);
+				target.put(key, ret);
+				// notifyAdded(key);

+			}
+			return ret;
+		} else if("os".equals(uri.getScheme())) {
+			// write to workspace-relative file
+			String path = uri.getAuthority() + uri.getPath();
+			// check whether the path exists
+			// if not, create projects
+			// ResourcesPlugin.getWorkspace().newProjectDescription("teszt");
+
+			HashMap<String, FileWriter> target = _instance.file_buffers.get(m);
+			if (target == null) {
+				target = new HashMap<String, FileWriter>();
+				_instance.file_buffers.put(m, target);
+			}
+			FileWriter ret = target.get(key);
+			if (ret == null) {
+				// absolute path should be correct...
+				File f = new File(path);
+				if(!f.exists()) {
+					String par = f.getParent();
+					File parf = new File(par);
+					if(!parf.exists()) {
+						parf.mkdirs();
+					}
+					f.createNewFile();
+				}
+				ret = new FileWriter(f, append);
+				target.put(key, ret);
+			}
+			return ret;
+		}
+		return null;
+	}
+
+
+	public static synchronized Writer getBuffer(IModelSpace m, String pURI) throws URISyntaxException, IOException
+	{
+		return getBuffer(m, pURI, true);
+	}
+	
+	public static synchronized Set<Map.Entry<String, StringWriter>> getAllCoreBuffers(
+			IModelSpace m) {
+		if (_instance.core_buffers.get(m) != null)
+			return _instance.core_buffers.get(m).entrySet();
+		else
+			return null;
+	}
+
+	public static synchronized Set<Map.Entry<String, FileWriter>> getAllFileBuffers(
+			IModelSpace m) {
+		if (_instance.file_buffers.get(m) != null)
+			return _instance.file_buffers.get(m).entrySet();
+		else
+			return null;
+	}
+
+	private List<IBufferStoreListener> listeners = new ArrayList<IBufferStoreListener>();
+
+	public synchronized static void addListener(IBufferStoreListener l) {
+		_instance.listeners.add(l);
+	}
+
+	public synchronized static void removeListener(IBufferStoreListener l) {
+		_instance.listeners.remove(l);
+	}
+
+	private static void notifyAdded(String key) {
+		for (IBufferStoreListener l : _instance.listeners)
+			l.bufferAdded(key);
+	}
+
+	private static void notifyRemoved(String key) {
+		for (IBufferStoreListener l : _instance.listeners)
+			l.bufferRemoved(key);
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/buffers/ClearBuffer.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/buffers/ClearBuffer.java
new file mode 100644
index 0000000..b4f7514
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/buffers/ClearBuffer.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.buffers;
+
+import java.net.URISyntaxException;
+
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.natives.ASMNativeFunction;
+import org.eclipse.viatra2.natives.NativeFunctionParameter;
+import org.eclipse.viatra2.natives.VIATRANativeFunction;
+
+@VIATRANativeFunction(name = "clearBuffer", remark = "Clears an output buffer.", 
+		returns = { NativeFunctionParameter.ParameterType.BOOLEAN }, 
+		params = { @NativeFunctionParameter(
+				description = "Uniquely identifies an output buffer.Currently supported schemes are: core://<<id>>, file://<<workspace-relative path>>, os://<<absolute path>>.", 
+				name = "bufferURI", 
+				type = { NativeFunctionParameter.ParameterType.STRING }) })
+public class ClearBuffer implements ASMNativeFunction {
+
+	public Object evaluate(IModelSpace msp, Object[] params)
+			throws VPMRuntimeException {
+		try {
+			BufferStore.clearBuffer(msp, params[0].toString());
+			return Boolean.TRUE;
+		} catch (URISyntaxException e) {
+			throw new VPMRuntimeException("Invalid URI syntax", e);
+		}
+	}
+
+	public String getDescription() {
+		return "Clears a core:// output buffer";
+	}
+
+	public String getID() {
+		return this.getClass().getCanonicalName();
+	}
+
+	public String getName() {
+		return "clearBuffer"; // VTCL

+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/buffers/FlushBuffer.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/buffers/FlushBuffer.java
new file mode 100644
index 0000000..0f59668
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/buffers/FlushBuffer.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.buffers;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.net.URISyntaxException;
+
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.natives.ASMNativeFunction;
+import org.eclipse.viatra2.natives.NativeFunctionParameter;
+import org.eclipse.viatra2.natives.VIATRANativeFunction;
+
+@VIATRANativeFunction(name = "flushBuffer", remark = "Flushes an output buffer.", 
+		returns = { NativeFunctionParameter.ParameterType.BOOLEAN }, 
+		params = { @NativeFunctionParameter(
+				description = "Uniquely identifies an output buffer.", 
+				name = "bufferURI", 
+				type = { NativeFunctionParameter.ParameterType.STRING }) })
+public class FlushBuffer implements ASMNativeFunction {
+
+	public Object evaluate(IModelSpace msp, Object[] params)
+			throws VPMRuntimeException {
+		try {
+			Writer w = BufferStore.getBuffer(msp, params[0].toString());
+			w.flush();
+			return Boolean.TRUE;
+		} catch (URISyntaxException e) {
+			throw new VPMRuntimeException("Invalid URI syntax", e);
+		} catch (IOException e) {
+			throw new VPMRuntimeException("Error while flushing buffer", e);
+		}
+	}
+
+	public String getDescription() {
+		return "Flushes an output buffer";
+	}
+
+	public String getID() {
+		return this.getClass().getCanonicalName();
+	}
+
+	public String getName() {
+		return "flushBuffer"; // VTCL

+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/buffers/GetBuffer.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/buffers/GetBuffer.java
new file mode 100644
index 0000000..3d56ae8
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/buffers/GetBuffer.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.buffers;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.natives.ASMNativeFunction;
+import org.eclipse.viatra2.natives.NativeFunctionParameter;
+import org.eclipse.viatra2.natives.VIATRANativeFunction;
+
+@VIATRANativeFunction(name = "getBuffer", 
+		remark = "If the buffer does not exist yet, it will be created. Existing files will be appended to.", 
+		returns = { NativeFunctionParameter.ParameterType.NATIVE }, 
+		params = { 
+		@NativeFunctionParameter(
+				description = "Uniquely identifies an output buffer. Currently supported schemes are: core://<<id>>, file://<<workspace-relative path>>, os://<<absolute path>>.", 
+				name = "bufferURI", type = { NativeFunctionParameter.ParameterType.STRING}
+		),
+		@NativeFunctionParameter(
+				description = "OPTIONALLY indicates whether a file:// or os:// buffer should be created by truncating the original file or append to",
+				name = "append", type = {NativeFunctionParameter.ParameterType.BOOLEAN}
+		)
+		}
+)
+public class GetBuffer implements ASMNativeFunction {
+
+	public Object evaluate(IModelSpace msp, Object[] params)
+			throws VPMRuntimeException {
+		try {
+			if (params.length>1 && params[1] instanceof Boolean)
+			{
+				return BufferStore.getBuffer(msp, params[0].toString(), (Boolean)params[1]);
+			}
+			else if (params.length==1) {
+				return BufferStore.getBuffer(msp, params[0].toString());
+			}
+		} catch (URISyntaxException e) {
+			throw new VPMRuntimeException("Invalid URI syntax", e);
+		} catch (IOException e) {
+			throw new VPMRuntimeException("I/O error", e);
+		}
+		return null;
+	}
+
+	public String getDescription() {
+		return "Creates/retrieves a new output buffer";
+	}
+
+	public String getID() {
+		return this.getClass().getCanonicalName();
+	}
+
+	public String getName() {
+		return "getBuffer"; // VTCL

+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/buffers/IBufferStoreListener.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/buffers/IBufferStoreListener.java
new file mode 100644
index 0000000..09831e2
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/buffers/IBufferStoreListener.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.buffers;
+
+public interface IBufferStoreListener {
+
+	public void bufferAdded(String newKey);
+
+	public void bufferRemoved(String removedKey);
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/codegen/CodeOutputPlugin.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/codegen/CodeOutputPlugin.java
new file mode 100644
index 0000000..1f1b918
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/codegen/CodeOutputPlugin.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.codegen;
+
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.IFramework;
+
+/**
+ * This is the interface of code output. Code generator GTASM programs write
+ * code on the code output (this is the standard output of GTASM programs). All
+ * strings are written on the code output as an atomic step. In other words the
+ * code output is not buffered, so code output can be controlled for example by
+ * prefixes.
+ * 
+ * @author Andras Balogh, istvan
+ * 
+ *         Modified by Istvan Rath on 2008.07.30: - init(l,p) -> init(fw)
+ * 
+ */
+public interface CodeOutputPlugin {
+
+	/**
+	 * Initializes the code output formatter.
+	 * 
+	 * @param l
+	 *            - System logger
+	 * @param p
+	 *            - VPMProperties supplied by the user
+	 */
+
+	public void init(IFramework fw);
+
+	/**
+	 * The plugin starts the work (opens files, etc.) This method is called by
+	 * the Viatra framework, if the code generation begins.
+	 */
+	public void beginWork();
+
+	/**
+	 * The plugin finishes the work (closes files, etc.) This method is called by
+	 * the Viatra framework if the code generation is finished. (eg. after an
+	 * ASM stops)
+	 * 
+	 */
+	public void endWork();
+
+	/**
+	 * Prints out the code supplied in the parameter according to the settings
+	 * of the plugin.
+	 * 
+	 * @param s
+	 *            The code to be written out.
+	 */
+	public void codeOut(String s) throws VPMRuntimeException;
+	/**
+	 * Prints out the code supplied in the parameter according to the settings
+	 * of the plugin and the mode string given.
+	 * 
+	 * @param s
+	 *            The code to be written out.
+	 */
+	// public void codeOut(String uri,String s, String mode);

+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/codegen/CodeOutputPluginFactory.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/codegen/CodeOutputPluginFactory.java
new file mode 100644
index 0000000..00594a6
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/codegen/CodeOutputPluginFactory.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.codegen;
+
+import org.eclipse.viatra2.framework.IFramework;
+
+/**
+ * Factory interface to instantiate code output plugins.
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public interface CodeOutputPluginFactory {
+	/**
+	 * Instantiate a code output plugin
+	 * 
+	 * @param fw
+	 * @return
+	 */
+	CodeOutputPlugin createCodeoutPlugin(IFramework fw);
+
+	/**
+	 * Name of the code output plugin type
+	 * 
+	 * @return name of the code output plugin type
+	 */
+	String getCodeOutName();
+
+	/**
+	 * ID of the code output plugin type.
+	 * 
+	 * @return ID of the code output plugin type
+	 */
+	String getCodeOutId();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/codegen/FileCodeFormatter.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/codegen/FileCodeFormatter.java
new file mode 100644
index 0000000..3118bbd
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/codegen/FileCodeFormatter.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.codegen;
+
+import java.io.FileOutputStream;
+import java.io.PrintStream;
+
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.logger.Logger;
+
+/**
+ * @author Andras Balogh
+ * 
+ */
+public class FileCodeFormatter implements CodeOutputPlugin {
+
+	Logger log;
+
+	PrintStream codeout = System.out;
+
+	boolean inFile = false;
+
+	public void init(IFramework fw) {
+
+		log = fw.getLogger();
+		log.debug("File-based code formatter loaded.");
+		String s = fw.getProperties().getRuntimeProperty("codeout",
+				"file.autolinefeed");
+		if (s != null) {
+			printLN = s.toLowerCase().equals("yes");
+		}
+
+	}
+
+	boolean printLN = true;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.codegen.CodeOutputPlugin#beginWork()
+	 */
+	public void beginWork() {
+		// TODO Auto-generated method stub

+		inFile = false;
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.codegen.CodeOutputPlugin#endWork()
+	 */
+	public void endWork() {
+		if (inFile) {
+			codeout.flush();
+			codeout.close();
+		}
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.viatra2.codegen.CodeOutputPlugin#codeOut(java.lang.String)
+	 */
+	public void codeOut(String s) {
+		// TODO Auto-generated method stub

+		if (inFile) {
+			if (s.startsWith("//!!ENDFILE")) {
+				inFile = false;
+				codeout.close();
+
+			} else {
+				if (printLN)
+					codeout.println(s);
+				else
+					codeout.print(s.replaceAll("\\\\n", "\n"));
+			}
+		} else {
+			if (s.startsWith("//!!FILE=")) {
+				String s2 = s.substring(9);
+				try {
+					codeout = new PrintStream(new FileOutputStream(s2, false),
+							true);
+					inFile = true;
+				} catch (Exception e) {
+					log.error("File " + s2
+							+ " cannot be created for code output. Reason: "
+							+ e.getMessage());
+				}
+			}
+		}
+
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/copier/ModelCopy.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/copier/ModelCopy.java
new file mode 100644
index 0000000..48a2f4f
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/copier/ModelCopy.java
@@ -0,0 +1,321 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.copier;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.errors.VPMCoreException;
+
+/**
+ * 
+ * @author Andras Schmidt; modified by Istvan Rath
+ * 
+ */
+public class ModelCopy {
+	Map<IModelElement, IModelElement> remap;
+
+	Set<IModelElement> toCopy;
+
+	TreeMap<IModelElement, IModelElement> src2tg = new TreeMap<IModelElement, IModelElement>();
+
+	IModelSpace targetModel;
+
+	IModelSpace sourceModel;
+
+	IModelManager tModelManager;
+
+	/**
+	 * Copy elements from one model into another model. Elements to be copied
+	 * are given as a set of elements. The new place of the elements to be
+	 * copied is given by a map. For example a branch copy has the following
+	 * parameters: toCopy: all elements below the root remap: parent of root's
+	 * fully qualified name -> new parent of root's fully qualified name
+	 * 
+	 * @param sourceModel
+	 *            the model to copy elements from
+	 * @param targetModel
+	 *            the model to copy elements to
+	 * @param toCopy
+	 *            elements to be copied
+	 * @param remap
+	 *            fqn mapping from old model's fqn to new model's fqn
+	 * @throws VPMCoreException
+	 * @throws ModelCopyException
+	 */
+	public static void copyModel(IModelSpace sourceModel,
+			IModelSpace targetModel, Set<IModelElement> toCopy,
+			Map<IModelElement, IModelElement> remap) throws VPMCoreException,
+			ModelCopyException {
+		ModelCopy mc = new ModelCopy();
+		mc._copyModel(sourceModel, targetModel, toCopy, remap);
+	}
+
+	/**
+	 * Copy a part of a model into another model.
+	 * 
+	 * @param sourceModel
+	 *            the source model
+	 * @param targetModel
+	 *            the target model
+	 * @param root
+	 *            the root of the model part to be copied
+	 * @param destinationContainer
+	 *            the container of the copied model in the destination model
+	 * @param doOutEdges
+	 *            true: copy edges going out of the copied part of model
+	 * @return returns the root modelement of the copied model part
+	 * @throws VPMCoreException
+	 * @throws ModelCopyException
+	 */
+	public static IModelElement copyModel(IModelSpace sourceModel,
+			IModelSpace targetModel, IModelElement root,
+			IModelElement destinationContainer, boolean doOutEdges)
+			throws VPMCoreException, ModelCopyException {
+		TreeSet<IModelElement> elementsToCopy = new TreeSet<IModelElement>();
+		addModelElementAndChildren(root, root, elementsToCopy, doOutEdges);
+		TreeMap<IModelElement, IModelElement> remap = new TreeMap<IModelElement, IModelElement>();
+		remap.put(root.getNamespace(), destinationContainer);
+		ModelCopy mc = new ModelCopy();
+		mc._copyModel(sourceModel, targetModel, elementsToCopy, remap);
+		IModelElement ret = mc.src2tg.get(root);
+		return ret;
+	}
+
+	public static IModelElement copyModels(Set<IModelElement> elementsToCopy,
+			IModelSpace sourceModel, IModelSpace targetModel,
+			IModelElement root, IModelElement destinationContainer,
+			boolean doOutEdges) throws VPMCoreException, ModelCopyException {
+		TreeSet<IModelElement> _elementsToCopy = new TreeSet<IModelElement>();
+		TreeMap<IModelElement, IModelElement> remap = new TreeMap<IModelElement, IModelElement>();
+		for (IModelElement e : elementsToCopy) {
+			addModelElementAndChildren(e, e, _elementsToCopy, doOutEdges);
+			remap.put(e.getNamespace(), destinationContainer); // FIXME this may
+																// be dangerous!

+		}
+		remap.put(root.getNamespace(), destinationContainer);
+		ModelCopy mc = new ModelCopy();
+		mc._copyModel(sourceModel, targetModel, _elementsToCopy, remap);
+		IModelElement ret = mc.src2tg.get(root);
+		return ret;
+	}
+
+	private static void addModelElementAndChildren(IModelElement root,
+			IModelElement me, TreeSet<IModelElement> elementsToCopy,
+			boolean copyOutEdges) {
+		// if(me.equals(root)||me.isBelowNamespace(root))

+		elementsToCopy.add(me);
+		for (IModelElement _me : me.getElementsInNamespace()) {
+			if (!copyOutEdges) {
+				if (_me instanceof IRelation) {
+					IRelation rel = (IRelation) _me;
+					IModelElement to = rel.getTo();
+					if (!(to.equals(root) || to.isBelowNamespace(root))) {
+						continue;
+					}
+				}
+			}
+			addModelElementAndChildren(root, _me, elementsToCopy, copyOutEdges);
+		}
+		if (copyOutEdges) {
+			// TODO do we need to copy the incoming edges as well?

+			for (IModelElement _me : me.getRelationsTo()) {
+				elementsToCopy.add(_me);
+			}
+		}
+	}
+
+	private void _copyModel(IModelSpace sourceModel, IModelSpace targetModel,
+			Set<IModelElement> toCopy, Map<IModelElement, IModelElement> remap)
+			throws VPMCoreException, ModelCopyException {
+		this.remap = remap;
+		this.toCopy = toCopy;
+		this.targetModel = targetModel;
+		this.sourceModel = sourceModel;
+		tModelManager = targetModel.getModelManager();
+		Set<IModelElement> roots = findRoots(toCopy);
+		for (IModelElement root : roots) {
+			createBranch(root);
+		}
+		setTargets();
+		setTypes();
+	}
+
+	private void setTargets() throws VPMCoreException, ModelCopyException {
+		for (IModelElement me : toCopy) {
+			if (!(me instanceof IRelation)) {
+				continue;
+			}
+			IRelation rel = (IRelation) me;
+			IModelElement tg = targetOf(me);
+			if (tg == null) {
+				continue;
+			}
+			if (!(tg instanceof IRelation)) {
+				addError(
+						"copy model internal error: target of a relation is not relaiton",
+						me);
+				continue;
+			}
+			IRelation tgRel = (IRelation) tg;
+			IModelElement to = rel.getTo();
+			IModelElement tgTo = targetOf(to);
+			if (tgTo == null) {
+				addError("target of relation has no map in target model", rel,
+						to);
+				continue;
+			}
+			tModelManager.setRelationTo(tgRel, tgTo);
+			IRelation inverse = rel.getInverse();
+			if (inverse != null) {
+				IModelElement tgInverse = targetOf(inverse);
+				if (tgInverse != null && tgInverse instanceof IRelation) {
+					IRelation rTgInverse = (IRelation) tgInverse;
+					tModelManager.setRelationInverse(tgRel, rTgInverse);
+				} else {
+					addError("Inverse of relation is not mapped to a relation",
+							rel, inverse);
+				}
+			}
+		}
+
+	}
+
+	private void setTypes() throws VPMCoreException, ModelCopyException {
+		for (IModelElement me : toCopy) {
+			IModelElement tg = targetOf(me);
+			if (tg == null) {
+				continue;
+			}
+			Collection<IModelElement> types = me.getTypes();
+			for (IModelElement type : types) {
+				IModelElement tgType = targetOf(type);
+				if (tgType != null) {
+					tModelManager.newInstanceOf(tgType, tg);
+				} else {
+					addError(
+							"Element in target model does not exist, when creating type",
+							tg, type);
+				}
+			}
+			types = me.getSupertypes();
+			for (IModelElement type : types) {
+				IModelElement tgType = targetOf(type);
+				if (tgType != null) {
+					tModelManager.newSupertypeOf(tgType, tg);
+				} else {
+					addError(
+							"Element in target model does not exist, when creating supertype",
+							tg, type);
+				}
+			}
+		}
+	}
+
+	private void createBranch(IModelElement me) throws VPMCoreException,
+			ModelCopyException {
+		if (!toCopy.contains(me))
+			return;
+		IModelElement newMe = null;
+		if (me instanceof IEntity) {
+			IEntity ent = (IEntity) me;
+			IEntity par = ent.getParent();
+			IModelElement newPar = targetOf(par);
+			if (newPar != null && newPar instanceof IEntity) {
+				IEntity eNewPar = (IEntity) newPar;
+				newMe = tModelManager.newEntity(ent.getName(), ent.getValue(),
+						eNewPar);
+			} else {
+				addError(
+						"Parent of copy root entity is not found in target model",
+						ent);
+			}
+		} else {
+			IRelation rel = (IRelation) me;
+			IModelElement par = rel.getFrom();
+			IModelElement newPar = targetOf(par);
+			if (newPar != null) {
+				newMe = tModelManager.newRelation(rel.getName(), newPar,
+						newPar, rel.getMultiplicity(), rel.getIsAggregation(),
+						null);
+			} else {
+				addError(
+						"Source of copy root relation is not found in target model",
+						rel);
+			}
+		}
+		if (newMe == null)
+			return;
+		addMapping(me, newMe);
+		tModelManager.setViewInfo(newMe, me.getViewInfo());
+		tModelManager.setIsFinalType(newMe, me.getIsFinalType());
+		Collection<IModelElement> children = me.getElementsInNamespace();
+		for (IModelElement child : children) {
+			createBranch(child);
+		}
+	}
+
+	private void addError(String msg, IModelElement cause, IModelElement cause2)
+			throws ModelCopyException {
+		System.out.println(msg + " " + cause.toString() + " "
+				+ cause2.toString());
+		// TODO

+	}
+
+	private void addError(String msg, IModelElement cause)
+			throws ModelCopyException {
+		System.out.println(msg + " " + cause.toString());
+		// TODO

+	}
+
+	private void addMapping(IModelElement source, IModelElement target) {
+		src2tg.put(source, target);
+	}
+
+	private IModelElement targetOf(IModelElement source) {
+		if (remap.containsKey(source)) {
+			return remap.get(source);
+		}
+		IModelElement tg = src2tg.get(source);
+		if (tg != null)
+			return tg;
+		if (targetModel.equals(sourceModel)) {
+			return source;
+		}
+		tg = targetModel.getModelManager().getElementByName(
+				source.getFullyQualifiedName());
+		if (tg != null)
+			return tg;
+		return null;
+	}
+
+	private Set<IModelElement> findRoots(Set<IModelElement> toCopy) {
+		TreeSet<IModelElement> ret = new TreeSet<IModelElement>();
+		for (IModelElement me : toCopy) {
+			IModelElement namespace = me.getNamespace();
+			if (namespace == null)
+				ret.add(me);
+			else if (!toCopy.contains(namespace)) {
+				ret.add(me);
+			}
+		}
+		return ret;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/copier/ModelCopyException.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/copier/ModelCopyException.java
new file mode 100644
index 0000000..4aea6c4
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/copier/ModelCopyException.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.copier;
+
+/**
+ * Extention thrown by model copy.
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public class ModelCopyException extends Exception {
+
+	/**

+     * 

+     */
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/EDeleteSemantics.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/EDeleteSemantics.java
new file mode 100644
index 0000000..91acca2
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/EDeleteSemantics.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core;
+
+/**
+ * Semantics of model element deletion.
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public enum EDeleteSemantics {
+	/**
+	 * Delete semantics. Means that the element will be deleted with: - all type
+	 * relations - all realations - all functions - all contained entities will
+	 * be moved to the root entiy
+	 */
+	DELETE_SEMANTICS_FORCE,
+	/**
+	 * Delete semantics. Means that the element will be deleted with: - all type
+	 * relations - all realations - all functions - all elements in namespace
+	 * will also be deleted recursively
+	 */
+	DELETE_SEMANTICS_BRANCH_FORCE
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/EModelElementProperty.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/EModelElementProperty.java
new file mode 100644
index 0000000..9d4277f
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/EModelElementProperty.java
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core;
+
+public enum EModelElementProperty {
+	Name, Value
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/EMultiplicityKind.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/EMultiplicityKind.java
new file mode 100644
index 0000000..805f7e9
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/EMultiplicityKind.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core;
+
+/**
+ * An enumeration describing the multiplicty attributes of an IRelation.
+ * 
+ * @author Istvan Rath Note: DO NOT, repeat, DO NOT change the order of enumeration
+ *         constants in this file.
+ */
+public enum EMultiplicityKind {
+
+	MANY_TO_MANY, MANY_TO_ONE, ONE_TO_MANY, ONE_TO_ONE
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/ICoreNotificationListener.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/ICoreNotificationListener.java
new file mode 100644
index 0000000..5b26252
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/ICoreNotificationListener.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core;
+
+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;
+
+/**
+ * This interface defines the notification delivery mechanism
+ * 
+ * @author Andras Balogh
+ * 
+ */
+public interface ICoreNotificationListener {
+	/**
+	 * Listener category that listens all notifications in order to make it
+	 * possible to undo them.
+	 */
+	public static int UNDO_LISTENER = 0;
+
+	/**
+	 * This method is called if a new notification event is generated in a model
+	 * element associated with the current listener.
+	 * 
+	 * @param notification
+	 *            this object stores the type and parameters of the notification
+	 */
+	public void actionPerformed(ICoreNotificationObject notification);
+
+	/**
+	 * Returns the category of this listener.
+	 * 
+	 * @return category
+	 */
+	public int getListenerCategory();
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IEntity.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IEntity.java
new file mode 100644
index 0000000..00018a0
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IEntity.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core;
+
+import java.util.Collection;
+
+/**
+ * Interface for representing VPM entities
+ * 
+ * @author Andras Balogh
+ * 
+ */
+public interface IEntity extends IModelElement {
+
+	/**
+	 * Gets the entitys value
+	 * 
+	 * @return the value
+	 */
+	public String getValue();
+
+	/**
+	 * Retrives a model element that is contained by this entity and has a given
+	 * name
+	 * 
+	 * @param n
+	 *            name of element to return
+	 * @return element ref, or null if not found
+	 */
+	public IModelElement getContentByName(String n);
+
+	/**
+	 * Retrives a model element that is contained by this entity and has a given
+	 * type
+	 * 
+	 * @param n
+	 *            type of element to return
+	 * @return element ref, or null if not found
+	 */
+	public IModelElement getContentByType(IModelElement n);
+
+	/**
+	 * Returns nested elements of the Entity
+	 * 
+	 * @return Set of contained elements.
+	 */
+	public Collection<IModelElement> getContents();
+
+	/**
+	 * Gets the parent entity of modelelement will return null for root entity.
+	 * 
+	 * @return set
+	 */
+	public IEntity getParent();
+
+	/**
+	 * Checks wether the entity is fully isolated eg. it has no connections to
+	 * other elements in the modelspace.
+	 */
+	// public boolean isFullyIsolated();

+	/**
+	 * Checks wether the entity is isolated, eg. it has no connection to the
+	 * components in the given Collection
+	 * 
+	 * @param e
+	 *            The base Collection.
+	 */
+	// public boolean isFullyIsolatedInE(Collection e);

+	/**
+	 * Checks wether the entity has connections.
+	 * 
+	 * @return true, if the entity has no Relations or Functions associated
+	 *         with.
+	 */
+	// public boolean isIsolated();

+	/**
+	 * Checks if the entity has a connection to the submodel with root e
+	 * 
+	 * @param e
+	 *            The base entity
+	 * @return true, if the submodel and the entity are disjunct.
+	 */
+	// public boolean isIsolatedInE(IEntity e);

+	/**
+	 * Returns the components of the entity.
+	 * 
+	 * @return set of elements contained by the entity. (recursive)
+	 */
+	public Collection<IModelElement> getAllComponents();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IModelElement.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IModelElement.java
new file mode 100644
index 0000000..c94798e
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IModelElement.java
@@ -0,0 +1,411 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core;
+
+import java.util.Collection;
+
+/**
+ * This interface specifies the VPM core element representation
+ * 
+ * @author Andras Balogh, Andras Schmidt, Istvan Rath
+ * 
+ */
+public interface IModelElement extends Comparable<IModelElement> {
+	/**
+	 * Gets the element's state. When you delete an element is changes state to
+	 * deleted. Any action to the deleted element is corrupt, and must throw
+	 * exception.
+	 * 
+	 * @return true if the element is in the 'deleted' state
+	 */
+	public boolean isDeleted();
+
+	public boolean isEntity();
+
+	public boolean isRelation();
+
+	/**
+	 * Gets the element's ID
+	 * 
+	 * @return id
+	 */
+	public String getID();
+
+	/**
+	 * Gets the element's name
+	 * 
+	 * @return the name of the element
+	 */
+	public String getName();
+
+	/**
+	 * Gets the element's view information
+	 * 
+	 * @return the view information string of the element
+	 */
+	public String getViewInfo();
+
+	/**
+	 * Gets the element's isFinalType flag
+	 * 
+	 * @return true, if the model element cannot be subtyped
+	 */
+	public boolean getIsFinalType();
+
+	/**
+	 * Returns the element's fully qualified name
+	 * 
+	 * @return name
+	 */
+	public String getFullyQualifiedName();
+
+	/**
+	 * Returns the collection of supertypes.
+	 * 
+	 * @return the collection of supertypes
+	 */
+	public Collection<IModelElement> getSupertypes();
+
+	/**
+	 * Gets the types of the element. The result set contains all Elements,
+	 * which are instantiated by this Element.
+	 * 
+	 * @return set of elements.
+	 */
+	public Collection<IModelElement> getTypes();
+
+	/**
+	 * Gets the list of subtypes of the current Element.
+	 * 
+	 * @return Set of elements
+	 */
+	public Collection<IModelElement> getSubtypes();
+
+	/**
+	 * Gets all elements that are instances of the current one.
+	 * 
+	 * @return collection of instances
+	 */
+	public Collection<IModelElement> getInstances();
+
+	/**
+	 * Gets the String representation of this object.
+	 */
+	public String toString();
+
+	/**
+	 * Gets recursively all supertypes of the current Element.
+	 * 
+	 * @return set of Elements.
+	 */
+	public Collection<IModelElement> getAllSupertypes();
+
+	/**
+	 * Gets recoursively all types of the current Element.
+	 * 
+	 * @return set of Elements.
+	 */
+	public Collection<IModelElement> getAllTypes();
+
+	/**
+	 * Gets recoursively all subtypes of the current element.
+	 * 
+	 * @return set of types.
+	 */
+	public Collection<IModelElement> getAllSubtypes();
+
+	/**
+	 * Gets recoursively all instances of the current element (and its
+	 * subtypes).
+	 * 
+	 * @return set of types.
+	 */
+	public Collection<IModelElement> getAllInstances();
+
+	/**
+	 * Query the instanceof relation.
+	 * 
+	 * @param type
+	 * @return true if type is type of this, i.e.:
+	 * A.isInstanceOf(B) true <=> B is a type of A
+	 */
+	public boolean isInstanceOf(IModelElement type);
+
+	/**
+	 * Query the supertypeof relation.
+	 * 
+	 * @param sub
+	 * @return true if sub is subtype of this, i.e.:
+	 * A.isSupertypeOf(B) true <=> A is a supertype of B
+	 */
+	public boolean isSupertypeOf(IModelElement sub);
+
+	/**
+	 * Query the subtypeof relation.
+	 * 
+	 * @param sup
+	 * @return true if sup is supertype of this, i.e.:
+	 * A.isSubtypeof(B) true <=> B is a supertype of A
+	 */
+	public boolean isSubtypeOf(IModelElement sup);
+
+	/**
+	 * Query the typeof relation.
+	 * 
+	 * @param inst
+	 * @return true if inst is type of this, i.e.:
+	 * A.isTypeOf(B) true <=> A is a type of B
+	 */
+	public boolean isTypeOf(IModelElement inst);
+
+	/**
+	 * Query the typeof relation.
+	 * 
+	 * @param inst
+	 * @return true if inst is direct instance of this, i.e.:
+	 * A.isDirectTypeOf(B) true <=> A is a direct type (without transitivity) of B
+	 */
+	public boolean isDirectTypeOf(IModelElement inst);
+
+	/**
+	 * Query the subtypeof relation.
+	 * 
+	 * @param inst
+	 * @return true if sup is direct supertype of this, i.e.:
+	 * A.isDirectSubtypeOf(B) true <=> B is a direct supertype of A
+	 */
+	public boolean isDirectSubtypeOf(IModelElement sup);
+
+	/**
+	 * Query the subtypeof relation.
+	 * 
+	 * @param inst
+	 * @return true if sup is direct subtype of this, i.e.:
+	 * A.isDirectSupertypeOf(B) true <=> A is a direct supertype of B
+	 */
+	public boolean isDirectSupertypeOf(IModelElement sub);
+
+	/**
+	 * Query the instanceof relation.
+	 * 
+	 * @param inst
+	 * @return true if type is direct type of this
+	 * A.isDirectInstanceOf(B) true <=> B is a direct type of A
+	 */
+	public boolean isDirectInstanceOf(IModelElement type);
+
+	/**
+	 * Query the modelspace that contains this element
+	 * 
+	 * @return the modelspace that contains this element
+	 */
+	public IModelSpace getModelSpace();
+

+	/**
+	 * Returns all relations, which end at this entity
+	 * 
+	 * @return
+	 */
+	public Collection<IRelation> getRelationsTo();
+
+	/**
+	 * Returns all relations, which start at this entity
+	 * 
+	 * @return
+	 */
+	public Collection<IRelation> getRelationsFrom();
+
+	/**
+	 * Returns one relation, which ends at this entity and has type type
+	 * 
+	 * @param type
+	 * @return
+	 */
+	public IRelation getRelationToByType(IModelElement type);
+
+	/**
+	 * Returns one relation, which starts at this entity and has type type
+	 * 
+	 * @param type
+	 * @return
+	 */
+	public IRelation getRelationFromByType(IModelElement type);
+
+	/**
+	 * Returns one relation, which ends at this entity and has name name
+	 * 
+	 * @param name
+	 * @return
+	 */
+	public IRelation getRelationToByName(String name);
+
+	/**
+	 * Returns one relation, which starts at this entity and has name name
+	 * 
+	 * @param name
+	 * @return
+	 */
+	public IRelation getRelationFromByName(String name);
+
+	/**
+	 * Returns all relations associated with this entity
+	 * 
+	 * @return collection of relations
+	 */
+	public Collection<IRelation> getRelations();
+
+	/**
+	 * Returns the first connection for a given name
+	 * 
+	 * @param n
+	 *            then name of the connection
+	 * @return The coresponding relation
+	 */
+	// public IRelation getConnectionByName(String n);

+	/**
+	 * Returns the connection from the element for a given name
+	 * 
+	 * @param n
+	 *            then name of the connection
+	 * @return The coresponding relation
+	 */
+	// public IRelation getConnectionFromByName(String n);

+	/**
+	 * Returns the first connection for a given type
+	 * 
+	 * @param n
+	 *            then name of the connection
+	 * @return The coresponding relation
+	 */
+	// public IRelation getConnectionByType(IModelElement n);

+	/**
+	 * Returns the first connection for a given type starting from the entity
+	 * 
+	 * @param n
+	 *            then name of the connection
+	 * @return The coresponding relation
+	 */
+	// public IRelation getConnectionFromByType(IRelation n);

+	/**
+	 * Returns the first relation for a given name
+	 * 
+	 * @param n
+	 *            then name of the relation
+	 * @return The coresponding relation
+	 */
+	public IRelation getRelationByName(String n);
+
+	/**
+	 * Returns the first relation for a given type
+	 * 
+	 * @param n
+	 *            then name of the relation
+	 * @return The coresponding relation
+	 */
+	public IRelation getRelationByType(IModelElement n);
+
+	public IModelElement getRelationTargetByType(IRelation type);
+
+	/**
+	 * Returns all connection target which is conected via a relation with the
+	 * specified type
+	 * 
+	 * @param type
+	 *            the relation type
+	 * @return set of appropriate model elements.
+	 */
+	public Collection<IModelElement> getAllRelationTargetByType(IRelation type);
+
+	/**
+	 * Returns the first connection source which is connected via a relation of
+	 * the specified type.
+	 * 
+	 * @param type
+	 *            The relation type.
+	 * @return the first appropriate connection if found, null otherwise.
+	 */
+	public IModelElement getRelationSourceByType(IRelation type);
+
+	/**
+	 * Gets all relations starting at this element conforming to the type.
+	 * @param type
+	 * @return
+	 */
+	public Collection<IRelation> getAllRelationFromByType(IRelation type);
+
+	/**
+	 * Gets all relations ending at this element conforming to type.
+	 * @param type
+	 * @return
+	 */
+	public Collection<IRelation> getAllRelationToByType(IRelation type);
+
+	/**
+	 * Returns all connection source which is connected via a relation with the
+	 * specified type
+	 * 
+	 * @param type
+	 *            the relation type
+	 * @return set of appropriate model elements.
+	 */
+	public Collection<IModelElement> getAllRelationSourceByType(IRelation type);
+
+	/**
+	 * Get the modelelement that has this one in its namespace. parent for
+	 * entity, source for relation
+	 * 
+	 * @return namespace, or null for root.
+	 */
+	public IModelElement getNamespace();
+
+	/**
+	 * Returns whether the model element is below grandpa in namaspace hierarcy.
+	 * 
+	 * @param grandpa
+	 * @return
+	 */
+	public boolean isBelowNamespace(IModelElement grandpa);
+
+	/**
+	 * Find element with given name in the namespace of this element (child
+	 * entity or relation from this element)
+	 * 
+	 * @param name
+	 *            element's name to be found
+	 * @return element with name below this element or null if element with name
+	 *         is not present
+	 */
+	public IModelElement getElementInNamespaceByName(String name);
+
+	/**
+	 * Find all element in the namespace of this element (child entity or
+	 * relation from this element)
+	 * 
+	 * @return all elements in namespace of this element
+	 */
+	public Collection<IModelElement> getElementsInNamespace();
+
+	/**
+	 * Returns the transitive closure of the namespace (all elements below).
+	 */
+	public Collection<IModelElement> getAllElementsInNamespace();
+
+	/**
+	 * Find all elemetns which are in the required relation with this element.
+	 * This method is a reflection method for many query methods.
+	 * 
+	 * @param relationType
+	 * @return collection of elements
+	 */
+//	public Collection<IModelElement> getElementsInRelation(EConstraint relationType);
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IModelManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IModelManager.java
new file mode 100644
index 0000000..0a1cb32
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IModelManager.java
@@ -0,0 +1,595 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core;
+
+import java.util.Set;
+import java.util.concurrent.locks.ReadWriteLock;
+
+import org.eclipse.viatra2.errors.VPMCoreException;
+
+/**
+ * Interface for defining the requirements for VPM model management
+ * implementations
+ * 
+ * @author Andras Balogh, Istvan Rath, Andras Schmidt
+ * 
+ */
+public interface IModelManager {
+
+	/**
+	 * Initializes the model manager.
+	 * 
+	 * @param p
+	 *            - the collection of runtime properties
+	 * @param l
+	 *            - the framework logger
+	 * @param m
+	 *            - the owning modelspace
+	 * @throws VPMRuntimeException
+	 */
+	// public void init(Logger l, Properties p, IModelSpace m) throws
+	// VPMRuntimeException;

+
+	/**
+	 * Retrieves the root entity of the modelspace.
+	 * 
+	 * @return root entity
+	 */
+	public IEntity getRoot();
+
+	/**
+	 * Deletes the entity from the modelspace according to a specified
+	 * semantics.
+	 * 
+	 * @param e
+	 *            entity to be deleted
+	 * @param semantics
+	 *            semantics id
+	 * @deprecated use delete element instead
+	 */
+	@Deprecated
+	public void deleteEntity(IEntity e, EDeleteSemantics semantics)
+			throws VPMCoreException;
+
+	/**
+	 * Deletes the element from the modelspace according to a specified
+	 * semantics.
+	 * 
+	 * @param me
+	 *            element to be deleted
+	 * @param semantics
+	 *            semantics id
+	 */
+	public void deleteElement(IModelElement me, EDeleteSemantics semantics)
+			throws VPMCoreException;
+
+	/**
+	 * Deletes a relation from the modelspace.
+	 * 
+	 * @param r
+	 *            the relation to be deleted.
+	 * @deprecated use deleteElement instead
+	 */
+	@Deprecated
+	public void deleteRelation(IRelation r, EDeleteSemantics semantics)
+			throws VPMCoreException;
+
+	/**
+	 * Retrives the model element by its fully qualified name
+	 * 
+	 * @param n
+	 *            the fully qualified model element name
+	 * @return element if found, else null
+	 */
+	public IModelElement getElementByName(String n);
+
+	/**
+	 * Retrieves an entity by its fully qualified name
+	 * 
+	 * @param n
+	 *            fully qualified name of entity
+	 * @return entity if found, else null
+	 */
+	public IEntity getEntityByName(String n);
+
+	/**
+	 * Retrieves a relation by its fully qualified name
+	 * 
+	 * @param n
+	 *            fully qualified name of relation
+	 * @return relation if found, else null
+	 */
+	public IRelation getRelationByName(String n);
+
+	/**
+	 * Retrives the model element by its ID
+	 * 
+	 * @param n
+	 *            model element ID
+	 * @return element if found, else null
+	 */
+	public IModelElement getElementByID(String n);
+
+	/**
+	 * Retrieves an entity by its ID
+	 * 
+	 * @param n
+	 *            ID of entity
+	 * @return entity if found, else null
+	 */
+	public IEntity getEntityByID(String n);
+
+	/**
+	 * Retrieves a relation by its ID
+	 * 
+	 * @param n
+	 *            ID of relation
+	 * @return relation if found, else null
+	 */
+	public IRelation getRelationByID(String n);
+
+	/**
+	 * Retrieves all entities currently in the modelspace.
+	 * 
+	 * @return collection of entities
+	 */
+	public Set<? extends IEntity> getEntities();
+
+	public Set<? extends IModelElement> getElements();
+
+	/**
+	 * Retrieves all relations currently in the modelspace.
+	 * 
+	 * @return collection of relations
+	 */
+	public Set<? extends IRelation> getRelations();
+
+	/**
+	 * Creates a new entity with a random and unique name, contained in the
+	 * modelspace root
+	 * 
+	 * @return reference to the entity
+	 */
+	public IEntity newEntity();
+
+	/**
+	 * Creates a new entity with a random and unique name in the specified
+	 * container
+	 * 
+	 * @param container
+	 *            the container, may not be null
+	 * @return reference to the entity
+	 */
+	public IEntity newEntity(IEntity container) throws VPMCoreException;
+
+	/**
+	 * Creates a new entity with the given name in the modelspace root
+	 * 
+	 * @param name
+	 *            the name of the entity, may not be null
+	 * @return reference to the entity
+	 */
+	public IEntity newEntity(String name) throws VPMCoreException;
+
+	/**
+	 * Creates a new entity with the given name and container
+	 * 
+	 * @param name
+	 *            the name of the entity, may not be null
+	 * @param container
+	 *            the container, may not be null
+	 * @return reference to the entity
+	 */
+	public IEntity newEntity(String name, IEntity container)
+			throws VPMCoreException;
+
+	/**
+	 * Creates a new entity with the given name and value in the modelspace root
+	 * 
+	 * @param name
+	 *            the name of the entity, may not be null
+	 * @param value
+	 *            the value of the entity, may not be null
+	 * @return reference to the entity
+	 */
+	public IEntity newEntity(String name, String value) throws VPMCoreException;
+
+	/**
+	 * Creates a new entity with the given name, value and container
+	 * 
+	 * @param name
+	 *            the name of the entity, may not be null
+	 * @param value
+	 *            the value of the entity, may not be null
+	 * @param container
+	 *            the container, may not be null
+	 * @return reference to the entity
+	 */
+	public IEntity newEntity(String name, String value, IEntity container)
+			throws VPMCoreException;
+	/**
+	 * Creates a new entity with the given name, value container and a single type. 
+	 * Each of the parameters can be left null.
+	 * 
+	 * @param name
+	 *            the name of the entity
+	 * @param value
+	 *            the value of the entity
+	 * @param container
+	 *            the container
+	 * @param type
+	 *            the single initial type of the entity   
+	 * @return reference to the entity
+	 * @throws VPMCoreException
+	 */
+	public IEntity newEntity(String name, String value, IEntity container, IEntity type)
+			throws VPMCoreException;
+	
+	
+
+	/**
+	 * Creates a new relation with a random and unique name, between the given
+	 * model elements.
+	 * 
+	 * @param from
+	 *            source model element
+	 * @param to
+	 *            target model element
+	 * @return reference to the new relation
+	 */
+	public IRelation newRelation(IModelElement from, IModelElement to)
+			throws VPMCoreException;
+
+	/**
+	 * Creates a new relation with a random and unique name, between the given
+	 * model elements, with the given multiplicity, isAggregation, Inverse
+	 * attributes.
+	 * 
+	 * @param from
+	 *            source model element
+	 * @param to
+	 *            target model element
+	 * @param multiplicity
+	 *            a valid EMultiplicityKind enumeration constant
+	 * @param isaggregation
+	 *            true, if the relation represents an aggregation
+	 * @param inverse
+	 *            the relation's inverse, or null if it has none
+	 * @return reference to the new relation
+	 */
+	public IRelation newRelation(IModelElement from, IModelElement to,
+			EMultiplicityKind multiplicity, boolean isaggregation,
+			IRelation inverse) throws VPMCoreException;
+
+	/**
+	 * Creates a new relation with the given name, between the given elements.
+	 * 
+	 * @param name
+	 *            name of the relation
+	 * @param from
+	 *            source entity
+	 * @param to
+	 *            target entity
+	 * @return reference to the new relation
+	 */
+	public IRelation newRelation(String name, IModelElement from,
+			IModelElement to) throws VPMCoreException;
+
+	/**
+	 * Creates a new relation with the given name, between the given model
+	 * elements, with the given multiplicity, isAggregation, hasInverse
+	 * attributes.
+	 * 
+	 * @param name
+	 *            name of the relation
+	 * @param from
+	 *            source model element
+	 * @param to
+	 *            target model element
+	 * @param multiplicity
+	 *            a valid EMultiplicityKind enumeration constant
+	 * @param isaggregation
+	 *            true, if the relation represents an aggregation
+	 * @param inverse
+	 *            the relation's inverse, or null if it has none
+	 * @return reference to the new relation
+	 */
+	public IRelation newRelation(String name, IModelElement from,
+			IModelElement to, EMultiplicityKind multiplicity,
+			boolean isaggregation, IRelation inverse) throws VPMCoreException;
+
+	/**
+	 * Creates a new relation with the given name, between the given model elements, with the given single type.
+	 * Name and type can be left null.
+	 * 
+	 * @param name
+	 *            name of relation
+	 * @param from
+	 *            source entity
+	 * @param to
+	 *            target entity
+	 * @param type
+	 *            the single initial type of the relation       
+	 * @return reference to the new relation
+	 * @throws VPMCoreException
+	 */
+	public IRelation newRelation(String name, IModelElement from,
+			IModelElement to, IRelation type) throws VPMCoreException;
+	
+	
+	/**
+	 * Creates an instanceOf relation between the two model elements
+	 * 
+	 * @param type
+	 *            the type element
+	 * @param inst
+	 *            the instance
+	 */
+	public void newInstanceOf(IModelElement type, IModelElement inst)
+			throws VPMCoreException;
+
+	public void newInstanceOfEditor(IModelElement type, IModelElement inst)
+			throws VPMCoreException;
+
+	public void newInstanceOfMachine(IModelElement type, IModelElement inst)
+			throws VPMCoreException;
+
+	/**
+	 * Creates a new supertypeOf relation between the two elements
+	 * 
+	 * @param sup
+	 *            the supertype
+	 * @param sub
+	 *            the subtype
+	 */
+	public void newSupertypeOf(IModelElement sup, IModelElement sub)
+			throws VPMCoreException;
+
+	public void newSupertypeOfMachine(IModelElement sup, IModelElement sub)
+			throws VPMCoreException;
+
+	public void newSupertypeOfEditor(IModelElement sup, IModelElement sub)
+			throws VPMCoreException;
+
+	/**
+	 * Deletes the instanceOf relation between the two model elements
+	 * 
+	 * @param type
+	 *            the type element
+	 * @param inst
+	 *            the instance
+	 */
+	public void deleteInstanceOf(IModelElement type, IModelElement inst)
+			throws VPMCoreException;
+
+	public void deleteInstanceOfMachine(IModelElement type, IModelElement inst)
+			throws VPMCoreException;
+
+	public void deleteInstanceOfEditor(IModelElement type, IModelElement inst)
+			throws VPMCoreException;
+
+	/**
+	 * Deletes the supertypeOf relation between the two elements
+	 * 
+	 * @param sup
+	 *            the supertype
+	 * @param sub
+	 *            the subtype
+	 */
+	public void deleteSupertypeOf(IModelElement sup, IModelElement sub)
+			throws VPMCoreException;
+
+	public void deleteSupertypeOfMachine(IModelElement sup, IModelElement sub)
+			throws VPMCoreException;
+
+	public void deleteSupertypeOfEditor(IModelElement sup, IModelElement sub)
+			throws VPMCoreException;
+
+	/**
+	 * Sets the name of the element
+	 * 
+	 * @param e
+	 *            the element
+	 * @param n
+	 *            the new name
+	 */
+	public void setName(IModelElement e, String n) throws VPMCoreException;
+
+	/**
+	 * Sets the value of the entity
+	 * 
+	 * @param e
+	 *            the entity
+	 * @param v
+	 *            the new value
+	 */
+	public void setValue(IEntity e, String v) throws VPMCoreException;
+
+	/**
+	 * Sets the source of the relation
+	 * 
+	 * @param rel
+	 *            the relation
+	 * @param from
+	 *            the new source model element
+	 * @throws VPMCoreException
+	 */
+	public void setRelationFrom(IRelation rel, IModelElement from)
+			throws VPMCoreException;
+
+	/**
+	 * Sets the target of the relation
+	 * 
+	 * @param rel
+	 *            the relation
+	 * @param to
+	 *            the new target model element
+	 * @throws VPMCoreException
+	 */
+	public void setRelationTo(IRelation rel, IModelElement to)
+			throws VPMCoreException;
+
+	/**
+	 * Sets the multiplicity of the relation
+	 * 
+	 * @param rel
+	 *            the relation
+	 * @param multiplicity
+	 *            a valid EMultiplicityKind enumeration constant
+	 */
+	public void setRelationMultiplicity(IRelation rel,
+			EMultiplicityKind multiplicity) throws VPMCoreException;
+
+	/**
+	 * Sets the isAggregation attribute of the relation
+	 * 
+	 * @param rel
+	 *            the relation
+	 * @param isaggregation
+	 *            true, if the relation should represent an aggregation
+	 */
+	public void setRelationIsAggregation(IRelation rel, boolean isaggregation)
+			throws VPMCoreException;
+
+	/**
+	 * Sets the Inverse attribute of the relation
+	 * 
+	 * @param rel
+	 *            the relation
+	 * @param inverse
+	 *            the relation's inverse, or null if it has none
+	 */
+	public void setRelationInverse(IRelation rel, IRelation inverse)
+			throws VPMCoreException;
+
+	/**
+	 * Removes the element from its current container and moves it to the
+	 * specified new container
+	 * 
+	 * @param e
+	 *            the element
+	 * @param cont
+	 *            new container
+	 */
+	public void moveEntityTo(IEntity e, IEntity cont) throws VPMCoreException;
+
+	/**
+	 * Sets the "view information" string attribute of the model element
+	 * 
+	 * @param me
+	 *            the model element
+	 * @param viewInfo
+	 *            the new "view information" string
+	 * @throws VPMCoreException
+	 */
+	public void setViewInfo(IModelElement me, String viewInfo)
+			throws VPMCoreException;
+
+	/**
+	 * Sets the isFinalType flag for a model element.
+	 * 
+	 * @param me
+	 *            the model element
+	 * @param isfinaltype
+	 *            true, if the element is not to be subtyped
+	 * @throws VPMCoreException
+	 */
+	public void setIsFinalType(IModelElement me, boolean isfinaltype)
+			throws VPMCoreException;
+
+	/**
+	 * Sets whether the type of this relation's source can be omitted (instances
+	 * can have source of any type).
+	 */
+	public void setIsAnyFrom(IRelation rel, boolean isAnyFrom)
+			throws VPMCoreException;
+
+	/**
+	 * Sets whether the type of this relation's target can be omitted (instances
+	 * can have target of any type).
+	 */
+	public void setIsAnyTo(IRelation rel, boolean isAnyTo)
+			throws VPMCoreException;
+
+	/**
+	 * Modify the model to let these model elements in the desired relation.
+	 * 
+	 * @param relationType
+	 *            BELOW, OVER, ENTITY and RELATION has no sense, others can be
+	 *            ok parameters
+	 * @param src
+	 * @param tg
+	 * @throws VPMCoreException
+	 */
+//	public void setRelationshipBetween(EConstraint relationType,
+//			IModelElement src, IModelElement tg) throws VPMCoreException;
+
+	public void setProperty(IModelElement me, EModelElementProperty property,
+			Object value) throws VPMCoreException;
+
+	/**
+	 * Modify the model to let the desired relation no longer exist between the
+	 * model elements.
+	 * 
+	 * @param relationType
+	 *            not all relation types can be deleted this way
+	 * @param src
+	 * @param tg
+	 * @throws VPMCoreException
+	 */
+//	public void deleteRelationshipBetween(EConstraint relationType,
+//			IModelElement src, IModelElement tg) throws VPMCoreException;
+
+	/**
+	 * Copies a set of model elements (<b>deeply</b>) to a destination container
+	 * within the modelspace.
+	 * 
+	 * @param sourceElements
+	 *            the set of model elements to copy
+	 * @param sourceRoot
+	 *            the root of the source model to copy
+	 * @param destinationContainer
+	 *            the container of the copied model in the destination model
+	 * @param copyOutEdges
+	 *            true: copy edges going out of the copied part of model
+	 * @return the root modelement of the copied model part
+	 * @throws VPMCoreException
+	 */
+	public IModelElement copyModelElements(Set<IModelElement> sourceElements,
+			IModelElement sourceRoot, IModelElement destinationContainer,
+			boolean copyOutEdges) throws VPMCoreException;
+
+	/**
+	 * Copies a model element (and all of its containment subtree) to a
+	 * destination container within the modelspace.
+	 * 
+	 * @param source
+	 *            the model element which will be copied along with all its
+	 *            <b>deep</b> contents
+	 * @param destinationContainer
+	 *            the container of the copied model in the destination model
+	 * @param copyOutEdges
+	 *            true: copy edges going out of the copied part of model
+	 * @return the root modelement of the copied model part
+	 * @throws VPMCoreException
+	 */
+	public IModelElement copyModelElement(IModelElement source,
+			IModelElement destinationContainer, boolean copyOutEdges)
+			throws VPMCoreException;
+
+	/**
+	 * Returns a reentrant read-write lock of the modelspace.
+	 * 
+	 * @return the lock to the modelspace
+	 */
+	public ReadWriteLock getLock();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IModelManagerExtended.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IModelManagerExtended.java
new file mode 100644
index 0000000..f167be5
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IModelManagerExtended.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core;
+
+import org.eclipse.viatra2.errors.VPMCoreException;
+
+/**
+ * Interface for extra model management functionality.
+ * 
+ * @author Istvan Rath
+ * 
+ */
+public interface IModelManagerExtended extends IModelManager {
+
+	public IEntity newEntity(IEntity type);
+
+	public IEntity newEntity(String name, IEntity type) throws VPMCoreException;
+
+	public IEntity newEntity(String name, String value, IEntity type)
+			throws VPMCoreException;
+
+	public IEntity newEntity(String name, IEntity container, IEntity type)
+			throws VPMCoreException;
+
+	public IRelation newRelation(IModelElement from, IModelElement to,
+			IRelation type) throws VPMCoreException;
+
+	public IRelation newRelation(String name, IModelElement from,
+			IModelElement to, IRelation type) throws VPMCoreException;
+
+	public IRelation newRelation(String name, IModelElement from,
+			IModelElement to, EMultiplicityKind multiplicity,
+			boolean isAggregation, IRelation inverse, IRelation type)
+			throws VPMCoreException;
+
+	// more to come.

+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IModelMerger.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IModelMerger.java
new file mode 100644
index 0000000..e85b6ae
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IModelMerger.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core;
+
+import org.eclipse.viatra2.errors.VPMException;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.properties.VPMProperties;
+import org.eclipse.viatra2.logger.Logger;
+
+/**
+ * This interface defines the model merger interface for the Viatra core.
+ * 
+ * @author Andras Balogh
+ * 
+ */
+public interface IModelMerger {
+	/**
+	 * Initializes the model merger.
+	 * 
+	 * @param p
+	 *            - the collection of runtime properties
+	 * @param l
+	 *            - the framework logger
+	 * @param m
+	 *            - the owning modelspace
+	 * @throws VPMRuntimeException
+	 */
+	public void init(Logger l, VPMProperties p, IModelSpace m)
+			throws VPMRuntimeException;
+
+	/**
+	 * Mergers the current modelspace with an other one.
+	 * 
+	 * @param m1
+	 *            - the modelspace to merge
+	 * @throws VPMException
+	 */
+	public void merge(IModelSpace m1) throws VPMException;
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IModelSpace.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IModelSpace.java
new file mode 100644
index 0000000..c486ee7
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IModelSpace.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core;
+
+import java.util.Collection;
+
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.IFramework;
+
+/**
+ * 
+ * This interface specifies the container of core functions. Implementations
+ * have to discover and load model manager, merger, notfification, undo and
+ * transaction support classes.
+ * 
+ * ModelSpace interface is the common container of the Viatra core functions.
+ * 
+ * @author Andras Balogh
+ * 
+ *         Modification on 2006.08.07 by Istvan Rath: - commented out
+ *         getUndoManager(): we should hide the undo manager and use the
+ *         transaction manager instead
+ * 
+ */
+public interface IModelSpace {
+
+	/**
+	 * Initializes the modelspace.
+	 * 
+	 * @param f
+	 *            - the framework to plug in the model
+	 * @throws VPMRuntimeException
+	 */
+	public void init(IFramework f) throws VPMRuntimeException;
+
+	/**
+	 * Returns the model merger associated with this modelspace
+	 * 
+	 * @return the model merger
+	 */
+	public IModelMerger getModelMerger();
+
+	/**
+	 * Returns the model manager asociated with this modelspace.
+	 * 
+	 * @return the model manager
+	 */
+	public IModelManager getModelManager();
+
+	public IFramework getFramework();
+
+	/**
+	 * Returns the notification manager associated with this modelspace, or null
+	 * if notification is not supported.
+	 * 
+	 * @return notification manager
+	 */
+	public INotificationManager getNotificationManager();
+
+	/**
+	 * Returns the pattern matcher associated with this modelspace.
+	 * 
+	 * @return notification manager
+	 */
+	// public IPatternMatcher getPatternMatcher();

+	/**
+	 * Returns the transaction manager associated with this modelspace, or null
+	 * if transactions are not supported.
+	 * 
+	 * @return transaction manager.
+	 */
+	public ITransactionManager getTransactionManager();
+
+	/**
+	 * Returns the undo manager associated with this modelspace, or null if undo
+	 * is not supported.
+	 * 
+	 * @return undo manager.
+	 */
+	// public IUndoManager getUndoManager();

+	/**
+	 * Checks whether transactions are supported
+	 * 
+	 * @return true if transactions are supported, else false.
+	 */
+	public boolean isTransactionAware();
+
+	/**
+	 * Checks whether notifications are supported
+	 * 
+	 * @return true if notifications are supported, else false.
+	 */
+	public boolean isNotificationAware();
+
+	/**
+	 * Checks whether undo is supported
+	 * 
+	 * @return true if undo is supported, else false.
+	 */
+	public boolean isUndoAware();
+
+	/**
+	 * Clones (doubles) the whole modelspace
+	 * 
+	 * @return cloned modelspace
+	 */
+	public IModelSpace cloneModelSpace();
+
+	/**
+	 * Ancestor elements are handled specially. They need not be saved and
+	 * loaded, and their relations are updated automatically.
+	 * 
+	 * @return
+	 */
+	public Collection<IModelElement> getAncestorElements();
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/INotificationManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/INotificationManager.java
new file mode 100644
index 0000000..4a79618
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/INotificationManager.java
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core;
+
+import java.util.Collection;
+
+/**
+ * This interface specifies the required services of a notification manager.
+ * 
+ * @author Andras Balogh
+ */
+public interface INotificationManager {
+
+	/**
+	 * Notification category for undo managers.
+	 */
+	public final static int UNDO_SUPPORT = 0;
+
+	/**
+	 * Notification category for transaction managers.
+	 */
+	public final static int TRANSACTION_SUPPORT = 1;
+
+	/**
+	 * Notification category for other core event listeners.
+	 */
+	public final static int CORE_SUPPORT = 2;
+
+	/**
+	 * Notification category for interpreter-level notification support.
+	 */
+	public final static int INTERPRETER_SUPPORT = 3;
+
+	/**
+	 * Notification category for gui managers.
+	 */
+	public final static int GUI_SUPPORT = 4;
+
+	/**
+	 * Initializes the notification manager.
+	 * 
+	 * @param p
+	 *            - the collection of runtime properties
+	 * @param l
+	 *            - the framework logger
+	 * @param m
+	 *            - the owning modelspace
+	 * @throws VPMRuntimeException
+	 */
+	// public void init(Logger l, Properties p, IModelSpace m) throws
+	// VPMRuntimeException;

+	/**
+	 * Adds a new default listner that has to be associated with all new model
+	 * elements.
+	 * 
+	 * @param l
+	 *            the new listner object
+	 */
+	// public void addDefaultListener(ICoreNotificationListener l);

+	/**
+	 * Adds a new listner that has to be associated with the whole modelSpace.
+	 * 
+	 * @param l
+	 *            the new listner object
+	 */
+	public void addAllListener(ICoreNotificationListener l);
+
+	/**
+	 * Removes a default listener
+	 * 
+	 * @param l
+	 *            the listener to be removed
+	 */
+	// public void removeDefaultListener(ICoreNotificationListener l);

+	/**
+	 * Removes a listner that was to be associated with the whole modelSpace.
+	 * 
+	 * @param l
+	 *            the new listner object
+	 */
+	public void removeAllListener(ICoreNotificationListener l);
+
+	/**
+	 * Returns the current collection of default listeners.
+	 * 
+	 * @return collection of listeners
+	 */
+	// public Collection getDefaultListeners();

+	/**
+	 * Returns the current collection of listeners who listen every events in
+	 * modelSpace.
+	 * 
+	 * @return collection of listeners
+	 */
+	public Collection<ICoreNotificationListener> getListenAllListeners();
+
+	/**
+	 * Enables notification dispatching.
+	 * 
+	 */
+	public void enableNotifications();
+
+	/**
+	 * Disablesnotification dispatching.
+	 * 
+	 */
+	public void disableNotifications();
+
+	/**
+	 * Chercks whether notifications are enabled or not.
+	 * 
+	 * @return true, if notification dispatching is enabed.
+	 */
+	public boolean isNotificationEnabled();
+
+	/**
+	 * Sets the notification level. All notifications having a category that is
+	 * less or equal to the level will be dispatched.
+	 * 
+	 * @param l
+	 *            the new level
+	 * 
+	 */
+	public void setNotificationLevel(int l);
+
+	/**
+	 * Retrives the current notification level.
+	 * 
+	 * @return current notification level
+	 */
+	public int getNotificationLevel();
+
+	/**
+	 * Add a notification listener to a given element.
+	 * 
+	 * @param me
+	 * @param l
+	 */
+	public void addNotificationListener(IModelElement me,
+			ICoreNotificationListener l);
+
+	/**
+	 * Remove a notification listener from a given element.
+	 * 
+	 * @param me
+	 * @param l
+	 */
+	public void removeNotificationListener(IModelElement me,
+			ICoreNotificationListener l);
+
+	/**
+	 * Gets the collection of notification listeners registered to a given
+	 * element.
+	 * 
+	 * @param me
+	 * @return
+	 */
+	public Collection<ICoreNotificationListener> getNotificationListeners(IModelElement me);
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IPause.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IPause.java
new file mode 100644
index 0000000..3a7fee8
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IPause.java
@@ -0,0 +1,15 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core;
+
+public interface IPause {
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IRelation.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IRelation.java
new file mode 100644
index 0000000..9501d23
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IRelation.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core;
+
+/**
+ * @author Andras Schmidt, Istvan Rath
+ * 
+ */
+public interface IRelation extends IModelElement {
+
+	/**
+	 * Gets the source of this relation.
+	 * 
+	 * @return An Entity
+	 */
+	public IModelElement getFrom();
+
+	/**
+	 * Gets the destination of this relation.
+	 * 
+	 * @return an Entity
+	 */
+	public IModelElement getTo();
+
+	/**
+	 * Gets the multiplicity of this relation.
+	 * 
+	 * @return a MultiplicityKind enumeration constant
+	 */
+	public EMultiplicityKind getMultiplicity();
+
+	/**
+	 * Returns a reference to this relation's inverse, or null if it has none.
+	 * 
+	 * @return a reference to this relation's inverse, or null if it has none
+	 */
+	public IRelation getInverse();
+
+	/**
+	 * Returns whether this relation represents an aggregation.
+	 * 
+	 * @return true, if this relation represents an aggregation, false otherwise
+	 */
+	public boolean getIsAggregation();
+
+	/**
+	 * Returns whether the type of this relation's source can be omitted
+	 * (instances can have source of any type).
+	 * 
+	 * @return
+	 */
+	public boolean getIsAnyFrom();
+
+	/**
+	 * Returns whether the type of this relation's target can be omitted
+	 * (instances can have target of any type).
+	 * 
+	 * @return
+	 */
+	public boolean getIsAnyTo();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/ITransactionManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/ITransactionManager.java
new file mode 100644
index 0000000..9bf1179
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/ITransactionManager.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core;
+
+/**
+ * This interface defines the required operations of a transaction manager for
+ * the Viatra core. Transaction is bound to the thread that calls
+ * beginTransaction.
+ * 
+ * 
+ * @author Andras Balogh
+ * 
+ *         Modification on 2006.08.07 by Istvan Rath: - added
+ *         beginUndoableTransaction - added tryBeginUndoableTransaction -
+ *         introduced unique transaction ID: changed return type of functions to
+ *         String - added undoTransaction
+ * 
+ */
+public interface ITransactionManager {
+	/**
+	 * Initializes the transaction manager.
+	 * 
+	 * @param p
+	 *            - the collection of runtime properties
+	 * @param l
+	 *            - the framework logger
+	 * @param m
+	 *            - the owning modelspace
+	 * @throws VPMRuntimeException
+	 */
+	// public void init(Logger l, Properties p, IModelSpace m) throws
+	// VPMRuntimeException;

+	/**
+	 * Begins a new undoable transaction. Can block the caller thread. If the
+	 * current thread is in transaction then increments the transaction counter.
+	 * 
+	 * @return a unique transaction ID
+	 */
+	public String beginUndoableTransaction();
+
+	/**
+	 * Begins a new undoable transaction. Can block the caller thread. If the
+	 * current thread is in transaction then increments the transaction counter.
+	 * 
+	 * @return a unique transaction ID
+	 * @param info
+	 *            an information object which is passed to all notification
+	 *            listeners
+	 */
+	public String beginUndoableTransaction(Object info);
+
+	/**
+	 * Begins a new, NOT UNDOABLE transaction. Can block the caller thread. If
+	 * the current thread is in transaction then increments the transaction
+	 * counter.
+	 * 
+	 * @return a unique transaction ID
+	 */
+	public String beginTransaction();
+
+	/**
+	 * Begins a new, NOT UNDOABLE transaction. Can block the caller thread. If
+	 * the current thread is in transaction then increments the transaction
+	 * counter.
+	 * 
+	 * @return a unique transaction ID
+	 * @param info
+	 *            an information object which is passed to all notification
+	 *            listeners. Example usage: pass Boolean.TRUE to stop the 
+	 *            GUI from updating mid-transaction.
+	 */
+	public String beginTransaction(Object info);
+
+	/**
+	 * Tries to begin a transaction. Returns immediately. Can be used for both
+	 * undoable and non-undoable transactions.
+	 * 
+	 * @return true if the modelspace was not locked and this thread locked the
+	 *         modelspace false if modelspace is locked, and no lock was done
+	 */
+	public boolean tryBeginTransaction();
+
+	/**
+	 * Commits the current transaction. Decrements the transaction counter and
+	 * if it is zero then commits the transaction.
+	 * 
+	 */
+	public void commitTransaction();
+
+	
+	/**
+	 * Commits all currently active subtransactions together with the main transaction.
+	 */
+	public void commitCompositeTransaction();
+	
+	
+	/**
+	 * Aborts the current transaction.
+	 * Effect: the transaction lock will be released.
+	 */
+	public void abortTransaction();
+
+	/**
+	 * Undoes the effects of the transaction identified by the unique ID given.
+	 * Note: all other transactions, which are affected, are also undoed.
+	 * 
+	 * @param aTransactionID
+	 */
+	public void undoTransaction(String aTransactionID);
+
+	/**
+	 * Pauses the current transaction. This means that lock is released. Should
+	 * only be use by interpreter debugger. Pausing a transaction can cause the
+	 * transaction code to crash.
+	 * 
+	 * @return object that contains transaction counter before pausing
+	 *         transaction
+	 */
+	public IPause pauseTransaction() throws IllegalMonitorStateException;
+
+	/**
+	 * unpauses a transaction. Lock regained, and transaction goes on.
+	 * 
+	 * @param n
+	 *            the object that was returned by pauseTransaction
+	 */
+	public void unPauseTransaction(IPause n);
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IUndoManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IUndoManager.java
new file mode 100644
index 0000000..f31e710
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/IUndoManager.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core;
+
+import java.util.List;
+
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.logger.Logger;
+
+/**
+ * This interface defines the undo support for the Viatra core.
+ * 
+ * @author Andras Balogh
+ * 
+ */
+public interface IUndoManager {
+	/**
+	 * Initializes the undo manager.
+	 * 
+	 * @param l
+	 *            - the framework logger
+	 * @param m
+	 *            - the owning modelspace
+	 * @throws VPMRuntimeException
+	 */
+	public void init(Logger l, IModelSpace m) throws VPMRuntimeException;
+
+	/**
+	 * Registers a new undo block with a descriptive name. (Checkpoint)
+	 * 
+	 * @param name
+	 *            - name of undo block
+	 */
+	public void nextUndoBlock(String name);
+
+	/**
+	 * Checks whether the undo buffer is empty
+	 * 
+	 * @return true, if there are operations in the undo buffer
+	 */
+	public boolean canUndo();
+
+	/**
+	 * Get the first n undo marks' name.
+	 * 
+	 * @param n
+	 *            Limit of undo marks.
+	 * @return List of strings
+	 */
+	public List<String> getUndoList(int n);
+
+	/**
+	 * Flushes the undo buffer.
+	 * 
+	 */
+	public void flushUndoBuffer();
+
+	/**
+	 * Undoes the last operation
+	 */
+	public void undo();
+
+	/**
+	 * Undoes the last n operations
+	 * 
+	 * @param n
+	 *            number of operations to be undone.
+	 */
+	public void undo(int n);
+
+	/**
+	 * Undoes all operations made after the last checkpoint with given name.
+	 * 
+	 * @param markName
+	 */
+	public void undo(String markName);
+
+	/**
+	 * Undoes all operations made after the n. checkpoint with given name.
+	 * 
+	 * @param markName
+	 * @param n
+	 */
+	public void undo(String markName, int n);
+
+	/**
+	 * Gets a list of undoable operations currently in the undo buffer.
+	 * 
+	 * @return array of operation names
+	 */
+	public List<String> getUndoableList();
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/constraint/EConstraint.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/constraint/EConstraint.java
new file mode 100644
index 0000000..70e48a3
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/constraint/EConstraint.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.constraint;
+
+/**
+ * This enumeration contains all types of relations in which two model elements
+ * can be.
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public enum EConstraint {
+	/** This is an element and tg is linked to this on from side */
+	REL_FROM,
+	/** This is an element and tg is linked to this on to side */
+	REL_TO,
+	/**
+	 * This is a relation and tg is the end point of the relation on the from
+	 * side
+	 */
+	ENTITY_REL_FROM,
+	/**
+	 * This is a relation and tg is the end point of the relation on the to side
+	 */
+	ENTITY_REL_TO,
+	/** src is over of tg */
+	OVER,
+	/** tg is child of src */
+	CHILD,
+	/** tg is parent of src */
+	PARENT,
+	/** tg is subtype of source */
+	SUBTYPE,
+	/** tg is supertype of source */
+	SUPERTYPE,
+	/** source is type of tg */
+	INSTANCE,
+	/** source is instance of tg */
+	TYPE,
+	/** source is entity tg is null */
+	ENTITY,
+	/** source is relation tg is null */
+	RELATION,
+	/** src is below tg */
+	BELOW, DSUBTYPE, DSUPERTYPE, DINSTANCE, DTYPE,
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/constraint/IConstraint.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/constraint/IConstraint.java
new file mode 100644
index 0000000..e4773d7
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/constraint/IConstraint.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.constraint;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public interface IConstraint {
+	/** This is an element and tg is linked to this on from side */
+	final static int REL_FROM = 0;
+
+	/** This is an element and tg is linked to this on to side */
+	final static int REL_TO = 1;
+
+	/**
+	 * This is a relation and tg is the end point of the relation on the from
+	 * side
+	 */
+	final static int ENTITY_REL_FROM = 2;
+
+	/**
+	 * This is a relation and tg is the end point of the relation on the to side
+	 */
+	final static int ENTITY_REL_TO = 3;
+
+	final static int OVER = 4;
+
+	/** tg is child of src */
+	final static int CHILD = 5;
+
+	/** tg is parent of src */
+	final static int PARENT = 6;
+
+	/** tg is subtype of source */
+	final static int SUBTYPE = 7;
+
+	/** tg is supertype of source */
+	final static int SUPERTYPE = 8;
+
+	/** source is type of tg */
+	final static int INSTANCE = 9;
+
+	/** source is instance of tg */
+	final static int TYPE = 10;
+
+	/** source is entity tg is null */
+	final static int ENTITY = 11;
+
+	/** source is relation tg is null */
+	final static int RELATION = 12;
+
+	/** src is below tg */
+	final static int BELOW = 13;
+
+	final static int N_CONSTRAINTS = 14;
+
+	final static int DTYPE = 14;
+
+	final static int DSUBTYPE = 15;
+
+	final static int DINSTANCE = 16;
+
+	final static int DSUPERTYPE = 17;
+
+	final static String[] namesOfConstraints = { "is source of",
+			"is target of", "starts from", "ends at", "is over of",
+			"is grandchild of", "is child of", "is supertype of",
+			"is subtype of", "is type of", "is instance of", "is an entity",
+			"is a relation", "is below of", "ERROR" };
+
+	// IPatternVariable getSourceVar();

+	// IPatternVariable getTargetVar();

+	int getType();
+
+	EConstraint getType2();
+
+	Object getTag();
+
+	void setTag(Object o);
+
+	// int typeFromOtherSide() throws PatternMatcherException;

+	/**
+	 * Return the type of the constraint if seen from the other side. Returns -1
+	 * (not a real type) if no other side is present.
+	 * 
+	 * @return
+	 */
+	int typeFromOtherSideNoException();
+	/**
+	 * In a pattern constraints can be given from both side. So one constraint
+	 * can have two representations in constraint list. This method will return
+	 * true if this is the main representation of the constraint.
+	 * 
+	 * @return
+	 */
+	// boolean isOtherSide();

+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObject.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObject.java
new file mode 100644
index 0000000..1e0bf7c
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObject.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import java.util.Collection;
+
+import org.eclipse.viatra2.core.ICoreNotificationListener;
+import org.eclipse.viatra2.core.IModelElement;
+
+/**
+ * This is an interface of a notification object. A notification object is sent,
+ * whenever the modelspace changes. It contains string constants which identify
+ * the various notification types supported by the Viatra Core, as well as some
+ * utility getter functions.
+ * 
+ * @author Andras Schmidt
+ * 
+ *         Modified on 2006.08.08 by Istvan Rath: - added transaction-specific
+ *         ID's (TA prefix) - cleaned up javadoc
+ *         Modified on 2011.06.10 by Ábel Hegedüs: - changed to use enum
+ */
+public interface ICoreNotificationObject {
+	
+	/**
+	 * Converts this notification to a human readable string representation.
+	 */
+	public String toString();
+
+	/**
+	 * Get the type of this action. The returned string constant will always be
+	 * one of the types defined in the interface.
+	 */
+	public String getActionType();
+
+	/**
+	 * Get the type of this action.
+	 * 
+	 * @return type defined by the interface
+	 */
+	public NotificationType getActionTypeEnum();
+	
+	/**
+	 * Get the objects receiving this notification instance.
+	 */
+	public Collection<ICoreNotificationListener> getListeners();
+
+	/**
+	 * Get a collection of model elements which were involved in the
+	 * modification which this notification object is signalling.
+	 */
+	public Collection<IModelElement> getNotifiedObjects();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectCreateEntity.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectCreateEntity.java
new file mode 100644
index 0000000..0fe65ef
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectCreateEntity.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.IEntity;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public interface ICoreNotificationObjectCreateEntity extends
+		ICoreNotificationObject {
+
+
+	IEntity getContainer();
+
+	IEntity getCreated();
+
+	String getName();
+
+	String getValue();
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectCreateInstanceOf.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectCreateInstanceOf.java
new file mode 100644
index 0000000..236d0cc
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectCreateInstanceOf.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public interface ICoreNotificationObjectCreateInstanceOf extends
+		ICoreNotificationObject {
+	IModelElement getType();
+
+	IModelElement getInstance();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectCreateRelation.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectCreateRelation.java
new file mode 100644
index 0000000..85d250e
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectCreateRelation.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public interface ICoreNotificationObjectCreateRelation extends
+		ICoreNotificationObject {
+
+	IModelElement getFrom();
+
+	IModelElement getTo();
+
+	IRelation getNewRelation();
+
+	String getName();
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectCreateSupertypeOf.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectCreateSupertypeOf.java
new file mode 100644
index 0000000..8c6e230
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectCreateSupertypeOf.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public interface ICoreNotificationObjectCreateSupertypeOf extends
+		ICoreNotificationObject {
+	IModelElement getSuper();
+
+	IModelElement getSub();
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectDeleteContainment.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectDeleteContainment.java
new file mode 100644
index 0000000..7797b58
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectDeleteContainment.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public interface ICoreNotificationObjectDeleteContainment extends
+		ICoreNotificationObject {
+	IEntity getParent();
+
+	IModelElement getChild();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectDeleteEntity.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectDeleteEntity.java
new file mode 100644
index 0000000..100a369
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectDeleteEntity.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.IEntity;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public interface ICoreNotificationObjectDeleteEntity extends
+		ICoreNotificationObject {
+
+	IEntity getDeleted();
+
+	String getName();
+
+	String getValue();
+
+	IEntity getParent();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectDeleteInstanceOf.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectDeleteInstanceOf.java
new file mode 100644
index 0000000..dcd8dca
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectDeleteInstanceOf.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public interface ICoreNotificationObjectDeleteInstanceOf extends
+		ICoreNotificationObject {
+	IModelElement getType();
+
+	IModelElement getInstance();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectDeleteRelation.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectDeleteRelation.java
new file mode 100644
index 0000000..5ad8685
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectDeleteRelation.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public interface ICoreNotificationObjectDeleteRelation extends
+		ICoreNotificationObject {
+
+	IRelation getDeleted();
+
+	String getName();
+
+	IModelElement getFrom();
+
+	IModelElement getTo();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectDeleteSupertypeOf.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectDeleteSupertypeOf.java
new file mode 100644
index 0000000..959674e
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectDeleteSupertypeOf.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public interface ICoreNotificationObjectDeleteSupertypeOf extends
+		ICoreNotificationObject {
+	IModelElement getSuper();
+
+	IModelElement getSub();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectMoveTo.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectMoveTo.java
new file mode 100644
index 0000000..ea6e594
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectMoveTo.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.IEntity;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public interface ICoreNotificationObjectMoveTo extends ICoreNotificationObject {
+	IEntity getNewContainer();
+
+	IEntity getOldContainer();
+
+	IEntity getElement();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetIsAny.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetIsAny.java
new file mode 100644
index 0000000..4ece670
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetIsAny.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+
+public interface ICoreNotificationObjectSetIsAny extends
+		ICoreNotificationObject {
+	IModelElement getRelation();
+
+	boolean getIsAny();
+
+	boolean getIsAnyOld();
+
+	/**
+	 * Returns true is source side was set, and false if target side was set.
+	 * 
+	 * @return
+	 */
+	boolean getIsFromSideSet();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetIsFinalType.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetIsFinalType.java
new file mode 100644
index 0000000..68bffff
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetIsFinalType.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+
+/**
+ * 
+ * @author Istvan Rath
+ * 
+ */
+public interface ICoreNotificationObjectSetIsFinalType extends
+		ICoreNotificationObject {
+
+	IModelElement getElement();
+
+	boolean getIsFinalType();
+
+	boolean getIsFinalTypeOld();
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetName.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetName.java
new file mode 100644
index 0000000..c8eafd7
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetName.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public interface ICoreNotificationObjectSetName extends ICoreNotificationObject {
+	String getNewName();
+
+	String getOldName();
+
+	IModelElement getElement();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetRelationFrom.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetRelationFrom.java
new file mode 100644
index 0000000..32cb8dc
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetRelationFrom.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public interface ICoreNotificationObjectSetRelationFrom extends
+		ICoreNotificationObject {
+	IRelation getRelation();
+
+	IModelElement getOldFrom();
+
+	IModelElement getNewFrom();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetRelationInverse.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetRelationInverse.java
new file mode 100644
index 0000000..d38d978
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetRelationInverse.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.IRelation;
+
+public interface ICoreNotificationObjectSetRelationInverse extends
+		ICoreNotificationObject {
+
+	IRelation getRelation();
+
+	IRelation getInverse();
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetRelationIsAggregation.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetRelationIsAggregation.java
new file mode 100644
index 0000000..b2bf3bb
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetRelationIsAggregation.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.IRelation;
+
+public interface ICoreNotificationObjectSetRelationIsAggregation extends
+		ICoreNotificationObject {
+
+
+
+	IRelation getRelation();
+
+	boolean getIsAggregation();
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetRelationMultiplicity.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetRelationMultiplicity.java
new file mode 100644
index 0000000..e0004e9
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetRelationMultiplicity.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.EMultiplicityKind;
+import org.eclipse.viatra2.core.IRelation;
+
+/**
+ * @author Andras Schmidt, Istvan Rath
+ * 
+ */
+public interface ICoreNotificationObjectSetRelationMultiplicity extends
+		ICoreNotificationObject {
+
+
+	IRelation getRelation();
+
+	EMultiplicityKind getMultiplicity();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetRelationTo.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetRelationTo.java
new file mode 100644
index 0000000..8c1af39
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetRelationTo.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public interface ICoreNotificationObjectSetRelationTo extends
+		ICoreNotificationObject {
+	IRelation getRelation();
+
+	IModelElement getOldTo();
+
+	IModelElement getNewTo();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetValue.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetValue.java
new file mode 100644
index 0000000..43504b6
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetValue.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.IEntity;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public interface ICoreNotificationObjectSetValue extends
+		ICoreNotificationObject {
+	String getNewValue();
+
+	String getOldValue();
+
+	IEntity getEntity();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetViewInfo.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetViewInfo.java
new file mode 100644
index 0000000..0c3b28d
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSetViewInfo.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public interface ICoreNotificationObjectSetViewInfo extends
+		ICoreNotificationObject {
+	IModelElement getElement();
+
+	String getOldViewInfo();
+
+	String getNewViewInfo();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSubTransactionBegin.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSubTransactionBegin.java
new file mode 100644
index 0000000..bf7da30
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSubTransactionBegin.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+public interface ICoreNotificationObjectSubTransactionBegin extends
+		ICoreNotificationObjectTransactionBegin {
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSubTransactionEnd.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSubTransactionEnd.java
new file mode 100644
index 0000000..45a1e7e
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectSubTransactionEnd.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+public interface ICoreNotificationObjectSubTransactionEnd extends
+		ICoreNotificationObjectTransactionEnd {
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectTransaction.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectTransaction.java
new file mode 100644
index 0000000..cf4cab4
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectTransaction.java
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+public interface ICoreNotificationObjectTransaction {
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectTransactionBegin.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectTransactionBegin.java
new file mode 100644
index 0000000..54e447c
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectTransactionBegin.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+public interface ICoreNotificationObjectTransactionBegin extends
+		ICoreNotificationObjectTransaction {
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectTransactionEnd.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectTransactionEnd.java
new file mode 100644
index 0000000..3023133
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectTransactionEnd.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+public interface ICoreNotificationObjectTransactionEnd extends
+		ICoreNotificationObjectTransaction {
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectUndoBegin.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectUndoBegin.java
new file mode 100644
index 0000000..7048260
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectUndoBegin.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+public interface ICoreNotificationObjectUndoBegin extends
+		ICoreNotificationObjectTransaction {
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectUndoEnd.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectUndoEnd.java
new file mode 100644
index 0000000..73d78e7
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectUndoEnd.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+public interface ICoreNotificationObjectUndoEnd extends
+		ICoreNotificationObjectTransaction {
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectUndoableTransactionBegin.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectUndoableTransactionBegin.java
new file mode 100644
index 0000000..b213ecf
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectUndoableTransactionBegin.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+public interface ICoreNotificationObjectUndoableTransactionBegin extends
+		ICoreNotificationObjectTransaction {
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectUserMark.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectUserMark.java
new file mode 100644
index 0000000..d174601
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/ICoreNotificationObjectUserMark.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.notification;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public interface ICoreNotificationObjectUserMark {
+	String getMarkName();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/NotificationType.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/NotificationType.java
new file mode 100644
index 0000000..d2e2a83
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/notification/NotificationType.java
@@ -0,0 +1,210 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Abel Hegedus and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Abel Hegedus - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.core.notification;

+

+/**

+ * Type enum for notifications

+ * 

+ * @author Abel Hegedus

+ *

+ */

+public enum NotificationType {

+

+	/**

+	 * Signals that a "user mark" (checkpoint) has been added to the undo stack.

+	 * This is only used by the undo manager.

+	 */

+	USER_MARK ( "user mark"),

+

+	/**

+	 * Means that one atomic step is finished. This defines a consistent point,

+	 * where undo can be stopped.

+	 */

+	ACTION_ATOMIC_STEP_READY ( "atomic step ready"),

+

+	/**

+	 * Means that an entity was created. Parameters: IModelElement container

+	 * entity (may be null, then containment add will come in an other

+	 * notification) IModelElement of newly created entity String name of newly

+	 * created entity String value of newly created entity

+	 */

+	ACTION_CREATE_ENTITY ( "create entity"),

+

+	/**

+	 * Means that an entity was deleted Parameters: String ID of deleted entity

+	 * String name of deleted entity String value of deleted entity String ID of

+	 * parent

+	 */

+	ACTION_DELETE_ENTITY ( "delete entity"),

+

+	/**

+	 * Means that a function was created Parameters: String ID of container

+	 * entity (may be null, then containment add will come in an other

+	 * notification) String ID of from entity String ID of to entity String ID

+	 * of newly created function String name of newly created function

+	 */

+	ACTION_CREATE_RELATION ( "create relation"),

+

+	/**

+	 * Means that an entity was deleted Parameters: String ID of deleted entity

+	 * String name of deleted entity String value of deleted entity String ID of

+	 * parent

+	 */

+	ACTION_DELETE_RELATION ( "delete relation"),

+

+	/**

+	 * Means that a relation's source model element was changed.

+	 */

+	ACTION_SET_RELATION_FROM ( "set relation from"),

+

+	/**

+	 * Means that a relation's target model element was changed.

+	 */

+	ACTION_SET_RELATION_TO ( "set relation to"),

+

+	/**

+	 * Means that an instanceOf implicit relation was created.

+	 */

+	ACTION_CREATE_INSTANCEOF ( "create instanceof"),

+

+	/**

+	 * Means that an instanceOf implicit relation was deleted.

+	 */

+	ACTION_DELETE_INSTANCEOF ( "delete instanceof"),

+

+	/**

+	 * Means that an supertypeOf implicit relation was created.

+	 */

+	ACTION_CREATE_SUPERTYPEOF ( "create supertypeof"),

+

+	/**

+	 * Means that an supertypeOf implicit relation was deleted.

+	 */

+	ACTION_DELETE_SUPERTYPEOF ( "delete supertypeof"),

+

+	/**

+	 * Means that a containment relation was deleted. Note: the state of the

+	 * modelspace is not consistent!

+	 */

+	ACTION_DELETE_CONTAINMENT ( "delete containment"),

+

+	/**

+	 * Means that the value of an entity was changed.

+	 */

+	ACTION_SET_VALUE ( "set value"),

+

+	/**

+	 * Means that the view info of an element was changed.

+	 */

+	ACTION_SET_VIEW_INFO ( "set view info"),

+

+	/**

+	 * Means that the name of an element was changed.

+	 */

+	ACTION_SET_NAME ( "set name"),

+

+	/**

+	 * Means that the isFinalType attribute of an element was changed.

+	 */

+	ACTION_SET_ISFINALTYPE ( "set isfinaltype"),

+

+	/**

+	 * Means that the isAny attribute of an element was changed.

+	 */

+	ACTION_SET_ISANY ( "set isany"),

+

+	/**

+	 * Means that an element was moved to an entity, with removing from all

+	 * others.

+	 */

+	ACTION_MOVE_ELEMENT_TO ( "move element to"),

+

+	/**

+	 * Means that an undoable transaction has begun.

+	 */

+	TA_UNDOABLE_TRANSACTION_BEGIN ( "begin undoable transaction"),

+

+	/**

+	 * Means that a non-undoable transaction has begun.

+	 */

+	TA_TRANSACTION_BEGIN ( "begin transaction"),

+

+	/**

+	 * Means that a sub-transaction has begun.

+	 */

+	TA_SUBTRANSACTION_BEGIN ( "begin subtransaction"),

+

+	/**

+	 * Signals the end of a sub-transaction.

+	 */

+	TA_SUBTRANSACTION_END ( "end subtransaction"),

+

+	/**

+	 * Signals the end of a transaction.

+	 */

+	TA_TRANSACTION_END ( "end transaction"),

+

+	/**

+	 * Signals that an undo operation has begun.

+	 */

+	TA_UNDO_BEGIN ( "begin undo"),

+

+	/**

+	 * Signals that an undo operation has ended.

+	 */

+	TA_UNDO_END ( "end undo"),

+

+	/**

+	 * Signals that a relation's inverse has been set.

+	 */

+	ACTION_SET_RELATION_INVERSE ( "set inverse"),

+	

+	/**

+	 * The relation's isAggregation flag has been set.

+	 */

+	ACTION_SET_RELATION_ISAGGREGATION ( "set isAggregation"),

+	

+	/**

+	 * The relation's multiplicity has been set.

+	 */

+	ACTION_SET_RELATION_MULTIPLICITY ( "set multiplicity"),

+

+	/**

+	 * Signals that the transaction has been aborted.

+	 */

+	TA_TRANSACTION_ABORT ( "transaction abort"),

+

+	/**

+	 * Signals that the subtransaction has been aborted.

+	 */

+	TA_SUBTRANSACTION_ABORT ( "subtransaction abort"),

+	

+	ACTION_MORE_ATOMICS_TO_ONE_ATOM_START ( "1000"),

+

+	ACTION_MORE_ATOMICS_TO_ONE_ATOM_END  ("1001"),

+

+	ACTION_SKIP_NOTIFICATIONS_START ("1002"),

+

+	ACTION_SKIP_NOTIFICATIONS_END ( "1003");

+

+	

+	private final String text;

+	

+	private NotificationType(String text){

+		this.text = text;

+	}

+	

+	@Override

+	public String toString() {

+		// TODO Auto-generated method stub

+		return text;

+	}

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/CollectionsDisjunktTester.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/CollectionsDisjunktTester.java
new file mode 100644
index 0000000..32ba72a
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/CollectionsDisjunktTester.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.TreeSet;
+
+/**
+ * This class implements an algorithm to test two collections whether they are
+ * disjunkt or not.
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public class CollectionsDisjunktTester {
+	/**
+	 * Tests whether the two collections are disjunkt or not. Will work fast
+	 * (TODO) if ordered sets are given (with the same ordering).
+	 * 
+	 * @param col1
+	 * @param col2
+	 * @return
+	 */
+	public static boolean isDisjunct(Collection col1, Collection col2) {
+		// TODO try to find out the structure of collections and implement a
+		// faster search

+		return isDisjunctBruteForce(col1, col2);
+	}
+
+	private static boolean isDisjunctBruteForce(Collection col1, Collection col2) {
+		Iterator it = col1.iterator();
+		while (it.hasNext()) {
+			if (col2.contains(it.next()))
+				return false;
+		}
+		return true;
+	}
+
+	/**
+	 * returns the shared objects in the two collections. Will work fast (TODO)
+	 * if ordered sets are given (with the same ordering).
+	 * 
+	 * @param col1
+	 * @param col2
+	 * @return
+	 */
+	public static Collection<Object> sharedElements(Collection col1,
+			Collection col2) {
+		TreeSet<Object> ret = new TreeSet<Object>();
+		Iterator it = col1.iterator();
+		while (it.hasNext()) {
+			Object o = it.next();
+			if (col2.contains(o))
+				ret.add(o);
+		}
+		return ret;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/ConstantSet.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/ConstantSet.java
new file mode 100644
index 0000000..6206efb
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/ConstantSet.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple;
+
+import java.util.Set;
+import java.util.TreeSet;
+
+/**
+ * @author Andras Schmidt
+ * 
+ *         Window - Preferences - Java - Code Style - Code Templates
+ */
+public class ConstantSet<T> extends TreeSet<T> {
+	/**

+	 * 

+	 */
+	private static final long serialVersionUID = 1L;
+
+	public ConstantSet(Set<? extends T> x) {
+		super(x);
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/IDProvider.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/IDProvider.java
new file mode 100644
index 0000000..9c63684
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/IDProvider.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple;
+
+import org.eclipse.viatra2.logger.Logger;
+
+/**
+ * @author Andras Schmidt
+ * 
+ *         Window - Preferences - Java - Code Style - Code Templates
+ */
+public class IDProvider {
+	Logger logger;
+
+	long IDCounter = 0;
+
+	IDProvider(Logger l) {
+		logger = l;
+	}
+
+	public long newID() {
+		return IDCounter++;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/KeyedObject.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/KeyedObject.java
new file mode 100644
index 0000000..f4d59df
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/KeyedObject.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple;
+
+/**
+ * @author Andras Schmidt
+ * 
+ *         This interface represents an object which has keys. * Window -
+ *         Preferences - Java - Code Style - Code Templates
+ */
+public interface KeyedObject {
+	Comparable<?> getKey(int i);
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/OneIterator.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/OneIterator.java
new file mode 100644
index 0000000..3d0d54f
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/OneIterator.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple;
+
+import java.util.Iterator;
+
+/**
+ * Iterator of a singleton or an empty collection
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public class OneIterator<T> implements Iterator<T> {
+	T o;
+
+	/**
+	 * Instantiate a iterator of a singleton or an empty collection
+	 * 
+	 * @param o
+	 *            null: singleton colection, not null: collection that contains
+	 *            the given object
+	 */
+	public OneIterator(T o) {
+		this.o = o;
+	}
+
+	public boolean hasNext() {
+		return o != null;
+	}
+
+	public T next() {
+		T ret = o;
+		o = null;
+		return ret;
+	}
+
+	public void remove() {
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/Pause.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/Pause.java
new file mode 100644
index 0000000..7a4ab00
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/Pause.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple;
+
+import org.eclipse.viatra2.core.IPause;
+
+class Pause implements IPause {
+	int n;
+
+	Pause(int n) {
+		this.n = n;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleEntity.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleEntity.java
new file mode 100644
index 0000000..afc5142
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleEntity.java
@@ -0,0 +1,210 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.TreeMap;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.simple.cache.TrickyCollection;
+
+/**
+ * Class for representing VPM entities
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public class SimpleEntity extends SimpleModelElement implements IEntity {
+	/**
+	 * The parent of this entity
+	 */
+	protected SimpleEntity parent = null;
+
+	/**
+	 * The contained entities of this entity
+	 */
+	protected TreeMap<Long, IModelElement> containment;
+
+	/**
+	 * The value stored in this entity
+	 */
+	protected String value;
+
+	/**
+	 * Instantiate an entity with given id in the given modelspace
+	 * 
+	 * @param ID
+	 * @param ms
+	 */
+	public SimpleEntity(long ID, SimpleModelSpace ms) {
+		super(ID, ms);
+		containment = new TreeMap<Long, IModelElement>();
+		value = "";
+	}
+
+	/**
+	 * Gets the entitys value
+	 * 
+	 * @return the value
+	 */
+	public String getValue() {
+		try {
+			modelSpace.lock.readLock().lock();
+
+			return value;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/**
+	 * Retrives a model element that is contained by this entity and has a given
+	 * name
+	 * 
+	 * @param n
+	 *            name of element to return
+	 * @return element ref, or null if not found
+	 */
+	public IModelElement getContentByName(String n) {
+		try {
+			modelSpace.lock.readLock().lock();
+			Long id = namespace.get(n);
+			if (id != null) {
+				IEntity me = (IEntity) containment.get(id);
+				return me;
+			}
+			return null;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/**
+	 * Retrives a model element that is contained by this entity and has a given
+	 * type
+	 * 
+	 * @param n
+	 *            type of element to return
+	 * @return element ref, or null if not found
+	 */
+	public IModelElement getContentByType(IModelElement n) {
+		try {
+			modelSpace.lock.readLock().lock();
+			Iterator<IModelElement> it = containment.values().iterator();
+			while (it.hasNext()) {
+				SimpleModelElement me = (SimpleModelElement) it.next();
+				if (me.isInstanceOf(n))
+					return me;
+			}
+			return null;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/**
+	 * Returns nested elements of the Entity
+	 * 
+	 * @return Set of contained elements.
+	 */
+	public Collection<IModelElement> getContents() {
+		try {
+			modelSpace.lock.readLock().lock();
+			return containment.values();
+			// TODO konstans

+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	public Collection<IModelElement> getAllComponents() {
+		return new TrickyCollection(null, this);
+		// return _getAllComponents();

+	}
+
+	/**
+	 * Returns the components of the entity.
+	 * 
+	 * @return set of elements contained by the entity. (recoursive)
+	 */
+	public Collection<IModelElement> _getAllComponents() {
+		try {
+			modelSpace.lock.readLock().lock();
+			ArrayList<IModelElement> ret = new ArrayList<IModelElement>();
+			ret.addAll(getContents());
+			for (IModelElement elem : getContents()) {
+				if (elem instanceof IEntity) {
+					SimpleEntity e = (SimpleEntity) elem;
+					ret.addAll(e._getAllComponents());
+				}
+			}
+			return ret;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	public IEntity getParent() {
+		try {
+			modelSpace.lock.readLock().lock();
+			return parent;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/**
+	 * Returns one of the element's fully qualified name
+	 * 
+	 * @return name
+	 */
+	@Override
+	public String getFullyQualifiedName() {
+		try {
+			modelSpace.lock.readLock().lock();
+			String name = getName();
+			IEntity root = modelSpace.getModelManager().getRoot();
+			if (root == this)
+				return "";
+			if (!(root == parent) && !(parent == null))
+				name = parent.getFullyQualifiedName() + "." + name;
+			return name;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see hu.bme.mit.viatra.core.IModelElement#getNamespace()
+	 */
+	public IModelElement getNamespace() {
+		try {
+			modelSpace.lock.readLock().lock();
+			return parent;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	public boolean isEntity() {
+		return true;
+	}
+
+	public boolean isRelation() {
+		return false;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleModelElement.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleModelElement.java
new file mode 100644
index 0000000..6350a98
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleModelElement.java
@@ -0,0 +1,1035 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import org.eclipse.viatra2.core.ICoreNotificationListener;
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.core.constraint.EConstraint;
+import org.eclipse.viatra2.core.simple.tempdata.TemporaryData;
+
+/**
+ * This class implements the VPM core element representation
+ * 
+ * @author Andras Schmidt, Istvan Rath
+ * 
+ */
+abstract public class SimpleModelElement implements KeyedObject, IModelElement {
+	/**
+	 * ID of this element. Unique in modelspace.
+	 */
+	long ID;
+
+	/**
+	 * Stores relations that have this element as source. Maps the ids of
+	 * relations to the relations.
+	 */
+	protected TreeMap<Long, IRelation> relationsFrom;
+
+	/**
+	 * Stores relations that have this element as target.
+	 */
+	protected Set<IRelation> relationsTo;
+
+	/**
+	 * Stores elements in namespace. Maps elements name in namespace to the
+	 * element's ID
+	 */
+	protected TreeMap<String, Long> namespace;
+
+	/**
+	 * Name of this element. Unique in namespace.
+	 */
+	String name = "";
+
+	String viewInfo = null;
+
+	boolean isFinalType = false;
+
+	public boolean getIsFinalType() {
+		return isFinalType;
+	}
+
+	/**
+	 * The modelSpace in which this element is instantiated.
+	 */
+	SimpleModelSpace modelSpace;
+
+	/**
+	 * supertypes of this element.
+	 */
+	protected Set<IModelElement> supertype = null;
+
+	/**
+	 * types of this element.
+	 */
+	protected Set<IModelElement> type = null;
+
+	/**
+	 * subtypes of this element.
+	 */
+	protected Set<IModelElement> subtypes;
+
+	/**
+	 * instances of this element.
+	 */
+	protected Set<IModelElement> instances;
+
+	/**
+	 * Cached objects to store redundant data: they will become invalid when
+	 * modelspace changes If we have a valid data then the get method returns
+	 * it, if we have no valid data then the get method counts it.
+	 */
+	protected TemporaryData<Set<IModelElement>> allInstances;//=TemporaryData
+																	// .
+																	// create();

+
+	protected TemporaryData<Set<IModelElement>> allTypes;// =TemporaryData.
+																// create();

+
+	protected TemporaryData<Set<IModelElement>> allSupertypes;// =
+																	// TemporaryData
+																	// .
+																	// create();

+
+	protected TemporaryData<Set<IModelElement>> allSubtypes;//=TemporaryData
+																// .create();

+
+	/**
+	 * Listeners to notify, when this element changes.
+	 */
+	protected List<ICoreNotificationListener> notificationListeners;
+
+	/**
+	 * Compares this to o Two elements are compared by their IDs. This makes it
+	 * fast to search an element by ID in a Set.
+	 * 
+	 * @return true if their ID are equal.
+	 */
+	@Override
+	public boolean equals(Object o) {
+		if (o instanceof SimpleModelElement)
+			return ID == ((SimpleModelElement) o).ID;
+		else
+			return false;
+	}
+
+	/**
+	 * Comapres this to o Two elements are compared by their IDs. This makes it
+	 * fast to search an element by ID in a Set.
+	 * 
+	 * @return 1:greater, 0: equals, -1:less
+	 */
+	public int compareTo(IModelElement o) {
+		long diff = ID - ((SimpleModelElement) o).ID;
+		// Problem is: long->int conversion might fail to preserve sign, so we

+		// need this

+		// difficult construct.

+		return diff > 0 ? 1 : (diff < 0 ? -1 : 0);
+	}
+
+	/**
+	 * This will be used when implementing faster search.
+	 */
+	public static final int KEY_ID = 0;
+
+	/**
+	 * This will be used when implementing faster search.
+	 */
+	public static final int KEY_NAME = 1;
+
+	/**
+	 * This will be used when implementing faster search.
+	 */
+	public Comparable<?> getKey(int nr) {
+		switch (nr) {
+		case KEY_ID:
+			return new Long(ID);
+		case KEY_NAME:
+			return name;
+		}
+		return null;
+	}
+
+	/**
+	 * Instantiates new SimpleModelElement. Its ID will be set to _ID.
+	 */
+	public SimpleModelElement(long _ID, SimpleModelSpace ms) {
+		ID = _ID;
+		modelSpace = ms;
+		allInstances = modelSpace.tempFactory.create();
+		allTypes = modelSpace.tempFactory.create();
+		allSupertypes = modelSpace.tempFactory.create();
+		allSubtypes = modelSpace.tempFactory.create();
+
+		// supertype=new TreeSet();

+		// type=new TreeSet();

+		// subtypes=new TreeSet();

+		// instances=new TreeSet();

+
+		relationsFrom = new TreeMap<Long, IRelation>();
+		relationsTo = new SmallTreeSet<IRelation>();
+		namespace = new TreeMap<String, Long>();
+
+		supertype = new SmallTreeSet<IModelElement>();
+		type = new SmallTreeSet<IModelElement>();
+		subtypes = new SmallTreeSet<IModelElement>();
+		instances = new SmallTreeSet<IModelElement>();
+		notificationListeners = new ArrayList<ICoreNotificationListener>(0);
+	}
+
+	/**
+	 * Gets the element's ID
+	 * 
+	 * @return id
+	 */
+	public String getID() {
+		try {
+			modelSpace.lock.readLock().lock();
+			return Long.toString(ID);
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	public Long getLongID() {
+		try {
+			modelSpace.lock.readLock().lock();
+			return new Long(ID);
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/**
+	 * Gets the elements name
+	 * 
+	 * @return the name of the element
+	 */
+	public String getName() {
+		try {
+			// modelSpace.lock.lock();

+			return name;
+		} finally {
+			// modelSpace.lock.unlock();

+		}
+	}
+
+	/**
+	 * Returns the collection of supertypes.
+	 * 
+	 * @return the collection of supertypes
+	 */
+	public Collection<IModelElement> getSupertypes() {
+		try {
+			modelSpace.lock.readLock().lock();
+			if (SimpleModelSpace.isAncestorAware) {
+				if (supertype.size() == 0 && modelSpace.ancestorEntity != null) {
+					TreeSet<IModelElement> retSet = new TreeSet<IModelElement>(
+							supertype);
+					if (isEntity())
+						retSet.add(modelSpace.ancestorEntity);
+					else
+						retSet.add(modelSpace.ancestorRelation);
+					return retSet;
+				} else {
+					return supertype;
+				}
+			} else
+				return supertype;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/**
+	 * Gets the types of the element. The result set contains all Elements,
+	 * which are instanciated by this Element.
+	 * 
+	 * @return set of elements.
+	 */
+	public Collection<IModelElement> getTypes() {
+		try {
+			modelSpace.lock.readLock().lock();
+			if (SimpleModelSpace.isAncestorAware) {
+				if (type.size() == 0 && modelSpace.ancestorEntity != null) {
+					TreeSet<IModelElement> retSet = new TreeSet<IModelElement>(
+							supertype);
+					if (isEntity())
+						retSet.add(modelSpace.ancestorEntity);
+					else
+						retSet.add(modelSpace.ancestorRelation);
+					return retSet;
+				}
+				return type;
+			} else
+				return type;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/**
+	 * Gets the list of subtypes of the current Element.
+	 * 
+	 * @return Set of elements
+	 */
+	public Collection<IModelElement> getSubtypes() {
+		try {
+			modelSpace.lock.readLock().lock();
+			return subtypes;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/**
+	 * Gets all elements that are instances of the current one.
+	 * 
+	 * @return collection of instances
+	 */
+	public Collection<IModelElement> getInstances() {
+		try {
+			modelSpace.lock.readLock().lock();
+			return instances;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/**
+	 * Gets the String representation of this object.
+	 */
+	@Override
+	public String toString() {
+		// TODO

+		try {
+			// modelSpace.lock.lock();

+			return getFullyQualifiedName();
+		} finally {
+			// modelSpace.lock.unlock();

+		}
+	}
+
+	/**
+	 * Gets recursively all supertypes of the current Element.
+	 * 
+	 * @return set of Elements.
+	 */
+	public Collection<IModelElement> getAllSupertypes() {
+		try {
+			modelSpace.lock.readLock().lock();
+			Set<IModelElement> retSet = allSupertypes
+					.getObject(modelSpace.numberOfChanges);
+			if (retSet != null)
+				return retSet;
+			retSet = new TreeSet<IModelElement>();
+			Iterator<IModelElement> it = supertype.iterator();
+			while (it.hasNext()) {
+				SimpleModelElement me = (SimpleModelElement) it.next();
+				retSet.add(me);
+				retSet.addAll(me.getAllSupertypes());
+			}
+			allSupertypes.setObject(modelSpace.numberOfChanges, retSet);
+			return retSet;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/**
+	 * Gets recursively all types of the current Element.
+	 * 
+	 * @return set of Elements.
+	 */
+	public Collection<IModelElement> getAllTypes() {
+		try {
+			modelSpace.lock.readLock().lock();
+			Set<IModelElement> retSet = allTypes
+					.getObject(modelSpace.numberOfChanges);
+			if (retSet != null)
+				return retSet;
+			retSet = new TreeSet<IModelElement>();
+			Iterator<IModelElement> it = type.iterator();
+			while (it.hasNext()) {
+				SimpleModelElement me = (SimpleModelElement) it.next();
+				retSet.add(me);
+				retSet.addAll(me.getAllSupertypes());
+			}
+			allTypes.setObject(modelSpace.numberOfChanges, retSet);
+			return retSet;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/**
+	 * Gets recoursively all subtypes of the current element.
+	 * 
+	 * @return set of types.
+	 */
+	public Collection<IModelElement> getAllSubtypes() {
+		try {
+			modelSpace.lock.readLock().lock();
+			Set<IModelElement> retSet = allSubtypes
+					.getObject(modelSpace.numberOfChanges);
+			if (retSet != null)
+				return retSet;
+			retSet = new TreeSet<IModelElement>();
+			Iterator<IModelElement> it = subtypes.iterator();
+			while (it.hasNext()) {
+				SimpleModelElement me = (SimpleModelElement) it.next();
+				retSet.add(me);
+				retSet.addAll(me.getAllSubtypes());
+			}
+			allSubtypes.setObject(modelSpace.numberOfChanges, retSet);
+			return retSet;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/**
+	 * Gets recoursively all instances of the current element (and its
+	 * subtypes).
+	 * 
+	 * @return set of types.
+	 */
+	public Collection<IModelElement> getAllInstances() {
+		try {
+			modelSpace.lock.readLock().lock();
+			Set<IModelElement> retSet = allInstances
+					.getObject(modelSpace.numberOfChanges);
+			if (retSet == null) {
+				//retSet = new TreeSet<IModelElement>();
+				retSet = new HashSet<IModelElement>();
+				
+				retSet.addAll(instances);
+				Iterator<IModelElement> itS = getAllSubtypes().iterator();
+				while (itS.hasNext()) {
+					SimpleModelElement meS = (SimpleModelElement) itS.next();
+					retSet.addAll(meS.getAllInstances());
+				}
+				allInstances.setObject(modelSpace.numberOfChanges, retSet);
+			}
+			return retSet;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/**
+	 * Adds a new notification listener to this element
+	 * 
+	 * @param l
+	 *            the new listener
+	 */
+	protected void addNotificationListener(ICoreNotificationListener l) {
+		try {
+			modelSpace.lock.writeLock().lock();
+			notificationListeners.add(l);
+		} finally {
+			modelSpace.lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * Removes a notification listener
+	 * 
+	 * @param l
+	 *            the listener to be removed
+	 */
+	public void removeNotificationListener(ICoreNotificationListener l) {
+		try {
+			modelSpace.lock.writeLock().lock();
+			notificationListeners.remove(l);
+		} finally {
+			modelSpace.lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * Returns the current set of listeners of this element
+	 * 
+	 * @return collection of listeners
+	 */
+	public Collection<ICoreNotificationListener> getNotificationListeners() {
+		try {
+			// modelSpace.lock.lock();

+			return notificationListeners;
+		} finally {
+			// modelSpace.lock.unlock();

+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * hu.bme.mit.viatra.core.IModelElement#isInstanceOf(hu.bme.mit.viatra.core
+	 * .IModelElement)
+	 */
+	public boolean isInstanceOf(IModelElement type) {
+		if (type==null) {
+			return false;
+		}
+		try {
+			modelSpace.lock.readLock().lock();
+			if (!this.type.contains(type))
+				return getAllTypes().contains(type);
+			else
+				return true;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * hu.bme.mit.viatra.core.IModelElement#isSupertypeOf(hu.bme.mit.viatra.
+	 * core.IModelElement)
+	 */
+	public boolean isSupertypeOf(IModelElement sub) {
+		if (sub==null) return false;
+		try {
+			modelSpace.lock.readLock().lock();
+			if (sub == this)
+				return false; //TODO: ask Dani
+			return getAllSubtypes().contains(sub);
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * hu.bme.mit.viatra.core.IModelElement#isSubtypeOf(hu.bme.mit.viatra.core
+	 * .IModelElement)
+	 */
+	public boolean isSubtypeOf(IModelElement type) {
+		if (type==null) return false;
+		try {
+			modelSpace.lock.readLock().lock();
+			if (type == this)
+				return false; //TODO: ask Dani
+			return type.isSupertypeOf(this);
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * hu.bme.mit.viatra.core.IModelElement#isTypeOf(hu.bme.mit.viatra.core.
+	 * IModelElement)
+	 */
+	public boolean isTypeOf(IModelElement inst) {
+		if (inst==null) return false;
+		try {
+			modelSpace.lock.readLock().lock();
+			return inst.isInstanceOf(this);
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/*
+	 * corrected.
+	 * (non-Javadoc)
+	 * @see org.eclipse.viatra2.core.IModelElement#isDirectTypeOf(org.eclipse.viatra2.core.IModelElement)
+	 */
+	public boolean isDirectTypeOf(IModelElement inst) {
+		if (inst==null) return false;
+		try {
+			modelSpace.lock.readLock().lock();
+			return getInstances().contains(inst);
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/*
+	 * corrected.
+	 * (non-Javadoc)
+	 * @see org.eclipse.viatra2.core.IModelElement#isDirectSubtypeOf(org.eclipse.viatra2.core.IModelElement)
+	 */
+	public boolean isDirectSubtypeOf(IModelElement sup) {
+		if (sup==null) return false;
+		try {
+			modelSpace.lock.readLock().lock();
+			if (sup == this)
+				return true;
+			return getSupertypes().contains(sup);
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/*
+	 * Corrected.
+	 * (non-Javadoc)
+	 * @see org.eclipse.viatra2.core.IModelElement#isDirectSupertypeOf(org.eclipse.viatra2.core.IModelElement)
+	 */
+	public boolean isDirectSupertypeOf(IModelElement sub) {
+		return sub.isDirectSubtypeOf(this);
+	}
+
+	/*
+	 * Corrected.
+	 * (non-Javadoc)
+	 * @see org.eclipse.viatra2.core.IModelElement#isDirectInstanceOf(org.eclipse.viatra2.core.IModelElement)
+	 */
+	public boolean isDirectInstanceOf(IModelElement type) {
+		return type.isDirectTypeOf(this);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see hu.bme.mit.viatra.core.IModelElement#getViewInfo()
+	 */
+	public String getViewInfo() {
+		try {
+			// modelSpace.lock.lock();

+			return viewInfo;
+		} finally {
+			// modelSpace.lock.unlock();

+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see hu.bme.mit.viatra.core.IModelElement#getModelSpace()
+	 */
+	public IModelSpace getModelSpace() {
+		try {
+			// modelSpace.lock.lock();

+			return modelSpace;
+		} finally {
+			// modelSpace.lock.unlock();

+		}
+	}
+
+	/**
+	 * Gets all connections (relations and functions) of the Entity.
+	 * 
+	 * @return Set of connections.
+	 */
+	/*
+	 * public Collection<IRelation> getConnections() { try {
+	 * modelSpace.lock.lock(); TreeSet<IRelation> retSet = new
+	 * TreeSet<IRelation>(); retSet.addAll(relationsFrom.values());
+	 * retSet.addAll(relationsTo); return retSet; } finally {
+	 * modelSpace.lock.unlock(); } }
+	 */
+
+	/**
+	 * Returns the first connection for a given name
+	 * 
+	 * @param n
+	 *            then name of the connection
+	 * @return The coresponding relation
+	 */
+	/*
+	 * public IRelation getConnectionByName(String n) { try {
+	 * modelSpace.lock.lock(); return (IRelation)
+	 * getElemByName(getConnections(), n); } finally { modelSpace.lock.unlock();
+	 * } }
+	 */
+	/**
+	 * Returns the first connection for a given name
+	 * 
+	 * @param n
+	 *            then name of the connection
+	 * @return The coresponding relation
+	 */
+	/*
+	 * public IRelation getConnectionFromByName(String n) { try {
+	 * modelSpace.lock.lock(); IModelElement me =
+	 * getElementInNamespaceByName(n); if (me == null) return null; if (me
+	 * instanceof IRelation) return (IRelation) me; return null; } finally {
+	 * modelSpace.lock.unlock(); } }
+	 */
+	/**
+	 * Returns the first connection for a given type
+	 * 
+	 * @param n
+	 *            then name of the connection
+	 * @return The coresponding relation
+	 */
+	/*
+	 * public IRelation getConnectionByType(IModelElement n) { try {
+	 * modelSpace.lock.lock(); return (IRelation)
+	 * getElemByType(getConnections(), n); } finally { modelSpace.lock.unlock();
+	 * } }
+	 * 
+	 * public IRelation getConnectionFromByType(IRelation n) { try {
+	 * modelSpace.lock.lock(); return (IRelation)
+	 * getElemByType(getConnectionsFrom(), n); } finally {
+	 * modelSpace.lock.unlock(); } }
+	 * 
+	 * public IRelation getConnectionToByType(IModelElement n) { try {
+	 * modelSpace.lock.lock(); return (IRelation)
+	 * getElemByType(getConnectionsTo(), n); } finally {
+	 * modelSpace.lock.unlock(); } }
+	 */
+	public Collection<IRelation> getAllRelationFromByType(IRelation n) {
+		try {
+			// modelSpace.lock.lock();

+			// return getAllElemByType(getConnectionsFrom(), n);

+			return getAllElemByType(getRelationsFrom(), n);
+		} finally {
+			// modelSpace.lock.unlock();

+		}
+	}
+
+	public Collection<IRelation> getAllRelationToByType(IRelation n) {
+//		try {
+			// modelSpace.lock.lock();

+			// return getAllElemByType(getConnectionsTo(), n);

+			return getAllElemByType(getRelationsTo(), n);
+//		} finally {
+			// modelSpace.lock.unlock();

+//		}
+	}
+
+	public Collection<IRelation> getRelationsTo() {
+		try {
+			modelSpace.lock.readLock().lock();
+			return relationsTo;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	public Collection<IRelation> getRelationsFrom() {
+		try {
+			modelSpace.lock.readLock().lock();
+			return relationsFrom.values();
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	public IRelation getRelationToByType(IModelElement type) {
+		return (IRelation) getElemByType(relationsTo, type);
+	}
+
+	public IRelation getRelationFromByType(IModelElement type) {
+		return (IRelation) getElemByType(relationsFrom.values(), type);
+	}
+
+	public IRelation getRelationToByName(String name) {
+		return (IRelation) getElemByName(relationsTo, name);
+	}
+
+	public IRelation getRelationFromByName(String name) {
+		return (IRelation) getElemByName(relationsFrom.values(), name);
+	}
+
+	private IModelElement getElemByName(Collection<? extends IModelElement> elems, String name) {
+		try {
+			modelSpace.lock.readLock().lock();
+			Iterator<? extends IModelElement> it = elems.iterator();
+			while (it.hasNext()) {
+				IModelElement rel = it.next();
+				if (rel.getName().equals(name))
+					return rel;
+			}
+			return null;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	private IModelElement getElemByType(Collection<? extends IModelElement> elems, IModelElement type) {
+		try {
+			modelSpace.lock.readLock().lock();
+
+			// TODO mi a konkret szemantikja?

+			Iterator<? extends IModelElement> it = elems.iterator();
+			while (it.hasNext()) {
+				IModelElement rel = it.next();
+				if (rel.getAllTypes().contains(type))
+					return rel;
+			}
+			return null;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+
+	}
+
+	private Collection<IRelation> getAllElemByType(Collection<? extends IModelElement> elems,
+			IModelElement type) {
+		try {
+			modelSpace.lock.readLock().lock();
+
+			Iterator<? extends IModelElement> it = elems.iterator();
+			ArrayList<IRelation> ret = new ArrayList<IRelation>();
+			while (it.hasNext()) {
+				IRelation rel = (IRelation) it.next();
+				if (rel.getAllTypes().contains(type))
+					ret.add(rel);
+			}
+			return ret;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+
+	}
+
+	/**
+	 * Returns the first connection source which is connected via a relation of
+	 * the specified type.
+	 * 
+	 * @param type
+	 *            The relation type.
+	 * @return the first appropriate connection if found, null otherwise.
+	 */
+	public IModelElement getRelationSourceByType(IRelation type) {
+		try {
+			modelSpace.lock.readLock().lock();
+
+			IRelation conn = getRelationToByType(type);
+			if (conn == null)
+				return null;
+			else
+				return conn.getFrom();
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+
+	}
+
+	/**
+	 * Returns all connection source which is conected via a relation with the
+	 * specified type
+	 * 
+	 * @param type
+	 *            the relation type
+	 * @return set of appropriate entities.
+	 */
+	public Collection<IModelElement> getAllRelationSourceByType(IRelation type) {
+		try {
+			modelSpace.lock.readLock().lock();
+			Collection<IRelation> conns = getAllRelationToByType(type);
+			ArrayList<IModelElement> ret = new ArrayList<IModelElement>();
+			Iterator<IRelation> it = conns.iterator();
+			while (it.hasNext()) {
+				ret.add(it.next().getFrom());
+			}
+			return ret;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/**
+	 * Returns all relations associated with this entity
+	 * 
+	 * @return collection of relations
+	 */
+	public Collection<IRelation> getRelations() {
+		try {
+			modelSpace.lock.readLock().lock();
+			TreeSet<IRelation> retSet = new TreeSet<IRelation>();
+			retSet.addAll(relationsFrom.values());
+			retSet.addAll(relationsTo);
+			return retSet;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/*
+	 * public Collection<IRelation> getConnectionsTo() { TreeSet<IRelation>
+	 * retSet = new TreeSet<IRelation>(); retSet.addAll(relationsTo); return
+	 * retSet; }
+	 * 
+	 * public Collection<IRelation> getConnectionsFrom() { TreeSet<IRelation>
+	 * retSet = new TreeSet<IRelation>(); retSet.addAll(relationsFrom.values());
+	 * return retSet; }
+	 */
+	/**
+	 * Returns the first relation for a given name
+	 * 
+	 * @param n
+	 *            then name of the relation
+	 * @return The coresponding relation
+	 */
+	public IRelation getRelationByName(String n) {
+		return (IRelation) getElemByName(getRelations(), n);
+	}
+
+	/**
+	 * Returns the first relation for a given type
+	 * 
+	 * @param n
+	 *            the type of the relation
+	 * @return The coresponding relation
+	 */
+	public IRelation getRelationByType(IModelElement n) {
+		return (IRelation) getElemByType(getRelations(), n);
+	}
+
+	/**
+	 * Get the target of the Relation typed type.
+	 */
+	public IModelElement getRelationTargetByType(IRelation type) {
+		IRelation conn = getRelationFromByType(type);
+		if (conn == null)
+			return null;
+		else
+			return conn.getTo();
+	}
+
+	/**
+	 * Returns all connection target which is conected via a relation with the
+	 * specified type
+	 * 
+	 * @param type
+	 *            the relation type
+	 * @return set of appropriate entities.
+	 */
+	public Collection<IModelElement> getAllRelationTargetByType(IRelation type) {
+		try {
+			modelSpace.lock.readLock().lock();
+			Collection<IRelation> conns = getAllRelationFromByType(type);
+			ArrayList<IModelElement> ret = new ArrayList<IModelElement>();
+			Iterator<IRelation> it = conns.iterator();
+			while (it.hasNext()) {
+				ret.add(it.next().getTo());
+			}
+			return ret;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	abstract public String getFullyQualifiedName();
+
+	public IModelElement getElementInNamespaceByName(String name) {
+		try {
+			modelSpace.lock.readLock().lock();
+			Long id = namespace.get(name);
+			if (id != null) {
+				IModelElement me = relationsFrom.get(id);
+				if (me == null) {
+					if (this instanceof SimpleEntity)
+						me = ((SimpleEntity) this).containment
+								.get(id);
+				}
+				if (me == null)
+					// inkonzisztens a namespace, es a tartalmazasi cucc.

+					throw new VPMCoreInternalRuntimeException();
+				return me;
+			} else {
+				return null;
+			}
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	public Collection<IModelElement> getElementsInNamespace() {
+		try {
+			modelSpace.lock.readLock().lock();
+			int size = relationsFrom.size();
+			if (this instanceof IEntity) {
+				size += ((SimpleEntity) this).containment.size();
+			}
+			List<IModelElement> ret = new ArrayList<IModelElement>(size);
+			for (Iterator<Long> it = namespace.values().iterator(); it.hasNext();) {
+				Long id = it.next();
+				IModelElement me = relationsFrom.get(id);
+				if (me == null) {
+					if (this instanceof SimpleEntity)
+						me = ((SimpleEntity) this).containment
+								.get(id);
+				}
+				if (me == null)
+					// inkonzisztens a namespace, es a tartalmazasi cucc.

+					throw new VPMCoreInternalRuntimeException();
+				ret.add(me);
+			}
+			return ret;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	public Collection<IModelElement> getAllElementsInNamespace() {
+		try {
+			modelSpace.lock.readLock().lock();
+			ArrayList<IModelElement> ret = new ArrayList<IModelElement>();
+			ret.addAll(getElementsInNamespace());
+			for (IModelElement elem : getElementsInNamespace()) {
+				ret.addAll(elem.getAllElementsInNamespace());
+			}
+			return ret;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	protected boolean isDeleted = false;
+
+	public boolean isDeleted() {
+		try {
+			// modelSpace.lock.lock();

+			return isDeleted;
+		} finally {
+			// modelSpace.lock.unlock();

+		}
+	}
+
+	public boolean isBelowNamespace(IModelElement grandpa) {
+		if (grandpa==null) {
+			//throw new VPMCoreNullParameterException("parameter grandpa cannot be null!");
+			modelSpace.framework.getLogger().warning("isBelowNamespace has been queried with a null parameter!");
+			return false;
+		}
+		IModelElement namespce = getNamespace();
+		if (namespce == null)
+			return false;
+		if (namespce.equals(grandpa))
+//		if (grandpa.equals(namespce))
+			return true;
+		else
+			return namespce.isBelowNamespace(grandpa);
+	}
+
+	public Collection<IModelElement> getElementsInRelation(
+			EConstraint relationType) {
+		// TODO Auto-generated method stub

+		return null;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleModelManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleModelManager.java
new file mode 100644
index 0000000..36210bf
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleModelManager.java
@@ -0,0 +1,1963 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.concurrent.locks.ReadWriteLock;
+
+import org.eclipse.viatra2.copier.ModelCopy;
+import org.eclipse.viatra2.copier.ModelCopyException;
+import org.eclipse.viatra2.core.EDeleteSemantics;
+import org.eclipse.viatra2.core.EModelElementProperty;
+import org.eclipse.viatra2.core.EMultiplicityKind;
+import org.eclipse.viatra2.core.ICoreNotificationListener;
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;
+import org.eclipse.viatra2.core.simple.notification.NotificationObject;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectAtomicStepReady;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectCreateEntity;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectCreateInstanceOf;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectCreateRelation;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectCreateSupertypeOf;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectDeleteContainment;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectDeleteEntity;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectDeleteInstanceOf;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectDeleteRelation;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectDeleteSupertypeOf;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectMoreAtomicsToOneAtomEnd;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectMoreAtomicsToOneAtomStart;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectMoveTo;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectSetIsAny;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectSetIsFinalType;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectSetName;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectSetRelationFrom;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectSetRelationInverse;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectSetRelationIsAggregation;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectSetRelationMultiplicity;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectSetRelationTo;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectSetValue;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectSetViewInfo;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.errors.VPMCoreNullParameterException;
+import org.eclipse.viatra2.errors.VPMCoreRuntimeException;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.logger.Logger;
+
+/**
+ * Class that manages the SimpleCore modelSpace.
+ *
+ * @author Andras Schmidt, Istvan Rath
+ *
+ */
+public class SimpleModelManager implements IModelManager {
+	private SimpleModelSpace modelSpace;
+
+	private SimpleNotificationManager nManager;
+
+	private Logger logger;
+
+	/**
+	 * The lock that must be locked when reading or updating the model
+	 */
+	private ReadWriteLock lock = null;
+
+	// public static final String topEntityName="vpm.entity";

+	// public static final String topRelationName="vpm.entity.relation";

+	// public static final String topFunctionName="vpm.entity.function";

+	// / Exception messages

+	public static final String EXCEPTION_TYPE_BETWEEN_DIFFERENT_ELEMENTS = "type between different elements cannot be added: ";
+
+	public static final String EXCEPTION_INSTANCE_BETWEEN_DIFFERENT_ELEMENTS = "instance between different elements cannot be added: ";
+
+	public static final String EXCEPTION_ALREADY_SUPERTYPE = "new supertype: already supertype (may be recursive): ";
+
+	public static final String EXCEPTION_ALREADY_INSTANCE = "new instanceof: already instance (may be recursive): ";
+
+	public static final String EXCEPTION_NEW_SUPERTYPE_CAUSES_CIRCLE = "new supertype: relation would cause circle: ";
+
+	public static final String EXCEPTION_DELETE_SUPERTYPE_EDITOR_NO_RELATION = "deleteSupetypeOf(editor semantics): no direct supertypeOf relation is found: ";
+
+	public static final String EXCEPTION_DELETE_INSTANCEOF_NO_RELATION = "deleteInstanceOf(editor semantics): no direct instanceOf relation is found: ";
+
+	public static final String EXCEPTION_NEW_SUPERTYPE_MAKES_EXISTING_RELATION_IMPLICIT = "new supertype(editor semantics): relation would cause existing relation implicit: ";
+
+	public static final String EXCEPTION_NEW_INSTANCE_MAKES_EXISTING_RELATION_IMPLICIT = "new instance(editor semantics): relation would cause existing relation implicit: ";
+
+	private static final String parameterNullNotAllowed = "Parameter null not allowed";
+
+	private static final String WARNING_DELETE_NOT_SUPERTYPE = "deleteSupertypeOf(machine semantics): no supertypeof between elements: ";
+
+	/**
+	 * Check the string if it can be the name of an element. The name of an
+	 * element must not contain '.'
+	 *
+	 * @param name
+	 *            the requested name for new element
+	 * @throws VPMCoreException
+	 *             if the name contains '.'
+	 */
+	private void checkElemName(String name) throws VPMCoreException {
+		if (name.indexOf('.') >= 0)
+			throw new VPMCoreException(
+					"Name of element must not contain character dot('.')");
+	}
+
+	/**
+	 * Initializes the model manager.
+	 *
+	 * @param l
+	 *            - the framework logger
+	 * @param m
+	 *            - the owning modelspace
+	 * @throws VPMRuntimeException
+	 */
+	public void init(Logger l, IModelSpace m) throws VPMRuntimeException {
+		modelSpace = (SimpleModelSpace) m;
+		lock = modelSpace.lock;
+		nManager = (SimpleNotificationManager) modelSpace
+				.getNotificationManager();
+		logger = l;
+	}
+
+	/**
+	 * Retrieves the root element of the modelspace.
+	 *
+	 * @return root entity
+	 */
+	public IEntity getRoot() {
+		return modelSpace.rootEntity;
+	}
+
+	/**
+	 * Delete an element and all elements in its namespace
+	 *
+	 * @param root
+	 * @throws VPMCoreException
+	 */
+	private void deleteBranch(IModelElement root) throws VPMCoreException {
+		// Delete all elements in namespace (recursive)

+		while (root.getElementsInNamespace().size() > 0) {
+			IModelElement me = root.getElementsInNamespace().iterator().next();
+			deleteBranch(me);
+			// If the element is a relation then deleting the target element

+			// deletes the relation as well, so at this point the root can be

+			// deleted from model

+			if (root.isDeleted())
+				return;
+		}
+		// delete this element

+		deleteElement(root, EDeleteSemantics.DELETE_SEMANTICS_FORCE);
+	}
+
+	/**
+	 * Deletes the entity from the modelspace according to a specified
+	 * semantics.
+	 *
+	 * @param e
+	 *            entity to be deleted
+	 * @param semantics
+	 *            semantics id
+	 */
+	public void deleteEntity(IEntity e, EDeleteSemantics semantics)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			// checl parameters

+			if (e == null) {
+				throw new VPMCoreNullParameterException(parameterNullNotAllowed);
+			}
+			if (e == modelSpace.ancestorEntity
+					|| e == modelSpace.ancestorContainer) {
+				throw new VPMCoreException(
+						"ancestor entity can not be deleted.");
+			}
+			if (!modelSpace.entitiesSet.contains(e)) {
+				throw new VPMCoreException(
+						"Entity to be deleted not in modelSpace.");
+			}
+			if (EDeleteSemantics.DELETE_SEMANTICS_BRANCH_FORCE == semantics) {
+				deleteBranch(e);
+				return;
+			}
+			if (semantics == EDeleteSemantics.DELETE_SEMANTICS_FORCE) {
+				if (e.equals(getRoot())) {
+					throw new VPMCoreException("Root entity cannot be deleted.");
+				}
+				sendNotification(new NotificationObjectMoreAtomicsToOneAtomStart());
+				// Delete all relations that have this element as source or
+				// target

+				deleteConnections(e, semantics); // moved here by Istvan Rath:
+													// IMPORTANT FOR DSM fw!!!

+				// Delete all instanceof and supertype relations from and to
+				// this element

+				deleteFromTypeHierarchy(e);
+				IEntity parent = e.getParent();
+				// Remove the element from its container: now it has no parent

+				deleteFromContainer(e);
+				// Move all contained entities to the root

+				deleteFromContainerHierarchy(e);
+				// notify the change

+				NotificationObject note = new NotificationObjectDeleteEntity(
+						(SimpleEntity) e, (SimpleEntity) parent);
+				// remove the object from the model

+				modelSpace.entities
+						.remove(((SimpleModelElement) e).getLongID());
+				modelSpace.entitiesSet.remove(e);
+				// set the element deleted

+				((SimpleEntity) e).isDeleted = true;
+				sendNotification(note);
+				sendNotification(new NotificationObjectMoreAtomicsToOneAtomEnd());
+				sendNotification(new NotificationObjectAtomicStepReady());
+				return;
+			}
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * Deletes a relation (or function) from the modelspace.
+	 *
+	 * @param r
+	 *            the relation to be deleted.
+	 * @throws VPMCoreNullParameterException
+	 */
+	public void deleteRelation(IRelation r, EDeleteSemantics semantics)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			if (r == null)
+				throw new VPMCoreNullParameterException(parameterNullNotAllowed);
+			if (r == modelSpace.ancestorRelation)
+				throw new VPMCoreException(
+						"ancestor relation can not be deleted");
+			_deleteRelation(r, semantics);
+			return;
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	private void _deleteRelation(IRelation r, EDeleteSemantics semantics)
+			throws VPMCoreException {
+		if (EDeleteSemantics.DELETE_SEMANTICS_BRANCH_FORCE == (semantics)) {
+			deleteBranch(r);
+			return;
+		}
+		if (semantics == (EDeleteSemantics.DELETE_SEMANTICS_FORCE)) {
+			SimpleRelation rel = (SimpleRelation) r;
+			sendNotification(new NotificationObjectMoreAtomicsToOneAtomStart());
+			// delete all type and subtype relations

+			deleteFromTypeHierarchy(rel);
+			NotificationObject note;
+			note = new NotificationObjectDeleteRelation(rel,
+					(SimpleModelElement) rel.getFrom(),
+					(SimpleModelElement) rel.getTo());
+			setRelFrom(rel, null);
+			setRelTo(rel, null);
+			// delete all relations from and to this element

+			deleteConnections(rel, semantics);
+			// remove the relation from model

+			modelSpace.relations.remove(rel.getLongID());
+			modelSpace.relationsSet.remove(rel);
+			rel.isDeleted = true;
+			sendNotification(note);
+			sendNotification(new NotificationObjectMoreAtomicsToOneAtomEnd());
+			sendNotification(new NotificationObjectAtomicStepReady());
+			return;
+		}
+		throw new VPMCoreRuntimeException("No semantics defined for delete");
+	}
+
+	/**
+	 * Delete all instanceOf and supertypeOf links from this element
+	 *
+	 * @param _me
+	 */
+	private void deleteFromTypeHierarchy(IModelElement _me)
+			throws VPMCoreException {
+		SimpleModelElement me = (SimpleModelElement) _me;
+		ArrayList<IModelElement> l = new ArrayList<IModelElement>(me.supertype);
+		for (int i = 0; i < l.size(); ++i) {
+			deleteSupertypeOfDirect((SimpleModelElement) l.get(i), me);
+		}
+		l = new ArrayList<IModelElement>(me.subtypes);
+		for (int i = 0; i < l.size(); ++i) {
+			deleteSupertypeOfDirect(me, (SimpleModelElement) l.get(i));
+		}
+
+		l = new ArrayList<IModelElement>(me.type);
+		for (int i = 0; i < l.size(); ++i) {
+			deleteInstanceOfDirect((SimpleModelElement) l.get(i), me);
+		}
+		l = new ArrayList<IModelElement>(me.instances);
+		for (int i = 0; i < l.size(); ++i) {
+			deleteInstanceOfDirect(me, (SimpleModelElement) l.get(i));
+		}
+	}
+
+	private void deleteFromContainer(IEntity _me)
+			throws VPMCoreNullParameterException, VPMCoreException {
+		SimpleEntity me = (SimpleEntity) _me;
+		SimpleEntity par = me.parent;
+		par.containment.remove(me.getLongID());
+		removeFromNamespace(par, _me);
+		me.parent = null;
+		NotificationObject note = new NotificationObjectDeleteContainment(par,
+				me);
+		sendNotification(note);
+	}
+
+	private void deleteFromContainerHierarchy(IEntity _me)
+			throws VPMCoreNullParameterException, VPMCoreException {
+		SimpleEntity ent = (SimpleEntity) _me;
+		ArrayList<IModelElement> children = new ArrayList<IModelElement>(
+				ent.containment.values());
+		for (int i = 0; i < children.size(); ++i) {
+			SimpleEntity child = (SimpleEntity) children.get(i);
+			moveEntityTo(child, getRoot());
+		}
+	}
+
+	private void deleteConnections(IModelElement _ent,
+			EDeleteSemantics semantics) {
+		SimpleModelElement ent = (SimpleModelElement) _ent;
+		// Iterator it=ent.getConnections().iterator();

+		Iterator it = ent.getRelations().iterator();
+		// TODO Self connections must be contained only once in the collection.

+		// So the collection is a Set

+		while (it.hasNext()) {
+			SimpleRelation r = (SimpleRelation) it.next();
+			try {
+				// TODO elvileg nem lehet exception

+				deleteRelation(r, semantics);
+			} catch (VPMCoreException e) {
+			}
+		}
+	}
+
+	/**
+	 * Retrives the model element by its name
+	 *
+	 * @param n
+	 *            the fully qualified model element name
+	 * @return element if found, else null
+	 */
+	public IModelElement getElementByName(String n) {
+		try {
+			lock.readLock().lock();
+			IModelElement weAreHere = getRoot();
+			while (n != null && !n.equals("") && weAreHere != null) {
+				int k;
+				int l = n.indexOf('.');
+				k = l + 1;
+				if (l == -1) {
+					l = n.length();
+					k = l;
+				}
+				String name = n.substring(0, l);
+				weAreHere = weAreHere.getElementInNamespaceByName(name);
+				n = n.substring(k);
+			}
+			return weAreHere;
+		} finally {
+			lock.readLock().unlock();
+		}
+	}
+
+	/**
+	 * Retrieves an entity by its name
+	 *
+	 * @param n
+	 *            fully qualified name of entity
+	 * @return entity if found, else null
+	 */
+	public IEntity getEntityByName(String n) {
+		IModelElement me = getElementByName(n);
+		if (me instanceof IEntity) {
+			return (IEntity) me;
+		} else {
+			return null;
+		}
+	}
+
+	/**
+	 * Retrieves a relation by its name
+	 *
+	 * @param n
+	 *            fully qualified name of relation
+	 * @return relation if found, else null
+	 */
+	public IRelation getRelationByName(String n) {
+		IModelElement me = getElementByName(n);
+		if (me instanceof IRelation) {
+			return (IRelation) me;
+		}
+		return null;
+	}
+
+	/**
+	 * Retrives the model element by its ID
+	 *
+	 * @param n
+	 *            model element ID
+	 * @return element if found, else null
+	 */
+	public IModelElement getElementByID(String n) {
+		if (n == null)
+			return null; // added by Istvan Rath.

+		try {
+			lock.readLock().lock();
+			long reqID = 0;
+			try {
+				reqID = Long.parseLong(n);
+			} catch (NumberFormatException e) {
+				// if the string represents no number, then it is no ID of any
+				// elements in modelspace

+				return null;
+			}
+			if (!n.equals(Long.toString(reqID)))
+				return null;
+			IModelElement ret = modelSpace.entities.get(reqID);
+			if (ret == null)
+				ret = modelSpace.relations.get(reqID);
+			return ret;
+		} finally {
+			lock.readLock().unlock();
+		}
+	}
+
+	/**
+	 * Retrieves an entity by its ID
+	 *
+	 * @param n
+	 *            ID of entity
+	 * @return entity if found, else null
+	 */
+	public IEntity getEntityByID(String n) {
+		IModelElement ret = getElementByID(n);
+		if (ret instanceof IEntity)
+			return (IEntity) ret;
+		return null;
+	}
+
+	/**
+	 * Retrieves a relation by its ID
+	 *
+	 * @param n
+	 *            ID of relation
+	 * @return relation if found, else null
+	 */
+	public IRelation getRelationByID(String n) {
+		IModelElement ret = getElementByID(n);
+		if (ret instanceof IRelation)
+			return (IRelation) ret;
+		return null;
+	}
+
+	/**
+	 * Retrives all entities currently in the modelspace.
+	 *
+	 * @return collection of entities
+	 */
+	public Set<? extends IEntity> getEntities() {
+		try {
+			lock.readLock().lock();
+			// return new ConstantSet<IEntity>(modelSpace.entitiesSet);

+			return modelSpace.entitiesSet;
+		} finally {
+			lock.readLock().unlock();
+		}
+	}
+
+	/**
+	 * Retrieves all relations currently in the modelspace.
+	 *
+	 * @return collection of relations
+	 */
+	public Set<? extends IRelation> getRelations() {
+		try {
+			lock.readLock().lock();
+			// return new ConstantSet<IRelation>(modelSpace.relationsSet);

+			return modelSpace.relationsSet;
+		} finally {
+			lock.readLock().unlock();
+		}
+	}
+
+	private void setElemName(SimpleModelElement ent, String name) {
+		ent.name = name;
+	}
+
+	private void setRelFrom(SimpleRelation rel, SimpleModelElement from)
+			throws VPMCoreException {
+		SimpleModelElement oldRelFrom = (SimpleModelElement) rel.getFrom();
+		if (oldRelFrom != null) {
+			oldRelFrom.relationsFrom.remove(rel.getLongID());
+			removeFromNamespace(rel.from, rel);
+		}
+		rel.from = from;
+		if (from != null) {
+			from.relationsFrom.put(rel.getLongID(), rel);
+			addToNamespace(from, rel);
+		}
+	}
+
+	private void setRelTo(SimpleRelation rel, SimpleModelElement to) {
+		SimpleModelElement oldRelTo = (SimpleModelElement) rel.getTo();
+		if (oldRelTo != null) {
+			oldRelTo.relationsTo.remove(rel);
+		}
+		rel.to = to;
+		if (to != null) {
+			to.relationsTo.add(rel);
+		}
+	}
+
+	private SimpleRelation createRelation(IModelElement from, IModelElement to,
+			String name) throws VPMCoreException {
+		checkElemName(name);
+		sendNotification(new NotificationObjectMoreAtomicsToOneAtomStart());
+		SimpleRelation newRel = new SimpleRelation(modelSpace.newId(),
+				modelSpace);
+		modelSpace.relations.put(newRel.getLongID(), newRel);
+		modelSpace.relationsSet.add(newRel);
+		setElemName(newRel, name);
+		setRelFrom(newRel, (SimpleModelElement) from);
+		setRelTo(newRel, (SimpleModelElement) to);
+		NotificationObject note = new NotificationObjectCreateRelation(newRel,
+				(SimpleModelElement) from, (SimpleModelElement) to);
+		sendNotification(note);
+		sendNotification(new NotificationObjectMoreAtomicsToOneAtomEnd());
+		return newRel;
+	}
+
+	// protected SimpleRelation undoCreateRelation(SimpleRelation rel,
+	// SimpleEntity from, SimpleEntity to) throws VPMCoreException

+	protected SimpleRelation undoCreateRelation(SimpleRelation rel,
+			SimpleModelElement from, SimpleModelElement to)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			modelSpace.relations.put(rel.getLongID(), rel);
+			modelSpace.relationsSet.add(rel);
+			setRelFrom(rel, from);
+			setRelTo(rel, to);
+			rel.isDeleted = false;
+			NotificationObject note = new NotificationObjectCreateRelation(rel,
+					from, to);
+			sendNotification(note);
+			return rel;
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * Creates a new entity in modelSpace
+	 *
+	 * @param container
+	 *            the entity's initial container
+	 * @param name
+	 *            the entity's initial name
+	 * @param value
+	 *            the entity's initial value
+	 * @return the entity
+	 * @throws VPMCoreException
+	 */
+	private SimpleEntity createEntity(SimpleEntity container, String name,
+			String value) throws VPMCoreException {
+		checkElemName(name);
+		sendNotification(new NotificationObjectMoreAtomicsToOneAtomStart());
+
+		SimpleEntity newEnt = new SimpleEntity(modelSpace.newId(), modelSpace);
+		modelSpace.entities.put(newEnt.getLongID(), newEnt);
+		modelSpace.entitiesSet.add(newEnt);
+		setElemName(newEnt, name);
+		newEnt.value = value;
+		firstContainment(container, newEnt);
+		NotificationObject notification = new NotificationObjectCreateEntity(
+				newEnt, container);
+		sendNotification(notification);
+		sendNotification(new NotificationObjectMoreAtomicsToOneAtomEnd());
+		return newEnt;
+	}
+
+	/**
+	 * Put me into container.
+	 *
+	 * @param container
+	 *            the container
+	 * @param me
+	 *            the modelelement to put into container
+	 */
+	protected void undoCreateContainment(SimpleEntity container, SimpleEntity me)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			container.containment.put(me.getLongID(), me);
+			me.parent = container;
+			// following added by Istvan Rath

+			addToNamespace(container, me);
+			NotificationObject note = new NotificationObjectMoveTo(me,
+					container, (SimpleEntity) me.getParent());
+			sendNotification(note);
+			// end added by Istvan Rath

+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * Put an entity into modelspace when undo.
+	 *
+	 * @param entity
+	 *            the entity to put back into modelSpace
+	 * @return the entity
+	 */
+	protected SimpleEntity undoCreateEntity(SimpleEntity entity,
+			SimpleEntity parent) throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			entity.notificationListeners = new ArrayList<ICoreNotificationListener>();
+			modelSpace.entities.put(entity.getLongID(), entity);
+			modelSpace.entitiesSet.add(entity);
+			entity.isDeleted = false;
+			NotificationObject notification = new NotificationObjectCreateEntity(
+					entity, parent);
+			sendNotification(notification);
+			return entity;
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * Creates a new entity with a random and unique name in the modelspace root
+	 *
+	 * @return reference to the entity
+	 * @throws VPMCoreException
+	 */
+	public IEntity newEntity() {
+		try {
+			return newEntity(modelSpace.uniqueName(), "", getRoot());
+		} catch (VPMCoreException e) {
+			return null;
+		}
+	}
+
+	/**
+	 * Creates a new entity with a random and unique name in the specified
+	 * container
+	 *
+	 * @param container
+	 *            the container
+	 * @return reference to the entity
+	 * @throws VPMCoreException
+	 * @throws VPMCoreException
+	 */
+	public IEntity newEntity(IEntity container) throws VPMCoreException {
+		return newEntity(modelSpace.uniqueName(), "", container);
+	}
+
+	/**
+	 * Creates a new entity with the given name in the modelspace root
+	 *
+	 * @param name
+	 *            the name of the entity
+	 * @return reference to the entity
+	 * @throws VPMCoreException
+	 */
+	public IEntity newEntity(String name) throws VPMCoreException {
+		return newEntity(name, "", getRoot());
+	}
+
+	/**
+	 * Creates a new entity with the given name and container
+	 *
+	 * @param name
+	 *            the name of the entity
+	 * @param container
+	 *            the container
+	 * @return reference to the entity
+	 * @throws VPMCoreException
+	 * @throws VPMCoreException
+	 */
+	public IEntity newEntity(String name, IEntity container)
+			throws VPMCoreException {
+		return newEntity(name, "", container);
+	}
+
+	/**
+	 * Creates a new entity with the given name and value in the modelspace root
+	 *
+	 * @param name
+	 *            the name of the entity
+	 * @param value
+	 *            the value of the entity
+	 * @return reference to the entity
+	 * @throws VPMCoreException
+	 */
+	public IEntity newEntity(String name, String value) throws VPMCoreException {
+		return newEntity(name, value, getRoot());
+	}
+
+	/**
+	 * Creates a new entity with the given name, value and container
+	 *
+	 * @param name
+	 *            the name of the entity
+	 * @param value
+	 *            the value of the entity
+	 * @param container
+	 *            the container
+	 * @return reference to the entity
+	 * @throws VPMCoreException
+	 */
+	public IEntity newEntity(String name, String value, IEntity container)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			if (name == null || container == null || value == null) {
+				throw new VPMCoreNullParameterException(parameterNullNotAllowed);
+			}
+			SimpleEntity newEnt = createEntity((SimpleEntity) container, name,
+					value);
+			sendNotification(new NotificationObjectAtomicStepReady());
+			return newEnt;
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * Creates a new entity with the given name, value container and a single type.
+	 * Each of the parameters can be left null.
+	 *
+	 * @param name
+	 *            the name of the entity
+	 * @param value
+	 *            the value of the entity
+	 * @param container
+	 *            the container
+	 * @param type
+	 *            the single initial type of the entity
+	 * @return reference to the entity
+	 * @throws VPMCoreException
+	 */
+	public IEntity newEntity(String name, String value, IEntity container, IEntity type)
+			throws VPMCoreException
+	{
+		try {
+			lock.writeLock().lock();
+			if (name==null) name = modelSpace.uniqueName();
+			if (value==null) value = "";
+			if (container==null) container = getRoot();
+			IEntity newEnt = newEntity(name, value, container);
+			if (type != null) newInstanceOf(type, newEnt);
+			return newEnt;
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * Creates a new relation with a random and unique name, between the given model elements.
+	 *
+	 * @param from
+	 *            source entity
+	 * @param to
+	 *            target entity
+	 * @return reference to the new relation
+	 * @throws VPMCoreException
+	 */
+	public IRelation newRelation(IModelElement from, IModelElement to)
+			throws VPMCoreException {
+		return newRelation(modelSpace.uniqueName(), from, to);
+	}
+
+	public IRelation newRelation(IModelElement from, IModelElement to,
+			EMultiplicityKind multiplicity, boolean isaggregation,
+			IRelation inverse) throws VPMCoreException {
+		return newRelation(modelSpace.uniqueName(), from, to, multiplicity,
+				isaggregation, inverse);
+	}
+
+	public IRelation newRelation(String name, IModelElement from,
+			IModelElement to, EMultiplicityKind multiplicity,
+			boolean isaggregation, IRelation inverse) throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			if (from == null || to == null) {
+				throw new VPMCoreNullParameterException(parameterNullNotAllowed);
+			}
+			SimpleRelation newRel = createRelation(from, to, name);
+			newRel.multiplicity = multiplicity;
+			newRel.inverse = inverse;
+			newRel.isAggregation = isaggregation;
+			sendNotification(new NotificationObjectAtomicStepReady());
+			return newRel;
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * Creates a new relation with the given name, between the given model elements.
+	 *
+	 * @param name
+	 *            name of relation
+	 * @param from
+	 *            source entity
+	 * @param to
+	 *            target entity
+	 * @return reference to the new relation
+	 * @throws VPMCoreException
+	 */
+	public IRelation newRelation(String name, IModelElement from,
+			IModelElement to) throws VPMCoreException {
+		return newRelation(name, from, to, EMultiplicityKind.MANY_TO_MANY,
+				false, null);
+	}
+
+	/**
+	 * Creates a new relation with the given name, between the given model elements, with the given single type.
+	 * Name and type can be left null.
+	 *
+	 * @param name
+	 *            name of relation
+	 * @param from
+	 *            source entity
+	 * @param to
+	 *            target entity
+	 * @param type
+	 *            the single initial type of the relation
+	 * @return reference to the new relation
+	 * @throws VPMCoreException
+	 */
+	public IRelation newRelation(String name, IModelElement from,
+			IModelElement to, IRelation type) throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			if (name==null) name = modelSpace.uniqueName();
+			IRelation newRel = newRelation(name, from, to);
+			if (type!=null) newInstanceOf(type, newRel);
+			return newRel;
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * returns the type of modelelement
+	 *
+	 * @param e
+	 * @return 0: entity 1: function 2: relation -1:not modelelement
+	 */
+	int getElementType(IModelElement e) {
+		if (e instanceof IEntity)
+			return 0;
+		if (e instanceof IRelation)
+			return 2;
+		return -1;
+	}
+
+	/**
+	 * Creates an instanceOf relation between the two model elements
+	 *
+	 * @param type
+	 *            the type element
+	 * @param inst
+	 *            the instance
+	 */
+	public void newInstanceOf(IModelElement type, IModelElement inst)
+			throws VPMCoreException {
+		newInstanceOfMachine(type, inst);
+	}
+
+	/**
+	 * Creates a new supertypeOf relation between the two elements
+	 *
+	 * @param sup
+	 *            the supertype
+	 * @param sub
+	 *            the subtype
+	 * @throws VPMCoreNullParameterException
+	 */
+	public void newSupertypeOf(IModelElement sup, IModelElement sub)
+			throws VPMCoreException {
+		newSupertypeOfMachine(sup, sub);
+	}
+
+	/**
+	 * Creates a new supertypeOf relation between the two elements with editor
+	 * semantics: only the minimal requied supertypeOf relations can be exactly
+	 * added
+	 *
+	 * @param sup
+	 *            the supertype
+	 * @param sub
+	 *            the subtype
+	 * @throws VPMCoreNullParameterException
+	 */
+	public void newSupertypeOfEditor(IModelElement sup, IModelElement sub)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			if (sup == null || sub == null) {
+				throw new VPMCoreNullParameterException(parameterNullNotAllowed);
+			}
+			SimpleModelElement _sup = (SimpleModelElement) sup;
+			SimpleModelElement _sub = (SimpleModelElement) sub;
+			if (getElementType(sup) != getElementType(sub))
+				throw new VPMCoreException(
+						EXCEPTION_TYPE_BETWEEN_DIFFERENT_ELEMENTS
+								+ sup.getFullyQualifiedName() + ","
+								+ sub.getFullyQualifiedName());
+			if (_sub.getAllSupertypes().contains(_sup))
+				throw new VPMCoreException(EXCEPTION_ALREADY_SUPERTYPE
+						+ sup.getFullyQualifiedName() + ","
+						+ sub.getFullyQualifiedName());
+			if (_sup.getAllSupertypes().contains(_sub))
+				throw new VPMCoreException(
+						EXCEPTION_NEW_SUPERTYPE_CAUSES_CIRCLE
+								+ sup.getFullyQualifiedName() + ","
+								+ sub.getFullyQualifiedName());
+			if (!CollectionsDisjunktTester.isDisjunct(_sup.getAllSupertypes(),
+					_sub.supertype)
+					|| !CollectionsDisjunktTester.isDisjunct(_sub
+							.getAllSubtypes(), _sup.subtypes))
+				throw new VPMCoreException(
+						EXCEPTION_NEW_SUPERTYPE_MAKES_EXISTING_RELATION_IMPLICIT
+								+ sup.getFullyQualifiedName() + ","
+								+ sub.getFullyQualifiedName());
+			newSupertypeOfDirect(_sup, _sub);
+			sendNotification(new NotificationObjectAtomicStepReady());
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * Creates a new instanceOf relation between the two elements with editor
+	 * semantics: only the minimal requied instanceOf relations can be exactly
+	 * added
+	 *
+	 * @param sup
+	 *            the supertype
+	 * @param inst
+	 *            the subtype
+	 * @throws VPMCoreNullParameterException
+	 */
+	public void newInstanceOfEditor(IModelElement type, IModelElement inst)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			if (type == null || inst == null) {
+				throw new VPMCoreNullParameterException(parameterNullNotAllowed);
+			}
+			SimpleModelElement _type = (SimpleModelElement) type;
+			SimpleModelElement _inst = (SimpleModelElement) inst;
+			if (getElementType(type) != getElementType(inst))
+				throw new VPMCoreException(
+						EXCEPTION_INSTANCE_BETWEEN_DIFFERENT_ELEMENTS
+								+ type.getFullyQualifiedName() + ","
+								+ inst.getFullyQualifiedName());
+			if (_inst.getAllTypes().contains(_type))
+				throw new VPMCoreException(EXCEPTION_ALREADY_INSTANCE
+						+ type.getFullyQualifiedName() + ","
+						+ inst.getFullyQualifiedName());
+			if (!CollectionsDisjunktTester.isDisjunct(_type.getAllSupertypes(),
+					_inst.type))
+				throw new VPMCoreException(
+						EXCEPTION_NEW_INSTANCE_MAKES_EXISTING_RELATION_IMPLICIT
+								+ type.getFullyQualifiedName() + ","
+								+ inst.getFullyQualifiedName());
+			newInstanceOfDirect(_type, _inst);
+			if (inst instanceof IRelation) {
+				checkIsAggregationSemantics((SimpleRelation) inst);
+			}
+			sendNotification(new NotificationObjectAtomicStepReady());
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * Creates a new instanceOf relation between the two elements with machine
+	 * semantics: only the minimal requied instanceOf relations can be exactly
+	 * added
+	 *
+	 * @param sup
+	 *            the supertype
+	 * @param inst
+	 *            the subtype
+	 * @throws VPMCoreNullParameterException
+	 */
+	public void newInstanceOfMachine(IModelElement type, IModelElement inst)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			if (type == null || inst == null) {
+				throw new VPMCoreNullParameterException(parameterNullNotAllowed);
+			}
+			SimpleModelElement _type = (SimpleModelElement) type;
+			SimpleModelElement _inst = (SimpleModelElement) inst;
+			if (getElementType(type) != getElementType(inst))
+				throw new VPMCoreException(
+						EXCEPTION_INSTANCE_BETWEEN_DIFFERENT_ELEMENTS
+								+ type.getFullyQualifiedName() + ","
+								+ inst.getFullyQualifiedName());
+			if (_inst.getAllTypes().contains(_type))
+				return;
+			newInstanceOfDirect(_type, _inst);
+			// Delete direct arcs made implicit

+			Collection col = CollectionsDisjunktTester.sharedElements(_type
+					.getAllSupertypes(), _inst.type);
+			Iterator it = col.iterator();
+			while (it.hasNext()) {
+				SimpleModelElement me = (SimpleModelElement) it.next();
+				deleteInstanceOfDirect(me, _inst);
+			}
+			if (inst instanceof IRelation) {
+				checkIsAggregationSemantics((SimpleRelation) inst);
+			}
+			sendNotification(new NotificationObjectAtomicStepReady());
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * Creates a new supertypeOf relation between the two elements with editor
+	 * semantics: relation will be added if not present already
+	 *
+	 * @param sup
+	 *            the supertype
+	 * @param sub
+	 *            the subtype
+	 * @throws VPMCoreNullParameterException
+	 */
+	public void newSupertypeOfMachine(IModelElement _sup, IModelElement _sub)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			if (_sup == null || _sub == null) {
+				throw new VPMCoreNullParameterException(parameterNullNotAllowed);
+			}
+			SimpleModelElement sup = (SimpleModelElement) _sup;
+			SimpleModelElement sub = (SimpleModelElement) _sub;
+			if (getElementType(sup) != getElementType(sub))
+				throw new VPMCoreException(
+						EXCEPTION_TYPE_BETWEEN_DIFFERENT_ELEMENTS
+								+ sup.getFullyQualifiedName() + ","
+								+ sub.getFullyQualifiedName());
+			if (sup == sub || _sub.getAllSupertypes().contains(_sup)) {
+				// TODO kell-e warning??

+				// log_warn(WARNING_ALREADY_SUPERTYPE,sup, sub);

+				return;
+			}
+			if (_sup.getAllSupertypes().contains(_sub))
+				throw new VPMCoreException(
+						EXCEPTION_NEW_SUPERTYPE_CAUSES_CIRCLE
+								+ sup.getFullyQualifiedName() + ","
+								+ sub.getFullyQualifiedName());
+			// Add this relation

+			newSupertypeOfDirect(sup, sub);
+			// Delete all relations made implicit by this relation

+			Collection madeImplicit = CollectionsDisjunktTester.sharedElements(
+					sub.supertype, sup.getAllSupertypes());
+			Iterator it = madeImplicit.iterator();
+			while (it.hasNext()) {
+				// implicit ancestor of sub

+				SimpleModelElement me = (SimpleModelElement) it.next();
+				deleteSupertypeOfDirect(me, sub);
+			}
+			// Implicits on other side:

+			madeImplicit = CollectionsDisjunktTester.sharedElements(
+					sup.subtypes, sub.getAllSubtypes());
+			it = madeImplicit.iterator();
+			while (it.hasNext()) {
+				// implicit ancestor of sub

+				SimpleModelElement me = (SimpleModelElement) it.next();
+				deleteSupertypeOfDirect(sup, me);
+			}
+
+			// Transaction is ready, modelSpace is in consistent state. Add Undo
+			// point

+			sendNotification(new NotificationObjectAtomicStepReady());
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * Adds a direct supertypeof relation (editor style). No check is done. This
+	 * is the main step of all supertypeof relation mechanisms.
+	 *
+	 * @param sup
+	 * @param sub
+	 */
+	private void newSupertypeOfDirect(SimpleModelElement sup,
+			SimpleModelElement sub) {
+		sup.subtypes.add(sub);
+		sub.supertype.add(sup);
+		NotificationObject note = new NotificationObjectCreateSupertypeOf(sup,
+				sub);
+		/*
+		 * NotificationObject note=new
+		 * NotificationObject(ICoreNotificationObject
+		 * .ACTION_CREATE_SUPERTYPEOF); note.addParameterElem(sup);
+		 * note.addParameterElem(sub);
+		 */
+		sendNotification(note);
+	}
+
+	/**
+	 * Adds a direct instanceof relation (editor style). No check is done. This
+	 * is the main step of all instanceof relation mechanisms.
+	 *
+	 * @param type
+	 * @param inst
+	 */
+	private void newInstanceOfDirect(SimpleModelElement type,
+			SimpleModelElement inst) {
+		type.instances.add(inst);
+		inst.type.add(type);
+		NotificationObject note = new NotificationObjectCreateInstanceOf(type,
+				inst);
+		/*
+		 * NotificationObject note=new
+		 * NotificationObject(ICoreNotificationObject.ACTION_CREATE_INSTANCEOF);
+		 * note.addParameterElem(type); note.addParameterElem(inst);
+		 */
+		sendNotification(note);
+	}
+
+	/**
+	 * Creates a new containment, without notification of name change, if that
+	 * happens. It is used, when creating new element.
+	 *
+	 * @param cont
+	 * @param elem
+	 */
+	private void firstContainment(IEntity cont, IEntity elem)
+			throws VPMCoreException {
+		sendNotification(new NotificationObjectMoreAtomicsToOneAtomStart());
+		_newContainment(cont, elem);
+		sendNotification(new NotificationObjectMoreAtomicsToOneAtomEnd());
+	}
+
+	private void addToNamespace(IModelElement cont, IModelElement elem) {
+		SimpleModelElement e = (SimpleModelElement) elem;
+		SimpleModelElement c = (SimpleModelElement) cont;
+		String nameKey = e.getName();
+		Long id = c.namespace.get(nameKey);
+		if (id == null) {
+			c.namespace.put(e.getName(), e.getLongID());
+		} else {
+			String newName = modelSpace.uniqueName(e.getName());
+			log_warn_nameclash(e, c, newName);
+			e.name = newName;
+			NotificationObject note = new NotificationObjectSetName(e, newName,
+					nameKey);
+			sendNotification(note);
+			addToNamespace(cont, elem);
+		}
+	}
+
+	private void removeFromNamespace(IModelElement cont, IModelElement elem) {
+		((SimpleModelElement) cont).namespace.remove(elem.getName());
+	}
+
+	/**
+	 * Creates a new containment, without sending Atomic_step notification
+	 *
+	 * @param cont
+	 * @param elem
+	 */
+	private void _newContainment(IEntity cont, IEntity elem)
+			throws VPMCoreException {
+		SimpleEntity e = (SimpleEntity) elem;
+		SimpleEntity c = (SimpleEntity) cont;
+		if (e.parent != null)
+			throw new VPMCoreException("core internal error");
+		c.containment.put(e.getLongID(), e);
+		e.parent = c;
+		addToNamespace(cont, elem);
+	}
+
+	/**
+	 * Deletes the instanceOf relation between the two model elements
+	 *
+	 * @param type
+	 *            the type element
+	 * @param inst
+	 *            the instance
+	 * @throws VPMCoreNullParameterException
+	 */
+	public void deleteInstanceOf(IModelElement type, IModelElement inst)
+			throws VPMCoreException {
+		deleteInstanceOfMachine(type, inst);
+	}
+
+	/**
+	 * Deletes the supertypeOf relation between the two elements
+	 *
+	 * @param sup
+	 *            the supertype
+	 * @param sub
+	 *            the subtype
+	 * @throws VPMCoreNullParameterException
+	 */
+	public void deleteSupertypeOf(IModelElement sup, IModelElement sub)
+			throws VPMCoreException {
+		deleteSupertypeOfMachine(sup, sub);
+	}
+
+	public void deleteSupertypeOfEditor(IModelElement sup, IModelElement sub)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			if (sup == null || sub == null)
+				throw new VPMCoreNullParameterException(parameterNullNotAllowed);
+			SimpleModelElement _sup = (SimpleModelElement) sup;
+			SimpleModelElement _sub = (SimpleModelElement) sub;
+			if (_sub.supertype.contains(_sup)) {
+				deleteSupertypeOfDirect(_sup, _sub);
+			} else {
+				throw new VPMCoreException(
+						EXCEPTION_DELETE_SUPERTYPE_EDITOR_NO_RELATION
+								+ sup.getFullyQualifiedName() + ","
+								+ sub.getFullyQualifiedName());
+			}
+			sendNotification(new NotificationObjectAtomicStepReady());
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	public void deleteInstanceOfEditor(IModelElement type, IModelElement inst)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			if (inst == null || type == null)
+				throw new VPMCoreNullParameterException(parameterNullNotAllowed);
+			SimpleModelElement _type = (SimpleModelElement) type;
+			SimpleModelElement _inst = (SimpleModelElement) inst;
+			if (_inst.type.contains(_type)) {
+				deleteInstanceOfDirect(_type, _inst);
+			} else {
+				throw new VPMCoreException(
+						EXCEPTION_DELETE_INSTANCEOF_NO_RELATION
+								+ type.getFullyQualifiedName() + ","
+								+ inst.getFullyQualifiedName());
+			}
+			sendNotification(new NotificationObjectAtomicStepReady());
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	private boolean stupidMethod = false;
+
+	public void deleteInstanceOfMachine(IModelElement type, IModelElement inst)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			if (inst == null || type == null)
+				throw new VPMCoreNullParameterException(parameterNullNotAllowed);
+			SimpleModelElement _type = (SimpleModelElement) type;
+			SimpleModelElement _inst = (SimpleModelElement) inst;
+			boolean isDeleted = false;
+			// if direct instanceof delete it

+			if (_inst.type.contains(_type)) {
+				deleteInstanceOfDirect(_type, _inst);
+				isDeleted = true;
+			}
+			// if not direct delete all instance arrows that

+			// implicate the ine to delete

+			else {
+				Iterator<IModelElement> it = _inst.type.iterator();
+				while (it.hasNext()) {
+					SimpleModelElement me = (SimpleModelElement) it.next();
+					if (me.getAllSupertypes().contains(_type)) {
+						deleteInstanceOfDirect(me, _inst);
+						isDeleted = true;
+					}
+				}
+			}
+			// Create all implicit instanceofs direct

+			if (stupidMethod) {
+				if (isDeleted) {
+					Iterator<IModelElement> iter = _type.supertype.iterator();
+					while (iter.hasNext()) {
+						SimpleModelElement supMeType = (SimpleModelElement) iter
+								.next();
+						if (!_inst.getAllTypes().contains(supMeType))
+							newInstanceOfDirect(supMeType, _inst);
+					}
+				}
+			}
+			sendNotification(new NotificationObjectAtomicStepReady());
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * delete supertype relation between sup and sub with machine semantics: no
+	 * error if relation is not present no warn if it is an implicit relation
+	 * delete the minimum number of direct relationships do not delete
+	 * relationships (make new direct relationships) which were caused implicit
+	 * by this relationship
+	 *
+	 * @param sup
+	 *            the supertype
+	 * @param sub
+	 *            the subtype
+	 * @throws VPMCoreNullParameterException
+	 * @throws VPMCoreException
+	 */
+	public void deleteSupertypeOfMachine(IModelElement sup, IModelElement sub)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			if (sup == null || sub == null)
+				throw new VPMCoreNullParameterException(parameterNullNotAllowed);
+			SimpleModelElement _sup = (SimpleModelElement) sup;
+			SimpleModelElement _sub = (SimpleModelElement) sub;
+			ArrayList<IModelElement> deletedList = new ArrayList<IModelElement>();
+			// Delete if direct arc exists

+			if (_sub.supertype.contains(_sup)) {
+				deleteSupertypeOfDirect(_sup, _sub);
+				deletedList.add(_sup);
+			}
+			// Tricky delete

+			else {
+				// Find all arcs that makes it subtype of sup

+				Iterator it = _sub.supertype.iterator();
+				while (it.hasNext()) {
+					SimpleModelElement me = (SimpleModelElement) it.next();
+					if (me.getAllSupertypes().contains(_sup)) {
+						deleteSupertypeOfDirect(me, _sub);
+						deletedList.add(me);
+					}
+				}
+			}
+			if (stupidMethod) {
+				// Add sub the super elements of sup (implicit arcs become
+				// explicit)

+				if (!deletedList.isEmpty()) {
+					Iterator iter = _sup.supertype.iterator();
+					while (iter.hasNext()) {
+						SimpleModelElement supMeSup = (SimpleModelElement) iter
+								.next();
+						if (!_sub.getAllSupertypes().contains(supMeSup))
+							newSupertypeOfDirect(supMeSup, _sub);
+					}
+				}
+				// Add subSubtyped elements the old supertype (implicit arcs
+				// become explicit)

+				for (int i = 0; i < deletedList.size(); ++i) {
+					SimpleModelElement supMe = (SimpleModelElement) deletedList
+							.get(i);
+					Iterator it = _sub.subtypes.iterator();
+					while (it.hasNext()) {
+						SimpleModelElement subMe = (SimpleModelElement) it
+								.next();
+						newSupertypeOfDirect(supMe, subMe);
+					}
+				}
+			}
+			if (deletedList.size() == 0) {
+				log_warn(WARNING_DELETE_NOT_SUPERTYPE, _sup, _sub);
+			} else {
+				sendNotification(new NotificationObjectAtomicStepReady());
+			}
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * Delete the supertypeof relation between the two elements. The relation to
+	 * be deleted must be direct
+	 *
+	 * @param sup
+	 *            supertype
+	 * @param sub
+	 *            subtype
+	 * @throws VPMCoreNullParameterException
+	 * @throws VPMCoreException
+	 */
+	private void deleteSupertypeOfDirect(SimpleModelElement sup,
+			SimpleModelElement sub) throws VPMCoreNullParameterException,
+			VPMCoreException {
+		sup.subtypes.remove(sub);
+		sub.supertype.remove(sup);
+		NotificationObject note = new NotificationObjectDeleteSupertypeOf(sup,
+				sub);
+		sendNotification(note);
+	}
+
+	/**
+	 * Delete the instanceof relation between the two elements. The relation to
+	 * be deleted must be direct
+	 *
+	 * @param type
+	 * @param inst
+	 * @throws VPMCoreNullParameterException
+	 * @throws VPMCoreException
+	 */
+	private void deleteInstanceOfDirect(SimpleModelElement type,
+			SimpleModelElement inst) throws VPMCoreNullParameterException,
+			VPMCoreException {
+		type.instances.remove(inst);
+		inst.type.remove(type);
+		NotificationObject note = new NotificationObjectDeleteInstanceOf(type,
+				inst);
+		sendNotification(note);
+	}
+
+	/**
+	 * Sets the name of the element
+	 *
+	 * @param e
+	 *            the element
+	 * @param n
+	 *            the new name
+	 * @throws VPMCoreException
+	 */
+	public void setName(IModelElement e, String n) throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			if (e == null || n == null) {
+				throw new VPMCoreNullParameterException(parameterNullNotAllowed);
+			}
+			// check name if valid

+			checkElemName(n);
+			_setName((SimpleModelElement) e, n);
+			sendNotification(new NotificationObjectAtomicStepReady());
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * Sets the name of the element without sending ATOMIC_ACTION NOTIFICATION
+	 *
+	 * @param elem
+	 *            the element
+	 * @param n
+	 *            the new name
+	 */
+	private void _setName(SimpleModelElement elem, String n) {
+		String oldName = elem.getName();
+		if (n.equals(oldName)) {
+			// name not changing, nothing to do

+			return;
+		}
+		SimpleModelElement par = (SimpleModelElement) elem.getNamespace();
+		// check if elements has a namespace

+		// all elements must have namespace, but this method may be called

+		// in a non-consistent state

+		if (par != null) {
+			if (par.namespace.get(n) != null) {
+				// if the container already has an element with the name to be
+				// set

+				// then generate a new name.

+				log_warn(WARNING_NAME_CLASH_AT_NAME_CHANGE + n, elem, par);
+				n = modelSpace.uniqueName(n);
+			}
+			// We must not change name while in container, because the container
+			// sorts contained

+			// elements by name:

+			removeFromNamespace(elem.getNamespace(), elem);
+			elem.name = n;
+			addToNamespace(elem.getNamespace(), elem);
+		} else {
+			elem.name = n;
+		}
+		NotificationObject note = new NotificationObjectSetName(elem, n,
+				oldName);
+		sendNotification(note);
+	}
+
+	/**
+	 * Sets the value of the entity
+	 *
+	 * @param e
+	 *            the entity
+	 * @param v
+	 *            the new value
+	 * @throws VPMCoreNullParameterException
+	 */
+	public void setValue(IEntity e, String v)
+			throws VPMCoreNullParameterException {
+		try {
+			lock.writeLock().lock();
+			if (e == null || v == null)
+				throw new VPMCoreNullParameterException(parameterNullNotAllowed);
+			SimpleEntity ent = (SimpleEntity) e;
+			String oldValue = ent.value;
+			ent.value = v;
+			NotificationObject note = new NotificationObjectSetValue(ent, v,
+					oldValue);
+			sendNotification(note);
+			sendNotification(new NotificationObjectAtomicStepReady());
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * Removes the element from its current container and moves it to the
+	 * specified new container
+	 *
+	 * @param e
+	 *            the element
+	 * @param cont
+	 *            new container
+	 */
+	public void moveEntityTo(IEntity e, IEntity cont) throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			// TODO mi van, ha pont abban a kontenerban van?

+			if (e == null || cont == null) {
+				throw new VPMCoreNullParameterException(parameterNullNotAllowed);
+			}
+			SimpleEntity ent = (SimpleEntity) e;
+			SimpleEntity par = ent.parent;
+			if (ent.equals(cont))
+				throw new VPMCoreException(
+						"error in parameters of moveEntityTo: parent and children are equal");
+			if (par == cont)
+				return;
+			par.containment.remove(ent.getLongID());
+			ent.parent = null;
+			removeFromNamespace(par, ent);
+			_newContainment(cont, e);
+			NotificationObject note = new NotificationObjectMoveTo(ent,
+					(SimpleEntity) cont, par);
+			sendNotification(note);
+			sendNotification(new NotificationObjectAtomicStepReady());
+			return;
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * Send the given notification to all listeners, which have a category
+	 * higher than the set notification level.
+	 *
+	 * @param notification
+	 */
+	private void sendNotification(ICoreNotificationObject notification) {
+		modelSpace.numberOfChanges++;
+		if (nManager != null)
+			nManager.sendNotification(notification);
+	}
+
+	private static final String WARNING_NAME_CLASH_AT_NAME_CHANGE = "name clash at name change. New name, element, container: ";
+
+	private void log_warn(String s, SimpleModelElement sme,
+			SimpleModelElement sme2) {
+		String s1 = sme.getFullyQualifiedName();
+		String s2 = sme2.getFullyQualifiedName();
+		logger.warning(s + ":" + s1 + "," + s2);
+	}
+
+	private void log_warn_nameclash(SimpleModelElement element_with_old_name,
+			SimpleModelElement container, String new_name) {
+		String warn = "The creation / copy / renaming of element '"
+				+ element_with_old_name.getFullyQualifiedName()
+				+ "' caused name clash in container '"
+				+ container.getFullyQualifiedName()
+				+ "' and thus it was automatically renamed to '" + new_name
+				+ "'";
+		logger.warning(warn);
+	}
+
+	private void checkParameter(IModelElement me) throws VPMCoreException {
+		if (me == null)
+			throw new VPMCoreNullParameterException("");
+		if (me.isDeleted())
+			throw new VPMCoreException("parameter already deleted");
+	}
+
+	// TODO: check parameters

+	public void setRelationFrom(IRelation rel, IModelElement from)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			checkParameter(rel);
+			checkParameter(from);
+			if (rel == from)
+				throw new VPMCoreException("edge end must not be itself");
+			if (checkEdgeCircle(rel, from)) {
+				throw new VPMCoreException(
+						"edge set from element error: would make infinite fully qualified name");
+			}
+			SimpleRelation srel = (SimpleRelation) rel;
+			SimpleModelElement sfrom = (SimpleModelElement) from;
+			NotificationObject no = new NotificationObjectSetRelationFrom(
+					(SimpleRelation) rel, (SimpleModelElement) rel.getFrom(),
+					(SimpleModelElement) from);
+			setRelFrom(srel, sfrom);
+			sendNotification(no);
+			checkIsAggregationSemantics(srel);
+			sendNotification(new NotificationObjectAtomicStepReady());
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * Check whether the isAggregation type relation's source and target are
+	 * parent and child entities. If check fails then the state is repaired by
+	 * moving the target entity below the parent
+	 *
+	 * @param rel
+	 * @throws VPMCoreException
+	 */
+	private void checkIsAggregationSemantics(SimpleRelation rel)
+			throws VPMCoreException {
+		for (IModelElement me : rel.getTypes()) {
+			if (me instanceof SimpleRelation) {
+				SimpleRelation tRel = (SimpleRelation) me;
+				if (tRel.getIsAggregation()) {
+					// The edge must be an aggregation:

+					IModelElement to = rel.getTo(), from = rel.getFrom();
+					if (!to.getNamespace().equals(from)) {
+						if (to instanceof IEntity && from instanceof IEntity) {
+							if (!to.equals(from)) {
+								moveEntityTo((IEntity) to, (IEntity) from);
+								log_warn("isAggregation=true set for "
+										+ rel.getFullyQualifiedName()
+										+ "'s type ("
+										+ tRel.getFullyQualifiedName()
+										+ "), containment should hold for ",
+										(SimpleModelElement) to,
+										(SimpleModelElement) from);
+							} else {
+								log_warn(
+										"isAggregation=true set for "
+												+ rel.getFullyQualifiedName()
+												+ "'s type ("
+												+ tRel.getFullyQualifiedName()
+												+ "), containment should hold (but source and target are the same) for ",
+										(SimpleModelElement) to,
+										(SimpleModelElement) from);
+							}
+						}
+					}
+					return;
+				}
+			}
+		}
+	}
+
+	public void setRelationTo(IRelation rel, IModelElement to)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			if (rel == to)
+				throw new VPMCoreException("edge end must not be itself");
+			SimpleRelation srel = (SimpleRelation) rel;
+			SimpleModelElement sto = (SimpleModelElement) to;
+			NotificationObject no = new NotificationObjectSetRelationTo(
+					(SimpleRelation) rel, (SimpleModelElement) rel.getTo(),
+					(SimpleModelElement) to);
+			setRelTo(srel, sto);
+			sendNotification(no);
+			checkIsAggregationSemantics(srel);
+			sendNotification(new NotificationObjectAtomicStepReady());
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	public void setViewInfo(IModelElement me, String viewInfo)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			SimpleModelElement _me = (SimpleModelElement) me;
+			sendNotification(new NotificationObjectSetViewInfo(me, me
+					.getViewInfo(), viewInfo));
+			_me.viewInfo = viewInfo;
+			sendNotification(new NotificationObjectAtomicStepReady());
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	public void deleteElement(IModelElement me, EDeleteSemantics semantics)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			if (me instanceof IEntity) {
+				deleteEntity((IEntity) me, semantics);
+			} else {
+				deleteRelation((IRelation) me, semantics);
+			}
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	/**
+	 * Check whether a recursive path from a relation to its source while the
+	 * source is a relation generates an infinite path (a circle) or not. This
+	 * must be checked when setting the source of a relation, because a circle
+	 * would mean that the relations in the circle has no fully qualified name.
+	 *
+	 * @param rel
+	 *            the relation that must not be on the path (again)
+	 * @param from
+	 *            the element that the path is currently at (can be an entity or
+	 *            a relation)
+	 * @return true if the path contains a circle
+	 */
+	private boolean checkEdgeCircle(IRelation rel, IModelElement from) {
+		try {
+			while (!(from instanceof IEntity)) {
+				if (from == rel)
+					return true;
+				if (from == null) {
+					logger.fatal("Gaz van: " + rel.getFullyQualifiedName());
+					break;
+				}
+				from = ((IRelation) from).getFrom();
+			}
+		} catch (NullPointerException e) {
+			e.printStackTrace();
+		}
+		return false;
+	}
+
+	public void setRelationMultiplicity(IRelation rel,
+			EMultiplicityKind multiplicity) throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			SimpleRelation _rel = (SimpleRelation) rel;
+			_rel.multiplicity = multiplicity;
+			NotificationObject note = new NotificationObjectSetRelationMultiplicity(
+					_rel, multiplicity);
+			sendNotification(note);
+			sendNotification(new NotificationObjectAtomicStepReady());
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	public void setRelationIsAggregation(IRelation rel, boolean isaggregation)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			SimpleRelation _rel = (SimpleRelation) rel;
+			_rel.isAggregation = isaggregation;
+			NotificationObject note = new NotificationObjectSetRelationIsAggregation(
+					rel, isaggregation);
+			sendNotification(note);
+			sendNotification(new NotificationObjectAtomicStepReady());
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	public void setRelationInverse(IRelation rel, IRelation inverse)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			SimpleRelation _rel = (SimpleRelation) rel;
+			_rel.inverse = inverse;
+			NotificationObject note = new NotificationObjectSetRelationInverse(
+					rel, inverse);
+			sendNotification(note);
+			sendNotification(new NotificationObjectAtomicStepReady());
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	public void setIsFinalType(IModelElement me, boolean isfinaltype)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			if (me == null)
+				throw new VPMCoreNullParameterException(parameterNullNotAllowed);
+			SimpleModelElement sme = (SimpleModelElement) me;
+			NotificationObject note = new NotificationObjectSetIsFinalType(me,
+					isfinaltype, sme.isFinalType);
+			sme.isFinalType = isfinaltype;
+			sendNotification(note);
+			sendNotification((new NotificationObjectAtomicStepReady()));
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	public void setIsAnyFrom(IRelation me, boolean isAnyFrom)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			if (me == null)
+				throw new VPMCoreNullParameterException(parameterNullNotAllowed);
+			SimpleRelation srel = (SimpleRelation) me;
+			NotificationObject note = new NotificationObjectSetIsAny(me,
+					isAnyFrom, true, srel.isAnyFrom);
+			srel.isAnyFrom = isAnyFrom;
+			sendNotification(note);
+			sendNotification((new NotificationObjectAtomicStepReady()));
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+
+	public void setIsAnyTo(IRelation me, boolean isAnyTo)
+			throws VPMCoreException {
+		try {
+			lock.writeLock().lock();
+			if (me == null)
+				throw new VPMCoreNullParameterException(parameterNullNotAllowed);
+			SimpleRelation srel = (SimpleRelation) me;
+			NotificationObject note = new NotificationObjectSetIsAny(me,
+					isAnyTo, false, srel.isAnyTo);
+			srel.isAnyTo = isAnyTo;
+			sendNotification(note);
+			sendNotification((new NotificationObjectAtomicStepReady()));
+		} finally {
+			lock.writeLock().unlock();
+		}
+	}
+/*
+	public void setRelationshipBetween(EConstraint relationType,
+			IModelElement src, IModelElement tg) throws VPMCoreException {
+		if (ConstraintTranslator.isOtherSide(relationType)) {
+			relationType = ConstraintTranslator.getOtherSide(relationType);
+			IModelElement _src = src;
+			src = tg;
+			tg = _src;
+		}
+		switch (relationType) {
+		case INSTANCE:
+			newInstanceOf(src, tg);
+			break;
+		case CHILD:
+			moveEntityTo((IEntity) src, (IEntity) tg);
+			break;
+		case REL_FROM:
+			setRelationFrom((IRelation) tg, src);
+			break;
+		default:
+			logger.warning("create relationship not implemented: "
+					+ relationType + ":" + src + ", " + tg);
+			// throw new RuntimeException("not implemented: "+relationType);

+		}
+	}
+*/
+	/*
+	private void deleteRelationshipBetween(EConstraint relationType,
+			IModelElement src, IModelElement tg) throws VPMCoreException {
+		if (ConstraintTranslator.isOtherSide(relationType)) {
+			relationType = ConstraintTranslator.getOtherSide(relationType);
+			IModelElement _src = src;
+			src = tg;
+			tg = _src;
+		}
+		switch (relationType) {
+		case INSTANCE:
+			deleteInstanceOf(src, tg);
+			break;
+		case CHILD:
+			moveEntityTo((IEntity) src, (IEntity) tg);
+			break;
+		case REL_FROM:
+			setRelationFrom((IRelation) tg, src);
+			break;
+		default:
+			logger.warning("del relationship not implemented: " + relationType
+					+ ":" + src + ", " + tg);
+			// throw new RuntimeException("not implemented: "+relationType);

+		}
+
+	}
+	*/
+
+	public Set<? extends IModelElement> getElements() {
+		try {
+			lock.readLock().lock();
+			TreeSet<IModelElement> ret = new TreeSet<IModelElement>();
+			ret.addAll(modelSpace.entitiesSet);
+			ret.addAll(modelSpace.relationsSet);
+			return ret;
+		} finally {
+			lock.readLock().unlock();
+		}
+	}
+
+	public void setProperty(IModelElement me, EModelElementProperty property,
+			Object value) throws VPMCoreException {
+		switch (property) {
+		case Name:
+			setName(me, (String) value);
+			break;
+		case Value:
+			setValue((IEntity) me, (String) value);
+			break;
+		default:
+			logger.warning("Set property not implemented:" + me + "("
+					+ property + ")=" + value);
+		}
+	}
+
+	public IModelElement copyModelElement(IModelElement source,
+			IModelElement destinationContainer, boolean copyOutEdges)
+			throws VPMCoreException {
+		try {
+			return ModelCopy.copyModel(modelSpace, modelSpace, source,
+					destinationContainer, copyOutEdges);
+		} catch (ModelCopyException e) {
+			throw new VPMCoreException("error performing copy: "
+					+ e.getMessage());
+		}
+	}
+
+	public IModelElement copyModelElements(Set<IModelElement> sourceElements,
+			IModelElement sourceRoot, IModelElement destinationContainer,
+			boolean copyOutEdges) throws VPMCoreException {
+		try {
+			return ModelCopy.copyModels(sourceElements, modelSpace, modelSpace,
+					sourceRoot, destinationContainer, copyOutEdges);
+		} catch (ModelCopyException e) {
+			throw new VPMCoreException("error performing copy: "
+					+ e.getMessage());
+		}
+	}
+
+	/**
+	 * @return the lock
+	 */
+	public ReadWriteLock getLock() {
+		return lock;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleModelMerger.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleModelMerger.java
new file mode 100644
index 0000000..1720315
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleModelMerger.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple;
+
+import org.eclipse.viatra2.core.IModelMerger;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMException;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.properties.VPMProperties;
+import org.eclipse.viatra2.logger.Logger;
+
+/**
+ * This interface defines the model merger interface for the Viatra core.
+ * 
+ * @author Andras Balogh
+ * 
+ */
+public class SimpleModelMerger implements IModelMerger {
+	/**
+	 * Initializes the model merger.
+	 * 
+	 * @param p
+	 *            - the collection of runtime properties
+	 * @param l
+	 *            - the framework logger
+	 * @param m
+	 *            - the owning modelspace
+	 * @throws VPMRuntimeException
+	 */
+	public void init(Logger l, VPMProperties p, IModelSpace m)
+			throws VPMRuntimeException {
+
+	}
+
+	/**
+	 * Mergers the current modelspace with an other one.
+	 * 
+	 * @param m1
+	 *            - the modelspace to merge
+	 * @throws VPMException
+	 */
+	public void merge(IModelSpace m1) throws VPMException {
+		// TODO

+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleModelSpace.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleModelSpace.java
new file mode 100644
index 0000000..7249fb6
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleModelSpace.java
@@ -0,0 +1,455 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import org.eclipse.viatra2.core.ICoreNotificationListener;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IModelMerger;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.INotificationManager;
+import org.eclipse.viatra2.core.ITransactionManager;
+import org.eclipse.viatra2.core.IUndoManager;
+import org.eclipse.viatra2.core.simple.tempdata.TemporaryDataFactory;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.framework.properties.VPMProperties;
+import org.eclipse.viatra2.logger.Logger;
+
+/**
+ * 
+ * This interface specifies the container of core functions. Implementations
+ * have to discover and load model manager, merger, notfification, undo and
+ * transaction support classes.
+ * 
+ * ModelSpace interface is the common container of the Viatra core functions.
+ * 
+ * @author Andras Schmidt
+ * 
+ *         Modification on 2006.08.07 by Istvan Rath: - removed reference to
+ *         SimpleUndoManager; undo management moved into the transaction manager
+ * 
+ */
+public class SimpleModelSpace implements IModelSpace {
+	/**
+	 * Factory class for cached data storage
+	 */
+	protected TemporaryDataFactory<Set<IModelElement>> tempFactory = new TemporaryDataFactory<Set<IModelElement>>();
+
+	protected Logger logger;
+
+	// protected PatternMatcher patternMatcher;

+	protected IModelManager mManager;
+
+	protected INotificationManager nManager;
+
+	// protected SimpleUndoManager uManager;

+	protected ITransactionManager tManager;
+
+	// protected Set _entities, _functions, _relations;

+	protected Map<Long, SimpleModelElement> entities, relations;
+
+	protected Set<SimpleEntity> entitiesSet;
+
+	protected Set<SimpleRelation> relationsSet;
+
+	protected SimpleEntity rootEntity;
+
+	// / ******* ancestors

+	public static final boolean isAncestorAware = false;
+
+	public static final String ancestorContainerName = "vpm";
+
+	public static final String ancestorEntityName = "entity";
+
+	public static final String ancestorEntityFQN = ancestorContainerName + "."
+			+ ancestorEntityName;
+
+	public static final String ancestorRelationName = "relation";
+
+	public static final String ancestorRelationFQN = ancestorEntityFQN + "."
+			+ ancestorRelationName;
+
+	protected SimpleEntity ancestorContainer;
+
+	protected SimpleEntity ancestorEntity;
+
+	protected SimpleRelation ancestorRelation;
+
+	// ********

+
+	protected UniqueNameProvider uniqueNameProvider;
+
+	protected IDProvider idProvider;
+
+	/**
+	 * Counter that counts all updates of the model. The counter is used to
+	 * check cached (dependent) data whether it is valid or not.
+	 */
+	protected int numberOfChanges = 0;
+
+	// / XXX parallelVIATRA

+	// protected Lock __lock=new ReentrantLock();

+	protected ReadWriteLock lock = new ReentrantReadWriteLock();
+
+	public class NullRLock implements Lock {
+		public void lock() {
+			StackTraceElement e = Thread.currentThread().getStackTrace()[2];
+			String trace = e.getClassName() + "::" + e.getMethodName();
+			System.out.println("READ_LOCK [" + trace + "]");
+		}
+
+		public void lockInterruptibly() throws InterruptedException {
+		}
+
+		public Condition newCondition() {
+			return null;
+		}
+
+		public boolean tryLock() {
+			return true;
+		}
+
+		public boolean tryLock(long time, TimeUnit unit)
+				throws InterruptedException {
+			return true;
+		}
+
+		public void unlock() {
+			StackTraceElement e = Thread.currentThread().getStackTrace()[2];
+			String trace = e.getClassName() + "::" + e.getMethodName();
+			System.out.println("READ UNLOCK [" + trace + "]");
+		}
+
+	}
+
+	public class NullWLock implements Lock {
+		public void lock() {
+			StackTraceElement e = Thread.currentThread().getStackTrace()[2];
+			String trace = e.getClassName() + "::" + e.getMethodName();
+			System.out.println("WRITE_LOCK [" + trace + "]");
+		}
+
+		public void lockInterruptibly() throws InterruptedException {
+		}
+
+		public Condition newCondition() {
+			return null;
+		}
+
+		public boolean tryLock() {
+			return true;
+		}
+
+		public boolean tryLock(long time, TimeUnit unit)
+				throws InterruptedException {
+			return true;
+		}
+
+		public void unlock() {
+			StackTraceElement e = Thread.currentThread().getStackTrace()[2];
+			String trace = e.getClassName() + "::" + e.getMethodName();
+			System.out.println("WRITE UNLOCK [" + trace + "]");
+		}
+
+	}
+
+	protected ReadWriteLock _lock = new ReadWriteLock() {
+		NullRLock rLock = new NullRLock();
+
+		NullWLock wLock = new NullWLock();
+
+		public Lock readLock() {
+			return rLock;
+		}
+
+		public Lock writeLock() {
+			return wLock;
+		}
+
+	};
+
+	// protected String getSyncObject=new String("sync object");

+	// TODO

+	protected long newId() {
+		return idProvider.newID();
+	}
+
+	String uniqueName(String s) {
+		return uniqueNameProvider.uniqueName(s);
+	}
+
+	String uniqueName() {
+		return uniqueNameProvider.uniqueName();
+	}
+
+	IFramework framework;
+
+	public void init(IFramework fw) throws VPMRuntimeException {
+		this.framework = fw;
+		init(fw.getLogger(), fw.getProperties());
+	}
+
+	/**
+	 * Initializes the modelspace.
+	 * 
+	 * @param p
+	 *            - the collection of runtime properties
+	 * @throws VPMRuntimeException
+	 */
+	public void init(Logger log, VPMProperties props)
+			throws VPMRuntimeException {
+		logger = log;
+		uniqueNameProvider = new UniqueNameProvider();
+		idProvider = new IDProvider(logger);
+		entities = new TreeMap<Long, SimpleModelElement>();
+		entitiesSet = new TreeSet<SimpleEntity>();
+		relations = new TreeMap<Long, SimpleModelElement>();
+		relationsSet = new TreeSet<SimpleRelation>();
+
+		rootEntity = new SimpleEntity(newId(), this);
+		rootEntity.name = "root";
+//		entities.put(rootEntity.getLongID(), rootEntity);
+//		entitiesSet.add(rootEntity);
+		
+		initManagers();
+	}
+
+	/**
+	 * @throws VPMRuntimeException
+	 */
+	protected void initManagers() throws VPMRuntimeException {
+		mManager = new SimpleModelManager();
+		nManager = new SimpleNotificationManager();
+		tManager = new SimpleTransactionManager();
+		((SimpleModelManager) mManager).init(logger, this);
+		((SimpleNotificationManager) nManager).init(logger, this);
+		((SimpleTransactionManager) tManager).init(logger, this);
+		if (isAncestorAware) {
+			try {
+				ancestorContainer = (SimpleEntity) mManager
+						.newEntity(ancestorContainerName);
+				ancestorEntity = (SimpleEntity) mManager.newEntity(
+						ancestorEntityName, ancestorContainer);
+				ancestorRelation = (SimpleRelation) mManager.newRelation(
+						ancestorRelationName, ancestorEntity, ancestorEntity);
+				mManager.setIsAnyFrom(ancestorRelation, true);
+				mManager.setIsAnyTo(ancestorRelation, true);
+			} catch (VPMCoreException e) {
+				// TODO Auto-generated catch block

+				e.printStackTrace();
+			}
+		}
+		// nManager.addAllListener(uManager);

+		nManager.addAllListener((ICoreNotificationListener) tManager);
+	}
+
+	/**
+	 * Returns the model merger associated with this modelspace
+	 * 
+	 * @return the model merger
+	 */
+	public IModelMerger getModelMerger() {
+		// TODO

+		return null;
+	}
+
+	/**
+	 * Returns the model manager asociated with this modelspace.
+	 * 
+	 * @return the model manager
+	 */
+	public IModelManager getModelManager() {
+		return mManager;
+	}
+
+	/**
+	 * Returns the notification manager associated with this modelspace, or null
+	 * if notification is not supported.
+	 * 
+	 * @return notification manager
+	 */
+	public INotificationManager getNotificationManager() {
+		return nManager;
+	}
+
+	/**
+	 * Returns the transaction manager associated with this modelspace, or null
+	 * if transactions are not supported.
+	 * 
+	 * @return transaction manager.
+	 */
+	public ITransactionManager getTransactionManager() {
+		return tManager;
+	}
+
+	/**
+	 * Returns the undo manager associated with this modelspace, or null if undo
+	 * is not supported.
+	 * 
+	 * @return undo manager.
+	 */
+	public IUndoManager getUndoManager() {
+		// return uManager;

+		logger.debug("SimpleModelSpace::getUndoManager called");
+		return null;
+	}
+
+	/**
+	 * Checks whether transactions are supported
+	 * 
+	 * @return true if transactions are supported, else false.
+	 */
+	public boolean isTransactionAware() {
+		// TODO

+		return false;
+	}
+
+	/**
+	 * Checks whether notifications are supported
+	 * 
+	 * @return true if notifications are supported, else false.
+	 */
+	public boolean isNotificationAware() {
+		// TODO

+		return false;
+	}
+
+	/**
+	 * Checks whether undo is supported
+	 * 
+	 * @return true if undo is supported, else false.
+	 */
+	public boolean isUndoAware() {
+		return true;
+	}
+
+	/**
+	 * Clones (doubles) the whole modelspace
+	 * 
+	 * @return cloned modelspace
+	 */
+	public IModelSpace cloneModelSpace() {
+		// TODO

+		return null;
+	}
+
+	public String statistics() {
+		return statistics(0);
+	}
+
+	public String statistics(long memUsedBefore) {
+		StringBuffer ret = new StringBuffer();
+		int numSups = 0;
+		int numSubs = 0;
+		int numTypes = 0;
+		int numInsts = 0;
+		Iterator<SimpleModelElement> it = entities.values().iterator();
+		while (it.hasNext()) {
+			SimpleModelElement me = it.next();
+			numSubs += me.subtypes.size();
+			numSups += me.supertype.size();
+			numTypes += me.type.size();
+			numInsts += me.instances.size();
+		}
+		it = relations.values().iterator();
+		while (it.hasNext()) {
+			SimpleModelElement me = it.next();
+			numSubs += me.subtypes.size();
+			numSups += me.supertype.size();
+			numTypes += me.type.size();
+			numInsts += me.instances.size();
+		}
+		ret.append("Number uf supertypes:" + numSups + "\n");
+		ret.append("Number uf subtypes:" + numSubs + "\n");
+		ret.append("Number uf instance:" + numInsts + "\n");
+		ret.append("Number uf types:" + numTypes + "\n");
+		int nEnts = getModelManager().getEntities().size();
+		int nRels = getModelManager().getRelations().size();
+		ret.append("nr of entities:" + nEnts + "\n");
+		ret.append("nr of rels    :" + nRels + "\n");
+		int sum = nRels + nEnts;
+		ret.append("nr of sum     :" + sum + "\n");
+		ret.append("average num of types:" + (float) numTypes / sum + "\n");
+		ret.append("average num of supertypes:" + (float) numSups / sum + "\n");
+		System.gc();
+		ret.append("memory per element:" + ((memUsed() - memUsedBefore) / sum));
+		return ret.toString();
+	}
+
+	private static long memUsed() {
+		Runtime r = Runtime.getRuntime();
+		long free = r.freeMemory();
+		long total = r.totalMemory();
+		return total - free;
+	}
+
+	/**
+	 * Method only for test: deletes all String info in modelspace (name and
+	 * value fields) Then we see what amount of memory they occupied.
+	 * 
+	 */
+	public void deleteStrings() {
+		Iterator<SimpleModelElement> it = entities.values().iterator();
+		while (it.hasNext()) {
+			SimpleModelElement me = it.next();
+			SimpleEntity mee = (SimpleEntity) me;
+			me.name = null;
+			mee.value = null;
+		}
+		it = relations.values().iterator();
+		while (it.hasNext()) {
+			SimpleModelElement me = it.next();
+			me.name = null;
+		}
+	}
+
+	/**
+	 * @return
+	 */
+	public int discardAllTemp() {
+		return tempFactory.discardAll();
+	}
+
+	public Collection<IModelElement> getAncestorElements() {
+		if (isAncestorAware) {
+			TreeSet<IModelElement> ret = new TreeSet<IModelElement>();
+			if (ancestorContainer != null)
+				ret.add(ancestorContainer);
+			if (ancestorEntity != null)
+				ret.add(ancestorEntity);
+			if (ancestorRelation != null)
+				ret.add(ancestorRelation);
+			return ret;
+		} else {
+			return Collections.emptySet();
+		}
+	}
+
+	public IFramework getFramework() {
+		return framework;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleNotificationManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleNotificationManager.java
new file mode 100644
index 0000000..79a6d8e
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleNotificationManager.java
@@ -0,0 +1,298 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.viatra2.core.ICoreNotificationListener;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.INotificationManager;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.logger.Logger;
+
+/**
+ * This class specifies the required services of a notification manager.
+ * 
+ * @author Andras Schmidt
+ */
+public class SimpleNotificationManager implements INotificationManager {
+
+	/**
+	 * Notification category for undo managers.
+	 */
+	public final static int UNDO_SUPPORT = 0;
+
+	/**
+	 * Notification category for transaction managers.
+	 */
+	public final static int TRANSACTION_SUPPORT = 1;
+
+	/**
+	 * Notification category for other core event listeners.
+	 */
+	public final static int CORE_SUPPORT = 2;
+
+	/**
+	 * Notification category for interpreter-level notification support.
+	 */
+	public final static int INTERPRETER_SUPPORT = 3;
+
+	/**
+	 * Notification category for gui managers.
+	 */
+	public final static int GUI_SUPPORT = 4;
+
+	boolean notificationEnabled = true;
+
+	// List defaultListeners=new ArrayList();

+	/**
+	 * They listen all notifications on the whole modelspace.
+	 */
+	List<ICoreNotificationListener> allListeners = new ArrayList<ICoreNotificationListener>();
+
+	int notificationLevel = 0;
+
+	Logger logger;
+
+	IModelSpace modelSpace;
+
+	/**
+	 * Initializes the notification manager.
+	 * 
+	 * @param l
+	 *            - the framework logger
+	 * @param m
+	 *            - the owning modelspace
+	 * @throws VPMRuntimeException
+	 */
+	public void init(Logger l, IModelSpace m) throws VPMRuntimeException {
+		modelSpace = m;
+	}
+
+	/**
+	 * Adds a new default listner that has to be associated with all new model
+	 * elements.
+	 * 
+	 * @param l
+	 *            the new listner object
+	 */
+	/*
+	 * public void addDefaultListener(ICoreNotificationListener l) {
+	 * defaultListeners.add(l); }
+	 */
+
+	/**
+	 * Removes a default listener
+	 * 
+	 * @param l
+	 *            the listener to be removed
+	 */
+	/*
+	 * public void removeDefaultListener(ICoreNotificationListener l) {
+	 * defaultListeners.remove(l); }
+	 */
+
+	/**
+	 * Returns the current collection of default listeners.
+	 * 
+	 * @return collection of listeners
+	 */
+	/*
+	 * public Collection getDefaultListeners() { return defaultListeners; }
+	 */
+	/**
+	 * Enables notification dispatching.
+	 */
+	public void enableNotifications() {
+		notificationEnabled = true;
+	}
+
+	/**
+	 * Disables notification dispatching.
+	 */
+	public void disableNotifications() {
+		notificationEnabled = false;
+	}
+
+	/**
+	 * Checks whether notifications are enabled or not.
+	 * 
+	 * @return true, if notification dispatching is enabed.
+	 */
+	public boolean isNotificationEnabled() {
+		return notificationEnabled;
+	}
+
+	/**
+	 * Sets the notification level. All notifications having a category that is
+	 * less or equal to the level will be dispatched.
+	 * 
+	 * @param l
+	 *            the new level
+	 * 
+	 */
+	public void setNotificationLevel(int l) {
+		notificationLevel = l;
+	}
+
+	/**
+	 * Retrives the current notification level.
+	 * 
+	 * @return current notification level
+	 */
+	public int getNotificationLevel() {
+		return notificationLevel;
+	}
+
+	public void addAllListener(ICoreNotificationListener l) {
+		allListeners.add(l);
+	}
+
+	public void removeAllListener(ICoreNotificationListener l) {
+		allListeners.remove(l);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.viatra2.core.INotificationManager#getListenAllListeners()
+	 */
+	public Collection<ICoreNotificationListener> getListenAllListeners() {
+		return allListeners;
+	}
+
+	protected int no_atom_depth = 0;
+
+	boolean skip_note_block = false;
+
+	/**
+	 * Send the given notification to all listeners, which have a category
+	 * higher than the set notification level.
+	 * 
+	 * @param notification
+	 */
+	protected void sendNotification(ICoreNotificationObject notification) {
+		switch (notification.getActionTypeEnum()) {
+		case ACTION_SKIP_NOTIFICATIONS_START:
+			skip_note_block = true;
+			return;
+		case ACTION_SKIP_NOTIFICATIONS_END:
+			skip_note_block = false;
+			return;
+		}
+		/*if (notification.getActionTypeEnum().equals(
+				NotificationType.ACTION_SKIP_NOTIFICATIONS_START)) {
+			skip_note_block = true;
+			return;
+		}
+		if (notification.getActionTypeEnum().equals(
+				NotificationType.ACTION_SKIP_NOTIFICATIONS_END)) {
+			skip_note_block = false;
+			return;
+		}*/
+		if (skip_note_block)
+			return;

+		switch(notification.getActionTypeEnum()){
+		case ACTION_ATOMIC_STEP_READY:
+			if (no_atom_depth > 0)
+				return;
+			else
+				break;
+		case ACTION_MORE_ATOMICS_TO_ONE_ATOM_START:
+			no_atom_depth++;
+			return;
+		case ACTION_MORE_ATOMICS_TO_ONE_ATOM_END:
+			no_atom_depth--;
+			// TODO
+			if (no_atom_depth < 0)
+				throw new RuntimeException("error internal");
+			return;
+
+		}
+		if (notificationEnabled) {
+			notifyListeners(notification);
+		}
+	}
+
+	/**
+	 * Notification is sent to all listeners who registered
+	 *  
+	 * @param notification
+	 */
+	protected void notifyListeners(ICoreNotificationObject notification) {
+		// We need all listeners, who are linked to the changed elements

+		int level = getNotificationLevel();
+		// Send to all listeners, who have high enough level

+		for (ICoreNotificationListener listener: notification.getListeners()) {
+			if (level >= listener.getListenerCategory()) {
+				listener.actionPerformed(notification);
+			}
+		}
+		// All listeners also get a notification

+//			it = getListenAllListeners().iterator();
+//			while (it.hasNext()) {
+//				ICoreNotificationListener listener = (ICoreNotificationListener) it
+//						.next();
+//				if (level >= listener.getListenerCategory()) {
+//					listener.actionPerformed(notification);
+//				}
+//			}
+		for (ICoreNotificationListener l : new ArrayList<ICoreNotificationListener>(getListenAllListeners()))
+		{
+			if (level >= l.getListenerCategory()) {
+				l.actionPerformed(notification);
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.viatra2.core.INotificationManager#addNotificationListener
+	 * (org.eclipse.viatra2.core.IModelElement,
+	 * org.eclipse.viatra2.core.ICoreNotificationListener)
+	 */
+	public void addNotificationListener(IModelElement me,
+			ICoreNotificationListener l) {
+		((SimpleModelElement) me).addNotificationListener(l);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.viatra2.core.INotificationManager#removeNotificationListener
+	 * (org.eclipse.viatra2.core.IModelElement,
+	 * org.eclipse.viatra2.core.ICoreNotificationListener)
+	 */
+	public void removeNotificationListener(IModelElement me,
+			ICoreNotificationListener l) {
+		((SimpleModelElement) me).removeNotificationListener(l);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.viatra2.core.INotificationManager#getNotificationListeners
+	 * (org.eclipse.viatra2.core.IModelElement)
+	 */
+	public Collection<ICoreNotificationListener> getNotificationListeners(IModelElement me) {
+		return ((SimpleModelElement) me).getNotificationListeners();
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleRelation.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleRelation.java
new file mode 100644
index 0000000..d436d62
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleRelation.java
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple;
+
+import org.eclipse.viatra2.core.EMultiplicityKind;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+
+/**
+ * @author Andras Schmidt, Istvan Rath
+ * 
+ */
+public class SimpleRelation extends SimpleModelElement implements IRelation {
+	/**
+	 * The source element of this relation
+	 */
+	protected SimpleModelElement from = null;
+
+	/**
+	 * The target element of this relation
+	 */
+	protected SimpleModelElement to = null;
+
+	/**
+	 * The multiplicity of this relation. It has sense in meta-models only
+	 */
+	protected EMultiplicityKind multiplicity = EMultiplicityKind.MANY_TO_MANY;
+
+	protected IRelation inverse = null;
+
+	/**
+	 * The isAggregation property of the relation
+	 */
+	protected boolean isAggregation = false;
+
+	/**
+	 * The isAnyfrom property of the relation
+	 */
+	protected boolean isAnyFrom = false;
+
+	/**
+	 * The isAnyto property of the relation
+	 */
+	protected boolean isAnyTo = false;
+
+	/**
+	 * Instatiatates a relation.
+	 */
+	public SimpleRelation(long ID, SimpleModelSpace ms) {
+		super(ID, ms);
+	}
+
+	/**
+	 * Gets the source of this relation.
+	 * 
+	 * @return An Entity
+	 */
+	public IModelElement getFrom() {
+		try {
+			modelSpace.lock.readLock().lock();
+			return from;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/**
+	 * Gets the destination of this relation.
+	 * 
+	 * @return an Entity
+	 */
+	public IModelElement getTo() {
+		try {
+			modelSpace.lock.readLock().lock();
+			return to;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	/**
+	 * Returns one of the element's fully qualified name
+	 * 
+	 * @return name
+	 */
+	public String getFullyQualifiedName() {
+		try {
+			modelSpace.lock.readLock().lock();
+			if (from == null)
+				return null;
+			String name = getName();
+			name = from.getFullyQualifiedName() + "." + name;
+			return name;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	public IModelElement getNamespace() {
+		try {
+			modelSpace.lock.readLock().lock();
+			return from;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	public EMultiplicityKind getMultiplicity() {
+		try {
+			modelSpace.lock.readLock().lock();
+			return multiplicity;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	public IRelation getInverse() {
+		try {
+			modelSpace.lock.readLock().lock();
+			return inverse;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	public boolean getIsAggregation() {
+		try {
+			modelSpace.lock.readLock().lock();
+			return isAggregation;
+		} finally {
+			modelSpace.lock.readLock().unlock();
+		}
+	}
+
+	public boolean getIsAnyFrom() {
+		return isAnyFrom;
+	}
+
+	public boolean getIsAnyTo() {
+		return isAnyTo;
+	}
+
+	public boolean isEntity() {
+		return false;
+	}
+
+	public boolean isRelation() {
+		return true;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleTransactionManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleTransactionManager.java
new file mode 100644
index 0000000..9b154df
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleTransactionManager.java
@@ -0,0 +1,258 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple;
+
+import java.util.concurrent.locks.ReentrantLock;
+
+import org.eclipse.viatra2.core.ICoreNotificationListener;
+import org.eclipse.viatra2.core.IPause;
+import org.eclipse.viatra2.core.ITransactionManager;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectSubTransactionAbort;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectSubTransactionBegin;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectSubTransactionEnd;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectTransactionAbort;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectTransactionBegin;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectTransactionEnd;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectUndoBegin;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectUndoEnd;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectUndoableTransactionBegin;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.logger.Logger;
+
+/**
+ * This class implements a transaction manager for the Viatra core.
+ * 
+ * @author Andras Balogh, Istvan Rath
+ * 
+ */
+public class SimpleTransactionManager implements ITransactionManager,
+		ICoreNotificationListener {
+
+	private int transactionCounter = 0;
+
+	private ReentrantLock tLock = new ReentrantLock();
+
+	protected SimpleUndoManager uManager;
+
+	SimpleModelSpace modelSpace;
+
+	public enum TransactionState {
+		DEFAULT, IN_UNDOABLE_TRANSACTION, IN_TRANSACTION, PAUSED
+	}
+
+	protected TransactionState iState = TransactionState.DEFAULT;
+
+	/*
+	 * This method is provided temporarily for debug purposes. (CoreUtils)
+	 */
+	public SimpleUndoManager getUndoManager() {
+		return uManager;
+	}
+
+	/**
+	 * Initializes the transaction manager.
+	 * 
+	 * @param l
+	 *            - the framework logger
+	 * @param m
+	 *            - the owning modelspace
+	 * @throws VPMRuntimeException
+	 */
+	public void init(Logger l, SimpleModelSpace m) throws VPMRuntimeException {
+		uManager = new SimpleUndoManager();
+		modelSpace = m;
+
+		uManager.init(l, m);
+	}
+
+	/**
+	 * Begins a new transaction.
+	 * 
+	 */
+	public String beginTransaction() {
+		// FIXME what if a begin is issued without called end/rollback first?

+		// modelSpace.lock.lock();

+		tLock.lock();
+		iState = TransactionState.IN_TRANSACTION;
+		// if(modelSpace.lock.getHoldCount()==1)

+		if (tLock.getHoldCount() == 1) {
+			((SimpleNotificationManager) modelSpace.nManager)
+					.sendNotification(new NotificationObjectTransactionBegin());
+		} else {
+			((SimpleNotificationManager) modelSpace.nManager)
+					.sendNotification(new NotificationObjectSubTransactionBegin());
+		}
+		return "TRANS_" + (transactionCounter++);
+	}
+
+	public String beginTransaction(Object info) {
+		// FIXME what if a begin is issued without called end/rollback first?

+		// modelSpace.lock.lock();

+		tLock.lock();
+		iState = TransactionState.IN_TRANSACTION;
+		// if(modelSpace.lock.getHoldCount()==1)

+		if (tLock.getHoldCount() == 1) {
+			((SimpleNotificationManager) modelSpace.nManager)
+					.sendNotification(new NotificationObjectTransactionBegin(
+							info));
+		} else {
+			((SimpleNotificationManager) modelSpace.nManager)
+					.sendNotification(new NotificationObjectSubTransactionBegin(
+							info));
+		}
+		return "TRANS_" + (transactionCounter++);
+	}
+
+	public String beginUndoableTransaction() {
+		// modelSpace.lock.lock();

+		tLock.lock();
+		iState = TransactionState.IN_UNDOABLE_TRANSACTION;
+		// if(modelSpace.lock.getHoldCount()==1)

+		if (tLock.getHoldCount() == 1) {
+			((SimpleNotificationManager) modelSpace.nManager)
+					.sendNotification(new NotificationObjectUndoableTransactionBegin());
+		} else {
+			((SimpleNotificationManager) modelSpace.nManager)
+					.sendNotification(new NotificationObjectSubTransactionBegin());
+		}
+		String id = "TRANS_" + (transactionCounter++);
+		uManager.nextUndoBlock(id);
+		return id;
+	}
+
+	public String beginUndoableTransaction(Object info) {
+		// modelSpace.lock.lock();

+		tLock.lock();
+		iState = TransactionState.IN_UNDOABLE_TRANSACTION;
+		// if(modelSpace.lock.getHoldCount()==1)

+		if (tLock.getHoldCount() == 1) {
+			((SimpleNotificationManager) modelSpace.nManager)
+					.sendNotification(new NotificationObjectUndoableTransactionBegin(
+							info));
+		} else {
+			((SimpleNotificationManager) modelSpace.nManager)
+					.sendNotification(new NotificationObjectSubTransactionBegin(
+							info));
+		}
+		String id = "TRANS_" + (transactionCounter++);
+		uManager.nextUndoBlock(id);
+		return id;
+	}
+
+	/**
+	 * Commits the current transaction.
+	 * 
+	 */
+	public void commitTransaction() {
+		// int count=tLock.getHoldCount();

+		if (tLock.getHoldCount() == 1) {
+			iState = TransactionState.DEFAULT;
+			// modelSpace.lock.unlock();

+			tLock.unlock();
+			((SimpleNotificationManager) modelSpace.nManager)
+					.sendNotification(new NotificationObjectTransactionEnd());
+		} else {
+			//iState = TransactionState.DEFAULT; <-- don't reach DEFAULT while only subtransactions are committed
+			// modelSpace.lock.unlock();

+			tLock.unlock();
+			((SimpleNotificationManager) modelSpace.nManager)
+					.sendNotification(new NotificationObjectSubTransactionEnd());
+		}
+		// iState = TransactionState.DEFAULT;

+		// modelSpace.lock.unlock();

+	}
+
+	public void commitCompositeTransaction()
+	{
+		if (tLock.getHoldCount() == 0)
+			return; // not in transaction
+		if (tLock.getHoldCount() == 1)
+		{
+			commitTransaction();
+		}
+		else
+		{
+			int i = tLock.getHoldCount();
+			while (i>0)
+			{
+				commitTransaction();
+				i--;
+			}
+		}
+	}
+	
+	/**
+	 * Aborts the current transaction.
+	 * 
+	 */
+	public void abortTransaction() {
+		if (tLock.getHoldCount() == 1) {
+			iState = TransactionState.DEFAULT;
+			
+			
+			tLock.unlock();
+			((SimpleNotificationManager) modelSpace.nManager)
+					.sendNotification(new NotificationObjectTransactionAbort());
+			
+		} else {
+			//iState = TransactionState.DEFAULT; <-- don't reach DEFAULT while only subtransactions are committed
+			// modelSpace.lock.unlock();
+			tLock.unlock();
+			((SimpleNotificationManager) modelSpace.nManager)
+					.sendNotification(new NotificationObjectSubTransactionAbort());
+		}
+		

+	}
+
+	public boolean tryBeginTransaction() {
+		// return modelSpace.lock.tryLock();

+		return tLock.tryLock();
+		// return true;

+	}
+
+	public IPause pauseTransaction() throws IllegalMonitorStateException {
+		if (tLock.isHeldByCurrentThread()) {
+			int c = tLock.getHoldCount();
+			IPause ret = new Pause(c);
+			for (int i = 0; i < c; ++i)
+				commitTransaction();
+			return ret;
+		} else {
+			throw new IllegalMonitorStateException(
+					"owner of lock is not this thread");
+		}
+		// return null;

+	}
+
+	public void unPauseTransaction(IPause n) {
+		Pause ret = (Pause) n;
+		for (int i = 0; i < ret.n; ++i)
+			beginTransaction();
+	}
+
+	public void undoTransaction(String aTransactionID) {
+		((SimpleNotificationManager) modelSpace.nManager).sendNotification(new NotificationObjectUndoBegin());
+		uManager.undo(aTransactionID);
+		((SimpleNotificationManager) modelSpace.nManager).sendNotification(new NotificationObjectUndoEnd());
+	}
+
+	public void actionPerformed(ICoreNotificationObject notification) {
+		if (iState == TransactionState.IN_UNDOABLE_TRANSACTION)
+			uManager.actionPerformed(notification);
+		// drop core notifications if not in an undoable transaction

+	}
+
+	public int getListenerCategory() {
+		return uManager.getListenerCategory();
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleUndoManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleUndoManager.java
new file mode 100644
index 0000000..407dc46
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SimpleUndoManager.java
@@ -0,0 +1,501 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Stack;
+
+import org.eclipse.viatra2.core.EDeleteSemantics;
+import org.eclipse.viatra2.core.ICoreNotificationListener;
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.core.IUndoManager;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateEntity;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateInstanceOf;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateRelation;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateSupertypeOf;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteContainment;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteEntity;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteInstanceOf;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteRelation;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteSupertypeOf;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectMoveTo;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetName;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetRelationFrom;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetRelationTo;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetValue;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetViewInfo;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectUserMark;
+import org.eclipse.viatra2.core.notification.NotificationType;
+import org.eclipse.viatra2.core.simple.notification.NotificationObject;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectAtomicStepReady;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectUserMark;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.errors.VPMCoreNullParameterException;
+import org.eclipse.viatra2.errors.VPMCoreRuntimeException;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.logger.Logger;
+
+/**
+ * This class defines the undo support for the Simple Viatra core. This class is
+ * the undoManager interface of the Simple Core implementation, and the listener
+ * of undo notification objects too.
+ * 
+ * @author Andras Schmidt
+ * 
+ *         Modified on 2006.08.14 by Istvan Rath: - clean up unnecessary code -
+ *         add preliminary transaction support (don't throw exceptions)
+ * 
+ */
+public class SimpleUndoManager implements IUndoManager,
+		ICoreNotificationListener {
+	IModelSpace modelSpace;
+
+	SimpleModelManager mManager;
+
+	Logger logger;
+
+	private Stack<ICoreNotificationObject> undoStack;
+
+	boolean underUndo;
+
+	boolean checkConsistencyOn = false;
+
+	/**
+	 * Initializes the undo manager.
+	 * 
+	 * @param l
+	 *            - the framework logger
+	 * @param m
+	 *            - the owning modelspace
+	 * @throws VPMRuntimeException
+	 */
+	public void init(Logger l, IModelSpace m) throws VPMRuntimeException {
+		logger = l;
+		modelSpace = m;
+		mManager = (SimpleModelManager) modelSpace.getModelManager();
+	}
+
+	/**
+	 * Registers a new undo block with a descriptive name. (Marks the point of
+	 * state with the given string.)
+	 * 
+	 * @param name
+	 *            - name of undo block
+	 */
+	public void nextUndoBlock(String name) {
+		NotificationObject no = new NotificationObjectUserMark(name);
+		undoStack.push(no);
+	}
+
+	/**
+	 * Checks whether the undo buffer is empty
+	 * 
+	 * @return true, if there are operations in the undo buffer
+	 */
+	public boolean canUndo() {
+		return !undoStack.empty();
+	}
+
+	/**
+	 * Flushes the undo buffer.
+	 * 
+	 */
+	public void flushUndoBuffer() {
+		undoStack = new Stack<ICoreNotificationObject>();
+	}
+
+	/**
+	 * Undoes the last operation
+	 */
+	public void undo() {
+		underUndo = true;
+		boolean empty = false;
+		boolean wasChange = false;
+		ICoreNotificationObject note = null;
+		do {
+			if (undoStack.isEmpty()) {
+				empty = true;
+				break;
+			}
+			note = undoStack.pop();
+			try {
+				wasChange = undoStep(note) || wasChange;
+			} catch (VPMCoreException e) {
+				logger.fatal("Error performing undo; message: "
+						+ e.getMessage());
+				// e.printStackTrace();

+			}
+		} while (!(note.getActionTypeEnum() == NotificationType.ACTION_ATOMIC_STEP_READY && wasChange));
+		if (!empty)
+			undoStack.push(note);
+		underUndo = false;
+		// if(checkConsistencyOn)

+		// ConsistencyChecker.check(modelSpace);

+	}
+
+	/**
+	 * Undoes all operations made after the last checkpoint with given name.
+	 * 
+	 * @param markName
+	 */
+	public void undo(String markName) {
+		underUndo = true;
+		// we are in an atomic step, we must undo until first atomic_step_ready

+		boolean wasChange = false;
+		// we have found the checkpoint mark, no more undo needed

+		boolean toLeave = false;
+		ICoreNotificationObject note = null;
+		do {
+			if (undoStack.isEmpty()) {
+				break;
+			}
+			note = undoStack.pop();
+			try {
+				wasChange = undoStep(note) || wasChange;
+			} catch (VPMCoreException e) {
+				logger.fatal("Error performing undo; message: "
+						+ e.getMessage());
+				// e.printStackTrace();

+			}
+			switch(note.getActionTypeEnum()){
+			
+			case ACTION_ATOMIC_STEP_READY:
+				wasChange = false;
+				break;
+				
+			case USER_MARK:
+				ICoreNotificationObjectUserMark _note = (ICoreNotificationObjectUserMark) note;
+				String name = _note.getMarkName();
+				if (name.equals(markName))
+					toLeave = true;
+				break;
+			
+			}
+			/*if (note.getActionType().equals(
+					ICoreNotificationObject.ACTION_ATOMIC_STEP_READY)) {
+				wasChange = false;
+			}
+			if (note.getActionType().equals(ICoreNotificationObject.USER_MARK)) {
+				ICoreNotificationObjectUserMark _note = (ICoreNotificationObjectUserMark) note;
+				String name = _note.getMarkName();
+				if (name.equals(markName))
+					toLeave = true;
+			}*/
+		} while (!toLeave || wasChange);
+		undoStack.push(new NotificationObjectAtomicStepReady());
+		underUndo = false;
+	}
+
+	/**
+	 * Undoes all operations made after the n. checkpoint with given name.
+	 * 
+	 * @param markName
+	 * @param n
+	 */
+	public void undo(String markName, int n) {
+		for (int i = 0; i < n; ++i)
+			undo(markName);
+	}
+
+	/**
+	 * Undoes the last n operations
+	 * 
+	 * @param n
+	 *            number of operations to be undone.
+	 */
+	public void undo(int n) {
+		for (int i = 0; i < n; ++i)
+			undo();
+	}
+
+	private boolean undoStep(ICoreNotificationObject note)
+			throws VPMCoreException {
+		// FIXME add transaction support!

+		NotificationType action = note.getActionTypeEnum();
+
+		switch(action){
+		
+		case ACTION_ATOMIC_STEP_READY:
+			return false;
+		case ACTION_CREATE_ENTITY:
+			ICoreNotificationObjectCreateEntity _note = (ICoreNotificationObjectCreateEntity) note;
+			
+			IEntity ent = _note.getCreated();
+			try {
+				mManager
+				.deleteEntity(ent, EDeleteSemantics.DELETE_SEMANTICS_FORCE);
+			} catch (Exception e) {
+				throw new VPMCoreRuntimeException("undo step failed"
+						+ e.toString() + e.getStackTrace());
+			}
+			return true;
+		case ACTION_DELETE_ENTITY:
+			ICoreNotificationObjectDeleteEntity _note1 = (ICoreNotificationObjectDeleteEntity) note;
+			IEntity ent1 = _note1.getDeleted();
+			IEntity parent = _note1.getParent();
+			mManager
+			.undoCreateEntity((SimpleEntity) ent1, (SimpleEntity) parent);
+			return true;
+		case ACTION_CREATE_RELATION:
+			ICoreNotificationObjectCreateRelation _note2 = (ICoreNotificationObjectCreateRelation) note;
+			IRelation rel = _note2.getNewRelation();
+			try {
+				mManager.deleteRelation(rel,
+						EDeleteSemantics.DELETE_SEMANTICS_FORCE);
+			} catch (Exception e) {
+				throw new VPMCoreRuntimeException("undo step failed"
+						+ e.toString() + e.getStackTrace());
+			}
+			return true;
+		case ACTION_DELETE_RELATION:
+			ICoreNotificationObjectDeleteRelation _note3 = (ICoreNotificationObjectDeleteRelation) note;
+			mManager.undoCreateRelation((SimpleRelation) _note3.getDeleted(),
+					(SimpleModelElement) _note3.getFrom(),
+					(SimpleModelElement) _note3.getTo());
+			return true;
+		case ACTION_CREATE_INSTANCEOF:
+			ICoreNotificationObjectCreateInstanceOf _note4 = (ICoreNotificationObjectCreateInstanceOf) note;
+			SimpleModelElement sup = (SimpleModelElement) _note4.getType();
+			SimpleModelElement sub = (SimpleModelElement) _note4.getInstance();
+			try {
+				mManager.deleteInstanceOfEditor(sup, sub);
+			} catch (VPMCoreNullParameterException e) {
+				logger.fatal("Error performing undo; message: "
+						+ e.getMessage());
+				// e.printStackTrace();

+			}
+			return true;
+		case ACTION_DELETE_INSTANCEOF:
+			ICoreNotificationObjectDeleteInstanceOf _note5 = (ICoreNotificationObjectDeleteInstanceOf) note;
+			sup = (SimpleModelElement) _note5.getType();
+			sub = (SimpleModelElement) _note5.getInstance();
+			try {
+				mManager.newInstanceOfEditor(sup, sub);
+			} catch (Exception e) {
+				logger.fatal("Error performing undo; message: "
+						+ e.getMessage());
+				// e.printStackTrace();

+			}
+			return true;
+		case ACTION_CREATE_SUPERTYPEOF:
+			ICoreNotificationObjectCreateSupertypeOf _note6 = (ICoreNotificationObjectCreateSupertypeOf) note;
+			sup = (SimpleModelElement) _note6.getSuper();
+			sub = (SimpleModelElement) _note6.getSub();
+			try {
+				mManager.deleteSupertypeOfEditor(sup, sub);
+			} catch (VPMCoreNullParameterException e) {
+				logger.fatal("Error performing undo; message: "
+						+ e.getMessage());
+				// e.printStackTrace();

+			}
+			return true;
+		case ACTION_DELETE_SUPERTYPEOF:
+			ICoreNotificationObjectDeleteSupertypeOf _note7 = (ICoreNotificationObjectDeleteSupertypeOf) note;
+			sup = (SimpleModelElement) _note7.getSuper();
+			sub = (SimpleModelElement) _note7.getSub();
+			try {
+				mManager.newSupertypeOfEditor(sup, sub);
+			} catch (VPMCoreException e) {
+				logger.fatal("Error performing undo; message: "
+						+ e.getMessage());
+				// e.printStackTrace();

+			}
+			return true;
+		case ACTION_DELETE_CONTAINMENT:
+			ICoreNotificationObjectDeleteContainment _note8 = (ICoreNotificationObjectDeleteContainment) note;
+			
+			SimpleEntity container = (SimpleEntity) _note8.getParent();
+			SimpleEntity child = (SimpleEntity) _note8.getChild();
+			try {
+				mManager.undoCreateContainment(container, child);
+			} catch (VPMCoreNullParameterException e) {
+				logger.fatal("Error performing undo; message: "
+						+ e.getMessage());
+				// e.printStackTrace();

+			}
+			return true;
+		case ACTION_SET_VALUE:
+			ICoreNotificationObjectSetValue _note9 = (ICoreNotificationObjectSetValue) note;
+			ent = (SimpleEntity) _note9.getEntity();
+			String oldValue = _note9.getOldValue();
+			try {
+				mManager.setValue(ent, oldValue);
+			} catch (VPMCoreNullParameterException e) {
+				logger.fatal("Error performing undo; message: "
+						+ e.getMessage());
+				// e.printStackTrace();

+			}
+			return true;
+		case ACTION_SET_NAME:
+			ICoreNotificationObjectSetName _note10 = (ICoreNotificationObjectSetName) note;
+			SimpleModelElement elem = (SimpleModelElement) _note10.getElement();
+			String oldName = _note10.getOldName();
+			try {
+				mManager.setName(elem, oldName);
+			} catch (VPMCoreNullParameterException e) {
+				logger.fatal("Error performing undo; message: "
+						+ e.getMessage());
+				// e.printStackTrace();

+			}
+			return true;
+		case ACTION_MOVE_ELEMENT_TO:
+			ICoreNotificationObjectMoveTo _note11 = (ICoreNotificationObjectMoveTo) note;
+			ent = (SimpleEntity) _note11.getElement();
+			SimpleEntity from = (SimpleEntity) _note11.getOldContainer();
+			try {
+				mManager.moveEntityTo(ent, from);
+			} catch (VPMCoreNullParameterException e) {
+				logger.fatal("Error performing undo; message: "
+						+ e.getMessage());
+				// e.printStackTrace();

+			}
+			return true;
+		case ACTION_SET_RELATION_FROM:
+			ICoreNotificationObjectSetRelationFrom _note12 = (ICoreNotificationObjectSetRelationFrom) note;
+			rel = (SimpleRelation) _note12.getRelation();
+			SimpleModelElement oldFrom = (SimpleModelElement) _note12
+			.getOldFrom();
+			try {
+				mManager.setRelationFrom(rel, oldFrom);
+			} catch (VPMCoreNullParameterException e) {
+				logger.fatal("Error performing undo; message: "
+						+ e.getMessage());
+				// e.printStackTrace();

+			}
+			return true;
+		case ACTION_SET_RELATION_TO:
+			ICoreNotificationObjectSetRelationTo _note13 = (ICoreNotificationObjectSetRelationTo) note;
+			rel = (SimpleRelation) _note13.getRelation();
+			SimpleModelElement oldTo = (SimpleModelElement) _note13.getOldTo();
+			try {
+				mManager.setRelationTo(rel, oldTo);
+			} catch (VPMCoreNullParameterException e) {
+				logger.fatal("Error performing undo; message: "
+						+ e.getMessage());
+				// e.printStackTrace();

+			}
+			return true;
+		case ACTION_SET_VIEW_INFO:
+			undoSetViewInfo((ICoreNotificationObjectSetViewInfo) note);
+			return true;
+		case USER_MARK:
+			return false;
+		}
+		/*
+		 * Added a comment to this code to stop the undo manager from throwing unnecessary error messages
+		 * which slowes down undo operations.
+		 throw new VPMCoreRuntimeException("undo step not defined for step:"
+				+ note.toString());
+		*/
+		//logger.warning("undo step not defined for step:"+ note.toString());
+		return false;
+	}
+
+	void undoSetViewInfo(ICoreNotificationObjectSetViewInfo note) {
+		IModelElement me = note.getElement();
+		String oldViewInfo = note.getOldViewInfo();
+		try {
+			mManager.setViewInfo(me, oldViewInfo);
+		} catch (VPMCoreException e) {
+			logger.fatal("Error performing undo; message: " + e.getMessage());
+			// e.printStackTrace();

+		}
+	}
+
+	/**
+	 * Gets a list of undoable operations currently in the undo buffer.
+	 * 
+	 * @return array of operation names
+	 */
+	public List<String> getUndoableList() {
+		ArrayList<String> undoList = new ArrayList<String>();
+		Iterator<ICoreNotificationObject> it = undoStack.iterator();
+		while (it.hasNext()) {
+			ICoreNotificationObject note = it.next();
+			undoList.add(note.toString());
+		}
+		return undoList;
+	}
+
+	public SimpleUndoManager() {
+		underUndo = false;
+		undoStack = new Stack<ICoreNotificationObject>();
+	}
+
+	/**
+	 * This method listens all actions and logs them into a stack for undo
+	 */
+	public void actionPerformed(ICoreNotificationObject notification) {
+		// if(notification.getActionType()==ICoreNotificationObject.
+		// ACTION_ATOMIC_STEP_READY)

+		// {

+		// if(checkConsistencyOn)

+		// ConsistencyChecker.check(modelSpace);

+		// }

+		NotificationType type = notification.getActionTypeEnum();
+		switch(type){
+		
+		case TA_SUBTRANSACTION_BEGIN:
+		case TA_SUBTRANSACTION_END:
+		case TA_TRANSACTION_BEGIN:
+		case TA_TRANSACTION_END:
+		case TA_UNDOABLE_TRANSACTION_BEGIN:
+			return;
+		}
+		/*if (type.equals(ICoreNotificationObject.TA_SUBTRANSACTION_BEGIN)
+				|| type.equals(ICoreNotificationObject.TA_SUBTRANSACTION_END)
+				|| type.equals(ICoreNotificationObject.TA_TRANSACTION_BEGIN)
+				|| type.equals(ICoreNotificationObject.TA_TRANSACTION_END)
+				|| type
+						.equals(ICoreNotificationObject.TA_UNDOABLE_TRANSACTION_BEGIN))
+			return;*/
+		if (!underUndo)
+			undoStack.add(notification);
+	}
+
+	/**
+	 * Returns the category of this listener.
+	 * 
+	 * @return category
+	 */
+	public int getListenerCategory() {
+		return ICoreNotificationListener.UNDO_LISTENER;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.core.IUndoManager#getUndoList(int)
+	 */
+	public List<String> getUndoList(int n) {
+		int count = 0;
+		ArrayList<String> ret = new ArrayList<String>();
+		int last = undoStack.size();
+		while (count < n) {
+			ICoreNotificationObject note = undoStack
+					.get(--last);
+			if (note.getActionTypeEnum().equals(NotificationType.USER_MARK)) {
+				ret.add(((ICoreNotificationObjectUserMark) note).getMarkName());
+				count++;
+			}
+			if (last == 0)
+				break;
+		}
+		return ret;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SmallTreeSet.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SmallTreeSet.java
new file mode 100644
index 0000000..9935e07
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SmallTreeSet.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.TreeSet;
+
+/**
+ * @author Andras Schmidt
+ * @param <E>
+ *
+ */
+public class SmallTreeSet<E> implements Set<E> {
+	TreeSet<E> set = null;
+
+	public int size() {
+		if (set == null) {
+			return 0;
+		} else
+			return set.size();
+	}
+
+	public boolean isEmpty() {
+		if (set == null)
+			return true;
+		else
+			return set.isEmpty();
+
+	}
+
+	public boolean contains(Object arg0) {
+		if (set == null)
+			return false;
+		else
+			return set.contains(arg0);
+	}
+
+	class NullIterator<F> implements Iterator<F> {
+		public boolean hasNext() {
+			return false;
+		}
+
+		public F next() {
+			return null;
+		}
+
+		public void remove() {
+		}
+	}
+
+	public Iterator<E> iterator() {
+		if (set == null)
+			return new NullIterator<E>();
+		else
+			return set.iterator();
+	}
+
+	public Object[] toArray() {
+		if (set == null)
+			return new Object[0];
+		else
+			return set.toArray();
+	}
+
+	public <T> T[] toArray(T[] arg0) {
+		if (set == null)
+			return arg0;
+		else
+			return set.toArray(arg0);
+	}
+
+	public boolean add(E arg0) {
+		if (set == null) {
+			set = new TreeSet<E>();
+			return set.add(arg0);
+		} else
+			return set.add(arg0);
+	}
+
+	public boolean remove(Object arg0) {
+		if (set == null)
+			return false;
+		else {
+			boolean ret = set.remove(arg0);
+			if (set.size() == 0)
+				set = null;
+			return ret;
+		}
+	}
+
+	public boolean containsAll(Collection arg0) {
+		if (set == null) {
+			return arg0.size() == 0;
+		} else {
+			return set.containsAll(arg0);
+		}
+	}
+
+	public boolean addAll(Collection<? extends E> arg0) {
+		if (set == null) {
+			if (arg0.size() != 0) {
+				set = new TreeSet<E>();
+				return set.addAll(arg0);
+			} else
+				return false;
+		} else {
+			return set.addAll(arg0);
+		}
+	}
+
+	public boolean retainAll(Collection arg0) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean removeAll(Collection arg0) {
+		if (set == null) {
+			return false;
+		} else {
+			boolean ret = set.removeAll(arg0);
+			if (set.size() == 0)
+				set = null;
+			return ret;
+		}
+	}
+
+	public void clear() {
+		if (set == null)
+			return;
+		else
+			set.clear();
+	}
+
+	public boolean equals(Object o) {
+		if (o instanceof Set) {
+			Set ob = (Set) o;
+			if (set == null) {
+				return ob.size() == 0;
+			} else
+				return set.equals(ob);
+		} else {
+			return false;
+		}
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SmallTreeSet2.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SmallTreeSet2.java
new file mode 100644
index 0000000..9ab7cc7
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/SmallTreeSet2.java
@@ -0,0 +1,194 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.TreeSet;
+
+/**
+ * @author Andras Schmidt
+ * @param <T>
+ *
+ */
+public class SmallTreeSet2<T> implements Set<T> {
+	TreeSet<T> set = null;
+
+	T o = null;
+
+	public int size() {
+		if (set == null) {
+			return o == null ? 0 : 1;
+		} else
+			return set.size();
+	}
+
+	public boolean isEmpty() {
+		if (set == null)
+			return o == null;
+		else
+			return set.isEmpty();
+
+	}
+
+	public boolean contains(Object arg0) {
+		if (set == null) {
+			if (o != null)
+				return arg0.equals(o);
+			else
+				return false;
+		} else
+			return set.contains(arg0);
+	}
+
+	/*
+	 * class OneIterator<E> implements Iterator { E o; OneIterator(E o) {
+	 * this.o=o; } public boolean hasNext() { return o!=null;} public E next() {
+	 * E ret=o; o=null; return ret;} public void remove() {} }
+	 */
+	public Iterator<T> iterator() {
+		if (set == null) {
+			return new OneIterator<T>(o);
+		} else
+			return set.iterator();
+	}
+
+	public Object[] toArray() {
+		if (set == null) {
+			if (o == null) {
+				return new Object[0];
+			} else {
+				Object[] ret = new Object[1];
+				ret[0] = o;
+				return ret;
+			}
+		} else
+			return set.toArray();
+	}
+
+	public <K> K[] toArray(K[] arg0) {
+		/*
+		 * if(set==null) { if(o!=null) { Object x=o; arg0[0]=(K)x; } return
+		 * arg0; } else return set.toArray(arg0);
+		 */
+		return null;
+	}
+
+	public boolean add(T arg0) {
+		if (set == null) {
+			if (o == null) {
+				o = arg0;
+				return true;
+			} else {
+				if (o.equals(arg0)) {
+					return false;
+				} else {
+					set = new TreeSet<T>();
+					set.add(o);
+					o = null;
+					return set.add(arg0);
+				}
+			}
+		} else
+			return set.add(arg0);
+	}
+
+	public boolean remove(Object arg0) {
+		if (set == null) {
+			if (o != null && o.equals(arg0)) {
+				o = null;
+				return true;
+			} else
+				return false;
+		} else {
+			boolean ret = set.remove(arg0);
+			if (set.size() == 0) {
+				set = null;
+			} else if (set.size() == 1) {
+				o = set.iterator().next();
+				set = null;
+			}
+			return ret;
+		}
+	}
+
+	public boolean containsAll(Collection arg0) {
+		if (set == null) {
+			if (o != null) {
+				if (arg0.size() == 1) {
+					return arg0.iterator().next().equals(o);
+				} else
+					return false;
+			} else {
+				return arg0.size() == 0;
+			}
+		} else {
+			return set.containsAll(arg0);
+		}
+	}
+
+	public boolean addAll(Collection<? extends T> arg0) {
+		if (set == null) {
+			if (arg0.size() > 1) {
+				set = new TreeSet<T>();
+				return set.addAll(arg0);
+			} else if (arg0.size() == 1) {
+				o = arg0.iterator().next();
+				return true;
+			} else
+				return false;
+		} else {
+			return set.addAll(arg0);
+		}
+	}
+
+	public boolean retainAll(Collection arg0) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean removeAll(Collection arg0) {
+		throw new UnsupportedOperationException();
+		/*
+		 * if(set==null) { return false; } else { boolean
+		 * ret=set.removeAll(arg0); if(set.size()==0) set=null; return ret; }
+		 */
+	}
+
+	public void clear() {
+		if (set == null) {
+			o = null;
+			return;
+		} else
+			set.clear();
+	}
+
+	public boolean equals(Object o) {
+		if (o == null) {
+			return set == null;
+		} if (o instanceof Set<?>) {
+			Set<?> ob = (Set<?>) o;
+			if (set == null) {
+				return ob.size() == 0;
+			} else if (set == null) {
+				if (ob.size() == 1)
+					return ob.iterator().next().equals(o);
+				else
+					return false;
+			} else
+				return set.equals(ob);
+		} else {
+			return false;
+		}
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/UniqueNameProvider.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/UniqueNameProvider.java
new file mode 100644
index 0000000..d7742bd
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/UniqueNameProvider.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple;
+
+import java.util.Random;
+
+/**
+ * This class provides unique names. All used names must be notified to this
+ * object. The returned name is guaranteed to be unique.
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public class UniqueNameProvider {
+	Random random;
+
+
+
+	public UniqueNameProvider() {
+		random = new Random();
+		runningInstanceStamp = "_" + randomString(1);
+	}
+
+	public String byteToHex(byte _b) {
+		int b = _b;
+		b &= 0xFF; // automatic conversion converts bytes as if they were signed

+		String ret = Integer.toHexString(b);
+		if (ret.length() == 1)
+			ret = '0' + ret;
+		return ret;
+	}
+
+	public String randomString(int len) {
+		String retStr = "";
+		byte[] bytes = new byte[len];
+		random.nextBytes(bytes);
+		for (int i = 0; i < len; ++i) {
+			retStr += byteToHex(bytes[i]);
+		}
+		return retStr;
+	}
+
+	public String uniqueName(String s) {
+		return s + uniqueName();
+	}
+
+	public String uniqueName() {
+		// TODO no guarantee, just probable

+		return "uN" + (counter++) + runningInstanceStamp;
+	}
+
+	private int counter = 0;
+
+	private String runningInstanceStamp = "";
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/VPMCoreInternalRuntimeException.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/VPMCoreInternalRuntimeException.java
new file mode 100644
index 0000000..1f3d70b
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/VPMCoreInternalRuntimeException.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple;
+
+/**
+ * Inernal exception of the core. Means an error in the code implementation.
+ * Should never be thrown.
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public class VPMCoreInternalRuntimeException extends RuntimeException {
+	/**

+	 * 

+	 */
+	private static final long serialVersionUID = 9122506795115502943L;
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/cache/TrickyCollection.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/cache/TrickyCollection.java
new file mode 100644
index 0000000..6205101
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/cache/TrickyCollection.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.cache;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.simple.SimpleEntity;
+
+public class TrickyCollection implements Collection<IModelElement> {
+
+	private SimpleEntity owner;
+
+	private Collection<IModelElement> col;
+
+	public TrickyCollection(Collection<IModelElement> c, SimpleEntity o) {
+		col = c;
+		owner = o;
+	}
+
+	public boolean add(IModelElement arg0) {
+		return false;
+	}
+
+	public boolean addAll(Collection arg0) {
+		return false;
+	}
+
+	public void clear() {
+
+	}
+
+	public boolean contains(Object arg0) {
+		IModelElement me = (IModelElement) arg0;
+		return me.isBelowNamespace(owner);
+	}
+
+	public boolean containsAll(Collection arg0) {
+		if (col == null) {
+			col = owner._getAllComponents();
+		}
+		return col.containsAll(arg0);
+	}
+
+	public boolean isEmpty() {
+		if (col == null) {
+			col = owner._getAllComponents();
+		}
+		return col.isEmpty();
+	}
+
+	public Iterator<IModelElement> iterator() {
+		if (col == null) {
+			col = owner._getAllComponents();
+		}
+		return col.iterator();
+	}
+
+	public boolean remove(Object arg0) {
+		return false;
+	}
+
+	public boolean removeAll(Collection arg0) {
+		return false;
+	}
+
+	public boolean retainAll(Collection arg0) {
+		return false;
+	}
+
+	public int size() {
+		if (col == null) {
+			col = owner._getAllComponents();
+		}
+		return col.size();
+	}
+
+	public Object[] toArray() {
+		if (col == null) {
+			col = owner._getAllComponents();
+		}
+		return col.toArray();
+	}
+
+	public Object[] toArray(Object[] arg0) {
+		if (col == null) {
+			col = owner._getAllComponents();
+		}
+		return col.toArray(arg0);
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/constraint/ConstraintTranslator.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/constraint/ConstraintTranslator.java
new file mode 100644
index 0000000..411a56b
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/constraint/ConstraintTranslator.java
@@ -0,0 +1,162 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.constraint;
+
+import org.eclipse.viatra2.core.constraint.EConstraint;
+import org.eclipse.viatra2.core.constraint.IConstraint;
+
+/**
+ * Translates old fashioned integer constraint constats to new enumerations.
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public class ConstraintTranslator {
+	public static EConstraint getConst(int c) {
+		return EConstraint.values()[c];
+	}
+
+	/**
+	 * Get the old fashion constrait constant
+	 * 
+	 * @param c
+	 *            constraint type
+	 * @return constraint type in old fashion
+	 */
+	public static int getConst(EConstraint c) {
+		switch (c) {
+		case BELOW:
+			return IConstraint.BELOW;
+		case DINSTANCE:
+			return IConstraint.DINSTANCE;
+		case CHILD:
+			return IConstraint.CHILD;
+		case DSUBTYPE:
+			return IConstraint.DSUBTYPE;
+		case DSUPERTYPE:
+			return IConstraint.DSUPERTYPE;
+		case DTYPE:
+			return IConstraint.DTYPE;
+		case ENTITY:
+			return IConstraint.ENTITY;
+		case ENTITY_REL_FROM:
+			return IConstraint.REL_FROM;
+		case ENTITY_REL_TO:
+			return IConstraint.ENTITY_REL_TO;
+		case INSTANCE:
+			return IConstraint.INSTANCE;
+		case OVER:
+			return IConstraint.OVER;
+		case PARENT:
+			return IConstraint.PARENT;
+		case REL_FROM:
+			return IConstraint.REL_FROM;
+		case REL_TO:
+			return IConstraint.REL_TO;
+		case RELATION:
+			return IConstraint.RELATION;
+		case SUBTYPE:
+			return IConstraint.SUBTYPE;
+		case SUPERTYPE:
+			return IConstraint.SUPERTYPE;
+		case TYPE:
+			return IConstraint.TYPE;
+		}
+		return 0;
+	}
+
+	/**
+	 * Get the other side constrait constant
+	 * 
+	 * @param c
+	 *            constraint type
+	 * @return constraint type from the other side
+	 */
+	public static EConstraint getOtherSide(EConstraint c) {
+		switch (c) {
+		case BELOW:
+			return EConstraint.OVER;
+		case DINSTANCE:
+			return EConstraint.DTYPE;
+		case CHILD:
+			return EConstraint.PARENT;
+		case DSUBTYPE:
+			return EConstraint.DSUPERTYPE;
+		case DSUPERTYPE:
+			return EConstraint.DSUBTYPE;
+		case DTYPE:
+			return EConstraint.DINSTANCE;
+		case ENTITY:
+			return EConstraint.ENTITY;
+		case ENTITY_REL_FROM:
+			return EConstraint.REL_FROM;
+		case ENTITY_REL_TO:
+			return EConstraint.REL_TO;
+		case INSTANCE:
+			return EConstraint.TYPE;
+		case OVER:
+			return EConstraint.BELOW;
+		case PARENT:
+			return EConstraint.CHILD;
+		case REL_FROM:
+			return EConstraint.ENTITY_REL_FROM;
+		case REL_TO:
+			return EConstraint.ENTITY_REL_TO;
+		case RELATION:
+			return EConstraint.RELATION;
+		case SUBTYPE:
+			return EConstraint.SUPERTYPE;
+		case SUPERTYPE:
+			return EConstraint.SUBTYPE;
+		case TYPE:
+			return EConstraint.INSTANCE;
+		}
+		return null;
+	}
+
+	int i;
+
+	/**
+	 * query if this constraint is "canonical". All types are only "canonical"
+	 * in one direction.
+	 * 
+	 * @param c
+	 *            constraint type
+	 * @return is canonical
+	 */
+	public static boolean isOtherSide(EConstraint c) {
+		switch (c) {
+		case BELOW:
+		case DINSTANCE:
+		case DSUBTYPE:
+		case SUBTYPE:
+		case INSTANCE:
+		case CHILD:
+		case ENTITY:
+		case RELATION:
+		case REL_FROM:
+		case REL_TO:
+			return false;
+		case DSUPERTYPE:
+		case DTYPE:
+		case ENTITY_REL_FROM:
+		case ENTITY_REL_TO:
+		case OVER:
+		case PARENT:
+		case SUPERTYPE:
+		case TYPE:
+		default:
+			return true;
+		}
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObject.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObject.java
new file mode 100644
index 0000000..5540909
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObject.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.viatra2.core.ICoreNotificationListener;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;
+import org.eclipse.viatra2.core.simple.SimpleModelElement;
+
+/**
+ * The base class implementing the Viatra Notification object. It is essentially
+ * a data transfer object (DTO), serving as the basis of communication.
+ * 
+ * @author Andras Schmidt
+ * 
+ *         Modified on 2006.08.09 by Istvan Rath: - cleaned up javadoc
+ */
+public abstract class NotificationObject implements ICoreNotificationObject {
+	String type = "";
+
+	Set<ICoreNotificationListener> listeners = new HashSet<ICoreNotificationListener>();
+
+	Set<IModelElement> notifiedObjects = new HashSet<IModelElement>();
+
+	public IModelElement getModelElement() {
+		return null;
+	}
+
+	public String getActionType() {
+		return getActionTypeEnum().toString();
+	}
+	
+	public Collection<ICoreNotificationListener> getListeners() {
+		return listeners;
+	}
+
+	public String toString() {
+		return getActionTypeEnum().toString();
+	}
+
+	void addListener(IModelElement me) {
+		if (me != null) {
+			notifiedObjects.add(me);
+			if (me instanceof SimpleModelElement)
+				listeners.addAll(((SimpleModelElement) me)
+						.getNotificationListeners());
+		}
+	}
+
+	public Collection<IModelElement> getNotifiedObjects() {
+		return notifiedObjects;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectAtomicStepReady.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectAtomicStepReady.java
new file mode 100644
index 0000000..9152c1c
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectAtomicStepReady.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+
+/**
+ * @author Andras Schmidt
+ *
+ */
+public class NotificationObjectAtomicStepReady extends NotificationObject {
+	
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.ACTION_ATOMIC_STEP_READY;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectCreateEntity.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectCreateEntity.java
new file mode 100644
index 0000000..699a299
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectCreateEntity.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateEntity;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+/**
+ * @author Andras Schmidt
+ *
+ */
+public class NotificationObjectCreateEntity extends NotificationObject
+		implements ICoreNotificationObjectCreateEntity {
+	String name;
+
+	String value;
+
+	IEntity created;
+
+	IEntity container;
+
+	public NotificationObjectCreateEntity(IEntity created, IEntity container) {
+		this.name = created.getName();
+		this.value = created.getValue();
+		this.created = created;
+		this.container = container;
+		addListener(created);
+		addListener(container);
+	}
+
+	public IEntity getContainer() {
+		return container;
+	}
+
+	public IEntity getCreated() {
+		return created;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public String getValue() {
+		return value;
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		return NotificationType.ACTION_CREATE_ENTITY;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectCreateInstanceOf.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectCreateInstanceOf.java
new file mode 100644
index 0000000..e3aa4d1
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectCreateInstanceOf.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateInstanceOf;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+/**
+ * @author Andras Schmidt
+ *
+ */
+public class NotificationObjectCreateInstanceOf extends NotificationObject
+		implements ICoreNotificationObjectCreateInstanceOf {
+	IModelElement type;
+
+	IModelElement inst;
+
+	public NotificationObjectCreateInstanceOf(IModelElement type,
+			IModelElement inst) {
+		this.type = type;
+		this.inst = inst;
+		addListener(type);
+		addListener(inst);
+	}
+
+	public IModelElement getType() {
+		return type;
+	}
+
+	public IModelElement getInstance() {
+		return inst;
+	}
+	
+	@Override
+	public NotificationType getActionTypeEnum() {
+		return NotificationType.ACTION_CREATE_INSTANCEOF;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectCreateRelation.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectCreateRelation.java
new file mode 100644
index 0000000..d036319
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectCreateRelation.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateRelation;
+import org.eclipse.viatra2.core.notification.NotificationType;
+import org.eclipse.viatra2.core.simple.SimpleModelElement;
+import org.eclipse.viatra2.core.simple.SimpleRelation;
+
+/**
+ * @author Andras Schmidt
+ *
+ */
+public class NotificationObjectCreateRelation extends NotificationObject
+		implements ICoreNotificationObjectCreateRelation {
+	SimpleRelation relation;
+
+	SimpleModelElement from;
+
+	SimpleModelElement to;
+
+	String name;
+
+	public NotificationObjectCreateRelation(SimpleRelation relation,
+			SimpleModelElement from, SimpleModelElement to) {
+		this.relation = relation;
+		this.from = from;
+		this.to = to;
+		name = relation.getName();
+		addListener(relation);
+		addListener(from);
+		addListener(to);
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.ACTION_CREATE_RELATION;
+	}
+	
+	public IModelElement getFrom() {
+		return from;
+	}
+
+	public IModelElement getTo() {
+		return to;
+	}
+
+	public IRelation getNewRelation() {
+		return relation;
+	}
+
+	public String getName() {
+		return name;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectCreateSupertypeOf.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectCreateSupertypeOf.java
new file mode 100644
index 0000000..b789364
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectCreateSupertypeOf.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateSupertypeOf;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+/**
+ * @author Andras Schmidt
+ *
+ */
+public class NotificationObjectCreateSupertypeOf extends NotificationObject
+		implements ICoreNotificationObjectCreateSupertypeOf {
+	IModelElement sup;
+
+	IModelElement sub;
+
+	public NotificationObjectCreateSupertypeOf(IModelElement sup,
+			IModelElement sub) {
+		this.sup = sup;
+		this.sub = sub;
+		addListener(sup);
+		addListener(sub);
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		return NotificationType.ACTION_CREATE_SUPERTYPEOF;
+	}
+	
+	public IModelElement getSuper() {
+		return sup;
+	}
+
+	public IModelElement getSub() {
+		return sub;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectDeleteContainment.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectDeleteContainment.java
new file mode 100644
index 0000000..28a2b48
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectDeleteContainment.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteContainment;
+import org.eclipse.viatra2.core.notification.NotificationType;
+import org.eclipse.viatra2.core.simple.SimpleEntity;
+import org.eclipse.viatra2.core.simple.SimpleModelElement;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public class NotificationObjectDeleteContainment extends NotificationObject
+		implements ICoreNotificationObjectDeleteContainment {
+	SimpleEntity parent;
+
+	SimpleModelElement child;
+
+	/**

+	 * 

+	 */
+	public NotificationObjectDeleteContainment(SimpleEntity parent,
+			SimpleModelElement child) {
+		this.parent = parent;
+		this.child = child;
+		addListener(parent);
+		addListener(child);
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		return NotificationType.ACTION_DELETE_CONTAINMENT;
+	}
+
+	public IEntity getParent() {
+		return parent;
+	}
+
+	public IModelElement getChild() {
+		return child;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectDeleteEntity.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectDeleteEntity.java
new file mode 100644
index 0000000..f29d15d
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectDeleteEntity.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteEntity;
+import org.eclipse.viatra2.core.notification.NotificationType;
+import org.eclipse.viatra2.core.simple.SimpleEntity;
+
+/**
+ * @author Andras Schmidt
+ *
+ */
+public class NotificationObjectDeleteEntity extends NotificationObject
+		implements ICoreNotificationObjectDeleteEntity {
+	String name;
+
+	String value;
+
+	SimpleEntity deleted;
+
+	SimpleEntity parent;
+
+	public NotificationObjectDeleteEntity(SimpleEntity deleted,
+			SimpleEntity parent) {
+		this.deleted = deleted;
+		this.parent = parent;
+		name = deleted.getName();
+		value = deleted.getValue();
+		addListener(deleted);
+		addListener(parent);
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		return NotificationType.ACTION_DELETE_ENTITY;
+	}
+
+	public IEntity getDeleted() {
+		return deleted;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public String getValue() {
+		return value;
+	}
+
+	public IEntity getParent() {
+		return parent;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectDeleteInstanceOf.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectDeleteInstanceOf.java
new file mode 100644
index 0000000..e8ab98f
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectDeleteInstanceOf.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteInstanceOf;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+/**
+ * @author Andras Schmidt
+ *
+ */
+public class NotificationObjectDeleteInstanceOf extends NotificationObject
+		implements ICoreNotificationObjectDeleteInstanceOf {
+	IModelElement type;
+
+	IModelElement inst;
+
+	public NotificationObjectDeleteInstanceOf(IModelElement type,
+			IModelElement inst) {
+		this.type = type;
+		this.inst = inst;
+		addListener(type);
+		addListener(inst);
+
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		return NotificationType.ACTION_DELETE_INSTANCEOF;
+	}
+
+	public IModelElement getType() {
+		return type;
+	}
+
+	public IModelElement getInstance() {
+		return inst;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectDeleteRelation.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectDeleteRelation.java
new file mode 100644
index 0000000..3b84205
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectDeleteRelation.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteRelation;
+import org.eclipse.viatra2.core.notification.NotificationType;
+import org.eclipse.viatra2.core.simple.SimpleModelElement;
+import org.eclipse.viatra2.core.simple.SimpleRelation;
+
+/**
+ * @author Andras Schmidt
+ *
+ */
+public class NotificationObjectDeleteRelation extends NotificationObject
+		implements ICoreNotificationObjectDeleteRelation {
+	String name;
+
+	SimpleRelation deleted;
+
+	SimpleModelElement from;
+
+	SimpleModelElement to;
+
+	public NotificationObjectDeleteRelation(SimpleRelation deleted,
+			SimpleModelElement from, SimpleModelElement to) {
+		this.deleted = deleted;
+		this.from = from;
+		this.to = to;
+		name = deleted.getName();
+		addListener(deleted);
+		addListener(from);
+		addListener(to);
+	}
+
+	public NotificationType getActionTypeEnum() {
+		return NotificationType.ACTION_DELETE_RELATION;
+	}
+
+	public IRelation getDeleted() {
+		return deleted;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public IModelElement getFrom() {
+		return from;
+	}
+
+	public IModelElement getTo() {
+		return to;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectDeleteSupertypeOf.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectDeleteSupertypeOf.java
new file mode 100644
index 0000000..093124a
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectDeleteSupertypeOf.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteSupertypeOf;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+/**
+ * @author Andras Schmidt
+ *
+ */
+public class NotificationObjectDeleteSupertypeOf extends NotificationObject
+		implements ICoreNotificationObjectDeleteSupertypeOf {
+	IModelElement sup;
+
+	IModelElement sub;
+
+	public NotificationObjectDeleteSupertypeOf(IModelElement sup,
+			IModelElement sub) {
+		this.sup = sup;
+		this.sub = sub;
+		addListener(sup);
+		addListener(sub);
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.ACTION_DELETE_SUPERTYPEOF;
+	}
+
+	public IModelElement getSuper() {
+		return sup;
+	}
+
+	public IModelElement getSub() {
+		return sub;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectMoreAtomicsToOneAtomEnd.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectMoreAtomicsToOneAtomEnd.java
new file mode 100644
index 0000000..1f56b02
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectMoreAtomicsToOneAtomEnd.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+
+/**
+ * @author Andras Schmidt
+ */
+public class NotificationObjectMoreAtomicsToOneAtomEnd extends
+		NotificationObject {
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.ACTION_MORE_ATOMICS_TO_ONE_ATOM_END;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectMoreAtomicsToOneAtomStart.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectMoreAtomicsToOneAtomStart.java
new file mode 100644
index 0000000..0814ded
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectMoreAtomicsToOneAtomStart.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+
+/**
+ * @author Andras Schmidt
+ *
+ */
+public class NotificationObjectMoreAtomicsToOneAtomStart extends
+		NotificationObject {
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.ACTION_MORE_ATOMICS_TO_ONE_ATOM_START;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectMoveTo.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectMoveTo.java
new file mode 100644
index 0000000..51bd837
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectMoveTo.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectMoveTo;
+import org.eclipse.viatra2.core.notification.NotificationType;
+import org.eclipse.viatra2.core.simple.SimpleEntity;
+
+/**
+ * @author Andras Schmidt
+ *
+ */
+public class NotificationObjectMoveTo extends NotificationObject implements
+		ICoreNotificationObjectMoveTo {
+	SimpleEntity newCont;
+
+	SimpleEntity oldCont;
+
+	SimpleEntity elem;
+
+	public NotificationObjectMoveTo(SimpleEntity elem, SimpleEntity newCont,
+			SimpleEntity oldCont) {
+		this.newCont = newCont;
+		this.oldCont = oldCont;
+		this.elem = elem;
+		addListener(newCont);
+		addListener(oldCont);
+		addListener(elem);
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.ACTION_MOVE_ELEMENT_TO;
+	}
+	
+	public IEntity getNewContainer() {
+		return newCont;
+	}
+
+	public IEntity getElement() {
+		return elem;
+	}
+
+	public IEntity getOldContainer() {
+		return oldCont;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetIsAny.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetIsAny.java
new file mode 100644
index 0000000..8ab2eb7
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetIsAny.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetIsAny;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+public class NotificationObjectSetIsAny extends NotificationObject implements
+		ICoreNotificationObjectSetIsAny {
+
+	IRelation me;
+
+	boolean isAny;
+
+	boolean isAnyOld;
+
+	boolean isFromSide;
+
+	public NotificationObjectSetIsAny(IRelation me, boolean isAny,
+			boolean isFromSide, boolean isAnyOld) {
+		this.me = me;
+		this.isAny = isAny;
+		this.isFromSide = isFromSide;
+		addListener(me);
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.ACTION_SET_ISANY;
+	}
+
+	public IModelElement getRelation() {
+		return me;
+	}
+
+	public boolean getIsAny() {
+		return isAny;
+	}
+
+	public boolean getIsFromSideSet() {
+		return isFromSide;
+	}
+
+	public boolean getIsAnyOld() {
+		return isAnyOld;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetIsFinalType.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetIsFinalType.java
new file mode 100644
index 0000000..a10535c
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetIsFinalType.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetIsFinalType;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+/**
+ * 
+ * @author Istvan Rath
+ * 
+ */
+public class NotificationObjectSetIsFinalType extends NotificationObject
+		implements ICoreNotificationObjectSetIsFinalType {
+
+	IModelElement me;
+
+	boolean isfinaltype;
+
+	boolean isfinaltypeOld;
+
+	public NotificationObjectSetIsFinalType(IModelElement me,
+			boolean isfinaltype, boolean isfinalTypeOld) {
+		this.me = me;
+		this.isfinaltype = isfinaltype;
+		this.isfinaltypeOld = isfinalTypeOld;
+		addListener(me);
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.ACTION_SET_ISFINALTYPE;
+	}
+	
+	public IModelElement getElement() {
+		return me;
+	}
+
+	public boolean getIsFinalType() {
+		return isfinaltype;
+	}
+
+	public boolean getIsFinalTypeOld() {
+		return isfinaltypeOld;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetName.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetName.java
new file mode 100644
index 0000000..7f6bc39
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetName.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetName;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public class NotificationObjectSetName extends NotificationObject implements
+		ICoreNotificationObjectSetName {
+	String newName;
+
+	String oldName;
+
+	IModelElement me;
+
+	public NotificationObjectSetName(IModelElement me, String newName,
+			String oldName) {
+		this.me = me;
+		this.newName = newName;
+		this.oldName = oldName;
+		addListener(me);
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.ACTION_SET_NAME;
+	}
+	
+	public String getNewName() {
+		return newName;
+	}
+
+	public String getOldName() {
+		return oldName;
+	}
+
+	public IModelElement getElement() {
+		return me;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetRelationFrom.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetRelationFrom.java
new file mode 100644
index 0000000..b38440c
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetRelationFrom.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetRelationFrom;
+import org.eclipse.viatra2.core.notification.NotificationType;
+import org.eclipse.viatra2.core.simple.SimpleModelElement;
+import org.eclipse.viatra2.core.simple.SimpleRelation;
+
+/**
+ * @author Andras Schmidt
+ *
+ */
+public class NotificationObjectSetRelationFrom extends NotificationObject
+		implements ICoreNotificationObjectSetRelationFrom {
+	SimpleRelation rel;
+
+	SimpleModelElement oldFrom;
+
+	SimpleModelElement newFrom;
+
+	public NotificationObjectSetRelationFrom(SimpleRelation rel,
+			SimpleModelElement oldFrom, SimpleModelElement newFrom) {
+		this.rel = rel;
+		this.oldFrom = oldFrom;
+		this.newFrom = newFrom;
+		addListener(rel);
+		addListener(oldFrom);
+		addListener(newFrom);
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.ACTION_SET_RELATION_FROM;
+	}
+
+	public IRelation getRelation() {
+		return rel;
+	}
+
+	public IModelElement getOldFrom() {
+		return oldFrom;
+	}
+
+	public IModelElement getNewFrom() {
+		return newFrom;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetRelationInverse.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetRelationInverse.java
new file mode 100644
index 0000000..3de4344
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetRelationInverse.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetRelationInverse;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+/**
+ * 
+ * @author Istvan Rath
+ * 
+ */
+public class NotificationObjectSetRelationInverse extends NotificationObject
+		implements ICoreNotificationObjectSetRelationInverse {
+
+	IRelation rel;
+
+	IRelation inv;
+
+	public NotificationObjectSetRelationInverse(IRelation rel, IRelation inverse) {
+		this.rel = rel;
+		this.inv = inverse;
+		addListener(rel);
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.ACTION_SET_RELATION_INVERSE;
+	}
+
+	public IRelation getRelation() {
+		return rel;
+	}
+
+	public IRelation getInverse() {
+		return inv;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetRelationIsAggregation.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetRelationIsAggregation.java
new file mode 100644
index 0000000..dd5b593
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetRelationIsAggregation.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetRelationIsAggregation;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+/**
+ * 
+ * @author Istvan Rath
+ * 
+ */
+public class NotificationObjectSetRelationIsAggregation extends
+		NotificationObject implements
+		ICoreNotificationObjectSetRelationIsAggregation {
+
+	IRelation rel;
+
+	boolean isagg;
+
+	public NotificationObjectSetRelationIsAggregation(IRelation rel,
+			boolean isaggregation) {
+		this.rel = rel;
+		this.isagg = isaggregation;
+		addListener(rel);
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.ACTION_SET_RELATION_ISAGGREGATION;
+	}
+
+	public IRelation getRelation() {
+		return rel;
+	}
+
+	public boolean getIsAggregation() {
+		return isagg;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetRelationMultiplicity.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetRelationMultiplicity.java
new file mode 100644
index 0000000..b9956b7
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetRelationMultiplicity.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.EMultiplicityKind;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetRelationMultiplicity;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+/**
+ * @author Andras Schmidt, Istvan Rath
+ * 
+ */
+public class NotificationObjectSetRelationMultiplicity extends
+		NotificationObject implements
+		ICoreNotificationObjectSetRelationMultiplicity {
+
+	IRelation rel;
+
+	EMultiplicityKind multi;
+
+	public NotificationObjectSetRelationMultiplicity(IRelation rel,
+			EMultiplicityKind multiplicity) {
+		this.multi = multiplicity;
+		this.rel = rel;
+		addListener(rel);
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.ACTION_SET_RELATION_MULTIPLICITY;
+	}
+
+	public IRelation getRelation() {
+		return rel;
+	}
+
+	public EMultiplicityKind getMultiplicity() {
+		return multi;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetRelationTo.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetRelationTo.java
new file mode 100644
index 0000000..ba39a43
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetRelationTo.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetRelationTo;
+import org.eclipse.viatra2.core.notification.NotificationType;
+import org.eclipse.viatra2.core.simple.SimpleModelElement;
+import org.eclipse.viatra2.core.simple.SimpleRelation;
+
+/**
+ * @author Andras Schmidt
+ *
+ */
+public class NotificationObjectSetRelationTo extends NotificationObject
+		implements ICoreNotificationObjectSetRelationTo {
+	SimpleRelation rel;
+
+	SimpleModelElement oldTo;
+
+	SimpleModelElement newTo;
+
+	public NotificationObjectSetRelationTo(SimpleRelation rel,
+			SimpleModelElement oldTo, SimpleModelElement newTo) {
+		this.rel = rel;
+		this.oldTo = oldTo;
+		this.newTo = newTo;
+		addListener(rel);
+		addListener(oldTo);
+		addListener(newTo);
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.ACTION_SET_RELATION_TO;
+	}
+
+	public IRelation getRelation() {
+		return rel;
+	}
+
+	public IModelElement getOldTo() {
+		return oldTo;
+	}
+
+	public IModelElement getNewTo() {
+		return newTo;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetValue.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetValue.java
new file mode 100644
index 0000000..4e688b5
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetValue.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetValue;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+/**
+ * @author Andras Schmidt
+ *
+ */
+public class NotificationObjectSetValue extends NotificationObject implements
+		ICoreNotificationObjectSetValue {
+	String newValue;
+
+	String oldValue;
+
+	IEntity me;
+
+	public NotificationObjectSetValue(IEntity me, String newValue,
+			String oldValue) {
+		this.me = me;
+		this.newValue = newValue;
+		this.oldValue = oldValue;
+		addListener(me);
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.ACTION_SET_VALUE;
+	}
+
+	public String getNewValue() {
+		return newValue;
+	}
+
+	public String getOldValue() {
+		return oldValue;
+	}
+
+	public IEntity getEntity() {
+		return me;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetViewInfo.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetViewInfo.java
new file mode 100644
index 0000000..f24f005
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSetViewInfo.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetViewInfo;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+/**
+ * @author Andras Schmidt
+ *
+ */
+public class NotificationObjectSetViewInfo extends NotificationObject implements
+		ICoreNotificationObjectSetViewInfo {
+	IModelElement me;
+
+	String oldViewInfo;
+
+	String newViewInfo;
+
+	public NotificationObjectSetViewInfo(IModelElement me, String oldViewInfo,
+			String newViewInfo) {
+		this.me = me;
+		this.oldViewInfo = oldViewInfo;
+		this.newViewInfo = newViewInfo;
+		addListener(me);
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.ACTION_SET_VIEW_INFO;
+	}
+
+	public IModelElement getElement() {
+		return me;
+	}
+
+	public String getOldViewInfo() {
+		return oldViewInfo;
+	}
+
+	public String getNewViewInfo() {
+		return newViewInfo;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSubTransactionAbort.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSubTransactionAbort.java
new file mode 100644
index 0000000..6871ea2
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSubTransactionAbort.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+public class NotificationObjectSubTransactionAbort extends NotificationObjectSubTransactionEnd {
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.TA_SUBTRANSACTION_ABORT;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSubTransactionBegin.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSubTransactionBegin.java
new file mode 100644
index 0000000..7126000
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSubTransactionBegin.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSubTransactionBegin;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+public class NotificationObjectSubTransactionBegin extends NotificationObject
+		implements ICoreNotificationObjectSubTransactionBegin {
+
+	private Object info;
+
+	public NotificationObjectSubTransactionBegin(Object i) {
+		this.info = i;
+	}
+
+	public NotificationObjectSubTransactionBegin() {
+
+	}
+
+	public Object getInfo() {
+		return info;
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.TA_SUBTRANSACTION_BEGIN;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSubTransactionEnd.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSubTransactionEnd.java
new file mode 100644
index 0000000..10c75e4
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectSubTransactionEnd.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSubTransactionEnd;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+public class NotificationObjectSubTransactionEnd extends NotificationObject
+		implements ICoreNotificationObjectSubTransactionEnd {
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.TA_SUBTRANSACTION_END;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectTransactionAbort.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectTransactionAbort.java
new file mode 100644
index 0000000..036ae1a
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectTransactionAbort.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+public class NotificationObjectTransactionAbort extends
+		NotificationObjectTransactionEnd {
+	
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.TA_TRANSACTION_ABORT;
+	}
+	
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectTransactionBegin.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectTransactionBegin.java
new file mode 100644
index 0000000..599aa86
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectTransactionBegin.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectTransactionBegin;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+public class NotificationObjectTransactionBegin extends NotificationObject
+		implements ICoreNotificationObjectTransactionBegin {
+
+	private Object info;
+
+	public NotificationObjectTransactionBegin(Object i) {
+		this.info = i;
+	}
+
+	public NotificationObjectTransactionBegin() {
+
+	}
+
+	public Object getInfo() {
+		return info;
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.TA_TRANSACTION_BEGIN;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectTransactionEnd.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectTransactionEnd.java
new file mode 100644
index 0000000..828fce8
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectTransactionEnd.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectTransactionEnd;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+public class NotificationObjectTransactionEnd extends NotificationObject
+		implements ICoreNotificationObjectTransactionEnd {
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.TA_TRANSACTION_END;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectUndoBegin.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectUndoBegin.java
new file mode 100644
index 0000000..29ddd14
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectUndoBegin.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectUndoBegin;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+public class NotificationObjectUndoBegin extends NotificationObject implements
+		ICoreNotificationObjectUndoBegin {
+
+	private Object info;
+
+	public NotificationObjectUndoBegin(Object i) {
+		this.info = i;
+	}
+
+	public NotificationObjectUndoBegin() {
+
+	}
+
+	public Object getInfo() {
+		return info;
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.TA_UNDO_BEGIN;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectUndoEnd.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectUndoEnd.java
new file mode 100644
index 0000000..d76ec81
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectUndoEnd.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectUndoEnd;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+public class NotificationObjectUndoEnd extends NotificationObject implements
+		ICoreNotificationObjectUndoEnd {
+
+	private Object info;
+
+	public NotificationObjectUndoEnd(Object i) {
+		this.info = i;
+	}
+
+	public NotificationObjectUndoEnd() {
+
+	}
+
+	public Object getInfo() {
+		return info;
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.TA_UNDO_END;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectUndoableTransactionBegin.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectUndoableTransactionBegin.java
new file mode 100644
index 0000000..99ac918
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectUndoableTransactionBegin.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectUndoableTransactionBegin;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+public class NotificationObjectUndoableTransactionBegin extends
+		NotificationObject implements ICoreNotificationObjectUndoableTransactionBegin {
+
+	private Object info;
+
+	public NotificationObjectUndoableTransactionBegin(Object i) {
+		this.info = i;
+	}
+
+	public NotificationObjectUndoableTransactionBegin() {
+
+	}
+
+	public Object getInfo() {
+		return info;
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.TA_UNDOABLE_TRANSACTION_BEGIN;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectUserMark.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectUserMark.java
new file mode 100644
index 0000000..11ef5bb
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/notification/NotificationObjectUserMark.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.notification;
+
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectUserMark;
+import org.eclipse.viatra2.core.notification.NotificationType;
+
+/**
+ * @author Andras Schmidt
+ *
+ */
+public class NotificationObjectUserMark extends NotificationObject implements
+		ICoreNotificationObjectUserMark {
+	String type;
+
+	public NotificationObjectUserMark(String type) {
+		this.type = type;
+	}
+
+	@Override
+	public NotificationType getActionTypeEnum() {
+		// TODO Auto-generated method stub
+		return NotificationType.USER_MARK;
+	}
+	public String getMarkName() {
+		return type;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/tempdata/TemporaryData.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/tempdata/TemporaryData.java
new file mode 100644
index 0000000..9dced27
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/tempdata/TemporaryData.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.tempdata;
+
+/**
+ * Temporary data is valid as long as the state counter of the model
+ * (incremented at all model changes) is equal to the state when this temporary
+ * data was created. In other words, temporary data is a dependent information
+ * on the VPM model.
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public class TemporaryData<E> {
+	/**
+	 * The state when this data is valid.
+	 */
+	int createdAtState;
+
+	/**
+	 * The data stored in this container.
+	 */
+	E o;
+
+	/**
+	 * Instantiate a container
+	 * 
+	 * @param state
+	 *            The state when this data is valid.
+	 * @param o
+	 *            The data stored in this container.
+	 */
+	TemporaryData(int state, E o) {
+		createdAtState = state;
+		this.o = o;
+	}
+
+	/**
+	 * Instantiate a container with data never valid
+	 */
+	TemporaryData() {
+		createdAtState = -1;
+		o = null;
+	}
+
+	/**
+	 * Check whether the data is valid at curren state.
+	 * 
+	 * @param currentState
+	 *            the state of the VPM model
+	 * @return true is data is still valid
+	 */
+	public boolean isValid(int currentState) {
+		if (currentState == createdAtState)
+			return o != null;
+		else {
+			o = null;
+			return false;
+		}
+	}
+
+	/**
+	 * The data stored in this container
+	 * 
+	 * @param currentState
+	 *            the state of VPM model
+	 * @return The data stored in this container or null if data is not valid
+	 */
+	public E getObject(int currentState) {
+		if (isValid(currentState))
+			return o;
+		else {
+			o = null;
+			return null;
+		}
+	}
+
+	/**
+	 * Set the new value of the data
+	 * 
+	 * @param state
+	 *            The state when this data is valid.
+	 * @param o
+	 *            The data stored in this container.
+	 */
+	public void setObject(int currentState, E o) {
+		//this.discard(); // experimental
+		createdAtState = currentState;
+		this.o = o;
+	}
+
+	/**
+	 * Clear this tempdata object
+	 * 
+	 * @return 1 if this container stored a value. 0 if not.
+	 */
+	public int discard() {
+		Object oldo = o;
+		o = null;
+		if (oldo != null)
+			return 1;
+		else
+			return 0;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/tempdata/TemporaryDataFactory.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/tempdata/TemporaryDataFactory.java
new file mode 100644
index 0000000..60b9008
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/simple/tempdata/TemporaryDataFactory.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.core.simple.tempdata;
+
+
+/**
+ * Factory class for <code>TemporaryData</code> objects. All created temporary
+ * objects can be managed through this object.
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public class TemporaryDataFactory<T> {
+	/**
+	 * Create a new temporary data object
+	 * 
+	 * @param state
+	 *            VPM model state when data is valid
+	 * @param o
+	 *            initial data
+	 * @return new temporary data obejct
+	 */
+	public TemporaryData<T> create(int state, T o) {
+		TemporaryData<T> ret = new TemporaryData<T>(state, o);
+	//	tempDatas.add(ret);
+		return ret;
+	}
+
+	/**
+	 * Create a new temporary data object that contains no valid data
+	 * 
+	 * @return new temporary data obejct
+	 */
+	public TemporaryData<T> create() {
+		TemporaryData<T> ret = new TemporaryData<T>();
+	//	tempDatas.add(ret);
+		return ret;
+	}
+
+	//private ArrayList<TemporaryData> tempDatas = new ArrayList<TemporaryData>();
+
+	/**
+	 * Discard all temporary data. (This method is used to see how much memory
+	 * cached data eats, you can also see how many VPM elements were queried
+	 * since the last discard)
+	 * 
+	 * @return number of temporary datas stored before discrding.
+	 */
+	public int discardAll() {
+		int ret = 0;
+//		for (int i = 0; i < tempDatas.size(); ++i) {
+//			ret += ((TemporaryData<?>) tempDatas.get(i)).discard();
+//		}
+		return ret;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceException.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceException.java
new file mode 100644
index 0000000..dac2196
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceException.java
@@ -0,0 +1,34 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Abel Hegedus and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Abel Hegedus - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.core.tracebased;

+

+import org.eclipse.viatra2.errors.VPMException;

+

+/**

+ * @author Abel Hegedus

+ *

+ */

+public class TraceException extends VPMException {

+

+	/**

+	 * 

+	 */

+	private static final long serialVersionUID = 1L;

+

+	/**

+	 * @param msg

+	 */

+	public TraceException(String msg) {

+		super(msg);

+		// TODO Auto-generated constructor stub

+	}

+

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceExtensionProvider.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceExtensionProvider.java
new file mode 100644
index 0000000..0c38314
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceExtensionProvider.java
@@ -0,0 +1,28 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2011 Abel Hegedus and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Abel Hegedus - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.core.tracebased;

+

+import org.eclipse.viatra2.EclipseExtensionProvider;

+import org.eclipse.viatra2.core.IModelSpace;

+import org.eclipse.viatra2.framework.properties.VPMProperties;

+

+/**

+ * @author Abel Hegedus

+ *

+ */

+public class TraceExtensionProvider extends EclipseExtensionProvider {

+

+	@Override

+	public IModelSpace getEmptyModelspace(VPMProperties props) {

+		return new TraceModelSpace();

+	}

+	

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceModelManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceModelManager.java
new file mode 100644
index 0000000..046133a
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceModelManager.java
@@ -0,0 +1,44 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2011 Abel Hegedus and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Abel Hegedus - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.core.tracebased;

+

+import org.eclipse.viatra2.core.simple.SimpleEntity;

+import org.eclipse.viatra2.core.simple.SimpleModelElement;

+import org.eclipse.viatra2.core.simple.SimpleModelManager;

+import org.eclipse.viatra2.core.simple.SimpleRelation;

+import org.eclipse.viatra2.errors.VPMCoreException;

+

+/**

+ * @author Abel Hegedus

+ *

+ */

+public class TraceModelManager extends SimpleModelManager {

+

+	@Override

+	protected void undoCreateContainment(SimpleEntity container, SimpleEntity me)

+			throws VPMCoreException {

+		super.undoCreateContainment(container, me);

+	}

+	

+	@Override

+	protected SimpleEntity undoCreateEntity(SimpleEntity entity,

+			SimpleEntity parent) throws VPMCoreException {

+		return super.undoCreateEntity(entity, parent);

+	}

+	

+	@Override

+	protected SimpleRelation undoCreateRelation(SimpleRelation rel,

+			SimpleModelElement from, SimpleModelElement to)

+			throws VPMCoreException {

+		return super.undoCreateRelation(rel, from, to);

+	}

+	

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceModelSpace.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceModelSpace.java
new file mode 100644
index 0000000..20f20b4
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceModelSpace.java
@@ -0,0 +1,65 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2011 Abel Hegedus and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Abel Hegedus - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.core.tracebased;

+

+import org.eclipse.viatra2.core.simple.SimpleEntity;

+import org.eclipse.viatra2.core.simple.SimpleModelSpace;

+import org.eclipse.viatra2.core.simple.SimpleRelation;

+import org.eclipse.viatra2.errors.VPMCoreException;

+import org.eclipse.viatra2.errors.VPMRuntimeException;

+

+/**

+ * @author Abel Hegedus

+ *

+ */

+public class TraceModelSpace extends SimpleModelSpace {

+

+	protected TraceTreeManager traceManager;

+	

+	@Override

+	protected void initManagers() throws VPMRuntimeException {

+		mManager = new TraceModelManager();

+		nManager = new TraceNotificationManager();

+		tManager = new TraceTransactionManager();

+		traceManager = new TraceTreeManager(getFramework(), mManager);

+		((TraceNotificationManager)nManager).setRegister(traceManager.register);

+		((TraceNotificationManager)nManager).setEnabled(false);

+		((TraceModelManager) mManager).init(logger, this);

+		((TraceNotificationManager) nManager).init(logger, this);

+		((TraceTransactionManager) tManager).init(logger, this);

+		if (isAncestorAware) {

+			try {

+				ancestorContainer = (SimpleEntity) mManager

+						.newEntity(ancestorContainerName);

+				ancestorEntity = (SimpleEntity) mManager.newEntity(

+						ancestorEntityName, ancestorContainer);

+				ancestorRelation = (SimpleRelation) mManager.newRelation(

+						ancestorRelationName, ancestorEntity, ancestorEntity);

+				mManager.setIsAnyFrom(ancestorRelation, true);

+				mManager.setIsAnyTo(ancestorRelation, true);

+			} catch (VPMCoreException e) {

+				// TODO Auto-generated catch block

+				e.printStackTrace();

+			}

+		}

+		// nManager.addAllListener(uManager);

+		// nManager.addAllListener((ICoreNotificationListener) tManager);

+	}

+

+	/**

+	 * @return the traceManager

+	 */

+	public TraceTreeManager getTraceManager() {

+		return traceManager;

+	}

+

+	

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceNotificationManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceNotificationManager.java
new file mode 100644
index 0000000..e7c2ebe
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceNotificationManager.java
@@ -0,0 +1,65 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2011 Abel Hegedus and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Abel Hegedus - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.core.tracebased;

+

+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;

+import org.eclipse.viatra2.core.simple.SimpleNotificationManager;

+

+/**

+ * @author Abel Hegedus

+ *

+ */

+public class TraceNotificationManager extends SimpleNotificationManager {

+

+	private TraceNotificationRegister nRegister;  

+	private boolean traceRegisterEnabled = true;

+	

+	@Override

+	protected void sendNotification(ICoreNotificationObject notification) {

+		//super.sendNotification(notification);

+		

+		switch (notification.getActionTypeEnum()) {

+		case ACTION_ATOMIC_STEP_READY:

+			if (no_atom_depth > 0)

+				return;

+			else{

+				break;

+			}

+		case ACTION_MORE_ATOMICS_TO_ONE_ATOM_START:

+		case ACTION_MORE_ATOMICS_TO_ONE_ATOM_END:

+			return;

+		}

+		

+		if (isNotificationEnabled()) {

+			notifyListeners(notification);

+		}

+		if(nRegister != null && traceRegisterEnabled){

+			nRegister.registerNotification(notification);

+		}

+	}

+

+	/**

+	 * @param nRegister the TraceNotificationRegister to set

+	 */

+	protected void setRegister(TraceNotificationRegister nRegister) {

+		this.nRegister = nRegister;

+	}

+

+	/**

+	 * @param enabled the enabled to set

+	 */

+	public void setEnabled(boolean enabled) {

+		this.traceRegisterEnabled = enabled;

+	}

+	

+	

+	

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceNotificationProcessor.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceNotificationProcessor.java
new file mode 100644
index 0000000..2bdbaed
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceNotificationProcessor.java
@@ -0,0 +1,308 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2011 Abel Hegedus and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Abel Hegedus - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.core.tracebased;

+

+import org.eclipse.viatra2.core.EDeleteSemantics;

+import org.eclipse.viatra2.core.IEntity;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.core.IModelManager;

+import org.eclipse.viatra2.core.IRelation;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateEntity;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateInstanceOf;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateRelation;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateSupertypeOf;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteContainment;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteEntity;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteInstanceOf;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteRelation;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteSupertypeOf;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectMoveTo;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetName;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetRelationFrom;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetRelationTo;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetValue;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetViewInfo;

+import org.eclipse.viatra2.core.notification.NotificationType;

+import org.eclipse.viatra2.core.simple.SimpleEntity;

+import org.eclipse.viatra2.core.simple.SimpleModelElement;

+import org.eclipse.viatra2.core.simple.SimpleRelation;

+import org.eclipse.viatra2.errors.VPMCoreException;

+import org.eclipse.viatra2.errors.VPMCoreNullParameterException;

+import org.eclipse.viatra2.framework.IFramework;

+import org.eclipse.viatra2.logger.Logger;

+

+/**

+ * @author Abel Hegedus

+ *

+ */

+public class TraceNotificationProcessor {

+

+	private TraceModelManager mManager;

+	private Logger logger;

+	/**

+	 * 

+	 */

+	public TraceNotificationProcessor(TraceTreeManager manager, IFramework fw, IModelManager mManager) {

+		this.mManager = (TraceModelManager) mManager;

+		logger = fw.getLogger();

+		

+	}

+	

+	public boolean doExecuteEvent(ICoreNotificationObject note) throws TraceException{

+		// based on the event type and contents, manipulate the model		

+		try{

+			NotificationType action = note.getActionTypeEnum();

+	

+			switch(action){

+			

+			case ACTION_ATOMIC_STEP_READY:

+				return false;

+			case ACTION_CREATE_ENTITY:

+				ICoreNotificationObjectCreateEntity _note = (ICoreNotificationObjectCreateEntity) note;

+				IEntity ent = _note.getCreated();

+				mManager.undoCreateEntity((SimpleEntity)ent, (SimpleEntity)_note.getContainer());

+				mManager.undoCreateContainment((SimpleEntity) _note.getContainer(), (SimpleEntity) ent);

+				return true;

+			case ACTION_DELETE_ENTITY:

+				ICoreNotificationObjectDeleteEntity _note1 = (ICoreNotificationObjectDeleteEntity) note;

+				IEntity ent1 = _note1.getDeleted();

+				mManager.deleteEntity(ent1, EDeleteSemantics.DELETE_SEMANTICS_FORCE);

+				return true;

+			case ACTION_CREATE_RELATION:

+				ICoreNotificationObjectCreateRelation _note2 = (ICoreNotificationObjectCreateRelation) note;

+				IRelation rel = _note2.getNewRelation();

+				mManager.undoCreateRelation((SimpleRelation) rel,

+						(SimpleModelElement) _note2.getFrom(),

+						(SimpleModelElement) _note2.getTo());

+				return true;

+			case ACTION_DELETE_RELATION:

+				ICoreNotificationObjectDeleteRelation _note3 = (ICoreNotificationObjectDeleteRelation) note;

+				mManager.deleteRelation(_note3.getDeleted(), EDeleteSemantics.DELETE_SEMANTICS_FORCE);

+				return true;

+			case ACTION_CREATE_INSTANCEOF:

+				ICoreNotificationObjectCreateInstanceOf _note4 = (ICoreNotificationObjectCreateInstanceOf) note;

+				SimpleModelElement sup = (SimpleModelElement) _note4.getType();

+				SimpleModelElement sub = (SimpleModelElement) _note4.getInstance();

+				mManager.newInstanceOfEditor(sup, sub);

+				return true;

+			case ACTION_DELETE_INSTANCEOF:

+				ICoreNotificationObjectDeleteInstanceOf _note5 = (ICoreNotificationObjectDeleteInstanceOf) note;

+				sup = (SimpleModelElement) _note5.getType();

+				sub = (SimpleModelElement) _note5.getInstance();

+				mManager.deleteInstanceOfEditor(sup, sub);

+				return true;

+			case ACTION_CREATE_SUPERTYPEOF:

+				ICoreNotificationObjectCreateSupertypeOf _note6 = (ICoreNotificationObjectCreateSupertypeOf) note;

+				sup = (SimpleModelElement) _note6.getSuper();

+				sub = (SimpleModelElement) _note6.getSub();

+				mManager.newSupertypeOfEditor(sup, sub);

+				return true;

+			case ACTION_DELETE_SUPERTYPEOF:

+				ICoreNotificationObjectDeleteSupertypeOf _note7 = (ICoreNotificationObjectDeleteSupertypeOf) note;

+				sup = (SimpleModelElement) _note7.getSuper();

+				sub = (SimpleModelElement) _note7.getSub();

+				mManager.deleteSupertypeOfEditor(sup, sub);

+				return true;

+			case ACTION_DELETE_CONTAINMENT:

+//				ICoreNotificationObjectDeleteContainment _note8 = (ICoreNotificationObjectDeleteContainment) note;

+//				SimpleEntity container = (SimpleEntity) _note8.getParent();

+//				SimpleEntity child = (SimpleEntity) _note8.getChild();

+//				mManager.undoCreateContainment(container, child);

+				// FIXME only called from delete entity, we can ignore it

+				return false;

+			case ACTION_MOVE_ELEMENT_TO:

+				ICoreNotificationObjectMoveTo _note11 = (ICoreNotificationObjectMoveTo) note;

+				ent = (SimpleEntity) _note11.getElement();

+				SimpleEntity to = (SimpleEntity) _note11.getNewContainer();

+				mManager.moveEntityTo(ent, to);

+				return true;

+			case ACTION_SET_VALUE:

+				ICoreNotificationObjectSetValue _note9 = (ICoreNotificationObjectSetValue) note;

+				ent = (SimpleEntity) _note9.getEntity();

+				String newValue = _note9.getNewValue();

+				mManager.setValue(ent, newValue);

+				return true;

+			case ACTION_SET_NAME:

+				ICoreNotificationObjectSetName _note10 = (ICoreNotificationObjectSetName) note;

+				SimpleModelElement elem = (SimpleModelElement) _note10.getElement();

+				String newName = _note10.getNewName();

+				mManager.setName(elem, newName);

+				return true;

+			case ACTION_SET_RELATION_FROM:

+				ICoreNotificationObjectSetRelationFrom _note12 = (ICoreNotificationObjectSetRelationFrom) note;

+				rel = (SimpleRelation) _note12.getRelation();

+				SimpleModelElement newFrom = (SimpleModelElement) _note12

+				.getNewFrom();

+				mManager.setRelationFrom(rel, newFrom);

+				return true;

+			case ACTION_SET_RELATION_TO:

+				ICoreNotificationObjectSetRelationTo _note13 = (ICoreNotificationObjectSetRelationTo) note;

+				rel = (SimpleRelation) _note13.getRelation();

+				SimpleModelElement newTo = (SimpleModelElement) _note13.getNewTo();

+				mManager.setRelationTo(rel, newTo);

+				return true;

+			case ACTION_SET_VIEW_INFO:

+				ICoreNotificationObjectSetViewInfo _note14 = (ICoreNotificationObjectSetViewInfo) note;

+				mManager.setViewInfo(_note14.getElement(), _note14.getNewViewInfo());

+				return true;

+			case USER_MARK:

+				return false;

+			}

+		}catch (VPMCoreNullParameterException e) {

+			logger.fatal("Error performing doExecute; [VPMNullParameterException] message: "

+					+ e.getMessage());

+		} catch (VPMCoreException e) {

+			throw (TraceException) new TraceException("Error performing doExecute; [VPMCoreException] message: "

+					+ e.getMessage()).fillInStackTrace();

+		}

+		/*

+		 * Added a comment to this code to stop the undo manager from throwing unnecessary error messages

+		 * which slowes down undo operations.

+		 throw new VPMCoreRuntimeException("undo step not defined for step:"

+				+ note.toString());

+		*/

+		//logger.warning("undo step not defined for step:"+ note.toString());

+		return false;

+	}

+	

+	public boolean undoEvent(ICoreNotificationObject note) throws TraceException{

+		// based on the event type and contents, reverse the model manipulation (see undo manager)	

+		try{

+			NotificationType action = note.getActionTypeEnum();

+	

+			switch(action){

+			

+			case ACTION_ATOMIC_STEP_READY:

+				return false;

+			case ACTION_CREATE_ENTITY:

+				ICoreNotificationObjectCreateEntity _note = (ICoreNotificationObjectCreateEntity) note;

+				IEntity ent = _note.getCreated();

+				mManager

+					.deleteEntity(ent, EDeleteSemantics.DELETE_SEMANTICS_FORCE);

+				return true;

+			case ACTION_DELETE_ENTITY:

+				ICoreNotificationObjectDeleteEntity _note1 = (ICoreNotificationObjectDeleteEntity) note;

+				IEntity ent1 = _note1.getDeleted();

+				IEntity parent = _note1.getParent();

+				mManager

+				.undoCreateEntity((SimpleEntity) ent1, (SimpleEntity) parent);

+				return true;

+			case ACTION_CREATE_RELATION:

+				ICoreNotificationObjectCreateRelation _note2 = (ICoreNotificationObjectCreateRelation) note;

+				IRelation rel = _note2.getNewRelation();

+				mManager.deleteRelation(rel,

+						EDeleteSemantics.DELETE_SEMANTICS_FORCE);

+				return true;

+			case ACTION_DELETE_RELATION:

+				ICoreNotificationObjectDeleteRelation _note3 = (ICoreNotificationObjectDeleteRelation) note;

+				mManager.undoCreateRelation((SimpleRelation) _note3.getDeleted(),

+						(SimpleModelElement) _note3.getFrom(),

+						(SimpleModelElement) _note3.getTo());

+				return true;

+			case ACTION_CREATE_INSTANCEOF:

+				ICoreNotificationObjectCreateInstanceOf _note4 = (ICoreNotificationObjectCreateInstanceOf) note;

+				SimpleModelElement sup = (SimpleModelElement) _note4.getType();

+				SimpleModelElement sub = (SimpleModelElement) _note4.getInstance();

+				mManager.deleteInstanceOfEditor(sup, sub);

+				return true;

+			case ACTION_DELETE_INSTANCEOF:

+				ICoreNotificationObjectDeleteInstanceOf _note5 = (ICoreNotificationObjectDeleteInstanceOf) note;

+				sup = (SimpleModelElement) _note5.getType();

+				sub = (SimpleModelElement) _note5.getInstance();

+				mManager.newInstanceOfEditor(sup, sub);

+				return true;

+			case ACTION_CREATE_SUPERTYPEOF:

+				ICoreNotificationObjectCreateSupertypeOf _note6 = (ICoreNotificationObjectCreateSupertypeOf) note;

+				sup = (SimpleModelElement) _note6.getSuper();

+				sub = (SimpleModelElement) _note6.getSub();

+				mManager.deleteSupertypeOfEditor(sup, sub);

+				return true;

+			case ACTION_DELETE_SUPERTYPEOF:

+				ICoreNotificationObjectDeleteSupertypeOf _note7 = (ICoreNotificationObjectDeleteSupertypeOf) note;

+				sup = (SimpleModelElement) _note7.getSuper();

+				sub = (SimpleModelElement) _note7.getSub();

+				mManager.newSupertypeOfEditor(sup, sub);

+				return true;

+			case ACTION_DELETE_CONTAINMENT:

+				ICoreNotificationObjectDeleteContainment _note8 = (ICoreNotificationObjectDeleteContainment) note;

+				

+				SimpleEntity container = (SimpleEntity) _note8.getParent();

+				SimpleEntity child = (SimpleEntity) _note8.getChild();

+				mManager.undoCreateContainment(container, child);

+				return true;

+			case ACTION_SET_VALUE:

+				ICoreNotificationObjectSetValue _note9 = (ICoreNotificationObjectSetValue) note;

+				ent = (SimpleEntity) _note9.getEntity();

+				String oldValue = _note9.getOldValue();

+				mManager.setValue(ent, oldValue);

+				return true;

+			case ACTION_SET_NAME:

+				ICoreNotificationObjectSetName _note10 = (ICoreNotificationObjectSetName) note;

+				SimpleModelElement elem = (SimpleModelElement) _note10.getElement();

+				String oldName = _note10.getOldName();

+				mManager.setName(elem, oldName);

+				return true;

+			case ACTION_MOVE_ELEMENT_TO:

+				ICoreNotificationObjectMoveTo _note11 = (ICoreNotificationObjectMoveTo) note;

+				ent = (SimpleEntity) _note11.getElement();

+				SimpleEntity from = (SimpleEntity) _note11.getOldContainer();

+				mManager.moveEntityTo(ent, from);

+				return true;

+			case ACTION_SET_RELATION_FROM:

+				ICoreNotificationObjectSetRelationFrom _note12 = (ICoreNotificationObjectSetRelationFrom) note;

+				rel = (SimpleRelation) _note12.getRelation();

+				SimpleModelElement oldFrom = (SimpleModelElement) _note12

+				.getOldFrom();

+				mManager.setRelationFrom(rel, oldFrom);

+				return true;

+			case ACTION_SET_RELATION_TO:

+				ICoreNotificationObjectSetRelationTo _note13 = (ICoreNotificationObjectSetRelationTo) note;

+				rel = (SimpleRelation) _note13.getRelation();

+				SimpleModelElement oldTo = (SimpleModelElement) _note13.getOldTo();

+				mManager.setRelationTo(rel, oldTo);

+				return true;

+			case ACTION_SET_VIEW_INFO:

+				undoSetViewInfo((ICoreNotificationObjectSetViewInfo) note);

+				return true;

+			case USER_MARK:

+				return false;

+			}

+		}catch (VPMCoreNullParameterException e) {

+			logger.fatal("Error performing undo; [VPMNullParameterException] message: "

+					+ e.getMessage());

+		} catch (VPMCoreException e) {

+			throw (TraceException) new TraceException("Error performing undo; [VPMCoreException] message: "

+					+ e.getMessage()).fillInStackTrace();

+		} catch (Exception e) {

+			e.printStackTrace();

+		}

+		/*

+		 * Added a comment to this code to stop the undo manager from throwing unnecessary error messages

+		 * which slowes down undo operations.

+		 throw new VPMCoreRuntimeException("undo step not defined for step:"

+				+ note.toString());

+		*/

+		//logger.warning("undo step not defined for step:"+ note.toString());

+		return false;

+	}

+	

+	void undoSetViewInfo(ICoreNotificationObjectSetViewInfo note) {

+		IModelElement me = note.getElement();

+		String oldViewInfo = note.getOldViewInfo();

+		try {

+			mManager.setViewInfo(me, oldViewInfo);

+		} catch (VPMCoreException e) {

+			logger.fatal("Error performing undo; message: " + e.getMessage());

+			// e.printStackTrace();

+		}

+	}

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceNotificationRegister.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceNotificationRegister.java
new file mode 100644
index 0000000..3f10a70
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceNotificationRegister.java
@@ -0,0 +1,507 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Abel Hegedus and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Abel Hegedus - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.core.tracebased;

+

+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;

+import org.eclipse.viatra2.core.notification.NotificationType;

+import org.eclipse.viatra2.core.tracebased.tracetree.AbstractTraceTreeNode;

+import org.eclipse.viatra2.core.tracebased.tracetree.AtomicTraceTreeNode;

+import org.eclipse.viatra2.core.tracebased.tracetree.CompositeTraceTreeNode;

+import org.eclipse.viatra2.core.tracebased.tracetree.EmptyTraceTreeNode;

+import org.eclipse.viatra2.core.tracebased.tracetree.ITraceTreeNode;

+import org.eclipse.viatra2.core.tracebased.tracetree.TransactionTraceTreeNode;

+

+/**

+ * Supplementary class for handling new notifications and inserting them into the

+ * trace tree. An instance is connected to a TraceTreeManager that contains the trace tree

+ * itself for a given VIATRA framework.

+ * 

+ * @author Abel Hegedus

+ *

+ */

+public class TraceNotificationRegister {

+

+	private boolean enabled = false;

+	private long id = 0;

+	private TraceTreeManager manager;

+	

+	/**

+	 * Instantiate the register with a given TraceTreeManager instance

+	 */

+	public TraceNotificationRegister(TraceTreeManager manager) {

+		this.manager = manager;

+	}

+	

+	/**

+	 * Register a given notification into the trace tree. The method ensures that the trace tree

+	 * remains consistent after inserting the notification.

+	 * 

+	 * @param notification the notification to register

+	 */

+	public void registerNotification(ICoreNotificationObject notification) {

+		// not actual event, return

+		if(!enabled && !notification.getActionTypeEnum().equals(NotificationType.ACTION_SKIP_NOTIFICATIONS_END) 

+				&& !notification.getActionTypeEnum().equals(NotificationType.TA_UNDO_END)){

+			return;

+		}

+		

+		ITraceTreeNode current = manager.getCurrent();

+		

+		if(current == null && manager.getRoot() == null){

+			current = new EmptyTraceTreeNode(null, createID("EmptyTTN"));

+			manager.setRoot(current);

+			manager.setCurrent(current);

+		}

+		

+		try {

+			handleEvent(notification, current);

+		} catch (TraceException e) {

+			// TODO Auto-generated catch block

+			e.printStackTrace();

+		}

+		

+		

+	}

+

+	/**

+	 * Set to false if the following notifications should not be registered (e.g. undo or redo)

+	 * 

+	 * @param enabled the enabled to set

+	 */

+	public void setEnabled(boolean enabled) {

+		this.enabled = enabled;

+	}

+

+	/**

+	 * True if notifications are registered in the trace tree at the moment

+	 * 

+	 * @return the enabled

+	 */

+	public boolean isEnabled() {

+		return enabled;

+	}

+	

+	/**	Handles the different notifications by type with the following guidelines:<p>

+

+	   	Starts composite always, ends previous one:<p>

+	

+			<li>TA_UNDOABLE_TRANSACTION_BEGIN

+			<li>TA_TRANSACTION_BEGIN

+			<li>TA_SUBTRANSACTION_BEGIN<p>

+

+		Starts composite (if not in one):<p>

+		

+			<li>ACTION_CREATE_ENTITY

+			<li>ACTION_DELETE_ENTITY

+			<li>ACTION_CREATE_RELATION

+			<li>ACTION_DELETE_RELATION

+			<li>ACTION_SET_RELATION_FROM

+			<li>ACTION_SET_RELATION_TO

+			<li>ACTION_CREATE_INSTANCEOF

+			<li>ACTION_DELETE_INSTANCEOF

+			<li>ACTION_CREATE_SUPERTYPEOF

+			<li>ACTION_DELETE_SUPERTYPEOF

+			<li>ACTION_DELETE_CONTAINMENT

+			<li>ACTION_SET_VALUE

+			<li>ACTION_SET_VIEW_INFO

+			<li>ACTION_SET_NAME

+			<li>ACTION_SET_ISFINALTYPE

+			<li>ACTION_SET_ISANY

+			<li>ACTION_MOVE_ELEMENT_TO

+		  	<li>ACTION_SET_RELATION_INVERSE

+			<li>ACTION_SET_RELATION_ISAGGREGATION

+			<li>ACTION_SET_RELATION_MULTIPLICITY<p>

+			

+		Ends composite (if not transaction):<p>

+		

+			<li>ACTION_ATOMIC_STEP_READY<p>

+			

+		Ends composite (if transaction):<p>

+		

+			<li>TA_SUBTRANSACTION_END

+			<li>TA_TRANSACTION_END<p>

+			

+		Only in composite (otherwise error):<p>

+		

+		  	<li>USER_MARK<p>

+		

+		Do not store, handle otherwise:<p>

+		

+			<li>TA_UNDO_BEGIN

+			<li>TA_UNDO_END

+			<li>TA_TRANSACTION_ABORT

+			<li>TA_SUBTRANSACTION_ABORT<p>

+			

+		Should not happen:<p>

+		

+			<li>ACTION_MORE_ATOMICS_TO_ONE_ATOM_START

+			<li>ACTION_MORE_ATOMICS_TO_ONE_ATOM_END

+			<li>ACTION_SKIP_NOTIFICATIONS_START

+			<li>ACTION_SKIP_NOTIFICATIONS_END

+			

+		@param event

+		@param current	

+		@return the new trace tree node created for the event, otherwise null

+		@throws TraceException if the received notification is not acceptable

+		 or is inconsistent with the trace tree

+	 */

+	private ITraceTreeNode handleEvent(ICoreNotificationObject event, ITraceTreeNode current) throws TraceException{

+

+		boolean subtransaction = false, undoable = false;

+		ITraceTreeNode newNode = null;

+		

+		switch(event.getActionTypeEnum()){

+		

+		// ============ STARTING TRANSACTION ===========================================

+		case TA_SUBTRANSACTION_BEGIN: // FIXME subtransaction maybe not needed in new transaction manager

+			//subtransaction = true;

+			throw new TraceException("This notification should not be used by the transaction manager");

+		case TA_UNDOABLE_TRANSACTION_BEGIN: // FIXME all transactions are undoable now

+											//(or make only undoable transactions recorded)

+			undoable = true;

+			// fall-through

+		case TA_TRANSACTION_BEGIN:

+			// start new transaction

+			newNode = startTransaction(event, current, undoable);

+			break;

+			

+		// ============ USER MARK IN TRANSACTION =======================================

+		case USER_MARK: // FIXME probably won't need it in the new transaction engine

+			// store the user mark inside a transaction

+			storeUserMark(event, current);

+			break;

+		

+		// ============ TERMINATING COMPOSITE ===========================================

+		case ACTION_ATOMIC_STEP_READY:

+			// close atomic step or keep going in transaction

+			endAtomicStep(event, current);

+			break;

+		case TA_SUBTRANSACTION_END:

+			//subtransaction = true;

+			throw new TraceException("This notification should not be used by the transaction manager");

+		case TA_TRANSACTION_END:

+			// terminate transaction

+			newNode = endTransaction(event, current);

+			break;

+		

+		// ============ ATOMIC ACTIONS =================================================

+		case ACTION_CREATE_ENTITY:

+		case ACTION_DELETE_ENTITY:

+		case ACTION_CREATE_RELATION:

+		case ACTION_DELETE_RELATION:

+		case ACTION_SET_RELATION_FROM:

+		case ACTION_SET_RELATION_TO:

+		case ACTION_CREATE_INSTANCEOF:

+		case ACTION_DELETE_INSTANCEOF:

+		case ACTION_CREATE_SUPERTYPEOF:

+		case ACTION_DELETE_SUPERTYPEOF:

+		case ACTION_DELETE_CONTAINMENT:

+		case ACTION_SET_VALUE:

+		case ACTION_SET_VIEW_INFO:

+		case ACTION_SET_NAME:

+		case ACTION_SET_ISFINALTYPE:

+		case ACTION_SET_ISANY:

+		case ACTION_MOVE_ELEMENT_TO:

+		case ACTION_SET_RELATION_INVERSE:

+		case ACTION_SET_RELATION_ISAGGREGATION:

+		case ACTION_SET_RELATION_MULTIPLICITY:

+			newNode = handleAction(event, current);

+			break;

+		// ============ MORE ATOMICS ===================================================

+		case ACTION_MORE_ATOMICS_TO_ONE_ATOM_START:

+			throw new TraceException("This notification must be supressed by the notification manager");

+		case ACTION_MORE_ATOMICS_TO_ONE_ATOM_END:

+			throw new TraceException("This notification must be supressed by the notification manager");

+		

+			

+		// ============ TRANSACTION UNDO AND ABORT ======================================

+		case TA_UNDO_BEGIN:

+			// during undo, notifications are dropped

+			enabled = false;

+			undoBegin(current);

+			break;

+		case TA_UNDO_END:

+			// after undo, notifications are handled again

+			enabled = true;

+			break;

+		case TA_SUBTRANSACTION_ABORT:

+			throw new TraceException("This notification should not be used by the transaction manager");

+			//subtransaction = true;

+		case TA_TRANSACTION_ABORT:

+			// FIXME in the current implementation aborted transactions are left hanging

+			// FIXME new transaction engine should use better abort semantics

+			// if in transaction, set it to aborted and terminated

+			if(current instanceof TransactionTraceTreeNode){

+				TransactionTraceTreeNode tttn = (TransactionTraceTreeNode) current;

+				if(!tttn.isTerminated()){

+					tttn.getEvents().add(event);

+					tttn.setAborted(true);

+					tttn.setTerminated(true);

+					if(subtransaction){

+						if(tttn.isSubTransaction()){

+							// event is stored twice (but this will help recognizing continuing transactions)

+							newNode = new TransactionTraceTreeNode(tttn, createID("TTTN"), event, false);

+						} else {

+							throw new TraceException("Subtransaction abort called for non-sub transaction");

+						}

+					}

+				} else {

+					throw new TraceException("Abort called for terminated transaction");

+				}

+			} else {

+				throw new TraceException("Abort called outside of transaction");

+			}

+			break;

+			

+		// ============ SKIP NOTIFICATIONS ==============================================

+		// FIXME not used yet

+		// FIXME if used, make sure that there start and end is not in different transactions

+		case ACTION_SKIP_NOTIFICATIONS_START:

+			// add event to composite or create new

+			newNode = skipNotificationStart(event, current);

+			break;

+		case ACTION_SKIP_NOTIFICATIONS_END:

+			skipNotificationEnd(event, current);

+			break;

+		}

+		

+		if(newNode != null){

+			manager.setCurrent(newNode);

+		}

+		

+		return null;

+	}

+

+	/**

+	 * Handles regular model manipulation action notifications

+	 * 

+	 * @param event

+	 * @param current

+	 * @return the new atomic trace tree node if the event started a new one

+	 */

+	private ITraceTreeNode handleAction(ICoreNotificationObject event,

+			ITraceTreeNode current) {

+		if(current instanceof CompositeTraceTreeNode){

+			CompositeTraceTreeNode cttn = (CompositeTraceTreeNode) current;

+			// if composite and not terminated, add event

+			if(!cttn.isTerminated()){

+				cttn.getEvents().add(event);

+				return null;

+			} else {

+				// otherwise create atomic composite

+				return new AtomicTraceTreeNode(cttn, createID("ATTN"), event);

+			}

+		} else {

+			return new AtomicTraceTreeNode(current, createID("ATTN"), event);

+		}

+	}

+

+	/**

+	 * Handles the beginning of an undo event

+	 * 

+	 * @param current

+	 */

+	private void undoBegin(ITraceTreeNode current) {

+		if(current instanceof CompositeTraceTreeNode){

+			CompositeTraceTreeNode cttn = (CompositeTraceTreeNode) current;

+			// composite nodes are terminated before undo, independently of their state

+			if(!cttn.isTerminated()){

+				cttn.setTerminated(true);

+			}

+		}

+	}

+

+	/**

+	 * Handles the event for ending a phase for skipping notifications.

+	 * 

+	 * @param event

+	 * @param current

+	 * @throws TraceException if the notification is received while registering notifications, 

+	 * or while in a terminated composite trace tree node, or while outside of a composite trace tree node.

+	 */

+	private void skipNotificationEnd(ICoreNotificationObject event,

+			ITraceTreeNode current) throws TraceException {

+		if(enabled){// throw exception if not disabled

+			throw new TraceException("Skip notification end received while notifications enabled");

+		} else if(current instanceof CompositeTraceTreeNode){

+			// add event to composite

+			CompositeTraceTreeNode cttn = (CompositeTraceTreeNode) current;

+			if(!cttn.isTerminated()){

+				cttn.getEvents().add(event);

+				if(cttn.getEvents().get(0).getActionTypeEnum().equals(NotificationType.ACTION_SKIP_NOTIFICATIONS_START)){

+					cttn.setTerminated(true);

+				}

+			} else {

+				throw new TraceException("Skip notification end received in terminated composite");

+			}

+			// change to enabled

+			enabled = true;

+		} else {

+			throw new TraceException("Skip notification end received outside composite");

+		}

+	}

+

+	/**

+	 * Handles the event for starting a phase for skipping notifications.

+	 * 

+	 * @param event

+	 * @param current

+	 * @return the composite trace tree node storing the starting notification

+	 */

+	private ITraceTreeNode skipNotificationStart(ICoreNotificationObject event,

+			ITraceTreeNode current) {

+		// change to disabled

+		enabled = false;

+		if(current instanceof CompositeTraceTreeNode){

+			CompositeTraceTreeNode cttn = (CompositeTraceTreeNode) current;

+			if(!cttn.isTerminated()){

+				cttn.getEvents().add(event);

+				return null;

+			} else {

+				return new CompositeTraceTreeNode(cttn, createID("CTTN"), event);

+			}

+		} else {

+			return new CompositeTraceTreeNode(current, createID("CTTN"), event);

+		}

+	}

+

+	/**

+	 * Handles notifications that end a transaction.

+	 * 

+	 * @param event

+	 * @param current

+	 * @return null, if top-level transaction ended, otherwise the new TransactionTraceTreeNode instance created for an upper level transaction

+	 * @throws TraceException if the notification is received in a terminated transaction or outside a transaction.

+	 */

+	private ITraceTreeNode endTransaction(ICoreNotificationObject event,

+			ITraceTreeNode current) throws TraceException {

+		if(current instanceof TransactionTraceTreeNode){

+			TransactionTraceTreeNode tttn = (TransactionTraceTreeNode) current;

+			if(!tttn.isTerminated()){

+				tttn.getEvents().add(event);

+				// terminate current node

+				tttn.setTerminated(true);

+				//if(subtransaction){ // FIXME subtransaction maybe not needed in new transaction manager

+				if(tttn.getLevel() > 0){

+					// start new transaction trace node

+					// event is stored twice (but this will help recognizing continuing transactions)

+					return new TransactionTraceTreeNode(tttn, createID("TTTN"), event, false);

+//				} else {

+//					throw new TraceException("SubTransaction end received outside subtransaction");

+//				}

+				} else {

+					// terminated the whole transaction

+					tttn.setCommitted(true);

+					return null;

+				}

+			} else {

+				throw new TraceException("Transaction end received for terminated transaction");

+			}

+		} else {

+			throw new TraceException("Transaction end received outside transaction");

+		}

+	}

+

+	/**

+	 * Handles events which end an atomic step.

+	 * 

+	 * @param event

+	 * @param current

+	 * @throws TraceException if the atomic step readysignal is received outside a composite trace tree node

+	 */

+	private void endAtomicStep(ICoreNotificationObject event,

+			ITraceTreeNode current) throws TraceException {

+		if(current instanceof CompositeTraceTreeNode){

+			CompositeTraceTreeNode cttn = (CompositeTraceTreeNode) current;

+			// NOTE: duplicate ATOMIC_STEP_READY notifications are ignored				

+			if(!cttn.isTerminated()){

+				cttn.getEvents().add(event); // FIXME do we need to store this notification?

+				if(current instanceof AtomicTraceTreeNode){

+					AtomicTraceTreeNode attn = (AtomicTraceTreeNode) current;

+					// if more than one atomic steps are treated together, keep going

+					//if(!attn.isMoreThanOneAtomic()){

+						// otherwise terminate node

+					attn.setTerminated(true);

+					//}

+				}

+			}

+		} else {

+			throw new TraceException("Atomic step ready received outside composite");

+		}

+	}

+

+	/**

+	 * Stores a user mark typed notification.

+	 * 

+	 * @param event

+	 * @param current

+	 * @throws TraceException if a user mark is received in a terminated transaction or outside of a transaction.

+	 */

+	private void storeUserMark(ICoreNotificationObject event,

+			ITraceTreeNode current) throws TraceException {

+		if(current instanceof TransactionTraceTreeNode){

+			TransactionTraceTreeNode cttn = (TransactionTraceTreeNode) current;

+			if(!cttn.isTerminated()){

+				cttn.getEvents().add(event);

+			} else {

+				throw new TraceException("User mark received in terminated transaction");

+			}

+		} else {

+			throw new TraceException("User mark received outside of transaction");

+		}

+	}

+

+	/**

+	 * Called with notifications starting a new transaction.

+	 * 

+	 * @param event

+	 * @param current

+	 * @param undoable

+	 * @return the new TransactionTraceTreeNode instance created for the new transaction

+	 */

+	private ITraceTreeNode startTransaction(ICoreNotificationObject event,

+			ITraceTreeNode current, boolean undoable) {

+//		if(current instanceof TransactionTraceTreeNode

+//				&& !((TransactionTraceTreeNode) current).isTerminated()){

+//			// FIXME start new subtransaction if in transaction

+//			throw new TraceException("Transaction begin received inside transaction");

+//		} else {

+			boolean subtransaction = false;

+			// will begin transaction

+			// terminate actual composite

+			AbstractTraceTreeNode attn = (AbstractTraceTreeNode) current;

+			if(!attn.isTerminated()){

+				attn.setTerminated(true);

+			}

+			if(current instanceof TransactionTraceTreeNode){

+				// required for handling new subtransaction after undo

+				if(!((TransactionTraceTreeNode) current).isCommitted()){

+					subtransaction = true;

+				}

+			}

+			// start new subtransaction if in transaction (last parameter decides)

+			

+			return new TransactionTraceTreeNode(attn,createID("TTTN"),event,subtransaction, undoable);	

+//		}

+	}

+	

+	/**

+	 * Encapsulates id creation

+	 * 

+	 * @param type Type string for trace tree node to create

+	 * @return the id string for the node

+	 */

+	private String createID(String type){

+		String idS = String.format("%s_%d", type, id);

+		id++;

+		return idS;

+	}

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceTransactionManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceTransactionManager.java
new file mode 100644
index 0000000..f6d7e19
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceTransactionManager.java
@@ -0,0 +1,163 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2011 Abel Hegedus and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Abel Hegedus - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.core.tracebased;

+

+import org.eclipse.viatra2.core.IPause;

+import org.eclipse.viatra2.core.ITransactionManager;

+import org.eclipse.viatra2.core.simple.notification.NotificationObjectTransactionBegin;

+import org.eclipse.viatra2.core.simple.notification.NotificationObjectTransactionEnd;

+import org.eclipse.viatra2.core.simple.notification.NotificationObjectUndoBegin;

+import org.eclipse.viatra2.core.simple.notification.NotificationObjectUndoEnd;

+import org.eclipse.viatra2.core.simple.notification.NotificationObjectUndoableTransactionBegin;

+import org.eclipse.viatra2.core.tracebased.tracetree.ITraceTreeNode;

+import org.eclipse.viatra2.core.tracebased.tracetree.TransactionTraceTreeNode;

+import org.eclipse.viatra2.errors.VPMRuntimeException;

+import org.eclipse.viatra2.logger.Logger;

+

+/**

+ * @author Abel Hegedus

+ *

+ */

+public class TraceTransactionManager implements ITransactionManager {

+

+	private TraceUndoManager uManager;

+	private TraceModelSpace m;

+	

+	@Override

+	public String beginUndoableTransaction() {

+		return beginUndoableTransaction(null);

+	}

+

+	@Override

+	public String beginUndoableTransaction(Object info) {

+		TraceNotificationManager notificationManager = (TraceNotificationManager) m.getNotificationManager();

+		notificationManager.setEnabled(true);

+		notificationManager.sendNotification(new NotificationObjectUndoableTransactionBegin(info));

+		String id =  m.getTraceManager().getCurrent().getID();

+		uManager.nextUndoBlock(id);

+		return id;

+	}

+

+	@Override

+	public String beginTransaction() {

+		return beginTransaction(null);

+	}

+

+	@Override

+	public String beginTransaction(Object info) {

+		((TraceNotificationManager) m.getNotificationManager()).sendNotification(new NotificationObjectTransactionBegin(info));

+		/*if("ignore".equals(info)){

+			((TraceNotificationManager) m.getNotificationManager()).setEnabled(false);

+		}*/

+		ITraceTreeNode current = m.getTraceManager().getCurrent();

+		if(current != null){

+			return current.getID();

+		} else {

+			return "SimpleTransaction";

+		}

+	}

+

+	/**

+	 * No locking is performed with trace-based model-space

+	 * 

+	 * @return true if there is no running transaction

+	 */

+	@Override

+	public boolean tryBeginTransaction() {

+		ITraceTreeNode current = m.getTraceManager().getCurrent();

+		if(current instanceof TransactionTraceTreeNode){

+			if(((TransactionTraceTreeNode) current).isTerminated()){

+				return true;

+			}

+		} else {

+			return true;

+		}

+		return false;

+	}

+

+	@Override

+	public void commitTransaction() {

+		ITraceTreeNode current = m.getTraceManager().getCurrent();

+		if(current instanceof TransactionTraceTreeNode){

+			if(!((TransactionTraceTreeNode) current).isTerminated()){

+				/*List<ICoreNotificationObject> events = ((TransactionTraceTreeNode) current).getEvents();

+				if(events.size() > 0 && events.get(0) instanceof ICoreNotificationObjectTransactionBegin){

+					if("ignore".equals(((NotificationObjectTransactionBegin)events.get(0)).getInfo())){

+						((TraceNotificationManager) m.getNotificationManager()).setEnabled(true);

+					}

+				}*/

+				// send transaction commit

+				((TraceNotificationManager) m.getNotificationManager()).sendNotification(new NotificationObjectTransactionEnd());

+			}

+		} else if(current == null){

+			// transaction is not recorded

+			((TraceNotificationManager) m.getNotificationManager()).sendNotification(new NotificationObjectTransactionEnd());

+		}

+		

+	}

+

+	@Override

+	public void commitCompositeTransaction() {

+		ITraceTreeNode current = m.getTraceManager().getCurrent();

+		if(current == null){

+			// transaction is not recorded

+			((TraceNotificationManager) m.getNotificationManager()).sendNotification(new NotificationObjectTransactionEnd());

+		}

+		while(current != null){

+			if(current instanceof TransactionTraceTreeNode){

+				TransactionTraceTreeNode tttn = (TransactionTraceTreeNode) current;

+				if(!tttn.isTerminated()){

+					// send transaction commit

+					((TraceNotificationManager) m.getNotificationManager()).sendNotification(new NotificationObjectTransactionEnd());

+					current = m.getTraceManager().getCurrent();

+				} else {

+					break;

+				}

+			} else {

+				break;

+			}

+		}

+	}

+

+	@Override

+	public void abortTransaction() {

+		m.getFramework().getLogger().error("Semantics for transaction abort not defined!");

+	}

+

+	@Override

+	public void undoTransaction(String aTransactionID) {

+		((TraceNotificationManager) m.getNotificationManager()).sendNotification(new NotificationObjectUndoBegin());

+		uManager.undo(aTransactionID);

+		((TraceNotificationManager) m.getNotificationManager()).sendNotification(new NotificationObjectUndoEnd());

+	}

+

+	@Override

+	public IPause pauseTransaction() throws IllegalMonitorStateException {

+		m.getFramework().getLogger().error("Transactions cannot be paused!");

+		//((TraceNotificationManager) m.getNotificationManager()).setEnabled(false);

+		return null;

+	}

+

+	@Override

+	public void unPauseTransaction(IPause n) {

+		m.getFramework().getLogger().error("Transactions cannot be paused!");

+		//((TraceNotificationManager) m.getNotificationManager()).setEnabled(true);

+	}

+

+	public void init(Logger logger, TraceModelSpace traceModelSpace) throws VPMRuntimeException {

+		uManager = new TraceUndoManager();

+		m = traceModelSpace;

+		uManager.init(logger, m);

+	}

+

+	

+

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceTreeManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceTreeManager.java
new file mode 100644
index 0000000..53d8389
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceTreeManager.java
@@ -0,0 +1,106 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Abel Hegedus and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Abel Hegedus - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.core.tracebased;

+

+import org.eclipse.viatra2.core.IModelManager;

+import org.eclipse.viatra2.core.tracebased.tracetree.ITraceTreeNode;

+import org.eclipse.viatra2.framework.IFramework;

+

+/**

+ * Manager for VIATRA2 traces

+ * 

+ * responsible for:

+ *  initializing trace tree and register

+ *  saving and loading traces

+ *  providing (limited) outside access to tree

+ * 

+ * @author Abel Hegedus

+ *

+ */

+public class TraceTreeManager {

+	

+	protected ITraceTreeNode root;

+	protected ITraceTreeNode current;

+	

+	protected TraceNotificationRegister register;

+	protected TraceNotificationProcessor traceProcessor;

+	

+	/**

+	 * 

+	 */

+	public TraceTreeManager(IFramework framework, IModelManager mManager) {

+		traceProcessor = new TraceNotificationProcessor(this, framework, mManager);

+		

+		register = new TraceNotificationRegister(this);

+		register.setEnabled(true);

+		

+	}

+

+	/**

+	 * @return the current

+	 */

+	public ITraceTreeNode getCurrent() {

+		return current;

+	}

+

+	/**

+	 * @param current the current to set

+	 */

+	public void setCurrent(ITraceTreeNode current) {

+		this.current = current;

+	}

+

+	/**

+	 * @return the root

+	 */

+	public ITraceTreeNode getRoot() {

+		return root;

+	}

+

+	/**

+	 * @param root the root to set

+	 */

+	public void setRoot(ITraceTreeNode root) {

+		this.root = root;

+	}

+	

+	public void exportCompleteTrace(StringBuilder exportString){

+		if(root != null){

+			exportTrace(root, exportString, 0);

+		}

+	}

+	

+	public void exportTrace(ITraceTreeNode node, StringBuilder exportString, int depth){

+		

+		exportString.append(node.toString());

+		

+		if(node.getChildren().size() > 0){

+			depth++;

+			for (ITraceTreeNode child : node.getOrderedChildrenList()) {

+				exportString.append("\n");

+				for(int i = 0; i < depth; i++){

+					exportString.append(" ");

+				}

+				exportString.append("\\(").append(depth).append(")->");

+				exportTrace(child, exportString,depth);

+			}

+		}

+		

+	}

+

+	/**

+	 * @return the traceProcessor

+	 */

+	public TraceNotificationProcessor getTraceProcessor() {

+		return traceProcessor;

+	}

+

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceUndoManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceUndoManager.java
new file mode 100644
index 0000000..05adef9
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/TraceUndoManager.java
@@ -0,0 +1,209 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2011 Abel Hegedus and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Abel Hegedus - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.core.tracebased;

+

+import java.util.ArrayList;

+import java.util.Collections;

+import java.util.List;

+

+import org.eclipse.viatra2.core.IModelSpace;

+import org.eclipse.viatra2.core.IUndoManager;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectTransactionEnd;

+import org.eclipse.viatra2.core.simple.notification.NotificationObjectUserMark;

+import org.eclipse.viatra2.core.tracebased.tracetree.ITraceTreeNode;

+import org.eclipse.viatra2.core.tracebased.tracetree.TransactionTraceTreeNode;

+import org.eclipse.viatra2.errors.VPMRuntimeException;

+import org.eclipse.viatra2.logger.Logger;

+

+/**

+ * @author Abel Hegedus

+ *

+ */

+public class TraceUndoManager implements IUndoManager {

+

+	TraceModelSpace modelSpace;

+

+	TraceModelManager mManager;

+	

+	Logger logger;

+	

+	@Override

+	public void init(Logger l, IModelSpace m) throws VPMRuntimeException {

+		logger = l;

+		modelSpace = (TraceModelSpace) m;

+		mManager = (TraceModelManager) modelSpace.getModelManager();

+	}

+

+	@Override

+	public void nextUndoBlock(String name) {

+		// FIXME only for legacy reasons, transaction ID is the user mark

+		((TraceNotificationManager) modelSpace.getNotificationManager()).sendNotification(new NotificationObjectUserMark(name));

+	}

+

+	@Override

+	public boolean canUndo() {

+		return !getUndoInfoFromTraceTree(true, 1).isEmpty();

+	}

+

+	@Override

+	public List<String> getUndoList(int n) {

+		return getUndoInfoFromTraceTree(true, n);

+	}

+

+	@Override

+	public void flushUndoBuffer() {

+		logger.info("Trace based undo manager has no buffer");

+	}

+

+	@Override

+	public void undo() {

+		undoLastTransaction();

+	}

+

+	@Override

+	public void undo(int n) {

+		for (int i = 0; i < n; ++i)

+			undo();

+	}

+

+	@Override

+	public void undo(String markName) {

+		String last = null;

+		while((last = undoLastTransaction()) != null){

+			if(last.equals(markName)){

+				break;

+			}

+		}

+		

+	}

+

+	/**

+	 * Transaction IDs are unique, therefore this method is useless,

+	 * result is the same as calling undo(markName).

+	 * <p/>

+	 * Note: if multiple transactions with the same name are allowed,

+	 * this method will undo at most n of them.

+	 * 

+	 */

+	@Override

+	public void undo(String markName, int n) {

+		for (int i = 0; i < n; ++i)

+			undo(markName);

+	}

+

+	@Override

+	public List<String> getUndoableList() {

+		return getUndoInfoFromTraceTree(false, -1);

+	}

+	

+	/**

+	 * Undo the last undoable transaction and return the user mark (ID)

+	 * @return the user mark (ID) of the transaction

+	 */

+	private String undoLastTransaction() {

+		while(true){

+			ITraceTreeNode current = modelSpace.getTraceManager().getCurrent();

+			if(current != modelSpace.getTraceManager().getRoot()){

+				try {

+					// undo trace tree node

+					current.undo(modelSpace.getFramework());

+				} catch (TraceException e) {

+					logger.fatal("Error performing undo; message:" + e.getMessage());

+					return null;

+				}

+				// this method doesn't ensure that only transaction

+				// nodes are processed! This is intentional.

+				if(current instanceof TransactionTraceTreeNode){

+					// if undoable, return id

+					if(((TransactionTraceTreeNode) current).isUndoable()){

+						return current.getID();

+					}

+				}

+			} else {

+				// cannot undo from trace tree root

+				logger.fatal("Error performing undo, trace tree root reached");

+				return null;

+			}

+		}

+	}

+

+	/**

+	 * Collects string representation of undoable operations and user marks for undoable transactions

+	 * 

+	 * @param onlyUserMarks if true, only the list of user marks are returned

+	 * @param numberOfUndos if higher than 0, only the specified amount of undoable transactions are collected

+	 * @return if onlyUserMarks is true, the list of user marks, otherwise the list of undoable operations

+	 */

+	private List<String> getUndoInfoFromTraceTree(boolean onlyUserMarks, int numberOfUndos) {

+		List<String> userMarks = new ArrayList<String>();

+		List<List<String>> operations = new ArrayList<List<String>>();

+		// temporal store for partial and subtransactions

+		List<List<String>> potentials = new ArrayList<List<String>>();

+		ITraceTreeNode current = modelSpace.getTraceManager().getCurrent();

+		boolean userMark = false, partialTrans = false;

+		// go back through the trace hierarchy

+		while(current != null){

+			// only transaction nodes are allowed

+			if(current instanceof TransactionTraceTreeNode){

+				TransactionTraceTreeNode tttn = (TransactionTraceTreeNode) current;

+				List<String> events = new ArrayList<String>();

+				// partial transactions are acceptable

+				if(tttn.getEvents().size() > 0 && tttn.getEvents().get(0) instanceof ICoreNotificationObjectTransactionEnd){

+					partialTrans = true;

+				}

+				// undoable transactions have user marks

+				if(tttn.isUndoable()){

+					userMark = true;

+					if(onlyUserMarks){

+						// store user mark

+						userMarks.add(tttn.getID());

+						if(numberOfUndos > 0 && userMarks.size() == numberOfUndos){

+							break;

+						}

+					}

+				}

+				if(!onlyUserMarks){

+					for (ICoreNotificationObject event : tttn.getEvents()) {

+						// copy event strings

+						events.add(event.toString());

+					}

+					if(userMark){

+						operations.addAll(potentials);

+						potentials.clear();

+						operations.add(events);

+					} else if(partialTrans || tttn.isSubTransaction()){

+						// an earlier undoable transaction will decide

+						potentials.add(events);

+					} else {

+						// if a transaction is not undoable, partial or subtransaction

+						break;

+					}

+				} 

+			} else break;

+			current = current.getParent();

+		}

+		if(onlyUserMarks){

+			return userMarks;

+		} else {

+			List<String> resList = new ArrayList<String>();

+			// operations are returned in execution order

+			Collections.reverse(operations);

+			for (List<String> list : operations) {

+				resList.addAll(list);

+			}

+			return resList;

+		}

+	}

+

+	

+	

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/tracetree/AbstractTraceTreeNode.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/tracetree/AbstractTraceTreeNode.java
new file mode 100644
index 0000000..4aa4947
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/tracetree/AbstractTraceTreeNode.java
@@ -0,0 +1,145 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Abel Hegedus and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Abel Hegedus - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.core.tracebased.tracetree;

+

+import java.util.ArrayList;

+import java.util.List;

+import java.util.Map;

+import java.util.Set;

+import java.util.TreeMap;

+

+/**

+ * @author Abel Hegedus

+ *

+ */

+public abstract class AbstractTraceTreeNode implements ITraceTreeNode {

+

+	private Map<String,ITraceTreeNode> children;

+	private List<ITraceTreeNode> orderedChildren;

+	private ITraceTreeNode parent;

+	private String id;

+	private boolean terminated = false;

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.trace.trace.ITraceTreeNode#getChildren()

+	 */

+	@Override

+	public Map<String,ITraceTreeNode> getChildren() {

+		if(children == null){

+			children = new TreeMap<String, ITraceTreeNode>();

+			orderedChildren = new ArrayList<ITraceTreeNode>();

+		}

+		return children;

+	}

+

+	@Override

+	public List<ITraceTreeNode> getOrderedChildrenList() {

+		if(orderedChildren == null){

+			children = new TreeMap<String, ITraceTreeNode>();

+			orderedChildren = new ArrayList<ITraceTreeNode>();

+		}

+		return orderedChildren;

+	}

+	

+	@Override

+	public void addChild(ITraceTreeNode child) {

+		getChildren().put(child.getID(), child);

+		getOrderedChildrenList().add(child);

+	}

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.trace.trace.ITraceTreeNode#getChildrenIDs()

+	 */

+	@Override

+	public Set<String> getChildrenIDs() {

+		

+		return getChildren().keySet();

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.trace.trace.ITraceTreeNode#getChild(java.lang.String)

+	 */

+	@Override

+	public ITraceTreeNode getChild(String childID) {

+		// TODO Auto-generated method stub

+		return getChildren().get(childID);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.trace.trace.ITraceTreeNode#getID()

+	 */

+	@Override

+	public String getID() {

+		return id;

+	}

+

+	/**

+	 * 

+	 */

+	public AbstractTraceTreeNode(ITraceTreeNode parent, String id) {

+		this.parent = parent; 

+		this.id = id;

+		if(parent != null){

+			parent.addChild(this);

+		}

+		

+	}

+	

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.trace.trace.ITraceTreeNode#getParent()

+	 */

+	@Override

+	public ITraceTreeNode getParent() {

+		return parent;

+	}

+

+	/**

+	 * @param terminated the terminated to set

+	 */

+	public void setTerminated(boolean terminated) {

+		this.terminated = terminated;

+	}

+

+	/**

+	 * @return the terminated

+	 */

+	public boolean isTerminated() {

+		return terminated;

+	}

+	

+	/* (non-Javadoc)

+	 * @see java.lang.Object#toString()

+	 */

+	@Override

+	public String toString() {

+		

+		StringBuilder sb = new StringBuilder();

+		sb.append("ID: ").append(id);

+		if(parent != null){

+			sb.append("; Parent: ").append(parent.getID());

+		}

+		if(terminated){

+			sb.append("; Terminated");

+		} else {

+			sb.append("; In progress");

+		}

+		return sb.toString();

+	}

+

+	/**

+	 * @return the orderedChildren

+	 */

+	public List<ITraceTreeNode> getOrderedChildren() {

+		return orderedChildren;

+	}

+

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/tracetree/AtomicTraceTreeNode.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/tracetree/AtomicTraceTreeNode.java
new file mode 100644
index 0000000..e9965ed
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/tracetree/AtomicTraceTreeNode.java
@@ -0,0 +1,48 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Abel Hegedus and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Abel Hegedus - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.core.tracebased.tracetree;

+

+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;

+

+/**

+ * @author Abel Hegedus

+ *

+ */

+public class AtomicTraceTreeNode extends CompositeTraceTreeNode {

+

+	// notification manager suppresses it

+	//boolean moreThanOneAtomic = false;

+	

+	/**

+	 * @param parent

+	 * @param id

+	 * @param event

+	 */

+	public AtomicTraceTreeNode(ITraceTreeNode parent, String id, ICoreNotificationObject event){//, boolean moreThanOneAtomic) {

+		super(parent, id, event);

+		//this.moreThanOneAtomic = moreThanOneAtomic;

+	}

+

+	/**

+	 * @return the moreThanOneAtomic

+	 */

+	/*public boolean isMoreThanOneAtomic() {

+		return moreThanOneAtomic;

+	}*/

+

+	/**

+	 * @param moreThanOneAtomic the moreThanOneAtomic to set

+	 */

+	/*public void setMoreThanOneAtomic(boolean moreThanOneAtomic) {

+		this.moreThanOneAtomic = moreThanOneAtomic;

+	}*/

+

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/tracetree/CompositeTraceTreeNode.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/tracetree/CompositeTraceTreeNode.java
new file mode 100644
index 0000000..fbe8361
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/tracetree/CompositeTraceTreeNode.java
@@ -0,0 +1,131 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Abel Hegedus and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Abel Hegedus - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.core.tracebased.tracetree;

+

+import java.util.ArrayList;

+import java.util.List;

+

+import org.eclipse.viatra2.core.IModelSpace;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;

+import org.eclipse.viatra2.core.tracebased.TraceException;

+import org.eclipse.viatra2.core.tracebased.TraceModelSpace;

+import org.eclipse.viatra2.core.tracebased.TraceNotificationManager;

+import org.eclipse.viatra2.core.tracebased.TraceTreeManager;

+import org.eclipse.viatra2.framework.IFramework;

+

+/**

+ * @author Abel Hegedus

+ *

+ */

+public class CompositeTraceTreeNode extends AbstractTraceTreeNode {

+

+	private List<ICoreNotificationObject> events;

+	

+	/**

+	 * @param parent

+	 * @param id

+	 * @param startEvent

+	 */

+	public CompositeTraceTreeNode(ITraceTreeNode parent, String id, ICoreNotificationObject startEvent) {

+		super(parent, id);

+		events = new ArrayList<ICoreNotificationObject>();

+		events.add(startEvent);

+	}

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.trace.trace.ITraceTreeNode#doExecute(org.eclipse.viatra2.framework.IFramework)

+	 */

+	@Override

+	public void doExecute(IFramework framework) throws TraceException {

+		IModelSpace ms = framework.getTopmodel();

+		if(ms instanceof TraceModelSpace){

+			// get trace tree manager

+			TraceTreeManager ttm = ((TraceModelSpace) ms).getTraceManager();

+			if(events.size() > 0){

+				// notifications are not registered

+				((TraceNotificationManager)ms.getNotificationManager()).setEnabled(false);

+				ms.getTransactionManager().beginTransaction(Boolean.TRUE);

+				// execute events one-by-one

+				try{

+					for (ICoreNotificationObject event : events) {

+						ttm.getTraceProcessor().doExecuteEvent(event);

+					}

+					((TraceNotificationManager)ms.getNotificationManager()).setEnabled(true);

+				} catch (TraceException e) {

+					((TraceNotificationManager)ms.getNotificationManager()).setEnabled(true);

+					throw e;

+				}

+				ms.getTransactionManager().commitTransaction();

+				

+			}

+			// update current node of trace tree manager

+			ttm.setCurrent(this);

+		} else {

+			throw (TraceException) new TraceException("doExecute not possible, model-space is not trace-based!").fillInStackTrace();

+		}

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.trace.trace.ITraceTreeNode#undo(org.eclipse.viatra2.framework.IFramework)

+	 */

+	@Override

+	public void undo(IFramework framework) throws TraceException {

+		IModelSpace ms = framework.getTopmodel();

+		if(ms instanceof TraceModelSpace){

+			// get trace tree manager

+			TraceTreeManager ttm = ((TraceModelSpace) ms).getTraceManager();

+			if(events.size() > 0){

+				// undo all events one-by-one (in reverse order)

+//				List<ICoreNotificationObject> reversedEventList = new ArrayList<ICoreNotificationObject>(events);

+//				Collections.reverse(reversedEventList);

+//				for (ICoreNotificationObject event : reversedEventList) {

+//					ttm.getTraceProcessor().undoEvent(event);

+//				}

+				for(int i = events.size()-1; i >= 0; i--){

+					ttm.getTraceProcessor().undoEvent(events.get(i));

+				}

+			}

+			// update current node in trace tree (except if TraceException was thrown during the undo of an event)

+			ttm.setCurrent(getParent());

+		} else {

+			throw (TraceException) new TraceException("Undo not possible, model-space is not trace-based!").fillInStackTrace();

+		}

+	}

+

+	/**

+	 * @return the events

+	 */

+	public List<ICoreNotificationObject> getEvents() {

+		return events;

+	}

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.trace.trace.AbstractTraceTreeNode#toString()

+	 */

+	@Override

+	public String toString() {

+		String superString = super.toString();

+		StringBuilder sb = new StringBuilder();

+		sb.append(superString);

+		if(events.isEmpty()){

+			sb.append("; No events");

+		} else {

+			int i = 0;

+			sb.append("; Events (").append(events.size()).append(")");

+			for (ICoreNotificationObject event : events) {

+				sb.append(" ").append(i).append(": ");

+				sb.append(event.toString());

+				i++;

+			}

+		}

+		return sb.toString();

+	}

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/tracetree/EmptyTraceTreeNode.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/tracetree/EmptyTraceTreeNode.java
new file mode 100644
index 0000000..72aa3ee
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/tracetree/EmptyTraceTreeNode.java
@@ -0,0 +1,47 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Abel Hegedus and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Abel Hegedus - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.core.tracebased.tracetree;

+

+import org.eclipse.viatra2.core.tracebased.TraceException;

+import org.eclipse.viatra2.framework.IFramework;

+

+/**

+ * @author Abel Hegedus

+ *

+ */

+public class EmptyTraceTreeNode extends AbstractTraceTreeNode {

+

+	/**

+	 * @param parent

+	 * @param id

+	 */

+	public EmptyTraceTreeNode(ITraceTreeNode parent, String id) {

+		super(parent, id);

+		setTerminated(true);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.trace.trace.ITraceTreeNode#doExecute(org.eclipse.viatra2.framework.IFramework)

+	 */

+	@Override

+	public void doExecute(IFramework framework) throws TraceException {

+		throw new TraceException("Empty Trace Tree Nodes are not executable");

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.trace.trace.ITraceTreeNode#undo(org.eclipse.viatra2.framework.IFramework)

+	 */

+	@Override

+	public void undo(IFramework framework) throws TraceException {

+		throw new TraceException("Empty Trace Tree Nodes are not undoable");

+	}

+

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/tracetree/ITraceTreeNode.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/tracetree/ITraceTreeNode.java
new file mode 100644
index 0000000..c970b5a
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/tracetree/ITraceTreeNode.java
@@ -0,0 +1,94 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Abel Hegedus and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Abel Hegedus - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.core.tracebased.tracetree;

+

+import java.util.List;

+import java.util.Map;

+import java.util.Set;

+

+import org.eclipse.viatra2.core.tracebased.TraceException;

+import org.eclipse.viatra2.framework.IFramework;

+

+/**

+ * Interface for the node of the trace tree

+ * 

+ * 

+ * @author Abel Hegedus

+ *

+ */

+public interface ITraceTreeNode {

+	

+	/**

+	 * Get children tree nodes of the current node

+	 * 

+	 * @return the map of children node IDs and references

+	 */

+	public Map<String, ITraceTreeNode> getChildren();

+

+	/**

+	 * Get ordered list of children tree nodes of the current node

+	 * 

+	 * @return the ordered list of children nodes

+	 */

+	public List<ITraceTreeNode> getOrderedChildrenList();

+	

+	/**

+	 * Get ID set of children nodes

+	 * 

+	 * @return the set of ids for children nodes

+	 */

+	public Set<String> getChildrenIDs();

+	

+	/**

+	 * Adds a new child to the ordered list of children and puts it into the map

+	 * 

+	 * @param child the trace tree node to be added as a child

+	 */

+	public void addChild(ITraceTreeNode child);

+	

+	/**

+	 * Get the parent node for the given node (or null if it is the root)

+	 * 

+	 * @return the parent node

+	 */

+	public ITraceTreeNode getParent();

+	

+	/**

+	 * Get a child corresponding to a specific id

+	 * 

+	 * @param childID the id of the child

+	 * @return

+	 */

+	public ITraceTreeNode getChild(String childID);

+	

+	/**

+	 * Get id of the current node

+	 * 

+	 * @return the id of the node

+	 */

+	public String getID();

+	

+	/**

+	 * Execute the model manipulations stored in the node

+	 * 

+	 * @param framework the VIATRA framework with the model

+	 * @throws TraceException if the model state is not in synch with the node

+	 */

+	public void doExecute(IFramework framework) throws TraceException;

+	

+	/**

+	 * Undo the model manipulations stored in the node

+	 * 

+	 * @param framework the VIATRA framework with the model

+	 * @throws TraceException if the model state is not in synch with the node

+	 */

+	public void undo(IFramework framework) throws TraceException;

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/tracetree/TransactionTraceTreeNode.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/tracetree/TransactionTraceTreeNode.java
new file mode 100644
index 0000000..74eb244
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/core/tracebased/tracetree/TransactionTraceTreeNode.java
@@ -0,0 +1,135 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Abel Hegedus and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Abel Hegedus - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.core.tracebased.tracetree;

+

+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;

+

+/**

+ * @author Abel Hegedus

+ *

+ */

+public class TransactionTraceTreeNode extends CompositeTraceTreeNode {

+

+	/**

+	 * How deep the transaction is in the hierarchy of subtransactions

+	 */

+	private int level = 0;

+	

+	private boolean subTransaction = false;

+	private boolean aborted = false;

+	private boolean undoable = false;

+	private boolean committed = false;

+	

+	public TransactionTraceTreeNode(ITraceTreeNode parent, String id,

+			ICoreNotificationObject startEvent, boolean lowerThanParent, boolean undoable) {

+		this(parent, id, startEvent, lowerThanParent);

+		this.undoable = undoable;

+	}

+	

+	/**

+	 * @param parent

+	 * @param id

+	 * @param startEvent

+	 */

+	public TransactionTraceTreeNode(ITraceTreeNode parent, String id,

+			ICoreNotificationObject startEvent, boolean lowerThanParent) {

+		super(parent, id, startEvent);

+		if(parent instanceof TransactionTraceTreeNode){

+			// subtransaction level is based on the parent

+			level = ((TransactionTraceTreeNode) parent).getLevel();

+			if(lowerThanParent){

+				// inner subtransaction

+				level++;

+			} else{

+				// exit from subtransaction

+				if(level > 0){

+					level--;

+				}

+				committed = true;

+			}

+			if(level > 0 ){

+				subTransaction = true;

+			}

+		}

+	}

+

+	/**

+	 * How deep the transaction is in the hierarchy of subtransactions

+	 * 

+	 * @return the level

+	 */

+	public int getLevel() {

+		return level;

+	}

+

+	/**

+	 * @return the subTransaction

+	 */

+	public boolean isSubTransaction() {

+		return subTransaction;

+	}

+

+	/**

+	 * @param aborted the aborted to set

+	 */

+	public void setAborted(boolean aborted) {

+		this.aborted = aborted;

+	}

+

+	/**

+	 * @return the aborted

+	 */

+	public boolean isAborted() {

+		return aborted;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.trace.trace.CompositeTraceTreeNode#toString()

+	 */

+	@Override

+	public String toString() {

+		String superString = super.toString();

+		StringBuilder sb = new StringBuilder();

+		sb.append(superString);

+		if(subTransaction){

+			sb.append("; SubTr - ");

+			sb.append(level);

+		}

+		if(aborted) {

+			sb.append("; Aborted");

+		} else if(committed) {

+			sb.append("; Committed");

+		}

+		return sb.toString();

+	}

+

+	/**

+	 * @return the undoable

+	 */

+	public boolean isUndoable() {

+		return undoable;

+	}

+

+	/**

+	 * @return the committed

+	 */

+	public boolean isCommitted() {

+		return committed;

+	}

+

+	/**

+	 * @param committed the committed to set

+	 */

+	public void setCommitted(boolean committed) {

+		this.committed = committed;

+	}

+

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/ConsistencyViolationException.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/ConsistencyViolationException.java
new file mode 100644
index 0000000..f869b4a
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/ConsistencyViolationException.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.errors;
+
+/**
+ * @author Administrator
+ * 
+ *         To change the template for this generated type comment go to Window -
+ *         Preferences - Java - Code Generation - Code and Comments
+ */
+public class ConsistencyViolationException extends Exception {
+
+	/**

+	 * 

+	 */
+	private static final long serialVersionUID = 1L;
+
+	String msg;
+
+	/**
+	 * Constructor.
+	 * 
+	 * @param s
+	 *            Mesage to be thrown.
+	 */
+	public ConsistencyViolationException(String s) {
+		this.msg = s;
+
+	}
+
+	/**
+	 * returns the message contained by this instance.
+	 */
+	public String getMessage() {
+		return msg;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/IsolationViolationException.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/IsolationViolationException.java
new file mode 100644
index 0000000..d067616
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/IsolationViolationException.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.errors;
+
+/**
+ * @author Administrator
+ * 
+ *         To change the template for this generated type comment go to Window -
+ *         Preferences - Java - Code Generation - Code and Comments
+ */
+public class IsolationViolationException extends Exception {
+
+	/**

+	 * 

+	 */
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/VPMCoreException.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/VPMCoreException.java
new file mode 100644
index 0000000..a9e8a62
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/VPMCoreException.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.errors;
+
+/**
+ * VPM core throws this exception if a corrupt model is to be built by VPM model
+ * manager calls.
+ * 
+ * @author Andras Balogh
+ * 
+ */
+public class VPMCoreException extends VPMException {
+
+	/**

+	 * 

+	 */
+	private static final long serialVersionUID = 1L;
+
+	public VPMCoreException(String msg) {
+		super(msg);
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/VPMCoreNullParameterException.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/VPMCoreNullParameterException.java
new file mode 100644
index 0000000..c0d7fb0
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/VPMCoreNullParameterException.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.errors;
+
+/**
+ * VPM core exception indicating that the model manager call has null parameter.
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public class VPMCoreNullParameterException extends VPMCoreException {
+	/**

+	 * 

+	 */
+	private static final long serialVersionUID = 1L;
+
+	/**

+	 * 

+	 */
+	public VPMCoreNullParameterException(String msg) {
+		super(msg);
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/VPMCoreRuntimeException.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/VPMCoreRuntimeException.java
new file mode 100644
index 0000000..32a8c54
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/VPMCoreRuntimeException.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.errors;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public class VPMCoreRuntimeException extends VPMCoreException {
+	/**

+	 * 

+	 */
+	private static final long serialVersionUID = 1L;
+
+	public VPMCoreRuntimeException(String msg) {
+		super(msg);
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/VPMException.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/VPMException.java
new file mode 100644
index 0000000..c1f559d
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/VPMException.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.errors;
+
+/**
+ * @author Administrator
+ * 
+ *         To change the template for this generated type comment go to Window -
+ *         Preferences - Java - Code Generation - Code and Comments
+ */
+public class VPMException extends Exception {
+
+	/**

+	 * 

+	 */
+	private static final long serialVersionUID = 1L;
+
+	String message = "";
+
+	public VPMException(String msg) {
+		super();
+		message = msg;
+	}
+
+	public String getMessage() {
+		return message;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/VPMRuntimeControlledException.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/VPMRuntimeControlledException.java
new file mode 100644
index 0000000..f9479f7
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/VPMRuntimeControlledException.java
@@ -0,0 +1,28 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.errors;

+

+public class VPMRuntimeControlledException extends VPMRuntimeException {

+

+	/**

+	 * 

+	 */

+	private static final long serialVersionUID = 8722949426838508892L;

+

+	public VPMRuntimeControlledException(String s) {

+		super(s);

+	}

+

+	public VPMRuntimeControlledException(String s, Throwable cause) {

+		super(s, cause);

+	}

+

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/VPMRuntimeException.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/VPMRuntimeException.java
new file mode 100644
index 0000000..310697a
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/VPMRuntimeException.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.errors;
+
+/**
+ * @author Andras Schmidt
+ * 
+ * Signals a run-time VPM error.
+ * 
+ */
+public class VPMRuntimeException extends Exception {
+	/**

+	 * 

+	 */
+	private static final long serialVersionUID = 1L;
+
+	public VPMRuntimeException(String s) {
+		super(s);
+	}
+
+	public VPMRuntimeException(String s, Throwable cause) {
+		super(s, cause);
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/info/ErrorInformation.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/info/ErrorInformation.java
new file mode 100644
index 0000000..e3cc641
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/info/ErrorInformation.java
@@ -0,0 +1,300 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Daniel Varro - initial API and implementation
+ *******************************************************************************/
+
+/**
+* Copyright (c) 2007 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   OptXware - Initial API and implementation
+*
+* Created: 
+* 		2007.08.26	Daniel Varro
+*/
+
+package org.eclipse.viatra2.errors.info;
+
+
+/**
+ * Summary: 
+ * 	This class provides generic handling for error information 
+ * 	in the parser and validator modules.  
+ * 
+ * Description: 
+ * 	ErrorInformation stores the {@link Location} of the error as  beginLine, beginColumn, 
+ *  endLine, endColumn. ErrorSeverity can be an info, a warning or an error.
+ *  ErrorKind shows if the error originates from the parser or the validator. 
+ *  Finally, the textual representation of the error message is also stored. 
+ *   
+ * @author Daniel Varro
+ *
+ */
+public class ErrorInformation 
+{
+	public enum ErrorKind {PARSE_ERROR, VALIDATION_ERROR};
+
+	public enum ErrorSeverity {INFO, WARNING , ERROR};
+	
+	private String message;
+	private Location location;
+	private ErrorSeverity errorSeverity;
+	private ErrorKind errorKind;
+	private static final String defaultMarkerId = "org.eclipse.viatra2.loaders.vtclparsermarker";
+	private String markerId = defaultMarkerId;
+	
+	/**
+	 * Creates a new ErrorInformation with default location (0,0,0,0) with severity "error"
+	 * @param m : Text of the error message
+	 * @param errorKind : source of the error information (parser / validator)
+	 * @deprecated Use instead {@link ErrorInformation#ErrorInformation(String, String, ErrorKind)}
+	 */
+	public ErrorInformation(String m, ErrorKind errorKind)
+	{
+		this(m, defaultMarkerId, errorKind, new Location(0,0,0,0), ErrorSeverity.ERROR);
+	}
+	
+	/**
+	 * Creates a new ErrorInformation with default location (0,0,0,0) with severity "error"
+	 * @param m : Text of the error message
+	 * @param markerId : the identifier of the marker to use
+	 * @param errorKind : source of the error information (parser / validator)
+	 */
+	public ErrorInformation(String m, String markerId, ErrorKind errorKind){
+		this(m, markerId, new Location(0,0,0,0), ErrorSeverity.ERROR);
+	}
+
+	/**
+	 * Creates a new ErrorInformation at a given location with severity "error" using
+	 * the given error message and error kind
+	 * 
+	 * @param m : Text of the error message
+	 * @param errorKind : source of the error information (parser / validator)  
+	 * @param bl : begin line of the location
+	 * @param el : end line of the location
+	 * @param bc : begin column of the location
+	 * @param ec : end column of the location
+	 * @deprecated
+	 */
+	public ErrorInformation(String m, ErrorKind errorKind, int bl,int el,int bc,int ec)
+	{
+		this(m, defaultMarkerId, errorKind, new Location(bl, el, bc, ec), ErrorSeverity.ERROR);
+	}
+	/**
+	 * Creates a new ErrorInformation at a given location with severity "error" using
+	 * the given error message and error kind
+	 * 
+	 * @param m : Text of the error message
+	 * @param markerId : the markerId to use
+	 * @param errorKind : source of the error information (parser / validator)  
+	 * @param bl : begin line of the location
+	 * @param el : end line of the location
+	 * @param bc : begin column of the location
+	 * @param ec : end column of the location
+	 */
+	public ErrorInformation(String m, String markerId, ErrorKind errorKind, int bl,int el,int bc,int ec)
+	{
+		this(m, markerId, errorKind, new Location(bl, el, bc, ec), ErrorSeverity.ERROR);
+	}
+
+	/**
+	 * Creates a new ErrorInformation at a given location with severity "error" using
+	 * the given error message and error kind
+	 * 
+	 * @param m : Text of the error message
+	 * @param errorKind : source of the error information (parser / validator)  
+	 * @param loc : location of the error
+	 * @deprecated Use instead {@link ErrorInformation#ErrorInformation(String, String, ErrorKind, Location, ErrorSeverity)}
+	 */
+	public ErrorInformation(String m, ErrorKind errorKind, Location loc)
+	{
+		this(m, defaultMarkerId, errorKind, loc, ErrorSeverity.ERROR);
+	}
+
+	/**
+	 * Creates a new ErrorInformation at a given location with a given severity using
+	 * the given error message and error kind
+	 * 
+	 * @param m : Text of the error message
+	 * @param errorKind : source of the error information (parser / validator)  
+	 * @param loc : location of the error
+	 * @param level : severity of the error (INFO / WARNING / ERROR)
+	 * @deprecated Use instead {@link ErrorInformation#ErrorInformation(String, String, ErrorKind, Location, ErrorSeverity)}
+	 */
+	public ErrorInformation(String m, ErrorKind errorKind, Location loc, ErrorSeverity level)
+	{
+		this(m, defaultMarkerId, errorKind, loc, level);
+	}
+	/**
+	 * Creates a new ErrorInformation at a given location with a given severity using
+	 * the given error message and error kind
+	 * 
+	 * @param m : Text of the error message
+	 * @param markerId : the markerId to use
+	 * @param errorKind : source of the error information (parser / validator)  
+	 * @param loc : location of the error
+	 * @param level : severity of the error (INFO / WARNING / ERROR)
+	 */
+	public ErrorInformation(String m, String markerId, ErrorKind errorKind, Location loc, ErrorSeverity level)
+	{
+		this.message = m;
+		this.location = loc; 
+		this.errorSeverity = level;
+		this.errorKind = errorKind;
+	}
+
+	/**
+	 * Creates a new ErrorInformation at a given location with a given severity using
+	 * the given error message and error kind
+	 * 
+	 * @param m : Text of the error message
+	 * @param markerId : marker Id for error information   
+	 * @param loc : location of the error
+	 * @param level : severity of the error (INFO / WARNING / ERROR)
+	 */
+	public ErrorInformation(String m, String markerId, Location loc, ErrorSeverity level)
+	{
+		this.message = m;
+		this.location = loc; 
+		this.errorSeverity = level;
+		this.errorKind = ErrorKind.PARSE_ERROR;
+		this.markerId = markerId;
+	}
+
+	/**
+	 * Returns the error kind of the error information
+	 * @return : parser or validator
+	 */
+	public ErrorKind getErrorKind() {
+		return errorKind;
+	}
+	
+	/**
+	 * Returns the message of the error information (without textual location information)
+	 * @return : textual error message (no location info)
+	 */
+	public String getMessage()
+	{
+		return message;
+	}
+	
+	/**
+	 * Returns the message of the error information (with textual location information)
+	 * @return : textual error message (with location info) 
+	 */
+	public String getMessageWithLocation() {
+	    String locStr = new String (
+	    		String.valueOf(location.getBeginLine()) + ":" +
+	    		String.valueOf(location.getBeginColumn()) + ":" +
+	    		String.valueOf(location.getEndLine()) + ":" +
+	    		String.valueOf(location.getEndColumn()));
+	    return new String(locStr + " : " + message);
+	    		
+	}
+	
+	/**
+	 * Returns the severity field of the error information
+	 * @return INFO / WARNING / ERROR
+	 */
+	public ErrorSeverity getErrorSeverity() {
+	    return errorSeverity;
+	}
+	
+	
+	/**
+	 * Returns the location of the error information
+	 * @return {@link Location} of the error
+	 */
+	public Location getLocation() {
+		return location;
+	}
+
+	
+	/**
+	 * Returns the markerId string of the error information
+	 * @return {@link String} of the error
+	 */
+	public String getMarkerId() {
+		return markerId;
+	}
+
+
+	/**
+	 * Binding the '{N}' (N = 1..5 or ALL) strings to contextual conditions in 'context'
+	 * @param context : array of context-sensitive Strings
+	 */
+	public void bind(String[] context) {
+		if (context.length >= 1) {
+			message = message.replace("{1}", context[0]);
+		}
+		if (context.length >= 2) {
+			message = message.replace("{2}", context[1]);
+		}
+		if (context.length >= 3) {
+			message = message.replace("{3}", context[2]);
+		}
+		if (context.length >= 4) {
+			message = message.replace("{4}", context[3]);
+		}
+		if (context.length >= 5) {
+			message = message.replace("{5}", context[4]);
+		}
+		if (message.contains("{ALL}")) {
+			String allContext = new String();
+			for (int i = 0; i < context.length; i++) {
+				allContext += (context[i] + (i < context.length - 1 ? ", " : ""));
+			}
+			message = message.replace("{ALL}", allContext);
+		}
+	}
+	
+	/**
+	 * Weak comparison function which decides whether two
+	 * ErrorInformation DTO instances can be considered equivalent.
+	 * 
+	 * Criterions:
+	 *  - equivalent {@link ErrorKind} fields
+	 *  - equivalent {@link ErrorSeverity} fields
+	 *  - same startline for {@Location} fields
+	 *  - message fields are substrings (or-or)
+	 * @author Istvan Rath
+	 * @param ei 
+	 * @return true if the information are considered the same
+	 * 
+	 */
+	public boolean isEquivalent(ErrorInformation ei) {
+		boolean crit1 = this.errorKind.equals(ei.errorKind);
+		boolean crit2 = this.errorSeverity.equals(ei.errorSeverity);
+		boolean crit3 = this.location.getBeginLine() ==
+							ei.location.getBeginLine();
+		boolean crit4 = this.message.toLowerCase().indexOf(ei.message.toLowerCase()) > -1;
+		boolean crit5 = ei.message.toLowerCase().indexOf(this.message.toLowerCase()) > -1;
+		
+		return (crit1 && crit2 && crit3 && (crit4 || crit5));
+	}
+
+	@Override
+	public String toString() {
+		StringBuilder builder = new StringBuilder();
+		builder.append('[');
+		builder.append(errorSeverity);
+		builder.append("] ");
+		builder.append(message);
+		builder.append(" (");
+		builder.append(location);
+		builder.append(", ");
+		builder.append(errorKind);
+		builder.append(")");
+		return builder.toString();
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/info/Location.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/info/Location.java
new file mode 100644
index 0000000..57f0c3b
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/info/Location.java
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Daniel Varro - initial API and implementation
+ *******************************************************************************/
+
+/**
+* Copyright (c) 2007 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   OptXware - Initial API and implementation
+*
+* Created: 
+* 		2007.08.26	Daniel Varro
+*/
+package org.eclipse.viatra2.errors.info;
+
+/**
+ * Summary: 
+ * 	This class provides a generic Location used for providing error information 
+ * 	in the parser and validator.  
+ * 
+ * Description: 
+ * 	Location class stores beginLine, beginColumn, endLine, endColumn as integer values, and optionally stores offset information as well.
+ *   
+ * @author Daniel Varro
+ * @version 1.0
+ *
+ */
+
+public class Location {
+	private int beginLine = 0;
+	private int endLine = 0;
+	private int beginColumn = 0;
+	private int endColumn = 0;
+	private int beginOffset = -1;
+	private int endOffset = -1;
+
+	/**
+	 * Creates a new Location with the given line and column parameters 
+	 * @param bl : begin line
+	 * @param bc : begin column
+	 * @param el : end line
+	 * @param ec : end column
+	 */
+	public Location(int bl, int bc, int el, int ec)
+	{
+		beginLine = bl;
+		endLine = el;
+		beginColumn = bc;
+		endColumn = ec;
+	}
+	
+	public Location(int bl, int bc, int el, int ec, int bo, int eo) {
+		this(bl, bc, el, ec);
+		beginOffset = bo;
+		endOffset = eo;
+	}
+
+	/**
+	 * Creates a new Location from a string representation where 
+	 * locations are separated by commas (',') 
+	 * @param locationStr :	begin line ',' begin column ',' end line ',' end column 
+	 */
+	public Location(String locationStr) {
+	    String[] locations = locationStr.split(",");
+	    if (locations.length == 4) {
+		beginLine = parseInt(locations[0]);
+		beginColumn = parseInt(locations[1]);
+		endLine = parseInt(locations[2]);
+		endColumn = parseInt(locations[3]);
+	    }
+	}
+	
+	/**
+	 * Creates a new Location from two strings representing the location by line numbers and offset values
+	 * @param locationStr begin line ',' begin column ',' end line ',' end column
+	 * @param offsetStr begin offset ':' end offset
+	 */
+	public Location(String locationStr, String offsetStr) {
+		this(locationStr);
+		String[] offsets = offsetStr.split(":");
+		if (offsets.length == 2) {
+			beginOffset = parseInt(offsets[0]);
+			endOffset = parseInt(offsets[1]);
+		}
+	}
+	private static int parseInt(String s) {
+		int i = -1;
+		try {
+			i = Integer.parseInt(s);
+		}
+		catch (Exception e) { }
+		return i;
+	}
+
+	/**
+	 * Converts the location to a string representation where 
+	 * locations are separated by commas (','):
+	 * begin line ',' begin column ',' end line ',' end column 
+	 */
+	public String toString() {
+	    return new String (
+		    String.valueOf(beginLine) + "," +
+		    String.valueOf(beginColumn) + "," +
+		    String.valueOf(endLine) + "," +
+		    String.valueOf(endColumn));
+	}
+	
+	/**
+	 * Returns the begin line value of the Location
+	 * @return begin line
+	 */
+	public int getBeginLine()
+	{
+		return beginLine;
+	}
+	
+	/**
+	 * Returns the end line value of the Location
+	 * @return end line
+	 */
+	public int getEndLine()
+	{
+		return endLine;
+	}
+	
+	/**
+	 * Returns the begin column value of the Location
+	 * @return begin column
+	 */
+	public int getBeginColumn()
+	{
+		return beginColumn;
+	}
+	
+	/**
+	 * Returns the end column value of the Location
+	 * @return end column
+	 */
+	public int getEndColumn()
+	{
+		return endColumn;
+	}
+
+	/**
+	 * @return the beginOffset
+	 */
+	public int getBeginOffset() {
+		return beginOffset;
+	}
+
+	/**
+	 * @return the endOffset
+	 */
+	public int getEndOffset() {
+		return endOffset;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/reporting/IErrorReporter.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/reporting/IErrorReporter.java
new file mode 100644
index 0000000..d9df2e3
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/reporting/IErrorReporter.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.errors.reporting;

+

+import org.eclipse.core.resources.IResource;
+import org.eclipse.viatra2.errors.info.ErrorInformation;
+

+public interface IErrorReporter {

+

+	/**

+	 * Creates a new problem marker from the {@link ErrorInformation} info 

+	 * @param info {@link ErrorInformation}

+	 */

+	public void reportError(ErrorInformation info);

+

+	/**

+	 * Removes problem marker from {@link IResource} resource of a certain type

+	 * @param type

+	 */

+	public void deleteMarkers(String type);

+

+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/reporting/internal/FileToMarkerManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/reporting/internal/FileToMarkerManager.java
new file mode 100644
index 0000000..57664eb
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/reporting/internal/FileToMarkerManager.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011, Istvan Rath, Zoltan Ujhelyi and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.errors.reporting.internal;
+
+import java.lang.ref.WeakReference;
+import java.util.Hashtable;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.viatra2.errors.reporting.IErrorReporter;
+
+/**
+ * @author Zoltan Ujhelyi
+ */
+public class FileToMarkerManager implements IAdapterFactory {
+
+	private Hashtable<IResource, WeakReference<IErrorReporter>> reporters = new Hashtable<IResource, WeakReference<IErrorReporter>>();
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object,
+	 * java.lang.Class)
+	 */
+	public Object getAdapter(Object adaptableObject, Class adapterType) {
+		if (adapterType.equals(IErrorReporter.class)
+				&& adaptableObject instanceof IResource) {
+			IErrorReporter manager;
+			if (reporters.contains(adaptableObject)) {
+				WeakReference<IErrorReporter> ref = reporters
+						.get(adaptableObject);
+				manager = ref.get();
+				if (manager != null)
+					return manager;
+			}
+			manager = new MarkerManager((IResource) adaptableObject);
+			reporters.put((IResource) adaptableObject, new WeakReference<IErrorReporter>(
+					manager));
+			return manager;
+		}
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
+	 */
+	public Class[] getAdapterList() {
+		return new Class[] { IErrorReporter.class };
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/reporting/internal/MarkerManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/reporting/internal/MarkerManager.java
new file mode 100644
index 0000000..7c58dbf
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/errors/reporting/internal/MarkerManager.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.errors.reporting.internal;

+

+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.viatra2.errors.info.ErrorInformation;
+import org.eclipse.viatra2.errors.info.Location;
+import org.eclipse.viatra2.errors.reporting.IErrorReporter;
+

+public class MarkerManager implements IErrorReporter {

+	

+	protected IResource resource;	

+	

+

+	public MarkerManager(IResource resource) {

+		this.resource = resource;

+	}

+	

+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.editor.text.light.vtcl.IVTCLErrorReporter#reportError(org.eclipse.viatra2.errors.info.ErrorInformation)
+	 */
+	public void reportError(ErrorInformation info)

+	{

+		try

+		{

+			Location location = info.getLocation();
+			int offset = location.getBeginOffset();
+			int endOffset = location.getEndOffset();
+			Assert.isTrue(endOffset >= 0 && offset >= 0, "Error location must be set");

+			int length =  endOffset - offset + 1;

+			if (length <= 0) length = 1;

+			int severity;

+			switch (info.getErrorSeverity()) {

+			case INFO:

+				severity = IMarker.SEVERITY_INFO;

+				break;

+			case WARNING:

+				severity = IMarker.SEVERITY_WARNING;

+				break;

+			case ERROR:

+				severity = IMarker.SEVERITY_ERROR;

+				break;

+

+			default:

+				severity = IMarker.SEVERITY_ERROR;

+				break;

+			}

+			createErrorMarker(info.getMessage(), info.getMarkerId(), severity, offset,length, location.getBeginLine());

+		}

+		catch (Exception e)

+		{

+			System.out.println("Editor::reportError exception occured!!!!");

+		}

+	}

+

+	boolean createErrorMarker(String message, String markerId, int severity, int offset, int length, int line) 

+	{

+		

+		if (resource != null) {

+			try 

+			{				

+				IMarker marker = resource.createMarker(markerId);

+				marker.setAttribute(IMarker.SEVERITY, severity);

+				marker.setAttribute(IMarker.MESSAGE, message);

+				marker.setAttribute(IMarker.LINE_NUMBER, line);

+				if (offset != 0)

+				{

+					marker.setAttribute(IMarker.CHAR_START,offset);

+					marker.setAttribute(IMarker.CHAR_END,offset+length);

+				}				

+				return true;

+			} 

+			catch (Exception exc) 

+			{

+				//System.err.println("exc");

+				exc.printStackTrace(System.err);

+			}

+		}		

+		return false;

+	}

+

+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.editor.text.light.vtcl.IVTCLErrorReporter#deleteMarkers(org.eclipse.core.resources.IResource, java.lang.String)
+	 */
+	public void deleteMarkers(String type) 

+	{

+		if (resource == null)

+			return;

+		try 

+		{

+			resource.deleteMarkers(type, true, IResource.DEPTH_INFINITE);

+		} 

+		catch (CoreException e) 

+		{				

+		}

+	}

+

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/exports/VPMExporter.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/exports/VPMExporter.java
new file mode 100644
index 0000000..06c8913
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/exports/VPMExporter.java
@@ -0,0 +1,244 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.exports;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.framework.properties.VPMProperties;
+
+/**
+ * Exports the modelspace into an XML file.
+ * 
+ * @author Andras Schmidt, Istvan Rath
+ * 
+ */
+public class VPMExporter {
+
+	
+	 /**
+	  * Filter out non-valid Unicode characters not allowed in XML 1.0 files.
+      */
+    private final static String stripNonValidXMLCharacters(String in) {
+        if (in == null || ("".equals(in))) {
+        	return "";
+        }
+        StringBuffer res = new StringBuffer();
+        char c;
+        int l = in.length();
+        for (int i = 0; i < l; i++) {
+            c = in.charAt(i);
+            if (isValidXMLUnicodeCharacter(c)) {
+            	res.append(c);
+            }
+        }
+        return res.toString();
+    }  
+    
+    private final static boolean isValidXMLUnicodeCharacter(char c) {
+    	return ((c == 0x9) || (c == 0xA) || (c == 0xD) || ((c >= 0x20) && (c <= 0xD7FF)) || ((c >= 0xE000) && (c <= 0xFFFD)) || ((c >= 0x10000) && (c <= 0x10FFFF)));
+    }
+	
+	
+	/**
+	 * Rewritten by Istvan Rath. Based on original by Andras Schmidt.
+     * Aim is to create xml documents that contains only valid characters
+	 * (mainly international characters), and to avoid xml parser
+	 * mis-understanding <, >, & and [ ]
+	 * 
+	 * @param in
+	 *            This string is converted to be valid xml text
+	 * @return The string escaped to be valid xml
+	 */
+	public String escapeCharacters2(String _in) 
+	{
+		// first, strip all Unicode characters that are not allowed in XML
+		String in = stripNonValidXMLCharacters(_in);
+		
+		StringBuffer ret = new StringBuffer();
+		
+		for (char ch : in.toCharArray() )
+		{			
+			if (ch < ' ' || ch > 127 
+					|| ch == '<' || ch == '>' 
+					|| ch == '&' || ch == '[' 
+					|| ch == '"') 
+			{
+				ret.append(char2escape(ch));
+			} 
+			else {
+				ret.append(ch);
+			}
+		}
+		return ret.toString();
+	}
+	
+
+	private String char2escape(char ch) {
+		return "&#" + (int) ch + ";";
+	}
+
+	public void export(IFramework fw, String fileName) throws IOException {
+		File f = new File(fileName);
+		// f.createNewFile();

+		FileOutputStream stream = new FileOutputStream(f);
+		export(fw, stream);
+	}
+
+	public void export(IFramework fw, OutputStream outputStream)
+			throws IOException {
+		IModelSpace ms = fw.getTopmodel();
+		// FileWriter fw = new FileWriter(fileName);

+		PrintWriter out = new PrintWriter(outputStream);
+		out.println("<?xml version=\"1.0\" ?>");
+		out.println("<VPM>");
+		boolean writeProperties = true;
+		if (writeProperties) {
+			out.println("<PROPERTIES>");
+			VPMProperties props = fw.getProperties();
+			// Export properties alphabetically ordered

+			TreeMap<Object, Object> ts = new TreeMap<Object, Object>(props
+					.getJavaProperties());
+			for (Map.Entry<Object, Object> entry : ts.entrySet()) {
+				String name = entry.getKey().toString();
+				String value = entry.getValue().toString();
+				name = escapeCharacters2(name);
+				value = escapeCharacters2(value);
+				out.println("<PROPERTY name=\"" + name + "\" value=\"" + value
+						+ "\"/>");
+			}
+			out.println("</PROPERTIES>");
+		}
+		out.println("<MODEL>");
+		out.println("<ROOTENTITY id=\""
+				+ ms.getModelManager().getRoot().getID() + "\"/>");
+		//out.println("<NOPARENTENTITY id=\""+ms.getModelManager().getNoParent()
+		// .getID()+"\"/>");

+
+		for (int i = 0; i < 2; ++i) {
+			Iterator<? extends IModelElement> it = null;
+			String type = "";
+			String tagClose = "";
+			if (i == 0) {
+				type = "ENTITY";
+				out.println("<ENTITIES>");
+				it = ms.getModelManager().getEntities().iterator();
+				tagClose = "</ENTITIES>";
+			}
+			if (i == 1) {
+				type = "RELATION";
+				out.println("<RELATIONS>");
+				it = ms.getModelManager().getRelations().iterator();
+				tagClose = "</RELATIONS>";
+			}
+
+			while (it.hasNext()) {
+				IModelElement e = it.next();
+				if (e.equals(ms.getModelManager().getRoot())) {
+					continue;
+				}
+				String isAny = "";
+				if (i == 1) {
+					// Relation

+					IRelation rel = (IRelation) e;
+					isAny = " isAnyFrom=\""
+							+ Boolean.toString(rel.getIsAnyFrom()) + "\""
+							+ " isAnyTo=\""
+							+ Boolean.toString(rel.getIsAnyTo()) + "\"";
+				}
+				out.println("<" + type + " id=\"" + e.getID() + "\"" + isAny
+						+ ">");
+				out.println("<NAME>" + escapeCharacters2(e.getName())
+						+ "</NAME>");
+				if (e.getViewInfo() != null)
+					out
+							.println("<VIEWINFO>"
+									+ escapeCharacters2(e.getViewInfo())
+									+ "</VIEWINFO>");
+
+				// added by Istvan Rath

+				out.println("<ISFINALTYPE>" + e.getIsFinalType()
+						+ "</ISFINALTYPE>");
+
+				if (e.getTypes() != null) {
+					Iterator<IModelElement> j = e.getTypes().iterator();
+					while (j.hasNext()) {
+						IModelElement me = j.next();
+						out.println("<TYPE><MODELELEMENT idref=\"" + me.getID()
+								+ "\"/></TYPE>");
+					}
+				}
+				if (e.getSupertypes() != null) {
+					Iterator<IModelElement> j = e.getSupertypes().iterator();
+					while (j.hasNext()) {
+						IModelElement me = j.next();
+						out.println("<SUPERTYPE><MODELELEMENT idref=\""
+								+ me.getID() + "\"/></SUPERTYPE>");
+					}
+				}
+				if (e instanceof IEntity) {
+					IEntity ent = (IEntity) e;
+					if (ent.getParent() != null) {
+						IModelElement me = ent.getParent();
+						out.println("<PARENT><ENTITY idref=\"" + me.getID()
+								+ "\"/></PARENT>");
+					}
+				}
+				if (e instanceof IEntity) {
+					IEntity ent = (IEntity) e;
+					out.println("<VALUE>" + escapeCharacters2(ent.getValue())
+							+ "</VALUE>");
+				}
+				if (e instanceof IRelation) {
+					IRelation r = (IRelation) e;
+					if (r.getFrom() != null)
+						out.println("<FROM><ENTITY idref=\""
+								+ r.getFrom().getID() + "\"/></FROM>");
+					if (r.getTo() != null)
+						out.println("<TO><ENTITY idref=\"" + r.getTo().getID()
+								+ "\"/></TO>");
+
+					//out.print("<MULTIPLICITY>"+r.getFromMinMultiplicity()+","+
+					// r
+					// .getFromMaxMultiplicity()+","+r.getToMinMultiplicity()+","
+					// +r.getToMaxMultiplicity()+"</MULTIPLICITY>");

+					out.print("<MULTIPLICITY>" + r.getMultiplicity().toString()
+							+ "</MULTIPLICITY>");
+					out.print("<ISAGGREGATION>" + r.getIsAggregation()
+							+ "</ISAGGREGATION>");
+					if (r.getInverse() != null) {
+						out.print("<INVERSE><RELATION idref=\""
+								+ r.getInverse().getID() + "\"/></INVERSE>");
+					}
+
+				}
+				out.println("</" + type + ">");
+			}
+			out.println(tagClose);
+		}
+		out.println("</MODEL>");
+		out.println("</VPM>");
+		out.flush();
+		out.close();
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/exports/VTMLExporterSimple.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/exports/VTMLExporterSimple.java
new file mode 100644
index 0000000..aeebe59
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/exports/VTMLExporterSimple.java
@@ -0,0 +1,219 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.exports;
+
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+
+/**
+ * Export model into VTML file. This module is problematic yet.
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public class VTMLExporterSimple {
+	PrintWriter out;
+
+	IModelElement root;
+
+	List<IRelation> relations = new ArrayList<IRelation>();
+
+	List<Instance> instances = new ArrayList<Instance>();
+
+	List<Instance> suptypes = new ArrayList<Instance>();
+
+	class Instance {
+		IModelElement type;
+
+		IModelElement inst;
+
+		Instance(IModelElement type, IModelElement inst) {
+			this.type = type;
+			this.inst = inst;
+		}
+
+		IModelElement getType() {
+			return type;
+		}
+
+		IModelElement getInst() {
+			return inst;
+		}
+	}
+
+	/**
+	 * Exports one branch of modelSpace in VMCL format.
+	 * 
+	 * @param fileName
+	 *            name of output file
+	 * @param modelSpace
+	 * @param branch
+	 *            branch to be exported. All elements below this entity (and tis
+	 *            entity) will be exported.
+	 */
+	public static void exportToVTML(String fileName, IModelSpace modelSpace,
+			IModelElement branch) {
+		try {
+			FileWriter fw = new FileWriter(fileName);
+			PrintWriter pw = new PrintWriter(fw);
+			exportToVTML(pw, modelSpace, branch);
+			pw.close();
+			fw.close();
+		} catch (IOException e) {
+			// TODO Auto-generated catch block

+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * Exports one branch of modelSpace in VTCL format.
+	 * 
+	 * @param out
+	 *            output stream to write VTCL on
+	 * @param modelSpace
+	 * @param branch
+	 *            branch to be exported. All elements below this entity (and
+	 *            this entity) will be exported.
+	 */
+	public static void exportToVTML(PrintWriter out, IModelSpace modelSpace,
+			IModelElement branch) {
+		VTMLExporterSimple exp = new VTMLExporterSimple();
+		exp.export(out, modelSpace, branch);
+	}
+
+	private void export(PrintWriter out, IModelSpace modelSpace,
+			IModelElement branch) {
+		this.out = out;
+		root = branch;
+		exportElement(branch, "");
+		for (int i = 0; i < relations.size(); ++i) {
+			IRelation rel = relations.get(i);
+			String typeString = "relation";
+			out.println(typeString + "(" + makeVTMLName(rel) + ","
+					+ makeVTMLName(rel.getFrom()) + ","
+					+ makeVTMLName(rel.getTo()) + ");");
+		}
+		for (int i = 0; i < suptypes.size(); ++i) {
+			Instance supT = suptypes.get(i);
+			out.println("supertypeOf(" + makeVTMLName(supT.getType()) + ","
+					+ makeVTMLName(supT.getInst()) + ");");
+		}
+		for (int i = 0; i < instances.size(); ++i) {
+			Instance supT = instances.get(i);
+			out.println("instanceOf(" + makeVTMLName(supT.getInst()) + ","
+					+ makeVTMLName(supT.getType()) + ");");
+		}
+	}
+
+	private void exportElement(IModelElement me, String prefix) {
+		if (isEntity(me)) {
+			IEntity ent = toEntity(me);
+			out.print(prefix + "entity(" + makeVTMLName(me) + ")");
+			out.print("->" + "\"" + ent.getValue() + "\"");
+			// Collection col=ent.getContents();

+			Collection<IModelElement> col = ent.getElementsInNamespace();
+			if (col.size() == 0) {
+				out.println(";");
+			} else {
+				out.println("\n" + prefix + "{");
+				String newPrefix = prefix + "\t";
+				Iterator<IModelElement> it = col.iterator();
+				while (it.hasNext()) {
+					IModelElement child = it.next();
+					exportElement(child, newPrefix);
+				}
+				out.println(prefix + "}");
+			}
+		}
+		if (isRelation(me)) {
+			IRelation rel = toRelation(me);
+			relations.add(rel);
+			Collection<IRelation> subs = rel.getRelationsFrom();
+			for (IRelation srel : subs) {
+				exportElement(srel, prefix);
+			}
+		}
+		Iterator<IModelElement> it = me.getTypes().iterator();
+		while (it.hasNext()) {
+			IModelElement type = it.next();
+			instances.add(new Instance(type, me));
+		}
+		it = me.getInstances().iterator();
+		while (it.hasNext()) {
+			IModelElement inst = it.next();
+			if (isOutsider(inst)) {
+				instances.add(new Instance(me, inst));
+			}
+		}
+		it = me.getSupertypes().iterator();
+		while (it.hasNext()) {
+			IModelElement sup = it.next();
+			suptypes.add(new Instance(sup, me));
+		}
+		it = me.getSubtypes().iterator();
+		while (it.hasNext()) {
+			IModelElement sub = it.next();
+			if (isOutsider(sub)) {
+				suptypes.add(new Instance(me, sub));
+			}
+		}
+
+	}
+
+	private boolean isOutsider(IModelElement me) {
+		if (me.getFullyQualifiedName().equals(root)) {
+			return false;
+		} else if (me.getFullyQualifiedName().startsWith(root + ".")) {
+			return false;
+		} else
+			return true;
+	}
+
+	public String makeVTMLName(IModelElement me) {
+		String fqn = me.getFullyQualifiedName();
+		StringBuffer ret = new StringBuffer();
+		StringTokenizer strtok = new StringTokenizer(fqn, ".");
+		while (strtok.hasMoreTokens()) {
+			String token = strtok.nextToken();
+			ret.append("'" + token + "'" + ".");
+		}
+		ret.setLength(ret.length() - 1);
+		return ret.toString();
+	}
+
+	private boolean isEntity(IModelElement me) {
+		return me instanceof IEntity;
+	}
+
+	private IEntity toEntity(IModelElement me) {
+		return (IEntity) me;
+	}
+
+	private IRelation toRelation(IModelElement me) {
+		return (IRelation) me;
+	}
+
+	private boolean isRelation(IModelElement me) {
+		return me instanceof IRelation;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/ExtensionProvider.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/ExtensionProvider.java
new file mode 100644
index 0000000..315b4e7
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/ExtensionProvider.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework;
+
+import org.eclipse.viatra2.codegen.CodeOutputPluginFactory;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.framework.properties.IViatraPropertyProvider;
+import org.eclipse.viatra2.framework.properties.VPMProperties;
+import org.eclipse.viatra2.imports.NativeImporterFactory;
+import org.eclipse.viatra2.interpreters.ModelInterpreterFactory;
+import org.eclipse.viatra2.loaders.LoaderFactory;
+import org.eclipse.viatra2.logger.Logger;
+import org.eclipse.viatra2.logger.LoggerFactory;
+import org.eclipse.viatra2.natives.ASMNativeFunction;
+
+/**
+ * This is the interface of the extension module loader of the framework.
+ * Different extension module loaders are required for the Eclipse framework and
+ * for the command line environment. In Eclipse, extensions are loaded using the
+ * Eclipse plugin framework. In the command line environment, extensions are
+ * loaded by a command line extension framework.
+ * 
+ * @author Andras Schmidt, Istvan Rath
+ */
+public interface ExtensionProvider {
+	/**
+	 * Get the default logger, which can log initialisation problems too (loaded
+	 * before any other logger)
+	 * 
+	 * @return logger or null
+	 */
+	Logger getDefaultLogger() throws FrameworkException;
+
+	/**
+	 * Returns all available loggers
+	 * 
+	 * @return Returns all available loggers
+	 */
+	LoggerFactory[] getAvailableLoggers() throws FrameworkException;
+
+	/**
+	 * Returns the loggers which should be initially bounded to the
+	 * modelSpace(in addition to the default logger)
+	 * 
+	 * @param p
+	 *            properties for the environment
+	 * @return the loggers which should be initially bounded to the
+	 *         modelSpace(in addition to the default logger)
+	 * @throws FrameworkException
+	 */
+	// LoggerFactory[] getInitLoggers(Properties p) throws FrameworkException;

+	/**
+	 * Returns all available code output plugins
+	 * 
+	 * @param p
+	 * @return all available code output plugins
+	 * @throws FrameworkException
+	 */
+	CodeOutputPluginFactory[] getCodeOutputPlugins() throws FrameworkException;
+
+	/**
+	 * Returns code output plugins, which should initially be bounded to the
+	 * modelSpace
+	 * 
+	 * @param p
+	 *            properties of the environment
+	 * @return code output plugins, which should initially be bounded to the
+	 *         modelSpace
+	 * @throws FrameworkException
+	 */
+	// CodeOutputPluginFactory[] getInitCodeOutputs(Properties p) throws
+	// FrameworkException;

+	/**
+	 * Returns all available importers
+	 * 
+	 * @param p
+	 * @return all available importers
+	 * @throws FrameworkException
+	 */
+	NativeImporterFactory[] getNativeImporters(VPMProperties p)
+			throws FrameworkException;
+
+	/**
+	 * Returns all available loaders
+	 * 
+	 * @param p
+	 * @throws FrameworkException
+	 */
+	LoaderFactory[] getLoaders(VPMProperties p) throws FrameworkException;
+
+	/**
+	 * Gets an empty modelspace
+	 * 
+	 * @param props
+	 * @return
+	 */
+	IModelSpace getEmptyModelspace(VPMProperties props);
+
+	/**
+	 * Get the default properties for a new modelspace
+	 * 
+	 * @return
+	 * @throws FrameworkException
+	 */
+	VPMProperties getDefaultProperties() throws FrameworkException;
+
+	/**
+	 * Set the logger for this class. Initialisation problems will be logged in
+	 * the given logger.
+	 * 
+	 * @param l
+	 */
+	// void setLogger(Logger l);

+	/**
+	 * Returns all available interpreters.
+	 * 
+	 * @return all available interpreters
+	 */
+	ModelInterpreterFactory[] getInterpreters();
+
+	/**
+	 * Return all native functions defined in the environment
+	 * 
+	 * @return all native functions defined in the environment
+	 */
+	ASMNativeFunction[] getNativeFunctions();
+
+	/**
+	 * Returns all property providers defined in the environment
+	 */
+	IViatraPropertyProvider[] getPropertyProviders();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/Framework.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/Framework.java
new file mode 100644
index 0000000..db4fb4f
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/Framework.java
@@ -0,0 +1,1128 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Preferences;
+import org.eclipse.viatra2.ViatraPlugin;
+import org.eclipse.viatra2.codegen.CodeOutputPlugin;
+import org.eclipse.viatra2.codegen.CodeOutputPluginFactory;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.exports.VPMExporter;
+import org.eclipse.viatra2.framework.properties.IViatraPropertyProvider;
+import org.eclipse.viatra2.framework.properties.VIATRAPreferences;
+import org.eclipse.viatra2.framework.properties.VPMProperties;
+import org.eclipse.viatra2.imports.IVPMImporter;
+import org.eclipse.viatra2.imports.NativeImporter;
+import org.eclipse.viatra2.imports.NativeImporterFactory;
+import org.eclipse.viatra2.imports.VPMImporterSax;
+import org.eclipse.viatra2.interpreters.IProgressReport;
+import org.eclipse.viatra2.interpreters.ModelInterpreter;
+import org.eclipse.viatra2.interpreters.ModelInterpreterFactory;
+import org.eclipse.viatra2.loaders.Loader;
+import org.eclipse.viatra2.loaders.Loader2;
+import org.eclipse.viatra2.loaders.LoaderFactory;
+import org.eclipse.viatra2.logger.Logger;
+import org.eclipse.viatra2.logger.LoggerFactory;
+import org.eclipse.viatra2.merger.Merger;
+import org.eclipse.viatra2.merger.VPMMergeException;
+import org.eclipse.viatra2.natives.ASMNativeFunction;
+import org.eclipse.viatra2.natives.INativeFunctionManager;
+import org.eclipse.viatra2.natives.NativeFunctionManager;
+import org.eclipse.viatra2.tags.ITagManager;
+import org.eclipse.viatra2.tags.impl.TagManager;
+
+/**
+ * @author Andras Balogh, Istvan Rath
+ * @version 2.9.7
+ * 
+ *          Class supporting the basic framework services. One framework
+ *          contains one model, importers, exporters, logger, and output streams
+ *          for the model.
+ * 
+ *          Modified on 2006.08.10. by Istvan Rath: - clean up unused code,
+ *          comments, etc - clean up and write proper javadoc
+ * 
+ */
+
+public final class Framework implements IFramework {
+
+	public static final String parserManagerServiceId = "org.eclipse.viatra2.loaders.vtcl_lpgparser.loader.VTCLParserManager";
+
+	MultiCodeFormatter codeout; // = new MultiCodeFormatter();
+
+	// BufferedCodeFormatter codeout;
+
+	String modelmerger = "";
+
+	/**
+	 * Framework identifier.
+	 */
+	String id = "";
+
+	/**
+	 * The current file name with which the framework instance is associated.
+	 */
+	private String currentfilename = "";
+
+	/**
+	 * Reference to the native function manager.
+	 */
+	NativeFunctionManager nativeFunctionManager;
+
+	/**
+	 * Native importer factory registry.
+	 */
+	HashMap<String, NativeImporterFactory> imports = new HashMap<String, NativeImporterFactory>();
+
+	/**
+	 * Loader factory registry.
+	 */
+	HashMap<String, LoaderFactory> loaders = new HashMap<String, LoaderFactory>();
+
+	/**
+	 * Reference to the modelspace.
+	 */
+	IModelSpace topmodel;
+
+	/**
+	 * Framework multilogger.
+	 */
+	MultiLogger logger = new MultiLogger();
+
+	/**
+	 * Machine set listener registry.
+	 */
+	HashSet<IMachineSetChangedListener> machine_set_listeners = new HashSet<IMachineSetChangedListener>();
+
+	/*
+	 * Machine model storage. FQN ==> Machine map.
+	 */
+	private final HashMap<String, Object> machine_models = new HashMap<String, Object>();
+
+	/**
+	 * The map of service providers. Each service provider (e.g.
+	 * VTCLParseController) is registered under a unique servicename.
+	 */
+	private final Map<String, IFrameworkService> service_providers = new HashMap<String, IFrameworkService>();
+
+	/**
+	 * The map of {@link IFrameworkServiceFactory} related to the unique name of
+	 * service provider
+	 */
+	private final Map<String, IFrameworkServiceFactory> service_factories = new HashMap<String, IFrameworkServiceFactory>();
+
+	/**
+	 * The tag manager.
+	 */
+	private TagManager tagManager;
+
+	public ITagManager getTagManager() {
+		return tagManager;
+	}
+
+	public String getCurrentFilename() {
+		return currentfilename;
+	}
+
+	public void setCurrentFileName(String fName) {
+		currentfilename = fName;
+		for (IFrameworkGlobalListener l : globalListeners)
+			l.frameworkNameChanged();
+	}
+
+	public void dispose() {
+		// Added by Daniel Varro
+		unregisterFrameworkService(parserManagerServiceId);
+	}
+
+	public Framework() {
+	}
+
+	/**
+	 * Returns the active code output plugin
+	 * 
+	 * @return the plugin
+	 */
+	public CodeOutputPlugin getCodeOutput() {
+		return codeout;
+	}
+
+	/**
+	 * Returns the current framework logger
+	 * 
+	 * @return the logger
+	 */
+	public Logger getLogger() {
+		return logger;
+	}
+
+	/**
+	 * Creates a new modelspace instance using the class specified in the
+	 * properties file.
+	 * 
+	 * @return the new model space.
+	 * @throws Exception
+	 */
+	IModelSpace getNewModelSpace() throws FrameworkException {
+		IModelSpace ms = exProvider.getEmptyModelspace(props);
+		try {
+			ms.init(this);
+		} catch (Exception e) {
+			logger.fatal("Cannot init modelspace");
+			throw new FrameworkException(
+					"Exception initialising framework: cannot init modelspace class",
+					e);
+		}
+		return ms;
+	}
+
+	private VPMProperties props;
+
+	/**
+	 * Gets the interpreter factory for the given interpretable object.
+	 * 
+	 * @param s
+	 *            the name of the model element.
+	 * @return The model interpreter class for the element, or null if there is
+	 *         no one.
+	 * @throws FrameworkException
+	 */
+	public ModelInterpreterFactory getInterpreterFactory(Object entrypoint)
+			throws FrameworkException {
+		ModelInterpreterFactory[] is = exProvider.getInterpreters();
+		for (ModelInterpreterFactory iF : is) {
+			final String[] types = iF.getInterpretedClasses();
+			if (types != null) {
+				for (int i = 0; i < types.length; ++i) {
+					// System.out.println(entrypoint.getClass().getName());
+					// System.out.println(types[i]);
+					if (entrypoint.getClass().getCanonicalName()
+							.equals(types[i].trim())) {
+						iF.getInterpreter();
+						return iF;
+					}
+				}
+			} else {
+				ModelInterpreter i = iF.getInterpreter();
+				if (i != null)
+					if (i.isRunnable(entrypoint, this))
+						return iF;
+			}
+		}
+		return null;
+	}
+
+	boolean isInit = false;
+
+	ExtensionProvider exProvider;
+
+	/**
+	 * Framework initialisation. Must be called before using the framework
+	 * services.
+	 * 
+	 * @throws FrameworkException
+	 */
+	public void init(String initialModelFileName, String id,
+			ExtensionProvider exProvider) throws FrameworkException {
+		try {
+			init(new FileInputStream(initialModelFileName), id, exProvider,
+					initialModelFileName);
+		} catch (FileNotFoundException e) {
+			throw new FrameworkException("init failed", e);
+		}
+	}
+
+	public void init(InputStream initialModelFile, String id,
+			ExtensionProvider exProvider, String name)
+			throws FrameworkException {
+		if (isInit)
+			return;
+		isInit = true;
+		this.id = id;
+		String initialModelFileName = name;
+		this.currentfilename = initialModelFileName;
+		this.exProvider = exProvider;
+
+		Logger defaultLogger = exProvider.getDefaultLogger();
+		if (defaultLogger != null)
+			logger.addListener(defaultLogger);
+		props = exProvider.getDefaultProperties();
+
+		LoggerFactory[] logs = exProvider.getAvailableLoggers();
+		for (LoggerFactory fact : logs) {
+			Logger l = fact.getLogger();
+			logger.addListener(l);
+		}
+		if (props.isRuntimePropertySet("Logging", "Log level")) {
+			logger.setLevel(Integer.valueOf(
+					props.getRuntimeProperty("Logging", "Log level"))
+					.intValue());
+		} else {
+			// set default loglevel
+			logger.setLevel(Logger.INFO);
+		}
+		logger.debug("Logging session started");
+		
+		// added by Istvan (2008-08-12), extended by Abel to enable trace-based modelspace creation
+		// if needed, override property values from Plugin Preference Store
+		Preferences prefs = ViatraPlugin.getDefault().getPluginPreferences();
+		overrideVPMLProperties(prefs);
+		
+		topmodel = getNewModelSpace();
+		if (initialModelFile != null) {
+			try {
+				getImporter().process(initialModelFile, topmodel, props);
+				// properties are loaded here
+			} catch (Exception e) {
+				logger.message(Logger.ERROR,
+						"Modelspace initialization failed.", e);
+				throw new FrameworkException(
+						"Exception initialising framework", e);
+			}
+		}
+
+		overrideVPMLProperties(prefs);
+
+		// re-init loggers with properties
+		if (props.isRuntimePropertySet("Logging", "Log level")) {
+			logger.setLevel(Integer.valueOf(
+					props.getRuntimeProperty("Logging", "Log level"))
+					.intValue());
+		}
+
+		tagManager = new TagManager();
+		tagManager.init(this);
+
+		codeout = new MultiCodeFormatter();
+		codeout.init(this);
+
+		CodeOutputPluginFactory[] allCodeOuts = exProvider
+				.getCodeOutputPlugins();
+		for (CodeOutputPluginFactory fact : allCodeOuts) {
+			CodeOutputPlugin pl = fact.createCodeoutPlugin(this);
+			if (pl != null) {
+				pl.init(this);
+				codeout.addListener(pl);
+			}
+		}
+
+		// Initialising importers
+		NativeImporterFactory[] natives = exProvider.getNativeImporters(props);
+		for (NativeImporterFactory factory : natives) {
+			addNativeImporterFactory(factory);
+		}
+		// Initialising loaders
+		LoaderFactory[] programloaders = exProvider.getLoaders(props);
+		for (LoaderFactory factory : programloaders) {
+			addLoaderFactory(factory);
+		}
+		// Initialising native functions
+		ASMNativeFunction[] natFuns = exProvider.getNativeFunctions();
+		nativeFunctionManager = new NativeFunctionManager();
+		nativeFunctionManager.addAllFunction(natFuns);
+
+		// Added by Daniel Varro (2009-08-02)
+		initializeServiceFactory(parserManagerServiceId);
+		registerFrameworkService(parserManagerServiceId);
+		service_providers.get(parserManagerServiceId).init(this);
+	}
+
+	/**
+	 * @param prefs
+	 */
+	private void overrideVPMLProperties(Preferences prefs) {
+		if (prefs.contains(VIATRAPreferences.DISABLE_VPML_OVERRIDE)) {
+			if (prefs.getBoolean(VIATRAPreferences.DISABLE_VPML_OVERRIDE)) {
+				// override loaded values
+				for (IViatraPropertyProvider prov : ViatraPlugin.getDefault()
+						.getPropertyProviders()) {
+					for (String prop_id : prov.getAllPropertyIds()) {
+						props.setRuntimeProperty(
+								prov.getProviderID(),
+								prop_id,
+								prefs.getString(prov.getProviderID() + "::"
+										+ prop_id));
+					}
+				}
+			}
+		}
+	}
+
+	/**
+	 * Returns the top modelspace of this framework.
+	 * 
+	 * @return the modelspace.
+	 */
+	public IModelSpace getTopmodel() {
+		return topmodel;
+	}
+
+	/**
+	 * Add a native importer factory to the registry.
+	 * 
+	 * @param fact
+	 *            the native importer factory to be added
+	 */
+	private void addNativeImporterFactory(NativeImporterFactory fact) {
+		int f = 1;
+		NativeImporterFactory s = fact;
+		String preferredImporterId = s.getId();
+		if (preferredImporterId == null)
+			preferredImporterId = "noname";
+		String importerId = preferredImporterId;
+		while (imports.get(importerId) != null) {
+			importerId = preferredImporterId + f;
+			f++;
+		}
+		imports.put(importerId, s);
+		logger.info("Added new importer plugin '" + importerId + "' ("
+				+ s.getImporterName() + ")");
+	}
+
+	/**
+	 * Add a loader factory to the registry.
+	 */
+	private void addLoaderFactory(LoaderFactory fact) {
+		int f = 1;
+		LoaderFactory s = fact;
+		String preferredImporterId = s.getId();
+		if (preferredImporterId == null)
+			preferredImporterId = "noname";
+		String importerId = preferredImporterId;
+		while (loaders.get(importerId) != null) {
+			importerId = preferredImporterId + f;
+			f++;
+		}
+		loaders.put(importerId, s);
+		logger.info("Added new loader plugin '" + importerId + "' ("
+				+ s.getLoaderName() + ")");
+	}
+
+	/**
+	 * Returns all native importer classes recognized by the framework.
+	 * 
+	 * @return hashmap of the classes key = importer id, entity=importer class
+	 */
+	public Map<String, NativeImporterFactory> getNativeImporters() {
+		return imports;
+	}
+
+	public Map<String, LoaderFactory> getLoaders() {
+		return loaders;
+	}
+
+	public void addMachine(String fqn, Object machine)
+			throws FrameworkException {
+		if (this.machine_models.get(fqn) != null) {
+			removeMachine(fqn);
+		}
+		this.machine_models.put(fqn, machine);
+		for (IMachineSetChangedListener l : this.machine_set_listeners) {
+			l.machineAdded(machine);
+		}
+	}
+
+	public void removeMachine(String fqn) throws FrameworkException {
+		Object machine = this.machine_models.get(fqn);
+		this.machine_models.remove(fqn);
+		for (IMachineSetChangedListener l : this.machine_set_listeners) {
+			l.machineRemoved(machine);
+		}
+	}
+
+	public Object loadMachine(String fileName, String loaderName)
+			throws FrameworkException {
+		/*
+		 * try { loadMachine(new FileInputStream(fileName), loaderName); } catch
+		 * (FileNotFoundException e) { throw new
+		 * FrameworkException("File not found"); }
+		 */
+		LoaderFactory lf = loaders.get(loaderName);
+		if (lf == null)
+			throw new FrameworkException("Loader for type " + loaderName
+					+ " is not defined.");
+		Loader l;
+		try {
+			l = lf.getLoaderInstance();
+		} catch (Exception e) {
+			logger.message(Logger.ERROR, "Error loading loader: " + loaderName,
+					e);
+			throw new FrameworkException("Error loading loader: " + loaderName,
+					e);
+		}
+		if (l == null) {
+			throw new FrameworkException("Loader for type " + loaderName
+					+ " is not defined.");
+		}
+		// Object program_model = null;
+		try {
+			// program_model =
+			return l.processFile(fileName, this);
+		} catch (VPMRuntimeException e) {
+			throw new FrameworkException("Loader ended with error", e);
+		}
+		// store program model
+		// REMOVED: it is the loaders responsibility to do this.
+		/*
+		 * if (program_model!=null) { this.machine_models.add(program_model);
+		 * for (IMachineSetChangedListener lis : machine_set_listeners) {
+		 * lis.machineAdded(program_model); } } else throw new
+		 * FrameworkException("Loader returned invalid model");
+		 */
+	}
+
+	public Object loadMachineURI(String _URI, String loaderName)
+			throws FrameworkException {
+		LoaderFactory lf = loaders.get(loaderName);
+		if (lf == null)
+			throw new FrameworkException("Loader for type " + loaderName
+					+ " is not defined.");
+		Loader2 l;
+		try {
+			l = (Loader2)lf.getLoaderInstance();
+		} catch (Exception e) {
+			logger.message(Logger.ERROR, "Error loading loader, probably does not support Loader2 interface: " + loaderName, e);
+			throw new FrameworkException("Error loading loader, probably does not support Loader2 interface: " + loaderName, e);
+		}
+		if (l == null) {
+			throw new FrameworkException("Loader for type " + loaderName
+					+ " is not defined.");
+		}
+		// Object program_model = null;
+		try {
+			// program_model =
+			return l.processURI(_URI, this);
+		} catch (VPMRuntimeException e) {
+			throw new FrameworkException("Loader ended with error", e);
+		}
+	}
+
+	public Object loadMachine(InputStream stream, String loaderName)
+			throws FrameworkException {
+		LoaderFactory lf = loaders.get(loaderName);
+		if (lf == null)
+			throw new FrameworkException("Loader for type " + loaderName
+					+ " is not defined.");
+		Loader l;
+		try {
+			l = lf.getLoaderInstance();
+		} catch (Exception e) {
+			logger.message(Logger.ERROR, "Error loading loader: " + loaderName,
+					e);
+			throw new FrameworkException("Error loading loader: " + loaderName,
+					e);
+		}
+		if (l == null) {
+			throw new FrameworkException("Loader for type " + loaderName
+					+ " is not defined.");
+		}
+		try {
+			// program_model =
+			return l.process(stream, this);
+		} catch (VPMRuntimeException e) {
+			throw new FrameworkException("Loader ended with error", e);
+		}
+		// store program model
+		// REMOVED -- it is the Loaders responsibility to do this.
+		/*
+		 * if (program_model!=null) { this.machine_models.add(program_model);
+		 * for (IMachineSetChangedListener lis : machine_set_listeners) {
+		 * lis.machineAdded(program_model); } } else throw new
+		 * FrameworkException("Loader returned invalid model");
+		 */
+	}
+
+	/**
+	 * Imports the given file to the current modelspace, using one of the
+	 * configured native model interpreters.
+	 * 
+	 * @param fileName
+	 *            input filename
+	 * @param importerName
+	 *            import class id
+	 * @throws FrameworkException
+	 */
+	public void nativeImport(String fileName, String importerName)
+			throws FrameworkException {
+		NativeImporterFactory claf = imports.get(importerName);
+		if (claf == null) {
+			throw new FrameworkException("Native importer for type "
+					+ importerName + " is not defined.");
+		}
+		NativeImporter cla;
+		try {
+			cla = claf.getImporterInstance();
+		} catch (Exception e) {
+			logger.message(Logger.ERROR, "Error loading importer: "
+					+ importerName, e);
+			throw new FrameworkException("Error loading importer: "
+					+ importerName, e);
+		}
+		if (cla == null) {
+			throw new FrameworkException("Native importer for type "
+					+ importerName + " is not defined.");
+		}
+		try {
+			topmodel.getTransactionManager().beginTransaction(Boolean.TRUE);
+			cla.processFile(fileName, this);
+		} catch (VPMRuntimeException ex) {
+			throw new FrameworkException("Native import ended with error", ex);
+		} catch (Exception ex2) {
+			throw new FrameworkException("Native import ended with error", ex2);
+		} finally {
+			topmodel.getTransactionManager().commitTransaction();
+		}
+	}
+
+	/**
+	 * Imports the given file to the current modelspace, using one of the
+	 * configured native model interpreters.
+	 * 
+	 * @param stream
+	 *            input InputStream
+	 * @param importerName
+	 *            import class id
+	 * @throws Exception
+	 */
+	public void nativeImport(InputStream stream, String importerName)
+			throws FrameworkException {
+		NativeImporterFactory claf = imports.get(importerName);
+		if (claf == null) {
+			throw new FrameworkException("Native importer for type "
+					+ importerName + " is not defined.");
+		}
+		NativeImporter cla;
+		try {
+			cla = claf.getImporterInstance();
+		} catch (Exception e) {
+			logger.message(Logger.ERROR, "Error loading importer: "
+					+ importerName, e);
+			throw new FrameworkException("Error loading importer: "
+					+ importerName, e);
+		}
+		if (cla == null) {
+			throw new FrameworkException("Native importer for type "
+					+ importerName + " is not defined.");
+		}
+		try {
+			topmodel.getTransactionManager().beginTransaction(Boolean.TRUE);
+			cla.process(stream, this);
+		} catch (VPMRuntimeException ex) {
+			throw new FrameworkException("Native import ended with error", ex);
+		} catch (Exception ex2) {
+			throw new FrameworkException("Native import ended with error", ex2);
+		} finally {
+			topmodel.getTransactionManager().commitTransaction();
+		}
+	}
+
+	// public void nativeImport(IResource resource, String importerName) throws
+	// FrameworkException {
+	// TODO implement resource native import better
+	// nativeImport(resource.getFullPath().toOSString(),importerName);
+	// }
+
+	/**
+	 * Return's the frameworks' identifier.
+	 */
+	public String getId() {
+		return id;
+	}
+
+	/**
+	 * Gets a VPML importer.
+	 */
+	private IVPMImporter getImporter() {
+		return new VPMImporterSax();
+	}
+
+	/**
+	 * Gets a native importer's full name based on its string id.
+	 * 
+	 * @param tt
+	 *            native importer string id
+	 * @return full name
+	 */
+	public String getImporterName(String tt) {
+		NativeImporterFactory cla = imports.get(tt);
+		if (cla == null) {
+			logger.error("Native importer for type " + tt + " is not defined.");
+			return null;
+		}
+		try {
+			return cla.getImporterName();
+
+		} catch (Exception ex2) {
+			logger.error("Unable to load native importer class: "
+					+ ex2.getMessage());
+			return null;
+		}
+
+	}
+
+	/**
+	 * Gets a loader's full name based on its string id.
+	 * 
+	 * @param tt
+	 *            native importer string id
+	 * @return full name
+	 */
+	public String getLoaderName(String tt) {
+		LoaderFactory cla = loaders.get(tt);
+		if (cla == null) {
+			logger.error("Loader for type " + tt + " is not defined.");
+			return null;
+		}
+		try {
+			return cla.getLoaderName();
+
+		} catch (Exception ex2) {
+			logger.error("Unable to load loader class: " + ex2.getMessage());
+			return null;
+		}
+
+	}
+
+	/**
+	 * Saves the modelspace to a file.
+	 * 
+	 * @param s
+	 *            the destination filename.
+	 * @throws IOException
+	 */
+	public void saveFile(String s) throws FrameworkException, IOException {
+		(new VPMExporter()).export(this, s);
+		this.currentfilename = s;
+	}
+
+	public Collection<Object> getMachines() {
+		return machine_models.values();
+	}
+
+	public Object getMachineByFQN(String fqn) {
+		return machine_models.get(fqn);
+	}
+
+	public boolean isRunnable(Object machine) throws FrameworkException {
+		return getInterpreterFactory(machine) != null;
+	}
+
+	public void runEntrypoint(Object entrypoint, Map<String, Object> params,
+			IProgressReport pr) throws VPMRuntimeException {
+		if (params == null)
+			params = new TreeMap<String, Object>();
+		ModelInterpreter interpreter = null;
+		try {
+			interpreter = getInterpreterFactory(entrypoint).getInterpreter();
+		} catch (Exception e) {
+			logger.message(Logger.FATAL,
+					"couldn't load Model Interpreter class. ", e);
+			throw new VPMRuntimeException("could not run entrypoint");
+		}
+		try {
+			if (interpreter != null) {
+				interpreter.run(this, entrypoint, params, pr);
+				logger.info("Entity successfully interpreted.");
+			}
+		} catch (java.lang.RuntimeException e) {
+			String exMessage = e.getMessage();
+			String message = "Error happened while running interpreter, please report to VIATRA2 developers"
+					+ (exMessage == null ? ". " : (": " + exMessage + " "));
+			logger.message(Logger.ERROR, message, e);
+			throw new VPMRuntimeException(message, e);
+		}
+	}
+
+	public String[] getEntrypointParameters(Object machine)
+			throws FrameworkException {
+		ModelInterpreter interpreter = null;
+		try {
+			interpreter = getInterpreterFactory(machine).getInterpreter();
+		} catch (Exception e) {
+			logger.message(Logger.FATAL,
+					"couldn't load Model Interpreter class. ", e);
+			throw new FrameworkException("could not load model interpreter");
+		}
+		try {
+			if (interpreter != null) {
+				return interpreter.getParameters(this, machine);
+			}
+		} catch (VPMRuntimeException e) {
+			logger.error(e.getMessage()); // wrpa error meassage
+			throw new FrameworkException(e.getMessage(), e);
+		} catch (Exception e) {
+			try {
+				FileOutputStream fo = new FileOutputStream("log.out");
+				PrintWriter pw = new PrintWriter(fo);
+				e.printStackTrace(pw);
+				pw.flush();
+				fo.close();
+			} catch (Exception eee) {
+			}
+			logger.error(e.getMessage()
+					+ " error log created in file log.out. Please report");
+			throw new FrameworkException(
+					"could not run initialize model interpreter");
+		}
+		return new String[0];
+	}
+
+	/**
+	 * Merge the model in topModel with the given modelspace. The modelspace to
+	 * merge with is given with its filename. The file should be a vpml file.
+	 * 
+	 * @param fileName
+	 * @throws FrameworkException
+	 *             if opening file fails
+	 * @throws VPMMergeException
+	 *             if merge fails
+	 */
+	public void merge(String fileName) throws VPMMergeException,
+			FrameworkException {
+		IModelSpace toMerge;
+		toMerge = getNewModelSpace();
+		try {
+			getImporter().process(fileName, toMerge, new VPMProperties());
+		} catch (VPMRuntimeException e) {
+			throw new FrameworkException("Opening file failed", e);
+		}
+		merge(toMerge);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.viatra2.framework.IFramework#mergeStream(java.io.InputStream)
+	 */
+	public void mergeStream(InputStream stream) throws FrameworkException,
+			IOException {
+		IModelSpace toMerge;
+		toMerge = getNewModelSpace();
+		try {
+			// getImporter().process(fileName,toMerge, new Properties());
+			// FIXME what happens to properties on merge???
+			getImporter().process(stream, toMerge, new VPMProperties());
+		} catch (VPMRuntimeException e) {
+			throw new FrameworkException("Opening file failed", e);
+		}
+		try {
+			merge(toMerge);
+		} catch (VPMMergeException mex) {
+			throw new FrameworkException("error merging", mex);
+		}
+	}
+
+	/**
+	 * Merge the model in topModel with the given modelspace. The given
+	 * modelspace will not change.
+	 * 
+	 * @param modelSpace
+	 * @throws VPMMergeException
+	 */
+	public void merge(IModelSpace modelSpace) throws VPMMergeException {
+		Merger mg = new Merger();
+		getTopmodel().getTransactionManager().beginTransaction(Boolean.TRUE);
+		mg.merge(modelSpace, getTopmodel());
+		getTopmodel().getTransactionManager().commitTransaction();
+	}
+
+	public void addLoggerListener(Logger l) {
+		logger.addListener(l);
+	}
+
+	public Collection<Logger> getAllLoggerListeners() {
+		return logger.getListeners();
+	}
+
+	public void removeLoggerListener(Logger l) {
+		logger.removeListener(l);
+
+	}
+
+	public void addCodeOutListener(CodeOutputPlugin l) {
+		codeout.addListener(l);
+	}
+
+	public Collection<CodeOutputPlugin> getAllCodeOutListeners() {
+		return codeout.getListeners();
+	}
+
+	public void removeCodeOutListener(CodeOutputPlugin l) {
+		codeout.removeListener(l);
+	}
+
+	/**
+	 * Collect all output plugins from the extension provider.
+	 */
+	public Collection<CodeOutputPluginFactory> getAvailableCodeOutPlugins() {
+		ArrayList<CodeOutputPluginFactory> ret = new ArrayList<CodeOutputPluginFactory>();
+		try {
+			for (CodeOutputPluginFactory factory : exProvider
+					.getCodeOutputPlugins()) {
+				ret.add(factory);
+			}
+		} catch (FrameworkException e) {
+			logger.fatal("Fatal error querying code output plugins");
+		}
+		return ret;
+	}
+
+	/**
+	 * Collect all loggers from the extension provider.
+	 */
+	public Collection<LoggerFactory> getAvailableLoggers() {
+		ArrayList<LoggerFactory> ret = new ArrayList<LoggerFactory>();
+		try {
+			for (LoggerFactory factory : exProvider.getAvailableLoggers()) {
+				ret.add(factory);
+			}
+		} catch (FrameworkException e) {
+			logger.fatal("Fatal error querying code available loggers");
+			// well well well :) something of an oxymoron here
+		}
+		return ret;
+	}
+
+	/**
+	 * Collect all interpreters from the extension provider.
+	 */
+	public Collection<ModelInterpreterFactory> getAvailableInterpreters() {
+		ArrayList<ModelInterpreterFactory> ret = new ArrayList<ModelInterpreterFactory>();
+		for (ModelInterpreterFactory factory : exProvider.getInterpreters()) {
+			ret.add(factory);
+		}
+		return ret;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.framework.IFramework#getNativeFunctionManager()
+	 */
+	public INativeFunctionManager getNativeFunctionManager() {
+		return nativeFunctionManager;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.framework.IFramework#mergeFile(java.lang.String)
+	 */
+	public void mergeFile(String fileName) throws FrameworkException,
+			IOException {
+		try {
+			merge(fileName);
+		} catch (VPMMergeException mex) {
+			throw new FrameworkException("error merging", mex);
+		}
+	}
+
+	/**
+	 * Saves the modelspace to the file designated by the currentFileName
+	 * parameter.
+	 */
+	public void saveFile(OutputStream os, String currentFileName)
+			throws FrameworkException, IOException {
+		(new VPMExporter()).export(this, os);
+		this.currentfilename = currentFileName;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.framework.IFramework#getProperties()
+	 */
+	public VPMProperties getProperties() {
+		return props;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.viatra2.framework.IFramework#getNativeImportersForExtension
+	 * (java.lang.String)
+	 */
+	public Set<String> getNativeImportersForExtension(String ext) {// throws
+																	// FrameworkException
+																	// {
+		HashSet<String> ret = new HashSet<String>();
+		for (NativeImporterFactory f : imports.values()) {
+			String[] exts = f.getFileExtensionList();
+			for (int i = 0; i < exts.length; i++) {
+				if (exts[i].equalsIgnoreCase(ext)) {
+					ret.add(f.getId());
+				}
+			}
+		}
+		// if (ret.isEmpty())
+		// throw new FrameworkException("No importer found for extension "+ext);
+		return ret;
+	}
+
+	public Set<String> getLoadersForExtension(String ext) // throws
+															// FrameworkException
+															// {
+	{
+		HashSet<String> ret = new HashSet<String>();
+		for (LoaderFactory f : loaders.values()) {
+			String[] exts = f.getFileExtensionList();
+			for (int i = 0; i < exts.length; i++) {
+				if (exts[i].equalsIgnoreCase(ext)) {
+					ret.add(f.getId());
+				}
+			}
+		}
+		// if (ret.isEmpty())
+		// throw new FrameworkException("No loader found for extension "+ext);
+		return ret;
+	}
+
+	public void addMachineSetListener(IMachineSetChangedListener l) {
+		if (!machine_set_listeners.contains(l))
+			machine_set_listeners.add(l);
+
+	}
+
+	public void removeMachineSetListener(IMachineSetChangedListener l) {
+		machine_set_listeners.remove(l);
+	}
+
+	HashSet<IFrameworkGlobalListener> globalListeners = new HashSet<IFrameworkGlobalListener>();
+
+	public void addFrameworkGlobalListener(IFrameworkGlobalListener l) {
+		globalListeners.add(l);
+
+	}
+
+	public Collection<IFrameworkGlobalListener> getAllGlobalListeners() {
+		return globalListeners;
+	}
+
+	public void removeFrameworkGlobalListener(IFrameworkGlobalListener l) {
+		globalListeners.remove(l);
+
+	}
+
+	/**
+	 * Adapter implementation function. Supports the following types: -
+	 * ITagManager - IModelSpace
+	 */
+	public Object getAdapter(Class adapter) {
+		if (adapter.equals(ITagManager.class)) {
+			return getTagManager();
+		} else if (adapter.equals(IModelSpace.class)) {
+			return getTopmodel();
+		}
+		// etc...
+		return null;
+	}
+
+	public IFrameworkService getVTCLParserManager() {
+		return service_providers.get(parserManagerServiceId);
+	}
+
+	/**
+	 * Registers a framework service with (unique) name "serviceName" Services
+	 * are stored in a map where the "serviceName" identifies the service
+	 * provider class as defined in the extenders of the "frameworkservice"
+	 * extension point.
+	 * 
+	 * @param serviceName
+	 *            : unique name of the service (defined by extenders of the
+	 *            frameworkservice extension point)
+	 * @throws FrameworkException
+	 */
+	public void registerFrameworkService(String serviceName)
+			throws FrameworkException {
+		// Seek for corresponding factory
+		IFrameworkServiceFactory factory = service_factories.get(serviceName);
+		if (factory != null) { // factory found
+			IFrameworkService service = factory.create();
+			// TODO: Maybe, the service should be initialized here
+			service_providers.put(serviceName, service);
+		} else { // throw exception if factory is unavailable
+			throw new FrameworkException(
+					"Factory class cannot be found for service" + serviceName);
+		}
+
+	}
+
+	/**
+	 * Unregisters a service with a unique "serviceName" from the map of service
+	 * providers
+	 * 
+	 * @param serviceName
+	 *            : unique name of the service to be unregistered
+	 */
+	public void unregisterFrameworkService(String serviceName) {
+		IFrameworkService service = service_providers.get(serviceName);
+		if (service != null) {
+			service_providers.remove(serviceName);
+		}
+
+	}
+
+	/**
+	 * The service factory is initialized (created) for the service with the
+	 * given service name
+	 * 
+	 * @param serviceName
+	 *            : the unique name of the framework service
+	 * @throws FrameworkException
+	 */
+	protected void initializeServiceFactory(String serviceName)
+			throws FrameworkException {
+		if (service_factories.get(serviceName) == null) {
+			IConfigurationElement[] configs = Platform.getExtensionRegistry()
+					.getConfigurationElementsFor(
+							"org.eclipse.viatra2.core2.frameworkservice");
+			boolean found = false;
+			for (int i = 0; !found && i < configs.length; i++) {
+				IConfigurationElement config = configs[i];
+				String currentServiceName = config.getAttribute("servicename");
+				if (serviceName.equals(currentServiceName)) {
+					found = true;
+					try {
+						IFrameworkServiceFactory factory = (IFrameworkServiceFactory) config
+								.createExecutableExtension("factoryclass");
+						service_factories.put(serviceName, factory);
+					} catch (CoreException e) {
+						throw new FrameworkException(
+								"Framework service factory cannot be found", e);
+					}
+				}
+			}
+		}
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/FrameworkException.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/FrameworkException.java
new file mode 100644
index 0000000..aa7e909
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/FrameworkException.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public class FrameworkException extends Exception {
+	/**

+	 * 

+	 */
+	private static final long serialVersionUID = 1L;
+
+	public FrameworkException(String msg) {
+		super(msg);
+	}
+
+	public FrameworkException(String msg, Throwable cause) {
+		super(msg, cause);
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/FrameworkManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/FrameworkManager.java
new file mode 100644
index 0000000..9b1c32b
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/FrameworkManager.java
@@ -0,0 +1,304 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.osgi.framework.Bundle;
+
+/**
+ * This class manages all instances of VPM Frameworks.
+ * 
+ * @authorh Andras Schmidt
+ */
+public class FrameworkManager {
+	Map<String, Framework> frameworks = new TreeMap<String, Framework>();
+
+	ArrayList<IFrameworkListChangedListener> listeners = new ArrayList<IFrameworkListChangedListener>();
+
+	static FrameworkManager inst = null;
+
+	/**
+	 * Get the frameworkmanager instance. Before using first the
+	 * extensionprovider must be set. (<code>setExtensionProvider</code>)
+	 * 
+	 * @return the frameworkmanager instance
+	 */
+	public static FrameworkManager getInstance() {
+		if (inst == null) {
+			inst = new FrameworkManager();
+		}
+		return inst;
+	}
+
+	private FrameworkManager() {
+
+	}
+
+	/**
+	 * Get the framework with the given id.
+	 * 
+	 * @param id
+	 * @return the framework with the given id or null if no framework with
+	 *         given id is in memory.
+	 */
+	public Framework getFramework(String id) {
+		return frameworks.get(id);
+	}
+
+	private ExtensionProvider defExprovider;
+
+	/**
+	 * Set the extension provider for this framework manager instance.
+	 * 
+	 * @param exProvider
+	 *            extension provider which searches all extensions for the VPM
+	 *            modeling system
+	 */
+	public void setExtensionProvider(ExtensionProvider exProvider) {
+		defExprovider = exProvider;
+	}
+
+	/**
+	 * Create a framework with loading the given file into the model.
+	 * 
+	 * @param fileName
+	 *            file to be loaded
+	 * @return the created framework
+	 * @throws Exception
+	 */
+	public IFramework createFramework(String fileName)
+			throws FrameworkManagerException {
+		return createFramework(fileName, getExtensionProvider());
+	}
+
+	/**
+	 * Create a framework with loading the given file into the model.
+	 * 
+	 * @param file
+	 *            file to be loaded
+	 * @param name
+	 *            name of the framework to be created
+	 * @return the created framework
+	 * @throws Exception
+	 */
+	public IFramework createFramework(InputStream file, String name)
+			throws FrameworkManagerException {
+		return createFramework(file, getExtensionProvider(), name);
+	}
+
+	private ExtensionProvider getExtensionProvider() {
+		/*
+		 * ExtensionProvider exProvider; if(ViatraPlugin.getDefault()!=null) {
+		 * exProvider=new EclipseExtensionProvider(); } else {
+		 * exProvider=defExprovider; }
+		 */
+		return defExprovider;
+	}
+
+	public IFramework createFramework(String fileName,
+			ExtensionProvider exProvider) throws FrameworkManagerException {
+		/*
+		 * if(exProvider==null) throw new
+		 * Exception("Extension provider required."); String id=genId();
+		 * Framework newFramework=new Framework();
+		 * newFramework.init(fileName,id,exProvider); //
+		 * newFramework.addImporterPlugins(nat_imp); // adding the importer
+		 * factory information to the framework instance.
+		 * 
+		 * frameworks.put(id,newFramework);
+		 * notifyFrameworkListChangedListeners(); return newFramework;
+		 */
+		try {
+			return createFramework(new FileInputStream(fileName), exProvider,
+					fileName);
+		} catch (FileNotFoundException e) {
+			throw new FrameworkManagerException("file not found", e);
+		}
+	}
+
+	public IFramework createFramework(InputStream fileStream,
+			ExtensionProvider exProvider, String name)
+			throws FrameworkManagerException {
+		if (exProvider == null)
+			throw new FrameworkManagerException("Extension provider required.");
+		String id = genId();
+		Framework newFramework = new Framework();
+		try {
+			newFramework.init(fileStream, id, exProvider, name);
+		} catch (FrameworkException e) {
+			throw new FrameworkManagerException("framework init", e);
+		}
+		// newFramework.addImporterPlugins(nat_imp); // adding the importer
+		// factory information to the framework instance.

+
+		frameworks.put(id, newFramework);
+
+		for (IFrameworkListChangedListener l : new ArrayList<IFrameworkListChangedListener>(
+				listeners)) {
+			l.frameworkAdded(newFramework);
+		}
+
+		// notifyFrameworkListChangedListeners();

+		return newFramework;
+
+	}
+
+	public IFramework createFramework() throws FrameworkException// throws
+																	// Exception

+	{
+		ExtensionProvider exProvider = getExtensionProvider();
+		String id = genId();
+		Framework newFramework = new Framework();
+		newFramework.init(null, id, exProvider, "null");
+		// newFramework.addImporterPlugins(nat_imp); // adding the importer
+		// factory information to the framework instance.

+
+		frameworks.put(id, newFramework);
+		// notifyFrameworkListChangedListeners();

+
+		for (IFrameworkListChangedListener l : new ArrayList<IFrameworkListChangedListener>(
+				listeners)) {
+			l.frameworkAdded(newFramework);
+		}
+
+		return newFramework;
+
+	}
+
+	/**
+	 * Store the available native importers that are discovered by the Plugin.
+	 * 
+	 * @param v
+	 *            The vector of importer factories.
+	 */
+	// Vector nat_imp = null;

+	/*
+	 * public void addImporterPlugins(Vector v) { nat_imp = v; }
+	 */
+	/**
+	 * Dispose the framework with the given id.
+	 * 
+	 * @param id
+	 */
+	public void disposeFramework(String id) throws FrameworkManagerException {
+		if (frameworks.containsKey(id)) {
+			Framework fw = frameworks.get(id);
+			fw.dispose();
+			frameworks.remove(id);
+			for (IFrameworkListChangedListener l : new ArrayList<IFrameworkListChangedListener>(
+					listeners)) {
+				l.frameworkRemoved(fw);
+			}
+
+			// notifyFrameworkListChangedListeners();

+		}
+		// else

+		// throw new FrameworkManagerException("Couldn't dispose framework!");

+	}
+
+	/**
+	 * Get the ids of all frameworks in memory.
+	 * 
+	 * @return ids of frameworks in memory
+	 */
+	public String[] getAllFrameWorks() {
+		return frameworks.keySet().toArray(new String[0]);
+	}
+
+	int counter = 0;
+
+	/**
+	 * Generate a new id for a new framework.
+	 * 
+	 * @return new id
+	 */
+	private String genId() {
+		return "modelSpace" + counter++;
+	}
+
+	public void addFrameworkListChangedListener(IFrameworkListChangedListener l) {
+		if (!listeners.contains(l))
+			listeners.add(l);
+	}
+
+	public void removeFrameworkListChangedListener(
+			IFrameworkListChangedListener l) {
+		if (listeners.contains(l))
+			listeners.remove(l);
+	}
+
+
+	public static File convertURLtoFile(URL url) throws IllegalArgumentException {
+		URI uri;
+		try 
+		{ 
+			uri = url.toURI(); 
+		} 
+		catch (URISyntaxException e) {
+			try 
+			{
+				uri = new URI(url.getProtocol(), url.getUserInfo(), url.getHost(), url.getPort(), url.getPath(), url.getQuery(), url.getRef());
+			} catch (URISyntaxException e1) {

+				throw new IllegalArgumentException("The URL cannot be converted: " + url);
+			}
+		}
+		return new File(uri);
+	}
+
+	public static File getFileFromBundle(String bundleId, String path) {
+		// ugly hack: switch /->\ on windoze

+		if ("\\".equals(System.getProperty("file.separator"))) {
+			// switch / to \ on windoze

+			path = path.replace('/', '\\');
+		} else if ("/".equals(System.getProperty("file.separator"))) {
+			path = path.replace('\\', '/');
+		}
+
+		File f = null;
+		// if the bundle is not ready then there is no file, however we may
+		// assume its perfectly ready

+		Bundle bundle = Platform.getBundle(bundleId);
+		if (bundle == null)// || !BundleUtility.isReady(bundle))
+			return null;
+
+		// look for the image (this will check both the plugin and fragment
+		// folders

+		java.net.URL fullPathString = null;
+		try {
+			// fullPathString = BundleUtility.find(bundle, path);

+			fullPathString = FileLocator.toFileURL(FileLocator.find(bundle,
+					new Path(path), null));
+			f = convertURLtoFile(fullPathString);
+		} catch (IllegalArgumentException e) {
+			f = new File(fullPathString.getPath());
+		} // impossible

+		catch (IOException e) {
+			e.printStackTrace();
+		}
+		return f;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/FrameworkManagerException.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/FrameworkManagerException.java
new file mode 100644
index 0000000..919784c
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/FrameworkManagerException.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework;
+
+/**
+ * @author Istvan Rath
+ * 
+ */
+public class FrameworkManagerException extends Exception {
+	/**

+	 * 

+	 */
+	private static final long serialVersionUID = 1L;
+
+	public FrameworkManagerException(String msg) {
+		super(msg);
+	}
+
+	public FrameworkManagerException(String msg, Throwable cause) {
+		super(msg, cause);
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/IFramework.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/IFramework.java
new file mode 100644
index 0000000..0c493b3
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/IFramework.java
@@ -0,0 +1,366 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2009 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.viatra2.codegen.CodeOutputPlugin;
+import org.eclipse.viatra2.codegen.CodeOutputPluginFactory;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.properties.VPMProperties;
+import org.eclipse.viatra2.imports.NativeImporterFactory;
+import org.eclipse.viatra2.interpreters.IProgressReport;
+import org.eclipse.viatra2.interpreters.ModelInterpreterFactory;
+import org.eclipse.viatra2.loaders.LoaderFactory;
+import org.eclipse.viatra2.logger.Logger;
+import org.eclipse.viatra2.logger.LoggerFactory;
+import org.eclipse.viatra2.natives.INativeFunctionManager;
+import org.eclipse.viatra2.tags.ITagManager;
+
+/**
+ *
+ * Summary: Interface of the VPM modeling framework used by the GUI.
+ *
+ * Description: This interface consists of all the public methods used to
+ * manipulate Viatra2 Framework instances, e.g. getters for modelspace, logger,
+ * output, runtime properties, framework id, save, load, run, merge, native
+ * import.
+ *
+ * @author Andras Schmidt
+ *
+ */
+public interface IFramework extends IAdaptable{
+	/**
+	 * query the file from which this framwork was initialized
+	 *
+	 * @return The file from which this framework was initialized
+	 */
+	public String getCurrentFilename();
+
+	/**
+	 * Set the associated file name.
+	 *
+	 * @param fName
+	 */
+	public void setCurrentFileName(String fName);
+
+	/**
+	 * Returns the VPM model in this framework.
+	 *
+	 * @return the VPM model in this framework
+	 */
+	public IModelSpace getTopmodel();
+
+	/**
+	 * Returns the logger interface for this framework. Events to be logged
+	 * should be written on this logger.
+	 *
+	 * @return the logger interface for this framework
+	 */
+	public Logger getLogger();
+
+	/**
+	 * Code output of interpreters should be written onto the interface returned
+	 * by this method. The real output is configurable.
+	 *
+	 * @return the code out interface
+	 */
+	public CodeOutputPlugin getCodeOutput();
+
+	/**
+	 * Add a logger listener to this framework instance.
+	 *
+	 * @param l
+	 */
+	public void addLoggerListener(Logger l);
+
+	public Collection<Logger> getAllLoggerListeners();
+
+	public void removeLoggerListener(Logger l);
+
+	public void addCodeOutListener(CodeOutputPlugin l);
+
+	public Collection<CodeOutputPlugin> getAllCodeOutListeners();
+
+	public void removeCodeOutListener(CodeOutputPlugin l);
+
+	public void addFrameworkGlobalListener(IFrameworkGlobalListener l);
+
+	public void removeFrameworkGlobalListener(IFrameworkGlobalListener l);
+
+	public Collection<IFrameworkGlobalListener> getAllGlobalListeners();
+
+	public Collection<CodeOutputPluginFactory> getAvailableCodeOutPlugins();
+
+	public Collection<LoggerFactory> getAvailableLoggers();
+
+	public Collection<ModelInterpreterFactory> getAvailableInterpreters();
+
+	/**
+	 * Save the state of model into the given file.
+	 *
+	 * @param fileName
+	 * @throws FrameworkException
+	 * @throws IOException
+	 */
+	public void saveFile(String fileName) throws FrameworkException,
+			IOException;
+
+	public void saveFile(OutputStream os, String newFileName)
+			throws FrameworkException, IOException;
+
+	/**
+	 * Returns an array of parameter names of a Machine instance.
+
+	 * @return names of available parameters
+	 * @throws VPMRuntimeException
+	 */
+	public String[] getEntrypointParameters(Object entrypoint)
+			throws FrameworkException;
+
+	/**
+	 * Runs the given machine with parameters.
+	 *
+	 * @param entrypoint
+	 *            : the machine or rule object to run
+	 * @param params
+	 *            mapping from parameter name to parameter value
+	 * @param pr
+	 *            the progress report callback
+	 */
+	public void runEntrypoint(Object entrypoint, Map<String, Object> params,
+			IProgressReport pr) throws VPMRuntimeException;
+
+	/**
+	 * True if the given machine instance is runnable.
+	 */
+	public boolean isRunnable(Object machine) throws FrameworkException;
+
+	/**
+	 * Returns the machines which are currently loaded
+	 *
+	 * @return the set of machine instances which are currently loaded
+	 */
+	public Collection<Object> getMachines();
+
+	/**
+	 * Queries a machine in the registry by its fully qualified name. Returns
+	 * null if the machine cannot be found.
+	 *
+	 * @param machineFqn
+	 *            the fully qualified name of the machine to find
+	 * @return the machine object whose fully qualified name matches the query
+	 */
+	public Object getMachineByFQN(String machineFqn);
+
+	/**
+	 * Adds a listener to the machine set. Will be notified when the Machine set
+	 * is changed.
+	 *
+	 * @param l
+	 */
+	public void addMachineSetListener(IMachineSetChangedListener l);
+
+	/**
+	 * Removes a machine set listener.
+	 *
+	 * @param l
+	 */
+	public void removeMachineSetListener(IMachineSetChangedListener l);
+
+	/**
+	 * Import the given file into the model with the given importer
+	 *
+	 * @param fileName
+	 *            the file to be imported
+	 * @param importerName
+	 *            impoter id see getNativeImporters
+	 * @throws FrameworkException
+	 */
+	public void nativeImport(String fileName, String importerName)
+			throws FrameworkException;
+
+	public void nativeImport(InputStream stream, String importerName)
+			throws FrameworkException;
+
+	/**
+	 * Loads a machine description from a file.
+	 *
+	 * @param fileName
+	 * @throws FrameworkException
+	 */
+	public Object loadMachine(String fileName, String loaderName)
+			throws FrameworkException;
+	
+	/**
+	 * Loads a machine description from a resource identified by a URI.
+	 *
+	 * @param URI
+	 * @throws FrameworkException
+	 */
+	public Object loadMachineURI(String URI, String loaderName)
+			throws FrameworkException;
+
+	/**
+	 * Loads a machine description from a stream.
+	 *
+	 * @param stream
+	 * @param loaderName
+	 * @throws FrameworkException
+	 */
+	public Object loadMachine(InputStream stream, String loaderName)
+			throws FrameworkException;
+
+	/**
+	 * Adds a machine to the machine set.
+	 *
+	 * @param fqn
+	 *            the fully qualified name of the machine
+	 * @param machine
+	 * @throws FrameworkException
+	 */
+	public void addMachine(String fqn, Object machine)
+			throws FrameworkException;
+
+	/**
+	 * Removes a machine from the machine set.
+	 *
+	 * @param fqn
+	 *            the fully qualified name of the machine to remove
+	 * @throws FrameworkException
+	 */
+	public void removeMachine(String fqn) throws FrameworkException;
+
+	/**
+	 * Returns the set of native importer id's which are capable of importing a
+	 * file with extension ext.
+	 *
+	 * @param ext
+	 *            the file's extension to import
+	 * @return the set of native importer id's which are capable of importing a
+	 *         file with extension ext
+	 */
+	public Set<String> getNativeImportersForExtension(String ext);// throws
+																	// FrameworkException
+																	// ;

+
+	public Set<String> getLoadersForExtension(String ext);// throws
+															// FrameworkException
+															// ;

+
+	/**
+	 * Import the given IResource instance into the model with the given
+	 * importer
+	 *
+	 * @param resource
+	 *            the IResource instance to be imported
+	 * @param importerName
+	 *            impoter id see getNativeImporters
+	 * @throws FrameworkException
+	 */
+	// public void nativeImport(IResource resource, String importerName) throws
+	// FrameworkException;

+	/**
+	 * Merges a given VPML file with the current modelspace.
+	 *
+	 * @param fileName
+	 *            the VPML file to merge
+	 * @throws FrameworkException
+	 * @throws IOException
+	 */
+	public void mergeFile(String fileName) throws FrameworkException,
+			IOException;
+
+	/**
+	 * Merges a given VPML file in the form of an InputStream with the current
+	 * modelspace.
+	 *
+	 * @param stream
+	 *            the InputStream of the VPML file to merge
+	 * @throws FrameworkException
+	 * @throws IOException
+	 */
+	public void mergeStream(InputStream stream) throws FrameworkException,
+			IOException;
+
+	/**
+	 * Returns all native importer classes recognized by the framework. All
+	 * importers have a string id
+	 *
+	 * @return mapping from impoter id to importer class
+	 */
+	public Map<String, NativeImporterFactory> getNativeImporters();
+
+	/**
+	 * Returns all native importer classes recognized by the framework. All
+	 * importers have a string id
+	 *
+	 * @return mapping from impoter id to importer class
+	 */
+	public Map<String, LoaderFactory> getLoaders();
+
+	/**
+	 * get the native function manager. Native function manager is used to find
+	 * native functions, which can be used by interpreters.
+	 *
+	 * @return the native function manager
+	 */
+	public INativeFunctionManager getNativeFunctionManager();
+
+	/**
+	 * Returns this IFramework's unique string ID.
+	 *
+	 * @return this IFramework's unique string ID
+	 */
+	public String getId();
+
+	/**
+	 * Returns the IFramework's multiproperty container.
+	 *
+	 * @return the IFramework's multiproperty container.
+	 */
+	public VPMProperties getProperties();
+
+	/**
+	 * Gets the tag manager associated to the Framework.
+	 */
+	public ITagManager getTagManager();
+
+	/**
+	 * Returns the VTCLParserManager
+	 */
+	public Object getVTCLParserManager();
+
+	/**
+	 * Registers a framework service with (unique) name "serviceName"
+	 * Services are stored in a map where the "serviceName" identifies the service
+	 * provider class as defined in the extenders of the "frameworkservice" extension point.
+	 * @param serviceName: unique name of the service (defined by extenders of the frameworkservice extension point)
+	 * @throws FrameworkException
+	 */
+	public void registerFrameworkService(String serviceName) throws FrameworkException;
+
+	/**
+	 * Unregisters a service with a unique "serviceName" from the map of
+	 * service providers
+	 * @param serviceName: unique name of the service to be unregistered
+	 */
+	public void unregisterFrameworkService(String serviceName);
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/IFrameworkGlobalListener.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/IFrameworkGlobalListener.java
new file mode 100644
index 0000000..dfd1304
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/IFrameworkGlobalListener.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework;
+
+public interface IFrameworkGlobalListener {
+
+	public void frameworkNameChanged();
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/IFrameworkListChangedListener.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/IFrameworkListChangedListener.java
new file mode 100644
index 0000000..5a3d066
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/IFrameworkListChangedListener.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework;
+
+/**
+ * A listener interface for managed frameworks list changes (framework close and
+ * initiation). (The framework manager view implements this interface so the
+ * changes in framework list are refreshed on the view)
+ * 
+ * @author Istvan Rath
+ * 
+ */
+public interface IFrameworkListChangedListener {
+	/**
+	 * The list of framworks has changed
+	 * 
+	 */
+	// public void FrameworkListChanged();

+	public void frameworkAdded(IFramework f);
+
+	public void frameworkRemoved(IFramework f);
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/IFrameworkService.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/IFrameworkService.java
new file mode 100644
index 0000000..22fab5f
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/IFrameworkService.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2010, Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework;

+

+public interface IFrameworkService {

+	public void init(IFramework fw);

+

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/IFrameworkServiceFactory.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/IFrameworkServiceFactory.java
new file mode 100644
index 0000000..74b129a
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/IFrameworkServiceFactory.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2010, Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework;

+

+/**

+ * Provides a generic interface for creating a new framework service factory.

+ * All implementors should    

+ * @author Istvan Rath

+ *

+ */

+public interface IFrameworkServiceFactory {

+	/**

+	 * 

+	 * @return

+	 */

+	IFrameworkService create();

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/IMachineSetChangedListener.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/IMachineSetChangedListener.java
new file mode 100644
index 0000000..936d310
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/IMachineSetChangedListener.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework;
+
+/**
+ * A listener interface for machine set changes. Whenever a machine is loaded or
+ * dropped, listeners will be notified.
+ * 
+ * @author Istvan Rath
+ * 
+ */
+public interface IMachineSetChangedListener {
+	/**
+	 * The set of machines has changed
+	 * 
+	 */
+	// public void machineSetChanged(IFramework where);

+	public void machineAdded(Object machine);
+
+	public void machineRemoved(Object machine);
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/MultiCodeFormatter.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/MultiCodeFormatter.java
new file mode 100644
index 0000000..fc85ae8
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/MultiCodeFormatter.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework;
+
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.viatra2.buffers.BufferStore;
+import org.eclipse.viatra2.codegen.CodeOutputPlugin;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.properties.VPMProperties;
+import org.eclipse.viatra2.logger.Logger;
+
+/**
+ * A code formatter implementation, that accumulates many code formatters. Code
+ * formatters can be plugged into this code formatter and all output will be
+ * forwarded to all plugged code formatters. This module is used by the VPM
+ * modeling framework to make it available to use more code output plugins the
+ * same time.
+ * 
+ * @author Andras Schmidt
+ * 
+ *         Modified on 2006.09.14 by Istvan Rath: - added logger, props
+ *         references - added a call to a listener's init() function upon
+ *         registration (add()) Modified on 2008.07.30 by Istvan Rath - add
+ *         IFramework reference - update API
+ * 
+ */
+public class MultiCodeFormatter implements CodeOutputPlugin {
+
+	protected VPMProperties props;
+
+	protected Logger logger;
+
+	protected IFramework frame;
+
+	public void beginWork() {
+		for (int i = 0; i < listeners.size(); ++i) {
+			CodeOutputPlugin cp = listeners.get(i);
+			cp.beginWork();
+		}
+	}
+
+	public void codeOut(String s) throws VPMRuntimeException {
+		for (int i = 0; i < listeners.size(); ++i) {
+			CodeOutputPlugin cp = listeners.get(i);
+			cp.codeOut(s);
+		}
+	}
+
+	public void endWork() {
+		for (int i = 0; i < listeners.size(); ++i) {
+			CodeOutputPlugin cp = listeners.get(i);
+			cp.endWork();
+		}
+		// close file buffers in the buffer store

+		Set<Map.Entry<String, FileWriter>> fileBuffers = BufferStore
+				.getAllFileBuffers(frame.getTopmodel());
+		if (fileBuffers != null) {
+			try {
+				for (Map.Entry<String, FileWriter> buf : fileBuffers) {
+					buf.getValue().flush();
+					buf.getValue().close();
+				}
+			} catch (IOException e) {
+				logger.fatal(e.getMessage());
+			}
+			// remove stale file buffers

+			BufferStore.removeFileBuffers(frame.getTopmodel());
+		}
+	}
+
+	public void init(IFramework fw) {
+		frame = fw;
+		props = fw.getProperties();
+		logger = fw.getLogger();
+	}
+
+	List<CodeOutputPlugin> listeners = new ArrayList<CodeOutputPlugin>();
+
+	/**
+	 * Add a listening code output plugin.
+	 * 
+	 * @param listener
+	 *            this plugin will get all code out events from now
+	 */
+	public void addListener(CodeOutputPlugin listener) {
+		listeners.add(listener);
+		listener.init(frame);
+	}
+
+	/**
+	 * Remove a listening code output plugin.
+	 * 
+	 * @param listener
+	 *            this plugin will not get all code out events from now
+	 */
+	public void removeListener(CodeOutputPlugin listener) {
+		listeners.remove(listener);
+	}
+
+	/**
+	 * Get all listeners of this code out pipeline
+	 * 
+	 * @returns all listeners
+	 */
+	public Collection<CodeOutputPlugin> getListeners() {
+		return listeners;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/MultiLogger.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/MultiLogger.java
new file mode 100644
index 0000000..dcbc588
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/MultiLogger.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework;
+
+import java.util.ArrayList;
+
+import org.eclipse.viatra2.framework.properties.VPMProperties;
+import org.eclipse.viatra2.logger.Logger;
+
+/**
+ * A VPM logger implementation, that accumulates many loggers. Loggers can be
+ * plugged into this logger and all output will be forwarded to all plugged
+ * loggers. This module is used by the VPM modeling framework to make it
+ * available to use more logger plugins the same time.
+ * 
+ * @author Andras Schmidt
+ */
+
+public class MultiLogger implements Logger {
+
+	ArrayList<Logger> listeners = new ArrayList<Logger>();
+
+	public void setLevel(int level) {
+		for (Logger l : listeners) {
+			l.setLevel(level);
+		}
+	}
+
+	public void debug(String s) {
+		for (Logger l : listeners) {
+			l.debug(s);
+		}
+	}
+
+	public void warning(String s) {
+		for (Logger l : listeners) {
+			l.warning(s);
+		}
+	}
+
+	public void error(String s) {
+		for (Logger l : listeners) {
+			l.error(s);
+		}
+	}
+
+	public void fatal(String s) {
+		for (Logger l : listeners) {
+			l.fatal(s);
+		}
+	}
+
+	public void info(String s) {
+		for (Logger l : listeners) {
+			l.info(s);
+		}
+	}
+
+	public void init(VPMProperties p) {
+
+	}
+
+	/**
+	 * Add a listening logger plugin.
+	 * 
+	 * @param listener
+	 *            this plugin will get all log events from now
+	 */
+	public void addListener(Logger l) {
+		listeners.add(l);
+	}
+
+	/**
+	 * Remove a listening logger plugin.
+	 * 
+	 * @param listener
+	 *            this plugin will not get all log events from now
+	 */
+	void removeListener(Logger l) {
+		listeners.remove(l);
+	}
+
+	/**
+	 * Get all listeners of this logger pipeline
+	 * 
+	 * @returns all listeners
+	 */
+	ArrayList<Logger> getListeners() {
+		return listeners;
+	}
+
+	public void message(int level, String msg, Throwable cause) {
+		for (Logger l : listeners) {
+			l.message(level, msg, cause);
+		}
+	}
+
+	public void message(int level, String msg) {
+		for (Logger l : listeners) {
+			l.message(level, msg);
+		}
+	}
+
+	public void printStackTrace(Throwable t) {
+		for (Logger l : listeners)
+		{
+			l.printStackTrace(t);
+		}
+		
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/IViatraPropertyChangedListener.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/IViatraPropertyChangedListener.java
new file mode 100644
index 0000000..0d10af4
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/IViatraPropertyChangedListener.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework.properties;
+
+/**
+ * Interface for listening to property changed events.
+ * 
+ * @author Istvan Rath
+ */
+public interface IViatraPropertyChangedListener {
+
+	/**
+	 * Notifies the listener that a property has changed.
+	 * 
+	 * @param providerID
+	 *            the originating provider's ID
+	 * @param propertyID
+	 *            the property ID that has changed
+	 * @param oldVal
+	 *            the value before the change
+	 * @param newVal
+	 *            the value after the change
+	 */
+	public void propertyChanged(String providerID, String propertyID,
+			String oldVal, String newVal);
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/IViatraPropertyProvider.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/IViatraPropertyProvider.java
new file mode 100644
index 0000000..8c26813
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/IViatraPropertyProvider.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework.properties;
+
+import java.util.Set;
+
+/**
+ * 
+ * @author Istvan Rath
+ * 
+ */
+public interface IViatraPropertyProvider {
+
+	/**
+	 * True, if this property provider belongs to an active plugin. False, if
+	 * it's just provided by the framework for holding property data for
+	 * non-present property provider plugins.
+	 * 
+	 * Note: only active property providers are displayed on the GUI.
+	 */
+	public boolean isActive();
+
+	/**
+	 * Returns the unique provider ID of this provider.
+	 */
+	public String getProviderID();
+
+	/**
+	 * Sets the actual value of the given property.
+	 */
+	public void setProperty(String id, String val);
+
+	/**
+	 * Returns the actual value of the given property;
+	 */
+	public String getProperty(String id);
+
+	/**
+	 * Gets the property kind used for display (INTEGER,STRING,BOOLEAN,PATH,
+	 * etc).
+	 */
+	public VIATRAPropertyKind getPropertyKind(String id);
+
+	/**
+	 * Returns the default value for a given property.
+	 */
+	public String getDefaultPropertyValue(String id);
+
+	/**
+	 * Returns a set of string id's for all properties which this provider wants
+	 * to support.
+	 */
+	public Set<String> getAllPropertyIds();
+
+	/**
+	 * Add a property changed listener to this provider.
+	 */
+	public void addListener(IViatraPropertyChangedListener l);
+
+	/**
+	 * Removes a property changed listener from this provider.
+	 */
+	public void removeListener(IViatraPropertyChangedListener l);
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/IViatraPropertyProvidersChangedListener.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/IViatraPropertyProvidersChangedListener.java
new file mode 100644
index 0000000..c232328
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/IViatraPropertyProvidersChangedListener.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework.properties;
+
+/**
+ * Lightweight marker interface for simple notification mechanism for the
+ * property provider collection.
+ * 
+ * This interface is only intended to be used by the Frameworks GUI.
+ * 
+ * @author Istvan Rath
+ * 
+ */
+public interface IViatraPropertyProvidersChangedListener {
+
+	/**
+	 * Signals that the property provider collection has changed.
+	 * 
+	 */
+	public void propertyProvidersChanged();
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/VIATRAPreferences.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/VIATRAPreferences.java
new file mode 100644
index 0000000..82e154a
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/VIATRAPreferences.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework.properties;
+
+public interface VIATRAPreferences {
+
+	public static final String DISABLE_VPML_OVERRIDE = "org.eclipse.viatra2.gui.preferences.DisableVPMLOverride";
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/VIATRAPropertyKind.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/VIATRAPropertyKind.java
new file mode 100644
index 0000000..e63e4fc
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/VIATRAPropertyKind.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework.properties;
+
+/**
+ * Describes the kind of property.
+ * 
+ * @author istvan rath
+ * 
+ */
+public enum VIATRAPropertyKind {
+	STRING, INTEGER, BOOLEAN, PATH
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/VPMProperties.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/VPMProperties.java
new file mode 100644
index 0000000..a3c2f53
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/VPMProperties.java
@@ -0,0 +1,233 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework.properties;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Properties;
+import java.util.Set;
+import java.util.Vector;
+
+import org.eclipse.viatra2.framework.properties.providers.DummyPropertyProvider;
+
+/**
+ * Dynamic multiple properties for VPM modeling.
+ * 
+ * Note: this class has (too) many functionalities. Note2: all getter functions
+ * implicitly assume that they are queried with registered provider IDs.
+ * 
+ * @author Istvan Rath
+ * 
+ */
+public class VPMProperties {
+	private static final long serialVersionUID = 3838142787694854860L;
+
+	/**
+	 * String -> PropertyProvider mapping.
+	 */
+	private HashMap<String, IViatraPropertyProvider> multiProperties;
+
+	/**
+	 * Container to keep track of listeners which receive a notification when a
+	 * new provider is registered or deregistered.
+	 */
+	private Vector<IViatraPropertyProvidersChangedListener> listeners;
+
+	public VPMProperties() {
+		multiProperties = new HashMap<String, IViatraPropertyProvider>();
+		listeners = new Vector<IViatraPropertyProvidersChangedListener>();
+	}
+
+	public boolean isProviderActive(String providerID) {
+		return multiProperties.containsKey(providerID)
+				&& multiProperties.get(providerID).isActive();
+	}
+
+	public void addPropertyProvider(IViatraPropertyProvider provider) {
+		if (!multiProperties.containsKey(provider)) {
+			multiProperties.put(provider.getProviderID(), provider);
+			// FIXME what if there exists a dummy provider for this provider ID?

+			notifyListeners();
+		}
+	}
+
+	public void removePropertyProvider(IViatraPropertyProvider provider) {
+		if (multiProperties.containsKey(provider)) {
+			multiProperties.remove(provider.getProviderID());
+			// FIXME what to do with dummy?

+			notifyListeners();
+		}
+	}
+
+	public Set<String> getAllProviderIDs() {
+		return multiProperties.keySet();
+	}
+
+	/**
+	 * Returns a property provider with a given ID.
+	 * 
+	 * @param providerID
+	 *            provider ID string
+	 * @return property provider object
+	 */
+	public IViatraPropertyProvider getProvider(String providerID) {
+		return multiProperties.get(providerID);
+	}
+
+	/**
+	 * Returns all the Property Keys of the Properties container of this
+	 * IFramework.
+	 */
+	public Set<String> getAllRuntimePropertyIDs(String providerID) {
+		return multiProperties.get(providerID).getAllPropertyIds();
+	}
+
+	/**
+	 * Sets a runtime property of this IFramework instance
+	 * 
+	 * @param propid
+	 *            the runtime property's unique string id
+	 * @param value
+	 *            the desired value
+	 */
+	public void setRuntimeProperty(String providerID, String propid,
+			String value) {
+		if (multiProperties.get(providerID) != null)
+			multiProperties.get(providerID).setProperty(propid, value);
+	}
+
+	/**
+	 * Gets the value of a runtime property of this IFramework instance
+	 * 
+	 * @param propid
+	 *            the runtime property's unique string id
+	 * @return the value of the runtime property, empty string if not found!
+	 */
+	public String getRuntimeProperty(String providerID, String propid) {
+		if (multiProperties.get(providerID) != null)
+			return multiProperties.get(providerID).getProperty(propid);
+		else
+			//return null;
+			return "";
+	}
+
+	/**
+	 * Gets whether a given runtime property is set for a given provider id.
+	 * 
+	 * @param providerID
+	 * @param propid
+	 * @return true if the property is set
+	 */
+	public boolean isRuntimePropertySet(String providerID, String propid) {
+		try {
+			return multiProperties.get(providerID).getProperty(propid) != null;
+		} catch (Exception e) {
+			return false;
+		}
+	}
+
+	/**
+	 * This method is used to load the multiproperties from a
+	 * java.util.Properties serialization. Its use is discouraged as we should
+	 * load properties from VPML files now.
+	 * 
+	 * @param s
+	 * @throws IOException
+	 */
+	public void load(InputStream s) throws IOException {
+		Properties p = new Properties();
+		p.load(s);
+		loadFromJavaProperties(p);
+	}
+
+	private static final String ProviderIDPrefixDelimiter = "@";
+
+	/**
+	 * Recreate the multi property registry from a simple java.util.Properties
+	 * instance.
+	 * 
+	 * Note: this function must be called AFTER all active property providers
+	 * have been registered.
+	 * 
+	 * @param p
+	 */
+	public void loadFromJavaProperties(Properties p) {
+		for (Object _key : p.keySet().toArray()) {
+			String key = _key.toString();
+			if (key.indexOf(ProviderIDPrefixDelimiter) < 0) {
+				// System.out.println("Invalid property key: "+key);

+				continue;
+			}
+			String providerID = key.substring(0, key
+					.indexOf(ProviderIDPrefixDelimiter));
+			String propid = key.substring(key
+					.indexOf(ProviderIDPrefixDelimiter)
+					+ ProviderIDPrefixDelimiter.length());
+			if (!multiProperties.containsKey(providerID)) {
+				// no currently active provider

+				// create dummy provider

+				DummyPropertyProvider dp = new DummyPropertyProvider(providerID);
+				addPropertyProvider(dp);
+			}
+			setRuntimeProperty(providerID, propid, p.get(key).toString());
+		}
+	}
+
+	/**
+	 * "Serialize" as a standard java.util.Properties instance. In this
+	 * registry, property keys are prefixed by
+	 * ProviderID+ProProviderIDPrefixDelimiter
+	 */
+	public Properties getJavaProperties() {
+		Properties p = new Properties();
+		for (String key : multiProperties.keySet()) {
+			IViatraPropertyProvider prov = multiProperties.get(key);
+			for (String _key : prov.getAllPropertyIds()) {
+				p.put(prov.getProviderID() + ProviderIDPrefixDelimiter + _key,
+						prov.getProperty(_key));
+			}
+		}
+		return p;
+	}
+
+	/**
+	 * Register a new listener for providerset changed events.
+	 * 
+	 * @param l
+	 */
+	public void addProvideryProvidersChangedListener(
+			IViatraPropertyProvidersChangedListener l) {
+		if (!listeners.contains(l))
+			listeners.add(l);
+	}
+
+	/**
+	 * Deregister a listener for providerset changed events.
+	 * 
+	 * @param l
+	 */
+	public void removeProvideryProvidersChangedListener(
+			IViatraPropertyProvidersChangedListener l) {
+		if (listeners.contains(l)) {
+			listeners.remove(l);
+			listeners.trimToSize();
+		}
+	}
+
+	private void notifyListeners() {
+		for (IViatraPropertyProvidersChangedListener l : listeners) {
+			l.propertyProvidersChanged();
+		}
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/providers/DefaultPropertyProvider.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/providers/DefaultPropertyProvider.java
new file mode 100644
index 0000000..7c864de
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/providers/DefaultPropertyProvider.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework.properties.providers;
+
+import java.util.HashSet;
+import java.util.Properties;
+import java.util.Set;
+
+import org.eclipse.viatra2.framework.properties.IViatraPropertyChangedListener;
+import org.eclipse.viatra2.framework.properties.IViatraPropertyProvider;
+
+public abstract class DefaultPropertyProvider implements
+		IViatraPropertyProvider {
+
+	protected Properties properties;
+
+	protected String pID;
+
+	protected HashSet<String> allids;
+
+	protected HashSet<IViatraPropertyChangedListener> listeners;
+
+	public final void addListener(IViatraPropertyChangedListener l) {
+		listeners.add(l);
+	}
+
+	public final void removeListener(IViatraPropertyChangedListener l) {
+		listeners.remove(l);
+	}
+
+	public DefaultPropertyProvider(String id) {
+		pID = id;
+		properties = new Properties();
+		allids = new HashSet<String>();
+		listeners = new HashSet<IViatraPropertyChangedListener>();
+		init();
+	}
+
+	/**
+	 * This is called in the abstract constructor, descendants should use this
+	 * function to fill up the <b>allids</> HashSet with property IDs.
+	 * 
+	 */
+	public abstract void init();
+
+	public final String getProviderID() {
+		return pID;
+	}
+
+	public final void setProperty(String id, String val) {
+		String oldval = properties.getProperty(id);
+		properties.put(id, val);
+		allids.add(id);
+		for (IViatraPropertyChangedListener l : listeners) {
+			l.propertyChanged(pID, id, oldval, val);
+		}
+
+	}
+
+	public final String getProperty(String id) {
+		return properties.getProperty(id);
+	}
+
+	public final Set<String> getAllPropertyIds() {
+		return allids;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/providers/DummyPropertyProvider.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/providers/DummyPropertyProvider.java
new file mode 100644
index 0000000..fc7ef4f
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/providers/DummyPropertyProvider.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework.properties.providers;
+
+import org.eclipse.viatra2.framework.properties.VIATRAPropertyKind;
+
+/**
+ * Dummy property provider class, used to contain properties which do not belong
+ * to any active registered property provider.
+ * 
+ * @author Istvan Rath
+ * 
+ */
+public class DummyPropertyProvider extends DefaultPropertyProvider {
+
+	public DummyPropertyProvider(String id) {
+		super(id);
+	}
+
+	public boolean isActive() {
+		return false; // dummy providers are ALWAYS inactive

+	}
+
+	public String getDefaultPropertyValue(String id) {
+		return id + "::DummyDefault"; // dummy defaults are never used

+	}
+
+	@Override
+	public void init() {
+		// the dummy provider is too dumb to init itself :)

+	}
+
+	public VIATRAPropertyKind getPropertyKind(String id) {
+		return VIATRAPropertyKind.STRING;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/providers/VPMCorePropertyProvider.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/providers/VPMCorePropertyProvider.java
new file mode 100644
index 0000000..5284489
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/providers/VPMCorePropertyProvider.java
@@ -0,0 +1,68 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2011 Abel Hegedus and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Abel Hegedus - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.framework.properties.providers;

+

+import org.eclipse.viatra2.framework.properties.VIATRAPropertyKind;

+

+/**

+ * @author Abel Hegedus

+ *

+ */

+public class VPMCorePropertyProvider extends DefaultPropertyProvider {

+

+	public static final String VPM_CORE_PROVIDER_NAME = "Core";

+	public static final String VPM_CORE_PROVIDER_SIMPLE_VALUE = "simple";

+	public static final String VPM_CORE_PROVIDER_TRACEBASED_VALUE = "tracebased";

+	public static final String VPM_CORE_PROVIDER_MANAGER_PROPERTY = "manager";

+

+	public VPMCorePropertyProvider() {

+		super(VPM_CORE_PROVIDER_NAME);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.framework.properties.IViatraPropertyProvider#isActive()

+	 */

+	@Override

+	public boolean isActive() {

+		return true;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.framework.properties.IViatraPropertyProvider#getPropertyKind(java.lang.String)

+	 */

+	@Override

+	public VIATRAPropertyKind getPropertyKind(String id) {

+		if(id.equals(VPM_CORE_PROVIDER_MANAGER_PROPERTY)) {

+			return VIATRAPropertyKind.STRING;

+		}

+		return null;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.framework.properties.IViatraPropertyProvider#getDefaultPropertyValue(java.lang.String)

+	 */

+	@Override

+	public String getDefaultPropertyValue(String id) {

+		if(id.equals(VPM_CORE_PROVIDER_MANAGER_PROPERTY)) {

+			return VPM_CORE_PROVIDER_SIMPLE_VALUE;

+		}

+		// TODO Auto-generated method stub

+		return null;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.framework.properties.providers.DefaultPropertyProvider#init()

+	 */

+	@Override

+	public void init() {

+		allids.add(VPM_CORE_PROVIDER_MANAGER_PROPERTY);

+	}

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/providers/VPMLoggerPropertyProvider.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/providers/VPMLoggerPropertyProvider.java
new file mode 100644
index 0000000..acd1cfd
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/framework/properties/providers/VPMLoggerPropertyProvider.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.framework.properties.providers;
+
+import org.eclipse.viatra2.framework.properties.VIATRAPropertyKind;
+
+public class VPMLoggerPropertyProvider extends DefaultPropertyProvider {
+
+	public VPMLoggerPropertyProvider() {
+		super("Logging");
+	}
+
+	public boolean isActive() {
+		return true;
+	}
+
+	public String getDefaultPropertyValue(String id) {
+		if (id.equals("Log level"))
+			return "3";
+		// else if (id.equals("output"))

+		// return "screen";

+		return "unknown";
+	}
+
+	@Override
+	public void init() {
+		allids.add("Log level");
+		// allids.add("output");

+	}
+
+	public VIATRAPropertyKind getPropertyKind(String id) {
+		return VIATRAPropertyKind.INTEGER;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/imports/IVPMImporter.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/imports/IVPMImporter.java
new file mode 100644
index 0000000..bde458f
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/imports/IVPMImporter.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.imports;
+
+import java.io.InputStream;
+
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.properties.VPMProperties;
+
+/**
+ * Interface for implementations of an importer that imports the whole VPM model
+ * from one file.
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public interface IVPMImporter {
+
+	/**
+	 * Open a stream and import its content into the model
+	 * 
+	 * @param is
+	 *            stream that contains the model
+	 * @param topmodel
+	 *            a new instance of IModelSpace
+	 * @param properties
+	 *            properties to load into
+	 */
+	void process(InputStream is, IModelSpace topmodel, VPMProperties props)
+			throws VPMRuntimeException;
+
+	/**
+	 * Open a file and import its content into the model
+	 * 
+	 * @param initialModel
+	 *            file name of the model
+	 * @param topmodel
+	 *            a new instance of IModelSpace
+	 * @param properties
+	 *            properties to load into
+	 */
+	void process(String initialModel, IModelSpace topmodel, VPMProperties props)
+			throws VPMRuntimeException;
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/imports/NativeImporter.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/imports/NativeImporter.java
new file mode 100644
index 0000000..116faca
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/imports/NativeImporter.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.imports;
+
+import java.io.InputStream;
+
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.IFramework;
+
+/**
+ * Interface to modules which import models into an existing modelspace
+ * 
+ * @author Andras Balogh
+ */
+public interface NativeImporter {
+	/**
+	 * Processes the given file, and imports its content to the modelspace
+	 * 
+	 * @param f
+	 *            File name
+	 * @param fw
+	 *            The current framework
+	 * @throws VPMRuntimeException
+	 */
+	public void processFile(String f, IFramework fw) throws VPMRuntimeException;
+
+	/**
+	 * Processes the given stream, and imports its content to the modelspace
+	 * 
+	 * @param f
+	 *            The stream to process
+	 * @param fw
+	 *            The current framework
+	 * @throws VPMRuntimeException
+	 */
+	public void process(InputStream f, IFramework fw)
+			throws VPMRuntimeException;
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/imports/NativeImporterFactory.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/imports/NativeImporterFactory.java
new file mode 100644
index 0000000..210fbfb
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/imports/NativeImporterFactory.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.imports;
+
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+
+/**
+ * Interface of importer creator classes.
+ * 
+ * @author Andras Balogh
+ * 
+ */
+public interface NativeImporterFactory {
+
+	/**
+	 * Descriptive name of importer.
+	 * 
+	 * @return
+	 */
+	public String getImporterName();
+
+	/**
+	 * Initialise the importer.
+	 * 
+	 * @param f
+	 * @return
+	 * @throws VPMRuntimeException
+	 */
+	public NativeImporter getImporterInstance() throws VPMRuntimeException;
+
+	/**
+	 * Returns a preferred id for the given importer.
+	 * 
+	 * @return
+	 */
+	public String getId();
+
+	/**
+	 * Get the set of file extensions that are handled by this importer.
+	 * 
+	 * @return the set of file extensions that are handled by this importer
+	 */
+	public String[] getFileExtensionList();
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/imports/NativeResourceImporter.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/imports/NativeResourceImporter.java
new file mode 100644
index 0000000..958e1bb
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/imports/NativeResourceImporter.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.imports;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.logger.Logger;
+
+/**
+ * Summary: An extended native importer interface supporting imports from
+ * Eclipse Resources.
+ * 
+ * Description: This interface, as of the initial version, is a proposal. As the
+ * native importer functionality only works if Viatra2 is being run within
+ * Eclipse, it seems logical to provide a way for passing IResources to native
+ * importers, since all files/java code snippets/EMF models exist as IResource
+ * instances within the workspace.
+ * 
+ * @author Istvan Rath
+ * 
+ */
+public interface NativeResourceImporter extends NativeImporter {
+
+	/**
+	 * Processes an IResource instance for native importing.
+	 * 
+	 * @param r
+	 *            IResource to process
+	 * @param m
+	 *            The current modelspace
+	 * @param l
+	 *            The system logger
+	 * @throws VPMRuntimeException
+	 */
+	public void processResource(IResource r, IModelSpace m, IFramework fw,
+			Logger l) throws VPMRuntimeException;
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/imports/VPMImporterSax.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/imports/VPMImporterSax.java
new file mode 100644
index 0000000..58b4b9c
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/imports/VPMImporterSax.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.imports;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.properties.VPMProperties;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public class VPMImporterSax implements IVPMImporter {
+
+	public void process(InputStream is, IModelSpace topmodel,
+			VPMProperties props) throws VPMRuntimeException {
+		VPMImporterSaxImpl imp = new VPMImporterSaxImpl();
+		// FIXME load properties !

+		// VPMProperties pr2=new VPMProperties();

+		imp.process(is, topmodel, props);
+		return;
+	}
+
+	public void process(String f, IModelSpace ms, VPMProperties props)
+			throws VPMRuntimeException {
+		try {
+			process(new FileInputStream(f), ms, props);
+			return;
+		} catch (FileNotFoundException e) {
+			throw new VPMRuntimeException("File not found (" + f + ")");
+		}
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/imports/VPMImporterSaxImpl.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/imports/VPMImporterSaxImpl.java
new file mode 100644
index 0000000..fa58b32
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/imports/VPMImporterSaxImpl.java
@@ -0,0 +1,1085 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.imports;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.eclipse.viatra2.core.EMultiplicityKind;
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.properties.VPMProperties;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * VPM model loader implementation.
+ *
+ * The loader first reads the whole file. The file is read by a SAX parser, so
+ * the loader builds the data read from the file as SAX events.
+ *
+ * Then builds the containment tree of all elements Then creates all elements
+ * Then sets the target of all relations Then creates the type relations
+ *
+ * @author Andras Schmidt
+ *
+ */
+public class VPMImporterSaxImpl extends DefaultHandler {
+	/**
+	 * The string collected from text contents of xml file
+	 */
+	private StringBuffer collectedString = new StringBuffer();
+
+	/**
+	 * Commands the parser to collect the text contents read from xml into the
+	 * <code>collectedString</code> buffer
+	 */
+	private boolean collectString = false;
+
+	/**

+	 *

+	 */
+	private int stateField = 0;
+
+	private int stateCollection = 0;
+
+	private int stateElement = 0;
+
+	private int stateModel = 0;
+
+	private int stateParent = 0;
+
+	private int stateModelElement = 0;
+
+	// / Enumeratinos of states of the parser

+	private static final int STATE_MODELELEMENT_OFF = 0;
+
+	private static final int STATE_MODELELEMENT_ON = 1;
+
+	private static final int STATE_PARENT_OFF = 0;
+
+	private static final int STATE_PARENT_ENTITY = 1;
+
+	private static final int STATE_FIELD_OFF = 0;
+
+	private static final int STATE_FIELD_VALUE = 1;
+
+	private static final int STATE_FIELD_NAME = 2;
+
+	private static final int STATE_FIELD_PARENT = 3;
+
+	private static final int STATE_FIELD_TYPE = 4;
+
+	private static final int STATE_FIELD_TO = 7;
+
+	private static final int STATE_FIELD_SUPERTYPE = 5;
+
+	private static final int STATE_FIELD_FROM = 6;
+
+	private static final int STATE_FIELD_VIEW_INFO = 8;
+
+	private static final int STATE_FIELD_MULTIPLICITY = 9;
+
+	private static final int STATE_FIELD_ISAGGREGATION = 10;
+
+	private static final int STATE_FIELD_INVERSE = 11;
+
+	private static final int STATE_FIELD_ISFINALTYPE = 12;
+
+	private static final int STATE_COLLECTION_OFF = 0;
+
+	private static final int STATE_COLLECTION_RELATION = 1;
+
+	private static final int STATE_COLLECTION_FUNCTION = 2;
+
+	private static final int STATE_COLLECTION_ENTITY = 3;
+
+	private static final int STATE_ELEMENT_OFF = 0;
+
+	private static final int STATE_ELEMENT_ON = 1;
+
+	private static final int STATE_MODEL_OUT = 0;
+
+	private static final int STATE_MODEL_VPM = 1;
+
+	private static final int STATE_MODEL_MODEL = 2;
+
+	private static final String sVPM = "VPM";
+
+	private static final String sPROPERTIES = "PROPERTIES";
+
+	private static final String sPROPERTY = "PROPERTY";
+
+	private static final String sPROPERTY_NAME = "name";
+
+	private static final String sPROPERTY_VALUE = "value";
+
+	private static final String sMODEL = "MODEL";
+
+	private static final String sENTITIES = "ENTITIES";
+
+	private static final String sENTITY = "ENTITY";
+
+	private static final String sRELATIONS = "RELATIONS";
+
+	private static final String sRELATION = "RELATION";
+
+	private static final String sFUNCTIONS = "FUNCTIONS";
+
+	private static final String sFUNCTION = "FUNCTION";
+
+	private static final String sMODELELEMENT = "MODELELEMENT";
+
+	private static final String sISFINALTYPE = "ISFINALTYPE";
+
+	private static final String saID = "id";
+
+	private static final String saAnyFrom = "isAnyFrom";
+
+	private static final String saAnyTo = "isAnyTo";
+
+	private static final String saIDREF = "idref";
+
+	private static final String sPARENT = "PARENT";
+
+	private static final String sNAME = "NAME";
+
+	private static final String sVALUE = "VALUE";
+
+	private static final String sTYPE = "TYPE";
+
+	private static final String sFROM = "FROM";
+
+	private static final String sTO = "TO";
+
+	private static final String sVIEW_INFO = "VIEWINFO";
+
+	private static final String sMULTIPLICITY = "MULTIPLICITY";
+
+	private static final String sINVERSE = "INVERSE";
+
+	private static final String sISAGGREGATION = "ISAGGREGATION";
+
+	private static final String sSUPERTYPE = "SUPERTYPE";
+
+	private static final String sROOTENTITY = "ROOTENTITY";
+
+	/**
+	 * The model element currently being read from vpml file
+	 */
+	private ModelElement modelElement = null;
+
+	/**
+	 * The id of the root model element
+	 */
+	private String rootID = null;
+
+	/**
+	 * Mapping from ID (in vpml file) to <code>ModelElement</code> structure
+	 */
+	private Map<String, ModelElement> id2modelElement = new TreeMap<String, ModelElement>();
+
+	/**
+	 * Mapping from ID (in vpml file) to <code>ModelElement</code> structure
+	 * (just entities)
+	 */
+	private Map<String, ModelElement> id2entity = new TreeMap<String, ModelElement>();
+
+	/**
+	 * Structure that contains all data of a model element stored in a vpml
+	 * file. This structure is filled with concrete values when a model element
+	 * is loaded. The VPM model is built when all data of all elements is
+	 * collected.
+	 *
+	 * @author Andras Schmidt
+	 *
+	 */
+	private class ModelElement implements Comparable {
+		public static final int ENTITY = 0;
+
+		public static final int RELATION = 1;
+
+		public static final int FUNCTION = 2;
+
+		private String id = null;
+
+		private String multiplicity = null;
+
+		private String isAggregation = null;
+
+		private String Inverse = null;
+
+		private String isfinaltype = null;
+
+		private String name = "";
+
+		private String parent = null;
+
+		private String value = "";
+
+		private String viewInfo = null;
+
+		private String from = null;
+
+		private String to = null;
+
+		private int type;
+
+		private boolean isAnyFrom = false;
+
+		private boolean isAnyTo = false;
+
+		private List<String> types = new ArrayList<String>();
+
+		private List<String> superTypes = new ArrayList<String>();
+
+		private Set<String> containment = null;
+
+		private IModelElement me = null;
+
+		void setModelElement(IModelElement me) {
+			this.me = me;
+		}
+
+		IModelElement getModelElement() {
+			return me;
+		}
+
+		String getID() {
+			return id;
+		}
+
+		int getType() {
+			return type;
+		}
+
+		String getName() {
+			return name;
+		}
+
+		void setName(String name) {
+			this.name = name;
+		}
+
+		String getValue() {
+			return value;
+		}
+
+		void setValue(String value) {
+			this.value = value;
+		}
+
+		String getViewInfo() {
+			return viewInfo;
+		}
+
+		void setViewInfo(String viewInfo) {
+			this.viewInfo = viewInfo;
+		}
+
+		void setMultiplicity(String multiplicity) {
+			this.multiplicity = multiplicity;
+		}
+
+		String getMultiplicity() {
+			return multiplicity;
+		}
+
+		void setIsAggregation(String isa) {
+			this.isAggregation = isa;
+		}
+
+		String getIsAggregation() {
+			return isAggregation;
+		}
+
+		void setInverse(String inv) {
+			this.Inverse = inv;
+		}
+
+		String getInverse() {
+			return Inverse;
+		}
+
+		void setIsFinalType(String isft) {
+			this.isfinaltype = isft;
+		}
+
+		String getIsFinalType() {
+			return this.isfinaltype;
+		}
+
+		String getFrom() {
+			return from;
+		}
+
+		void setFrom(String from) {
+			this.from = from;
+		}
+
+		String getTo() {
+			return to;
+		}
+
+		void setTo(String to) {
+			this.to = to;
+		}
+
+		List getTypes() {
+			return types;
+		}
+
+		void addType(String type) {
+			types.add(type);
+		}
+
+		List getSuperTypes() {
+			return superTypes;
+		}
+
+		void addSupertype(String supertype) {
+			superTypes.add(supertype);
+		}
+
+		String getParent() {
+			return parent;
+		}
+
+		void setParent(String parent) {
+			this.parent = parent;
+		}
+
+		void addChild(String id) {
+			if (containment == null) {
+				containment = new TreeSet<String>();
+			}
+			containment.add(id);
+		}
+
+		public ModelElement(String id, int type) {
+			this.id = id;
+			this.type = type;
+		}
+
+		public int compareTo(Object arg0) {
+			return id.compareTo(((ModelElement) arg0).id);
+		}
+
+		public boolean isAnyFrom() {
+			return isAnyFrom;
+		}
+
+		public void setAnyFrom(boolean isAnyFrom) {
+			this.isAnyFrom = isAnyFrom;
+		}
+
+		public boolean isAnyTo() {
+			return isAnyTo;
+		}
+
+		public void setAnyTo(boolean isAnyTo) {
+			this.isAnyTo = isAnyTo;
+		}
+	}
+
+	/**
+	 * Check the element loaded from vpml file to have all required paramters
+	 * filled
+	 *
+	 */
+	private void checkElement() {
+		if (modelElement.getID() == null) {
+			throw new RuntimeException("no id for element:" + modelElement.name);
+		}
+		// if(modelElement.)

+	}
+
+	/*
+	 * private String ListToString(List<String> l) { StringBuffer ret=new
+	 * StringBuffer(); for(int i=0;i<l.size();++i) {
+	 * ret.append((String)l.get(i)); ret.append(","); } return ret.toString(); }
+	 */
+	private boolean debug = false;
+
+	/**
+	 * When all data is read from the vpml file the currently edited model
+	 * element is put into the mapping that map ID's to elements
+	 */
+	private void closeAndSaveElement() {
+		if (modelElement.getType() == ModelElement.ENTITY) {
+			id2entity.put(modelElement.getID(), modelElement);
+		}
+		id2modelElement.put(modelElement.getID(), modelElement);
+		if (debug) {
+			String[] names = { "entity", "relation", "function" };
+
+			debugMsg("-- new element: " + names[modelElement.getType()]);
+			debugMsg("name: " + modelElement.getName());
+			debugMsg("id: " + modelElement.getID());
+			debugMsg("value: " + modelElement.getValue());
+			debugMsg("parent: " + modelElement.getParent());
+			debugMsg("from: " + modelElement.getFrom());
+			debugMsg("to: " + modelElement.getTo());
+			debugMsg("types: " + ListToString(modelElement.getTypes()));
+			debugMsg("SUPERtypes: "
+					+ ListToString(modelElement.getSuperTypes()));
+		}
+		modelElement = null;
+	}
+
+	private String ListToString(List types) {
+		// TODO Auto-generated method stub

+		return null;
+	}
+
+	private void debugMsg(String string) {
+		// TODO Auto-generated method stub

+
+	}
+
+	/**
+	 * The data of an entity is being read so create a <code>ModelElement</code>
+	 * object that represents an entity
+	 *
+	 * @param id
+	 */
+	private void newEntity(String id) {
+		modelElement = new ModelElement(id, ModelElement.ENTITY);
+	}
+
+	/**
+	 * The data of a relation is being read so create a
+	 * <code>ModelElement</code> object that represents a relation
+	 *
+	 * @param id
+	 */
+	private void newRelation(String id, boolean isAnyFrom, boolean isAnyTo) {
+		modelElement = new ModelElement(id, ModelElement.RELATION);
+		modelElement.setAnyFrom(isAnyFrom);
+		modelElement.setAnyTo(isAnyTo);
+	}
+
+	/**
+	 * The data of a relation is being read so create a
+	 * <code>ModelElement</code> object that represents a relation. For
+	 * compatibility we load old-style function relations too
+	 *
+	 * @param id
+	 */
+	private void newFunction(String id, boolean isAnyFrom, boolean isAnyTo) {
+		modelElement = new ModelElement(id, ModelElement.FUNCTION);
+		modelElement.setMultiplicity("0,-1,0,1");
+		modelElement.setAnyFrom(isAnyFrom);
+		modelElement.setAnyTo(isAnyTo);
+	}
+
+	private void _debugMsg(String str) {
+		if (debug)
+			System.out.println(str);
+	}
+
+	public VPMImporterSaxImpl() {
+		super();
+	}
+
+	public String getName() {
+		return "VPML Importer with SAX technology. Ver 0.1b. Schmidt Andras";
+	}
+
+	public void startDocument() {
+		debugMsg("Start document");
+	}
+
+	public void endDocument() {
+		debugMsg("End document");
+	}
+
+	private final void startElementInModel(String qName, Attributes atts) {
+		if (stateCollection == STATE_COLLECTION_OFF) {
+			if (qName.equals(sENTITIES)) {
+				stateCollection = STATE_COLLECTION_ENTITY;
+			} else if (qName.equals(sRELATIONS)) {
+				stateCollection = STATE_COLLECTION_RELATION;
+			} else if (qName.equals(sFUNCTIONS)) {
+				stateCollection = STATE_COLLECTION_FUNCTION;
+			} else if (qName.equals(sROOTENTITY)) {
+				rootID = atts.getValue(saID);
+			}
+		} else {
+			if (stateElement == STATE_ELEMENT_OFF) {
+				switch (stateCollection) {
+				case STATE_COLLECTION_ENTITY:
+					if (qName.equals(sENTITY)) {
+						newEntity(atts.getValue(saID));
+						stateElement = STATE_ELEMENT_ON;
+					}
+					break;
+				case STATE_COLLECTION_FUNCTION:
+					if (qName.equals(sFUNCTION)) {
+						newFunction(atts.getValue(saID), Boolean
+								.parseBoolean(atts.getValue(saAnyFrom)),
+								Boolean.parseBoolean(atts.getValue(saAnyTo)));
+						stateElement = STATE_ELEMENT_ON;
+					}
+					break;
+				case STATE_COLLECTION_RELATION:
+					if (qName.equals(sRELATION)) {
+						newRelation(atts.getValue(saID), Boolean
+								.parseBoolean(atts.getValue(saAnyFrom)),
+								Boolean.parseBoolean(atts.getValue(saAnyTo)));
+						stateElement = STATE_ELEMENT_ON;
+					}
+					break;
+				}
+			} else {
+				switch (stateField) {
+				case STATE_FIELD_OFF: {
+					if (qName.equals(sTYPE)) {
+						stateField = STATE_FIELD_TYPE;
+					} else if (qName.equals(sSUPERTYPE)) {
+						stateField = STATE_FIELD_SUPERTYPE;
+					} else if (qName.equals(sPARENT)) {
+						stateField = STATE_FIELD_PARENT;
+					} else if (qName.equals(sNAME)) {
+						startCollection();
+						stateField = STATE_FIELD_NAME;
+					} else if (qName.equals(sVALUE)) {
+						startCollection();
+						stateField = STATE_FIELD_VALUE;
+					} else if (qName.equals(sVIEW_INFO)) {
+						startCollection();
+						stateField = STATE_FIELD_VIEW_INFO;
+					} else if (qName.equals(sMULTIPLICITY)) {
+						startCollection();
+						stateField = STATE_FIELD_MULTIPLICITY;
+					} else if (qName.equals(sINVERSE)) {
+						// startCollection();

+						stateField = STATE_FIELD_INVERSE;
+					} else if (qName.equals(sISAGGREGATION)) {
+						startCollection();
+						stateField = STATE_FIELD_ISAGGREGATION;
+					} else if (qName.equals(sISFINALTYPE)) {
+						startCollection();
+						stateField = STATE_FIELD_ISFINALTYPE;
+					} else if (qName.equals(sFROM)) {
+						stateField = STATE_FIELD_FROM;
+					} else if (qName.equals(sTO)) {
+						stateField = STATE_FIELD_TO;
+					}
+					break;
+				}
+				case STATE_FIELD_PARENT: {
+					if (qName.equals(sENTITY)) {
+						modelElement.setParent(atts.getValue(saIDREF));
+						stateParent = STATE_PARENT_ENTITY;
+					}
+					break;
+				}
+				case STATE_FIELD_FROM: {
+					if (qName.equals(sENTITY)) {
+						modelElement.setFrom(atts.getValue(saIDREF));
+						stateParent = STATE_PARENT_ENTITY;
+					}
+					break;
+				}
+				case STATE_FIELD_TO: {
+					if (qName.equals(sENTITY)) {
+						modelElement.setTo(atts.getValue(saIDREF));
+						stateParent = STATE_PARENT_ENTITY;
+					}
+					break;
+				}
+				case STATE_FIELD_INVERSE: {
+					if (qName.equals(sRELATION)) {
+						modelElement.setInverse(atts.getValue(saIDREF));
+						stateParent = STATE_PARENT_ENTITY; // FIXME ez nem jo!

+					}
+					break;
+				}
+				case STATE_FIELD_TYPE: {
+					if (qName.equals(sMODELELEMENT)) {
+						modelElement.addType(atts.getValue(saIDREF));
+						stateModelElement = STATE_MODELELEMENT_ON;
+					} else
+						stateError();
+					break;
+				}
+				case STATE_FIELD_SUPERTYPE: {
+					if (qName.equals(sMODELELEMENT)) {
+						modelElement.addSupertype(atts.getValue(saIDREF));
+						stateModelElement = STATE_MODELELEMENT_ON;
+					} else
+						stateError();
+					break;
+				}
+				}
+
+			}
+		}
+	}
+
+	private void addProperty(Attributes atts) {
+		String name = atts.getValue(sPROPERTY_NAME);
+		String value = atts.getValue(sPROPERTY_VALUE);
+		props.put(name, value);
+		// System.out.println(name+":\""+value+"\"");

+	}
+
+	public void startElement(String uri, String name, String qName,
+			Attributes atts) {
+		if (stateModel == STATE_MODEL_MODEL) {
+			startElementInModel(qName, atts);
+		} else {
+			switch (stateModel) {
+			case STATE_MODEL_OUT: {
+				if (qName.equals(sVPM))
+					stateModel = STATE_MODEL_VPM;
+				break;
+			}
+			case STATE_MODEL_VPM: {
+				if (qName.equals(sMODEL))
+					stateModel = STATE_MODEL_MODEL;
+				if (qName.equals(sPROPERTY))
+					addProperty(atts);
+				break;
+			}
+			}
+		}
+	}
+
+	private void closeCollection() {
+		collectString = false;
+		collectedString.delete(0, collectedString.length());
+	}
+
+	private void startCollection() {
+		collectString = true;
+	}
+
+	/*
+	 * private String getCollectedString() { return collectedString.toString();
+	 * }
+	 */
+	private String getCollectedStringAndClose() {
+		String ret = collectedString.toString();
+		closeCollection();
+		return ret;
+	}
+
+	public void endElement(String uri, String name, String qName) {
+		if (stateField != STATE_FIELD_OFF) {
+			if (stateParent != STATE_PARENT_OFF) {
+				if (qName.equals(sENTITY) || qName.equals(sRELATION)) {
+					stateParent = STATE_PARENT_OFF;
+				} else
+					stateError();
+			} else if (stateModelElement != STATE_MODELELEMENT_OFF) {
+				if (qName.equals(sMODELELEMENT)) {
+					stateModelElement = STATE_MODELELEMENT_OFF;
+				} else
+					stateError();
+			} else {
+				switch (stateField) {
+				case STATE_FIELD_NAME:
+					if (qName.equals(sNAME))
+						modelElement.setName(getCollectedStringAndClose());
+					else
+						stateError();
+					break;
+				case STATE_FIELD_VALUE:
+					if (qName.equals(sVALUE))
+						modelElement.setValue(getCollectedStringAndClose());
+					else
+						stateError();
+					break;
+				case STATE_FIELD_VIEW_INFO:
+					if (qName.equals(sVIEW_INFO))
+						modelElement.setViewInfo(getCollectedStringAndClose());
+					else
+						stateError();
+					break;
+				case STATE_FIELD_MULTIPLICITY:
+					if (qName.equals(sMULTIPLICITY))
+						modelElement
+								.setMultiplicity(getCollectedStringAndClose());
+					else
+						stateError();
+					break;
+				case STATE_FIELD_ISAGGREGATION:
+					if (qName.equals(sISAGGREGATION))
+						modelElement
+								.setIsAggregation(getCollectedStringAndClose());
+					else
+						stateError();
+					break;
+				case STATE_FIELD_ISFINALTYPE:
+					if (qName.equals(sISFINALTYPE))
+						modelElement
+								.setIsFinalType(getCollectedStringAndClose());
+					else
+						stateError();
+					break;
+				case STATE_FIELD_INVERSE:
+					if (!qName.equals(sINVERSE))
+						stateError();
+					break;
+				case STATE_FIELD_TYPE:
+					if (!qName.equals(sTYPE))
+						stateError();
+					break;
+				case STATE_FIELD_SUPERTYPE:
+					if (!qName.equals(sSUPERTYPE))
+						stateError();
+					break;
+				case STATE_FIELD_PARENT:
+					if (!qName.equals(sPARENT))
+						stateError();
+					break;
+				case STATE_FIELD_FROM:
+					if (!qName.equals(sFROM))
+						stateError();
+					break;
+				case STATE_FIELD_TO:
+					if (!qName.equals(sTO))
+						stateError();
+					break;
+				}
+				stateField = STATE_FIELD_OFF;
+			}
+		} else {
+			// We are inside an element's attributes

+			if (stateElement == STATE_ELEMENT_ON) {
+				switch (stateCollection) {
+				case STATE_COLLECTION_ENTITY:
+					if (qName.equals(sENTITY)) {
+						checkElement();
+						closeAndSaveElement();
+					}
+					stateElement = STATE_ELEMENT_OFF;
+					break;
+				case STATE_COLLECTION_RELATION:
+					if (qName.equals(sRELATION)) {
+						checkElement();
+						closeAndSaveElement();
+					}
+					stateElement = STATE_ELEMENT_OFF;
+					break;
+				case STATE_COLLECTION_FUNCTION:
+					if (qName.equals(sFUNCTION)) {
+						checkElement();
+						closeAndSaveElement();
+					}
+					stateElement = STATE_ELEMENT_OFF;
+					break;
+				}
+			}
+			// We are not inside an element's attribute

+			else {
+				if (qName.equals(sENTITIES) || qName.equals(sRELATIONS)
+						|| qName.equals(sFUNCTIONS))
+					stateCollection = STATE_COLLECTION_OFF;
+				if (qName.equals(sMODEL))
+					stateModel = STATE_MODEL_VPM;
+				if (qName.equals(sVPM))
+					stateModel = STATE_MODEL_OUT;
+			}
+		}
+		/*
+		 * if ("".equals(uri)) System.out.println("Start element: " + qName +
+		 * " " + name); else System.out.println("Start element: {" + uri + "}" +
+		 * name);
+		 *
+		 * if ("".equals(uri)) System.out.println("End element: " + qName); else
+		 * System.out.println("End element:   {" + uri + "}" + name);
+		 */
+	}
+
+	private void stateError() {
+		throw new RuntimeException("file format is corrupt");
+		// System.out.println("state error!");

+		// TODO

+	}
+
+	public void characters(char ch[], int start, int length) {
+		if (collectString) {
+			collectedString.append(ch, start, length);
+		}
+	}
+
+	public void warning(SAXParseException e) throws SAXException {
+		throw new SAXException(e.getMessage());
+	}
+
+	public void error(SAXParseException e) throws SAXException {
+		throw new SAXException(e.getMessage());
+	}
+
+	public void fatalError(SAXParseException e) throws SAXException {
+		throw new SAXException(e.getMessage());
+	}
+
+	// class VPMImporterSaxEcxeption extends SAXException

+	/**
+	 * When all data is read from the file build the VPM model
+	 */
+	private void generateModelSpace() throws VPMImporterException {
+		if (rootID == null)
+			throw new VPMImporterException("modelspace must contain root");
+		{
+			// The vpml file does not contain the root entity of the VPM model

+			// So it must be created in the raw VPM model

+			ModelElement rootMeta = new ModelElement(rootID,
+					ModelElement.ENTITY);
+			rootMeta.setName("root");
+			rootMeta.setModelElement(mManager.getRoot());
+			id2entity.put(rootID, rootMeta);
+			id2modelElement.put(rootID, rootMeta);
+		}
+		_debugMsg("building containment tree");
+		// build containment tree

+		Iterator<Entry<String, ModelElement>> it = id2entity.entrySet().iterator();
+		while (it.hasNext()) {
+			ModelElement me = it.next().getValue();
+			String pID = me.getParent();
+			if (pID == null) {
+				if (!me.getID().equals(rootID)) {
+					throw new VPMImporterException(
+							"element must have a parent:" + me.getName()
+									+ " with id:" + me.getID());
+				}
+			} else {
+				ModelElement parent = id2entity.get(pID);
+				if (parent == null) {
+					_debugMsg(pID);
+					// TODO error

+				}
+				parent.addChild(me.getID());
+			}
+		}
+		// start building modelspace

+		try {
+			// creating entitites in containment hierarchy

+			_debugMsg("creating entities");
+			createEntityWithChildren(rootID, null);
+			// creating all relations and functions

+			_debugMsg("creating relations");
+			it = id2modelElement.entrySet().iterator();
+			IEntity root = mManager.getRoot();
+			while (it.hasNext()) {
+				ModelElement me = it.next().getValue();
+				int type = me.getType();
+				if (type != ModelElement.ENTITY) {
+					IRelation newRel = null;
+					if (type == ModelElement.RELATION)
+						newRel = mManager.newRelation(root, root);
+					else
+						newRel = mManager.newRelation(root, root);
+					mManager.setViewInfo(newRel, me.getViewInfo());
+					// added by Istvan Rath

+					mManager.setIsFinalType(newRel, "true".equalsIgnoreCase(me
+							.getIsFinalType()));
+					me.setModelElement(newRel);
+				}
+			}
+			_debugMsg("setting function, and relation from and to places");
+			it = id2modelElement.entrySet().iterator();
+			while (it.hasNext()) {
+				ModelElement me = it.next().getValue();
+				int type = me.getType();
+				if (type != ModelElement.ENTITY) {
+					IRelation newRel = (IRelation) me.getModelElement();
+					IModelElement from = id2modelElement
+							.get(me.getFrom()).getModelElement();
+					IModelElement to = id2modelElement
+							.get(me.getTo()).getModelElement();
+					mManager.setRelationFrom(newRel, from);
+					mManager.setRelationTo(newRel, to);
+					mManager.setIsAnyFrom(newRel, me.isAnyFrom);
+					mManager.setIsAnyTo(newRel, me.isAnyTo);
+					mManager.setName(newRel, me.getName());
+					if (me.getMultiplicity() != null) {
+						/*
+						 * StringTokenizer tok=new
+						 * StringTokenizer(me.getMultiplicity(),","); int
+						 * fromMin=Integer.parseInt(tok.nextToken()); int
+						 * fromMax=Integer.parseInt(tok.nextToken()); int
+						 * toMin=Integer.parseInt(tok.nextToken()); int
+						 * toMax=Integer.parseInt(tok.nextToken());
+						 */
+						if (me.getMultiplicity().equals(
+								EMultiplicityKind.MANY_TO_MANY.toString())) {
+							mManager.setRelationMultiplicity(newRel,
+									EMultiplicityKind.MANY_TO_MANY);
+						} else if (me.getMultiplicity().equals(
+								EMultiplicityKind.ONE_TO_MANY.toString())) {
+							mManager.setRelationMultiplicity(newRel,
+									EMultiplicityKind.ONE_TO_MANY);
+						} else if (me.getMultiplicity().equals(
+								EMultiplicityKind.MANY_TO_ONE.toString())) {
+							mManager.setRelationMultiplicity(newRel,
+									EMultiplicityKind.MANY_TO_ONE);
+						} else if (me.getMultiplicity().equals(
+								EMultiplicityKind.ONE_TO_ONE.toString())) {
+							mManager.setRelationMultiplicity(newRel,
+									EMultiplicityKind.ONE_TO_ONE);
+						}
+					}
+					if (me.getIsAggregation() != null
+							&& me.getIsAggregation().equalsIgnoreCase("true"))
+						mManager.setRelationIsAggregation(newRel, true);
+					if (me.getInverse() != null) {
+						ModelElement m = id2modelElement.get(me.getInverse());
+						if (m != null) {
+							IRelation inv = (IRelation) m.getModelElement();
+							mManager.setRelationInverse(newRel, inv);
+						}
+					}
+					if (!newRel.getName().equals(me.getName())) {
+						// Name clash with uniquenames already in modelspace.

+						IModelElement par = newRel.getNamespace();
+						IModelElement clasher = par
+								.getElementInNamespaceByName(me.getName());
+						mManager.setName(clasher, clasher.getName() + "!");
+						mManager.setName(newRel, me.getName());
+					}
+				}
+			}
+			_debugMsg("creating type relations between elements, setting names of relations");
+			// Go through entities, relations and functions again. Now all
+			// elements exist in modelspace

+			// so we can mark instanceof and supertypeof relations between them.

+			it = id2modelElement.entrySet().iterator();
+			while (it.hasNext()) {
+				ModelElement modE = it.next().getValue();
+				IModelElement me = modE.getModelElement();
+				List list = null;
+				for (int j = 0; j < 2; ++j) {
+					if (j == 0)
+						list = modE.getTypes();
+					else
+						list = modE.getSuperTypes();
+					for (int i = 0; i < list.size(); ++i) {
+						String parID = (String) list.get(i);
+						IModelElement type = id2modelElement
+								.get(parID).getModelElement();
+						String msg = null;
+						if (j == 0)
+							try {
+								mManager.newInstanceOfEditor(type, me);
+							} catch (VPMCoreException e) {
+								mManager.newInstanceOfMachine(type, me);
+								msg = e.getMessage();
+							}
+						else
+							try {
+								mManager.newSupertypeOfEditor(type, me);
+							} catch (VPMCoreException e) {
+								mManager.newSupertypeOfMachine(type, me);
+								msg = e.getMessage();
+							}
+						if (msg != null) {
+							_debugMsg(msg);
+						}
+					}
+				}
+			}
+		} catch (VPMCoreException e) {
+			e.printStackTrace();
+			// TODO

+		}
+	}
+
+	private void createEntityWithChildren(String id, IEntity parent)
+			throws VPMCoreException {
+		ModelElement me = id2entity.get(id);
+		IEntity newEnt = null;
+		if (!id.equals(rootID)) {
+			newEnt = mManager.newEntity(me.getName(), me.getValue(), parent);
+		} else {
+			newEnt = mManager.getRoot();
+		}
+		mManager.setViewInfo(newEnt, me.getViewInfo());
+		// added by Istvan Rath

+		mManager.setIsFinalType(newEnt, "true".equalsIgnoreCase(me
+				.getIsFinalType()));
+		me.setModelElement(newEnt);
+		if (me.containment != null) {
+			Iterator<String> it = me.containment.iterator();
+			while (it.hasNext()) {
+				String idChild = it.next();
+				createEntityWithChildren(idChild, newEnt);
+			}
+		}
+	}
+
+	class VPMImporterException extends VPMRuntimeException {
+		private static final long serialVersionUID = 1L;
+
+		public VPMImporterException(String msg) {
+			super(msg);
+		}
+	}
+
+	IModelManager mManager;
+
+	IModelSpace modelSpace;
+
+	VPMProperties vprops;
+
+	Properties props;
+
+	private long timeInMillis;
+
+	public IModelSpace process(InputStream f, IModelSpace ms,
+			VPMProperties props) throws VPMRuntimeException {
+		_debugMsg("Loading modelspace starts at:"
+				+ (timeInMillis = System.currentTimeMillis()));
+		modelSpace = ms;
+		this.vprops = props;
+		this.props = new Properties();
+		mManager = ms.getModelManager();
+		try {
+			SAXParser sp = SAXParserFactory.newInstance().newSAXParser();
+			// Build raw model of the VPM model

+			sp.parse(f, this);
+			// Build the VPM model

+			generateModelSpace();
+			// propagate properties to the given VPM properties object

+			vprops.loadFromJavaProperties(this.props);
+		} catch (Exception e) {
+			e.printStackTrace();
+			throw new VPMRuntimeException("Error loading model", e);
+		}
+		long endTime = System.currentTimeMillis();
+		_debugMsg("Loading modelspace ended at:" + endTime + " finished in: "
+				+ (endTime - timeInMillis) + " millis");
+		return modelSpace;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/IProgressReport.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/IProgressReport.java
new file mode 100644
index 0000000..667e0ac
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/IProgressReport.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.interpreters;
+
+/**
+ * Callback interface for reporting interpretation progress.
+ * 
+ * @author istvan rath
+ * 
+ */
+public interface IProgressReport {
+
+	/**
+	 * Reports intrepretation progress.
+	 * 
+	 * @param indicator
+	 *            indicates the amount of elementary ticks the interpretation
+	 *            process has progressed since the last call.
+	 */
+	public void progress(int indicator);
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/ModelInterpreter.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/ModelInterpreter.java
new file mode 100644
index 0000000..f279f82
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/ModelInterpreter.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.interpreters;
+
+import java.util.Map;
+
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.IFramework;
+
+/**
+ * @author Istvan Rath
+ * 
+ */
+public interface ModelInterpreter {
+	/**
+	 * Runs the machine or rule, which is represented by the passed object.
+	 * 
+	 * @param fw
+	 *            Framework of VPM modeling
+	 * @param machineOrRule
+	 *            machine or rule object to be run (should represent a model of a
+	 *            program/rule that can be interpreted by the interpreter.)
+	 * @param parameters
+	 *            mapping from parameter names to parameter values. The types of
+	 *            acceptable parameters are determined by the concrete
+	 *            interpreter.
+	 * @param pr
+	 *            the progress report callback
+	 * @throws VPMRuntimeException
+	 */
+	public void run(IFramework fw, Object machineOrRule, Map<String, Object> parameters,
+			IProgressReport pr) throws VPMRuntimeException;
+
+	/**
+	 * Returns the parameter names of the given program
+	 * 
+	 * @param fw
+	 *            Framework of VPM modeling
+	 * @param machineOrRule
+	 *            machine or rule to be asked (should represent a model of a program/rule
+	 *            that can be interpreted by the interpreter.
+	 * @return array of parameter names
+	 * @throws VPMRuntimeException
+	 */
+	public String[] getParameters(IFramework fw, Object machineOrRule)
+			throws VPMRuntimeException;
+
+	/**
+	 * Returns whether the given machine instance can be runned by this
+	 * interpreter.
+	 * 
+	 * @param machineOrRule
+	 * @param fw
+	 * @return
+	 */
+	public boolean isRunnable(Object machineOrRule, IFramework fw);
+

+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/ModelInterpreterFactory.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/ModelInterpreterFactory.java
new file mode 100644
index 0000000..43f83b4
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/ModelInterpreterFactory.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.interpreters;
+
+/**
+ * Describes a model interpreter factory, a stub capable of instantiating a
+ * given type of interpreter for the Viatra2 framework.
+ * 
+ * @author Istvan Rath
+ * 
+ */
+public interface ModelInterpreterFactory {
+
+	/**
+	 * The unique ID of the interpreter.
+	 */
+	public String getId();
+
+	/**
+	 * The name of the interpreter.
+	 */
+	public String getName();
+
+	/**
+	 * The textual description of the interpreter.
+	 */
+	public String getDescription();
+
+	/**
+	 * Instantiates the interpreter type associated to this factory.
+	 * 
+	 */
+	public ModelInterpreter getInterpreter();
+
+	/**
+	 * The fully qualified Java class names of objects which this interpreter
+	 * can handle.
+	 */
+	public String[] getInterpretedClasses();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/debugInterface/IASMFunctions.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/debugInterface/IASMFunctions.java
new file mode 100644
index 0000000..1d972fa
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/debugInterface/IASMFunctions.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.interpreters.debugInterface;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public interface IASMFunctions {
+	/**
+	 * Returns the names of all functions available.
+	 * 
+	 * @return
+	 */
+	Set getFunctions();
+
+	/**
+	 * get the value set for the function at location.
+	 * 
+	 * @param fun
+	 *            name of function
+	 * @param loc
+	 *            location to get
+	 * @return null if UNDEF, the value otherwise
+	 */
+	Object getFunctionValue(String fun, List loc);
+
+	/**
+	 * Sets the value for the function fun
+	 * 
+	 * @param fun
+	 *            name of function.
+	 * @param loc
+	 *            location in the function.
+	 * @param val
+	 *            value to be set.
+	 */
+	void setFunctionValue(String fun, List loc, Object val);
+
+	/**
+	 * Add a new function
+	 * 
+	 * @param fun
+	 *            name of new function.
+	 * @param n
+	 *            arity of new function.
+	 */
+	void addFunction(String fun, int n);
+
+	// ASMFunction getFunction(String name);

+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/debugInterface/IncorrectValueException.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/debugInterface/IncorrectValueException.java
new file mode 100644
index 0000000..c7d1f9c
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/debugInterface/IncorrectValueException.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.interpreters.debugInterface;
+
+/**
+ * This exception is thrown by the debug interface if an incorrect value is to
+ * be set as a parameter of the process or the thread (eg a varaible bound to a
+ * List class)
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public class IncorrectValueException extends Exception {
+
+	/**

+	 * 

+	 */
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/debugInterface/NotSupportedException.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/debugInterface/NotSupportedException.java
new file mode 100644
index 0000000..da64e33
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/debugInterface/NotSupportedException.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.interpreters.debugInterface;
+
+/**
+ * This exception is thrown, when a not supported feature is called on the
+ * debugger interface of a machine.
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public class NotSupportedException extends Exception {
+
+	/**

+	 * 

+	 */
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/debugInterface/RunningProcess.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/debugInterface/RunningProcess.java
new file mode 100644
index 0000000..5a10b07
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/debugInterface/RunningProcess.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.interpreters.debugInterface;
+
+/**
+ * This interface represents a running instance of a machine. Debugger should
+ * use this interface to start stop, and monitor the process. State get and
+ * state set methods should only be used, when in stopped state. All threads are
+ * in the same state as the process state.
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public interface RunningProcess {
+	/**
+	 * Means that the macine is being inited before running the first rule.
+	 */
+	public static int STATE_INIT = 3;
+
+	/**
+	 * Means that the machine is running
+	 */
+	public static int STATE_RUNNING = 0;
+
+	/**
+	 * Means that the machine is going to stop at the next consistent breakpoint
+	 * state.
+	 */
+	public static int STATE_STOPPING = 1;
+
+	/**
+	 * Means that the machine is stopped.
+	 */
+	public static int STATE_STOPPED = 2;
+
+	/**
+	 * Means that the machine is ready (runned normally or exited with
+	 * exception)
+	 */
+	public static int STATE_READY = 4;
+
+	public int getState();
+
+	/**
+	 * Use in running state: the machine goes to stopping state so it will stop
+	 * as soon as possible.
+	 * 
+	 */
+	public void stop();
+
+	/**
+	 * Use in stopped state: the machine goes to running state.
+	 * 
+	 */
+	public void start();
+
+	/**
+	 * Terminate the process. Stops and then goes to ready state.
+	 * 
+	 */
+	public void terminate() throws NotSupportedException;
+
+	/**
+	 * Add a listener to the process.
+	 * 
+	 * @param listener
+	 */
+	public void addListener(RunningProcessListener listener);
+
+	/**
+	 * Remove a listener from the process.
+	 * 
+	 * @param listener
+	 */
+	public void removeListener(RunningProcessListener listener);
+
+	/**
+	 * Return the threads of the process.
+	 * 
+	 * @return
+	 */
+	public RunningThread[] getThreads();
+
+	public Exception getException();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/debugInterface/RunningProcessListener.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/debugInterface/RunningProcessListener.java
new file mode 100644
index 0000000..3d28f7e
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/debugInterface/RunningProcessListener.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.interpreters.debugInterface;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public interface RunningProcessListener {
+	/**
+	 * Called when process starts either from init or from stopped state.
+	 * 
+	 * @param p
+	 */
+	public void processStarts(RunningProcess p);
+
+	/**
+	 * Called when process stops eiter to stopped or to ready state.
+	 * 
+	 * @param p
+	 */
+	public void processStops(RunningProcess p);
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/debugInterface/RunningThread.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/debugInterface/RunningThread.java
new file mode 100644
index 0000000..987310d
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/interpreters/debugInterface/RunningThread.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.interpreters.debugInterface;
+
+import java.util.Map;
+
+/**
+ * @author Andras Schmidt
+ *
+ */
+public interface RunningThread {
+	/**
+	 * Returns the local variable bindings.
+	 *
+	 * @return mapping from variable name (String) to value (Object: Integer,
+	 *         Double, String, null, IModelElement)
+	 * @throws NotSupportedException
+	 */
+	Map<String, Object> getLocalVariables() throws NotSupportedException;
+
+	/**
+	 * Sets the local variable bindings. Parameter must be the same as
+	 * getLocalVariables returns.
+	 * @param bindings
+	 *
+	 * @throws NotSupportedException
+	 */
+	void setLocalVariables(Map<String, Object> bindings) throws NotSupportedException;
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/loaders/Loader.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/loaders/Loader.java
new file mode 100644
index 0000000..672c65a
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/loaders/Loader.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.loaders;
+
+import java.io.InputStream;
+
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.IFramework;
+
+/**
+ * Interface to modules which load program models into a framework's machine
+ * model storage
+ * 
+ * @author Istvan Rath
+ */
+public interface Loader {
+
+	/**
+	 * Processes the given file. It is the Loader's responsibility to add the
+	 * resulting program model instance to the Framework's program model
+	 * registry using the appropriate FQN.
+	 * 
+	 * @param fileName
+	 *            File name
+	 * @param fw
+	 *            The current framework
+	 * @return 
+	 *            The added program model instance
+	 * @throws VPMRuntimeException
+	 */
+	public Object processFile(String fileName, IFramework fw)
+			throws VPMRuntimeException;
+
+	/**
+	 * Processes the given stream It is the Loader's responsibility to add the
+	 * resulting program model instance to the Framework's program model
+	 * registry using the appropriate FQN.
+	 * 
+	 * @param f
+	 *            stream to process
+	 * @param fw
+	 *            The current framework
+	 * @return 
+	 * 			The added program model instance
+	 * @throws VPMRuntimeException
+	 */
+	public Object process(InputStream f, IFramework fw)
+			throws VPMRuntimeException;
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/loaders/Loader2.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/loaders/Loader2.java
new file mode 100644
index 0000000..e22ea59
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/loaders/Loader2.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.loaders;
+
+import java.io.InputStream;
+
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.IFramework;
+
+/**
+ * Interface to modules which load program models into a framework's machine
+ * model storage
+ * 
+ * @author Istvan Rath
+ */
+public interface Loader2 extends Loader {
+
+	/**
+	 * Processes the given resource identified by the URI. It is the Loader's responsibility to add the
+	 * resulting program model instance to the Framework's program model
+	 * registry using the appropriate FQN.
+	 * 
+	 * @param URI
+	 *            Resource URI
+	 * @param fw
+	 *            The current framework
+	 * @return 
+	 *            The added program model instance
+	 * @throws VPMRuntimeException
+	 */
+	public Object processURI(String URI, IFramework fw)
+			throws VPMRuntimeException;
+
+
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/loaders/LoaderFactory.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/loaders/LoaderFactory.java
new file mode 100644
index 0000000..5338c2b
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/loaders/LoaderFactory.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.loaders;
+
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+
+/**
+ * Interface of loader creator classes.
+ * 
+ * @author Istvan Rath
+ * 
+ */
+public interface LoaderFactory {
+
+	/**
+	 * Descriptive name of loader.
+	 * 
+	 * @return
+	 */
+	public String getLoaderName();
+
+	/**
+	 * Initialise the loader.
+	 * 
+	 * @param f
+	 * @return
+	 * @throws VPMRuntimeException
+	 */
+	public Loader getLoaderInstance() throws VPMRuntimeException;
+
+	/**
+	 * Returns a preferred id for the given loader.
+	 * 
+	 * @return
+	 */
+	public String getId();
+
+	/**
+	 * Get the set of file extensions that are handled by this loader.
+	 * 
+	 * @return the set of file extensions that are handled by this loader
+	 */
+	public String[] getFileExtensionList();
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/logger/EclipseLogger.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/logger/EclipseLogger.java
new file mode 100644
index 0000000..de21947
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/logger/EclipseLogger.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.logger;
+
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.viatra2.framework.properties.VPMProperties;
+
+/**
+ * @author Andras Balogh
+ * 
+ *         Viatra 2 Framework
+ * 
+ *         This logger implementation support the Eclipse integration, and a
+ *         native Viatra logger at the same time. The error, warning and info
+ *         messages are also logged to the Eclipse log, and all messages are
+ *         logged to the native logger according to the log level settings.
+ */
+public class EclipseLogger implements Logger {
+
+	public EclipseLogger(ILog eclipse_log) {
+		elog = eclipse_log;
+	}
+
+	ILog elog;
+
+	public void setLevel(int l) {
+	}
+
+	public void warning(String s) {
+		message(Logger.WARNING, s);
+	}
+
+	public void error(String s) {
+		message(Logger.ERROR, s);
+	}
+
+	public void debug(String s) {
+		message(Logger.DEBUG, s);
+	}
+
+	public void fatal(String s) {
+		message(Logger.FATAL, s);
+	}
+
+	public void info(String s) {
+		message(Logger.INFO, s);
+	}
+
+	public void init(VPMProperties p) {
+	}
+
+	public void message(int level, String msg, Throwable cause) {
+		int eclLevel = 0;
+		switch (level) {
+		case Logger.WARNING:
+			eclLevel = Status.WARNING;
+			//break; // warnings should be checked in the console

+			return;
+		case Logger.DEBUG:
+			return;
+		case Logger.ERROR:
+			eclLevel = Status.ERROR;
+			break;
+		case Logger.INFO:
+			eclLevel = Status.INFO;
+			// break;

+			return;
+		case Logger.FATAL:
+			eclLevel = Status.ERROR;
+			break;
+		}
+		IStatus ss = new Status(eclLevel, "VIATRA2", 1, msg, cause);
+		elog.log(ss);
+	}
+
+	public void message(int level, String msg) {
+		message(level, msg, null);
+	}
+
+	public void printStackTrace(Throwable t) {
+		elog.log(new Status(Status.ERROR, "VIATRA2", 1, "VIATRA2 exception stack trace", t));
+		
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/logger/Logger.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/logger/Logger.java
new file mode 100644
index 0000000..abd736c
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/logger/Logger.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.logger;
+
+import org.eclipse.viatra2.framework.properties.VPMProperties;
+
+/**
+ * Logger class interface.
+ * 
+ * @author Andras Balogh
+ */
+public interface Logger {
+
+	public static final int FATAL = 0;
+
+	public static final int ERROR = 1;
+
+	public static final int WARNING = 2;
+
+	public static final int INFO = 3;
+
+	public static final int DEBUG = 4;
+
+	public static final int ALL = 4;
+
+	public static String[] levelnames = { "fatal", "error", "warning", "info",
+			"debug" };
+
+	/**
+	 * Sets the log level.
+	 * 
+	 * @param l
+	 *            the new log level.
+	 */
+	public void setLevel(int l);
+
+	public void message(int level, String msg, Throwable cause);
+
+	public void message(int level, String msg);
+
+	public void debug(String s);
+
+	public void warning(String s);
+
+	public void error(String s);
+
+	public void fatal(String s);
+
+	public void info(String s);
+
+	public void init(VPMProperties p);
+	
+	public void printStackTrace(Throwable t);
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/logger/LoggerFactory.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/logger/LoggerFactory.java
new file mode 100644
index 0000000..214509d
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/logger/LoggerFactory.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.logger;
+
+/**
+ * Describes a factory class capable of instantiating a logger.
+ * 
+ * @author Istvan Rath
+ * 
+ */
+public interface LoggerFactory {
+	/**
+	 * The id of the logger.
+	 */
+	public String loggerId();
+
+	/**
+	 * The name of the logger.
+	 */
+	public String loggerName();
+
+	/**
+	 * The textual description of the logger.
+	 */
+	public String loggerDescription();
+
+	/**
+	 * The logger instance.
+	 */
+	public Logger getLogger();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/logger/SimpleLogger.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/logger/SimpleLogger.java
new file mode 100644
index 0000000..b0a3538
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/logger/SimpleLogger.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.logger;
+
+/**
+ * @author Istvan Rath
+ *
+ */
+
+import java.io.FileOutputStream;
+import java.io.PrintStream;
+
+import org.eclipse.viatra2.framework.properties.VPMProperties;
+
+public class SimpleLogger implements Logger {
+
+	PrintStream out;
+
+	public SimpleLogger() {
+		out = System.out;
+	}
+
+	int level = 100;
+
+	public void setLevel(int l) {
+		level = l;
+	}
+
+	public void warning(String s) {
+		message(Logger.WARNING, s);
+	}
+
+	public void error(String s) {
+		message(Logger.ERROR, s);
+	}
+
+	public void debug(String s) {
+		message(Logger.DEBUG, s);
+	}
+
+	public void fatal(String s) {
+		message(Logger.FATAL, s);
+	}
+
+	public void info(String s) {
+		message(Logger.INFO, s);
+	}
+
+	public void init(VPMProperties props) {
+
+		try {
+			String outs = props.getRuntimeProperty("log", "output");
+			if ( outs == null || outs.equals("screen") || outs.equals("") ) 
+				out = System.out;
+			else
+				out = new PrintStream(new FileOutputStream(outs));
+		} catch (Exception ex) {
+			System.out.println("Couldn't initialize logger.");
+			System.out.println("Stopping VPM session.");
+			System.exit(1);
+		}
+	}
+
+	public void message(int level, String msg, Throwable cause) {
+		if (this.level >= level) {
+			out.println("[" + Logger.levelnames[level] + "] " + msg);
+			if (cause != null) {
+				out.println("[" + Logger.levelnames[level]
+						+ "] Exception stack trace follows:");
+				cause.printStackTrace();
+			}
+		}
+	}
+
+	public void message(int level, String msg) {
+		message(level, msg, null);
+	}
+
+	public void printStackTrace(Throwable t) {
+		System.out.println("[exception track trace]");
+		t.printStackTrace();
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/logger/SimpleLoggerFactory.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/logger/SimpleLoggerFactory.java
new file mode 100644
index 0000000..a1ba932
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/logger/SimpleLoggerFactory.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.logger;
+
+// fqn: org.eclipse.viatra2.logger.SimpleLoggerFactory
+
+/**
+ * This class implements a factory for the simple, standard output logger.
+ */
+public class SimpleLoggerFactory implements LoggerFactory {
+	public String loggerId() {
+		return "simple";
+	}
+
+	public String loggerName() {
+		return "simple logger";
+	}
+
+	public String loggerDescription() {
+		return "logs events on the standard console";
+	}
+
+	public Logger getLogger() {
+		return new SimpleLogger();
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/merger/Merger.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/merger/Merger.java
new file mode 100644
index 0000000..08707b1
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/merger/Merger.java
@@ -0,0 +1,266 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.merger;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.errors.VPMCoreException;
+
+/**
+ * Low level model merge. Merges the two modelspaces: Elements with same fqn and
+ * type (relation or entity) are treated as same elements
+ *
+ * Modify on 2007/10/29: - correct multiplicity and other metaproperty transfers
+ *
+ * @author Andras Schmidt, Istvan Rath
+ */
+public class Merger {
+
+	IModelManager leftManager;
+
+	IModelManager rightManager;
+
+	Collection<IRelation> newlyCreatedRelations = new TreeSet<IRelation>();
+
+	/**
+	 * Maps fully qualified names of left model to the new fully qualified name
+	 * in right model. Only those modelelements are mapped, which had its name
+	 * changed. With the use of this map we can find the equivalent element of
+	 * all left side elements in the merged right side.
+	 */
+	Map<String, String> mapFqn = new TreeMap<String, String>();
+
+	/**
+	 * Merges the two models. Merged model will be in rightModel. All conflicts
+	 * will be resolved in a way, that the one in rightModel will be used.
+	 *
+	 * @param leftModel
+	 * @param rightModel
+	 * @throws VPMMergeException
+	 */
+	public void merge(IModelSpace leftModel, IModelSpace rightModel)
+			throws VPMMergeException {
+		try {
+			// Create entities new in newmodel

+			leftManager = leftModel.getModelManager();
+			rightManager = rightModel.getModelManager();
+			IEntity leftRoot = leftManager.getRoot();
+			IEntity rightRoot = rightManager.getRoot();
+			// browse the element hierarchy in both models in the same order.
+			// When an element does not exist in

+			// new model (right) but exists in left model, then create it. When
+			// element exists just map it.

+			mergeElementsInBaranch(leftRoot, rightRoot);
+			// New relations are creatred with default target set. Set the
+			// target to the equivalent of left side

+			// model target

+			setNewRelationsTarget();
+			// Merge the type hierarchy

+			mergeTypes();
+		} catch (VPMCoreException e) {
+			// TODO Auto-generated catch block

+			e.printStackTrace();
+			VPMMergeException toThrow = new VPMMergeException(
+					"Core threw while merging (internal error):"
+							+ e.getMessage());
+			toThrow.initCause(e);
+			throw toThrow;
+		} catch (RuntimeException e) {
+			e.printStackTrace();
+			VPMMergeException toThrow = new VPMMergeException(
+					"Runtime exception while merging (internal error)");
+			toThrow.initCause(e);
+			throw toThrow;
+		} finally {
+			leftManager = null;
+			rightManager = null;
+		}
+	}
+
+	/**
+	 * After creating or mapping all elements from left to right side create all
+	 * new type relationships. Iterates through all elements in left side, finds
+	 * its right side equivalent and sets all non existing type relations.
+	 *
+	 * @throws VPMCoreException
+	 */
+	private void mergeTypes() throws VPMCoreException {
+		for (int i = 0; i < 2; ++i) {
+			Iterator<? extends IModelElement> it;
+			if (i == 0) {
+				it = leftManager.getEntities().iterator();
+			} else {
+				it = leftManager.getRelations().iterator();
+			}
+			while (it.hasNext()) {
+				IModelElement left = it.next();
+				IModelElement right = leftModelElement2RightModelElement(left);
+				if (right != null)
+					mergeTypes(left, right);
+			}
+		}
+	}
+
+	/**
+	 * After creating or mapping all elements from left to right side create all
+	 * new type relationships
+	 *
+	 * @param left
+	 *            the modelelement in left side (origin of right side element)
+	 * @param right
+	 *            the modelement in right side whose types must be set
+	 * @throws VPMCoreException
+	 */
+	private void mergeTypes(IModelElement left, IModelElement right)
+			throws VPMCoreException {
+		for (Iterator<IModelElement> it = left.getTypes().iterator(); it.hasNext();) {
+			IModelElement leftType = it.next();
+			IModelElement rightType = leftModelElement2RightModelElement(leftType);
+			if (!right.isInstanceOf(rightType)) {
+				rightManager.newInstanceOfMachine(rightType, right);
+			}
+		}
+		for (Iterator<IModelElement> it = left.getSupertypes().iterator(); it.hasNext();) {
+			IModelElement leftType = it.next();
+			IModelElement rightType = leftModelElement2RightModelElement(leftType);
+			if (!right.isInstanceOf(rightType)) {
+				rightManager.newSupertypeOfMachine(rightType, right);
+			}
+		}
+	}
+
+	/**
+	 * New relations (not existant in right side model) to side are set after
+	 * creating or mapping all elements in left side model to right side model.
+	 *
+	 * @throws VPMCoreException
+	 */
+	private void setNewRelationsTarget() throws VPMCoreException {
+		for (IRelation rel : newlyCreatedRelations) {
+			IRelation rightRel = (IRelation) leftModelElement2RightModelElement(rel);
+			IModelElement tg = rel.getTo();
+			IModelElement rightTg = leftModelElement2RightModelElement(tg);
+			rightManager.setRelationTo(rightRel, rightTg);
+		}
+	}
+
+	/**
+	 * Find the element in right side model, whose origin is lMe in left side
+	 * model.
+	 *
+	 * @param lMe
+	 * @return
+	 */
+	private IModelElement leftModelElement2RightModelElement(IModelElement lMe) {
+		String fqn = lMe.getFullyQualifiedName();
+		String mapName = mapFqn.get(fqn);
+		if (mapName == null) {
+			mapName = fqn;
+		}
+		IModelElement ret = rightManager.getElementByName(mapName);
+		return ret;
+	}
+
+	/**
+	 * Merge all elements in namespace of leftEntity with elements in namespace
+	 * of rightEntity
+	 *
+	 * @param leftEntity
+	 * @param rightEntity
+	 * @throws VPMCoreException
+	 */
+	private void mergeElementsInBaranch(IModelElement leftEntity,
+			IModelElement rightEntity) throws VPMCoreException {
+		Iterator<IModelElement> it = leftEntity.getElementsInNamespace().iterator();
+		while (it.hasNext()) {
+			IModelElement leftMe = it.next();
+			IModelElement rightMe = rightEntity
+					.getElementInNamespaceByName(leftMe.getName());
+			if (rightMe != null && getType(rightMe) == getType(leftMe)) {
+				// They are the same go on with children

+				mergeElementsInBaranch(leftMe, rightMe);
+			} else {
+				// There is no such entity in left side, go on and create it

+				createElementsInBranch(leftMe, rightEntity);
+				// IEntity
+				// right=rightManager.newEntity(left.getName(),left.getValue
+				// (),rightEntity);

+			}
+		}
+	}
+
+	/**
+	 * We are in namespace rightEntity and we have to create leftContent in this
+	 * element with all its children.
+	 *
+	 * @param leftEntity
+	 * @param rightEntity
+	 * @throws VPMCoreException
+	 */
+	private void createElementsInBranch(IModelElement leftContent,
+			IModelElement rightEntity) throws VPMCoreException {
+		IModelElement right = null;
+		if (getType(leftContent) == ENT) {
+			right = rightManager.newEntity(leftContent.getName(),
+					((IEntity) leftContent).getValue(), (IEntity) rightEntity);
+		} else {
+			right = rightManager.newRelation(leftContent.getName(),
+					rightEntity, rightEntity);
+
+			// fix by Istvan

+			// set various properties

+			rightManager.setRelationMultiplicity((IRelation) right,
+					((IRelation) leftContent).getMultiplicity());
+			rightManager.setRelationIsAggregation((IRelation) right,
+					((IRelation) leftContent).getIsAggregation());
+			// TODO set inverse -- required a second pass probably

+
+			newlyCreatedRelations.add((IRelation) leftContent);
+		}
+		rightManager.setViewInfo(right, leftContent.getViewInfo());
+
+		// fix by Istvan

+		rightManager.setIsFinalType(right, leftContent.getIsFinalType());
+
+		if (!right.getFullyQualifiedName().equals(
+				leftContent.getFullyQualifiedName())) {
+			mapFqn.put(leftContent.getFullyQualifiedName(), right
+					.getFullyQualifiedName());
+		}
+		for (Iterator<IModelElement> it = leftContent.getElementsInNamespace().iterator(); it
+				.hasNext();) {
+			IModelElement left = it.next();
+			createElementsInBranch(left, right);
+		}
+	}
+
+	private static final int ENT = 0;
+
+	private static final int REL = 1;
+
+	private int getType(IModelElement me) {
+		if (me instanceof IEntity)
+			return ENT;
+		if (me instanceof IRelation)
+			return REL;
+		return -1;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/merger/VPMMergeException.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/merger/VPMMergeException.java
new file mode 100644
index 0000000..353f684
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/merger/VPMMergeException.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.merger;
+
+/**
+ * @author Andras Schmidt
+ * 
+ */
+public class VPMMergeException extends Exception {
+	/**

+	 * 

+	 */
+	private static final long serialVersionUID = 1L;
+
+	VPMMergeException(String msg) {
+		super(msg);
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/EProblemType.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/EProblemType.java
new file mode 100644
index 0000000..2cef87c
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/EProblemType.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.modelChecker;
+
+public enum EProblemType {
+	/**
+	 * The source end of the relation is not properly typed
+	 */
+	INVALID_RELATION_SOURCE_TYPE,
+	/**
+	 * The target end of the relation is not properly typed
+	 */
+	INVALID_RELATION_TARGET_TYPE,
+	/**
+	 * Relation is an aggregation relation but the source is not parent of
+	 * target.
+	 */
+	AGGREGATION_INVALID,
+
+	/**
+	 * The source end of the relation is invalid
+	 */
+	INVALID_RELATION_SOURCE,
+
+	/**
+	 * The target end of the relation is invalid
+	 */
+	INVALID_RELATION_TARGET,
+
+	/**
+	 * Multiplicity refinement is invalid
+	 */
+	MULTIPLICITY_REFINEMENT_INVALID,
+	/**
+	 * Aggregation refinement is invalid
+	 */
+	AGGREGATION_REFINEMENT_INVALID,
+	/**
+	 * Multiplicity constraint of the relation is violated by outgoing relations
+	 */
+	OUTGOING_MULTIPLICITY_CONSTRAINT_VIOLATED,
+	/**
+	 * Multiplicity constraint of the relation is violated by incoming relations
+	 */
+	INCOMING_MULTIPLICITY_CONSTRAINT_VIOLATED,
+
+	/**
+	 * An invalid refinement between a relation and an entity
+	 */
+	INVALID_REFINEMENT,	
+	/**
+	 * The source end of a relation is not properly refined
+	 */
+	INVALID_REFINEMENT_SOURCE_TYPE,
+	/**
+	 * The target end of a relation is not properly refined
+	 */
+	INVALID_REFINEMENT_TARGET_TYPE,
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/IProblem.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/IProblem.java
new file mode 100644
index 0000000..9669645
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/IProblem.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.modelChecker;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.tags.ITag;
+
+public interface IProblem extends ITag
+{
+	/**
+	 * One endpoint of the relation.
+	 * 
+	 * @return
+	 */
+	public IModelElement getEndPoint();
+
+	/**
+	 * The relation with problem
+	 * 
+	 * @return
+	 */
+	public IRelation getRelation();
+
+	/**
+	 * The problematic type of relation.
+	 * 
+	 * @return
+	 */
+	public IRelation getRelationType();
+
+	/**
+	 * The type of the problem
+	 * 
+	 * @return
+	 */
+	public EProblemType getProblemType();
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/IProblemListener.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/IProblemListener.java
new file mode 100644
index 0000000..6228665
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/IProblemListener.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.modelChecker;
+
+import org.eclipse.viatra2.core.IModelElement;
+
+public interface IProblemListener {
+	/**
+	 * The problems of the given model element havve changed.
+	 * 
+	 * @param me
+	 */
+	public void problemsChanged(IModelElement me);
+
+	/**
+	 * The probelms of te whole model have changed. (A full check was done)
+	 * 
+	 */
+	public void problemsChanged();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/ModelCheckerPropertyProvider.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/ModelCheckerPropertyProvider.java
new file mode 100644
index 0000000..f3e1ace
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/ModelCheckerPropertyProvider.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2010, Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.modelChecker;

+

+import org.eclipse.viatra2.framework.properties.VIATRAPropertyKind;
+import org.eclipse.viatra2.framework.properties.providers.DefaultPropertyProvider;
+

+public class ModelCheckerPropertyProvider extends DefaultPropertyProvider

+{

+

+	public ModelCheckerPropertyProvider() {

+		super("Model checking");

+	}

+

+	@Override

+	public void init() {

+		allids.add("On-the-fly model checking");

+	}

+

+	public String getDefaultPropertyValue(String id) {

+		return "false";

+	}

+

+	public VIATRAPropertyKind getPropertyKind(String id) {

+		return VIATRAPropertyKind.BOOLEAN;

+	}

+

+	public boolean isActive() 

+	{

+		return true;

+	}

+

+

+

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/Problem.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/Problem.java
new file mode 100644
index 0000000..3a99ed1
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/Problem.java
@@ -0,0 +1,216 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.modelChecker;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.modelChecker.impl.ConsistencyErrorMessages;
+import org.eclipse.viatra2.tags.InfoTag;
+import org.eclipse.viatra2.tags.TagKind;
+
+/**
+ * POJO implementing problem carriers.
+ * @author Andras Schmidt, Istvan Rath
+ *
+ */
+public class Problem extends InfoTag implements IProblem {
+
+
+	IModelElement endPoint;
+
+	IRelation rel;
+
+	IRelation relType;
+	
+	IEntity otherEntity;
+
+	EProblemType problemType;
+
+	public Problem(IModelElement point, IRelation rel, IRelation type,
+			EProblemType problemType) {
+		super("", null, 3, 1);
+		endPoint = point;
+		this.rel = rel;
+		relType = type;
+		otherEntity = null;
+		this.problemType = problemType;
+		generateErrorMessage();
+	}
+
+	public Problem(IModelElement point, IRelation rel, IEntity otherEntity,
+	EProblemType problemType) {
+		super("", null, 3, 1);
+		endPoint = point;
+		this.rel = rel;
+		relType = null;
+		this.otherEntity = otherEntity;
+		this.problemType = problemType;
+		generateErrorMessage();
+	}
+	
+	public IModelElement getEndPoint() {
+		return endPoint;
+	}
+
+	public IRelation getRelation() {
+		return rel;
+	}
+
+	public IRelation getRelationType() {
+		return relType;
+	}
+
+	public EProblemType getProblemType() {
+		return problemType;
+	}
+
+	public String getMessage() {
+		return message;
+	}
+
+	protected void generateErrorMessage() {
+		if (problemType.compareTo(EProblemType.INVALID_RELATION_SOURCE_TYPE) == 0) {
+			message = ConsistencyErrorMessages.INVALID_RELATION_SOURCE_TYPE;
+			String[] context = new String[] { endPoint.getFullyQualifiedName(),
+					rel.getFullyQualifiedName(),
+					relType.getFrom().getFullyQualifiedName(),
+					relType.getFullyQualifiedName(), };
+			bind(context);
+		} else if (problemType
+				.compareTo(EProblemType.INVALID_RELATION_TARGET_TYPE) == 0) {
+			message = ConsistencyErrorMessages.INVALID_RELATION_TARGET_TYPE;
+			String[] context = new String[] { endPoint.getFullyQualifiedName(),
+					rel.getFullyQualifiedName(),
+					relType.getTo().getFullyQualifiedName(),
+					relType.getFullyQualifiedName(), };
+			bind(context);
+		} else if (problemType.compareTo(EProblemType.AGGREGATION_INVALID) == 0) {
+			message = ConsistencyErrorMessages.AGGREGATION_INVALID;
+			String[] context = new String[] { relType.getFullyQualifiedName(),
+					rel.getFullyQualifiedName(),
+					rel.getTo().getFullyQualifiedName(),
+					endPoint.getFullyQualifiedName() };
+			bind(context);
+		} else if (problemType.compareTo(EProblemType.INVALID_RELATION_SOURCE) == 0) {
+			message = ConsistencyErrorMessages.INVALID_RELATION_SOURCE;
+			String[] context = new String[] { rel.getFullyQualifiedName() };
+			bind(context);
+		} else if (problemType.compareTo(EProblemType.INVALID_RELATION_TARGET) == 0) {
+			message = ConsistencyErrorMessages.INVALID_RELATION_TARGET;
+			String[] context = new String[] { rel.getFullyQualifiedName() };
+			bind(context);
+		} else if (problemType
+				.compareTo(EProblemType.OUTGOING_MULTIPLICITY_CONSTRAINT_VIOLATED) == 0) {
+			message = ConsistencyErrorMessages.OUTGOING_MULTIPLICITY_CONSTRAINT_VIOLATED;
+			String[] context = new String[] { rel.getFullyQualifiedName(),
+					relType.getMultiplicity().toString(),
+					endPoint.getFullyQualifiedName() };
+			bind(context);
+		} else if (problemType
+				.compareTo(EProblemType.INCOMING_MULTIPLICITY_CONSTRAINT_VIOLATED) == 0) {
+			message = ConsistencyErrorMessages.INCOMING_MULTIPLICITY_CONSTRAINT_VIOLATED;
+			String[] context = new String[] { rel.getFullyQualifiedName(),
+					relType.getMultiplicity().toString(),
+					endPoint.getFullyQualifiedName() };
+			bind(context);
+		} else if (problemType
+				.compareTo(EProblemType.MULTIPLICITY_REFINEMENT_INVALID) == 0) {
+			message = ConsistencyErrorMessages.MULTIPLICITY_REFINEMENT_INVALID;
+			String[] context = new String[] { rel.getFullyQualifiedName(),
+					rel.getMultiplicity().toString(),
+					relType.getFullyQualifiedName(),
+					relType.getMultiplicity().toString() };
+			bind(context);
+		} else if (problemType
+				.compareTo(EProblemType.AGGREGATION_REFINEMENT_INVALID) == 0) {
+			message = ConsistencyErrorMessages.AGGREGATION_REFINEMENT_INVALID;
+			String[] context = new String[] { rel.getFullyQualifiedName(),
+					relType.getFullyQualifiedName() };
+			bind(context);
+		} else if (problemType
+				.compareTo(EProblemType.INVALID_REFINEMENT_SOURCE_TYPE) == 0) {
+			message = ConsistencyErrorMessages.INVALID_REFINEMENT_SOURCE_TYPE;
+			String[] context = new String[] { rel.getFullyQualifiedName(),
+					relType.getFullyQualifiedName() };
+			bind(context);
+		} else if (problemType
+				.compareTo(EProblemType.INVALID_REFINEMENT_TARGET_TYPE) == 0) {
+			message = ConsistencyErrorMessages.INVALID_REFINEMENT_TARGET_TYPE;
+			String[] context = new String[] { rel.getFullyQualifiedName(),
+					relType.getFullyQualifiedName() };
+			bind(context);
+		} else if (problemType
+				.compareTo(EProblemType.INVALID_REFINEMENT) == 0) {
+			message = ConsistencyErrorMessages.INVALID_REFINEMENT;
+			String[] context = new String[] { rel.getFullyQualifiedName(),
+					otherEntity.getFullyQualifiedName() };
+			bind(context);
+		} 
+
+	}
+
+	// try {

+	// String str = (String)
+	// this.getClass().getDeclaredField(problemType.name()).get(null);

+	// message = str;

+	// } catch (IllegalArgumentException e) {

+	// e.printStackTrace();

+	// message = "";

+	// } catch (SecurityException e) {

+	// e.printStackTrace();

+	// message = "";

+	// } catch (IllegalAccessException e) {

+	// e.printStackTrace();

+	// message = "";

+	// } catch (NoSuchFieldException e) {

+	// e.printStackTrace();

+	// message = "";

+	// }

+
+	/**
+	 * Binding the '{N}' (N = 1..4) strings to contextual conditions in
+	 * 'context'
+	 * 
+	 * @param context
+	 *            : array of context-sensitive Strings
+	 */
+	public void bind(String[] context) {
+		if (context.length >= 1) {
+			message = message.replace("{1}", context[0]);
+		}
+		if (context.length >= 2) {
+			message = message.replace("{2}", context[1]);
+		}
+		if (context.length >= 3) {
+			message = message.replace("{3}", context[2]);
+		}
+		if (context.length >= 4) {
+			message = message.replace("{4}", context[3]);
+		}
+	}
+
+	public Set<IModelElement> getAssociatedElements() {
+		HashSet<IModelElement> r = new HashSet<IModelElement>();
+		if (this.endPoint!=null) r.add(endPoint);
+		if (this.rel!=null) r.add(this.rel);
+		if (this.relType!=null) r.add(this.relType);
+		return r;
+	}
+
+	public TagKind getKind() {
+		return TagKind.MODELING_PROBLEM;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/impl/ConsistencyChecker.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/impl/ConsistencyChecker.java
new file mode 100644
index 0000000..3aa39e1
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/impl/ConsistencyChecker.java
@@ -0,0 +1,221 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.modelChecker.impl;
+
+import java.util.Iterator;
+import java.util.TreeSet;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+
+/**
+ * Modelspace health check for VPM model. Should find dangling edges in the VPM
+ * model.
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public class ConsistencyChecker {
+	IModelSpace modelSpace;
+
+	IModelManager mManager;
+
+	private ConsistencyChecker(IModelSpace ms) {
+		modelSpace = ms;
+		mManager = ms.getModelManager();
+	}
+
+	TreeSet<IEntity> entities;
+
+	TreeSet<IRelation> relations;
+
+	TreeSet<IRelation> connections;
+
+	TreeSet<IModelElement> elements;
+
+	private boolean check() {
+		entities = new TreeSet<IEntity>(mManager.getEntities());
+		relations = new TreeSet<IRelation>(mManager.getRelations());
+		connections = new TreeSet<IRelation>();
+		connections.addAll(relations);
+		elements = new TreeSet<IModelElement>();
+		elements.addAll(entities);
+		elements.addAll(relations);
+		// All elements have a parent.

+		checkHasParent();
+		// All functions are ok from both sides

+		checkAllRelations();
+		checkAllTypes();
+		return true;
+	}
+
+	/**
+	 * Check for all elements that the parent relation is consistent. Check for
+	 * all entities that the child relation is consistent.
+	 * 
+	 * @return aleays true
+	 */
+	private boolean checkHasParent() {
+		Iterator it = elements.iterator();
+		while (it.hasNext()) {
+			IModelElement me = (IModelElement) it.next();
+			if (me instanceof IEntity) {
+				IEntity ent = (IEntity) me;
+				if (!(ent.equals(mManager.getRoot()))) {
+					if (ent.getParent() == null) {
+						throw new RuntimeException("Not consistent!!!"
+								+ ent.getName() + " has no parent");
+					}
+					IEntity parent = ent.getParent();
+					if (!elements.contains(parent)) {
+						throw new RuntimeException("Not consistent!!!");
+					}
+					if (!parent.getContents().contains(me)) {
+						throw new RuntimeException("Not consistent!!!");
+					}
+				}
+
+				if (ent.getContents().size() != 0) {
+					Iterator children = ent.getContents().iterator();
+					while (children.hasNext()) {
+						IEntity child = (IEntity) children.next();
+						if (!elements.contains(child)) {
+							throw new RuntimeException("Not consistent!!!");
+						}
+						if (!child.getParent().equals(ent)) {
+							throw new RuntimeException("Not consistent!!!");
+						}
+					}
+				}
+			}
+		}
+		return true;
+	}
+
+	/*
+	 * private boolean checkConnectionsOk() { Iterator
+	 * it=connections.iterator(); while(it.hasNext()) { IRelation
+	 * r=(IRelation)it.next(); IModelElement from=r.getFrom(); IModelElement
+	 * to=r.getTo(); if(!elements.contains(from)) { throw new
+	 * RuntimeException("Not consistent!!!"); } if(!elements.contains(to)) {
+	 * throw new RuntimeException("Not consistent!!!"); } } return true; }
+	 */
+	private boolean checkAllRelations() {
+		Iterator it = entities.iterator();
+		while (it.hasNext()) {
+			IEntity ent = (IEntity) it.next();
+			Iterator relit;
+			relit = ent.getRelationsFrom().iterator();
+			while (relit.hasNext()) {
+				IRelation rel = (IRelation) relit.next();
+				if (!elements.contains(rel)) {
+					throw new RuntimeException("not consistent!!!");
+				}
+				if (rel.getFrom() != ent) {
+					throw new RuntimeException("not consistent!!!");
+				}
+			}
+			relit = ent.getRelationsTo().iterator();
+			while (relit.hasNext()) {
+				IRelation rel = (IRelation) relit.next();
+				if (!elements.contains(rel)) {
+					throw new RuntimeException("not consistent!!!");
+				}
+				if (rel.getTo() != ent) {
+					throw new RuntimeException("not consistent!!!");
+				}
+			}
+		}
+		Iterator relit = relations.iterator();
+		while (relit.hasNext()) {
+			IRelation r = (IRelation) relit.next();
+			if (!r.getFrom().getRelationsFrom().contains(r))
+				throw new RuntimeException("Error");
+			if (!r.getTo().getRelationsTo().contains(r)) {
+				// / boolean bbb=!r.getTo().getRelationsTo().contains(r);

+				System.out.println(r.getFullyQualifiedName());
+				Iterator it2 = r.getTo().getRelationsTo().iterator();
+				while (it2.hasNext()) {
+					IModelElement me = (IModelElement) it2.next();
+					System.out.println(me.getFullyQualifiedName());
+				}
+				throw new RuntimeException("Error");
+			}
+		}
+		return true;
+	}
+
+	private boolean checkAllTypes() {
+		Iterator it = elements.iterator();
+		while (it.hasNext()) {
+			IModelElement elem = (IModelElement) it.next();
+			Iterator typeit;
+			typeit = elem.getInstances().iterator();
+			while (typeit.hasNext()) {
+				IModelElement rel = (IModelElement) typeit.next();
+				if (!elements.contains(rel)) {
+					throw new RuntimeException("not consistent!!!");
+				}
+				if (!rel.getTypes().contains(elem)) {
+					throw new RuntimeException("not consistent!!!");
+				}
+			}
+			typeit = elem.getTypes().iterator();
+			while (typeit.hasNext()) {
+				IModelElement rel = (IModelElement) typeit.next();
+				if (!elements.contains(rel)) {
+					throw new RuntimeException("not consistent!!!");
+				}
+				if (!rel.getInstances().contains(elem)) {
+					throw new RuntimeException("not consistent!!!");
+				}
+			}
+			typeit = elem.getSubtypes().iterator();
+			while (typeit.hasNext()) {
+				IModelElement rel = (IModelElement) typeit.next();
+				if (!elements.contains(rel)) {
+					throw new RuntimeException("not consistent!!!");
+				}
+				if (!rel.getSupertypes().contains(elem)) {
+					throw new RuntimeException("not consistent!!!");
+				}
+			}
+			typeit = elem.getSupertypes().iterator();
+			while (typeit.hasNext()) {
+				IModelElement rel = (IModelElement) typeit.next();
+				if (!elements.contains(rel)) {
+					throw new RuntimeException("not consistent!!!");
+				}
+				if (!rel.getSubtypes().contains(elem)) {
+					throw new RuntimeException("not consistent!!!");
+				}
+			}
+		}
+		return true;
+	}
+
+	/**
+	 * Check the consistency of the VPM model. As the VPM model should always be
+	 * consistent this check is to be run as a self test. The check throws a
+	 * runtime exception if fails.
+	 * 
+	 * @param ms
+	 */
+	static public void check(IModelSpace ms) {
+		ConsistencyChecker ch = new ConsistencyChecker(ms);
+		ch.check();
+		return;
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/impl/ConsistencyErrorMessages.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/impl/ConsistencyErrorMessages.java
new file mode 100644
index 0000000..5ff3a5a
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/impl/ConsistencyErrorMessages.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.modelChecker.impl;
+
+public class ConsistencyErrorMessages {
+	public static final String INVALID_RELATION_SOURCE_TYPE = "The source end '{1}' of relation '{2}' is not properly typed: expecting an element of type '{3}' according to the relation type '{4}'.";
+
+	public static final String INVALID_RELATION_TARGET_TYPE = "The target end '{1}' of relation '{2}' is not properly typed: expecting an element of type '{3}' according to the relation type '{4}'.";
+
+	public static final String AGGREGATION_INVALID = "The type '{1}' of relation '{2}' prescribes aggregation, thus its target end '{3}' is required to be a child of '{4}'.";
+
+	public static final String INVALID_RELATION_SOURCE = "The source end of relation '{1} is not a valid model element.";
+
+	public static final String INVALID_RELATION_TARGET = "The target end of relation '{1}' is not a valid model element.";
+
+	public static final String INCOMING_MULTIPLICITY_CONSTRAINT_VIOLATED = "The multiplicity of relation '{1}' is '{2}', but there are more than one incoming edges to '{3}'.";
+
+	public static final String OUTGOING_MULTIPLICITY_CONSTRAINT_VIOLATED = "The multiplicity of relation '{1}' is '{2}', but there are more than one outgoing edges from '{3}'.";
+
+	public static final String MULTIPLICITY_REFINEMENT_INVALID = "The multiplicity of relation '{1}' is '{2}' while the multiplicity of its supertype '{3}' is '{4}' \n"
+			+ " In case of relation refinement, the multiplicity of the subtype should always be a more restrictive than the multiplicity of the supertype.";
+
+	public static final String AGGREGATION_REFINEMENT_INVALID = "The 'isAggregation' parameter of relation '{1}' is set to false, while its supertype '{2}' prescribes 'isAggregation' to be true for all subtypes";
+
+	public static final String INVALID_REFINEMENT_SOURCE_TYPE = "Relation '{2}' is not a valid subtype of relation '{1}' as the refinement of source ends is invalid.";
+
+	public static final String INVALID_REFINEMENT_TARGET_TYPE = "Relation '{2}' is not a valid subtype of relation '{1}' as the refinement of target ends is invalid.";
+
+	public static final String INVALID_REFINEMENT = "Relation '{1}' has an invalid refinement to an entity '{2}'.";
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/impl/ConsistencyListener.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/impl/ConsistencyListener.java
new file mode 100644
index 0000000..1f1b1f7
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/impl/ConsistencyListener.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.modelChecker.impl;
+
+import java.util.Collection;
+import java.util.TreeSet;
+
+import org.eclipse.viatra2.core.ICoreNotificationListener;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectTransactionEnd;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectUndoEnd;
+
+public class ConsistencyListener implements ICoreNotificationListener {
+
+	ProblemCounter pc;
+
+	ModelChecker checker;
+
+	public ConsistencyListener(ProblemCounter pc) {
+		this.pc = pc;
+		checker = new ModelChecker();
+	}
+
+	TreeSet<IModelElement> noted = new TreeSet<IModelElement>();
+
+	public void actionPerformed(ICoreNotificationObject notification) {
+		Collection<IModelElement> newNoted = notification.getNotifiedObjects();
+		noted.addAll(newNoted);
+		if (notification instanceof ICoreNotificationObjectTransactionEnd ||
+				notification instanceof ICoreNotificationObjectUndoEnd) 
+		{
+			checkChanges();
+		}
+	}
+
+	private void checkChanges() {
+		for (IModelElement me : noted) 
+		{
+			pc.pm.tm.clearTags(me);
+			
+			checkME(me);
+			if (me instanceof IRelation) {
+				IRelation rel = (IRelation) me;
+				if (!noted.contains(rel.getFrom())) {
+					checkME(rel.getFrom());
+				}
+				if (!noted.contains(rel.getTo())) {
+					checkME(rel.getTo());
+				}
+			}
+		}
+		noted = new TreeSet<IModelElement>();
+	}
+
+	private void checkME(IModelElement me) {
+		pc.setProblems(me, checker.checkModelElement(me));
+	}
+
+	public int getListenerCategory() {

+		return 0;
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/impl/ModelChecker.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/impl/ModelChecker.java
new file mode 100644
index 0000000..07deef3
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/impl/ModelChecker.java
@@ -0,0 +1,450 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.modelChecker.impl;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+
+import org.eclipse.viatra2.core.EMultiplicityKind;
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.modelChecker.EProblemType;
+import org.eclipse.viatra2.modelChecker.IProblem;
+import org.eclipse.viatra2.modelChecker.Problem;
+
+/**
+ * Summary: This class contains various validation methods for checking the
+ * consistency of the VPM model space.
+ *
+ * Description: This class contains the following checks on the VPM model space:
+ * - type checking for source and target end of relations - validation of
+ * containment prescribed by isAggregation - no dangling edges are present in
+ * the model space - correct refinement of aggregation relations - correct
+ * refinement of relation multiplicities
+ *
+ * @author Akos Schmidt
+ * @author Daniel Varro
+ */
+public class ModelChecker {
+
+	public Collection<IProblem> checkAllModelElement(IModelSpace modelSpace) {
+		try {
+			modelSpace.getTransactionManager().beginTransaction();
+			IModelElement toCheck = modelSpace.getModelManager().getRoot();
+			Collection<IProblem> ret = checkBranch(toCheck);
+			return ret;
+		} finally {
+			modelSpace.getTransactionManager().commitTransaction();
+		}
+	}
+
+	public Collection<IProblem> checkBranch(IModelElement me) {
+		ArrayList<IProblem> ret = new ArrayList<IProblem>();
+		checkBranch(me, ret);
+		return ret;
+	}
+
+	public void checkBranch(IModelElement me, Collection<IProblem> ret) {
+		if (me != null) {
+			checkModelElement(me, ret);
+			Collection<IModelElement> children = me.getElementsInNamespace();
+			for (IModelElement element : children) {
+				checkBranch(element, ret);
+			}
+		}
+	}
+
+	public Collection<IProblem> checkModelElement(IModelElement me) {
+		ArrayList<IProblem> ret = new ArrayList<IProblem>();
+		checkModelElement(me, ret);
+		return ret;
+	}
+
+	protected void checkModelElement(IModelElement me, Collection<IProblem> ret) {
+		// Take all relations leading out from the current model elements

+		Collection<IRelation> relsFrom = me.getRelationsFrom();
+		for (IRelation relation : relsFrom) {
+			checkRelationSource(me, relation, ret);
+			checkSourceMultiplicity(me, relation, new HashSet<IRelation>(), ret);
+			if (!relation.getAllSupertypes().isEmpty()) {
+				checkMetamodelConsistencyForRelation(me, relation, ret);
+			}
+			relationSupertypeValidation(me, relation, ret);
+		}
+		// Take all relations leading into the current model elements

+		Collection<IRelation> relsTo = me.getRelationsTo();
+		for (IRelation relation : relsTo) {
+			checkRelationTarget(me, relation, ret);
+			checkTargetMultiplicity(me, relation, new HashSet<IRelation>(), ret);
+		}
+	}
+
+	protected void checkMetamodelConsistencyForRelation(IModelElement current,
+			IRelation relation, Collection<IProblem> problems) {
+		EMultiplicityKind subMultiplicity = relation.getMultiplicity();
+		Collection<IModelElement> supertypes = relation.getSupertypes();
+		for (IModelElement supertype : supertypes) {
+			IRelation relSupertype = (IRelation) supertype;
+			EMultiplicityKind superMultiplicity = relSupertype
+					.getMultiplicity();
+			// Check the proper refinement of multiplicity restrictions

+			if (!isMultiplicityRefinement(subMultiplicity, superMultiplicity)) {
+				problems.add(new Problem(current, relation, relSupertype,
+						EProblemType.MULTIPLICITY_REFINEMENT_INVALID));
+			}
+			// Check the proper refinement of aggregations

+			if (relSupertype.getIsAggregation() && !relation.getIsAggregation()) {
+				problems.add(new Problem(current, relation, relSupertype,
+						EProblemType.AGGREGATION_REFINEMENT_INVALID));
+			}
+
+		}
+	}
+
+	protected boolean isMultiplicityRefinement(EMultiplicityKind subMulti,
+			EMultiplicityKind superMulti) {
+		// If the super multiplicity is MANY_TO_MANY, any refinement is allowed

+		if (superMulti.compareTo(EMultiplicityKind.MANY_TO_MANY) == 0) {
+			return true;
+		}
+		// If the super multiplicity is MANY_TO_ONE, and

+		// the sub multiplicity is either MANY_TO_ONE, or ONE_TO_ONE -> true

+		else if (superMulti.compareTo(EMultiplicityKind.MANY_TO_ONE) == 0) {
+			if (subMulti.compareTo(EMultiplicityKind.MANY_TO_ONE) == 0
+					|| subMulti.compareTo(EMultiplicityKind.ONE_TO_ONE) == 0) {
+				return true;
+			} else {
+				return false;
+			}
+		}
+		// If the super multiplicity is ONE_TO_MANY, and

+		// the sub multiplicity is either ONE_TO_MANY, or ONE_TO_ONE -> true

+		else if (superMulti.compareTo(EMultiplicityKind.ONE_TO_MANY) == 0) {
+			if (subMulti.compareTo(EMultiplicityKind.ONE_TO_MANY) == 0
+					|| subMulti.compareTo(EMultiplicityKind.ONE_TO_ONE) == 0) {
+				return true;
+			} else {
+				return false;
+			}
+		}
+		// If the super multiplicity is ONE_TO_ONE, and

+		// the sub multiplicity is ONE_TO_ONE -> true

+		else if (superMulti.compareTo(EMultiplicityKind.ONE_TO_ONE) == 0
+				&& subMulti.compareTo(EMultiplicityKind.ONE_TO_ONE) == 0) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+	/**
+	 * Checks that multiplicity of a relation is respected by outgoing relations
+	 *
+	 * @param current
+	 *            : the current model element (typically entity) to be traversed
+	 * @param relation
+	 *            : the relation to be investigated
+	 * @param problematicTypes
+	 *            : collection of types already violating multiplicity at the
+	 *            current element
+	 * @param problems
+	 *            : list of problems
+	 */
+	protected void checkSourceMultiplicity(IModelElement current,
+			IRelation relation, Collection<IRelation> problematicTypes,
+			Collection<IProblem> problems) {
+		// Type-specific model validation

+		// It is sufficient to carry out validation for direct types of relation

+		Collection<IModelElement> relTypes = relation.getTypes();
+		for (IModelElement type : relTypes) {
+			IRelation relType = (IRelation) type;
+			// Type checking for source end of relation

+			// Checking multiplicity for source end of relation is respected by
+			// outgoing relations

+			EMultiplicityKind multiplicity = relType.getMultiplicity();
+			if (multiplicity.compareTo(EMultiplicityKind.ONE_TO_ONE) == 0
+					|| multiplicity.compareTo(EMultiplicityKind.MANY_TO_ONE) == 0) {
+				if (current.getAllRelationFromByType(relType).size() > 1
+						&& !problematicTypes.contains(relType)) {
+					problems
+							.add(new Problem(
+									current,
+									relation,
+									relType,
+									EProblemType.OUTGOING_MULTIPLICITY_CONSTRAINT_VIOLATED));
+					// Avoid to print error messages twice for the same type

+					problematicTypes.add(relType);
+				}
+			}
+			//

+		}
+	}
+
+	/**
+	 * Checks that multiplicity of a relation is respected by incoming relations
+	 *
+	 * @param current
+	 *            : the current model element (typically entity) to be traversed
+	 * @param relation
+	 *            : the relation to be investigated
+	 * @param problematicTypes
+	 *            : collection of types already violating multiplicity at the
+	 *            current element
+	 * @param problems
+	 *            : list of problems
+	 */
+	protected void checkTargetMultiplicity(IModelElement current,
+			IRelation relation, Collection<IRelation> problematicTypes,
+			Collection<IProblem> problems) {
+		// Type-specific model validation

+		// It is sufficient to carry out validation for direct types of relation

+		Collection<IModelElement> relTypes = relation.getTypes();
+		for (IModelElement type : relTypes) {
+			IRelation relType = (IRelation) type;
+			// Type checking for source end of relation

+			// Checking multiplicity for source end of relation is respected by
+			// outgoing relations

+			EMultiplicityKind multiplicity = relType.getMultiplicity();
+			if (multiplicity.compareTo(EMultiplicityKind.ONE_TO_ONE) == 0
+					|| multiplicity.compareTo(EMultiplicityKind.ONE_TO_MANY) == 0) {
+				if (current.getAllRelationToByType(relType).size() > 1
+						&& !problematicTypes.contains(relType)) {
+					problems
+							.add(new Problem(
+									current,
+									relation,
+									relType,
+									EProblemType.INCOMING_MULTIPLICITY_CONSTRAINT_VIOLATED));
+					// Avoid to print error messages twice for the same type

+					problematicTypes.add(relType);
+				}
+			}
+			//

+		}
+	}
+
+	/**
+	 * This method carries out the following validations for the source end of a
+	 * relation: (1) relation is not dangling i.e. its other (target) end is
+	 * defined (2) type checking the source end of relation (3) checking that
+	 * multiplicity of relation is respected by outgoing relations
+	 *
+	 * @param current
+	 *            : the current model element (typically entity) to be traversed
+	 * @param rel
+	 *            : the relation to be investigated
+	 * @param problems
+	 *            : the list of problems found
+	 */
+	protected void checkRelationSource(IModelElement current, IRelation rel,
+			Collection<IProblem> problems) {
+		// Check dangling edges, i.e. that the target of the relation is not
+		// null (when the relation is corrupt)

+		if (rel.getTo() == null) {
+			problems.add(new Problem(current, rel, (IRelation) null,
+					EProblemType.INVALID_RELATION_TARGET));
+		}
+		// Type-specific model validation

+		Collection<IModelElement> relTypes = rel.getAllTypes();
+		for (IModelElement type : relTypes) {
+			IRelation relType = (IRelation) type;
+			// Type checking for source end of relation

+			typecheckRelationSource(current, relType, rel, problems);
+		}
+	}
+
+	/**
+	 * This method carries out the following validations for the target end of a
+	 * relation: (1) relation is not dangling i.e. its other (source) end is
+	 * defined (2) type checking the target end of relation (3) checking that
+	 * multiplicity of relation is respected by incoming relations
+	 *
+	 * @param current
+	 *            : the current model element (typically entity) to be traversed
+	 * @param rel
+	 *            : the relation to be investigated
+	 * @param problems
+	 *            : the list of problems found
+	 */
+	protected void checkRelationTarget(IModelElement current, IRelation rel,
+			Collection<IProblem> problems) {
+		// Check dangling edges, i.e. that the source of the relation is not
+		// null (when the relation is corrupt)

+		if (rel.getFrom() == null) {
+			problems.add(new Problem(current, rel, (IRelation) null,
+					EProblemType.INVALID_RELATION_SOURCE));
+		}
+		// Type-specific model validation

+		Collection<IModelElement> relTypes = rel.getAllTypes();
+		for (IModelElement type : relTypes) {
+			IRelation relType = (IRelation) type;
+			// Type checking for target end of relation

+			typecheckRelationTarget(current, relType, rel, problems);
+		}
+	}
+
+	/**
+	 * Checks that the source entity of a relation with an aggregation type is
+	 * the parent of the target entity of this relation. This check is triggered
+	 * only when both the source and the target end of a relation is an entity.
+	 *
+	 * @param rel
+	 *            : the relation to be investigated
+	 * @param relType
+	 *            : the type of the relation
+	 * @param problems
+	 *            : collection of model validation problems
+	 */
+	protected void checkContainmentIsConsistentWithIsAggregation(IRelation rel,
+			IRelation relType, Collection<IProblem> problems) {
+		// TODO: Check if the instanceof calls can be changed to isEntity() calls
+		if (rel.getFrom() instanceof IEntity && rel.getTo() instanceof IEntity) {
+			IEntity fromEntity = (IEntity) rel.getFrom();
+			IEntity toEntity = (IEntity) rel.getTo();
+			// TODO: Check that this is the correct comparison to be used

+			if (toEntity.getParent() != fromEntity) {
+				problems.add(new Problem(fromEntity, rel, relType,
+						EProblemType.AGGREGATION_INVALID));
+			}
+		}
+
+	}
+
+	/**
+	 * Type checking the source end of a relation, and checking if the
+	 * containment hierarchy is consistent with the isAggregation parameter
+	 *
+	 * @param current
+	 *            : the source end of a relation
+	 * @param relType
+	 *            : the type of the relation
+	 * @param rel
+	 *            : the relation itself
+	 * @param ret
+	 *            : list of problems
+	 */
+	protected void typecheckRelationSource(IModelElement current,
+			IRelation relType, IRelation rel, Collection<IProblem> ret) {
+		assert (current != null);
+		if (relType.getIsAggregation()) {
+			checkContainmentIsConsistentWithIsAggregation(rel, relType, ret);
+		}
+		// if(relType.getIsAnyFrom())

+		// return;

+		Collection<IModelElement> types = current.getAllTypes();
+		for (IModelElement element : types) {
+			Collection<IRelation> edgeTypes = element.getRelationsFrom();
+			if (edgeTypes.contains(relType)) {
+				// Type ok

+				return;
+			}
+		}
+		ret.add(new Problem(current, rel, relType,
+				EProblemType.INVALID_RELATION_SOURCE_TYPE));
+	}
+
+	/**
+	 * Type checking the target end of a relation
+	 *
+	 * @param current
+	 *            : the source end of a relation
+	 * @param relType
+	 *            : the type of the relation
+	 * @param rel
+	 *            : the relation itself
+	 * @param ret
+	 *            : list of problems
+	 */
+
+	protected void typecheckRelationTarget(IModelElement current,
+			IRelation relType, IRelation rel, Collection<IProblem> ret) {
+		// if(relType.getIsAnyTo())

+		// return;

+		Collection<IModelElement> types = current.getAllTypes();
+		for (IModelElement element : types) {
+			Collection<IRelation> edgeTypes = element.getRelationsTo();
+			if (edgeTypes.contains(relType)) {
+				// Type ok

+				return;
+			}
+		}
+		ret.add(new Problem(current, rel, relType,
+				EProblemType.INVALID_RELATION_TARGET_TYPE));
+	}
+
+	/**
+	 * Checks if all refinements (subtypes) of a relation are properly typed,
+	 * i.e. the refinement itself is source and target consistent
+	 *
+	 * @param me : the source of the relation
+	 * @param rel : the relation to be checked
+	 * @param problems : list of problems
+	 */
+	protected void relationSupertypeValidation(IModelElement me, IRelation rel,
+			Collection<IProblem> problems) {
+		for (IModelElement subElement: rel.getSubtypes()) {
+			// Check that all direct subtypes of relation rel are also relations
+			if (subElement instanceof IRelation) {
+				IRelation subRel = (IRelation) subElement;
+				// If X < Y, check that src(X) < src(Y) when both X and Y are relations
+				if (!rel.getFrom().equals(subRel.getFrom()) &&
+					!rel.getFrom().isSubtypeOf(subRel.getFrom())) {
+					problems.add(new Problem(me, rel, subRel,
+							EProblemType.INVALID_REFINEMENT_SOURCE_TYPE));
+				}
+
+				// If X < Y, check that trg(X) < trg(Y) when both X and Y are relations
+				if (!rel.getTo().equals(subRel.getTo()) &&
+					!rel.getTo().isSubtypeOf(subRel.getTo())) {
+						problems.add(new Problem(me, rel, subRel,
+								EProblemType.INVALID_REFINEMENT_TARGET_TYPE));
+					}
+}
+			else {
+				// If rel is refined into an entity
+				if (subElement.isEntity()) {
+					problems.add(new Problem(me, rel,(IEntity) subElement,
+							EProblemType.INVALID_REFINEMENT));
+				}
+			}
+		}
+		for (IModelElement superElement: rel.getSupertypes()) {
+			// If rel is refined into an entity, issue an error message
+			if (superElement.isEntity()) {
+					problems.add(new Problem(me, rel, (IEntity) superElement,
+							EProblemType.INVALID_REFINEMENT));
+			}
+		}
+	}
+
+	/**
+	 * @deprecated
+	 */
+	public String printProblems(Collection<IProblem> problems) {
+		if (problems == null)
+			return "";
+		StringBuffer buf = new StringBuffer();
+		for (IProblem problem : problems) {
+			buf.append("not compatible types");
+			buf.append(" " + problem.getProblemType().toString() + " ");
+			buf.append("(entity, relation, relation type):");
+			buf.append(problem.getEndPoint().getFullyQualifiedName() + ",");
+			buf.append(problem.getRelation().getFullyQualifiedName() + ",");
+			buf.append(problem.getRelationType().getFullyQualifiedName());
+			buf.append("\n");
+		}
+		return buf.toString();
+	}
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/impl/ProblemCounter.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/impl/ProblemCounter.java
new file mode 100644
index 0000000..5a099a3
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/impl/ProblemCounter.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.modelChecker.impl;
+
+import java.util.Collection;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.modelChecker.IProblem;
+import org.eclipse.viatra2.tags.TagKind;
+
+public class ProblemCounter {
+	//TreeMap<IModelElement, Collection<IProblem>> element2Problems = new TreeMap<IModelElement, Collection<IProblem>>();
+
+	ProblemManager pm;
+
+	ProblemCounter(Collection<IProblem> problems, ProblemManager pm) {
+		this.pm = pm;
+		setProblems(problems);
+	}
+
+
+	
+	/**
+	 * 1) Clear all "problem" tags.
+	 * 2) Add all new "problem" tags passed in the parameter.
+	 */
+	void setProblems(Collection<IProblem> problems)
+	{
+		pm.tm.clearTags(TagKind.MODELING_PROBLEM);
+		for (IProblem p : problems)
+		{
+			pm.tm.addTag(p);
+		}
+	}
+
+	void setProblems(IModelElement me, Collection<IProblem> problems)
+	{
+		// pm.tm.clearTags(me);
+		// add new tags
+		for (IProblem p : problems)
+		{
+			pm.tm.addTag(p);
+		}
+	}
+	
+	
+
+
+
+
+
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/impl/ProblemManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/impl/ProblemManager.java
new file mode 100644
index 0000000..28d5d9f
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/modelChecker/impl/ProblemManager.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.modelChecker.impl;
+
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.tags.ITagManager;
+
+/**
+ * This class implements a model checker.
+ * 
+ * @author Andras Schmidt
+ * 
+ */
+public class ProblemManager 
+{
+	ProblemCounter pc;
+
+	ModelChecker mc;
+
+	IModelSpace ms;
+
+	ConsistencyListener cli;
+	
+	ITagManager tm;
+
+	/**
+	 * Initializes the problem manager. Builds the model for all problems.
+	 * 
+	 * @param ms
+	 */
+	public void init(IFramework fw) {
+		try {
+			this.tm = fw.getTagManager();
+			this.ms = fw.getTopmodel();
+		//	ms.getTransactionManager().beginTransaction();
+			mc = new ModelChecker();
+			
+			if (fw.getProperties().getRuntimeProperty("Model checking", "On-the-fly model checking")!=null &&
+					fw.getProperties().getRuntimeProperty("Model checking", "On-the-fly model checking").equalsIgnoreCase("true"))
+			{
+				pc = new ProblemCounter(mc.checkAllModelElement(ms), this);
+				cli = new ConsistencyListener(pc);
+				ms.getNotificationManager().addAllListener(cli);
+			}
+		} finally {
+		//	ms.getTransactionManager().commitTransaction();
+		}
+	}
+	
+
+	public void fullCheck() {
+		if (pc==null)
+		{
+			pc = new ProblemCounter(mc.checkAllModelElement(ms), this);
+		}
+		else
+		{
+			pc.setProblems(mc.checkAllModelElement(ms));
+		}
+	}
+
+
+	public void deinit() {
+		if (cli!=null)
+		{
+			ms.getNotificationManager().removeAllListener(cli);
+		}
+	}
+	
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/ASMNativeFunction.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/ASMNativeFunction.java
new file mode 100644
index 0000000..e5052c8
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/ASMNativeFunction.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.natives;
+
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+
+/**
+ * An ASMNativeFunction is a Java function which can be called directly from a
+ * VTCL program.
+ * 
+ * @author Andras Balogh
+ */
+public interface ASMNativeFunction {
+
+	/**
+	 * This function will be called by the GTASM interpreter.
+	 */
+	public Object evaluate(IModelSpace msp, Object[] params)
+			throws VPMRuntimeException;
+
+	/**
+	 * The name of the native function.
+	 */
+	public String getName();
+
+	/**
+	 * The unique ID of the native function.
+	 */
+	public String getID();
+
+	/**
+	 * The textual description of the native function.
+	 */
+	public String getDescription();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/AdderFunction.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/AdderFunction.java
new file mode 100644
index 0000000..25db53c
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/AdderFunction.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.natives;
+
+// fqn: org.eclipse.viatra2.natives.AdderFun
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.natives.NativeFunctionParameter.ParameterType;
+
+/**
+ * @author Istvan Rath
+ * 
+ */
+@VIATRANativeFunction(name = "add", returns = { ParameterType.INTEGER,
+		ParameterType.DOUBLE, ParameterType.STRING }, params = {
+		@NativeFunctionParameter(name = "operand1", description = "first operand", type = {
+				ParameterType.INTEGER, ParameterType.DOUBLE,
+				ParameterType.STRING }),
+		@NativeFunctionParameter(name = "operand2", description = "second operand", type = {
+				ParameterType.INTEGER, ParameterType.DOUBLE,
+				ParameterType.STRING }), }, remark = "Operand types need to be of the same type at run-time (integer+double combinations are allowed).")
+public class AdderFunction implements ASMNativeFunction {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.viatra2.natives.ASMNativeFunction#evaluate(org.eclipse.viatra2
+	 * .core.IModelSpace, java.lang.String[])
+	 */
+	public Object evaluate(IModelSpace msp, Object[] params)
+			throws VPMRuntimeException {
+		if (params.length == 2) {
+			if ((params[0] instanceof Integer)
+					&& (params[1] instanceof Integer))
+				return new Integer(((Integer) params[0]).intValue()
+						+ ((Integer) params[1]).intValue());
+			if ((params[0] instanceof Double) && (params[1] instanceof Double))
+				return new Double(((Double) params[0]).doubleValue()
+						+ ((Double) params[1]).doubleValue());
+			if ((params[0] instanceof String) && (params[1] instanceof String))
+				return params[0].toString() + params[1].toString();
+			if ((params[0] instanceof Integer) && (params[1] instanceof Double))
+				return new Double(((Integer) params[0]).intValue()
+						+ ((Double) params[1]).doubleValue());
+			if ((params[0] instanceof Double) && (params[1] instanceof Integer))
+				return new Double(((Double) params[0]).doubleValue()
+						+ ((Integer) params[1]).intValue());
+
+			throw new VPMRuntimeException("Parameter type mismatch!");
+
+		}
+		throw new VPMRuntimeException("Parameter count mismatch!");
+	}
+
+	public String getName() {
+		return "add"; // VTCL

+	}
+
+	public String getDescription() {
+		return "adds the two parameters. Numbers are added, strings are concatenated.";
+	}
+
+	public String getID() {
+		return this.getClass().getCanonicalName();
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/CleanFunction.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/CleanFunction.java
new file mode 100644
index 0000000..b9ea03d
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/CleanFunction.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.natives;
+
+import org.eclipse.viatra2.core.EDeleteSemantics;
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.natives.NativeFunctionParameter.ParameterType;
+
+@VIATRANativeFunction(name = "clean", remark = "Deletes model elements faster than the \"delete()\" rule (recursive).", params = { @NativeFunctionParameter(name = "entities", type = { ParameterType.MODEL_ELEMENT }, isVarArg = true, description = "model element references to top-level entities to be deleted.") }, returns = { ParameterType.BOOLEAN })
+public class CleanFunction implements ASMNativeFunction {
+
+	private void recursive_delete(IEntity target) throws VPMCoreException {
+		// delete all children recursively

+		while (!target.getContents().isEmpty()) {
+			try {
+				recursive_delete((IEntity) target.getContents().iterator()
+						.next());
+			} catch (ClassCastException e) {
+				System.out.println("Non-entity content detected at "
+						+ target.getFullyQualifiedName());
+			}
+		}
+		target.getModelSpace().getModelManager().deleteEntity(target,
+				EDeleteSemantics.DELETE_SEMANTICS_FORCE);
+
+	}
+
+	public Object evaluate(IModelSpace msp, Object[] params)
+			throws VPMRuntimeException {
+
+		try {
+			for (Object param : params) {
+				if (param instanceof IEntity) {
+					recursive_delete((IEntity) param);
+				}
+			}
+		} catch (VPMCoreException cex) {
+			return Boolean.FALSE;
+		}
+
+		return Boolean.TRUE;
+	}
+
+	public String getDescription() {
+		return "Implements a fast, recursive model element delete algorithm.";
+	}
+
+	public String getID() {
+		return this.getClass().getCanonicalName();
+	}
+
+	public String getName() {
+		return "clean";
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/ExistsFunction.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/ExistsFunction.java
new file mode 100644
index 0000000..57e8c95
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/ExistsFunction.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.natives;
+
+// fqn: org.eclipse.viatra2.natives.AdderFun
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.natives.NativeFunctionParameter.ParameterType;
+
+/**
+ * Native function to provide a way for easily checking for the existence of
+ * certain model elements in VTCL programs (note: the 'ref' rule throws an
+ * exception if a non-existing model element is passed as the parameter, whereas
+ * this native function returns "false" in that case. It returns "true" for
+ * existing elements.)
+ * 
+ * @author Istvan Rath
+ * 
+ */
+@VIATRANativeFunction(name = "exists", returns = ParameterType.BOOLEAN, remark = "The 'ref' rule throws an exception "
+		+ "if a non-existing model element is passed as the parameter, whereas this native function "
+		+ "returns \"false\" in that case.", 
+		params = @NativeFunctionParameter(name = "elements", 
+				description = "FQNs of model elements to be checked for existence", isVarArg = true, 
+				type = { NativeFunctionParameter.ParameterType.STRING }))
+public class ExistsFunction implements ASMNativeFunction {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.viatra2.natives.ASMNativeFunction#evaluate(org.eclipse.viatra2
+	 * .core.IModelSpace, java.lang.String[])
+	 */
+	public Object evaluate(IModelSpace msp, Object[] params)
+			throws VPMRuntimeException {
+		boolean allOK = true;
+		for (Object ref : params) {
+			if (ref instanceof String)
+				allOK &= (msp.getModelManager().getElementByName((String) ref) != null);
+			else
+				throw new VPMRuntimeException("Parameter type mismatch!");
+		}
+		return allOK;
+	}
+
+	public String getName() {
+		return "exists"; // VTCL

+	}
+
+	public String getDescription() {
+		return "checks for the existence of model elements; returns \"true\" if all parameters exist, \"false\" otherwise";
+	}
+
+	public String getID() {
+		return this.getClass().getCanonicalName();
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/GetVIATRAID.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/GetVIATRAID.java
new file mode 100644
index 0000000..2a30c4f
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/GetVIATRAID.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2010, Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.natives;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+
+@VIATRANativeFunction(name="getId", 
+		params = { @NativeFunctionParameter(type={NativeFunctionParameter.ParameterType.MODEL_ELEMENT}, name = "modelElement") }, 
+		returns = { NativeFunctionParameter.ParameterType.STRING })
+public class GetVIATRAID implements ASMNativeFunction {
+
+	public Object evaluate(IModelSpace msp, Object[] params)
+			throws VPMRuntimeException {
+		return ((IModelElement)params[0]).getID();
+	}
+
+	public String getDescription() {
+		return "Fetches the internal VIATRA ID of an element";
+	}
+
+	public String getID() {
+	return this.getClass().getCanonicalName();
+	}
+
+	public String getName() {
+		return "getId";
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/INativeFunctionManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/INativeFunctionManager.java
new file mode 100644
index 0000000..4cfe8c7
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/INativeFunctionManager.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.natives;
+
+public interface INativeFunctionManager {
+	/**
+	 * Register zero or more native functions.
+	 * 
+	 * @param a
+	 */
+	public void addAllFunction(ASMNativeFunction[] a);
+
+	/**
+	 * Register a native function
+	 * 
+	 * @param a
+	 */
+	public void addFunction(ASMNativeFunction a);
+
+	/**
+	 * Returns a native function for the given class name
+	 * 
+	 * @return
+	 */
+	public ASMNativeFunction getNativeFunctionForName(String name);
+
+	/**
+	 * Returns all registered native functions.
+	 * 
+	 * @return
+	 */
+	public ASMNativeFunction[] getAllNativeFunctions();
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/MeasureMemoryFootprintFunction.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/MeasureMemoryFootprintFunction.java
new file mode 100644
index 0000000..b93b798
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/MeasureMemoryFootprintFunction.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2010, Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.natives;

+

+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.natives.NativeFunctionParameter.ParameterType;
+

+/**

+ * Native function to provide a way for estimating the memory footprint of Viatra2.

+ * The actual metric used is the heap size.

+ * Several garbage collection runs (the amount is configurable) are initiated before measurement, which may have a severe runtime impact.

+ * 

+ * @author Istvan Rath

+ * 

+ */

+@VIATRANativeFunction(name = "measureMemoryFootprint", returns = ParameterType.INTEGER, remark = "Returns the heaps size measured after Garbage Collection. "

+	+ "Caution: Garbage Collector runs are initiated before measurement, which may have a severe runtime impact.", 

+	params = @NativeFunctionParameter(name = "gcRuns", 

+			description = "The number of GC runs to be initiated before measurement.", 

+			type = { NativeFunctionParameter.ParameterType.INTEGER }))

+public class MeasureMemoryFootprintFunction implements ASMNativeFunction {

+

+

+	public Object evaluate(IModelSpace msp, Object[] params)

+			throws VPMRuntimeException {

+		if (params.length != 1) throw new VPMRuntimeException("Illegal parameter number for measureMemoryFootprint(): a single parameter is required");

+		if (! (params[0] instanceof Integer)) throw new VPMRuntimeException("Illegal argument type for measureMemoryFootprint(): Integer is required");

+		Integer gcRuns = (Integer) params[0];

+		for (int i = 0; i<gcRuns; ++i) Runtime.getRuntime().gc();

+

+		return (int)((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())/(1024*1024));

+	}

+

+	public String getDescription() {

+		return "Returns the heaps size measured after Garbage Collection. "

+		+ "Caution: Garbage Collector runs are initiated before measurement, which may have a severe runtime impact.";

+	}

+

+	public String getID() {

+		return this.getClass().getCanonicalName();

+	}

+

+	public String getName() {

+		return "measureMemoryFootprint";

+	}

+

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/NativeFunctionManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/NativeFunctionManager.java
new file mode 100644
index 0000000..cacb004
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/NativeFunctionManager.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.natives;
+
+import java.util.HashMap;
+
+/**
+ * @author Andras Balogh
+ * 
+ * 
+ * 
+ */
+public class NativeFunctionManager implements INativeFunctionManager {
+
+	private HashMap<String, ASMNativeFunction> funs = new HashMap<String, ASMNativeFunction>();
+
+	public void addAllFunction(ASMNativeFunction[] a) {
+		for (ASMNativeFunction function : a) {
+			addFunction(function);
+		}
+	}
+
+	public void addFunction(ASMNativeFunction a) {
+		funs.put(a.getName(), a);
+	}
+
+	// Returns a native function for the given class name

+	public ASMNativeFunction getNativeFunctionForName(String name) {
+		Object o = funs.get(name);
+		if ((o != null) && (o instanceof ASMNativeFunction)) {
+			return (ASMNativeFunction) o;
+		}
+		return null;
+	}
+
+	public ASMNativeFunction[] getAllNativeFunctions() {
+		return funs.values().toArray(new ASMNativeFunction[0]);
+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/NativeFunctionParameter.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/NativeFunctionParameter.java
new file mode 100644
index 0000000..4711c12
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/NativeFunctionParameter.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.natives;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface NativeFunctionParameter {
+	enum ParameterType {
+		MODEL_ELEMENT, STRING, INTEGER, DOUBLE, BOOLEAN, NATIVE
+	};
+
+	String name();
+
+	ParameterType[] type();
+
+	boolean isVarArg() default false;
+
+	String description() default "";
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/RandomDoubleFunction.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/RandomDoubleFunction.java
new file mode 100644
index 0000000..cafbc6c
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/RandomDoubleFunction.java
@@ -0,0 +1,48 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann, Istvan Rath - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.natives;

+

+import java.util.Random;

+

+import org.eclipse.viatra2.core.IModelSpace;

+import org.eclipse.viatra2.errors.VPMRuntimeException;

+import org.eclipse.viatra2.natives.NativeFunctionParameter.ParameterType;

+

+/**

+ * Native function to generate a fresh random number.

+ * 

+ * @author Gabor Bergmann

+ * 

+ */

+@VIATRANativeFunction(name = "randomDouble", remark = "Returns a fresh random number between 0.0 and 1.0.", params = {}, returns = { ParameterType.DOUBLE })

+public class RandomDoubleFunction implements ASMNativeFunction {

+

+	Random random = new Random();

+	

+	public Object evaluate(IModelSpace msp, Object[] params)

+			throws VPMRuntimeException {

+		return random.nextDouble();

+	}

+

+	public String getDescription() {

+		return "Returns a fresh random number between 0.0 and 1.0.";

+	}

+

+	public String getID() {

+		return this.getClass().getCanonicalName();

+	}

+

+	public String getName() {

+		return "randomDouble"; // ez megy a VTCLbe

+	}

+

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/RandomIntegerFunction.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/RandomIntegerFunction.java
new file mode 100644
index 0000000..01b1753
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/RandomIntegerFunction.java
@@ -0,0 +1,57 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann, Istvan Rath - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.natives;

+

+import java.util.Random;

+

+import org.eclipse.viatra2.core.IModelSpace;

+import org.eclipse.viatra2.errors.VPMRuntimeException;

+import org.eclipse.viatra2.natives.NativeFunctionParameter.ParameterType;

+

+/**

+ * Native function to generate a fresh random number.

+ * 

+ * @author Gabor Bergmann

+ * 

+ */

+@VIATRANativeFunction(

+		name = "randomInteger", 

+		remark = "Returns a fresh random non-negative integer less than the argument, or a random integer without range restriction if no argument is provided.", 

+		params = {

+				@NativeFunctionParameter(

+						type = ParameterType.INTEGER, 

+						name="range", 

+						description="the upper limit of the random integers, omit if full range is required")}, 

+		returns = { ParameterType.INTEGER })

+public class RandomIntegerFunction implements ASMNativeFunction {

+

+	Random random = new Random();

+

+	public Object evaluate(IModelSpace msp, Object[] params) throws VPMRuntimeException {

+		if (params.length > 0 && params[0] !=null && params[0] instanceof Integer)

+			return random.nextInt((Integer)params[0]);

+		else return random.nextInt();

+	}

+

+	public String getDescription() {

+		return "Returns a fresh random non-negative integer less than the range argument, or a random integer without range restriction if no argument is provided.";

+	}

+

+	public String getID() {

+		return this.getClass().getCanonicalName();

+	}

+

+	public String getName() {

+		return "randomInteger"; // ez megy a VTCLbe

+	}

+

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/SysTimeFunction.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/SysTimeFunction.java
new file mode 100644
index 0000000..c674fa2
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/SysTimeFunction.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.natives;
+
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.natives.NativeFunctionParameter.ParameterType;
+
+/**
+ * Native function to retrieve the current system time.
+ * 
+ * @author istvan
+ * 
+ */
+@VIATRANativeFunction(name = "systime", remark = "Returns a truncated systime to fit into a 32-bit integer. First 4 digits are dropped.", params = {}, returns = { ParameterType.STRING })
+public class SysTimeFunction implements ASMNativeFunction {
+
+	public Object evaluate(IModelSpace msp, Object[] params)
+			throws VPMRuntimeException {
+		return new Integer(Long.toString(System.currentTimeMillis()).substring(
+				4));
+	}
+
+	public String getDescription() {
+		return "The current system time in milliseconds (with first 4 digits dropped).";
+	}
+
+	public String getID() {
+		return this.getClass().getCanonicalName();
+	}
+
+	public String getName() {
+		return "systime"; // ez megy a VTCLbe

+	}
+
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/VIATRANativeFunction.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/VIATRANativeFunction.java
new file mode 100644
index 0000000..9c198e3
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/natives/VIATRANativeFunction.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.natives;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface VIATRANativeFunction {
+	String name() default "";
+
+	NativeFunctionParameter[] params();
+
+	NativeFunctionParameter.ParameterType[] returns();
+
+	String remark() default "";
+}
diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/tags/ITag.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/tags/ITag.java
new file mode 100644
index 0000000..81f3e5b
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/tags/ITag.java
@@ -0,0 +1,79 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.tags;

+

+import java.util.Set;

+

+import org.eclipse.core.resources.IMarker;

+import org.eclipse.viatra2.core.IModelElement;

+

+/**

+ * Describes a Tag that carries some information and can be attached to a set of 

+ * VPM model elements.

+ * @author Istvan Rath

+ *

+ */

+public interface ITag {

+

+	/**

+	 * The textual message of the tag.

+	 * 

+	 * @return message string

+	 */

+	public String getMessage();

+	

+	/**

+	 * Gets the set of VPM model elements associated to the tag.

+	 */

+	public Set<IModelElement> getAssociatedElements();

+	

+	/**

+	 * Gets the kind of tag.

+	 */

+	public TagKind getKind();

+	

+	/**

+	 * Gets the associated marker if present.

+	 * @return

+	 */

+	public IMarker getMarker();

+	

+	/**

+	 * Sets the associated marker.

+	 */

+	public void setMarker(IMarker marker);

+	

+	

+	/**

+	 * Gets the SWT Color associated to the tag.

+	 */

+	public int getBackgroundColor();

+	

+	

+	/**

+	 * Gets the SWT Color associated to the tag.

+	 */

+	public int getForegroundColor();

+	

+	

+	/**

+	 * Sets the SWT Color associated to the tag.

+	 * @param c

+	 */

+	public void setForegroundColor(int colorindex);

+

+	/**

+	 * Sets the background color of the tag.

+	 */

+	public void setBackgroundColor(int colorindex);

+

+	

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/tags/ITagManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/tags/ITagManager.java
new file mode 100644
index 0000000..06534b7
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/tags/ITagManager.java
@@ -0,0 +1,79 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.tags;

+

+import java.util.Set;

+

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.framework.IFramework;

+

+/**

+ * 

+ * @author Istvan Rath

+ *

+ */

+public interface ITagManager {

+

+	

+	/**

+	 * Initializes the tag manager for the given VIATRA Framework instance.

+	 */

+	public void init(IFramework fw);

+	

+	/**

+	 * Gets the tags for a given model element.

+	 * @param me

+	 * @return

+	 */

+	public Set<ITag> getTagsForModelElement(IModelElement me);

+	

+	/**

+	 * Gets all tags.

+	 * @return

+	 */

+	public Set<ITag> getAllTags();

+	

+	/**

+	 * Adds a tag.

+	 * @param me

+	 * @param tag

+	 */

+	public void addTag(ITag tag);

+	

+	/**

+	 * Clear all tags for a given model element.

+	 * All tags that are attached to this model element will be removed.

+	 * @param me

+	 */

+	public void clearTags(IModelElement me);

+	

+	/**

+	 * Clears all tags corresponding to a given kind.

+	 * @param kind

+	 */

+	public void clearTags(TagKind kind);

+	

+	/**

+	 * Clears all tags.

+	 */

+	public void clearAllTags();

+	

+	/**

+	 * Removes a given tag.

+	 */

+	public void clearTag(ITag tag);

+	

+	/**

+	 * Resets the problem manager and recomputes modelspace problem tags.

+	 */

+	public void resetProblemManager();

+	

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/tags/InfoTag.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/tags/InfoTag.java
new file mode 100644
index 0000000..bd1bd64
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/tags/InfoTag.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2010, Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.tags;

+

+import java.util.Set;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.viatra2.core.IModelElement;
+

+/**

+ * An annotation object that can be attached to a set of VPM model elements.

+ * @author Istvan Rath

+ *

+ */

+public class InfoTag implements ITag 

+{

+

+	public InfoTag(String message, Set<IModelElement> associatedElements, int foreground, int background) 

+	{

+		this.message = message;

+		this.associatedElements = associatedElements;

+		this.bColor = background;

+		this.fColor = foreground;

+	}

+	

+	

+	

+	public void setAssociatedElements(Set<IModelElement> associatedElements) {

+		this.associatedElements = associatedElements;

+	}

+

+

+	public void setMessage(String message) {

+		this.message = message;

+	}

+

+

+

+	protected Set<IModelElement> associatedElements;

+	

+	protected String message;

+	

+	public Set<IModelElement> getAssociatedElements()

+	{

+		return associatedElements;

+	}

+

+

+	public TagKind getKind() {

+		return TagKind.MODELING_INFO;

+	}

+

+

+	public String getMessage() {

+		return message;

+	}

+

+	protected IMarker marker;

+	

+

+	public IMarker getMarker() {

+		return marker;

+	}

+

+

+	public void setMarker(IMarker marker) {

+		this.marker = marker;

+	}

+	

+	private int bColor;

+

+	private int fColor;

+	

+	public int getForegroundColor() {

+		return fColor;

+	}

+	

+	public int getBackgroundColor() {

+		return bColor;

+	}

+

+	public void setForegroundColor(int c) {

+		this.fColor = c;

+	}

+	

+	public void setBackgroundColor(int c) {

+		this.bColor = c;

+	}

+	

+	

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/tags/TagKind.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/tags/TagKind.java
new file mode 100644
index 0000000..a2a7e2b
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/tags/TagKind.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2010, Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.tags;

+

+/**

+ * 

+ * @author Istvan

+ *

+ */

+public enum TagKind {

+	/**

+	 * Corresponds to a modeling problem, e.g. type inconsistency, containment violation,

+	 * multiplicity violation. 

+	 */

+	MODELING_PROBLEM,

+	

+	/**

+	 * Corresponds to an information attachment, e.g. generated by static model analyzers.

+	 */

+	MODELING_INFO

+	

+}

diff --git a/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/tags/impl/TagManager.java b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/tags/impl/TagManager.java
new file mode 100644
index 0000000..e5a3302
--- /dev/null
+++ b/org.eclipse.viatra2.core2/src/org/eclipse/viatra2/tags/impl/TagManager.java
@@ -0,0 +1,240 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.tags.impl;

+

+import java.util.HashMap;

+import java.util.HashSet;

+import java.util.Set;

+

+import org.eclipse.core.resources.IFile;

+import org.eclipse.core.resources.IMarker;

+import org.eclipse.core.resources.IResource;

+import org.eclipse.core.resources.ResourcesPlugin;

+import org.eclipse.core.runtime.CoreException;

+import org.eclipse.core.runtime.Path;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.framework.IFramework;

+import org.eclipse.viatra2.modelChecker.impl.ProblemManager;

+import org.eclipse.viatra2.tags.ITag;

+import org.eclipse.viatra2.tags.ITagManager;

+import org.eclipse.viatra2.tags.TagKind;

+

+/**

+ * Tag manager implementation.

+ * @author Istvan Rath

+ *

+ */

+public class TagManager implements ITagManager 

+{

+

+	private HashMap<IModelElement, HashSet<ITag>> mE_tags = new HashMap<IModelElement, HashSet<ITag>>();

+	private HashSet<ITag> allTags = new HashSet<ITag>();

+

+	private IFile iFile;

+	

+	private IFramework fw;

+	

+	private ProblemManager problemManager;

+	

+	public void addTag(ITag tag) {

+		allTags.add(tag);

+		for (IModelElement me : tag.getAssociatedElements())

+		{

+			HashSet<ITag> me_tags = mE_tags.get(me);

+			if (me_tags==null)

+			{

+				me_tags = new HashSet<ITag>();

+				mE_tags.put(me, me_tags);

+			}

+			me_tags.add(tag);

+		}

+		

+		// add marker

+		try

+		{

+			String markerType;

+			int markerSeverity;

+			if (tag.getKind().equals(TagKind.MODELING_PROBLEM))

+			{

+				markerType = IMarker.PROBLEM;

+				markerSeverity = IMarker.SEVERITY_ERROR;

+			}

+			else //if (tag.getKind().equals(TagKind.MODELING_INFO))

+			{

+				markerType = IMarker.PROBLEM;

+				markerSeverity = IMarker.SEVERITY_INFO;

+			}

+			String affectedFQNs = "";

+			for (IModelElement me : tag.getAssociatedElements())

+			{

+				affectedFQNs += me.getFullyQualifiedName()+";";

+			}

+			IMarker marker = iFile.createMarker(markerType);

+			marker.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_NORMAL);

+			marker.setAttribute(IMarker.SEVERITY, markerSeverity);

+			marker.setAttribute(IMarker.MESSAGE, tag.getMessage());

+			marker.setAttribute(IMarker.USER_EDITABLE, false);

+			marker.setAttribute(IMarker.LOCATION, affectedFQNs);

+			tag.setMarker(marker);

+		}

+		catch (CoreException e)

+		{

+			fw.getLogger().error("[TagManager::clearAddTag()]"+e.getMessage());

+		}

+	}

+

+	public void clearAllTags() 

+	{

+		this.fw.getTopmodel().getTransactionManager().beginTransaction();

+		allTags.clear();

+		for (IModelElement me : mE_tags.keySet())

+		{

+			mE_tags.get(me).clear();

+		}

+		try {

+			iFile.deleteMarkers(IMarker.MARKER, true, IResource.DEPTH_INFINITE);

+		} catch (CoreException e) {

+			fw.getLogger().error("[TagManager::clearAllTags()]"+e.getMessage());

+		}

+		this.fw.getTopmodel().getTransactionManager().commitTransaction();

+	}

+	

+	private void clearAllProblemTags()

+	{

+		this.fw.getTopmodel().getTransactionManager().beginTransaction();

+		try {

+			if (iFile!=null)

+			{

+			iFile.deleteMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);

+			}

+		} catch (CoreException e) {

+			fw.getLogger().error("[TagManager::clearAllProblemTags()]"+e.getMessage());

+		}		

+		this.fw.getTopmodel().getTransactionManager().commitTransaction();

+	}

+

+	public void clearTag(ITag t)

+	{

+		if (t!=null)

+		{

+			try {

+				t.getMarker().delete();

+			} catch (CoreException e) 

+			{

+				fw.getLogger().error("[TagManager::clearTag(t)]"+e.getMessage());

+			}

+			allTags.remove(t);

+				

+			for (IModelElement _me : t.getAssociatedElements())

+			{

+				mE_tags.get(_me).remove(t);

+			}

+		}

+	}

+	

+	public void clearTags(IModelElement me) 

+	{

+		HashSet<ITag> t = mE_tags.get(me);

+		HashSet<ITag> filter = new HashSet<ITag>();

+		if (t!=null)

+		{

+			for (ITag tt : t)

+			{

+				if (tt.getMarker()!=null)

+				{

+					try {

+						tt.getMarker().delete();

+					} catch (CoreException e) 

+					{

+						fw.getLogger().error("[TagManager::clearTags(me)]"+e.getMessage());

+					}

+				}

+				filter.add(tt);

+				allTags.remove(tt);

+			}

+			t.clear();

+			

+			// clear tags from referenced model elements as well

+			for (ITag _t : filter)

+			{

+				for (IModelElement _me : _t.getAssociatedElements())

+				{

+					mE_tags.get(_me).remove(_t);

+				}

+			}

+		}

+		

+	}

+

+	public void clearTags(TagKind kind) 

+	{

+

+		HashSet<ITag> filter = new HashSet<ITag>();

+		for (ITag t : allTags)

+		{

+			if (t.getKind().equals(kind))

+			{

+				filter.add(t);

+			}

+		}

+		allTags.removeAll(filter);

+		

+		filter.clear();

+		for (IModelElement me : mE_tags.keySet())

+		{

+			for (ITag tt : mE_tags.get(me))

+			{

+				if (tt.getKind().equals(kind))

+				{

+					filter.add(tt);

+				}

+			}

+			mE_tags.get(me).removeAll(filter);

+		}

+		

+		for (ITag ttt : filter)

+		{

+			try {

+				if (ttt.getMarker().exists())

+					ttt.getMarker().delete();

+			} catch (CoreException e) {

+				fw.getLogger().error("[TagManager::clearTags(tagKind)] "+e.getMessage());

+			}

+		}

+

+	}

+	

+	public Set<ITag> getAllTags() {

+		return allTags;

+	}

+

+	public Set<ITag> getTagsForModelElement(IModelElement me) {

+		return mE_tags.get(me);

+	}

+

+	public void init(IFramework fw) 

+	{

+		//fw.getProperties().getRuntimeProperty(providerID, propid)

+		this.fw = fw;

+		iFile = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(fw.getCurrentFilename()));

+		clearAllProblemTags();

+		problemManager = new ProblemManager();

+		problemManager.init(fw);

+	}

+

+	

+	public void resetProblemManager() 

+	{

+		problemManager.fullCheck();

+	}

+

+

+}

diff --git a/org.eclipse.viatra2.editor.text/.classpath b/org.eclipse.viatra2.editor.text/.classpath
new file mode 100644
index 0000000..ad32c83
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.viatra2.editor.text/.project b/org.eclipse.viatra2.editor.text/.project
new file mode 100644
index 0000000..76333df
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.viatra2.editor.text</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.viatra2.editor.text/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra2.editor.text/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..f7435ab
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Wed Jan 12 11:17:10 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/org.eclipse.viatra2.editor.text/META-INF/MANIFEST.MF b/org.eclipse.viatra2.editor.text/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..f965f43
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: VIATRA2 R3 Textual Editor Plug-in
+Bundle-SymbolicName: org.eclipse.viatra2.editor.text;singleton:=true
+Bundle-Version: 3.3.0.qualifier
+Bundle-Activator: org.eclipse.viatra2.editor.text.Activator
+Bundle-Vendor: Istvan Rath / BUTE-FTSRG
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.viatra2.core2,
+ org.eclipse.viatra2.loaders.vtcl_lpgparser,
+ org.eclipse.ui.ide,
+ org.eclipse.core.resources,
+ org.eclipse.jface.text,
+ org.eclipse.ui.editors,
+ org.eclipse.ui.workbench.texteditor,
+ org.eclipse.viatra2.gtasm.model,
+ org.eclipse.viatra2.gui
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: org.eclipse.viatra2.editor.text.light
diff --git a/org.eclipse.viatra2.editor.text/about.html b/org.eclipse.viatra2.editor.text/about.html
new file mode 100644
index 0000000..1262b8c
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/about.html
@@ -0,0 +1,28 @@
+<!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>About</title>

+</head>

+<body lang="EN-US">

+<h2>About This Content</h2>

+ 

+<p>July 4th, 2008</p>	

+<h3>License</h3>

+

+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 

+indicated below, the Content 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 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>If you did not receive this Content directly from the Eclipse Foundation, the Content is 

+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may

+apply to your use of any object code in the Content.  Check the Redistributor's license that was 

+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise

+indicated below, the terms and conditions of the EPL still apply to any source code in the Content

+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>

+

+</body>

+</html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.editor.text/build.properties b/org.eclipse.viatra2.editor.text/build.properties
new file mode 100644
index 0000000..44bef21
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/build.properties
@@ -0,0 +1,10 @@
+output.. = bin/
+bin.includes = META-INF/,\
+               plugin.xml,\
+               icons/,\
+               about.html,\
+               templates/,\
+               .
+source.. = src/
+src.includes = icons/,\
+               templates/
diff --git a/org.eclipse.viatra2.editor.text/icons/parse.png b/org.eclipse.viatra2.editor.text/icons/parse.png
new file mode 100644
index 0000000..ba47022
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/icons/parse.png
Binary files differ
diff --git a/org.eclipse.viatra2.editor.text/icons/vtcl.png b/org.eclipse.viatra2.editor.text/icons/vtcl.png
new file mode 100644
index 0000000..cadd6c9
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/icons/vtcl.png
Binary files differ
diff --git a/org.eclipse.viatra2.editor.text/icons/vtml.png b/org.eclipse.viatra2.editor.text/icons/vtml.png
new file mode 100644
index 0000000..ecb862d
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/icons/vtml.png
Binary files differ
diff --git a/org.eclipse.viatra2.editor.text/plugin.xml b/org.eclipse.viatra2.editor.text/plugin.xml
new file mode 100644
index 0000000..df9a048
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/plugin.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+<extension
+         point="org.eclipse.ui.editors">
+      <editor
+            name="VIATRA2 Lightweight VTML Editor"
+            extensions="vtml"
+            icon="icons/vtml.png"
+            class="org.eclipse.viatra2.editor.text.light.VTMLEditor"

+            contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
+            id="org.eclipse.viatra2.editor.text.light.VTMLEditor">
+      </editor>
+
+      <editor
+            name="VIATRA2 Lightweight VTCL Editor"
+            extensions="vtcl"
+            icon="icons/vtcl.png"
+            class="org.eclipse.viatra2.editor.text.light.VTCLEditor"
+            contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"

+            id="org.eclipse.viatra2.editor.text.light.VTCLEditor">
+      </editor>
+
+   </extension>
+
+   <extension
+         point="org.eclipse.ui.bindings">
+      <key
+            commandId="org.eclipse.viatra2.editor.text.loadCommand"
+            contextId="org.eclipse.ui.textEditorScope"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="Alt+P"/>
+      <key
+            commandId="org.eclipse.viatra2.editor.text.runCommand"
+            contextId="org.eclipse.ui.textEditorScope"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="Alt+R">
+      </key>
+   </extension>
+   <extension
+         point="org.eclipse.ui.commands">
+      <category
+            id="org.eclipse.viatra2.editor.text.category"
+            name="VIATRA2 Commands"/>
+      <command
+            id="org.eclipse.viatra2.editor.text.loadCommand"
+            name="Parse"/>
+      <command
+            id="org.eclipse.viatra2.editor.text.runCommand"
+            name="Run">
+      </command>
+   </extension>
+   <extension
+         point="org.eclipse.viatra2.gui.fileTemplate">
+      <templateReference
+            description="The popular &quot;Hello world&quot; example in VTCL."
+            extension="vtcl"
+            name="VTCL Hello world"
+            templateFile="templates/helloworld.vtcl.jet">
+         <templateParameter
+               defaultValue="helloworld"
+               description="The name of the VTCL machine."
+               name="machineName">
+         </templateParameter>
+         <templateParameter
+               defaultValue="Hello VIATRA2 world!"
+               description="The message to print to the output."
+               name="message">
+         </templateParameter>
+      </templateReference>
+      <templateReference
+            description="The Datatypes metamodel by Daniel Varro."
+            extension="vtml"
+            name="VTML Datatypes metamodel"
+            templateFile="templates/datatypes.vtml.jet">
+      </templateReference>
+   </extension>
+   <extension
+         point="org.eclipse.ui.newWizards">
+      <wizard
+            canFinishEarly="false"
+            category="org.eclipse.viatra2.wizards"
+            class="org.eclipse.viatra2.editor.text.wizards.NewVTCLWizard"
+            finalPerspective="org.eclipse.viatra2.gui.perspective"
+            hasPages="true"
+            icon="icons/vtcl.png"
+            id="org.eclipse.viatra2.editor.text.wizard.vtcl"
+            name="VIATRA2 Textual Command Language script">
+      </wizard>
+      <wizard
+            canFinishEarly="false"
+            category="org.eclipse.viatra2.wizards"
+            class="org.eclipse.viatra2.editor.text.wizards.NewVTMLWizard"
+            finalPerspective="org.eclipse.viatra2.gui.perspective"
+            hasPages="true"
+            icon="icons/vtml.png"
+            id="org.eclipse.viatra2.editor.text.wizard.vtml"
+            name="VIATRA2 Textual Modeling Language script">
+      </wizard>
+   </extension>

+   <extension

+         id="org.eclipse.viatra2.loaders.vtclparsermarker"

+         name="VTCL Parsing Problems"

+         point="org.eclipse.core.resources.markers">

+      <super

+            type="org.eclipse.core.resources.problemmarker">

+      </super>

+      <persistent

+            value="true">

+      </persistent>
+      <super
+            type="org.eclipse.core.resources.textmarker">
+      </super>

+   </extension>
+
+</plugin>
diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/Activator.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/Activator.java
new file mode 100644
index 0000000..7a859cd
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/Activator.java
@@ -0,0 +1,149 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text;

+

+import java.util.HashSet;

+

+import org.eclipse.viatra2.editor.text.light.VTCLEditor;

+import org.eclipse.viatra2.editor.text.light.VTMLEditor;

+import org.eclipse.jface.resource.ImageDescriptor;

+import org.eclipse.ui.plugin.AbstractUIPlugin;

+import org.eclipse.viatra2.framework.FrameworkManager;

+import org.eclipse.viatra2.framework.IFramework;

+import org.eclipse.viatra2.framework.IFrameworkListChangedListener;

+import org.osgi.framework.BundleContext;

+

+/**

+ * The activator class controls the plug-in life cycle

+ */

+public class Activator extends AbstractUIPlugin implements IFrameworkListChangedListener {

+

+	// The plug-in ID

+	public static final String PLUGIN_ID = "org.eclipse.viatra2.editor.text";

+

+	// The shared instance

+	private static Activator plugin;

+	

+	/**

+	 * The constructor

+	 */

+	public Activator() {

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)

+	 */

+	public void start(BundleContext context) throws Exception {

+		super.start(context);

+		plugin = this;

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)

+	 */

+	public void stop(BundleContext context) throws Exception {

+		plugin = null;

+		super.stop(context);

+	}

+

+	/**

+	 * Returns the shared instance

+	 *

+	 * @return the shared instance

+	 */

+	public static Activator getDefault() {

+		return plugin;

+	}

+

+	public static ImageDescriptor getImageDescriptor(String path) {

+		return AbstractUIPlugin.imageDescriptorFromPlugin(

+				"org.eclipse.viatra2.editor.text", path);

+	}

+	

+	boolean listenerRegistered = false;

+	

+	HashSet<VTCLEditor> editors = new HashSet<VTCLEditor>();

+	

+	protected VTCLEditor iCurrentVTCLEditor;

+	

+	protected VTMLEditor iCurrentVTMLEditor;

+	

+	public VTCLEditor getCurrentVTCLEditor()

+	{

+		return iCurrentVTCLEditor;

+	}

+	

+	public void setCurrentVTCLEditor(VTCLEditor ed)

+	{

+		if (!listenerRegistered)

+		{

+			FrameworkManager.getInstance().addFrameworkListChangedListener(this);

+			listenerRegistered = true;

+		}

+		iCurrentVTCLEditor = ed;

+		if (!editors.contains(ed))

+		{

+			addEditor(ed);

+		}

+	}

+	

+	public void addEditor(VTCLEditor ed)

+	{

+		editors.add(ed);

+	}

+	

+	public void removeEditor(VTCLEditor ed)

+	{

+		editors.remove(ed);

+	}

+	

+	public VTMLEditor getCurrentVTMLEditor()

+	{

+		return iCurrentVTMLEditor;

+	}

+	

+	public void setCurrentVTMLEditor(VTMLEditor ed)

+	{

+		iCurrentVTMLEditor = ed;

+	}

+

+	public void frameworkAdded(IFramework f) {

+		/*

+		for (VTCLEditor e : editors)

+		{

+			if (e.getAttachedFramework()==null)

+			{

+				e.setAttachedFramework(f);

+				//e.attachEditor(); // refresh title

+				e.refreshTitle();

+				e.parseOnSave();

+			}

+		}

+		*/

+	}

+

+	public void frameworkRemoved(IFramework f) 

+	{

+		for (VTCLEditor e : editors)

+		{

+			if (f.equals(e.getAttachedFramework()))

+			{

+				e.setAttachedFramework(null); // signal editor that the framework has been removed

+				//e.attachEditor(); // refresh title

+				e.refreshTitle();

+			}

+		}

+	}

+	

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/IVTEConstants.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/IVTEConstants.java
new file mode 100644
index 0000000..832bafe
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/IVTEConstants.java
@@ -0,0 +1,203 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light;

+

+

+public interface IVTEConstants 

+{

+	

+	public static String[] vtmlKeywords= {

+		"namespace","import","instanceOf",		

+		"typeOf","supertypeOf","subtypeOf",

+		"isFinalType","isAggregation","isAnySource",

+		"isAnyTarget","inverse","multiplicity",

+		"true","false","entity","relation",

+		"many_to_many","many_to_one","one_to_many",

+		"one_to_one"};

+	

+	public static String[] vtmlimpkeyid= {

+		"import","instanceOf","typeOf",

+		  "supertypeOf","subtypeOf",

+		  "isFinalType","isAggregation","isAnySource",

+			"isAnyTarget","inverse","multiplicity",

+			"true","false","entity","relation"

+	};

+	

+	public static String[] vtmlkeyid= {

+		  "instanceOf","typeOf",

+		  "supertypeOf","subtypeOf",

+		  "isFinalType","isAggregation","isAnySource",

+		  "isAnyTarget","inverse","multiplicity",

+		  "true","false","entity","relation"

+	};

+	

+	public static String[] vtmlinsideMult = 

+	{

+		"many_to_many","many_to_one","one_to_many",

+		"one_to_one"

+	};

+	

+	public static String[] vtmltruefalse = 

+	{

+		"true","false"

+	};

+	
+	// what about ref(), toDouble() etc? they are not native functions, are they keywords?... 

+	public static String[] vtclKeywords= {

+		"namespace", "import","instanceOf","typeOf","supertypeOf",
+		"subtypeOf", "contains","entity","relation",
+		"undef","true","false",
+		"many_to_many","many_to_one","one_to_many","one_to_one",
+		"rule","fail","in","out","inout",

+		"update","seq","print","println","log","fatal","error","warning",

+		"info","exists","try","if","else","parallel",

+		"random","forall","with","do","below","apply","choose",

+		"iterate","let","call","new","delete","setValue","rename",

+		"move","setFrom","setTo","copy","asmfunction","gtrule",

+		"precondition","postcondition","action","find","pattern",

+		"or","check","neg","transformation","machine","skip",

+		"setAnySource","setAnyTarget","setMultiplicity","setAggregation",

+		"setInverse", "shareable", "copy_boundary_edges", "skip_boundary_edges"};

+	

+	public static String[] vtcloutside1 = {

+		"namespace","import","transformation","machine"};

+	

+	public static String[] vtcloutside2 = {

+		"import","transformation","machine"

+	};

+	public static String[] vtcloutside3 = {

+		"transformation","machine"

+	};

+	

+	public static String[] vtclinasmdef = {

+		"rule","gtrule","asmfunction","pattern"

+	};

+	

+	public static String[] vtclinrulebody = {

+		"update","seq","print","println","log","exists","try","if","else","parallel",

+		"random","forall","with","do","below","apply","choose",

+		"iterate","let","call","new","delete","setValue","rename",

+		"move","setFrom","setTo","copy","fail","setAnySource",

+		"setAnyTarget","setMultiplicity","setAggregation","setInverse"		

+	};

+	

+	public static String[] vtclingtrule = {

+		"precondition","postcondition","action"

+	};

+	

+	public static String[] vtclingtpatternbody = {

+		"instanceOf","typeOf","supertypeOf",

+		"subtypeOf","check","neg","find","pattern"

+	};

+	

+	public static String[] vtclafterfind = {

+		"in","below"

+	};

+	

+	public static String[] vtclafterapply = {

+		"in","below"

+	};

+	

+	public static String[] vtclafterprepostc = {

+		"find","pattern"

+	};

+	

+	public static String[] vtclinlogrule = {

+		"fatal","error","warning","info","debug"

+	};

+	

+	public static String[] vtclin = {

+		"in"

+	};

+	

+	public static String[] vtclinforall = {

+		"with","do"

+	};

+	

+	public static String[] vtclinbelow = {

+		"in","below"

+	};

+	

+	public static String[] vtclinout = {

+		"in","out","inout"

+	};

+	

+	

+	

+	String DEFAULT = "default";	

+	String KEYWORD = "keyword";	

+	String STRING = "string";	

+	String COMMENT = "comment";

+

+	String PREFIX = "VTMLEditor" + ".";

+	String PREFIX_COLOR = PREFIX + "color.";

+	/** color for default vte text */

+	String COLOR_DEFAULT = PREFIX_COLOR + DEFAULT;

+	/** color for vte keyword text */

+	String COLOR_KEYWORD = PREFIX_COLOR + KEYWORD;

+	/** color for vte string text */

+	String COLOR_STRING = PREFIX_COLOR + STRING;

+	/** color for vte comment text */

+	String COLOR_COMMENT = PREFIX_COLOR + COMMENT;

+	

+	

+	static final boolean KEYWORD_BOLD		= true;

+	static final boolean TYPE_KEYWORD_BOLD	= true;

+	static final boolean CONSTANT_BOLD		= true;

+

+	static final boolean COMMENT_BOLD		= false;

+	static final boolean STRING_BOLD		= false;

+	static final boolean DEFAULT_BOLD		= false;

+

+	static final boolean KEYWORD_ITALIC		= true;

+	static final boolean TYPE_KEYWORD_ITALIC= true;

+	static final boolean CONSTANT_ITALIC	= true;

+

+	static final boolean COMMENT_ITALIC		= false;

+	static final boolean STRING_ITALIC		= false;

+

+	static final boolean DEFAULT_ITALIC		= false;

+

+	public static final String EDITOR_COMMENT_COLOR = "__vte_comment_color";

+	public static final String EDITOR_COMMENT_BOLD  = "__vte_comment_bold";

+	public static final String EDITOR_COMMENT_ITALIC  = "__vte_comment_italic";

+

+	public static final String EDITOR_STRING_COLOR = "__vte_string_color";

+	public static final String EDITOR_STRING_BOLD = "__vte_string_bold";

+	public static final String EDITOR_STRING_ITALIC = "__vte_string_italic";	

+

+	public static final String EDITOR_KEYWORD_COLOR = "__vte_keyword_color";

+	public static final String EDITOR_KEYWORD_BOLD = "__vte_keyword_bold";

+	public static final String EDITOR_KEYWORD_ITALIC = "__vte_keyword_italic";	

+

+	public static final String EDITOR_DEFAULT_COLOR = "__vte_other_color";

+	public static final String EDITOR_DEFAULT_BOLD = "__vte_other_bold";

+	public static final String EDITOR_DEFAULT_ITALIC = "__vte_other_italic";

+

+	 // keep in same order as ColorToken.getTokens()

+	public static final String[] preferences = new String[] {

+			EDITOR_DEFAULT_COLOR,      EDITOR_DEFAULT_BOLD,      EDITOR_DEFAULT_ITALIC,

+			EDITOR_KEYWORD_COLOR,      EDITOR_KEYWORD_BOLD,      EDITOR_KEYWORD_ITALIC,			

+			EDITOR_STRING_COLOR,       EDITOR_STRING_BOLD,       EDITOR_STRING_ITALIC,			

+			EDITOR_COMMENT_COLOR,      EDITOR_COMMENT_BOLD,      EDITOR_COMMENT_ITALIC,

+	};

+	

+	public static final String editorHighlight[][] = {

+		{"Default", EDITOR_DEFAULT_COLOR, EDITOR_DEFAULT_BOLD, EDITOR_DEFAULT_ITALIC },		

+		{"Keyword", EDITOR_KEYWORD_COLOR, EDITOR_KEYWORD_BOLD, EDITOR_KEYWORD_ITALIC },		

+		{"Strings", EDITOR_STRING_COLOR, EDITOR_STRING_BOLD, EDITOR_STRING_ITALIC },

+		{"Comment", EDITOR_COMMENT_COLOR, EDITOR_COMMENT_BOLD, EDITOR_COMMENT_ITALIC } 

+};

+

+

+	

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTCLActionbarContributor.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTCLActionbarContributor.java
new file mode 100644
index 0000000..887f4a4
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTCLActionbarContributor.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light;

+

+import org.eclipse.viatra2.editor.text.Activator;

+import org.eclipse.viatra2.editor.text.light.vtcl.ParseVTCLAction;

+

+import java.util.HashMap;

+

+import org.eclipse.jface.action.Action;

+import org.eclipse.jface.action.IAction;

+import org.eclipse.jface.action.IMenuCreator;

+import org.eclipse.jface.action.IToolBarManager;

+import org.eclipse.swt.SWT;

+import org.eclipse.swt.events.SelectionEvent;

+import org.eclipse.swt.events.SelectionListener;

+import org.eclipse.swt.widgets.Control;

+import org.eclipse.swt.widgets.Menu;

+import org.eclipse.swt.widgets.MenuItem;

+import org.eclipse.ui.texteditor.BasicTextEditorActionContributor;

+import org.eclipse.viatra2.framework.FrameworkManager;

+

+public class VTCLActionbarContributor extends BasicTextEditorActionContributor

+{

+

+	protected HashMap<String, ParseVTCLAction> actions;

+		

+	public VTCLActionbarContributor() {

+		super();

+		actions = new HashMap<String, ParseVTCLAction>();

+	}

+

+	public void updateActions(VTCLEditor ed)

+	{

+		for (String id : FrameworkManager.getInstance().getAllFrameWorks())

+		{

+			if (actions.get(id)==null)

+				actions.put(id, new ParseVTCLAction(id).updateSelf(ed));

+			else

+				actions.get(id).updateSelf(ed);

+		}

+	}

+	

+	@Override

+	public void contributeToToolBar(IToolBarManager toolBarManager) {

+		super.contributeToToolBar(toolBarManager);

+//		String[] fwids = FrameworkManager.getInstance().getAllFrameWorks();

+//		if (fwids.length>1)

+//		{

+			Action a = new Action("Parse / Select framework",IAction.AS_DROP_DOWN_MENU)

+			{

+				@Override

+				public void run() {}

+			};

+			a.setImageDescriptor(Activator.getImageDescriptor("icons/parse.png"));

+			a.setToolTipText("Use Alt+P for parsing the current file into the first framework");

+			a.setMenuCreator(new IMenuCreator()

+			{

+				public void dispose() {}

+	

+				public Menu getMenu(Control parent) {

+					Menu m = new Menu(parent);

+					return fillMenu(m);

+				}

+	

+				public Menu getMenu(Menu parent) {

+					Menu m = new Menu(parent);

+					return fillMenu(m);

+				}

+				

+				private Menu fillMenu(Menu m)

+				{

+					for (String id : FrameworkManager.getInstance().getAllFrameWorks())

+					{

+						MenuItem item = new MenuItem(m,SWT.NONE);

+						item.setText(id);

+						item.setData(actions.get(id));

+						item.addSelectionListener(new SelectionListener()

+						{

+							public void widgetSelected(SelectionEvent ev)

+							{

+								((ParseVTCLAction)ev.widget.getData()).run();

+							}

+

+							public void widgetDefaultSelected(SelectionEvent ev) {

+								((ParseVTCLAction)ev.widget.getData()).run();

+							}

+						});

+					}

+					return m;

+				}

+				

+			});

+			toolBarManager.add(a);

+//		}

+//		else

+//		{

+//			if (fwids.length==1)

+//				toolBarManager.add(actions.get(FrameworkManager.getInstance().getAllFrameWorks()[0]));

+//		}

+		

+	}

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTCLEditor.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTCLEditor.java
new file mode 100644
index 0000000..00126c8
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTCLEditor.java
@@ -0,0 +1,360 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light;

+

+

+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.text.PaintManager;
+import org.eclipse.jface.text.source.DefaultCharacterPairMatcher;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.MatchingCharacterPainter;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.dialogs.ListDialog;
+import org.eclipse.ui.editors.text.TextEditor;
+import org.eclipse.viatra2.editor.text.Activator;
+import org.eclipse.viatra2.editor.text.light.vtcl.QuickLoadVTCLAction;
+import org.eclipse.viatra2.editor.text.light.vtcl.QuickRunVTCLAction;
+import org.eclipse.viatra2.editor.text.light.vtcl.VTCLConfiguration;
+import org.eclipse.viatra2.errors.info.ErrorInformation;
+import org.eclipse.viatra2.errors.reporting.IErrorReporter;
+import org.eclipse.viatra2.framework.Framework;
+import org.eclipse.viatra2.framework.FrameworkManager;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module;
+import org.eclipse.viatra2.lpgparser.loader.VTCLParseController;
+import org.eclipse.viatra2.lpgparser.loader.VTCLParserManager;
+

+public class VTCLEditor extends TextEditor {

+

+	

+	private VTEColorProvider iColorProvider;

+	

+	protected QuickLoadVTCLAction iQuickParseAction;

+	

+	protected QuickRunVTCLAction iQuickRunAction;

+	

+	protected final static char[] BRACKETS = {'{', '}', '(', ')'};

+	

+	protected MatchingCharacterPainter fBracketPainter;

+	private PaintManager fPaintManager;

+

+	// -- Added by Daniel Varro

+	private VTCLParseController fParseController;

+	private IErrorReporter fMarkerManager;

+

+	@Override

+	public void createPartControl(Composite parent) 

+	{

+		super.createPartControl(parent);

+		fPaintManager = new PaintManager(getSourceViewer());

+		startBracketHighlighting();	

+		// -- Added by Daniel Varro		
+		fParseController = null;   

+	}

+	

+	

+

+	public IErrorReporter getMarkerManager() {
+		return fMarkerManager;
+	}
+
+
+
+	@Override

+	public void doSave(IProgressMonitor progressMonitor) {

+		super.doSave(progressMonitor);

+		attachEditor();

+		parseOnSave();

+	}

+

+	private IFramework attachedFramework;

+	

+	public IFramework getAttachedFramework()

+	{

+		return attachedFramework;

+	}

+	

+	public void setAttachedFramework(IFramework fw)

+	{

+		attachedFramework = fw;

+	}

+	

+	private Module module;

+	

+	public Module getModule()

+	{

+		return module;

+	}

+	

+	@Override

+	public String getPartName() {

+		String t = super.getPartName();

+		if (attachedFramework!=null)

+		{

+			t+= " ("+attachedFramework.getId()+")";

+		}

+//		else

+//		{

+//			t+= " (?)";

+//		}

+		return t;

+	}

+

+	private void startBracketHighlighting() 

+	{

+		if (fBracketPainter == null) 

+		{

+			ISourceViewer sourceViewer = getSourceViewer();

+			fBracketPainter = new MatchingCharacterPainter(sourceViewer, new DefaultCharacterPairMatcher(BRACKETS));

+			fBracketPainter.setColor(new Color(null,0,0,128));

+			fPaintManager.addPainter(fBracketPainter);

+		}

+	}

+		

+	private void stopBracketHighlighting() 

+	{

+		if (fBracketPainter != null) {

+			fPaintManager.removePainter(fBracketPainter);

+			fBracketPainter.deactivate(true);

+			fBracketPainter.dispose();

+			fBracketPainter = null;

+		}

+	} 

+	

+	public ISourceViewer getViewer() {

+		return getSourceViewer();

+	}

+	

+	public VTCLEditor() {

+		super();

+		iColorProvider = new VTEColorProvider();

+		setSourceViewerConfiguration(new VTCLConfiguration(iColorProvider));

+	}

+	

+	@Override

+	protected void createActions() {

+		super.createActions();

+		iQuickParseAction = new QuickLoadVTCLAction();

+		setAction("quickparse", iQuickParseAction);

+		iQuickRunAction = new QuickRunVTCLAction();

+		setAction("quickload", iQuickRunAction);

+//		iLPGParseVTCLAction = new LPGParseVTCLAction();

+//		setAction("lpgparse", iLPGParseVTCLAction);

+//		initializeContextMenu();

+	}

+	

+	public void updateActions()

+	{

+		//((VTCLActionbarContributor)getEditorSite().getActionBarContributor()).updateActions(this);

+		//getEditorSite().getActionBars().getToolBarManager().update(true);

+		//getEditorSite().getActionBars().updateActionBars();

+	}	

+		

+	@Override

+	public void setFocus() {

+		super.setFocus();

+		updateActions();

+		Activator.getDefault().setCurrentVTCLEditor(this);

+	}

+	

+	@Override
+	public void dispose() {

+		iColorProvider.dispose();

+		stopBracketHighlighting();

+		Activator.getDefault().removeEditor(this);

+		super.dispose();

+	}

+	

+	public void attachEditor()

+	{

+		if (attachedFramework==null)

+		{

+			final String[] allfws = FrameworkManager.getInstance().getAllFrameWorks();

+			if (allfws.length<1)

+			{

+				firePropertyChange(PROP_TITLE);

+				return;

+			}

+			else if (allfws.length == 1)

+			{

+				attachedFramework = FrameworkManager.getInstance().getFramework(allfws[0]);	

+				firePropertyChange(PROP_TITLE);

+			}

+			else

+			{

+				final ListDialog dialog = new ListDialog(this.getSite().getShell());

+				dialog.setTitle("Select modelspace to attach");

+				dialog.setAddCancelButton(true);

+				dialog.setBlockOnOpen(true);

+				dialog.setLabelProvider(new LabelProvider() {
+
+					/* (non-Javadoc)
+					 * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+					 */
+					@Override
+					public String getText(Object element) {
+						Framework framework = FrameworkManager.getInstance().getFramework((String)element);
+						String filename = framework.getCurrentFilename();
+						filename = filename.substring(filename.lastIndexOf('/')+1);
+						return super.getText(element) + " (" + filename + ")";
+					}
+					
+				});

+				dialog.setContentProvider(new IStructuredContentProvider(){

+					public Object[] getElements(Object inputElement){return allfws;}

+					public void dispose(){}

+					public void inputChanged(Viewer viewer, Object oldInput,Object newInput){}

+				});

+				dialog.setInput("blablabla");

+				int result = dialog.open();

+				if (result == ListDialog.OK)

+				{

+					Object[] o = dialog.getResult();

+					if (o!=null && o.length == 1)

+					{

+						String id = o[0].toString();

+						attachedFramework = FrameworkManager.getInstance().getFramework(id);	

+						firePropertyChange(PROP_TITLE);

+					}

+				}

+			}

+		}

+		else

+		{

+			firePropertyChange(PROP_TITLE);

+		}

+	}

+	

+	public void refreshTitle()

+	{

+		firePropertyChange(PROP_TITLE);

+	}

+	

+	public void parseOnSave() {

+//		attachEditor();

+		

+		if (attachedFramework!=null)

+		{

+			try {

+				// -- Changed by Daniel Varro

+				// Execute full parsing

+				executeParsing(false);
+				if (fParseController != null) {
+					if (!fParseController.hasErrors())
+					{
+						// perform load
+						if (fParseController.getModule()!=null)
+						{
+							// TODO: This code should be rewritten to accommodate the new MachineWrapper
+							// check if machine with same name exists
+							Machine newm = fParseController.getMachine();
+							// TODO: This code should be rewritten to accommodate the new MachineWrapper
+							Machine old = (Machine) attachedFramework.getMachineByFQN( newm.getFqn() );
+							if (old!=null)
+							{
+								// TODO: This code should be rewritten to accommodate the new MachineWrapper
+								// remove it
+								attachedFramework.removeMachine(old.getFqn());
+							}
+							// load new one
+							// TODO: This code should be rewritten to accommodate the new MachineWrapper
+							attachedFramework.addMachine(newm.getFqn(), newm);
+							this.module = fParseController.getModule();
+						}
+					}	
+					else {
+						if (fParseController.getMachine()!=null)
+						{
+							Machine old = (Machine) attachedFramework.getMachineByFQN( fParseController.getMachine().getFqn() );
+							if (old!=null)
+							{
+								// TODO: This code should be rewritten to accommodate the new MachineWrapper
+								// remove it
+								attachedFramework.removeMachine(old.getFqn());
+							}
+						}
+					}
+					
+				}
+				

+			} catch (Exception e) // TODO: This may be too generic

+			{

+				e.printStackTrace();

+				if (e.getMessage()!=null)	attachedFramework.getLogger().fatal(e.getMessage());

+			}

+		}

+	}

+

+	/**

+	 * Calls the VTCL parser for the current open file as input.

+	 * @param isParseOnly if true then no model building is carried out

+	 * @author Daniel Varro

+	 */

+	public void executeParsing(boolean isParseOnly) {

+		try {

+			IEditorInput editorInput= getEditorInput();

+			IFile file= null;

+			String fileName = null;

+

+			VTCLEditor iEditor = Activator.getDefault().getCurrentVTCLEditor();

+			if (iEditor == null) 

+				return;

+

+			if (editorInput instanceof IFileEditorInput) {

+				// Get the file name and the file itself

+				IFileEditorInput fileEditorInput= (IFileEditorInput) getEditorInput();

+				file= fileEditorInput.getFile();

+				fileName = file.getLocation().toOSString();

+				
+				

+				// Reinitialize markers
+				if (fMarkerManager != null) {

+					fMarkerManager.deleteMarkers(IMarker.PROBLEM);
+				}

+				fMarkerManager = (IErrorReporter) file.getAdapter(IErrorReporter.class);
+				

+				// Initialize parsing
+				VTCLParserManager parserManager = (VTCLParserManager) attachedFramework.getVTCLParserManager();
+				fParseController = parserManager.lookupAndCreateParseController(fileName);
+				// TODO: Check that parse controller is already initialized

+				//fParseController.initialize(fileName, attachedFramework);

+				// Execute parsing

+				if (isParseOnly) {

+					fParseController.parseOnly();

+				}

+				else {

+					fParseController.parseAndBuild();

+				}

+				// Refresh marker annotations

+				for (ErrorInformation error : fParseController.getErrors()) {

+					fMarkerManager.reportError(error);

+				}

+

+			} 

+

+

+		} catch (Exception e) {

+			if (e.getMessage()!=null)	attachedFramework.getLogger().fatal("Parsing failed for input " + getEditorInput().getName());

+		}

+

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTEAutoIndentStrategy.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTEAutoIndentStrategy.java
new file mode 100644
index 0000000..a59ddca
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTEAutoIndentStrategy.java
@@ -0,0 +1,300 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light;

+

+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DefaultIndentLineAutoEditStrategy;
+import org.eclipse.jface.text.DocumentCommand;
+import org.eclipse.jface.text.IDocument;
+

+public class VTEAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy {

+	/**

+	   * Method declared on IAutoIndentStrategy

+	   */

+	  public void customizeDocumentCommand(IDocument d, DocumentCommand c) {

+	    if (c.length == 0 && c.text != null && endsWithDelimiter(d, c.text))

+	      smartIndentAfterNewLine(d, c);

+	    else if ("}".equals(c.text)) {

+	      smartInsertAfterBracket(d, c);

+	    }

+

+	  }

+

+	  /**

+	   * Returns whether or not the text ends with one of the given search strings.

+	   */

+	  private boolean endsWithDelimiter(IDocument d, String txt) {

+	    String[] delimiters = d.getLegalLineDelimiters();

+	    for (int i = 0; i < delimiters.length; i++) {

+	      if (txt.endsWith(delimiters[i]))

+	        return true;

+	    }

+	    return false;

+	  }

+

+

+

+

+	  /**

+	   * Returns the line number of the next bracket after end.

+	   *

+	   * @return the line number of the next matching bracket after end

+	   * @param document - the document being parsed

+	   * @param line - the line to start searching back from

+	   * @param end - the end position to search back from

+	   * @param closingBracketIncrease - the number of brackets to skip

+	   */

+	  protected int findMatchingOpenBracket(

+	    IDocument document,

+	    int line,

+	    int end,

+	    int closingBracketIncrease)

+	    throws BadLocationException {

+	    int start = document.getLineOffset(line);

+	    int brackcount =

+	      getBracketCount(document, start, end, false) - closingBracketIncrease;

+

+	    // Sums up the brackets counts of each line (closing brackets count negative,

+	    // opening positive) until we find a line the brings the count to zero

+	    while (brackcount < 0) {

+	      line--;

+	      if (line < 0) {

+	        return -1;

+	      }

+	      start = document.getLineOffset(line);

+	      end = start + document.getLineLength(line) - 1;

+	      brackcount += getBracketCount(document, start, end, false);

+	    }

+	    return line;

+	  }

+

+	  /**

+	   * Returns the bracket value of a section of text. Closing brackets have a value of -1 and

+	   * open brackets have a value of 1.

+	   *

+	   * @return the line number of the next matching bracket after end

+	   * @param document - the document being parsed

+	   * @param start - the start position for the search

+	   * @param end - the end position for the search

+	   * @param ignoreCloseBrackets - whether or not to ignore closing brackets in the count

+	   */

+	  private int getBracketCount(

+	    IDocument document,

+	    int start,

+	    int end,

+	    boolean ignoreCloseBrackets)

+	    throws BadLocationException {

+	    int begin = start;

+	    int bracketcount = 0;

+	    while (begin < end) {

+	      char curr = document.getChar(begin);

+	      begin++;

+	      switch (curr) {

+	        case '/' :

+	          if (begin < end) {

+	            char next = document.getChar(begin);

+	            if (next == '*') {

+	              // a comment starts, advance to the comment end

+	              begin = getCommentEnd(document, begin + 1, end);

+	            } else if (next == '/') {

+	              // '//'-comment: nothing to do anymore on this line

+	              begin = end;

+	            }

+	          }

+	          break;

+	        case '*' :

+	          if (begin < end) {

+	            char next = document.getChar(begin);

+	            if (next == '/') {

+	              // we have been in a comment: forget what we read before

+	              bracketcount = 0;

+	              begin++;

+	            }

+	          }

+	          break;

+	        case '{' :

+	          bracketcount++;

+	          ignoreCloseBrackets = false;

+	          break;

+	        case '}' :

+	          if (!ignoreCloseBrackets) {

+	            bracketcount--;

+	          }

+	          break;

+	        case '"' :

+	        case '\'' :

+	          begin = getStringEnd(document, begin, end, curr);

+	          break;

+	        default :

+	          }

+	    }

+	    return bracketcount;

+	  }

+

+	  /**

+	   * Returns the end position a comment starting at pos.

+	   *

+	   * @return the end position a comment starting at pos

+	   * @param document - the document being parsed

+	   * @param position - the start position for the search

+	   * @param end - the end position for the search

+	   */

+	  private int getCommentEnd(IDocument document, int position, int end)

+	    throws BadLocationException {

+	    int currentPosition = position;

+	    while (currentPosition < end) {

+	      char curr = document.getChar(currentPosition);

+	      currentPosition++;

+	      if (curr == '*') {

+	        if (currentPosition < end

+	          && document.getChar(currentPosition) == '/') {

+	          return currentPosition + 1;

+	        }

+	      }

+	    }

+	    return end;

+	  }

+

+	  /**

+	   * Returns the String at line with the leading whitespace removed.

+	   *

+	   * @return the String at line with the leading whitespace removed.

+	   * @param document - the document being parsed

+	   * @param line - the line being searched

+	   */

+	  protected String getIndentOfLine(IDocument document, int line)

+	    throws BadLocationException {

+	    if (line > -1) {

+	      int start = document.getLineOffset(line);

+	      int end = start + document.getLineLength(line) - 1;

+	      int whiteend = findEndOfWhiteSpace(document, start, end);

+	      return document.get(start, whiteend - start);

+	    } else {

+	      return ""; //$NON-NLS-1$

+	    }

+	  }

+

+	  /**

+	   * Returns the position of the character in the document after position.

+	   *

+	   * @return the next location of character.

+	   * @param document - the document being parsed

+	   * @param position - the position to start searching from

+	   * @param end - the end of the document

+	   * @param character - the character you are trying to match

+	   */

+	  private int getStringEnd(

+	    IDocument document,

+	    int position,

+	    int end,

+	    char character)

+	    throws BadLocationException {

+	    int currentPosition = position;

+	    while (currentPosition < end) {

+	      char currentCharacter = document.getChar(currentPosition);

+	      currentPosition++;

+	      if (currentCharacter == '\\') {

+	        // ignore escaped characters

+	        currentPosition++;

+	      } else if (currentCharacter == character) {

+	        return currentPosition;

+	      }

+	    }

+	    return end;

+	  }

+

+	  /**

+	   * Sets the indent of a new line based on the command provided in the supplied document.

+	   * @param document - the document being parsed

+	   * @param command - the command being performed

+	   */

+	  protected void smartIndentAfterNewLine(

+	    IDocument document,

+	    DocumentCommand command) {

+	    int docLength = document.getLength();

+	    if (command.offset == -1 || docLength == 0)

+	      return;

+

+	    try {

+	      int p =

+	        (command.offset == docLength ? command.offset - 1 : command.offset);

+	      int line = document.getLineOfOffset(p);

+

+	      StringBuffer buf = new StringBuffer(command.text);

+	      if (command.offset < docLength

+	        && document.getChar(command.offset) == '}') {

+	        int indLine =

+	          findMatchingOpenBracket(document, line, command.offset, 0);

+	        if (indLine == -1) {

+	          indLine = line;

+	        }

+	        buf.append(getIndentOfLine(document, indLine));

+	      } else {

+	        int start = document.getLineOffset(line);

+	        int whiteend = findEndOfWhiteSpace(document, start, command.offset);

+	        buf.append(document.get(start, whiteend - start));

+	        if (getBracketCount(document, start, command.offset, true) > 0) {

+	          buf.append('\t');

+	        }

+	      }

+	      command.text = buf.toString();

+

+	    } catch (BadLocationException e) {

+	      e.printStackTrace();

+	    }

+	  }

+

+	  /**

+	   * Sets the indent of a bracket based on the command provided in the supplied document.

+	   *

+	   * @param document - the document being parsed

+	   * @param command - the command being performed

+	   */

+	  protected void smartInsertAfterBracket(

+	    IDocument document,

+	    DocumentCommand command) {

+	    if (command.offset == -1 || document.getLength() == 0)

+	      return;

+

+	    try {

+	      int p =

+	        (command.offset == document.getLength()

+	          ? command.offset - 1

+	          : command.offset);

+	      int line = document.getLineOfOffset(p);

+	      int start = document.getLineOffset(line);

+	      int whiteend = findEndOfWhiteSpace(document, start, command.offset);

+

+	      // shifts only when line does not contain any text up to the closing bracket

+	      if (whiteend == command.offset) {

+	        // evaluate the line with the opening bracket that matches out closing bracket

+	        int indLine =

+	          findMatchingOpenBracket(document, line, command.offset, 1);

+	        if (indLine != -1 && indLine != line) {

+	          // takes the indent of the found line

+	          StringBuffer replaceText =

+	            new StringBuffer(getIndentOfLine(document, indLine));

+	          // adds the rest of the current line including the just added close bracket

+	          replaceText.append(document.get(whiteend, command.offset - whiteend));

+	          replaceText.append(command.text);

+	          // modifies document command

+	          command.length = command.offset - start;

+	          command.offset = start;

+	          command.text = replaceText.toString();

+	        }

+	      }

+	    } catch (BadLocationException e) {

+	      e.printStackTrace();

+	    }

+	  }

+

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTEColorProvider.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTEColorProvider.java
new file mode 100644
index 0000000..49cf209
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTEColorProvider.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light;

+

+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.viatra2.editor.text.Activator;
+

+public class VTEColorProvider

+{

+

+	private static final RGB RGB_DEFAULT = new RGB(58, 58, 58);

+	private static final RGB RGB_KEYWORD = new RGB(42, 34, 127);

+	public static final RGB RGB_STRING = new RGB(255, 0, 42);

+	public static final RGB RGB_COMMENT = new RGB(63, 127, 95);

+

+	protected Map<Object, Color> fColorTable= new HashMap<Object, Color>(10);

+

+	public static void initializeDefaults(IPreferenceStore aStore)

+	{

+		PreferenceConverter.setDefault(aStore,IVTEConstants.COLOR_DEFAULT, RGB_DEFAULT);

+		PreferenceConverter.setDefault(aStore,IVTEConstants.COLOR_KEYWORD, RGB_KEYWORD);

+		PreferenceConverter.setDefault(aStore,IVTEConstants.COLOR_STRING, RGB_STRING);

+		PreferenceConverter.setDefault(aStore,IVTEConstants.COLOR_COMMENT, RGB_COMMENT);

+	}

+

+	/**

+	 * Release all of the color resources held onto by the receiver.

+	 */

+	public void dispose()

+	{

+		Iterator<Color> e= fColorTable.values().iterator();

+		while (e.hasNext())

+			 e.next().dispose();

+	}

+

+

+	public Color getColor(String aName)

+	{

+		Color color = fColorTable.get(aName);

+		if (color == null) {

+			IPreferenceStore store = Activator.getDefault().getPreferenceStore();

+			RGB rgb = PreferenceConverter.getColor(store,

+								   IVTEConstants.PREFIX_COLOR + aName);

+			if (rgb != null)

+			{

+				color = new Color(Display.getCurrent(), rgb);

+			}

+			else

+			{

+				color = Display.getCurrent().getSystemColor(SWT.COLOR_LIST_FOREGROUND);

+			}

+			fColorTable.put(aName, color);

+			fColorTable.put(rgb, color);

+		}

+		return color;

+	}

+

+	public Color getColor(RGB rgb) {

+		Color color = fColorTable.get(rgb);

+		if (color == null) {

+			color = new Color(Display.getCurrent(), rgb);

+			fColorTable.put(rgb, color);

+		}

+		return color;

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTEColorToken.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTEColorToken.java
new file mode 100644
index 0000000..073951e
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTEColorToken.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light;

+

+import org.eclipse.jface.text.rules.Token;

+

+public class VTEColorToken 

+{

+	public Token COMMENT = null;

+	public Token KEYWORD = null;					

+	public Token STRING = null; 

+	public Token OTHER = null;

+	

+	public VTEColorToken()

+	{

+		

+	}

+	

+	public Token[] getTokens() 

+	{

+		return new Token[] { // keep in same order as IPreferenceStoreConstants.preferences

+			COMMENT,

+			KEYWORD,			

+			STRING,

+			OTHER

+		};

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTMLActionbarContributor.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTMLActionbarContributor.java
new file mode 100644
index 0000000..d270443
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTMLActionbarContributor.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light;

+

+import java.util.HashMap;

+

+import org.eclipse.viatra2.editor.text.Activator;

+import org.eclipse.viatra2.editor.text.light.vtcl.ParseVTCLAction;

+import org.eclipse.viatra2.editor.text.light.vtml.ParseVTMLAction;

+import org.eclipse.jface.action.Action;

+import org.eclipse.jface.action.IAction;

+import org.eclipse.jface.action.IMenuCreator;

+import org.eclipse.jface.action.IToolBarManager;

+import org.eclipse.swt.SWT;

+import org.eclipse.swt.events.SelectionEvent;

+import org.eclipse.swt.events.SelectionListener;

+import org.eclipse.swt.widgets.Control;

+import org.eclipse.swt.widgets.Menu;

+import org.eclipse.swt.widgets.MenuItem;

+import org.eclipse.ui.texteditor.BasicTextEditorActionContributor;

+import org.eclipse.viatra2.framework.FrameworkManager;

+

+public class VTMLActionbarContributor extends BasicTextEditorActionContributor

+{

+

+	protected HashMap<String, ParseVTMLAction> actions;

+		

+	public VTMLActionbarContributor() {

+		super();

+		actions = new HashMap<String, ParseVTMLAction>();

+	}

+

+	public void updateActions(VTMLEditor ed)

+	{

+		for (String id : FrameworkManager.getInstance().getAllFrameWorks())

+		{

+			if (actions.get(id)==null)

+				actions.put(id, new ParseVTMLAction(id).updateSelf(ed));

+			else

+				actions.get(id).updateSelf(ed);

+		}

+	}

+	

+	@Override

+	public void contributeToToolBar(IToolBarManager toolBarManager) {

+		super.contributeToToolBar(toolBarManager);

+//		String[] fwids = FrameworkManager.getInstance().getAllFrameWorks();

+//		if (fwids.length>1)

+//		{

+			Action a = new Action("Parse / Select framework",IAction.AS_DROP_DOWN_MENU)

+			{

+				@Override

+				public void run() {}

+			};

+			a.setImageDescriptor(Activator.getImageDescriptor("icons/parse.png"));

+			a.setToolTipText("Use Alt+P for parsing the current file into the first framework");

+			a.setMenuCreator(new IMenuCreator()

+			{

+				public void dispose() {}

+	

+				public Menu getMenu(Control parent) {

+					Menu m = new Menu(parent);

+					return fillMenu(m);

+				}

+	

+				public Menu getMenu(Menu parent) {

+					Menu m = new Menu(parent);

+					return fillMenu(m);

+				}

+				

+				private Menu fillMenu(Menu m)

+				{

+					for (String id : FrameworkManager.getInstance().getAllFrameWorks())

+					{

+						MenuItem item = new MenuItem(m,SWT.NONE);

+						item.setText(id);

+						item.setData(actions.get(id));

+						item.addSelectionListener(new SelectionListener()

+						{

+							public void widgetSelected(SelectionEvent ev)

+							{

+								((ParseVTCLAction)ev.widget.getData()).run();

+							}

+

+							public void widgetDefaultSelected(SelectionEvent ev) {

+								((ParseVTCLAction)ev.widget.getData()).run();

+							}

+						});

+					}

+					return m;

+				}

+				

+			});

+			toolBarManager.add(a);

+//		}

+//		else

+//		{

+//			if (fwids.length==1)

+//				toolBarManager.add(actions.get(FrameworkManager.getInstance().getAllFrameWorks()[0]));

+//		}

+		

+	}

+}

+

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTMLEditor.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTMLEditor.java
new file mode 100644
index 0000000..493f1e6
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/VTMLEditor.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light;

+

+import org.eclipse.viatra2.editor.text.Activator;

+import org.eclipse.viatra2.editor.text.light.vtml.QuickParseVTMLAction;

+import org.eclipse.viatra2.editor.text.light.vtml.VTMLConfiguration;

+import org.eclipse.ui.editors.text.TextEditor;

+

+public class VTMLEditor extends TextEditor {

+

+	private VTEColorProvider iColorProvider;

+

+	protected QuickParseVTMLAction iQuickParseAction;

+	

+	public VTMLEditor() {

+		super();

+		iColorProvider = new VTEColorProvider();

+		setSourceViewerConfiguration(new VTMLConfiguration(iColorProvider));

+	}

+	

+	@Override

+	protected void createActions() {

+		super.createActions();

+		iQuickParseAction = new QuickParseVTMLAction();

+		setAction("quickparse", iQuickParseAction);

+	}

+	

+	public void updateActions()

+	{

+		//((VTMLActionbarContributor)getEditorSite().getActionBarContributor()).updateActions(this);

+		//getEditorSite().getActionBars().getToolBarManager().update(true);

+		//getEditorSite().getActionBars().updateActionBars();

+	}	

+		

+	@Override

+	public void setFocus() {

+		super.setFocus();

+		updateActions();

+		Activator.getDefault().setCurrentVTMLEditor(this);

+	}

+	

+	public void dispose() {

+		iColorProvider.dispose();

+		super.dispose();

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/menu/TextualEditorMenuListener.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/menu/TextualEditorMenuListener.java
new file mode 100644
index 0000000..33cee36
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/menu/TextualEditorMenuListener.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light.menu;

+

+import org.eclipse.jface.action.Action;

+import org.eclipse.jface.action.IMenuListener;

+import org.eclipse.jface.action.IMenuManager;

+

+public class TextualEditorMenuListener implements IMenuListener {

+

+	public void menuAboutToShow(IMenuManager manager) {

+		manager.add(new Action() {

+			

+			@Override

+			public String getText() {

+				return "action1";

+			}

+			

+			@Override

+			public void run() {

+				System.out.println("Hello action");

+			}

+		});

+		

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtcl/LPGParseVTCLAction.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtcl/LPGParseVTCLAction.java
new file mode 100644
index 0000000..f35f4f1
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtcl/LPGParseVTCLAction.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light.vtcl;

+

+import org.eclipse.viatra2.editor.text.Activator;

+import org.eclipse.viatra2.editor.text.light.VTCLEditor;

+import org.eclipse.jface.action.Action;

+import org.eclipse.viatra2.framework.FrameworkManager;

+import org.eclipse.viatra2.framework.IFramework;

+

+public class LPGParseVTCLAction extends Action

+{

+

+	public LPGParseVTCLAction()

+	{

+		setActionDefinitionId("org.eclipse.viatra2.editor.lpgParseCommand");

+	}

+	

+	

+	@Override

+	public void run() {

+		VTCLEditor iEditor = Activator.getDefault().getCurrentVTCLEditor();

+		if (FrameworkManager.getInstance().getAllFrameWorks().length<1)

+			return;

+		String iFrameworkID = FrameworkManager.getInstance().getAllFrameWorks()[0];

+		if (iEditor!=null && iFrameworkID!=null)

+		{

+			IFramework fw = FrameworkManager.getInstance().getFramework(iFrameworkID);

+			if (fw==null)

+				return;

+			if (iEditor.isDirty())

+				iEditor.doSave(null);

+			try {

+				// -- Changed by Daniel Varro to initiate parsing from a single method

+				iEditor.executeParsing(true);

+			} catch (Exception e)

+			{

+				fw.getLogger().fatal(e.getMessage());

+			}

+		}

+	}

+		

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtcl/ParseVTCLAction.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtcl/ParseVTCLAction.java
new file mode 100644
index 0000000..22c5add
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtcl/ParseVTCLAction.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light.vtcl;

+

+import org.eclipse.viatra2.editor.text.Activator;

+import org.eclipse.viatra2.editor.text.light.VTCLEditor;

+import org.eclipse.swt.widgets.Event;

+import org.eclipse.ui.IFileEditorInput;

+import org.eclipse.ui.actions.RetargetAction;

+import org.eclipse.viatra2.framework.FrameworkManager;

+import org.eclipse.viatra2.framework.IFramework;

+

+public class ParseVTCLAction extends RetargetAction {

+

+	protected VTCLEditor iEditor = null;

+	

+	protected String iFrameworkID;

+	

+	public ParseVTCLAction updateSelf(VTCLEditor e)

+	{	

+		iEditor = e;

+		return this;

+	}

+	

+	public ParseVTCLAction(String fwid) {

+		super("parseVTCL", "Parse VTCL");

+		iFrameworkID = fwid;

+		setImageDescriptor(Activator.getImageDescriptor("icons/parse.png"));

+	}

+	

+	public ParseVTCLAction(String actionID, String text) {

+		super(actionID, text);

+	}

+

+	@Override

+	public boolean isEnabled() {

+		return true;

+	}

+	

+	@Override

+	public void runWithEvent(Event event) {

+		run();

+	}

+	

+	@Override

+	public void run() {

+		if (iEditor!=null && iFrameworkID!=null)

+		{

+			IFramework fw = FrameworkManager.getInstance().getFramework(iFrameworkID);

+			if (fw==null)

+				return;

+			if (iEditor.isDirty())

+				iEditor.doSave(null);

+			try {

+				fw.nativeImport(((IFileEditorInput)iEditor.getEditorInput()).getFile().getContents(),

+						fw.getNativeImportersForExtension("vtcl").iterator().next());

+			} catch (Exception e)

+			{

+				fw.getLogger().fatal(e.getMessage());

+			}

+		}

+	}

+	

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtcl/QuickLoadVTCLAction.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtcl/QuickLoadVTCLAction.java
new file mode 100644
index 0000000..4b7ad06
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtcl/QuickLoadVTCLAction.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light.vtcl;

+

+import org.eclipse.viatra2.editor.text.Activator;

+import org.eclipse.viatra2.editor.text.light.VTCLEditor;

+import org.eclipse.jface.action.Action;

+import org.eclipse.viatra2.framework.FrameworkManager;

+

+public class QuickLoadVTCLAction extends Action

+{

+

+	public QuickLoadVTCLAction()

+	{

+		setActionDefinitionId("org.eclipse.viatra2.editor.text.loadCommand");

+	}

+	

+	@Override

+	public void run() 

+	{

+		// check if we can load at all (there is at least one framework instance)

+		if (FrameworkManager.getInstance().getAllFrameWorks().length<1)

+			return;

+

+		// proceed

+		VTCLEditor iEditor = Activator.getDefault().getCurrentVTCLEditor();

+		if (iEditor!=null)

+		{

+			// attach editor (if already attached, this call will do nothing)

+			iEditor.attachEditor();

+			// if dirty, save (& load) first

+			if (iEditor.isDirty())

+			{

+					iEditor.doSave(null);

+					return; // save already performs load, no need to proceed

+			}

+			iEditor.parseOnSave();

+		}

+	}

+		

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtcl/QuickRunVTCLAction.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtcl/QuickRunVTCLAction.java
new file mode 100644
index 0000000..54c2877
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtcl/QuickRunVTCLAction.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light.vtcl;

+

+import org.eclipse.jface.action.Action;
+import org.eclipse.viatra2.editor.text.Activator;
+import org.eclipse.viatra2.editor.text.light.VTCLEditor;
+import org.eclipse.viatra2.framework.FrameworkManager;
+import org.eclipse.viatra2.frameworkgui.runner.TransformationRunner;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+

+public class QuickRunVTCLAction extends Action

+{

+

+	public QuickRunVTCLAction()

+	{

+		setActionDefinitionId("org.eclipse.viatra2.editor.text.runCommand");

+	}

+

+

+	@Override

+	public void run() {

+		// check if we can load at all (there is at least one framework instance)

+		if (FrameworkManager.getInstance().getAllFrameWorks().length<1)

+			return;

+

+		// proceed

+		VTCLEditor iEditor = Activator.getDefault().getCurrentVTCLEditor();

+		if (iEditor!=null)

+		{

+			// attach editor (if already attached, this call will do nothing)

+			iEditor.attachEditor();

+			// if dirty, save (& load) first

+			if (iEditor.isDirty())

+			{

+					iEditor.doSave(null);

+					iEditor.parseOnSave();

+			}

+			//if (iEditor.getAttachedFramework().getMachineByFQN(machineFqn))

+			// check if save - parse - load was successful

+			if (iEditor.getModule()!=null)

+			{

+				Machine m = (Machine)iEditor.getAttachedFramework().getMachineByFQN(

+						iEditor.getModule().getMachine().get(0).getFqn() );

+				if (m!=null)

+				{

+					// try running

+					TransformationRunner.run(m, iEditor.getAttachedFramework(), iEditor.getEditorSite().getShell());

+				}

+			}

+		}

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtcl/VTCLCodeScanner.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtcl/VTCLCodeScanner.java
new file mode 100644
index 0000000..c9b4476
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtcl/VTCLCodeScanner.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light.vtcl;

+

+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.rules.EndOfLineRule;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.MultiLineRule;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.jface.text.rules.SingleLineRule;
+import org.eclipse.jface.text.rules.WhitespaceRule;
+import org.eclipse.jface.text.rules.WordRule;
+import org.eclipse.viatra2.editor.text.light.IVTEConstants;
+import org.eclipse.viatra2.editor.text.light.VTEColorProvider;
+import org.eclipse.viatra2.editor.text.light.VTEColorToken;
+import org.eclipse.viatra2.editor.text.light.vtml.VTMLWhitespaceDetector;
+import org.eclipse.viatra2.editor.text.light.vtml.VTMLWordDetector;
+

+

+public class VTCLCodeScanner extends RuleBasedScanner {

+	public VTCLCodeScanner(VTEColorProvider provider,VTEColorToken vct) {

+

+		IToken keyword = vct.KEYWORD;

+		IToken string = vct.STRING;

+		IToken comment = vct.COMMENT;

+		IToken other = vct.OTHER;

+

+		String[] keywords = IVTEConstants.vtclKeywords;

+		List<IRule> rules= new ArrayList<IRule>();

+

+		rules.add(new MultiLineRule("/*","*/",comment));

+		rules.add(new EndOfLineRule("//", comment));

+		rules.add(new SingleLineRule("\"", "\"", string, '\\'));

+		rules.add(new SingleLineRule("'", "'", string, '\\'));

+		// we can use VTML whitespace and word detectors

+		rules.add(new WhitespaceRule(new VTMLWhitespaceDetector()));

+		WordRule wordRule= new WordRule(new VTMLWordDetector(), other);

+		for (int i= 0; i < keywords.length; i++)

+			wordRule.addWord(keywords[i], keyword);

+		rules.add(wordRule);

+

+		IRule[] result= new IRule[rules.size()];

+		rules.toArray(result);

+		setRules(result);

+	}

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtcl/VTCLConfiguration.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtcl/VTCLConfiguration.java
new file mode 100644
index 0000000..15e0a3e
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtcl/VTCLConfiguration.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light.vtcl;

+

+import java.util.Iterator;

+

+import org.eclipse.core.resources.IMarker;

+import org.eclipse.core.runtime.CoreException;

+import org.eclipse.viatra2.editor.text.Activator;

+import org.eclipse.viatra2.editor.text.light.IVTEConstants;

+import org.eclipse.viatra2.editor.text.light.VTEAutoIndentStrategy;

+import org.eclipse.viatra2.editor.text.light.VTEColorProvider;

+import org.eclipse.viatra2.editor.text.light.VTEColorToken;

+import org.eclipse.jface.text.IAutoEditStrategy;

+import org.eclipse.jface.text.IDocument;

+import org.eclipse.jface.text.TextAttribute;

+import org.eclipse.jface.text.presentation.IPresentationReconciler;

+import org.eclipse.jface.text.presentation.PresentationReconciler;

+import org.eclipse.jface.text.rules.DefaultDamagerRepairer;

+import org.eclipse.jface.text.rules.Token;

+import org.eclipse.jface.text.source.IAnnotationHover;

+import org.eclipse.jface.text.source.ISourceViewer;

+import org.eclipse.jface.text.source.SourceViewerConfiguration;

+import org.eclipse.swt.SWT;

+import org.eclipse.ui.texteditor.MarkerAnnotation;

+

+public class VTCLConfiguration extends SourceViewerConfiguration 

+{

+

+	private VTCLCodeScanner iCodeScanner = null;

+	private VTEColorProvider iColorProvider = null;

+	private VTEColorToken iColorToken = null; 

+	

+	@SuppressWarnings("static-access")

+	public VTCLConfiguration(VTEColorProvider cm) 

+	{

+		iColorProvider = cm;

+		iColorProvider.initializeDefaults(Activator.getDefault().getPreferenceStore());

+		iColorToken = new VTEColorToken();

+		iColorToken.COMMENT = new Token(new TextAttribute(iColorProvider.getColor(IVTEConstants.COMMENT),null,SWT.ITALIC));

+		iColorToken.KEYWORD = new Token(new TextAttribute(iColorProvider.getColor(IVTEConstants.KEYWORD),null,SWT.BOLD));

+		iColorToken.STRING = new Token(new TextAttribute(iColorProvider.getColor(IVTEConstants.STRING)));

+		iColorToken.OTHER = new Token(new TextAttribute(iColorProvider.getColor(IVTEConstants.DEFAULT)));

+		iCodeScanner = new VTCLCodeScanner(iColorProvider,iColorToken);

+	}

+

+	/**

+	 * Define reconciler for VTMLEditor

+	 */

+	public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {

+		PresentationReconciler reconciler = new PresentationReconciler();

+		DefaultDamagerRepairer dr = new DefaultDamagerRepairer(iCodeScanner);

+		reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);

+		reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);

+		return reconciler;

+	}

+	

+	@Override

+	public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer, String contentType) 

+	{

+		return new IAutoEditStrategy[]{new VTEAutoIndentStrategy()};

+	}

+	

+	@Override

+	public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) 

+	{

+		return new IAnnotationHover() {

+

+			public String getHoverInfo(ISourceViewer sourceViewer,int lineNumber) {

+				String r = "Problems:\n";

+				Iterator<?> it = sourceViewer.getAnnotationModel().getAnnotationIterator();

+				while (it.hasNext())

+				{

+					Object o = it.next();

+					if (o instanceof MarkerAnnotation)

+					{

+						MarkerAnnotation ann = (MarkerAnnotation)o;

+						try

+						{

+							int line =  (Integer) ann.getMarker().getAttribute(IMarker.LINE_NUMBER);

+							if (line == lineNumber || line == lineNumber-1 || line == lineNumber+1) // no comment...

+							{

+								r+=" - "+ann.getText()+"\n";

+							}

+						}

+						catch (CoreException e) { }

+					}

+				}

+				return r;

+			}

+			

+		};

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/ParseVTMLAction.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/ParseVTMLAction.java
new file mode 100644
index 0000000..b38a40f
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/ParseVTMLAction.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light.vtml;

+

+import org.eclipse.viatra2.editor.text.Activator;

+import org.eclipse.viatra2.editor.text.light.VTMLEditor;

+import org.eclipse.swt.widgets.Event;

+import org.eclipse.ui.IFileEditorInput;

+import org.eclipse.ui.actions.RetargetAction;

+import org.eclipse.viatra2.framework.FrameworkManager;

+import org.eclipse.viatra2.framework.IFramework;

+

+public class ParseVTMLAction extends RetargetAction {

+

+	protected VTMLEditor iEditor = null;

+	

+	protected String iFrameworkID;

+	

+	public ParseVTMLAction updateSelf(VTMLEditor e)

+	{	

+		iEditor = e;

+		return this;

+	}

+	

+	public ParseVTMLAction(String fwid) {

+		super("parseVTML", "Parse VTML");

+		iFrameworkID = fwid;

+		setImageDescriptor(Activator.getImageDescriptor("icons/parse.png"));

+	}

+	

+	public ParseVTMLAction(String actionID, String text) {

+		super(actionID, text);

+	}

+

+	@Override

+	public boolean isEnabled() {

+		return true;

+	}

+	

+	@Override

+	public void runWithEvent(Event event) {

+		run();

+	}

+	

+	@Override

+	public void run() {

+		if (iEditor!=null && iFrameworkID!=null)

+		{

+			IFramework fw = FrameworkManager.getInstance().getFramework(iFrameworkID);

+			if (fw==null)

+				return;

+			if (iEditor.isDirty())

+				iEditor.doSave(null);

+			try {

+				fw.nativeImport(((IFileEditorInput)iEditor.getEditorInput()).getFile().getContents(),

+						fw.getNativeImportersForExtension("vtml").iterator().next());

+			} catch (Exception e)

+			{

+				fw.getLogger().fatal(e.getMessage());

+			}

+		}

+	}

+	

+}

+

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/QuickParseVTMLAction.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/QuickParseVTMLAction.java
new file mode 100644
index 0000000..08f9570
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/QuickParseVTMLAction.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light.vtml;

+

+import org.eclipse.viatra2.editor.text.Activator;

+import org.eclipse.viatra2.editor.text.light.VTMLEditor;

+import org.eclipse.jface.action.Action;

+import org.eclipse.ui.IFileEditorInput;

+import org.eclipse.viatra2.framework.FrameworkManager;

+import org.eclipse.viatra2.framework.IFramework;

+

+public class QuickParseVTMLAction extends Action

+{

+

+	public QuickParseVTMLAction()

+	{

+		setActionDefinitionId("viatra_editor_fast_r2.parseCommand");

+	}

+	

+	

+	@Override

+	public void run() {

+		VTMLEditor iEditor = Activator.getDefault().getCurrentVTMLEditor();

+		if (FrameworkManager.getInstance().getAllFrameWorks().length<1)

+			return;

+		String iFrameworkID = FrameworkManager.getInstance().getAllFrameWorks()[0];

+		if (iEditor!=null && iFrameworkID!=null)

+		{

+			IFramework fw = FrameworkManager.getInstance().getFramework(iFrameworkID);

+			if (fw==null)

+				return;

+			if (iEditor.isDirty())

+				iEditor.doSave(null);

+			try {

+				fw.nativeImport(((IFileEditorInput)iEditor.getEditorInput()).getFile().getContents(),

+						fw.getNativeImportersForExtension("vtml").iterator().next());

+			} catch (Exception e)

+			{

+				fw.getLogger().fatal(e.getMessage());

+			}

+		}

+	}

+		

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/VTMLCodeScanner.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/VTMLCodeScanner.java
new file mode 100644
index 0000000..8f3f8de
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/VTMLCodeScanner.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light.vtml;

+

+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.rules.EndOfLineRule;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.MultiLineRule;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.jface.text.rules.SingleLineRule;
+import org.eclipse.jface.text.rules.WhitespaceRule;
+import org.eclipse.jface.text.rules.WordRule;
+import org.eclipse.viatra2.editor.text.light.IVTEConstants;
+import org.eclipse.viatra2.editor.text.light.VTEColorProvider;
+import org.eclipse.viatra2.editor.text.light.VTEColorToken;
+

+

+public class VTMLCodeScanner extends RuleBasedScanner {

+	public VTMLCodeScanner(VTEColorProvider provider,VTEColorToken vct)

+	{

+

+		IToken keyword = vct.KEYWORD;

+		IToken string = vct.STRING;

+		IToken comment = vct.COMMENT;

+		IToken other = vct.OTHER;

+

+		String[] keywords = IVTEConstants.vtmlKeywords;

+		List<IRule> rules= new ArrayList<IRule>();

+		rules.add(new MultiLineRule("/*","*/",comment));

+		rules.add(new EndOfLineRule("//", comment));

+		rules.add(new SingleLineRule("\"", "\"", string, '\\'));

+		rules.add(new SingleLineRule("'", "'", string, '\\'));

+		rules.add(new WhitespaceRule(new VTMLWhitespaceDetector()));

+		WordRule wordRule= new WordRule(new VTMLWordDetector(), other);

+		for (int i= 0; i < keywords.length; i++)

+			wordRule.addWord(keywords[i], keyword);

+		rules.add(wordRule);

+		IRule[] result= new IRule[rules.size()];

+		rules.toArray(result);

+		setRules(result);

+

+	}

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/VTMLConfiguration.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/VTMLConfiguration.java
new file mode 100644
index 0000000..52fd75d
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/VTMLConfiguration.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light.vtml;

+

+import org.eclipse.viatra2.editor.text.Activator;

+import org.eclipse.viatra2.editor.text.light.IVTEConstants;

+import org.eclipse.viatra2.editor.text.light.VTEAutoIndentStrategy;

+import org.eclipse.viatra2.editor.text.light.VTEColorProvider;

+import org.eclipse.viatra2.editor.text.light.VTEColorToken;

+import org.eclipse.jface.text.IAutoEditStrategy;

+import org.eclipse.jface.text.IDocument;

+import org.eclipse.jface.text.TextAttribute;

+import org.eclipse.jface.text.presentation.IPresentationReconciler;

+import org.eclipse.jface.text.presentation.PresentationReconciler;

+import org.eclipse.jface.text.rules.DefaultDamagerRepairer;

+import org.eclipse.jface.text.rules.Token;

+import org.eclipse.jface.text.source.ISourceViewer;

+import org.eclipse.jface.text.source.SourceViewerConfiguration;

+import org.eclipse.swt.SWT;

+

+

+

+public class VTMLConfiguration extends SourceViewerConfiguration 

+{

+

+	private VTMLCodeScanner iCodeScanner = null;

+	private VTEColorProvider iColorProvider = null;

+	private VTEColorToken iColorToken = null;

+	

+	@SuppressWarnings("static-access")

+	public VTMLConfiguration(VTEColorProvider cm) 

+	{

+		iColorProvider = cm;

+		iColorProvider.initializeDefaults(Activator.getDefault().getPreferenceStore());

+		iColorToken = new VTEColorToken();

+		iColorToken.COMMENT = new Token(new TextAttribute(iColorProvider.getColor(IVTEConstants.COMMENT)));

+		iColorToken.KEYWORD = new Token(new TextAttribute(iColorProvider.getColor(IVTEConstants.KEYWORD),null,SWT.BOLD));

+		iColorToken.STRING = new Token(new TextAttribute(iColorProvider.getColor(IVTEConstants.STRING)));

+		iColorToken.OTHER = new Token(new TextAttribute(iColorProvider.getColor(IVTEConstants.DEFAULT)));

+		iCodeScanner = new VTMLCodeScanner(iColorProvider,iColorToken);

+	}

+

+	/**

+	 * Define reconciler for VTMLEditor

+	 */

+	public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {

+		PresentationReconciler reconciler = new PresentationReconciler();

+		DefaultDamagerRepairer dr = new DefaultDamagerRepairer(iCodeScanner);

+		reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);

+		reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);

+		return reconciler;

+	}

+	

+	@Override

+	public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer, String contentType) 

+	{

+		return new IAutoEditStrategy[]{new VTEAutoIndentStrategy()};

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/VTMLRuleScanner.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/VTMLRuleScanner.java
new file mode 100644
index 0000000..1ded1b0
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/VTMLRuleScanner.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light.vtml;

+

+import org.eclipse.jface.text.TextAttribute;

+import org.eclipse.jface.text.rules.EndOfLineRule;

+import org.eclipse.jface.text.rules.IRule;

+import org.eclipse.jface.text.rules.IToken;

+import org.eclipse.jface.text.rules.RuleBasedScanner;

+import org.eclipse.jface.text.rules.SingleLineRule;

+import org.eclipse.jface.text.rules.Token;

+import org.eclipse.swt.graphics.Color;

+import org.eclipse.swt.graphics.RGB;

+import org.eclipse.swt.widgets.Display;

+

+public class VTMLRuleScanner extends RuleBasedScanner 

+{

+	private static Color TAG_COLOR =

+		new Color(Display.getCurrent(), new RGB(200, 0, 0));

+	private static Color COMMENT_COLOR =

+		new Color(Display.getCurrent(), new RGB(0, 200, 0));

+

+	public VTMLRuleScanner() {

+		IToken tagToken = new Token(new TextAttribute(TAG_COLOR));

+		IToken commentToken = new Token(new TextAttribute(COMMENT_COLOR));

+

+		IRule[] rules = new IRule[2];

+		rules[0] = new SingleLineRule("<myTag", "myTag>", tagToken);

+		rules[1] = (new EndOfLineRule("//", commentToken));

+		setRules(rules);

+	}

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/VTMLWhitespaceDetector.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/VTMLWhitespaceDetector.java
new file mode 100644
index 0000000..279440c
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/VTMLWhitespaceDetector.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light.vtml;

+

+import org.eclipse.jface.text.rules.IWhitespaceDetector;

+

+public class VTMLWhitespaceDetector implements IWhitespaceDetector

+{

+	public boolean isWhitespace(char character) 

+	{

+		return Character.isWhitespace(character);

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/VTMLWordDetector.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/VTMLWordDetector.java
new file mode 100644
index 0000000..5940489
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/light/vtml/VTMLWordDetector.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.light.vtml;

+

+import org.eclipse.jface.text.rules.IWordDetector;

+

+public class VTMLWordDetector implements IWordDetector

+{

+	public boolean isWordPart(char character) 

+	{

+		return Character.isJavaIdentifierPart(character);

+	}

+	

+	public boolean isWordStart(char character) 

+	{

+		return Character.isJavaIdentifierStart(character);

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/wizards/NewVTCLWizard.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/wizards/NewVTCLWizard.java
new file mode 100644
index 0000000..8d376c7
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/wizards/NewVTCLWizard.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.wizards;

+

+import org.eclipse.viatra2.frameworkgui.wizards.NewVIATRAWizard;

+

+public class NewVTCLWizard extends NewVIATRAWizard {

+

+	public NewVTCLWizard() 

+	{

+		super("vtcl");

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/wizards/NewVTMLWizard.java b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/wizards/NewVTMLWizard.java
new file mode 100644
index 0000000..f029d21
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/src/org/eclipse/viatra2/editor/text/wizards/NewVTMLWizard.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.editor.text.wizards;

+

+import org.eclipse.viatra2.frameworkgui.wizards.NewVIATRAWizard;

+

+public class NewVTMLWizard extends NewVIATRAWizard {

+

+	public NewVTMLWizard() 

+	{

+		super("vtml");

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor.text/templates/datatypes.vtml.jet b/org.eclipse.viatra2.editor.text/templates/datatypes.vtml.jet
new file mode 100644
index 0000000..3b0ac27
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/templates/datatypes.vtml.jet
@@ -0,0 +1,27 @@
+<%@ jet imports="java.util.*" %>

+<% java.util.Map<String,String> params = (java.util.Map<String,String>) argument; %>

+entity('datatypes')

+{

+	entity('datatypes'.'Boolean')

+	{

+		entity('datatypes'.'Boolean'.'false');

+		entity('datatypes'.'Boolean'.'true');

+	}

+	entity('datatypes'.'Double');

+	entity('datatypes'.'Integer');

+	entity('datatypes'.'MultiplicityKind')

+	{

+		entity('datatypes'.'MultiplicityKind'.'many_to_many');

+		entity('datatypes'.'MultiplicityKind'.'many_to_one');

+		entity('datatypes'.'MultiplicityKind'.'one_to_many');

+		entity('datatypes'.'MultiplicityKind'.'one_to_one');

+	}

+	entity('datatypes'.'String');

+}

+

+instanceOf('datatypes'.'Boolean'.'false','datatypes'.'Boolean');

+instanceOf('datatypes'.'Boolean'.'true','datatypes'.'Boolean');

+instanceOf('datatypes'.'MultiplicityKind'.'many_to_many','datatypes'.'MultiplicityKind');

+instanceOf('datatypes'.'MultiplicityKind'.'many_to_one','datatypes'.'MultiplicityKind');

+instanceOf('datatypes'.'MultiplicityKind'.'one_to_many','datatypes'.'MultiplicityKind');

+instanceOf('datatypes'.'MultiplicityKind'.'one_to_one','datatypes'.'MultiplicityKind');
\ No newline at end of file
diff --git a/org.eclipse.viatra2.editor.text/templates/helloworld.vtcl.jet b/org.eclipse.viatra2.editor.text/templates/helloworld.vtcl.jet
new file mode 100644
index 0000000..49677aa
--- /dev/null
+++ b/org.eclipse.viatra2.editor.text/templates/helloworld.vtcl.jet
@@ -0,0 +1,9 @@
+<%@ jet imports="java.util.*" %>

+<% java.util.Map<String,String> params = (java.util.Map<String,String>) argument; %>

+machine <%=params.get("machineName") %>

+{

+	rule main() = seq

+	{

+		println("<%= params.get("message")%>");

+	}

+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.editor/.classpath b/org.eclipse.viatra2.editor/.classpath
new file mode 100644
index 0000000..858bbf4
--- /dev/null
+++ b/org.eclipse.viatra2.editor/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
+		<accessrules>
+			<accessrule kind="accessible" pattern="*"/>
+		</accessrules>
+	</classpathentry>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.viatra2.editor/.cvsignore b/org.eclipse.viatra2.editor/.cvsignore
new file mode 100644
index 0000000..ba077a4
--- /dev/null
+++ b/org.eclipse.viatra2.editor/.cvsignore
@@ -0,0 +1 @@
+bin
diff --git a/org.eclipse.viatra2.editor/.project b/org.eclipse.viatra2.editor/.project
new file mode 100644
index 0000000..6d21171
--- /dev/null
+++ b/org.eclipse.viatra2.editor/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.viatra2.editor</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.viatra2.editor/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra2.editor/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..3af7c05
--- /dev/null
+++ b/org.eclipse.viatra2.editor/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,263 @@
+#Wed Jan 12 11:16:39 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
diff --git a/org.eclipse.viatra2.editor/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.viatra2.editor/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..b6dbbc6
--- /dev/null
+++ b/org.eclipse.viatra2.editor/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,10 @@
+#Mon Jul 10 11:23:28 CEST 2006
+eclipse.preferences.version=1
+formatter_profile=org.eclipse.jdt.ui.default.eclipse_profile
+formatter_settings_version=10
+internal.default.compliance=default
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
diff --git a/org.eclipse.viatra2.editor/META-INF/MANIFEST.MF b/org.eclipse.viatra2.editor/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..891d28a
--- /dev/null
+++ b/org.eclipse.viatra2.editor/META-INF/MANIFEST.MF
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: VIATRA2 R3 Tree Editor Plug-in
+Bundle-SymbolicName: org.eclipse.viatra2.editor;singleton:=true
+Bundle-Version: 3.3.0.qualifier
+Bundle-Activator: org.eclipse.viatra2.treeeditor.Plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.ui.views,
+ org.eclipse.viatra2.core2,
+ org.eclipse.ui.ide,
+ org.eclipse.core.resources,
+ org.eclipse.jface.text,
+ org.eclipse.ui.editors,
+ org.eclipse.ui.workbench.texteditor,
+ org.eclipse.jdt.ui
+Export-Package: org.eclipse.viatra2.treeeditor,
+ org.eclipse.viatra2.treeeditor.actions,
+ org.eclipse.viatra2.treeeditor.properties,
+ org.eclipse.viatra2.treeeditor.providers,
+ org.eclipse.viatra2.treeeditor.resource
+Bundle-Vendor: BUTE-FTSRG
+Bundle-ClassPath: .
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/org.eclipse.viatra2.editor/about.html b/org.eclipse.viatra2.editor/about.html
new file mode 100644
index 0000000..1262b8c
--- /dev/null
+++ b/org.eclipse.viatra2.editor/about.html
@@ -0,0 +1,28 @@
+<!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>About</title>

+</head>

+<body lang="EN-US">

+<h2>About This Content</h2>

+ 

+<p>July 4th, 2008</p>	

+<h3>License</h3>

+

+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 

+indicated below, the Content 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 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>If you did not receive this Content directly from the Eclipse Foundation, the Content is 

+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may

+apply to your use of any object code in the Content.  Check the Redistributor's license that was 

+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise

+indicated below, the terms and conditions of the EPL still apply to any source code in the Content

+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>

+

+</body>

+</html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.editor/build.properties b/org.eclipse.viatra2.editor/build.properties
new file mode 100644
index 0000000..deffef0
--- /dev/null
+++ b/org.eclipse.viatra2.editor/build.properties
@@ -0,0 +1,9 @@
+bin.includes = plugin.xml,\
+               icons/,\
+               schema/,\
+               META-INF/,\
+               .
+src.includes = icons/,\
+               schema/
+source.. = src/
+
diff --git a/org.eclipse.viatra2.editor/icons/entity_transparent.png b/org.eclipse.viatra2.editor/icons/entity_transparent.png
new file mode 100644
index 0000000..0c2d46c
--- /dev/null
+++ b/org.eclipse.viatra2.editor/icons/entity_transparent.png
Binary files differ
diff --git a/org.eclipse.viatra2.editor/icons/entity_transparent_info.png b/org.eclipse.viatra2.editor/icons/entity_transparent_info.png
new file mode 100644
index 0000000..37f6497
--- /dev/null
+++ b/org.eclipse.viatra2.editor/icons/entity_transparent_info.png
Binary files differ
diff --git a/org.eclipse.viatra2.editor/icons/entity_transparent_warning.png b/org.eclipse.viatra2.editor/icons/entity_transparent_warning.png
new file mode 100644
index 0000000..1d2b8a7
--- /dev/null
+++ b/org.eclipse.viatra2.editor/icons/entity_transparent_warning.png
Binary files differ
diff --git a/org.eclipse.viatra2.editor/icons/machine_transparent.png b/org.eclipse.viatra2.editor/icons/machine_transparent.png
new file mode 100644
index 0000000..2dcba34
--- /dev/null
+++ b/org.eclipse.viatra2.editor/icons/machine_transparent.png
Binary files differ
diff --git a/org.eclipse.viatra2.editor/icons/refresh.gif b/org.eclipse.viatra2.editor/icons/refresh.gif
new file mode 100644
index 0000000..e383147
--- /dev/null
+++ b/org.eclipse.viatra2.editor/icons/refresh.gif
Binary files differ
diff --git a/org.eclipse.viatra2.editor/icons/relation_target_transparent.png b/org.eclipse.viatra2.editor/icons/relation_target_transparent.png
new file mode 100644
index 0000000..05cb72f
--- /dev/null
+++ b/org.eclipse.viatra2.editor/icons/relation_target_transparent.png
Binary files differ
diff --git a/org.eclipse.viatra2.editor/icons/relation_transparent.png b/org.eclipse.viatra2.editor/icons/relation_transparent.png
new file mode 100644
index 0000000..526b3eb
--- /dev/null
+++ b/org.eclipse.viatra2.editor/icons/relation_transparent.png
Binary files differ
diff --git a/org.eclipse.viatra2.editor/icons/relation_transparent_info.png b/org.eclipse.viatra2.editor/icons/relation_transparent_info.png
new file mode 100644
index 0000000..77ef52e
--- /dev/null
+++ b/org.eclipse.viatra2.editor/icons/relation_transparent_info.png
Binary files differ
diff --git a/org.eclipse.viatra2.editor/icons/relation_transparent_warning.png b/org.eclipse.viatra2.editor/icons/relation_transparent_warning.png
new file mode 100644
index 0000000..e295f65
--- /dev/null
+++ b/org.eclipse.viatra2.editor/icons/relation_transparent_warning.png
Binary files differ
diff --git a/org.eclipse.viatra2.editor/icons/rename.png b/org.eclipse.viatra2.editor/icons/rename.png
new file mode 100644
index 0000000..3cf1843
--- /dev/null
+++ b/org.eclipse.viatra2.editor/icons/rename.png
Binary files differ
diff --git a/org.eclipse.viatra2.editor/icons/viatra_logo.png b/org.eclipse.viatra2.editor/icons/viatra_logo.png
new file mode 100644
index 0000000..6819429
--- /dev/null
+++ b/org.eclipse.viatra2.editor/icons/viatra_logo.png
Binary files differ
diff --git a/org.eclipse.viatra2.editor/icons/vpml.png b/org.eclipse.viatra2.editor/icons/vpml.png
new file mode 100644
index 0000000..51b5812
--- /dev/null
+++ b/org.eclipse.viatra2.editor/icons/vpml.png
Binary files differ
diff --git a/org.eclipse.viatra2.editor/plugin.xml b/org.eclipse.viatra2.editor/plugin.xml
new file mode 100644
index 0000000..7656c70
--- /dev/null
+++ b/org.eclipse.viatra2.editor/plugin.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+   <extension-point id="menuactions" name="Viatra R2 Tree Editor Actions" schema="schema/menuactions.exsd"/>
+   <extension
+         point="org.eclipse.ui.editors">
+         <editor
+         	 default="true"
+        	 id="org.eclipse.viatra2.treeeditor"
+	         name="VIATRA2 Model Editor"
+	         extensions="vpml"
+	         icon="icons/viatra_logo.png"
+    	     class="org.eclipse.viatra2.treeeditor.ViatraTreeEditor"
+    	     contributorClass="org.eclipse.viatra2.treeeditor.menu.ViatraTreeEditorActionBarContributor">
+		</editor>
+   </extension>
+   
+     <extension
+        point="org.eclipse.ui.newWizards">
+     <category
+           name="VIATRA2 Framework Release3"
+           id="org.eclipse.viatra2.wizards"/>
+     <wizard
+           icon="icons/viatra_logo.png"
+           class="org.eclipse.viatra2.treeeditor.wizard.ViatraTreeEditorNewVPMLWizard"
+           category="org.eclipse.viatra2.wizards"
+           project="false"
+           name="VIATRA2 VPM Model Space"
+           id="org.eclipse.viatra2.editor.newVPMLWizard">
+        <description>This wizard will create a new VPM modelspace using the Viatra framework.</description>
+     </wizard>
+  </extension>
+   
+   
+   <extension
+         point="org.eclipse.viatra2.core2.properties">
+      <propertyprovider class="org.eclipse.viatra2.treeeditor.providers.ViatraEditorPropertyProvider"/>
+   </extension>
+
+</plugin>
diff --git a/org.eclipse.viatra2.editor/schema/menuactions.exsd b/org.eclipse.viatra2.editor/schema/menuactions.exsd
new file mode 100644
index 0000000..bdb10ad
--- /dev/null
+++ b/org.eclipse.viatra2.editor/schema/menuactions.exsd
@@ -0,0 +1,130 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.viatra2.editor" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.viatra2.editor" id="menuactions" name="Viatra R2 Tree Editor Actions"/>
+      </appInfo>
+      <documentation>
+         This extension may be used by VIATRA2 R3 GUI extenders to contribute actions to the tree editor&apos;s context menu.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="actions" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="actions">
+      <complexType>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  blabla
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.viatra2.treeeditor.actions.ViatraTreeEditorSelectionAction:"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="ordering_number" type="string">
+            <annotation>
+               <documentation>
+                  This integer determines the order of appearance of items in the menu. A lower number means the item will be towards the beginning of the menu.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="key" type="string">
+            <annotation>
+               <documentation>
+                  Plugins may indicate a symbolic key here that will be used to categorize the controbutions into submenus.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         [Enter the first release in which this extension point appears.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         [Enter extension point usage example here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         [Enter API information here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+
+</schema>
diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/Plugin.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/Plugin.java
new file mode 100644
index 0000000..3648f4c
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/Plugin.java
@@ -0,0 +1,220 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor;

+

+

+import java.util.Collection;

+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;

+import java.util.Vector;

+

+import org.eclipse.core.runtime.IConfigurationElement;

+import org.eclipse.core.runtime.IExtension;

+import org.eclipse.core.runtime.IExtensionPoint;

+import org.eclipse.core.runtime.IExtensionRegistry;

+import org.eclipse.core.runtime.Platform;

+import org.eclipse.jface.resource.ImageDescriptor;

+import org.eclipse.ui.plugin.AbstractUIPlugin;

+import org.eclipse.viatra2.treeeditor.actions.ViatraTreeEditorSelectionAction;

+import org.eclipse.viatra2.treeeditor.wizard.IWizardCategoryContributor;

+import org.eclipse.viatra2.treeeditor.wizard.IWizardModelContributor;

+import org.eclipse.viatra2.treeeditor.wizard.WizardCategoryContributor;

+import org.eclipse.viatra2.treeeditor.wizard.WizardModelContributor;

+import org.osgi.framework.BundleContext;

+

+/**

+ * The main plugin class to be used in the desktop.

+ */

+public class Plugin extends AbstractUIPlugin {

+

+	// The shared instance.

+	private static Plugin plugin;

+

+	/**

+	 * The constructor.

+	 */

+	public Plugin() {

+		plugin = this;

+	}

+

+	/**

+	 * This method is called upon plug-in activation

+	 */

+	public void start(BundleContext context) throws Exception {

+		super.start(context);

+	}

+

+	/**

+	 * This method is called when the plug-in is stopped

+	 */

+	public void stop(BundleContext context) throws Exception {

+		super.stop(context);

+		plugin = null;

+	}

+

+	/**

+	 * Returns the shared instance.

+	 */

+	public static Plugin getDefault() {

+		return plugin;

+	}

+

+	/**

+	 * Returns an image descriptor for the image file at the given plug-in

+	 * relative path.

+	 * 

+	 * @param path

+	 *            the path

+	 * @return the image descriptor

+	 */

+	public static ImageDescriptor getImageDescriptor(String path) {

+		return AbstractUIPlugin.imageDescriptorFromPlugin(

+				"org.eclipse.viatra2.editor", path);

+	}

+	

+	/**

+	 * The String ID of the wizard contribution extension point.

+	 */

+	static final String wizcont_id = "org.eclipse.viatra2.core2.wizardcontributor";

+	

+	private Collection<String> buildCollection(String s)

+	{

+		StringTokenizer tok = new StringTokenizer(s==null?"":s,",; ");

+		Vector<String> v = new Vector<String>(tok.countTokens());

+		int c = tok.countTokens();

+		for (int i = 0; i<c; i++)

+		{

+			v.add(tok.nextToken());

+		}

+		return v;

+	}

+	

+	

+	public Collection<IWizardModelContributor> getModelContributions()

+	{

+		Vector<IWizardModelContributor> v = new Vector<IWizardModelContributor>();

+		IExtensionRegistry reg = Platform.getExtensionRegistry();

+		IExtensionPoint ep = reg.getExtensionPoint(wizcont_id);

+		for (IExtension e : ep.getExtensions())

+		{

+			for (IConfigurationElement ce : e.getConfigurationElements())

+			{

+				if (!ce.getName().equalsIgnoreCase("model"))

+					continue;

+				// String[] attrs = ce.getAttributeNames();

+				try 

+				{

+					String id = ce.getAttribute("id");

+					String rids = ce.getAttribute("requiredIDs");

+					String fids = ce.getAttribute("forbiddenIDs");

+					String cids = ce.getAttribute("containedIDs");

+					String cid = ce.getAttribute("categoryID");

+					String name = ce.getAttribute("name");

+					String desc = ce.getAttribute("description");

+					String fvtml = ce.getAttribute("file_vtml");

+					String fvpml = ce.getAttribute("file_vpml");

+					WizardModelContributor mc =

+						new WizardModelContributor(id, buildCollection(rids),

+								buildCollection(fids), buildCollection(cids),

+								//cid, name, desc, fvtml, fvpml, e.getDeclaringPluginDescriptor().getUniqueIdentifier());

+								cid, name, desc, fvtml, fvpml, e.getNamespaceIdentifier());

+					v.add(mc);

+				}

+				catch (Exception ex)

+				{

+					ex.printStackTrace();

+				}

+			}

+		}

+		return v;

+	}

+	

+	public Collection<IWizardCategoryContributor> getCategoryContributions()

+	{

+		Vector<IWizardCategoryContributor> v = new Vector<IWizardCategoryContributor>();

+		IExtensionRegistry reg = Platform.getExtensionRegistry();

+		IExtensionPoint ep = reg.getExtensionPoint(wizcont_id);

+		for (IExtension e : ep.getExtensions())

+		{

+			for (IConfigurationElement ce : e.getConfigurationElements())

+			{

+				if (!ce.getName().equalsIgnoreCase("category"))

+					continue;

+				try 

+				{

+					String id = ce.getAttribute("id");

+					String name = ce.getAttribute("name");

+					//WizardCategoryContributor cc = new WizardCategoryContributor(id,name, e.getDeclaringPluginDescriptor().getUniqueIdentifier());

+					WizardCategoryContributor cc = new WizardCategoryContributor(id,name, e.getNamespaceIdentifier());

+					v.add(cc);

+				}

+				catch (Exception ex)

+				{

+					ex.printStackTrace();

+				}

+			}

+		}

+		return v;

+	}

+	

+	

+	/**

+	 * The String ID of the actions contribution extension point.

+	 */

+	static final String actions_id = "org.eclipse.viatra2.editor.menuactions";

+	

+	//public Collection<ViatraTreeEditorSelectionAction> getContributedActions()

+	public Map<String,List<ViatraTreeEditorSelectionAction>> getContributedActions()
+	{
+		HashMap<String, List<ViatraTreeEditorSelectionAction>> r = new HashMap<String, List<ViatraTreeEditorSelectionAction>>();

+		// Vector<ViatraTreeEditorSelectionAction> v = new Vector<ViatraTreeEditorSelectionAction>();

+		IExtensionRegistry reg = Platform.getExtensionRegistry();

+		IExtensionPoint ep = reg.getExtensionPoint(actions_id);

+		for (IExtension e : ep.getExtensions())

+		{

+			for (IConfigurationElement ce : e.getConfigurationElements())

+			{

+				if (!ce.getName().equalsIgnoreCase("actions"))

+					continue;

+				try

+				{

+					Object o = ce.createExecutableExtension("class");

+					if (o instanceof ViatraTreeEditorSelectionAction)

+					{
+						String key = ce.getAttribute("key");
+						if (key==null) key = "Default";
+						
+						List<ViatraTreeEditorSelectionAction> c = r.get(key);
+						if (c==null) {
+							c = new Vector<ViatraTreeEditorSelectionAction>();
+						}

+						c.add((ViatraTreeEditorSelectionAction) o);
+						Integer i = new Integer(0);
+						try {
+							i = Integer.parseInt(ce.getAttribute("ordering_number"));
+						} catch (Throwable t) { }
+						((ViatraTreeEditorSelectionAction)o).setOrderNumber(i);
+						r.put(key, c);

+					}

+				}

+				catch (Exception ex)

+				{

+					ex.printStackTrace();

+				}

+			}

+		}

+		return r;

+	}

+	

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/ViatraTreeEditor.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/ViatraTreeEditor.java
new file mode 100644
index 0000000..f1fd0f9
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/ViatraTreeEditor.java
@@ -0,0 +1,823 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor;

+

+

+import java.lang.reflect.InvocationTargetException;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IMarkerDelta;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.IElementComparer;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IPathEditorInput;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.dialogs.SaveAsDialog;
+import org.eclipse.ui.ide.IGotoMarker;
+import org.eclipse.ui.part.EditorPart;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.framework.FrameworkManager;
+import org.eclipse.viatra2.framework.FrameworkManagerException;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.framework.properties.IViatraPropertyChangedListener;
+import org.eclipse.viatra2.treeeditor.actions.ExportToVTMLAction;
+import org.eclipse.viatra2.treeeditor.actions.LocalDeleteAction;
+import org.eclipse.viatra2.treeeditor.actions.NavigateRelationAction;
+import org.eclipse.viatra2.treeeditor.actions.NavigateRelationSourceAction;
+import org.eclipse.viatra2.treeeditor.actions.NewEntityAction;
+import org.eclipse.viatra2.treeeditor.actions.NewRelationAction;
+import org.eclipse.viatra2.treeeditor.actions.RenameAction;
+import org.eclipse.viatra2.treeeditor.actions.ViatraDeleteAction;
+import org.eclipse.viatra2.treeeditor.actions.ViatraRedoAction;
+import org.eclipse.viatra2.treeeditor.actions.ViatraTreeEditorSelectionAction;
+import org.eclipse.viatra2.treeeditor.actions.ViatraUndoAction;
+import org.eclipse.viatra2.treeeditor.commands.ViatraEditorCommandStack;
+import org.eclipse.viatra2.treeeditor.menu.ViatraTreeEditorActionBarContributor;
+import org.eclipse.viatra2.treeeditor.menu.ViatraTreeEditorMenuListener;
+import org.eclipse.viatra2.treeeditor.properties.VPMPropertySheetPage;
+import org.eclipse.viatra2.treeeditor.providers.IDirtyFlagChangedListener;
+import org.eclipse.viatra2.treeeditor.providers.IMessageDialogProvider;
+import org.eclipse.viatra2.treeeditor.providers.ViatraContentProvider;
+import org.eclipse.viatra2.treeeditor.providers.ViatraEditorPropertyProvider;
+import org.eclipse.viatra2.treeeditor.providers.ViatraLabelProvider;
+import org.eclipse.viatra2.treeeditor.providers.ViatraRootProvider;
+import org.eclipse.viatra2.treeeditor.providers.ViatraTreeMouseListener;
+import org.eclipse.viatra2.treeeditor.providers.ViatraTreeviewSorter;
+import org.eclipse.viatra2.treeeditor.resource.FrameworkEditorInput;
+import org.eclipse.viatra2.treeeditor.transfer.ViatraEditorDragSourceListener;
+import org.eclipse.viatra2.treeeditor.transfer.ViatraEditorDropTargetAdapter;
+

+public class ViatraTreeEditor extends EditorPart implements

+//ISelectionListener,

+ISelectionChangedListener,

+IDirtyFlagChangedListener, IMessageDialogProvider,

+IViatraPropertyChangedListener {

+

+	   /* (non-Javadoc)

+     * @see org.eclipse.ui.part.EditorPart#setInput(org.eclipse.ui.IEditorInput)

+     */

+    @Override
+	protected void setInput(IEditorInput input)

+    {

+        if (getEditorInput() != null && getEditorInput() instanceof FileEditorInput)

+        {

+            IFile file = ((FileEditorInput) getEditorInput()).getFile();

+            file.getWorkspace().removeResourceChangeListener(getResourceTracker());

+        }

+

+        super.setInput(input);

+
+        manageInputChange();
+

+        if (getEditorInput() != null && getEditorInput() instanceof FileEditorInput)

+        {

+            IFile file = ((FileEditorInput) getEditorInput()).getFile();

+            file.getWorkspace().addResourceChangeListener(getResourceTracker());

+        }

+

+

+    }

+

+

+    /**

+     * Closes this editor.

+     * @param save true if the editor should save its contents before closing

+     */

+    void closeEditor(final boolean save)

+    {

+        getSite().getShell().getDisplay().syncExec(new Runnable()

+        {

+            public void run()

+            {

+                getSite().getPage().closeEditor(ViatraTreeEditor.this, save);

+            }

+        });

+    }

+

+

+    /** the resource tracker instance */

+    private ResourceTracker resourceTracker;

+

+    /**

+     * Returns the resource tracker instance

+     * @return

+     */

+    private ResourceTracker getResourceTracker()

+    {

+        if (resourceTracker == null)

+        {

+            resourceTracker = new ResourceTracker();

+        }

+        return resourceTracker;

+    }

+

+

+	/**

+     * This class listens to changes to the file system in the workspace, and

+     * makes changes accordingly.

+     * 1) An open, saved file gets deleted -> close the editor

+     * 2) An open file gets renamed or moved -> change the editor's input accordingly

+     *

+     * @author Gunnar Wagenknecht; modified by Istvan Rath

+     */

+    private class ResourceTracker implements IResourceChangeListener, IResourceDeltaVisitor

+    {

+        /* (non-Javadoc)

+         * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)

+         */

+        public void resourceChanged(IResourceChangeEvent event)

+        {

+            IResourceDelta delta = event.getDelta();

+            try

+            {

+                if (delta != null)

+                    delta.accept(this);

+            }

+            catch (CoreException exception)

+            {

+                //Activator.getDefault().getLog().log(exception.getStatus());

+                exception.printStackTrace();

+            }

+        }

+

+        /* (non-Javadoc)

+         * @see org.eclipse.core.resources.IResourceDeltaVisitor#visit(org.eclipse.core.resources.IResourceDelta)

+         */

+        public boolean visit(IResourceDelta delta)

+        {

+            if (delta == null || !delta.getResource().equals(((IFileEditorInput) getEditorInput()).getFile()))

+            	return true;

+           	else

+            {

+	            if (delta.getKind() == IResourceDelta.REMOVED)

+	            {

+	                if ((IResourceDelta.MOVED_TO & delta.getFlags()) == 0)

+	                {

+	                    // if the file was deleted

+	                    // NOTE: The case where an open, unsaved file is deleted is being handled by the

+	                    // PartListener added to the Workbench in the initialize() method.

+	                    if (!isDirty())

+	                        closeEditor(false);

+	                }

+	                else

+	                {

+	                    // else if it was moved or renamed

+	                    final IFile newFile = ResourcesPlugin.getWorkspace().getRoot().getFile(delta.getMovedToPath());

+	                    Display display = getSite().getShell().getDisplay();

+	                    display.syncExec(new Runnable()

+	                    {

+	                        public void run()

+	                        {

+	                            setInput(new FileEditorInput(newFile));

+	                        }

+	                    });

+	                }

+	            }

+	            else if (delta.getKind() == IResourceDelta.CHANGED)

+	            {

+	            	for (IMarkerDelta md : delta.getMarkerDeltas())

+	            	{

+	            		IMarker marker = md.getMarker();

+	            		if (iFramework!=null) // marker.exists()

+ 	            		{

+		            		try {

+								Map attrs = marker.getAttributes();

+								if (attrs!=null && attrs.containsKey(IMarker.LOCATION))

+								{

+									// marker is ready, we can process it.

+									String fqns = attrs.get(IMarker.LOCATION).toString();

+									// refresh elements in the tree viewer

+									String[] fqn = fqns.split(";");

+									for (final String _fqn : fqn)

+									{

+										Display.getDefault().syncExec(new Runnable(){

+											public void run() {
+												if (getTreeViewer()!=null)
+												{

+													getTreeViewer().refresh( iFramework.getTopmodel().getModelManager().getElementByName(_fqn) );
+												}

+											}

+										});

+									}

+								}

+							} catch (CoreException e) {

+								iFramework.getLogger().error("[ResourceTracker::visit()] "+e.getMessage());
+								//iFramework.getLogger().printStackTrace(e);

+							}

+	            		}

+	            	}

+	            }

+

+            }

+            return false;

+        }

+    }

+

+

+

+	private TreeViewer treeViewer;

+

+	// private DrillDownAdapter drillDownAdapter;

+

+	// *********************

+

+

+	// LOCAL ACTIONS

+	private NewEntityAction iNewEntityAction;

+	private NewRelationAction iNewRelationAction;

+	private NavigateRelationAction iNavigateAction;
+	private NavigateRelationSourceAction iNavigateSourceAction;

+	//private RunAction iRunAction;

+	private ExportToVTMLAction iExportAction;

+	private RenameAction iRenameAction;

+	private LocalDeleteAction iLocalDeleteAction;

+

+	private Map<String,List<ViatraTreeEditorSelectionAction>> contributedActions;

+

+

+

+	public LocalDeleteAction getLocalDeleteAction()

+	{

+		return iLocalDeleteAction;

+	}

+

+	public RenameAction getRenameAction() {

+		return iRenameAction;

+	}

+

+	public ExportToVTMLAction getExportAction() {

+		return iExportAction;

+	}

+

+	public NewEntityAction getNewEntityAction() {

+		return iNewEntityAction;

+	}

+

+	public NewRelationAction getNewRelationAction() {

+		//iNewRelationAction.updateSelf();

+		return iNewRelationAction;

+	}

+

+	public NavigateRelationAction getNavigateRelationAction()

+	{

+		return iNavigateAction;

+	}

+

+//	public RunAction getRunAction() {

+//		return iRunAction;

+//	}

+

+	// GLOBAL ACTIONS

+	private ViatraDeleteAction iDeleteAction;

+	private ViatraUndoAction iUndoAction;

+	private ViatraRedoAction iRedoAction;

+

+	public ViatraDeleteAction getDeleteAction() {

+		return iDeleteAction;

+	}

+

+	public ViatraRedoAction getRedoAction() {

+		return iRedoAction;

+	}

+

+	public ViatraUndoAction getUndoAction() {

+		return iUndoAction;

+	}

+

+

+	// COMMANDSTACK

+	private final ViatraEditorCommandStack iCommandStack;

+

+	public ViatraEditorCommandStack getCommandStack() {

+		return iCommandStack;

+	}

+

+	// *********************

+	// MEMBERS

+

+	private boolean isDirty = false;

+

+	private FrameworkManager iFrameWorkManager;

+

+	private IFramework iFramework;

+

+	private String iShortFilename;

+

+	private String iFilename;

+

+	private IModelSpace iModelSpace;

+

+

+	// **********************

+

+	public IFramework getFramework() {

+		return iFramework;

+	}

+

+

+

+	public TreeViewer getTreeViewer() {

+		return treeViewer;

+	}

+

+	protected void setTreeViewer(TreeViewer viewer) {

+		this.treeViewer = viewer;

+	}

+

+	public ViatraTreeEditor() {

+		iCommandStack = new ViatraEditorCommandStack(this);

+	}

+

+	@Override
+	public void doSave(IProgressMonitor monitor)

+	{

+		IRunnableWithProgress runnable = new IRunnableWithProgress()

+		{

+			public void run(IProgressMonitor _monitor) throws InvocationTargetException, InterruptedException

+			{

+				try

+				{

+					iFramework.saveFile(iFilename);

+					//ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+					// this is crazy...
+					// instead:
+					((FileEditorInput)ViatraTreeEditor.this.getEditorInput()).getFile().refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());

+				}

+				catch (Exception e)

+				{

+					throw new InvocationTargetException(e);

+				}

+

+			}

+		};

+		runLongTransaction(runnable);

+		iFramework.getLogger().info("Saved " + iFilename);

+		iCommandStack.markSave();

+		isDirty = false;

+		updateActions();

+		firePropertyChange(PROP_DIRTY);

+		firePropertyChange(PROP_TITLE);

+	}

+

+	@Override
+	public void doSaveAs() {

+		SaveAsDialog dd = new SaveAsDialog(getEditorSite().getShell());

+		dd.setBlockOnOpen(true);

+		dd.setTitle("Select new file");

+		dd.setOriginalName(iShortFilename);

+		if (Window.OK == dd.open())

+		{

+			IFile ifile = ResourcesPlugin.getWorkspace().getRoot().getFile(dd.getResult());

+			iFilename = ifile.getLocation().toOSString();

+			iShortFilename = ifile.getLocation().lastSegment();

+			doSave(null);

+			setInput(new FileEditorInput(ifile));

+			manageInputChange();

+		}

+	}

+

+	@Override
+	public boolean isDirty() {

+		return isDirty || iCommandStack.isDirty();

+	}

+

+	public void setDirty() {

+		isDirty = true;

+		// updateActions();

+		Display.getDefault().asyncExec(new Runnable(){

+			public void run()

+			{

+				firePropertyChange(PROP_DIRTY);

+			}

+		});

+	}

+

+	@Override
+	public boolean isSaveAsAllowed() {

+		return true;

+	}

+

+	@Override
+	public void createPartControl(Composite parent) {

+		TreeViewer treeviewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);

+		setTreeViewer(treeviewer);

+		getTreeViewer().addDropSupport(DND.DROP_COPY|DND.DROP_MOVE|DND.DROP_LINK,ViatraEditorDropTargetAdapter.getTransfers(),new ViatraEditorDropTargetAdapter(this));

+		getTreeViewer().addDragSupport(DND.DROP_COPY|DND.DROP_MOVE|DND.DROP_LINK,ViatraEditorDropTargetAdapter.getTransfers(),new ViatraEditorDragSourceListener(this));

+		// drillDownAdapter = new DrillDownAdapter(getTreeViewer());

+

+		// initialize cell editors

+		//TextCellEditor ce = new TextCellEditor(getTreeViewer().getTree(),SWT.BORDER);

+		//getTreeViewer().setCellEditors(new CellEditor[]{ce});

+		//getTreeViewer().setColumnProperties(new String[]{"localname"});

+		//getTreeViewer().setCellModifier(new ViatraTreeCellModifier());

+

+		// register double click listener for direct editing

+		getTreeViewer().getTree().addMouseListener(new ViatraTreeMouseListener(this, getTreeViewer().getTree()));

+

+		getTreeViewer().setUseHashlookup(true);

+		createActions();

+		contributeToActionBars();

+		initializeContextMenu();

+		getSite().setSelectionProvider(getTreeViewer());

+		initializeTreeViewer();

+	}

+

+

+	private void manageInputChange()

+	{

+		IEditorInput element = getEditorInput();

+		iShortFilename = element.getName();

+		iFilename = null;

+

+		if (element instanceof IPathEditorInput) {

+			// File from workspace

+			iFilename = ((IPathEditorInput) element).getPath().toOSString();

+			//iFramework = (IFramework) iFrameWorkManager.createFramework(iFilename);

+		}

+		else if (element instanceof FrameworkEditorInput) {

+			iFramework = ((FrameworkEditorInput)element).getFramework();

+			iFilename = iFramework.getCurrentFilename();

+		}

+		else {

+			showMessage("Invalid input received for Viatra Tree Editor");

+			return;

+		}

+

+		if (iFramework!=null) {
+			if (iFilename != null) {
+				iFramework.setCurrentFileName(iFilename);
+			} else {
+				iFramework.setCurrentFileName(iShortFilename);
+			}

+		}

+

+		firePropertyChange(PROP_TITLE);

+	}

+

+

+	public void runLongTransaction(final IRunnableWithProgress runnable)

+	{

+		final Display display = Display.getDefault();

+

+		display.syncExec(new Runnable() {

+			public void run() {

+				ProgressMonitorDialog d= new ProgressMonitorDialog(display.getActiveShell());

+				try {

+					d.run(true, false, runnable);

+				} catch (Exception e) {

+					e.printStackTrace();

+					showMessage(e.getMessage());

+					iFramework.getLogger().fatal("Error executing operation ("+e.getClass().getCanonicalName()+") ["+e.getMessage()+"]");

+				}

+			}

+		});

+

+	}

+

+

+	protected void initializeTreeViewer() {

+		iFrameWorkManager = FrameworkManager.getInstance();

+		// Load user's file into the modelspace

+

+		manageInputChange();

+

+		final IRunnableWithProgress runnable = new IRunnableWithProgress()

+		{

+			public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException

+			{

+				if (iFramework==null && getEditorInput() instanceof IPathEditorInput)

+				{

+					try

+					{

+						monitor.beginTask("Loading VPM modelspace", 3);

+						monitor.worked(2);

+						iFramework = iFrameWorkManager.createFramework(iFilename);

+						monitor.done();

+					}

+					catch (FrameworkManagerException e)

+					{

+						e.printStackTrace();

+						showMessage(e.getMessage());

+					}

+				}

+			}

+		};

+

+		runLongTransaction(runnable);

+

+		// set-up phase

+		if (iFramework!=null)

+		{

+

+			iModelSpace = iFramework.getTopmodel();

+			getTreeViewer().addSelectionChangedListener(this);

+			getTreeViewer().setContentProvider(new ViatraContentProvider(getTreeViewer(), this));

+			getTreeViewer().setLabelProvider(new ViatraLabelProvider(this));

+			getTreeViewer().setSorter(new ViatraTreeviewSorter());

+			getTreeViewer().setComparer(new IElementComparer()

+			{

+				public boolean equals(Object a, Object b) {

+					if (a == null && b == null) return true;

+					if (a == null || b == null) return false;

+					if (a instanceof IModelElement && b instanceof IModelElement)

+						return a.equals(b);

+					if (a instanceof ViatraRootProvider && b instanceof ViatraRootProvider)

+						return (a == b);

+					return false;

+				}

+

+				public int hashCode(Object element) {

+					return element == null ? 0 : element.hashCode();

+				}

+			});

+			getTreeViewer().setInput(new ViatraRootProvider(iModelSpace.getModelManager().getRoot()));

+			firePropertyChange(PROP_TITLE);

+

+			// Add self as VPM properties listener

+			iFramework.getProperties().getProvider(ViatraEditorPropertyProvider.VIATRA_EDITOR_PROVIDER_ID).addListener(this);

+		}

+	}

+

+	@Override
+	public String getTitle() {

+		return iShortFilename;

+	}

+

+	@Override
+	public String getTitleToolTip() {

+		return iFilename;

+	}

+

+	@Override
+	public void dispose() {

+		//getSite().getWorkbenchWindow().getSelectionService().removeSelectionListener(this);

+		if (iFrameWorkManager != null && iFramework != null) {

+			iFramework.getProperties().getProvider(ViatraEditorPropertyProvider.VIATRA_EDITOR_PROVIDER_ID).removeListener(this);

+			try {

+				iFrameWorkManager.disposeFramework(iFramework.getId());

+			} catch (Exception e) {

+				showMessage(e.getMessage());

+			}

+		}
+		if (getEditorInput() != null && getEditorInput() instanceof FileEditorInput)
+        {
+            IFile file = ((FileEditorInput) getEditorInput()).getFile();
+            file.getWorkspace().removeResourceChangeListener(getResourceTracker());
+        }
+		super.dispose();

+	}

+

+	public void updateLabels()

+	{

+		if (treeViewer != null)

+			treeViewer.refresh(true);

+	}

+

+

+	VPMPropertySheetPage iPropsPage;

+

+	private VPMPropertySheetPage getPropsPage()

+	{

+		if (iPropsPage == null)	iPropsPage = new VPMPropertySheetPage(this);

+		return iPropsPage;

+	}

+

+	IGotoMarker gotoMarker;

+

+	@Override
+	public Object getAdapter(Class type) {

+		if (type == org.eclipse.ui.views.properties.IPropertySheetPage.class) {

+			return getPropsPage();

+		}

+		if (type == IGotoMarker.class)

+		{

+			if (gotoMarker==null)

+			{

+				gotoMarker = new IGotoMarker(){

+					public void gotoMarker(IMarker marker)

+					{

+						if (marker.exists())

+						{

+							try

+							{

+								Map attrs = marker.getAttributes();

+								if (attrs!=null && attrs.containsKey(IMarker.LOCATION))

+								{

+									// marker is ready, we can process it.

+									String fqns = attrs.get(IMarker.LOCATION).toString();

+									// refresh elements in the tree viewer

+									String[] fqn = fqns.split(";");

+									for (final String _fqn : fqn)

+									{

+										Display.getDefault().asyncExec(new Runnable(){

+											public void run() {

+												getTreeViewer().reveal( iFramework.getTopmodel().getModelManager().getElementByName(_fqn) );

+											}

+										});

+									}

+								}

+							} catch (CoreException e) {

+								iFramework.getLogger().info("[gotoMarker()] "+e.getMessage());

+							}

+						}

+					}

+				};

+			}

+			return gotoMarker;

+		}

+		return super.getAdapter(type);

+	}

+

+

+

+	@Override
+	public void init(IEditorSite site, IEditorInput input) throws PartInitException {

+		setSite(site);

+		setInput(input);

+	}

+

+	protected void initializeContextMenu() {

+		MenuManager menuMgr = new MenuManager("ViatraTreeEditorPopupMenu");

+		menuMgr.setRemoveAllWhenShown(true);

+		ViatraTreeEditorMenuListener menuListener = new ViatraTreeEditorMenuListener(this);

+		menuMgr.addMenuListener(menuListener);

+		Menu menu = menuMgr.createContextMenu(getTreeViewer().getControl());

+		getTreeViewer().getControl().setMenu(menu);

+	}

+

+	protected void createActions() {

+		// locals

+		iLocalDeleteAction = new LocalDeleteAction(this);

+		iNewEntityAction = new NewEntityAction(this);

+		iNavigateAction = new NavigateRelationAction(this);
+		iNavigateSourceAction = new NavigateRelationSourceAction(this);

+		iNewRelationAction = new NewRelationAction(this);

+		iExportAction = new ExportToVTMLAction(this);

+		iRenameAction = new RenameAction(this);

+		// globals

+		if (getEditorSite().getActionBarContributor()!=null && getEditorSite().getActionBarContributor() instanceof ViatraTreeEditorActionBarContributor)

+		{

+			iDeleteAction = ((ViatraTreeEditorActionBarContributor)getEditorSite().getActionBarContributor()).getDeleteAction();

+			iUndoAction = ((ViatraTreeEditorActionBarContributor)getEditorSite().getActionBarContributor()).getUndoAction();

+			iRedoAction = ((ViatraTreeEditorActionBarContributor)getEditorSite().getActionBarContributor()).getRedoAction();

+		}

+		// contributed

+		contributedActions = // new LinkedList<ViatraTreeEditorSelectionAction>();

+		//contributedActions.addAll(
+				Plugin.getDefault().getContributedActions();
+		
+		for (List<ViatraTreeEditorSelectionAction> cAs : contributedActions.values())
+		{
+			for (ViatraTreeEditorSelectionAction a : cAs)

+			{

+				a.setWorkbenchPart(this);

+			}
+			// perform an ordering
+			Collections.sort(cAs, new Comparator<ViatraTreeEditorSelectionAction>(){
+	
+				public int compare(ViatraTreeEditorSelectionAction arg0,
+						ViatraTreeEditorSelectionAction arg1) {
+					return arg0.getOrderNumber().compareTo(arg1.getOrderNumber());
+				}
+	
+			});
+		}

+	}

+

+

+	@Override
+	public void setFocus() {

+		getTreeViewer().getControl().setFocus();

+		// update global actions

+		updateActions();

+	}

+

+

+	public void updateActions() {

+		// update global actions

+		if (iDeleteAction!=null) iDeleteAction.updateSelf(this);

+		if (iUndoAction!=null) iUndoAction.updateSelf(this);

+		if (iRedoAction!=null) iRedoAction.updateSelf(this);

+

+		getEditorSite().getActionBars().getToolBarManager().update(true);

+		// update local actions (not really necessary)

+		iLocalDeleteAction.updateSelf();

+		iNewEntityAction.updateSelf();

+		iNewRelationAction.updateSelf();

+		iExportAction.updateSelf();

+		iNavigateAction.updateSelf();
+		iRenameAction.updateSelf();

+//		iRunAction.updateSelf();

+

+		// update contributed actions
+		for (List<ViatraTreeEditorSelectionAction> as : getContributedActions().values())
+		{

+			for (ViatraTreeEditorSelectionAction a : as)

+			{

+				a.updateSelf();

+			}
+		}

+	}

+

+	public void showMessage(final String message) {
+		Display.getDefault().syncExec(new Runnable(){
+			public void run() {
+				MessageDialog.openInformation(getSite().getShell(),"Viatra Tree Editor", message);
+			}
+		});

+

+	}

+

+	private void contributeToActionBars() {

+		IActionBars bars = getEditorSite().getActionBars();

+		registerGlobalActions(bars);

+		fillLocalPullDown(bars.getMenuManager());

+	}

+

+	private void fillLocalPullDown(IMenuManager manager) {

+		// TODO local pull down empty

+	}

+

+	private void registerGlobalActions(IActionBars bars) {

+		// register our global actions

+		if (iDeleteAction!=null) bars.setGlobalActionHandler(iDeleteAction.getId(),iDeleteAction);

+		if (iUndoAction!=null) bars.setGlobalActionHandler(iUndoAction.getId(),iUndoAction);

+		if (iRedoAction!=null) bars.setGlobalActionHandler(iRedoAction.getId(),iRedoAction);

+	}

+

+	public void propertyChanged(String providerID, String propertyID, String oldVal, String newVal) {

+		Display.getDefault().asyncExec(new Runnable(){

+			public void run() {

+				updateLabels();

+			}

+		});

+

+	}

+

+

+

+	/**

+	 * @return the contributedActions

+	 */

+	public Map<String,List<ViatraTreeEditorSelectionAction>> getContributedActions() {

+		return contributedActions;

+	}

+

+	public void selectionChanged(SelectionChangedEvent event)

+	{

+		updateActions();

+	}
+
+
+	public IAction getNavigateRelationSourceAction() {
+		return iNavigateSourceAction;
+	}

+

+

+	//marker support

+

+

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/ExportToVTMLAction.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/ExportToVTMLAction.java
new file mode 100644
index 0000000..95e3754
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/ExportToVTMLAction.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.actions;

+

+import java.io.FileWriter;

+import java.io.IOException;

+import java.io.PrintWriter;

+import java.util.Iterator;

+

+

+

+

+import org.eclipse.swt.SWT;

+import org.eclipse.swt.widgets.FileDialog;

+import org.eclipse.ui.ISharedImages;

+import org.eclipse.ui.IWorkbenchPart;

+import org.eclipse.ui.PlatformUI;

+import org.eclipse.viatra2.core.IEntity;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.core.IModelSpace;

+import org.eclipse.viatra2.exports.VTMLExporterSimple;

+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;

+

+public class ExportToVTMLAction extends ViatraTreeEditorSelectionAction {

+

+	public static final String ID = "ViatraTreeEditor.Actions.ExportToVTMLAction";

+

+	private ViatraTreeEditor iVTE;

+

+	public ExportToVTMLAction(IWorkbenchPart part) {

+		super(part);

+		iVTE = (ViatraTreeEditor) part;

+		setId(ID);

+		setText("Export as VTML");

+		setToolTipText("Export selected model element as VTML");

+		setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()

+				.getImageDescriptor(ISharedImages.IMG_OBJ_FILE));

+	}

+

+	protected boolean calculateEnabled() {

+		return true;

+	}

+

+	public void run() {

+		FileDialog fop = new FileDialog(iVTE.getEditorSite().getShell(),

+				SWT.SAVE);

+		fop.setText("Choose a file to export to");

+		fop.setFilterNames(new String[] { "Viatra VTML files" });

+		String fn = fop.open();

+		if (fn != null) {

+			Iterator it = getSelectedObjects().iterator();

+			FileWriter fw;

+			try {

+				fw = new FileWriter(fn, false);

+			} catch (IOException e) {

+				e.printStackTrace();

+				return;

+			}

+			PrintWriter pw = new PrintWriter(fw);

+			IModelSpace ms = iVTE.getFramework().getTopmodel();

+			

+			while (it.hasNext()) {

+				

+				try {

+					IModelElement me = (IModelElement) it.next();

+					VTMLExporterSimple.exportToVTML(pw, ms, me);

+				} catch (Exception ex) {

+					ex.printStackTrace();

+				}

+			}

+			pw.close();

+			try {

+				fw.close();

+			} catch (IOException ioex) {

+				ioex.printStackTrace();

+			}

+			iVTE.showMessage("Export to " + fn + " successful");

+		}

+	}

+

+	@Override

+	public void updateSelf() {

+		if (getSelectedObjects().size() == 1 && getSelectedObjects().getFirstElement() instanceof IEntity)

+			setEnabled(true);

+		else

+			setEnabled(false);

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/LocalDeleteAction.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/LocalDeleteAction.java
new file mode 100644
index 0000000..29a7ce8
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/LocalDeleteAction.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.actions;

+

+

+import org.eclipse.jface.viewers.IStructuredSelection;

+import org.eclipse.ui.ISharedImages;

+import org.eclipse.ui.IWorkbenchPart;

+import org.eclipse.ui.PlatformUI;

+import org.eclipse.viatra2.core.IEntity;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.core.IRelation;

+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;

+import org.eclipse.viatra2.treeeditor.commands.DeleteModelElementCommand;

+import org.eclipse.viatra2.treeeditor.commands.ViatraCompoundCommand;

+

+public class LocalDeleteAction extends ViatraTreeEditorSelectionAction {

+

+	public static final String ID = "ViatraTreeEditor.Actions.LocalDeleteAction";

+

+	//protected 

+	

+	public LocalDeleteAction(IWorkbenchPart part) {

+		super(part);

+		setId(ID);

+		setText("Delete");

+		setToolTipText("Delete the model element");

+		setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));

+		setDisabledImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));

+		setHoverImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_HOVER));

+	}

+

+	public void run() {

+		ViatraTreeEditor iVTE = (ViatraTreeEditor)iPart;

+		ViatraCompoundCommand ccmd = new ViatraCompoundCommand();

+		for (Object o : ((IStructuredSelection)iVTE.getSite().getSelectionProvider().getSelection()).toList())

+		{

+			IModelElement me = (IModelElement) o;

+			DeleteModelElementCommand cmd = new DeleteModelElementCommand();

+			if (me instanceof IEntity)

+				cmd.setEntity((IEntity)me);

+			else

+				cmd.setRelation((IRelation)me);

+			ccmd.add(cmd);

+		}

+		if (!ccmd.isEmpty())

+		{

+			iVTE.getCommandStack().execute(ccmd);

+			iVTE.updateActions();

+		}

+	}

+

+	@Override

+	public void updateSelf() {

+		if (getSelectedObjects().size() == 1 && getSelectedObjects().getFirstElement() instanceof IModelElement)

+			setEnabled(true);

+		else

+			setEnabled(false);

+		

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/NavigateRelationAction.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/NavigateRelationAction.java
new file mode 100644
index 0000000..f97c8fb
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/NavigateRelationAction.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.actions;

+

+

+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.treeeditor.Plugin;
+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;
+

+public class NavigateRelationAction extends ViatraTreeEditorSelectionAction {

+

+	public static final String ID = "ViatraTreeEditor.Actions.NavigateRelationAction";

+

+	public NavigateRelationAction(IWorkbenchPart part) {

+		super(part);

+		setText("Navigate to target");

+		setToolTipText("Reveal and select the target of this relation.");

+		setImageDescriptor(Plugin.getImageDescriptor("icons/relation_transparent.png"));

+	}

+

+	public void run() {

+		final IRelation source = (IRelation) getSelectedObjects().toList().get(0);

+		Display.getDefault().asyncExec(new Runnable(){

+			public void run() {

+				try {

+					((ViatraTreeEditor)iPart).getTreeViewer().reveal( source.getTo() );

+				

+					((ViatraTreeEditor)iPart).getTreeViewer().setSelection(new StructuredSelection(new Object[]{source.getTo()}));

+				}

+				catch (Exception e) { e.printStackTrace(); }

+			}

+		});

+	}

+

+	@Override

+	public void updateSelf() {

+		if (getSelectedObjects().size() == 1 && getSelectedObjects().getFirstElement() instanceof IModelElement)

+			setEnabled(true);

+		else

+			setEnabled(false);

+		

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/NavigateRelationSourceAction.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/NavigateRelationSourceAction.java
new file mode 100644
index 0000000..f3039af
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/NavigateRelationSourceAction.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.actions;

+

+

+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.treeeditor.Plugin;
+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;
+import org.eclipse.viatra2.treeeditor.providers.ViatraContentProvider.TargetRelationDummy;
+

+public class NavigateRelationSourceAction extends ViatraTreeEditorSelectionAction {

+

+	public static final String ID = "ViatraTreeEditor.Actions.NavigateRelationSourceAction";

+

+	public NavigateRelationSourceAction(IWorkbenchPart part) {

+		super(part);

+		setText("Navigate to source");

+		setToolTipText("Reveal and select the source of this relation.");

+		setImageDescriptor(Plugin.getImageDescriptor("icons/relation_target_transparent.png"));

+	}

+

+	public void run() {

+		final IRelation source = ((TargetRelationDummy)getSelectedObjects().toList().get(0)).rel;

+		Display.getDefault().asyncExec(new Runnable(){

+			public void run() {

+				try {

+					((ViatraTreeEditor)iPart).getTreeViewer().reveal( source.getFrom() );

+

+					((ViatraTreeEditor)iPart).getTreeViewer().setSelection(new StructuredSelection(new Object[]{source.getFrom()}));

+				}

+				catch (Exception e) { e.printStackTrace(); }

+			}

+		});

+	}

+

+	@Override

+	public void updateSelf() {

+		if (getSelectedObjects().size() == 1 && getSelectedObjects().getFirstElement() instanceof TargetRelationDummy)

+			setEnabled(true);

+		else

+			setEnabled(false);

+

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/NewEntityAction.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/NewEntityAction.java
new file mode 100644
index 0000000..e297a8c
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/NewEntityAction.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.actions;

+

+

+import org.eclipse.ui.IWorkbenchPart;

+import org.eclipse.viatra2.core.IEntity;

+import org.eclipse.viatra2.treeeditor.Plugin;

+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;

+import org.eclipse.viatra2.treeeditor.commands.AddModelElementCommand;

+

+public class NewEntityAction extends ViatraTreeEditorSelectionAction {

+

+	public static final String ID = "ViatraTreeEditor.Actions.NewEntityAction";

+

+	public NewEntityAction(IWorkbenchPart part) {

+		super(part);

+		setId(ID);

+		setText("Add Entity");

+		setToolTipText("Create a new entity with the selected entity as its parent.");

+		setImageDescriptor(Plugin.getImageDescriptor("icons/entity_transparent.png"));

+	}

+

+	public void run() {

+		IEntity parent = (IEntity)getSelectedObjects().toList().get(0);

+		AddModelElementCommand cmd = new AddModelElementCommand();

+		cmd.setParent(parent);

+		((ViatraTreeEditor) iPart).getCommandStack().execute(cmd);

+		((ViatraTreeEditor) iPart).updateActions();

+	}

+

+	@Override

+	public void updateSelf() {

+		if (getSelectedObjects().size() == 1 && getSelectedObjects().getFirstElement() instanceof IEntity)
+		{

+			setEnabled(true);
+		}

+		else

+			setEnabled(false);

+		

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/NewRelationAction.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/NewRelationAction.java
new file mode 100644
index 0000000..7cf99a7
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/NewRelationAction.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.actions;

+

+

+import org.eclipse.ui.IWorkbenchPart;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.treeeditor.Plugin;

+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;

+import org.eclipse.viatra2.treeeditor.commands.AddModelElementCommand;

+

+public class NewRelationAction extends ViatraTreeEditorSelectionAction {

+

+	public static final String ID = "ViatraTreeEditor.Actions.NewRelationAction";

+

+	public NewRelationAction(IWorkbenchPart part) {

+		super(part);

+		setText("Add Relation");

+		setToolTipText("Create a new relation with the selected model element as its source and target.");

+		setImageDescriptor(Plugin.getImageDescriptor("icons/relation_transparent.png"));

+	}

+

+	public void run() {

+		IModelElement source = (IModelElement) getSelectedObjects().toList().get(0);

+		AddModelElementCommand cmd = new AddModelElementCommand();

+		cmd.setSource(source);

+		((ViatraTreeEditor) iPart).getCommandStack().execute(cmd);

+		((ViatraTreeEditor) iPart).updateActions();

+	}

+

+	@Override

+	public void updateSelf() {

+		if (getSelectedObjects().size() == 1 && getSelectedObjects().getFirstElement() instanceof IModelElement)
+		{
+			String s = ((IModelElement) getSelectedObjects().getFirstElement()).getFullyQualifiedName();
+			if (s!=null && s.length()>0)
+				setEnabled(true);
+			else
+				setEnabled(false);
+		}
+		else
+			setEnabled(false);

+		

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/RenameAction.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/RenameAction.java
new file mode 100644
index 0000000..ae3a901
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/RenameAction.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.actions;

+

+

+import org.eclipse.swt.SWT;

+import org.eclipse.swt.custom.TreeEditor;

+import org.eclipse.swt.widgets.Text;

+import org.eclipse.swt.widgets.Tree;

+import org.eclipse.swt.widgets.TreeItem;

+import org.eclipse.ui.IWorkbenchPart;

+import org.eclipse.viatra2.core.IEntity;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.treeeditor.Plugin;

+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;

+import org.eclipse.viatra2.treeeditor.providers.ViatraTreeEventListener;

+

+public class RenameAction extends ViatraTreeEditorSelectionAction {

+

+	public static final String ID = "ViatraTreeEditor.Actions.RenameAction";

+

+	//protected 

+	

+	public RenameAction(IWorkbenchPart part) {

+		super(part);

+		setId(ID);

+		setText("Rename");

+		setToolTipText("Change the model elements' (local) name");

+		setImageDescriptor(Plugin.getImageDescriptor("icons/rename.png"));

+	}

+

+	public void run() {

+//		try 

+//		{

+			ViatraTreeEditor iVTE = (ViatraTreeEditor)iPart;

+			Tree iTreeControl = iVTE.getTreeViewer().getTree();

+			TreeItem item = iTreeControl.getSelection()[0];

+			if (item==null)	return;

+			IModelElement me = (IModelElement) item.getData();

+			

+			TreeEditor editor = new TreeEditor(iTreeControl);

+			editor.horizontalAlignment = SWT.LEFT;

+			editor.grabHorizontal = true;

+			editor.minimumWidth = 64;

+			

+			ViatraTreeEventListener list = new ViatraTreeEventListener(me, editor, iVTE);

+			Text celleditor = new Text(iTreeControl, SWT.NONE);

+			
+			String value = "";
+			if (me instanceof IEntity && ((IEntity)me).getValue().length()>0) {
+				value = " {"+((IEntity)me).getValue()+"}";
+			}
+			celleditor.setText(me.getName()+value);

+			celleditor.addFocusListener(list);

+			celleditor.addKeyListener(list);

+			celleditor.addModifyListener(list);

+			celleditor.selectAll();

+			celleditor.setFocus();

+			editor.setEditor(celleditor,item);

+//		}

+//		catch (Exception e)

+//		{}

+	}

+

+	@Override

+	public void updateSelf() {

+		if (getSelectedObjects().size() == 1 && getSelectedObjects().getFirstElement() instanceof IModelElement)
+		{
+			String s = ((IModelElement) getSelectedObjects().getFirstElement()).getFullyQualifiedName();
+			if (s!=null && s.length()>0)
+				setEnabled(true);
+			else
+				setEnabled(false);
+		}
+		else

+			setEnabled(false);

+		

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/ViatraDeleteAction.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/ViatraDeleteAction.java
new file mode 100644
index 0000000..3cc98b7
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/ViatraDeleteAction.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.actions;

+

+

+import java.util.Iterator;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;
+import org.eclipse.viatra2.treeeditor.commands.DeleteModelElementCommand;
+import org.eclipse.viatra2.treeeditor.commands.ViatraCompoundCommand;
+

+

+public class ViatraDeleteAction extends ViatraRetargetAction {

+

+

+	public ViatraDeleteAction() {

+		super(ActionFactory.DELETE.getId(),"Delete model element");

+		setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));

+		setDisabledImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));

+		setHoverImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_HOVER));

+	}

+

+	@Override

+	public void run() {

+		ViatraCompoundCommand ccmd = new ViatraCompoundCommand();

+		for (Object o : ((IStructuredSelection)iVTE.getSite().getSelectionProvider().getSelection()).toList())

+		{

+			IModelElement me = (IModelElement) o;

+			DeleteModelElementCommand cmd = new DeleteModelElementCommand();

+			if (me instanceof IEntity)

+				cmd.setEntity((IEntity)me);

+			else

+				cmd.setRelation((IRelation)me);

+			ccmd.add(cmd);

+		}

+		if (!ccmd.isEmpty())

+		{

+			iVTE.getCommandStack().execute(ccmd);

+			iVTE.updateActions();

+		}

+	}

+

+	@Override

+	public void updateSelf(ViatraTreeEditor vte) {

+		super.updateSelf(vte);

+		if (vte.getSite().getSelectionProvider().getSelection() instanceof IStructuredSelection) {

+			boolean res = false;

+			Iterator it = ((IStructuredSelection)vte.getSite().getSelectionProvider().getSelection()).iterator();

+			while (it.hasNext()) {
+				Object o = it.next();

+				if (o !=null && o instanceof IModelElement && ((IModelElement)o).getFullyQualifiedName()!=null &&
+						((IModelElement)o).getFullyQualifiedName().length()>0 )

+				{

+					res = true;

+					break;

+				}

+			}

+			setEnabled(res);

+		}

+		else

+			setEnabled(false);

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/ViatraRedoAction.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/ViatraRedoAction.java
new file mode 100644
index 0000000..20e944a
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/ViatraRedoAction.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.actions;

+

+

+import org.eclipse.ui.ISharedImages;

+import org.eclipse.ui.PlatformUI;

+import org.eclipse.ui.actions.ActionFactory;

+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;

+

+public class ViatraRedoAction extends ViatraRetargetAction {

+

+	

+	public ViatraRedoAction() {

+		super(ActionFactory.REDO.getId(), "Redo [ViatraEditor]");

+		setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_REDO));

+		setDisabledImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_REDO_DISABLED));

+		setHoverImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_REDO_HOVER));

+	}

+

+	@Override

+	public void run() {

+		iVTE.getCommandStack().redo();

+		//iVTE.setDirty();

+	}

+

+	@Override

+	public void updateSelf(ViatraTreeEditor vte) {

+		super.updateSelf(vte);

+		setEnabled(iVTE.getCommandStack().isRedoable());

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/ViatraRetargetAction.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/ViatraRetargetAction.java
new file mode 100644
index 0000000..d06314d
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/ViatraRetargetAction.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.actions;

+

+import org.eclipse.swt.widgets.Event;

+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;

+

+

+

+

+public abstract class ViatraRetargetAction extends org.eclipse.ui.actions.RetargetAction {

+

+	protected ViatraTreeEditor iVTE;

+	

+	public ViatraRetargetAction(String actionID, String text) {

+		super(actionID, text);

+	}

+	

+	public void updateSelf(ViatraTreeEditor vte) {

+		iVTE = vte;

+	}

+

+	

+	@Override

+	public void runWithEvent(Event event) {

+		run();

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/ViatraTreeEditorSelectionAction.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/ViatraTreeEditorSelectionAction.java
new file mode 100644
index 0000000..68b22e9
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/ViatraTreeEditorSelectionAction.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.actions;

+

+import org.eclipse.jface.action.Action;

+import org.eclipse.jface.viewers.IStructuredSelection;

+import org.eclipse.ui.IWorkbenchPart;

+

+public abstract class ViatraTreeEditorSelectionAction extends Action {

+

+	protected IWorkbenchPart iPart;

+	

+	public ViatraTreeEditorSelectionAction() {

+	}

+	

+	public ViatraTreeEditorSelectionAction(IWorkbenchPart part) {

+		iPart = part;

+	}

+	

+	

+	

+	public void setWorkbenchPart(IWorkbenchPart part)

+	{

+		iPart = part;

+	}

+	

+	/**
+	 * Returns the selected objects in the tree viewer.
+	 * @return
+	 */

+	public IStructuredSelection getSelectedObjects() {

+		try {

+			return (IStructuredSelection)iPart.getSite().getSelectionProvider().getSelection();

+		}

+		catch (ClassCastException e) {

+			return null;

+		}

+	}

+
+	/**
+	 * Called when something has changed upon which the enabledness update must be propagated.
+	 */

+	public abstract void updateSelf();

+
+	
+	int order_number = 0;
+	
+	public Integer getOrderNumber() {
+		return order_number;
+	}
+	
+	public void setOrderNumber(int i) {
+		order_number = i;
+	}

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/ViatraUndoAction.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/ViatraUndoAction.java
new file mode 100644
index 0000000..67e3390
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/actions/ViatraUndoAction.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.actions;

+

+

+import org.eclipse.ui.ISharedImages;

+import org.eclipse.ui.PlatformUI;

+import org.eclipse.ui.actions.ActionFactory;

+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;

+

+public class ViatraUndoAction extends ViatraRetargetAction {

+

+	

+	public ViatraUndoAction() {

+		super(ActionFactory.UNDO.getId(), "Undo [ViatraEditor]");

+		setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_UNDO));

+		setDisabledImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_UNDO_DISABLED));

+		setHoverImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_UNDO_HOVER));

+	}

+

+	@Override

+	public void run() {

+		iVTE.getCommandStack().undo();

+		//iVTE.setDirty();

+	}

+

+	@Override

+	public void updateSelf(ViatraTreeEditor vte) {

+		super.updateSelf(vte);

+		setEnabled(iVTE.getCommandStack().isUndoable());

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/AddModelElementCommand.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/AddModelElementCommand.java
new file mode 100644
index 0000000..6fbe544
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/AddModelElementCommand.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.commands;

+

+import org.eclipse.viatra2.core.IEntity;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.errors.VPMCoreException;

+

+public class AddModelElementCommand extends ViatraEditorCommand {

+

+	private IEntity parent;

+

+	private String parent_name;

+

+	private IModelElement source;

+

+	private String source_name;

+

+	public void setParent(IEntity aPar) {

+		parent = aPar;

+		parent_name = parent.getFullyQualifiedName();

+		source = null;

+		source_name = null;

+	}

+

+	public void setSource(IModelElement aS) {

+		source = aS;

+		source_name = source.getFullyQualifiedName();

+		parent = null;

+		parent_name = null;

+	}

+

+	public void execute() throws VPMCoreException {

+		parent = (IEntity) Lookup(parent, parent_name);

+		source = Lookup(source, source_name);

+		if (parent != null) {

+			// we are in add entity mode

+			iTransactionID = parent.getModelSpace().getTransactionManager().beginUndoableTransaction();

+			

+			//parent.getModelSpace().getUndoManager().nextUndoBlock(

+			//		"vte_newent");

+			

+			parent.getModelSpace().getModelManager().newEntity(parent);

+			

+			parent.getModelSpace().getTransactionManager().commitTransaction();

+			

+		} else if (source != null) {

+			iTransactionID = source.getModelSpace().getTransactionManager().beginUndoableTransaction();

+			

+			// we are in add relation mode

+			//source.getModelSpace().getUndoManager().nextUndoBlock(

+			//		"vte_newrel");

+			

+			source.getModelSpace().getModelManager().newRelation(source,source);

+			

+			source.getModelSpace().getTransactionManager().commitTransaction();

+		}

+	}

+

+	public void undo() {

+		parent = (IEntity) Lookup(parent, parent_name);

+		source = Lookup(source, source_name);

+		if (parent != null) {

+			//parent.getModelSpace().getUndoManager().undo("vte_newent");

+			parent.getModelSpace().getTransactionManager().undoTransaction(iTransactionID);

+		} else if (source != null) {

+			source.getModelSpace().getTransactionManager().undoTransaction(iTransactionID);

+			//source.getModelSpace().getUndoManager().undo("vte_newrel");

+		}

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/AddSupertypeCommand.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/AddSupertypeCommand.java
new file mode 100644
index 0000000..1d0f6fd
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/AddSupertypeCommand.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.commands;

+

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.errors.VPMCoreException;

+

+public class AddSupertypeCommand extends ViatraEditorCommand

+{

+	private IModelElement targetElem, supertypeElem;

+	private String targetElem_name, supertypeElem_name;

+	

+	public void setTargetElem(IModelElement e)

+	{

+		targetElem = e;

+		targetElem_name = e.getFullyQualifiedName();

+	}

+	

+	public void setSupertypeElem(IModelElement e)

+	{

+		supertypeElem = e;

+		supertypeElem_name = e.getFullyQualifiedName();

+	}

+

+	@Override

+	public void execute() throws VPMCoreException

+	{

+		targetElem = Lookup(targetElem, targetElem_name);

+		supertypeElem = Lookup(supertypeElem, supertypeElem_name);

+		if (targetElem != null && supertypeElem != null)

+		{

+			iTransactionID = targetElem.getModelSpace().getTransactionManager().beginUndoableTransaction();

+			//targetElem.getModelSpace().getUndoManager().nextUndoBlock("vte_addst");

+			targetElem.getModelSpace().getModelManager().newSupertypeOf(supertypeElem, targetElem);

+			targetElem.getModelSpace().getTransactionManager().commitTransaction();

+		}

+	}

+

+	@Override

+	public void undo() throws VPMCoreException

+	{

+		targetElem = Lookup(targetElem, targetElem_name);

+		supertypeElem = Lookup(supertypeElem, supertypeElem_name);

+		if (targetElem != null && supertypeElem != null)

+		{

+			targetElem.getModelSpace().getTransactionManager().undoTransaction(iTransactionID);

+			//targetElem.getModelSpace().getUndoManager().undo("vte_addst");

+		}

+	}

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/AddTypeCommand.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/AddTypeCommand.java
new file mode 100644
index 0000000..4817e6d
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/AddTypeCommand.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.commands;

+

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.errors.VPMCoreException;

+

+public class AddTypeCommand extends ViatraEditorCommand

+{

+	private IModelElement targetElem, typeElem;

+	private String targetElem_name, typeElem_name;

+	

+	public void setTargetElem(IModelElement e)

+	{

+		targetElem = e;

+		targetElem_name = e.getFullyQualifiedName();

+	}

+	

+	public void setTypeElem(IModelElement e)

+	{

+		typeElem = e;

+		typeElem_name = e.getFullyQualifiedName();

+	}

+

+	@Override

+	public void execute() throws VPMCoreException

+	{

+		targetElem = Lookup(targetElem, targetElem_name);

+		typeElem = Lookup(typeElem, typeElem_name);

+		if (targetElem != null && typeElem != null)

+		{

+			iTransactionID = targetElem.getModelSpace().getTransactionManager().beginUndoableTransaction();

+			//targetElem.getModelSpace().getUndoManager().nextUndoBlock("vte_addty");

+			targetElem.getModelSpace().getModelManager().newInstanceOf(typeElem, targetElem);

+			targetElem.getModelSpace().getTransactionManager().commitTransaction();

+		}

+	}

+

+	@Override

+	public void undo() throws VPMCoreException

+	{

+		targetElem = Lookup(targetElem, targetElem_name);

+		typeElem = Lookup(typeElem, typeElem_name);

+		if (targetElem != null && typeElem != null)

+		{

+			targetElem.getModelSpace().getTransactionManager().undoTransaction(iTransactionID);

+			//targetElem.getModelSpace().getUndoManager().undo("vte_addty");

+		}

+	}

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/ChangeElementNameCommand.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/ChangeElementNameCommand.java
new file mode 100644
index 0000000..2f1dd51
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/ChangeElementNameCommand.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.commands;

+

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.errors.VPMCoreException;

+

+public class ChangeElementNameCommand extends ViatraEditorCommand

+{

+	private IModelElement targetElem;

+	private String targetElem_name, newElemName;

+	

+	public void setTargetElem(IModelElement e)

+	{

+		targetElem = e;

+		targetElem_name = e.getFullyQualifiedName();

+	}

+	

+	public void setNewElemName(String n)

+	{

+		newElemName = n;

+	}

+

+	@Override

+	public void execute() throws VPMCoreException

+	{

+		targetElem = Lookup(targetElem, targetElem_name);

+		if (targetElem != null)

+		{

+			iTransactionID = targetElem.getModelSpace().getTransactionManager().beginUndoableTransaction();

+			//targetElem.getModelSpace().getUndoManager().nextUndoBlock("vte_chn");

+			targetElem.getModelSpace().getModelManager().setName(targetElem, newElemName);

+			targetElem_name = targetElem.getFullyQualifiedName();

+			targetElem.getModelSpace().getTransactionManager().commitTransaction();

+		}

+	}

+

+	@Override

+	public void undo() throws VPMCoreException

+	{

+		targetElem = Lookup(targetElem, targetElem_name);

+		if (targetElem != null)

+		{

+			targetElem.getModelSpace().getTransactionManager().undoTransaction(iTransactionID);

+			//targetElem.getModelSpace().getUndoManager().undo("vte_chn");

+			targetElem_name = targetElem.getFullyQualifiedName();

+		}

+	}

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/ChangePropertyCommand.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/ChangePropertyCommand.java
new file mode 100644
index 0000000..c008071
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/ChangePropertyCommand.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.commands;

+

+import org.eclipse.viatra2.core.EMultiplicityKind;

+import org.eclipse.viatra2.core.IEntity;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.core.IRelation;

+import org.eclipse.viatra2.errors.VPMCoreException;

+import org.eclipse.viatra2.treeeditor.properties.VPMProperties;

+

+/**

+ * Command class for changing VALUE,VIEWINFO,ISAGGREGATION,ISFINALTYPE,MULTIPLICITY properties.

+ * @author Istvan Rath

+ *

+ */

+public class ChangePropertyCommand extends ViatraEditorCommand {

+

+	IModelElement target;

+	String target_name;

+	

+	VPMProperties kind;

+	

+	String newValue;

+	Integer intValue;

+	

+	public void setIntValue(Integer intValue) {

+		this.intValue = intValue;

+	}

+

+	public void setNewValue(String oldValue) {

+		this.newValue = oldValue;

+	}

+

+	public void setTarget(IModelElement target) {

+		this.target = target;

+		target_name = target.getFullyQualifiedName();

+	}

+

+	public void setKind(VPMProperties kind) {

+		this.kind = kind;

+	}

+

+	@Override

+	public void execute() throws VPMCoreException 

+	{

+		target = Lookup(target, target_name);

+		switch (kind)

+		{

+		case VALUE: 

+			iTransactionID = target.getModelSpace().getTransactionManager().beginUndoableTransaction();

+			target.getModelSpace().getModelManager().setValue((IEntity)target, newValue);

+			target_name = target.getFullyQualifiedName();

+			target.getModelSpace().getTransactionManager().commitTransaction();

+			break;

+		case VIEWINFO:

+			iTransactionID = target.getModelSpace().getTransactionManager().beginUndoableTransaction();

+			target.getModelSpace().getModelManager().setViewInfo(target, newValue);

+			target_name = target.getFullyQualifiedName();

+			target.getModelSpace().getTransactionManager().commitTransaction();

+			break;

+		case ISFINALTYPE:

+			iTransactionID = target.getModelSpace().getTransactionManager().beginUndoableTransaction();

+			target.getModelSpace().getModelManager().setIsFinalType(target, intValue.equals(1));

+			target_name = target.getFullyQualifiedName();

+			target.getModelSpace().getTransactionManager().commitTransaction();

+			break;

+		case ISAGGREGATION:

+			iTransactionID = target.getModelSpace().getTransactionManager().beginUndoableTransaction();

+			target.getModelSpace().getModelManager().setRelationIsAggregation((IRelation)target, intValue.equals(1));

+			target_name = target.getFullyQualifiedName();

+			target.getModelSpace().getTransactionManager().commitTransaction();

+			break;

+		case MULTIPLICITY:

+			iTransactionID = target.getModelSpace().getTransactionManager().beginUndoableTransaction();

+			target.getModelSpace().getModelManager().setRelationMultiplicity(

+					(IRelation)target,

+					EMultiplicityKind.values()[intValue]);

+			target_name = target.getFullyQualifiedName();

+			target.getModelSpace().getTransactionManager().commitTransaction();

+			break;

+		}

+

+	}

+

+	@Override

+	public void undo() throws VPMCoreException {

+		target = Lookup(target, target_name);

+		if (target!=null)

+		{

+			target.getModelSpace().getTransactionManager().undoTransaction(iTransactionID);

+			target_name = target.getFullyQualifiedName();

+		}

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/DeleteModelElementCommand.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/DeleteModelElementCommand.java
new file mode 100644
index 0000000..7b56688
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/DeleteModelElementCommand.java
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.commands;

+

+import org.eclipse.viatra2.core.EDeleteSemantics;
+import org.eclipse.viatra2.core.IEntity;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.core.IRelation;

+import org.eclipse.viatra2.errors.VPMCoreException;

+

+public class DeleteModelElementCommand extends ViatraEditorCommand {

+

+	private IEntity parent;

+

+	private String parent_name;

+

+	private String child_name;

+

+	private IEntity child;

+

+	private IModelElement source;

+

+	private String source_name;

+

+	private String relation_name;

+

+	private IRelation relation;

+

+//	private ViatraTreeEditor iVTE;

+

+	public DeleteModelElementCommand() { // ViatraTreeEditor vte) {

+//		iVTE = vte;

+	}

+

+	public void setEntity(IEntity aChld) {

+		child = aChld;

+		child_name = child.getFullyQualifiedName();

+		parent = child.getParent();

+		parent_name = parent.getFullyQualifiedName();

+		relation_name = null;

+		relation = null;

+		source = null;

+		source_name = null;

+	}

+

+	public void setRelation(IRelation aRel) {

+		relation = aRel;

+		relation_name = relation.getFullyQualifiedName();

+		source = relation.getFrom();

+		source_name = source.getFullyQualifiedName();

+		parent = null;

+		parent_name = null;

+		child = null;

+		child_name = null;

+	}

+

+	private void recursive_delete(IEntity target) {

+		// delete all children recursively

+		while (!target.getContents().isEmpty()) {

+			try {

+				recursive_delete((IEntity) target.getContents().iterator()

+						.next());

+			} catch (ClassCastException e) {

+				System.out.println("Non-entity content detected at "

+						+ target.getFullyQualifiedName());

+			}

+		}

+		try {

+			target.getModelSpace().getModelManager().deleteEntity(target,

+					EDeleteSemantics.DELETE_SEMANTICS_FORCE);

+		} catch (VPMCoreException e) {

+			e.printStackTrace();

+		}

+	}

+

+	public void execute() throws VPMCoreException {

+		parent = (IEntity) Lookup(parent, parent_name);

+		child = (IEntity) Lookup(child, child_name);

+		source = Lookup(source, source_name);

+		relation = (IRelation) Lookup(relation, relation_name);

+		// iVTE.setIsNotificationEnabled(false);

+		if (parent != null && child != null) 

+		{

+			// we're deleting an entity

+			iTransactionID = child.getModelSpace().getTransactionManager().beginUndoableTransaction(Boolean.TRUE);

+			//iTransactionID = child.getModelSpace().getTransactionManager().beginTransaction();

+			// child.getModelSpace().getUndoManager().nextUndoBlock("vte_delent");

+			// child.getModelSpace().getModelManager().deleteEntity(child,IModelManager.DELETE_SEMANTICS_FORCE);

+			try {

+			recursive_delete(child);
+			parent.getModelSpace().getTransactionManager().commitTransaction();

+			} catch (Exception e) { 
+				e.printStackTrace(); 
+				parent.getModelSpace().getTransactionManager().abortTransaction();	
+			}

+//			finally {

+			

+//			}

+		} 

+		else if (source != null && relation != null) 

+		{

+			// we're deleting a relation

+			iTransactionID = relation.getModelSpace().getTransactionManager().beginUndoableTransaction(Boolean.TRUE);

+			//relation.getModelSpace().getUndoManager().nextUndoBlock("vte_delrel");

+			relation.getModelSpace().getModelManager().deleteElement(relation, EDeleteSemantics.DELETE_SEMANTICS_FORCE);

+			source.getModelSpace().getTransactionManager().commitTransaction();

+		}

+	}

+

+	public void undo() {

+		parent = (IEntity) Lookup(parent, parent_name);

+		source = Lookup(source, source_name);

+		if (parent != null) {

+			parent.getModelSpace().getTransactionManager().undoTransaction(iTransactionID);

+			//parent.getModelSpace().getUndoManager().undo("vte_delent");

+		} else if (source != null) {

+			source.getModelSpace().getTransactionManager().undoTransaction(iTransactionID);

+			//source.getModelSpace().getUndoManager().undo("vte_delrel");

+		}

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/MoveModelElementCommand.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/MoveModelElementCommand.java
new file mode 100644
index 0000000..55f58b7
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/MoveModelElementCommand.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.commands;

+

+import org.eclipse.viatra2.core.IEntity;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.core.IRelation;

+import org.eclipse.viatra2.errors.VPMCoreException;

+

+public class MoveModelElementCommand extends ViatraEditorCommand {

+

+	private IEntity newparent, oldparent, child;

+

+	private String newparent_name, oldparent_name, child_name, child_oldname;

+

+	private IModelElement newsource, oldsource;

+

+	private IRelation relation;

+

+	private String newsource_name, oldsource_name, relation_name,

+			relation_oldname;

+

+	public void setEntity(IEntity aChld, IEntity aNewParent) {

+		child = aChld;

+		oldparent = child.getParent();

+		newparent = aNewParent;

+		child_name = child.getFullyQualifiedName();

+		oldparent_name = oldparent.getFullyQualifiedName();

+		newparent_name = newparent.getFullyQualifiedName();

+

+		newsource = oldsource = relation = null;

+		newsource_name = oldsource_name = relation_name = relation_oldname = null;

+	}

+

+	public void setRelation(IRelation aRel, IModelElement aNewSource) {

+		relation = aRel;

+		oldsource = relation.getFrom();

+		newsource = aNewSource;

+		relation_name = relation.getFullyQualifiedName();

+		oldsource_name = oldsource.getFullyQualifiedName();

+		newsource_name = newsource.getFullyQualifiedName();

+

+		newparent = oldparent = child = null;

+		newparent_name = oldparent_name = child_name = child_oldname = null;

+	}

+

+	public void execute() throws VPMCoreException {

+		newparent = (IEntity) Lookup(newparent, newparent_name);

+		oldparent = (IEntity) Lookup(oldparent, oldparent_name);

+		child = (IEntity) Lookup(child, child_name);

+		newsource = Lookup(newsource, newsource_name);

+		oldsource = Lookup(oldsource, oldsource_name);

+		relation = (IRelation) Lookup(relation, relation_name);

+		if (child != null && oldparent != null && newparent != null) {

+			// we're repareting an entity

+			iTransactionID = child.getModelSpace().getTransactionManager().beginUndoableTransaction();

+			// child.getModelSpace().getUndoManager().nextUndoBlock("vte_moveent");

+			child.getModelSpace().getModelManager().moveEntityTo(child,	newparent);

+			child_oldname = child_name;

+			child_name = child.getFullyQualifiedName();

+			child.getModelSpace().getTransactionManager().commitTransaction();

+		} else if (relation != null && oldsource != null && newsource != null) {

+			// we're resourcing a relation

+			iTransactionID = relation.getModelSpace().getTransactionManager().beginUndoableTransaction();

+			//relation.getModelSpace().getUndoManager().nextUndoBlock("vte_moverel"); 

+			relation.getModelSpace().getModelManager().setRelationFrom(relation, newsource);

+			relation_oldname = relation_name;

+			relation_name = relation.getFullyQualifiedName();

+			relation.getModelSpace().getTransactionManager().commitTransaction();

+		}

+

+	}

+

+	public void undo() {

+		newparent = (IEntity) Lookup(newparent, newparent_name);

+		oldparent = (IEntity) Lookup(oldparent, oldparent_name);

+		child = (IEntity) Lookup(child, child_name);

+		newsource = Lookup(newsource, newsource_name);

+		oldsource = Lookup(oldsource, oldsource_name);

+		relation = (IRelation) Lookup(relation, relation_name);

+		if (child != null && newparent != null && oldparent != null) {

+			child.getModelSpace().getTransactionManager().undoTransaction(iTransactionID);

+			//child.getModelSpace().getUndoManager().undo("vte_moveent");

+			child_name = child_oldname;

+		/*	String t = newparent_name;

+			newparent_name = oldparent_name;

+			oldparent_name = t;

+		*/

+		} else if (relation != null && oldsource != null && newsource != null) {

+			relation.getModelSpace().getTransactionManager().undoTransaction(iTransactionID);

+			//relation.getModelSpace().getUndoManager().undo("vte_moverel");

+			relation_name = relation_oldname;

+		/*	String t = newsource_name;

+			newsource_name = oldsource_name;

+			oldsource_name = t;

+		*/

+		}

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/RemoveSupertypeCommand.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/RemoveSupertypeCommand.java
new file mode 100644
index 0000000..e5d5ead
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/RemoveSupertypeCommand.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.commands;

+

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.errors.VPMCoreException;

+

+public class RemoveSupertypeCommand extends ViatraEditorCommand

+{

+	private IModelElement targetElem, supertypeElem;

+	private String targetElem_name, supertypeElem_name;

+	

+	public void setTargetElem(IModelElement e)

+	{

+		targetElem = e;

+		targetElem_name = e.getFullyQualifiedName();

+	}

+	

+	public void setSupertypeElem(IModelElement e)

+	{

+		supertypeElem = e;

+		supertypeElem_name = e.getFullyQualifiedName();

+	}

+

+	@Override

+	public void execute() throws VPMCoreException

+	{

+		targetElem = Lookup(targetElem, targetElem_name);

+		supertypeElem = Lookup(supertypeElem, supertypeElem_name);

+		if (targetElem != null && supertypeElem != null)

+		{

+			iTransactionID = targetElem.getModelSpace().getTransactionManager().beginUndoableTransaction();

+			//targetElem.getModelSpace().getUndoManager().nextUndoBlock("vte_addst");

+			targetElem.getModelSpace().getModelManager().deleteSupertypeOf(supertypeElem, targetElem);

+			targetElem.getModelSpace().getTransactionManager().commitTransaction();

+		}

+	}

+

+	@Override

+	public void undo() throws VPMCoreException

+	{

+		targetElem = Lookup(targetElem, targetElem_name);

+		supertypeElem = Lookup(supertypeElem, supertypeElem_name);

+		if (targetElem != null && supertypeElem != null)

+		{

+			targetElem.getModelSpace().getTransactionManager().undoTransaction(iTransactionID);

+			//targetElem.getModelSpace().getUndoManager().undo("vte_addst");

+		}

+	}

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/RemoveTypeCommand.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/RemoveTypeCommand.java
new file mode 100644
index 0000000..04a8c7b
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/RemoveTypeCommand.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.commands;

+

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.errors.VPMCoreException;

+

+public class RemoveTypeCommand extends ViatraEditorCommand

+{

+	private IModelElement targetElem, typeElem;

+	private String targetElem_name, typeElem_name;

+	

+	public void setTargetElem(IModelElement e)

+	{

+		targetElem = e;

+		targetElem_name = e.getFullyQualifiedName();

+	}

+	

+	public void setTypeElem(IModelElement e)

+	{

+		typeElem = e;

+		typeElem_name = e.getFullyQualifiedName();

+	}

+

+	@Override

+	public void execute() throws VPMCoreException

+	{

+		targetElem = Lookup(targetElem, targetElem_name);

+		typeElem = Lookup(typeElem, typeElem_name);

+		if (targetElem != null && typeElem != null)

+		{

+			iTransactionID = targetElem.getModelSpace().getTransactionManager().beginUndoableTransaction();

+			//targetElem.getModelSpace().getUndoManager().nextUndoBlock("vte_addty");

+			targetElem.getModelSpace().getModelManager().deleteInstanceOf(typeElem, targetElem);

+			targetElem.getModelSpace().getTransactionManager().commitTransaction();

+		}

+	}

+

+	@Override

+	public void undo() throws VPMCoreException

+	{

+		targetElem = Lookup(targetElem, targetElem_name);

+		typeElem = Lookup(typeElem, typeElem_name);

+		if (targetElem != null && typeElem != null)

+		{

+			targetElem.getModelSpace().getTransactionManager().undoTransaction(iTransactionID);

+			//targetElem.getModelSpace().getUndoManager().undo("vte_addty");

+		}

+	}

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/RetargetRelationCommand.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/RetargetRelationCommand.java
new file mode 100644
index 0000000..576d21e
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/RetargetRelationCommand.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.commands;

+

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.core.IRelation;

+import org.eclipse.viatra2.errors.VPMCoreException;

+

+public class RetargetRelationCommand extends ViatraEditorCommand {

+

+	private IModelElement newtarget, oldtarget;

+

+	private IRelation relation;

+

+	private String newtarget_name, oldtarget_name, relation_name,

+			relation_oldname;

+

+	public void setRelation(IRelation aRel, IModelElement aNewTarget) {

+		relation = aRel;

+		oldtarget = relation.getTo();

+		newtarget = aNewTarget;

+		relation_name = relation.getFullyQualifiedName();

+		if (oldtarget!=null) {
+			oldtarget_name = oldtarget.getFullyQualifiedName();
+		}
+		else {
+			oldtarget_name = ".illegal.";
+		}
+		if (newtarget!=null) {

+			newtarget_name = newtarget.getFullyQualifiedName();
+		}
+		else {
+			newtarget_name = ".illegal.";
+		}

+	}

+

+	public void execute() throws VPMCoreException {

+		newtarget = Lookup(newtarget, newtarget_name);

+		oldtarget = Lookup(oldtarget, oldtarget_name);

+		relation = (IRelation) Lookup(relation, relation_name);

+		if (relation != null && oldtarget != null && newtarget != null) {

+			// we're retargeting a relation

+			iTransactionID = relation.getModelSpace().getTransactionManager().beginUndoableTransaction();

+			//relation.getModelSpace().getUndoManager().nextUndoBlock("vte_retarget");

+			relation.getModelSpace().getModelManager().setRelationTo(relation, newtarget);

+			relation_oldname = relation_name;

+			relation_name = relation.getFullyQualifiedName();

+			relation.getModelSpace().getTransactionManager().commitTransaction();

+		}

+	}

+

+	public void undo() {

+		newtarget = Lookup(newtarget, newtarget_name);

+		oldtarget = Lookup(oldtarget, oldtarget_name);

+		relation = (IRelation) Lookup(relation, relation_name);

+		if (relation != null && oldtarget != null && newtarget != null) {

+			relation.getModelSpace().getTransactionManager().undoTransaction(iTransactionID);

+			//relation.getModelSpace().getUndoManager().undo("vte_retarget");

+			relation_name = relation_oldname;

+		}

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/ViatraCompoundCommand.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/ViatraCompoundCommand.java
new file mode 100644
index 0000000..59ca284
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/ViatraCompoundCommand.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.commands;

+

+import java.util.Vector;

+

+import org.eclipse.viatra2.errors.VPMCoreException;

+

+public class ViatraCompoundCommand extends ViatraEditorCommand {

+	private Vector<ViatraEditorCommand> commands;

+	

+	public ViatraCompoundCommand()

+	{

+		commands = new Vector<ViatraEditorCommand>();

+	}

+	

+	public void add(ViatraEditorCommand cmd)

+	{

+		commands.add(cmd);

+	}

+	

+	public boolean isEmpty()

+	{

+		return (commands.size() == 0);

+	}

+

+	@Override

+	public void execute() throws VPMCoreException

+	{

+		for (int i = 0; i < commands.size(); i++)

+			commands.get(i).execute();

+	}

+

+	@Override

+	public void undo() throws VPMCoreException

+	{

+		for (int i = commands.size(); i > 0; i--)

+			commands.get(i - 1).undo();

+	}

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/ViatraEditorCommand.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/ViatraEditorCommand.java
new file mode 100644
index 0000000..66f75df
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/ViatraEditorCommand.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.commands;

+

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.errors.VPMCoreException;

+

+

+public abstract class ViatraEditorCommand {

+

+	protected String iTransactionID;

+	

+	protected IModelElement Lookup(IModelElement me, String me_name) {

+		if (me != null && me_name != null) {

+			me = me.getModelSpace().getModelManager().getElementByName(me_name);

+			return me;

+		}

+		return null;

+	}

+	

+	public abstract void execute() throws VPMCoreException;

+	

+	public abstract void undo() throws VPMCoreException;

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/ViatraEditorCommandStack.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/ViatraEditorCommandStack.java
new file mode 100644
index 0000000..256b6d5
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/commands/ViatraEditorCommandStack.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.commands;

+

+import org.eclipse.viatra2.errors.VPMCoreException;

+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;

+

+import java.util.Vector;

+

+public class ViatraEditorCommandStack {

+

+	/**

+	 * Internal marker class used for marking save points on the Command Stack.

+	 * @author Istvan Rath

+	 *

+	 */

+	private class SaveMark extends ViatraEditorCommand {

+

+		@Override

+		public void execute() throws VPMCoreException {	}

+

+		@Override

+		public void undo() throws VPMCoreException { }

+		

+	}

+	

+	private Vector<ViatraEditorCommand> iCommands;

+	

+	private ViatraTreeEditor iVTE;

+		

+	

+	/**

+	 * Points to the last command which has been executed.

+	 */

+	private int iCurrentIndex = 0;

+	

+	public ViatraEditorCommandStack(ViatraTreeEditor vte) {

+		iCommands = new Vector<ViatraEditorCommand>();

+		iCommands.add(new SaveMark()); // add initial savemark

+		iVTE = vte;

+	}

+	

+	public void execute(ViatraEditorCommand cmd) {

+		

+		try {

+			cmd.execute();

+			for (int i=iCurrentIndex+1; i<iCommands.size(); i++)

+				iCommands.remove(i);

+			iCommands.add(cmd);

+			iCurrentIndex++;

+		}

+		catch (VPMCoreException e) {

+			iVTE.getFramework().getLogger().fatal(e.toString());
+			iVTE.getFramework().getTopmodel().getTransactionManager().abortTransaction();

+		}

+		// iVTE.setDirty();

+		// debugmsg();

+	}

+	

+	public void undo() {

+		try {

+			iCommands.get(iCurrentIndex).undo();

+			iCurrentIndex--;

+		} catch (VPMCoreException e) {

+			iVTE.getFramework().getLogger().fatal(e.toString());

+		}

+		iVTE.updateActions();

+		// debugmsg();

+	}

+	

+	public void redo() {

+		try {

+			iCommands.get(iCurrentIndex+1).execute();

+			iCurrentIndex++;

+		} catch (VPMCoreException e) {

+			iVTE.getFramework().getLogger().fatal(e.toString());

+		}

+		iVTE.updateActions();

+		// debugmsg();

+	}

+	

+	private void debugmsg() {

+		iVTE.getFramework().getLogger().debug("[VECommandStack] currindex is "+iCurrentIndex+", element at currindex is "+iCommands.get(iCurrentIndex).toString());

+	}

+	

+	public boolean isUndoable() {

+		return isDirty();

+	}

+	

+	public boolean isRedoable() {

+		return iCurrentIndex<iCommands.size()-1;

+	}

+	

+	public void markSave() {

+		this.execute(new SaveMark());

+	}

+	

+	public boolean isDirty() {

+		return !(iCommands.get(iCurrentIndex) instanceof SaveMark);

+	}

+	

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/menu/ViatraTreeEditorActionBarContributor.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/menu/ViatraTreeEditorActionBarContributor.java
new file mode 100644
index 0000000..90e62f3
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/menu/ViatraTreeEditorActionBarContributor.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.menu;

+

+

+import org.eclipse.jface.action.IToolBarManager;

+import org.eclipse.ui.part.EditorActionBarContributor;

+import org.eclipse.viatra2.treeeditor.actions.ViatraDeleteAction;

+import org.eclipse.viatra2.treeeditor.actions.ViatraRedoAction;

+import org.eclipse.viatra2.treeeditor.actions.ViatraUndoAction;

+

+public class ViatraTreeEditorActionBarContributor extends EditorActionBarContributor {

+

+	private ViatraDeleteAction iDeleteAction;

+	private ViatraUndoAction iUndoAction;

+	private ViatraRedoAction iRedoAction;

+	

+	public ViatraDeleteAction getDeleteAction() {

+		return iDeleteAction;

+	}

+

+	public ViatraRedoAction getRedoAction() {

+		return iRedoAction;

+	}

+

+	public ViatraUndoAction getUndoAction() {

+		return iUndoAction;

+	}

+	

+	public ViatraTreeEditorActionBarContributor() {

+		super();

+		iDeleteAction = new ViatraDeleteAction();

+		iUndoAction = new ViatraUndoAction();

+		iRedoAction = new ViatraRedoAction();

+	}

+	

+	@Override

+	public void contributeToToolBar(IToolBarManager toolBarManager) {

+		toolBarManager.add(iDeleteAction);

+		toolBarManager.add(iUndoAction);

+		toolBarManager.add(iRedoAction);

+	}

+

+

+	

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/menu/ViatraTreeEditorMenuListener.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/menu/ViatraTreeEditorMenuListener.java
new file mode 100644
index 0000000..bd136a5
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/menu/ViatraTreeEditorMenuListener.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.menu;

+

+

+import java.util.Iterator;

+import java.util.List;
+

+import org.eclipse.jface.action.IMenuListener;

+import org.eclipse.jface.action.IMenuManager;

+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;

+import org.eclipse.jface.viewers.ISelection;

+import org.eclipse.jface.viewers.StructuredSelection;

+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.viatra2.core.IEntity;

+import org.eclipse.viatra2.core.IRelation;

+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;

+import org.eclipse.viatra2.treeeditor.actions.ViatraTreeEditorSelectionAction;

+import org.eclipse.viatra2.treeeditor.providers.ViatraContentProvider.TargetRelationDummy;
+

+public class ViatraTreeEditorMenuListener implements IMenuListener {

+

+	private ViatraTreeEditor iVTE;

+

+	public ViatraTreeEditorMenuListener(ViatraTreeEditor vte) {

+		iVTE = vte;

+	}

+

+	public void menuAboutToShow(IMenuManager manager) {

+		manager.removeAll();

+

+		boolean isEntitySelected = false;

+		boolean isElementSelected = false;
+		boolean isRelationSelected = false;
+		boolean isRelationTargetSelected = false;
+		

+

+		ISelection sel = iVTE.getSite().getSelectionProvider().getSelection();

+	

+		

+		if (sel instanceof StructuredSelection) {

+									

+			Iterator it = ((StructuredSelection) sel).iterator();

+			while (it.hasNext()) {

+				Object curr = it.next();

+				if (!isElementSelected) {

+					if (iVTE.getDeleteAction()!=null)

+					{

+						manager.add(iVTE.getDeleteAction());

+					}

+					else

+					{

+						manager.add(iVTE.getLocalDeleteAction());

+					}

+					manager.add(iVTE.getRenameAction());

+					manager.add(new Separator("new"));

+					manager.add(iVTE.getNewRelationAction());

+					manager.add(new Separator("misc"));

+					manager.add(iVTE.getExportAction());

+					manager.add(new Separator());

+					isElementSelected = true;

+				}

+				if (curr instanceof IEntity && !isEntitySelected) {	

+					//if (iVTE.getFramework().isRunnable((IModelElement)curr))

+					//{

+					//		manager.appendToGroup("misc", iVTE.getRunAction());

+					//}

+					manager.appendToGroup("new", iVTE.getNewEntityAction());

+					isEntitySelected = true;

+				}

+				if (curr instanceof IRelation && !isRelationSelected)

+				{

+					manager.add(iVTE.getNavigateRelationAction());
+					isRelationSelected = true; // signal that a relation has already been selected
+					// no need to contribute any IRelation-specific action anymore

+				}
+				if (curr instanceof TargetRelationDummy && !isRelationTargetSelected)
+				{
+					manager.add(iVTE.getNavigateRelationSourceAction());
+					isRelationTargetSelected = true; // signal that a relation target dummy has already been selected
+					// no need to contribute any relation target-specific action anymore
+				}

+			}
+			manager.add(new Separator());
+			// add contributed actions
+//			for (ViatraTreeEditorSelectionAction a : iVTE.getContributedActions())
+//			{
+//				manager.add(a);
+//			}	
+			for (String key : iVTE.getContributedActions().keySet()) {
+				IMenuManager target = manager;
+				List<ViatraTreeEditorSelectionAction> cAs = iVTE.getContributedActions().get(key);
+				if (!"Default".equals( key )) {
+					target = new MenuManager( key );
+					manager.add(target);
+				}
+				for (ViatraTreeEditorSelectionAction a : cAs) {
+					target.add(a);
+				}
+			}
+			

+		}

+

+		//manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/VPMProperties.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/VPMProperties.java
new file mode 100644
index 0000000..f25a90b
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/VPMProperties.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.properties;

+

+/**

+ * 

+ * @author istvan rath

+ *

+ */

+public enum VPMProperties 

+{

+	// NAMING

+	NAME,

+	FQN,

+	VALUE,

+	VIEWINFO,

+	

+	// TYPES_SUPERTYPES

+	TYPE,

+	SUPERTYPE,

+	INSTANCE,

+	SUBTYPE,

+	ISFINALTYPE,

+	

+	// RELATION

+	SOURCE,

+	TARGET,

+	ISAGGREGATION,

+	MULTIPLICITY,

+	

+	// TAGS

+	WARNINGS,

+	INFOTAGS

+	

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/VPMPropertyCategory.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/VPMPropertyCategory.java
new file mode 100644
index 0000000..a13e7ff
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/VPMPropertyCategory.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.properties;

+

+public enum VPMPropertyCategory 

+{

+

+	NAMING_VALUES,

+	TYPES_SUPERTYPES,

+	RELATIONS,

+	TAGS

+	

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/VPMPropertySheetPage.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/VPMPropertySheetPage.java
new file mode 100644
index 0000000..24d7e7d
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/VPMPropertySheetPage.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.properties;

+

+import org.eclipse.jface.viewers.ISelection;

+import org.eclipse.jface.viewers.IStructuredSelection;

+import org.eclipse.swt.widgets.Tree;

+import org.eclipse.swt.widgets.TreeItem;

+import org.eclipse.ui.IWorkbenchPart;

+import org.eclipse.ui.views.properties.IPropertySheetEntry;

+import org.eclipse.ui.views.properties.IPropertySource;

+import org.eclipse.ui.views.properties.IPropertySourceProvider;

+import org.eclipse.ui.views.properties.PropertySheetPage;

+import org.eclipse.ui.views.properties.PropertySheetSorter;

+import org.eclipse.viatra2.core.ICoreNotificationListener;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;

+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;

+import org.eclipse.viatra2.treeeditor.properties.util.LabelTranslator;

+

+/**

+ * Property sheet page to display VPM properties organized into dynamic categories.

+ * 

+ * Supports:

+ *  - Core Nofitication listener to track changes occurring to currently selected elements

+ *  - support for editor actions (undo, redo, delete)

+ * 

+ * @author istvan rath

+ *

+ */

+public class VPMPropertySheetPage extends PropertySheetPage 

+implements ICoreNotificationListener

+{

+

+	ViatraTreeEditor iEditor;

+	

+	/**

+	 * Reference to the currently displayed element.

+	 */

+	IModelElement iElement;

+	

+	/**

+	 * Customized sorter to ensure proper ordering in the properties view. 

+	 */

+	VPMPropsSorter iSorter = new VPMPropsSorter();

+	

+	protected class VPMPropsSorter extends PropertySheetSorter

+	{

+		@Override

+		public int compare(IPropertySheetEntry entryA,

+				IPropertySheetEntry entryB) 

+		{

+			VPMProperties p1 = LabelTranslator.getVPMProperty(entryA.getDisplayName());

+			VPMProperties p2 = LabelTranslator.getVPMProperty(entryB.getDisplayName());

+			//return super.compare(entryA, entryB);

+			return p1.compareTo(p2);

+		}

+		

+		/**

+		 * Order of categories: (comes from VPMPropertyCategory.java)

+		 * 1) NAMING AND VALUES (name, fqn, value, viewinfo)

+		 * 2) TYPES AND SUPERTYPES (type, instance, supertype, subtype, isFinalType)

+		 * 3) SOURCE/TARGET (src,trg,isAggregation,multiplicity,-inverse)

+		 */

+		@Override

+		public int compareCategories(String categoryA, String categoryB) 

+		{

+			VPMPropertyCategory c1 = LabelTranslator.getPropCategory(categoryA);

+			VPMPropertyCategory c2 = LabelTranslator.getPropCategory(categoryB);

+			//return super.compareCategories(categoryA, categoryB);

+			return c1.compareTo(c2);

+		}

+	}

+	

+

+	public VPMPropertySheetPage(ViatraTreeEditor e) 

+	{

+		iEditor = e;

+		// set up the properties page

+		setSorter(iSorter);

+		setPropertySourceProvider(new IPropertySourceProvider(){

+

+			public IPropertySource getPropertySource(Object object) {

+				if (object instanceof IModelElement)

+					return new VPMPropertySource((IModelElement)object,iEditor);

+				return null;

+			}

+		});

+	}

+	

+	

+	@Override

+	public void selectionChanged(IWorkbenchPart part, ISelection selection) 

+	{

+		super.selectionChanged(part, selection);

+		

+		// remove previous attachment

+		if (iElement!=null)

+		{

+			iElement.getModelSpace().getNotificationManager().removeNotificationListener(iElement,this);

+		}

+		

+		if (selection instanceof IStructuredSelection)

+		{

+			Object o = ((IStructuredSelection)selection).getFirstElement();

+			if (o instanceof IModelElement)

+				iElement = (IModelElement)o;

+		}

+	}

+	

+	/**

+	 * Retain expanded state.

+	 */

+	@Override

+	public void refresh() {

+		

+		//super.refresh();

+		TreeItem[] is = ((Tree)getControl()).getSelection();

+		super.refresh();

+		((Tree)this.getControl()).setSelection(is);

+		((Tree)this.getControl()).showSelection();

+	}

+

+	public void actionPerformed(ICoreNotificationObject notification) 

+	{

+		this.refresh();

+		

+	}

+

+	public int getListenerCategory() { return 0; }

+	

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/VPMPropertySource.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/VPMPropertySource.java
new file mode 100644
index 0000000..efa94ab
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/VPMPropertySource.java
@@ -0,0 +1,421 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.properties;

+

+import java.util.ArrayList;

+import java.util.HashSet;

+import java.util.Set;

+

+import org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor;

+import org.eclipse.ui.views.properties.IPropertyDescriptor;

+import org.eclipse.ui.views.properties.IPropertySource2;

+import org.eclipse.ui.views.properties.PropertyDescriptor;

+import org.eclipse.ui.views.properties.TextPropertyDescriptor;

+import org.eclipse.viatra2.core.IEntity;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.core.IRelation;

+import org.eclipse.viatra2.tags.ITag;

+import org.eclipse.viatra2.tags.TagKind;

+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;

+import org.eclipse.viatra2.treeeditor.commands.AddSupertypeCommand;

+import org.eclipse.viatra2.treeeditor.commands.AddTypeCommand;

+import org.eclipse.viatra2.treeeditor.commands.ChangeElementNameCommand;

+import org.eclipse.viatra2.treeeditor.commands.ChangePropertyCommand;

+import org.eclipse.viatra2.treeeditor.commands.MoveModelElementCommand;

+import org.eclipse.viatra2.treeeditor.commands.RemoveSupertypeCommand;

+import org.eclipse.viatra2.treeeditor.commands.RemoveTypeCommand;

+import org.eclipse.viatra2.treeeditor.commands.RetargetRelationCommand;

+import org.eclipse.viatra2.treeeditor.commands.ViatraCompoundCommand;

+import org.eclipse.viatra2.treeeditor.commands.ViatraEditorCommand;

+import org.eclipse.viatra2.treeeditor.properties.descriptors.FQNListPropertyDescriptor;

+import org.eclipse.viatra2.treeeditor.properties.descriptors.FQNPropertyDescriptor;

+import org.eclipse.viatra2.treeeditor.properties.util.LabelTranslator;

+import org.eclipse.viatra2.treeeditor.properties.util.LegacyHelper;

+import org.eclipse.viatra2.treeeditor.properties.validators.DelimitedFQNListValidator;

+import org.eclipse.viatra2.treeeditor.properties.validators.FQNValidator;

+import org.eclipse.viatra2.treeeditor.properties.validators.LocalNameValidator;

+

+public class VPMPropertySource implements IPropertySource2 

+{

+

+	static final String[] boolChoice = new String[]{"false","true"};

+	static final String[] multiplicityChoice = new String[]{"many to many","many to one","one to many","one to one"}; // important order

+	

+	IModelElement iElement;

+	ViatraTreeEditor iEditor;

+	

+	public VPMPropertySource(IModelElement e,ViatraTreeEditor ed) 

+	{

+		iElement = e;

+		iEditor = ed;

+	}

+	

+	

+	public boolean isPropertyResettable(Object id) {

+		return false;

+	}

+

+	/*

+	 * Return true if the property has changed from the default value.

+	 */

+	public boolean isPropertySet(Object id) 

+	{

+		return false;

+	}

+

+	public Object getEditableValue() 

+	{

+		return null;

+	}

+

+	public IPropertyDescriptor[] getPropertyDescriptors() 

+	{

+		ArrayList<IPropertyDescriptor> r = new ArrayList<IPropertyDescriptor>();

+		PropertyDescriptor d = null;

+		

+		/* NAMING_VALUES */

+		

+		d = new TextPropertyDescriptor(VPMProperties.NAME,LabelTranslator.getPropertyName(VPMProperties.NAME));

+		d.setCategory(LabelTranslator.getCategoryName(VPMPropertyCategory.NAMING_VALUES));

+		d.setValidator(new LocalNameValidator(iElement));

+		r.add(d);

+		

+		// TextPropertyDescriptor to allow for easier copy-paste

+		d = new TextPropertyDescriptor(VPMProperties.FQN,LabelTranslator.getPropertyName(VPMProperties.FQN));

+		d.setCategory(LabelTranslator.getCategoryName(VPMPropertyCategory.NAMING_VALUES));

+		r.add(d);

+		

+		d = new PropertyDescriptor(VPMProperties.WARNINGS,LabelTranslator.getPropertyName(VPMProperties.WARNINGS));

+		d.setCategory(LabelTranslator.getCategoryName(VPMPropertyCategory.TAGS));

+		r.add(d);

+		

+		d = new PropertyDescriptor(VPMProperties.INFOTAGS,LabelTranslator.getPropertyName(VPMProperties.INFOTAGS));

+		d.setCategory(LabelTranslator.getCategoryName(VPMPropertyCategory.TAGS));

+		r.add(d);

+		

+		

+		if (iElement.isEntity())

+		{

+			d = new TextPropertyDescriptor(VPMProperties.VALUE,LabelTranslator.getPropertyName(VPMProperties.VALUE));

+			d.setCategory(LabelTranslator.getCategoryName(VPMPropertyCategory.NAMING_VALUES));

+			r.add(d);

+		}

+		

+		d = new TextPropertyDescriptor(VPMProperties.VIEWINFO,LabelTranslator.getPropertyName(VPMProperties.VIEWINFO));

+		d.setCategory(LabelTranslator.getCategoryName(VPMPropertyCategory.NAMING_VALUES));

+		r.add(d);

+		

+		/* TYPES_SUPERTYPES */

+		

+		d = new FQNListPropertyDescriptor(VPMProperties.TYPE,LabelTranslator.getPropertyName(VPMProperties.TYPE),iElement);

+		d.setCategory(LabelTranslator.getCategoryName(VPMPropertyCategory.TYPES_SUPERTYPES));

+		d.setValidator(new DelimitedFQNListValidator(iElement));

+		r.add(d);

+		

+		d = new FQNListPropertyDescriptor(VPMProperties.SUPERTYPE,LabelTranslator.getPropertyName(VPMProperties.SUPERTYPE),iElement);

+		d.setCategory(LabelTranslator.getCategoryName(VPMPropertyCategory.TYPES_SUPERTYPES));

+		d.setValidator(new DelimitedFQNListValidator(iElement));

+		r.add(d);

+		

+		d = new FQNListPropertyDescriptor(VPMProperties.INSTANCE,LabelTranslator.getPropertyName(VPMProperties.INSTANCE),iElement);

+		d.setCategory(LabelTranslator.getCategoryName(VPMPropertyCategory.TYPES_SUPERTYPES));

+		d.setValidator(new DelimitedFQNListValidator(iElement));

+		r.add(d);

+		

+		d = new FQNListPropertyDescriptor(VPMProperties.SUBTYPE,LabelTranslator.getPropertyName(VPMProperties.SUBTYPE),iElement);

+		d.setCategory(LabelTranslator.getCategoryName(VPMPropertyCategory.TYPES_SUPERTYPES));

+		d.setValidator(new DelimitedFQNListValidator(iElement));

+		r.add(d);

+		

+		d = new ComboBoxPropertyDescriptor(VPMProperties.ISFINALTYPE,LabelTranslator.getPropertyName(VPMProperties.ISFINALTYPE),

+				boolChoice);

+		d.setCategory(LabelTranslator.getCategoryName(VPMPropertyCategory.TYPES_SUPERTYPES));

+		r.add(d);

+		

+		/* RELATIONS */

+		

+		if (iElement.isRelation())

+		{

+			d = new FQNPropertyDescriptor(VPMProperties.SOURCE,LabelTranslator.getPropertyName(VPMProperties.SOURCE),iElement);

+			d.setCategory(LabelTranslator.getCategoryName(VPMPropertyCategory.RELATIONS));

+			d.setValidator(new FQNValidator(iElement));

+			r.add(d);

+			

+			d = new FQNPropertyDescriptor(VPMProperties.TARGET,LabelTranslator.getPropertyName(VPMProperties.TARGET),iElement);

+			d.setCategory(LabelTranslator.getCategoryName(VPMPropertyCategory.RELATIONS));

+			d.setValidator(new FQNValidator(iElement));

+			r.add(d);

+			

+			d = new ComboBoxPropertyDescriptor(VPMProperties.ISAGGREGATION,LabelTranslator.getPropertyName(VPMProperties.ISAGGREGATION),boolChoice);

+			d.setCategory(LabelTranslator.getCategoryName(VPMPropertyCategory.RELATIONS));

+			r.add(d);

+			

+			d = new ComboBoxPropertyDescriptor(VPMProperties.MULTIPLICITY,LabelTranslator.getPropertyName(VPMProperties.MULTIPLICITY),multiplicityChoice);

+			d.setCategory(LabelTranslator.getCategoryName(VPMPropertyCategory.RELATIONS));

+			r.add(d);

+		}	

+		

+		return r.toArray(new IPropertyDescriptor[]{});

+	}

+

+	static Integer Int0 = new Integer(0);

+	static Integer Int1 = new Integer(1);

+	static String EmptyString = new String("");

+	

+	public Object getPropertyValue(Object id) {
+		try {

+			switch ( ((VPMProperties)id) )

+			{

+			case NAME: return iElement.getName();

+			case FQN: return iElement.getFullyQualifiedName();

+			case VALUE: return ((IEntity)iElement).getValue();

+			case VIEWINFO: return iElement.getViewInfo()!=null?iElement.getViewInfo():EmptyString;

+			case TYPE: return LegacyHelper.getTypesAsString(iElement); // FIXME change me

+			case INSTANCE: return LegacyHelper.getInstancesAsString(iElement);

+			case SUPERTYPE: return LegacyHelper.getSupertypesAsString(iElement);

+			case SUBTYPE: return LegacyHelper.getSubtypesAsString(iElement);

+			case ISFINALTYPE: return iElement.getIsFinalType()?Int1:Int0;

+			case SOURCE: return ((IRelation)iElement).getFrom().getFullyQualifiedName();

+			case TARGET: return ((IRelation)iElement).getTo().getFullyQualifiedName();

+			case ISAGGREGATION: return ((IRelation)iElement).getIsAggregation()?Int1:Int0;

+			case MULTIPLICITY: return ((IRelation)iElement).getMultiplicity().ordinal();

+			case WARNINGS:

+				String warnings = "";

+				Set<ITag> tags = iEditor.getFramework().getTagManager().getTagsForModelElement(iElement);

+				if (tags!=null)

+				{

+					for (ITag t : tags)

+					{

+						if (t.getKind().equals(TagKind.MODELING_PROBLEM))

+							warnings += t.getMessage()+"; ";

+					}

+				}

+				return warnings; 

+			case INFOTAGS:

+				String infos = "";

+				Set<ITag> _tags = iEditor.getFramework().getTagManager().getTagsForModelElement(iElement);

+				if (_tags!=null)

+				{

+					for (ITag t : _tags)

+					{

+						if (t.getKind().equals(TagKind.MODELING_INFO))

+							infos += t.getMessage()+"; ";

+					}

+				}

+				return infos; 

+			}
+		}
+		catch (Throwable t) {
+			// swallow nullpointers in case of invalid element references

+		}
+		return null;

+	}

+

+	public void resetPropertyValue(Object id) { }

+

+	@SuppressWarnings("unchecked")

+	public void setPropertyValue(Object id, Object value) {

+		ViatraEditorCommand cmd = null;

+		switch ( ((VPMProperties)id) )

+		{

+		case NAME: 

+			ChangeElementNameCommand c = new ChangeElementNameCommand();

+			c.setNewElemName(value.toString());

+			c.setTargetElem(iElement);

+			cmd = c;

+			break;

+		case VALUE:

+			ChangePropertyCommand c1 = new ChangePropertyCommand();

+			c1.setKind(VPMProperties.VALUE);

+			c1.setNewValue(value.toString());

+			c1.setTarget(iElement);

+			cmd = c1;

+			break;

+		case VIEWINFO:

+			ChangePropertyCommand c2 = new ChangePropertyCommand();

+			c2.setKind(VPMProperties.VIEWINFO);

+			c2.setNewValue(value.toString());

+			c2.setTarget(iElement);

+			cmd = c2;

+			break;

+		case ISFINALTYPE:

+			ChangePropertyCommand c3 = new ChangePropertyCommand();

+			c3.setKind(VPMProperties.ISFINALTYPE);

+			c3.setIntValue((Integer)value);

+			c3.setTarget(iElement);

+			cmd = c3;

+			break;

+		case ISAGGREGATION:

+			ChangePropertyCommand c4 = new ChangePropertyCommand();

+			c4.setKind(VPMProperties.ISAGGREGATION);

+			c4.setIntValue((Integer)value);

+			c4.setTarget(iElement);

+			cmd = c4;

+			break;

+		case MULTIPLICITY:

+			ChangePropertyCommand c5 = new ChangePropertyCommand();

+			c5.setKind(VPMProperties.MULTIPLICITY);

+			c5.setIntValue((Integer)value);

+			c5.setTarget(iElement);

+			cmd = c5;

+			break;

+		case SOURCE:

+			// check if valid

+			IModelElement newSrc = 

+				iElement.getModelSpace().getModelManager().getElementByName(value.toString());

+			if (newSrc!=null)

+			{

+				MoveModelElementCommand c6 = new MoveModelElementCommand();

+				c6.setRelation((IRelation)iElement,newSrc);

+				cmd = c6;

+			}

+			break;

+		case TARGET:

+			// check if valid

+			IModelElement newTrg = 

+				iElement.getModelSpace().getModelManager().getElementByName(value.toString());

+			if (newTrg!=null)

+			{

+				RetargetRelationCommand c7 = new RetargetRelationCommand();

+				c7.setRelation((IRelation)iElement,newTrg);

+				cmd = c7;

+			}

+			break;

+		case TYPE:

+			if (true)

+			{

+				Set<IModelElement> newSet = clean_split(value.toString());

+				if (newSet==null) return; // error

+				HashSet<IModelElement> oldSet = new HashSet<IModelElement>();

+				oldSet.addAll(iElement.getTypes());

+				HashSet<IModelElement> _oldSet = (HashSet<IModelElement>)oldSet.clone();

+				oldSet.removeAll(newSet);

+				newSet.removeAll(_oldSet);

+				// now, all elements in newSet need to be added, and all elements in oldSet need to be removed

+				ViatraCompoundCommand cc = new ViatraCompoundCommand();

+				for (IModelElement staleType : oldSet)

+				{

+					RemoveTypeCommand _c = new RemoveTypeCommand();

+					_c.setTargetElem(iElement);

+					_c.setTypeElem(staleType);

+					cc.add(_c);

+				}

+				for (IModelElement newType : newSet)

+				{

+					AddTypeCommand _c = new AddTypeCommand();

+					_c.setTargetElem(iElement);

+					_c.setTypeElem(newType);

+					cc.add(_c);

+				}

+				cmd = cc;

+			}

+			break;

+		case INSTANCE:

+			if (true)

+			{

+				Set<IModelElement> newSet = clean_split(value.toString());

+				if (newSet==null) return; // error

+				HashSet<IModelElement> oldSet = new HashSet<IModelElement>();

+				oldSet.addAll(iElement.getInstances());

+				HashSet<IModelElement> _oldSet = (HashSet<IModelElement>)oldSet.clone();

+				oldSet.removeAll(newSet);

+				newSet.removeAll(_oldSet);

+				// now, all elements in newSet need to be added, and all elements in oldSet need to be removed

+				ViatraCompoundCommand cc = new ViatraCompoundCommand();

+				for (IModelElement staleType : oldSet)

+				{

+					RemoveTypeCommand _c = new RemoveTypeCommand();

+					_c.setTargetElem(staleType);

+					_c.setTypeElem(iElement);

+					cc.add(_c);

+				}

+				for (IModelElement newType : newSet)

+				{

+					AddTypeCommand _c = new AddTypeCommand();

+					_c.setTargetElem(newType);

+					_c.setTypeElem(iElement);

+					cc.add(_c);

+				}

+				cmd = cc;

+			}

+			break;

+		case SUPERTYPE:

+			if (true)

+			{

+				Set<IModelElement> newSet = clean_split(value.toString());

+				if (newSet==null) return; // error

+				HashSet<IModelElement> oldSet = new HashSet<IModelElement>();

+				oldSet.addAll(iElement.getSupertypes());

+				HashSet<IModelElement> _oldSet = (HashSet<IModelElement>)oldSet.clone();

+				oldSet.removeAll(newSet);

+				newSet.removeAll(_oldSet);

+				// now, all elements in newSet need to be added, and all elements in oldSet need to be removed

+				ViatraCompoundCommand cc = new ViatraCompoundCommand();

+				for (IModelElement staleType : oldSet)

+				{

+					RemoveSupertypeCommand _c = new RemoveSupertypeCommand();

+					_c.setTargetElem(iElement);

+					_c.setSupertypeElem(staleType);

+					cc.add(_c);

+				}

+				for (IModelElement newType : newSet)

+				{

+					AddSupertypeCommand _c = new AddSupertypeCommand();

+					_c.setTargetElem(iElement);

+					_c.setSupertypeElem(newType);

+					cc.add(_c);

+				}

+				cmd = cc;

+			}

+			break;

+		case SUBTYPE:

+			if (true)

+			{

+				Set<IModelElement> newSet = clean_split(value.toString());

+				if (newSet==null) return; // error

+				HashSet<IModelElement> oldSet = new HashSet<IModelElement>();

+				oldSet.addAll(iElement.getSubtypes());

+				HashSet<IModelElement> _oldSet = (HashSet<IModelElement>)oldSet.clone();

+				oldSet.removeAll(newSet);

+				newSet.removeAll(_oldSet);

+				// now, all elements in newSet need to be added, and all elements in oldSet need to be removed

+				ViatraCompoundCommand cc = new ViatraCompoundCommand();

+				for (IModelElement staleType : oldSet)

+				{

+					RemoveSupertypeCommand _c = new RemoveSupertypeCommand();

+					_c.setTargetElem(staleType);

+					_c.setSupertypeElem(iElement);

+					cc.add(_c);

+				}

+				for (IModelElement newType : newSet)

+				{

+					AddSupertypeCommand _c = new AddSupertypeCommand();

+					_c.setTargetElem(newType);

+					_c.setSupertypeElem(iElement);

+					cc.add(_c);

+				}

+				cmd = cc;

+			}

+			break;

+		}

+		

+		if (cmd!=null) iEditor.getCommandStack().execute(cmd);

+	}

+	

+	private Set<IModelElement> clean_split(String s)

+	{

+		String[] elements = s.replaceAll("[\\s]", "").split("[,;]");

+		return LegacyHelper.convertStringArrayToSetOfElements(elements, false, iElement.getModelSpace().getModelManager());

+	}

+}

+

+

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/descriptors/FQNListPropertyDescriptor.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/descriptors/FQNListPropertyDescriptor.java
new file mode 100644
index 0000000..63570e0
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/descriptors/FQNListPropertyDescriptor.java
@@ -0,0 +1,170 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.properties.descriptors;

+

+import java.util.ArrayList;

+

+import org.eclipse.jface.fieldassist.ContentProposalAdapter;

+import org.eclipse.jface.fieldassist.IContentProposal;

+import org.eclipse.jface.fieldassist.IContentProposalProvider;

+import org.eclipse.jface.fieldassist.TextContentAdapter;

+import org.eclipse.jface.viewers.CellEditor;

+import org.eclipse.jface.viewers.TextCellEditor;

+import org.eclipse.swt.widgets.Composite;

+import org.eclipse.swt.widgets.Control;

+import org.eclipse.ui.views.properties.TextPropertyDescriptor;

+import org.eclipse.viatra2.core.IModelElement;

+

+/**

+ * Property descriptor for a [;,]-delimited string of VPM FQNs.

+ * @author Istvan Rath

+ *

+ */

+public class FQNListPropertyDescriptor extends TextPropertyDescriptor

+{

+

+	IModelElement iElement;

+	

+	public FQNListPropertyDescriptor(Object id, String displayName, IModelElement element) {

+		super(id, displayName);

+		iElement = element;

+	}

+

+	@Override

+	public CellEditor createPropertyEditor(Composite parent) 

+	{

+		return new FQNListCellEditor(parent);

+	}

+

+	

+	

+	public class FQNListCellEditor extends TextCellEditor

+	{

+		

+		public FQNListCellEditor(Composite parent) 

+		{

+			super(parent);

+		}

+		

+		@Override

+		protected Control createControl(Composite parent) {

+			Control c = super.createControl(parent);

+			try

+			{

+				// set up content assist

+				@SuppressWarnings("unused")

+				ContentProposalAdapter a = new ContentProposalAdapter(

+						c,

+						new TextContentAdapter(),

+						//new SimpleContentProposalProvider(new String[]{"A","B","C"}),

+						new FQNListContentProposalProvider(),

+						null,

+						//KeyStroke.getInstance("Ctrl+Space"),

+						null

+						);

+			}

+			catch (Exception e) { }

+			return c;

+		}

+	}

+	

+	public class FQNContentProposal implements IContentProposal

+	{

+

+		public FQNContentProposal(IModelElement aE, int origPos) 

+		{

+			e = aE;

+			origPosition = origPos;

+		}

+		

+		IModelElement e;

+		int origPosition;

+		

+		public String getContent() {

+			return e.getFullyQualifiedName().substring(origPosition);

+		}

+

+		public int getCursorPosition() {

+			return getContent().length(); // place cursor at the very end

+		}

+

+		public String getDescription() {

+			return "A fully qualified name whose prefix matches the content.";

+		}

+

+		public String getLabel() {

+			return e.getFullyQualifiedName();

+		}

+		

+	}

+	

+	

+	public class FQNListContentProposalProvider implements IContentProposalProvider

+	{

+

+		public IContentProposal[] getProposals(String contents, int position) 

+		{

+			// find last delimiter character before position
+			// begin_pos: where current FQN begins (position of last delimiter character

+			int begin_pos1 = Math.max(0, contents.substring(0,position).lastIndexOf(";"));

+			int begin_pos2 = Math.max(0, contents.substring(0,position).lastIndexOf(","));
+			// end_pos: where current FQN ends (position of last non-delimiter character

+			int end_pos1 = position+Math.max(0, contents.substring(position).lastIndexOf(";"));

+			int end_pos2 = position+Math.max(0, contents.substring(position).lastIndexOf(","));

+			int begin = (Math.max(begin_pos1, begin_pos2)>0?Math.max(begin_pos1, begin_pos2)+1:Math.max(begin_pos1, begin_pos2));
+			int end = Math.max(end_pos1, end_pos2); //>0?Math.max(begin_pos1, begin_pos2)+1:Math.max(begin_pos1, begin_pos2));
+			
+			
+			// check whether current FQN segment is non-empty
+			if (end-begin<1) {
+				return new IContentProposal[]{};
+			}
+			
+			// strip white spaces after begin position (if any)

+		//	while (Character.isWhitespace(contents.charAt(begin))) {
+		//		begin++; // trim-begin
+		//	}
+			
+			for (int i=begin; i<end; i++) {
+				if (Character.isWhitespace( contents.charAt(i)) ) {
+					begin++;
+				}
+			}

+			
+			
+			String target = contents.substring(

+					begin,

+					Math.min(end_pos1, end_pos2));

+					//.trim();

+			

+			String validFQN = target.substring(0,Math.max(0, target.lastIndexOf(".")));

+			String remainder = target.substring(target.lastIndexOf(".")+1);

+			IModelElement validRoot = iElement.getModelSpace().getModelManager().getElementByName(validFQN);

+			if (validRoot!=null)

+			{

+				ArrayList<IContentProposal> r = new ArrayList<IContentProposal>();

+				for (IModelElement e : validRoot.getElementsInNamespace())

+				{

+					if (e.getName().startsWith(remainder))

+						//r.add(new FQNContentProposal(e,position - contents.lastIndexOf(validFQN)));

+						r.add(new FQNContentProposal(e,position - begin));

+				}

+				return r.toArray(new IContentProposal[]{});

+			}

+			//return null;
+			return new IContentProposal[]{};

+		}

+		

+	}

+	

+	

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/descriptors/FQNPropertyDescriptor.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/descriptors/FQNPropertyDescriptor.java
new file mode 100644
index 0000000..3eebb33
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/descriptors/FQNPropertyDescriptor.java
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.properties.descriptors;

+

+import java.util.ArrayList;

+

+import org.eclipse.jface.fieldassist.ContentProposalAdapter;

+import org.eclipse.jface.fieldassist.IContentProposal;

+import org.eclipse.jface.fieldassist.IContentProposalProvider;

+import org.eclipse.jface.fieldassist.TextContentAdapter;

+import org.eclipse.jface.viewers.CellEditor;

+import org.eclipse.jface.viewers.TextCellEditor;

+import org.eclipse.swt.widgets.Composite;

+import org.eclipse.swt.widgets.Control;

+import org.eclipse.ui.views.properties.TextPropertyDescriptor;

+import org.eclipse.viatra2.core.IModelElement;

+

+/**

+ * Property descriptor for VPM FQNs.

+ * @author Istvan Rath

+ *

+ */

+public class FQNPropertyDescriptor extends TextPropertyDescriptor

+{

+

+	IModelElement iElement;

+	

+	public FQNPropertyDescriptor(Object id, String displayName, IModelElement element) {

+		super(id, displayName);

+		iElement = element;

+	}

+

+	@Override

+	public CellEditor createPropertyEditor(Composite parent) 

+	{

+		return new FQNCellEditor(parent);

+	}

+

+	

+	

+	public class FQNCellEditor extends TextCellEditor

+	{

+		

+		public FQNCellEditor(Composite parent) 

+		{

+			super(parent);

+		}

+		

+		@Override

+		protected Control createControl(Composite parent) {

+			Control c = super.createControl(parent);

+			try

+			{

+				// set up content assist

+				@SuppressWarnings("unused")

+				ContentProposalAdapter a = new ContentProposalAdapter(

+						c,

+						new TextContentAdapter(),

+						//new SimpleContentProposalProvider(new String[]{"A","B","C"}),

+						new FQNContentProposalProvider(),

+						null,//KeyStroke.getInstance("Ctrl+Space"),

+						null

+						);

+			}

+			catch (Exception e) { }

+			return c;

+		}

+	}

+	

+	public class FQNContentProposal implements IContentProposal

+	{

+

+		public FQNContentProposal(IModelElement aE, int origPos) 

+		{

+			e = aE;

+			origPosition = origPos;

+		}

+		

+		IModelElement e;

+		int origPosition;

+		

+		public String getContent() {

+			return e.getFullyQualifiedName().substring(origPosition);

+		}

+

+		public int getCursorPosition() {

+			return getContent().length(); // place cursor at the very end

+		}

+

+		public String getDescription() {

+			return "A fully qualified name whose prefix matches the content.";

+		}

+

+		public String getLabel() {

+			return e.getFullyQualifiedName();

+		}

+		

+	}

+	

+	

+	public class FQNContentProposalProvider implements IContentProposalProvider

+	{

+

+		public IContentProposal[] getProposals(String contents, int position) 

+		{

+			String validFQN = contents.substring(0,Math.max(0, contents.lastIndexOf(".")));

+			String remainder = contents.substring(contents.lastIndexOf(".")+1);

+			IModelElement validRoot = iElement.getModelSpace().getModelManager().getElementByName(validFQN);

+			if (validRoot!=null)

+			{

+				ArrayList<IContentProposal> r = new ArrayList<IContentProposal>();

+				for (IModelElement e : validRoot.getElementsInNamespace())

+				{

+					if (e.getName().startsWith(remainder))

+						r.add(new FQNContentProposal(e,position));

+				}

+				return r.toArray(new IContentProposal[]{});

+			}

+			return null;

+		}

+		

+	}

+	

+	

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/util/LabelTranslator.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/util/LabelTranslator.java
new file mode 100644
index 0000000..6837695
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/util/LabelTranslator.java
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.properties.util;

+

+import org.eclipse.viatra2.treeeditor.properties.VPMProperties;

+import org.eclipse.viatra2.treeeditor.properties.VPMPropertyCategory;

+

+public class LabelTranslator 

+{

+

+	/* Categories */

+	

+	

+	static final String PROP_CAT_NAMING = "Naming & values";

+	static final String PROP_CAT_TYPES = "Types & supertypes";

+	static final String PROP_CAT_RELATIONS = "Relations";

+	static final String PROP_CAT_TAGS = "Tags";

+		

+	

+	public static VPMPropertyCategory getPropCategory(String name)

+	{

+		if (PROP_CAT_NAMING.equals(name))

+			return VPMPropertyCategory.NAMING_VALUES;

+		else if (PROP_CAT_RELATIONS.equals(name))

+			return VPMPropertyCategory.RELATIONS;

+		else if (PROP_CAT_TAGS.equals(name))

+			return VPMPropertyCategory.TAGS;

+		else //if (PROP_CAT_TYPES.equals(name))

+			return VPMPropertyCategory.TYPES_SUPERTYPES;

+	}

+	

+	public static String getCategoryName(VPMPropertyCategory p)

+	{

+		if (p.equals(VPMPropertyCategory.NAMING_VALUES))

+			return PROP_CAT_NAMING;

+		else if (p.equals(VPMPropertyCategory.RELATIONS))

+			return PROP_CAT_RELATIONS;

+		else if (p.equals(VPMPropertyCategory.TAGS))

+			return PROP_CAT_TAGS;

+		else //if (p.equals(VPMPropertyCategory.TYPES_SUPERTYPES))

+			return PROP_CAT_TYPES;

+	}

+	

+	

+	

+	/* Properties */

+	

+	public static final String PROP_P_NAME = "Name";

+	public static final String PROP_P_FQN = "Fully qualified name";

+	public static final String PROP_P_VALUE = "Value";

+	public static final String PROP_P_VIEWINFO = "Comments";

+	public static final String PROP_P_TYPE = "Type(s)";

+	public static final String PROP_P_SUPERTYPE = "Supertype(s)";

+	public static final String PROP_P_INSTANCE = "Instance(s)";

+	public static final String PROP_P_SUBTYPE = "Subtype(s)";

+	public static final String PROP_P_ISFINALTYPE = "Final";

+	public static final String PROP_P_SOURCE = "Source";

+	public static final String PROP_P_TARGET = "Target";

+	public static final String PROP_P_ISAGGREGATION = "Aggregation";

+	public static final String PROP_P_MULTIPLICITY = "Multiplicity";

+	public static final String PROP_P_WARNINGS = "Problem tags";

+	public static final String PROP_P_INFOTAGS = "Information tags";

+	

+	

+	

+	public static VPMProperties getVPMProperty(String name)

+	{

+		if (PROP_P_NAME.equals(name))

+			return VPMProperties.NAME;

+		else if (PROP_P_FQN.equals(name))

+			return VPMProperties.FQN;

+		else if (PROP_P_VALUE.equals(name))

+			return VPMProperties.VALUE;

+		else if (PROP_P_VIEWINFO.equals(name))

+			return VPMProperties.VIEWINFO;

+		else if (PROP_P_TYPE.equals(name))

+			return VPMProperties.TYPE;

+		else if (PROP_P_SUPERTYPE.equals(name))

+			return VPMProperties.SUPERTYPE;

+		else if (PROP_P_INSTANCE.equals(name))

+			return VPMProperties.INSTANCE;

+		else if (PROP_P_SUBTYPE.equals(name))

+			return VPMProperties.SUBTYPE;

+		else if (PROP_P_ISFINALTYPE.equals(name))

+			return VPMProperties.ISFINALTYPE;

+		else if (PROP_P_SOURCE.equals(name))

+			return VPMProperties.SOURCE;

+		else if (PROP_P_TARGET.equals(name))

+			return VPMProperties.TARGET;

+		else if (PROP_P_ISAGGREGATION.equals(name))

+			return VPMProperties.ISAGGREGATION;

+		else if (PROP_P_WARNINGS.equals(name))

+			return VPMProperties.WARNINGS;

+		else if (PROP_P_INFOTAGS.equals(name))

+			return VPMProperties.INFOTAGS;

+		else //if (PROP_P_MULTIPLICITY.equals(name))

+			return VPMProperties.MULTIPLICITY;

+	}

+	

+	public static String getPropertyName(VPMProperties p)

+	{

+		if (VPMProperties.NAME.equals(p))

+			return PROP_P_NAME;

+		else if (VPMProperties.FQN.equals(p))

+			return PROP_P_FQN;

+		else if (VPMProperties.VALUE.equals(p))

+			return PROP_P_VALUE;

+		else if (VPMProperties.VIEWINFO.equals(p))

+			return PROP_P_VIEWINFO;

+		else if (VPMProperties.TYPE.equals(p))

+			return PROP_P_TYPE;

+		else if (VPMProperties.SUPERTYPE.equals(p))

+			return PROP_P_SUPERTYPE;

+		else if (VPMProperties.INSTANCE.equals(p))

+			return PROP_P_INSTANCE;

+		else if (VPMProperties.SUBTYPE.equals(p))

+			return PROP_P_SUBTYPE;

+		else if (VPMProperties.ISFINALTYPE.equals(p))

+			return PROP_P_ISFINALTYPE;

+		else if (VPMProperties.SOURCE.equals(p))

+			return PROP_P_SOURCE;

+		else if (VPMProperties.TARGET.equals(p))

+			return PROP_P_TARGET;

+		else if (VPMProperties.ISAGGREGATION.equals(p))

+			return PROP_P_ISAGGREGATION;

+		else if (VPMProperties.WARNINGS.equals(p))

+			return PROP_P_WARNINGS;

+		else if (VPMProperties.INFOTAGS.equals(p))

+			return PROP_P_INFOTAGS;

+		else //if (VPMProperties.MULTIPLICITY.equals([p))

+			return PROP_P_MULTIPLICITY;

+		

+	}

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/util/LegacyHelper.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/util/LegacyHelper.java
new file mode 100644
index 0000000..c89bf9a
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/util/LegacyHelper.java
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.properties.util;

+

+import java.util.HashSet;

+import java.util.Iterator;

+

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.core.IModelManager;

+

+public class LegacyHelper {

+

+	/**

+	 * Returns a modelelement's instances as a ; delimited string.

+	 * 

+	 * @param e

+	 *            the modelelement whose instances we want

+	 * @return the instances as a ; delimited string

+	 */

+	public static String getInstancesAsString(IModelElement e) {

+		String r = "";

+		Iterator i = e.getInstances().iterator();

+		while (i.hasNext()) {

+			r += ((IModelElement) i.next()).getFullyQualifiedName();

+			if (i.hasNext())

+				r += "; ";

+		}

+		return r;

+	}

+

+	/**

+	 * Returns a modelelement's subtypes as a ; delimited string.

+	 * 

+	 * @param e

+	 *            the modelelement whose subtypes we want

+	 * @return the subtypes as a ; delimited string

+	 */

+	public static String getSubtypesAsString(IModelElement e) {

+		String r = "";

+		Iterator i = e.getSubtypes().iterator();

+		while (i.hasNext()) {

+			r += ((IModelElement) i.next()).getFullyQualifiedName();

+			if (i.hasNext())

+				r += "; ";

+		}

+		return r;

+	}

+

+	/**

+	 * Returns a modelelement's supertypes as a ; delimited string.

+	 * 

+	 * @param e

+	 *            the modelelement whose supertypes we want

+	 * @return the supertypes as a ; delimited string

+	 */

+	public static String getSupertypesAsString(IModelElement e) {

+		String r = "";

+		Iterator i = e.getSupertypes().iterator();

+		while (i.hasNext()) {

+			r += ((IModelElement) i.next()).getFullyQualifiedName();

+			if (i.hasNext())

+				r += "; ";

+		}

+		return r;

+	}

+

+	/**

+	 * Returns a modelelement's types as a ; delimited string.

+	 * 

+	 * @param e

+	 *            the modelelement whose types we want

+	 * @return the types as a ; delimited string

+	 */

+	public static String getTypesAsString(IModelElement e) {

+		String r = "";

+		Iterator i = e.getTypes().iterator();

+		while (i.hasNext()) {

+			r += ((IModelElement) i.next()).getFullyQualifiedName();

+			if (i.hasNext())

+				r += "; ";

+		}

+		return r;

+	}

+	

+	/**

+	 * Convert a String array containing fully qualified names of modelelements

+	 * to a HashSet of corresponding IModelElements.

+	 * 

+	 * @param elements

+	 *            the string array containing fq names of modelelements

+	 * @param allowEmptyStringMatchOnRoot

+	 *            if true, parser will match the root entity on an empty string

+	 * @return the HashSet of ImplVMModelElements

+	 */

+	@SuppressWarnings("unchecked")

+	public static HashSet<IModelElement> convertStringArrayToSetOfElements(String[] elements,

+			boolean allowEmptyStringMatchOnRoot, IModelManager iManager) {

+		HashSet resultset = new HashSet<IModelElement>();

+		int matched = 0; // non-empty string (\"") counter

+		for (int i = 0; i < elements.length; i++) {

+			if (allowEmptyStringMatchOnRoot) {

+				matched++;

+				// System.out.println("[ViatraEditor]\t"+getName()+"::getElementFromStringArray:

+				// parsing "+elements[i]);

+				IModelElement e = iManager.getElementByName(elements[i]);

+				if (e != null)

+					resultset.add(e);

+			} else {

+				if (elements[i].length() > 0) {

+					matched++;

+					// System.out.println("[ViatraEditor]\t"+getName()+"::getElementFromStringArray:

+					// parsing "+elements[i]);

+					IModelElement e = iManager.getElementByName(elements[i]);

+					if (e != null)

+						resultset.add(e);

+				}

+			}

+		}

+		if (matched > 0 && resultset.isEmpty())

+			return null; // if there was something in the array, but no match

+							// was found, signal an arror by returning null

+		return resultset;

+	}

+	

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/validators/DelimitedFQNListValidator.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/validators/DelimitedFQNListValidator.java
new file mode 100644
index 0000000..a6b014a
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/validators/DelimitedFQNListValidator.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.properties.validators;

+

+import org.eclipse.viatra2.core.IModelElement;

+

+/**

+ * Reports errors when a non-valid FQN is entered in a [;,]-delimited list of FQNs.

+ * @author Istvan Rath

+ *

+ */

+public class DelimitedFQNListValidator extends VPMValidator

+{

+

+	public DelimitedFQNListValidator(IModelElement e) {super(e);}

+

+	public String isValid(Object value) 

+	{

+		// strip string of unnecessary whitespaces

+		String stripped = ((String) value).replaceAll("[\\s]", "");

+		String[] elements = stripped.split("[,;]");

+		for (String fqn: elements)

+		{

+			if (iElement.getModelSpace().getModelManager().getElementByName( fqn )==null)

+			{

+				return "Invalid FQN";

+			}	

+		}

+		return null; // means valid

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/validators/FQNValidator.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/validators/FQNValidator.java
new file mode 100644
index 0000000..7790563
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/validators/FQNValidator.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.properties.validators;

+

+import org.eclipse.viatra2.core.IModelElement;

+

+/**

+ * Reports errors when a non-valid FQN is entered.

+ * @author Istvan Rath

+ *

+ */

+public class FQNValidator extends VPMValidator

+{

+

+	public FQNValidator(IModelElement e) {super(e);}

+

+	public String isValid(Object value) 

+	{

+		if (iElement.getModelSpace().getModelManager().getElementByName(value.toString())==null)

+		{

+			return "Invalid FQN";

+		}

+		

+		return null; // means valid

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/validators/LocalNameValidator.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/validators/LocalNameValidator.java
new file mode 100644
index 0000000..785fec0
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/validators/LocalNameValidator.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.properties.validators;

+

+import org.eclipse.viatra2.core.IModelElement;

+

+public class LocalNameValidator extends VPMValidator

+{

+

+	public LocalNameValidator(IModelElement e) {super(e);}

+

+	public String isValid(Object value) 

+	{

+		for (IModelElement sibling : iElement.getNamespace().getElementsInNamespace())

+		{

+			if (sibling.getName().equals(value.toString()))

+				return "Warning: name collision with " + sibling.getFullyQualifiedName();

+		}

+		return null; // means valid

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/validators/VPMValidator.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/validators/VPMValidator.java
new file mode 100644
index 0000000..aebc20d
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/properties/validators/VPMValidator.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.properties.validators;

+

+import org.eclipse.jface.viewers.ICellEditorValidator;

+import org.eclipse.viatra2.core.IModelElement;

+

+public abstract class VPMValidator implements ICellEditorValidator {

+

+	protected IModelElement iElement;

+	

+	public VPMValidator(IModelElement e)

+	{

+		iElement = e;

+	}

+	

+	public abstract String isValid(Object value);

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/IDirtyFlagChangedListener.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/IDirtyFlagChangedListener.java
new file mode 100644
index 0000000..85ed9ba
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/IDirtyFlagChangedListener.java
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.providers;

+

+public interface IDirtyFlagChangedListener {

+

+	

+	public void setDirty();

+	

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/IMessageDialogProvider.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/IMessageDialogProvider.java
new file mode 100644
index 0000000..157bab7
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/IMessageDialogProvider.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.providers;

+

+public interface IMessageDialogProvider {

+

+	public void showMessage(String message);

+	

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraContentProvider.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraContentProvider.java
new file mode 100644
index 0000000..1b38f8c
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraContentProvider.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.providers;

+

+import java.util.Collection;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;
+

+public class ViatraContentProvider implements ITreeContentProvider {

+

+	private ViatraTreeviewNotificationHandler iNotificationHandler;

+

+	private ViatraTreeEditor iVTE;

+

+	private ViatraRootProvider iVRP;

+

+	public ViatraContentProvider(TreeViewer tv, ViatraTreeEditor vte) {

+		iVTE = vte;

+		iNotificationHandler = new ViatraTreeviewNotificationHandler(tv, this);

+		iVTE.getFramework().getTopmodel().getNotificationManager().addAllListener(iNotificationHandler);

+	}

+

+	public void setDirty() {

+		iVTE.setDirty();

+	}

+

+	/*

+	 * This function should always receive root entities.

+	 */

+	public Object[] getElements(Object inputElement) {

+		//System.out.println("CP: getElements called for "+inputElement.toString());

+		if (inputElement instanceof IModelElement || inputElement instanceof ViatraRootProvider)

+			return getChildren(inputElement);

+		else

+			return null;

+	}

+

+	public void dispose()

+	{

+		iVTE.getFramework().getTopmodel().getNotificationManager().removeAllListener(iNotificationHandler);

+	}

+

+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {

+		if (newInput instanceof ViatraRootProvider)

+			iVRP = (ViatraRootProvider) newInput;

+		// empty for the moment

+	}

+
+	public class TargetRelationDummy
+	{
+		public IRelation rel;
+		public TargetRelationDummy(IRelation r) {
+			this.rel = r;
+		}
+	}
+

+	public Object[] getChildren(Object parentElement) {

+		// Special case: dummy root element for the content provider to show root

+		if (parentElement instanceof ViatraRootProvider)

+		{

+			IEntity ent = ((ViatraRootProvider) parentElement).getRootEntity();

+			// addNotificationHandler(ent);

+			return new Object[] { ent };

+		}

+

+		// register NH if not registered yet

+		// addNotificationHandler((IModelElement)parentElement);

+		Collection children = ((IModelElement)parentElement).getElementsInNamespace();
+
+		String showTargets = iVTE.getFramework().getProperties().getRuntimeProperty(ViatraEditorPropertyProvider.VIATRA_EDITOR_PROVIDER_ID, ViatraEditorPropertyProvider.PROP_FORMATSTRING_RELATION_TARGET_SHOW);
+		if ("true".equalsIgnoreCase(showTargets))
+		{
+			for (IRelation r : ((IModelElement)parentElement).getRelationsTo() )
+			{
+				children.add(new TargetRelationDummy(r));
+			}
+		}

+		return children.toArray();

+	}

+

+	public Object getParent(Object element) {

+		if (element instanceof IEntity)

+			if (((IEntity) element).getParent() == null)

+				return iVRP;

+			else

+				return ((IEntity)element).getParent();

+		else if (element instanceof IRelation)

+			return ((IRelation)element).getFrom();
+		else if (element instanceof TargetRelationDummy)
+			return ((TargetRelationDummy)element).rel.getTo();

+

+		return null;

+	}

+

+	public boolean hasChildren(Object element) {

+		//System.out.println("CP: hasChildren called for "+element.toString());

+		if (element instanceof ViatraRootProvider)

+			return true;

+

+		if (element instanceof IModelElement && !((IModelElement)element).getElementsInNamespace().isEmpty())

+			return true;
+
+		String showTargets = iVTE.getFramework().getProperties().getRuntimeProperty(ViatraEditorPropertyProvider.VIATRA_EDITOR_PROVIDER_ID, ViatraEditorPropertyProvider.PROP_FORMATSTRING_RELATION_TARGET_SHOW);
+		if ("true".equalsIgnoreCase(showTargets))
+		{
+			if (element instanceof IModelElement && !((IModelElement)element).getRelationsTo().isEmpty())
+				return true;
+		}

+		return false;

+	}

+

+	protected void addNotificationHandler(IModelElement me) {

+

+		if (!(me.getModelSpace()

+				.getNotificationManager()

+				.getNotificationListeners(me).contains(iNotificationHandler))) {

+

+			// System.out.println("NH: registered for "+me.getFullyQualifiedName());

+			me.getModelSpace()

+				.getNotificationManager()

+				.addNotificationListener(me,iNotificationHandler);

+		}

+

+	}

+

+	protected void removeNotificationHandler(IModelElement me) {

+		if ((me.getModelSpace()

+				.getNotificationManager()

+				.getNotificationListeners(me).contains(iNotificationHandler))) {

+

+			// System.out.println("NH: deregistered for "+me.getFullyQualifiedName());

+			me.getModelSpace()

+				.getNotificationManager()

+				.removeNotificationListener(me,iNotificationHandler);

+		}

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraEditorPropertyProvider.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraEditorPropertyProvider.java
new file mode 100644
index 0000000..29a290b
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraEditorPropertyProvider.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.providers;

+

+

+import org.eclipse.viatra2.framework.properties.VIATRAPropertyKind;

+import org.eclipse.viatra2.framework.properties.providers.DefaultPropertyProvider;

+

+

+public class ViatraEditorPropertyProvider extends DefaultPropertyProvider

+{

+	public final static String VIATRA_EDITOR_PROVIDER_ID = "VIATRA2 Tree Editor";

+	public final static String PROP_FORMATSTRING_ENTITY = "Format string for Entities";

+	public final static String PROP_FORMATSTRING_RELATION = "Format string for Relations";
+	public final static String PROP_FORMATSTRING_RELATION_TARGET = "Format string for Relation Targets";
+	public final static String PROP_FORMATSTRING_RELATION_TARGET_SHOW = "Show 'to' relations at targets";
+	

+

+	public ViatraEditorPropertyProvider() {

+		super(VIATRA_EDITOR_PROVIDER_ID);

+	}

+

+	public boolean isActive() {

+		return true;

+	}

+

+	public String getDefaultPropertyValue(String id) {

+		if (id.equals(PROP_FORMATSTRING_ENTITY))

+		{

+			return "%n%[20]{ {$%}}v%{ : $}t%{ [$]}s";

+		}

+		else if (id.equals(PROP_FORMATSTRING_RELATION))

+		{

+			return "%n (-> %target)%{ : $}t%{ [$]}s";

+		}
+		else if (id.equals(PROP_FORMATSTRING_RELATION_TARGET))
+		{
+			return "(%source ->) %n %{ : $}t%{ [$]}s";
+		}
+		else if (id.equals(PROP_FORMATSTRING_RELATION_TARGET_SHOW))
+			return "true";
+		

+		return "default";

+	}

+

+	@Override

+	public void init() {

+		allids.add(PROP_FORMATSTRING_ENTITY);

+		allids.add(PROP_FORMATSTRING_RELATION);
+		allids.add(PROP_FORMATSTRING_RELATION_TARGET);
+		allids.add(PROP_FORMATSTRING_RELATION_TARGET_SHOW);

+	}

+

+	public VIATRAPropertyKind getPropertyKind(String id) {
+		if (id.equals(PROP_FORMATSTRING_RELATION_TARGET_SHOW))
+			return VIATRAPropertyKind.BOOLEAN;

+		return VIATRAPropertyKind.STRING;

+	}

+

+

+}

+

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraLabelProvider.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraLabelProvider.java
new file mode 100644
index 0000000..6f361b6
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraLabelProvider.java
@@ -0,0 +1,429 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.providers;

+

+import java.util.Collection;

+

+import org.eclipse.jface.viewers.IColorProvider;

+import org.eclipse.jface.viewers.LabelProvider;

+import org.eclipse.swt.graphics.Color;

+import org.eclipse.swt.graphics.Image;

+import org.eclipse.swt.widgets.Display;

+import org.eclipse.viatra2.core.EMultiplicityKind;

+import org.eclipse.viatra2.core.IEntity;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.core.IRelation;

+import org.eclipse.viatra2.tags.ITag;

+import org.eclipse.viatra2.tags.TagKind;

+import org.eclipse.viatra2.treeeditor.Plugin;

+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;

+import org.eclipse.viatra2.treeeditor.providers.ViatraContentProvider.TargetRelationDummy;
+

+public class ViatraLabelProvider extends LabelProvider 

+//implements ITableColorProvider, ITableLabelProvider

+implements IColorProvider

+{

+

+	private ViatraTreeEditor iVTE;

+	

+	public ViatraLabelProvider(ViatraTreeEditor vte) {

+		super();

+		iVTE = vte;

+	}

+	

+	private static Image eim = Plugin.getImageDescriptor("icons/entity_transparent.png").createImage();

+

+	private static Image eim_warn = Plugin.getImageDescriptor("icons/entity_transparent_warning.png").createImage();

+

+	private static Image eim_info = Plugin.getImageDescriptor("icons/entity_transparent_info.png").createImage();

+

+	

+	//private static Image mim = Plugin.getImageDescriptor("icons/machine_transparent.png").createImage();

+	

+	private static Image rim = Plugin.getImageDescriptor("icons/relation_transparent.png").createImage();
+	
+	private static Image rim_target = Plugin.getImageDescriptor("icons/relation_target_transparent.png").createImage();

+	

+	private static Image rim_warning = Plugin.getImageDescriptor("icons/relation_transparent_warning.png").createImage();

+	

+	private static Image rim_info = Plugin.getImageDescriptor("icons/relation_transparent_info.png").createImage();

+	

+	

+	

+	public String getText(Object element) {

+		if (element instanceof IModelElement || element instanceof TargetRelationDummy) {

+			// Get model element object
+			
+			IModelElement me; 
+			
+			if (element instanceof TargetRelationDummy)
+			{
+				me = ((TargetRelationDummy)element).rel;
+			}
+			else me = ((IModelElement)element);
+			

+			

+			// Get appropriate format string

+			String formatString = "%n";
+			if (element instanceof TargetRelationDummy)
+			{
+				formatString = iVTE.getFramework().getProperties().getRuntimeProperty(ViatraEditorPropertyProvider.VIATRA_EDITOR_PROVIDER_ID, ViatraEditorPropertyProvider.PROP_FORMATSTRING_RELATION_TARGET);
+			}

+			else if (me instanceof IEntity)

+			{

+				formatString = iVTE.getFramework().getProperties().getRuntimeProperty(ViatraEditorPropertyProvider.VIATRA_EDITOR_PROVIDER_ID, ViatraEditorPropertyProvider.PROP_FORMATSTRING_ENTITY);

+			} 
+			else if (me instanceof IRelation)

+			{

+				formatString = iVTE.getFramework().getProperties().getRuntimeProperty(ViatraEditorPropertyProvider.VIATRA_EDITOR_PROVIDER_ID, ViatraEditorPropertyProvider.PROP_FORMATSTRING_RELATION);

+			} 
+			

+			

+			// Format string overview

+			// Escape character: %

+			// %[12]{ [%$]}value

+			// %% : The '%' character

+			// %# : An empty sequence (used when a letter is display right after a %property)

+			// %[limit]property : The given property of a model element (limit: max. number of displayed characters)

+			// Properties:

+			//   name (n)         simple name of the element

+			//   NAME (N)         fully qualified name of the element

+			//   type (t)         direct types of the element (names only)

+			//   TYPE (T)         direct types of the element (fully qualified names)

+			//   instance (i)     direct instances of the element

+			//   INSTANCE (I)     direct instances of the element (fully qualified names)

+			//   supertype (s)

+			//   SUPERTYPE (S)

+			//   subtype (st)

+			//   SUBTYPE (ST)

+			//   alltypes (at), ...

+			//   value (v)

+			//   source (src), target (trg), SOURCE (SRC), TARGET (TRG)

+			//	 sourcemultiplicity (sm) 1 for ONE_TO_MANY or ONE_TO_ONE; * for MANY_TO_MANY or MANY_TO_ONE

+			//	 targetmultiplicity (tm) 1 for ONE_TO_ONE or MANY_TO_ONE; * for ONE_TO_MANY or MANY_TO_MANY

+			//   isaggregation (ag) '@' when isAgregation is true 

+			

+			// Generate displayed string

+			StringBuilder sb = new StringBuilder();

+			for (int i = 0; i < formatString.length(); i++)

+			{

+				char c = formatString.charAt(i);

+				if (c == '%' && (i + 1) < formatString.length())

+				{

+					// Get next character

+					char c2 = formatString.charAt(++i);

+					

+					// Check if there is a display limit

+					int displayLimit = -1;

+					if (c2 == '[')

+					{

+						// Get display limit

+						++i;

+						String sLimit = "";

+						while (i < formatString.length() && Character.isDigit(formatString.charAt(i)))

+							sLimit = sLimit + formatString.charAt(i++);

+						if (sLimit.length() < 9)

+							displayLimit = Integer.parseInt(sLimit);

+						// Skip limit trailing ']' character

+						if (i < formatString.length() && formatString.charAt(i) == ']') i++;

+						if (i < formatString.length())

+							c2 = formatString.charAt(i);

+					}

+					

+					// Check internal format string (may not contain additional format stuff)

+					String internalFormat = "";

+					int propPosition = -1;

+					if (c2 == '{')

+					{

+						++i;

+						while (i < formatString.length() && formatString.charAt(i) != '}')

+						{

+							if (formatString.charAt(i) == '%')

+							{

+								++i;

+								char c3 = (i < formatString.length()) ? formatString.charAt(i++) : '.';

+								if (c3 == '%' || c3 == '$' || c3 == '}')

+									internalFormat = internalFormat + c3;

+								else

+								{

+									internalFormat = internalFormat + '%';

+									i--;

+								}

+							}

+							else if (formatString.charAt(i) == '$')

+							{

+								i++;

+								propPosition = internalFormat.length();

+							}

+							else

+							{

+								internalFormat = internalFormat + formatString.charAt(i++);

+							}

+						}

+						i++;

+						if (i < formatString.length())

+							c2 = formatString.charAt(i);

+					}

+					

+					// Check escape code

+					if (c2 == '#');

+					else if (c2 == '%') sb.append('%');

+					else

+					{

+						// Read property string

+						String prop = "";

+						while (i < formatString.length() && Character.isLetter(formatString.charAt(i)))

+							prop = prop + formatString.charAt(i++);

+						--i;

+						

+						// Use fully qualified names, if property is all uppercase

+						boolean isFQN = prop.equals(prop.toUpperCase());

+						prop = prop.toLowerCase();

+						

+						// Decide which property is required

+						String propValue = "";

+						if ("name".equals(prop) || "n".equals(prop))

+						{

+							propValue = (isFQN ? me.getFullyQualifiedName() : me.getName());

+						}

+						else if ("value".equals(prop) || "v".equals(prop))

+						{

+							propValue = ((me instanceof IEntity) ? ((IEntity) me).getValue() : "");

+						}

+						else if ("source".equals(prop) || "src".equals(prop))

+						{

+							if (me instanceof IRelation)

+								propValue = (isFQN ? ((IRelation) me).getFrom().getFullyQualifiedName() : ((IRelation) me).getFrom().getName());

+						}

+						else if ("target".equals(prop) || "trg".equals(prop))

+						{

+							if (me instanceof IRelation)

+								propValue = (isFQN ? ((IRelation) me).getTo().getFullyQualifiedName() : ((IRelation) me).getTo().getName());

+						}

+						else if ("type".equals(prop) || "t".equals(prop))

+						{

+							propValue = elementCollectionToString(me.getTypes(), isFQN);

+						}

+						else if ("instance".equals(prop) || "i".equals(prop))

+						{

+							propValue = elementCollectionToString(me.getInstances(), isFQN);

+						}

+						else if ("supertype".equals(prop) || "s".equals(prop))

+						{

+							propValue = elementCollectionToString(me.getSupertypes(), isFQN);

+						}

+						else if ("subtype".equals(prop) || "st".equals(prop))

+						{

+							propValue = elementCollectionToString(me.getSubtypes(), isFQN);

+						}

+						else if ("alltype".equals(prop) || "at".equals(prop))

+						{

+							propValue = elementCollectionToString(me.getAllTypes(), isFQN);

+						}

+						else if ("allinstance".equals(prop) || "ai".equals(prop))

+						{

+							propValue = elementCollectionToString(me.getAllInstances(), isFQN);

+						}

+						else if ("allsupertype".equals(prop) || "as".equals(prop))

+						{

+							propValue = elementCollectionToString(me.getAllSupertypes(), isFQN);

+						}

+						else if ("allsubtype".equals(prop) || "ast".equals(prop))

+						{

+							propValue = elementCollectionToString(me.getAllSubtypes(), isFQN);

+						}

+						else if ("targetvalue".equals(prop) || "tv".equals(prop))

+						{

+							if (me instanceof IRelation && ((IRelation) me).getTo() instanceof IEntity)

+								propValue = ((IEntity) ((IRelation) me).getTo()).getValue();

+						}

+						else if ("targettype".equals(prop) || "tt".equals(prop))

+						{

+							if (me instanceof IRelation)

+								propValue = elementCollectionToString(((IRelation) me).getTo().getTypes(), isFQN);

+						}

+						else if ("targetsupertype".equals(prop) || "ts".equals(prop))

+						{

+							if (me instanceof IRelation)

+								propValue = elementCollectionToString(((IRelation) me).getTo().getSupertypes(), isFQN);

+						}

+						else if ("targetalltype".equals(prop) || "tat".equals(prop))

+						{

+							if (me instanceof IRelation)

+								propValue = elementCollectionToString(((IRelation) me).getTo().getAllTypes(), isFQN);

+						}

+						else if ("targetallsupertype".equals(prop) || "tas".equals(prop))

+						{

+							if (me instanceof IRelation)

+								propValue = elementCollectionToString(((IRelation) me).getTo().getAllSupertypes(), isFQN);

+						}

+						else if ("sourcemultiplicity".equals(prop) || "sm".equals(prop))

+						{

+							if (me instanceof IRelation) {

+								EMultiplicityKind mult = ((IRelation) me).getMultiplicity();

+								propValue = 

+									(mult == EMultiplicityKind.MANY_TO_MANY) || (mult == EMultiplicityKind.MANY_TO_ONE)

+									? "*" :	"1";

+							}

+						}

+						else if ("targetmultiplicity".equals(prop) || "tm".equals(prop))

+						{

+							if (me instanceof IRelation) {

+								EMultiplicityKind mult = ((IRelation) me).getMultiplicity();

+								propValue = 

+									(mult == EMultiplicityKind.MANY_TO_MANY) || (mult == EMultiplicityKind.ONE_TO_MANY)

+									? "*" :	"1";

+							}

+						}

+						else if ("isagregation".equals(prop) || "ag".equals(prop)) {

+							if (me instanceof IRelation) {

+								propValue = ((IRelation)me).getIsAggregation() ? "@" : "";

+							}

+						}

+

+						// Add property value to display string

+						if (displayLimit > 0 && propValue.length() > displayLimit)

+							propValue = propValue.substring(0, displayLimit - 3) + "...";

+						

+						// Format, if required

+						if (internalFormat.length() > 0 && propPosition >= 0 && propValue.length() > 0)

+							propValue = ((propPosition > 0) ? internalFormat.substring(0, propPosition) : "") +

+								propValue +

+								((propPosition < internalFormat.length()) ? internalFormat.substring(propPosition) : "");

+						sb.append(propValue);

+					}

+				} else

+				{

+					sb.append(c);

+				}

+			}

+			

+			return sb.toString();

+/*			

+			// Added by dave for relation endpoint display

+			String rep = "";

+			if (me.isRelation())

+				rep = " (-> " + ((IRelation) me).getTo().getName() + ")";

+			// End of added code

+			// added by Istvan Rath for entity value display

+			String val = "";

+			if (me.isEntity())

+			{

+				IEntity e = (IEntity)me;

+				if (e.getValue().length()>0)

+				{

+					

+					val = " { " + ((e.getValue().length()>20)?e.getValue().substring(0,17)+"...":e.getValue()) + " } ";

+				}

+			}

+			// end of added code

+			 */

+			// return ((IModelElement)element).getName()+/**/rep+val/**/+(types.length()>0?" : "+types:"")+(supertypes.length()>0?" ["+supertypes+"]":"");

+		}

+		else

+			return "@@unknown element";

+	}

+	

+	public Image getImage(Object element) {

+		//if (element instanceof IModelElement) {

+		//	if (iVTE.getFramework().isRunnable((IModelElement)element))

+		//		return mim;

+		//}
+		if (element instanceof IModelElement)
+		{

+			Collection<ITag> tags = iVTE.getFramework().getTagManager().getTagsForModelElement((IModelElement)element);

+			boolean hasInfo = false;

+			boolean hasWarning = false;

+			if (tags!=null)

+			{

+				for (ITag t : tags)

+				{

+					if (t.getKind().equals(TagKind.MODELING_INFO))

+						hasInfo = true;

+					if (t.getKind().equals(TagKind.MODELING_PROBLEM))

+					{

+						hasWarning = true;

+						break;

+					}

+				}

+			}

+			if (element instanceof IEntity) {

+				if (hasWarning) return eim_warn;

+				if (hasInfo) return eim_info;

+				else return eim;

+			}

+			if (element instanceof IRelation)

+			{

+				if (hasWarning) return rim_warning;

+				if (hasInfo) return rim_info;

+				return rim;

+			}
+		}
+		else if (element instanceof TargetRelationDummy)
+		{
+			return rim_target;
+		}

+		return null;

+		//return super.getImage(element);

+	}

+	

+	/**

+	 * Translates a Viatra2 model element collection to a list of comma separated strings

+	 * (names). If the isFQN flag is true, not only the names, but the fully qualified names

+	 * of the element will be shown.

+	 * 

+	 * @param elements collection of model elements

+	 * @param isFQN true, if we want to display fully qualified names

+	 * @return a comma separated string of element names

+	 */

+	protected String elementCollectionToString(Collection<IModelElement> elements, boolean isFQN)

+	{

+		StringBuilder sb = new StringBuilder();

+		boolean needComma = false;

+		for (IModelElement elem : elements)

+		{

+			if (needComma)

+				sb.append(", ");

+			else

+				needComma = true;

+			if (isFQN)

+				sb.append(elem.getFullyQualifiedName());

+			else

+				sb.append(elem.getName());

+		}

+		return sb.toString();

+	}

+

+	public Color getBackground(Object element) {
+		if (element instanceof IModelElement)
+		{

+			Collection<ITag> tags = iVTE.getFramework().getTagManager().getTagsForModelElement((IModelElement)element);

+			if (tags!=null && tags.size()>0)

+			{

+				return Display.getDefault().getSystemColor(tags.iterator().next().getBackgroundColor());

+			}
+		}

+		return null;

+	}

+

+	public Color getForeground(Object element) {
+		if (element instanceof IModelElement)
+		{

+			Collection<ITag> tags = iVTE.getFramework().getTagManager().getTagsForModelElement((IModelElement)element);

+			if (tags!=null && tags.size()>0)

+			{

+				return Display.getDefault().getSystemColor(tags.iterator().next().getForegroundColor());

+			}
+		}

+		return null;

+	}

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraRootProvider.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraRootProvider.java
new file mode 100644
index 0000000..d08e22e
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraRootProvider.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.providers;

+

+import org.eclipse.viatra2.core.IEntity;

+

+public class ViatraRootProvider

+{

+	private IEntity rootEntity;

+	

+	public ViatraRootProvider(IEntity re)

+	{

+		rootEntity = re;

+	}

+	

+	public IEntity getRootEntity()

+	{

+		return rootEntity;

+	}

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraTreeEventListener.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraTreeEventListener.java
new file mode 100644
index 0000000..66dddb2
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraTreeEventListener.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.providers;

+

+

+import org.eclipse.swt.SWT;

+import org.eclipse.swt.custom.TreeEditor;

+import org.eclipse.swt.events.FocusEvent;

+import org.eclipse.swt.events.FocusListener;

+import org.eclipse.swt.events.KeyEvent;

+import org.eclipse.swt.events.KeyListener;

+import org.eclipse.swt.events.ModifyEvent;

+import org.eclipse.swt.events.ModifyListener;

+import org.eclipse.swt.widgets.Control;

+import org.eclipse.swt.widgets.Text;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;

+import org.eclipse.viatra2.treeeditor.commands.ChangeElementNameCommand;

+import org.eclipse.viatra2.treeeditor.commands.ChangePropertyCommand;
+import org.eclipse.viatra2.treeeditor.properties.VPMProperties;
+

+public class ViatraTreeEventListener implements ModifyListener, FocusListener,

+		KeyListener {

+

+	/**

+	 * Reference to the cell editor for the Tree widget.

+	 */

+	protected TreeEditor iEditor;

+	

+	protected IModelElement iME;

+	

+	protected ViatraTreeEditor iVTE;

+	

+	public ViatraTreeEventListener(IModelElement me, TreeEditor te, ViatraTreeEditor vte) {

+		iEditor = te;

+		iME = me;

+		iVTE = vte;

+	}

+	

+	

+	public void modifyText(ModifyEvent e) {

+		// don't care

+

+	}

+

+	public void focusGained(FocusEvent e) {

+		// don't care

+	}

+

+	public void focusLost(FocusEvent e) {

+		cancelEditing();

+	}

+

+	public void keyPressed(KeyEvent e) {

+		if (e.keyCode == SWT.ESC)

+			cancelEditing();

+		else if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR)

+			submitEditing();

+	}

+

+	public void keyReleased(KeyEvent e) {

+		// don't care

+	}

+

+	/**

+	 * Cancels the editing of the tree item.

+	 */

+	public void cancelEditing() {

+		Control ctrl = iEditor.getEditor();

+		if (ctrl != null && !ctrl.isDisposed()) {

+			ctrl.removeFocusListener(this);

+			ctrl.removeKeyListener(this);

+			((Text) ctrl).removeModifyListener(this);

+			ctrl.dispose();

+		}

+		iEditor.dispose();

+	}

+	

+	/**

+	 * Submits the editing of the tree item.

+	 */

+	public void submitEditing() {
+		String text = ((Text)iEditor.getEditor()).getText();
+		String name = "";
+		String value = "";
+		int braceStart = text.indexOf('{');
+		int braceEnd = text.indexOf('}');
+		if (braceStart>-1 && braceEnd>braceStart) {
+			value = text.substring(braceStart+1, braceEnd);
+			name = text.replaceAll(value, "");
+			name = name.replaceAll("\\{\\}", "").trim();
+		}
+		else {
+			name = text;
+		}

+		ChangeElementNameCommand cmd = new ChangeElementNameCommand();

+		cmd.setTargetElem(iME);

+		cmd.setNewElemName(name);

+		iVTE.getCommandStack().execute(cmd);
+		if (value.length()>0) {
+			ChangePropertyCommand c1 = new ChangePropertyCommand();
+			c1.setKind(VPMProperties.VALUE);
+			c1.setNewValue(value);
+			c1.setTarget(iME);
+			iVTE.getCommandStack().execute(c1);
+		}

+		cancelEditing();

+	}

+	

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraTreeMouseListener.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraTreeMouseListener.java
new file mode 100644
index 0000000..e180d1f
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraTreeMouseListener.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.providers;

+

+

+import org.eclipse.swt.SWT;

+import org.eclipse.swt.custom.TreeEditor;

+import org.eclipse.swt.events.MouseEvent;

+import org.eclipse.swt.events.MouseListener;

+import org.eclipse.swt.graphics.Point;

+import org.eclipse.swt.widgets.Text;

+import org.eclipse.swt.widgets.Tree;

+import org.eclipse.swt.widgets.TreeItem;

+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;

+

+public class ViatraTreeMouseListener implements MouseListener {

+

+	protected Tree iTreeControl;

+	protected ViatraTreeEditor iVTE;

+	

+	public ViatraTreeMouseListener(ViatraTreeEditor vte, Tree tc) {

+		iTreeControl = tc;

+		iVTE = vte;

+	}

+	

+	

+	public void mouseDoubleClick(MouseEvent e) {

+		if (iTreeControl != null) {

+			TreeItem item = iTreeControl.getItem(new Point(e.x, e.y));

+			if (item==null)	return;

+			IModelElement me = (IModelElement) item.getData();
+			if (me.getFullyQualifiedName().length()<1) return; // ensure root cannot be renamed
+			

+			TreeEditor editor = new TreeEditor(iTreeControl);

+			editor.horizontalAlignment = SWT.LEFT;

+			editor.grabHorizontal = true;

+			editor.minimumWidth = 64;

+			

+			ViatraTreeEventListener list = new ViatraTreeEventListener(me, editor, iVTE);

+			Text celleditor = new Text(iTreeControl, SWT.NONE);

+			
+			String value = "";
+			if (me instanceof IEntity && ((IEntity)me).getValue().length()>0) {
+				value = " {"+((IEntity)me).getValue()+"}";
+			}

+			celleditor.setText(me.getName()+value);

+			celleditor.addFocusListener(list);

+			celleditor.addKeyListener(list);

+			celleditor.addModifyListener(list);

+			celleditor.selectAll();

+			celleditor.setFocus();

+			editor.setEditor(celleditor,item);

+		}

+	}

+

+

+	public void mouseDown(MouseEvent e) {

+				

+	}

+

+	public void mouseUp(MouseEvent e) {

+				

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraTreeviewNotificationHandler.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraTreeviewNotificationHandler.java
new file mode 100644
index 0000000..37b3f54
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraTreeviewNotificationHandler.java
@@ -0,0 +1,242 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.providers;

+

+

+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.viatra2.core.ICoreNotificationListener;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateEntity;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateInstanceOf;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateRelation;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateSupertypeOf;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteEntity;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteInstanceOf;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteRelation;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteSupertypeOf;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectMoveTo;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetName;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetRelationFrom;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetRelationTo;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetValue;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetViewInfo;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectTransactionBegin;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectUndoableTransactionBegin;
+

+public class ViatraTreeviewNotificationHandler implements ICoreNotificationListener {

+

+	private TreeViewer iTreeViewer;

+	private ViatraContentProvider iContentProvider;

+	/**

+	 * True, if refreshes should be stopped due to a (long) transaction.

+	 */

+	private boolean inTransaction = false;

+	

+	private boolean signalDirty = false;

+	

+	public ViatraTreeviewNotificationHandler(TreeViewer tv, ViatraContentProvider cp) {

+		iTreeViewer = tv;

+		iContentProvider = cp;

+	}

+

+	private void refreshTreeViewer()

+	{

+		Display.getDefault().asyncExec(new Runnable(){

+			public void run() {

+				iTreeViewer.refresh();

+			}

+			

+		});

+	}

+	

+	

+	public void actionPerformed(final ICoreNotificationObject notification) {

+		//System.out.println("Core notification: "+notification.getActionType()+", inTransaction: "+inTransaction);

+		
+		switch(notification.getActionTypeEnum()){
+		case TA_TRANSACTION_BEGIN:
+			// case TA_SUBTRANSACTION_BEGIN:
+			Object info = ((NotificationObjectTransactionBegin) notification)
+					.getInfo();
+			if (info instanceof Boolean && ((Boolean) info).booleanValue()) {
+				inTransaction = true;
+			}
+			return;
+		case TA_UNDOABLE_TRANSACTION_BEGIN:
+			info = ((NotificationObjectUndoableTransactionBegin) notification)
+					.getInfo();
+			if (info instanceof Boolean && ((Boolean) info).booleanValue()) {
+				inTransaction = true;
+			}
+			return;
+		case TA_UNDO_BEGIN:
+			// Object info =
+			// ((NotificationObjectUndoableTransactionBegin)notification).getInfo();
+			// if (info instanceof Boolean && ((Boolean)info).booleanValue())
+			// {
+			inTransaction = true;
+			// }
+			return;
+		case TA_TRANSACTION_END:
+			// case TA_SUBTRANSACTION_END:
+			inTransaction = false;
+			// iTreeViewer.refresh();
+			refreshTreeViewer();
+			// iContentProvider.setDirty(); // notify editor that the model has
+			// changed
+			if (signalDirty) {
+				iContentProvider.setDirty(); // notify editor that the model has
+												// changed
+				signalDirty = false;
+			}
+			return;
+		case TA_UNDO_END:
+			inTransaction = false;
+			// iTreeViewer.refresh();
+			refreshTreeViewer();
+			if (signalDirty) {
+				iContentProvider.setDirty(); // notify editor that the model has
+												// changed
+				signalDirty = false;
+			}
+			return;
+		}

+		

+		//if (inTransaction)

+		//	return;

+		

+		/*

+		 * In every other case (other than transaction_begin/end), dignalDirty should be set to true.

+		 */

+		if (inTransaction)

+		{

+			signalDirty = true;

+			return;

+		}

+		 

+		Display.getDefault().syncExec(new Runnable(){

+			public void run() {

+				handleNotification(notification);

+				

+			}

+		});

+		

+

+	}

+

+	

+	private void handleNotification(ICoreNotificationObject notification)

+	{
+		switch(notification.getActionTypeEnum()){
+		case ACTION_SET_NAME:
+			ICoreNotificationObjectSetName n = (ICoreNotificationObjectSetName)notification;
+			iTreeViewer.update(n.getElement(), null);
+			
+			// instances display refresh
+			for (IModelElement inst_elem : n.getElement().getInstances())
+			{
+				iTreeViewer.update(inst_elem, null);
+			}
+			
+			// subtypes display refresh
+			for (IModelElement st_elem : n.getElement().getSubtypes())
+			{
+				iTreeViewer.update(st_elem, null);
+			}
+			
+			// target relations display refresh
+			for (IRelation trg_rel : n.getElement().getRelationsTo())
+			{
+				iTreeViewer.update(trg_rel, null);
+			}
+			
+			//iContentProvider.setDirty();
+			break;
+		case ACTION_SET_VALUE:
+			ICoreNotificationObjectSetValue n1 = (ICoreNotificationObjectSetValue)notification;
+			iTreeViewer.update(n1.getEntity(), new String[]{"name"});
+			break;
+		case ACTION_CREATE_INSTANCEOF:
+			ICoreNotificationObjectCreateInstanceOf n2 = (ICoreNotificationObjectCreateInstanceOf)notification;
+			iTreeViewer.update(n2.getInstance(), new String[]{"name"});
+			break;
+		case ACTION_DELETE_INSTANCEOF:
+			ICoreNotificationObjectDeleteInstanceOf n3 = (ICoreNotificationObjectDeleteInstanceOf)notification;
+			iTreeViewer.update(n3.getInstance(), new String[]{"name"});
+			break;
+		case ACTION_CREATE_SUPERTYPEOF:
+			ICoreNotificationObjectCreateSupertypeOf n4 = (ICoreNotificationObjectCreateSupertypeOf)notification;
+			iTreeViewer.update(n4.getSub(), new String[]{"name"});
+			break;
+		case ACTION_DELETE_SUPERTYPEOF:
+			ICoreNotificationObjectDeleteSupertypeOf n5 = (ICoreNotificationObjectDeleteSupertypeOf)notification;
+			iTreeViewer.update(n5.getSub(), new String[]{"name"});
+			break;
+		case ACTION_SET_VIEW_INFO:
+			ICoreNotificationObjectSetViewInfo n6 = (ICoreNotificationObjectSetViewInfo)notification;
+			iTreeViewer.update(n6.getElement(), new String[]{"name"});
+			break;
+		case ACTION_CREATE_ENTITY:
+			ICoreNotificationObjectCreateEntity n7 = (ICoreNotificationObjectCreateEntity)notification;
+			iTreeViewer.add(n7.getContainer(),n7.getCreated());
+			//iContentProvider.addNotificationHandler(n.getCreated());
+			break;
+		case ACTION_CREATE_RELATION:
+			ICoreNotificationObjectCreateRelation n8 = (ICoreNotificationObjectCreateRelation)notification;
+			iTreeViewer.add(n8.getFrom(),n8.getNewRelation());
+			//iContentProvider.addNotificationHandler(n.getNewRelation());
+			break;
+		case ACTION_MOVE_ELEMENT_TO:
+			ICoreNotificationObjectMoveTo n9 = (ICoreNotificationObjectMoveTo)notification;
+			iTreeViewer.remove(n9.getElement());
+			iTreeViewer.add(n9.getNewContainer(),n9.getElement());
+			break;
+		case ACTION_DELETE_ENTITY:
+			ICoreNotificationObjectDeleteEntity n10 = (ICoreNotificationObjectDeleteEntity)notification;
+			iTreeViewer.remove(n10.getDeleted());
+			//iContentProvider.removeNotificationHandler(n.getDeleted());
+			break;
+		case ACTION_DELETE_RELATION:
+			ICoreNotificationObjectDeleteRelation n11 = (ICoreNotificationObjectDeleteRelation)notification;
+			iTreeViewer.remove(n11.getDeleted());
+			//iContentProvider.removeNotificationHandler(n.getDeleted());
+			break;
+		case ACTION_DELETE_CONTAINMENT:
+			// ICoreNotificationObjectDeleteContainment n = (ICoreNotificationObjectDeleteContainment)notification;
+			// FIXME what to do for DELETE_CONTAINMENT?
+			// save: Do nothing.
+			
+			break;
+		case ACTION_SET_RELATION_FROM:
+			ICoreNotificationObjectSetRelationFrom n12 = (ICoreNotificationObjectSetRelationFrom)notification;
+			iTreeViewer.remove(n12.getRelation());
+			iTreeViewer.add(n12.getNewFrom(),n12.getRelation());
+			break;
+		// ADDED BY XMI:
+		case ACTION_SET_RELATION_TO:
+			ICoreNotificationObjectSetRelationTo n13 = (ICoreNotificationObjectSetRelationTo)notification;
+			iTreeViewer.update(n13.getRelation(), new String[]{"name"});
+		break;
+		}
+		

+		iContentProvider.setDirty(); // notify editor that the model has changed

+	}

+	

+	public int getListenerCategory() {

+		return 0;

+	}

+	

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraTreeviewSorter.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraTreeviewSorter.java
new file mode 100644
index 0000000..8149ac1
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/providers/ViatraTreeviewSorter.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.providers;

+

+

+import java.text.Collator;

+

+import org.eclipse.jface.viewers.Viewer;

+import org.eclipse.jface.viewers.ViewerSorter;

+import org.eclipse.viatra2.core.IModelElement;

+

+public class ViatraTreeviewSorter extends ViewerSorter {

+

+	public ViatraTreeviewSorter() {

+		super();

+	}

+

+	public ViatraTreeviewSorter(Collator collator) {

+		super(collator);

+	}

+	

+	@Override

+	public int compare(Viewer viewer, Object arg0, Object arg1) {
+		if (arg0 instanceof IModelElement && arg1 instanceof IModelElement)
+		{

+			IModelElement a0 = (IModelElement) arg0;

+			IModelElement a1 = (IModelElement) arg1;

+			if (a0.getClass().equals(a1.getClass()))

+				return (a0.getName().compareTo(a1.getName()));

+			else if (a0.isEntity() && a1.isRelation())

+				return +1;

+			else

+				return -1;
+		}
+		else if (arg0 instanceof IModelElement) return -1;
+		else if (arg1 instanceof IModelElement) return +1;
+		return 0;

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/resource/FrameworkEditorInput.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/resource/FrameworkEditorInput.java
new file mode 100644
index 0000000..587139a
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/resource/FrameworkEditorInput.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.resource;

+

+

+import org.eclipse.jface.resource.ImageDescriptor;

+import org.eclipse.ui.IEditorInput;

+import org.eclipse.ui.IPersistableElement;

+import org.eclipse.viatra2.framework.IFramework;

+

+public class FrameworkEditorInput implements IEditorInput 

+{

+

+	protected IFramework fw;

+	

+	public FrameworkEditorInput(IFramework f) 

+	{

+		fw = f;

+	}

+		

+	public IFramework getFramework()

+	{

+		return fw;

+	}

+	

+	

+	public boolean exists() 

+	{

+		return true;

+	}

+

+	public ImageDescriptor getImageDescriptor() { return null; }

+

+	public String getName() {

+		return fw.getId();

+	}

+

+	public IPersistableElement getPersistable() 

+	{

+		// TODO create persistable element for a framework

+		return null;

+	}

+

+	public String getToolTipText() 

+	{

+		return fw.getCurrentFilename();

+	}

+

+	public Object getAdapter(Class adapter) 

+	{

+		return null;

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/transfer/ViatraEditorDragSourceListener.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/transfer/ViatraEditorDragSourceListener.java
new file mode 100644
index 0000000..714df50
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/transfer/ViatraEditorDragSourceListener.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.transfer;

+

+

+import java.util.Iterator;

+

+

+import org.eclipse.jface.viewers.IStructuredSelection;

+import org.eclipse.swt.dnd.DragSourceAdapter;

+import org.eclipse.swt.dnd.DragSourceEvent;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;

+

+

+

+public class ViatraEditorDragSourceListener extends DragSourceAdapter {

+

+	protected ViatraTreeEditor iVTE;

+	

+	

+	public ViatraEditorDragSourceListener(ViatraTreeEditor vte) {

+		super();

+		iVTE = vte;

+	}

+	

+	@Override

+	public void dragSetData(DragSourceEvent event) {

+		// System.out.println("Drag set data for type: "+event.dataType.toString());

+		IStructuredSelection sel = (IStructuredSelection)iVTE.getSite().getSelectionProvider().getSelection();

+		if (!sel.isEmpty()) {

+			Iterator it = sel.iterator();

+			ViatraTransferData[] fqns = new ViatraTransferData[sel.size()];

+			int i = 0;

+			while (it.hasNext()) {

+				fqns[i] = new ViatraTransferData();

+				fqns[i].fullyQualifiedName = ((IModelElement)it.next()).getFullyQualifiedName();

+				i++;

+			}

+			event.data = fqns;	

+		}

+		

+	}

+	

+	

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/transfer/ViatraEditorDropTargetAdapter.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/transfer/ViatraEditorDropTargetAdapter.java
new file mode 100644
index 0000000..cde8b55
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/transfer/ViatraEditorDropTargetAdapter.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.transfer;

+

+

+

+import org.eclipse.swt.dnd.DND;

+import org.eclipse.swt.dnd.DropTargetAdapter;

+import org.eclipse.swt.dnd.DropTargetEvent;

+import org.eclipse.swt.dnd.Transfer;

+import org.eclipse.viatra2.core.IEntity;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.core.IRelation;

+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;

+import org.eclipse.viatra2.treeeditor.commands.AddSupertypeCommand;

+import org.eclipse.viatra2.treeeditor.commands.AddTypeCommand;

+import org.eclipse.viatra2.treeeditor.commands.MoveModelElementCommand;

+import org.eclipse.viatra2.treeeditor.commands.RetargetRelationCommand;

+import org.eclipse.viatra2.treeeditor.commands.ViatraCompoundCommand;

+

+public class ViatraEditorDropTargetAdapter extends DropTargetAdapter {

+

+	

+	protected ViatraTreeEditor iVTE;

+	

+	public ViatraEditorDropTargetAdapter(ViatraTreeEditor vte) {

+		super();

+		iVTE = vte;

+	}

+	

+	

+	public static Transfer[] getTransfers() {

+		Transfer[] r = new Transfer[1];

+		r[0] = ViatraTransfer.getInstance();

+		return r;

+	}

+	

+	

+	

+	@Override

+	public void drop(DropTargetEvent event) {

+		//System.out.println("Dropped "+(event!=null&&event.data!=null?event.data.toString()+" onto "+event.getSource().toString():"something"));

+		if (event!=null && event.data!=null && event.item!=null && event.data instanceof ViatraTransferData[]) {

+			// System.out.println("Code: " + event.detail);

+			ViatraTransferData[] data = (ViatraTransferData[])event.data;

+			// added by XMI: 

+			// precheck, must make sure the target is not one of the items.

+			// this has disastrous consequences on the entire modelspace if it could sneak by

+			for (int i=0; i<data.length; i++) {

+				IModelElement target = (IModelElement)event.item.getData();

+				String fqn = data[i].fullyQualifiedName;

+				IModelElement item = target.getModelSpace().getModelManager().getElementByName(fqn);

+				if (target.equals(item))

+					return;

+			}

+			ViatraCompoundCommand ccmd = new ViatraCompoundCommand();

+			for (int i=0; i<data.length; i++) {

+				String fqn = data[i].fullyQualifiedName;

+				IModelElement target = (IModelElement)event.item.getData();

+				IModelElement item = target.getModelSpace().getModelManager().getElementByName(fqn);

+				if (target.equals(item))

+					return;

+				// Added by dave for supertypeOf and instanceOf DND semantics

+				if (event.detail == DND.DROP_COPY)

+				{

+					// Copy (CTRL) is new instanceOf relation (type is dragged onto instance)

+					AddTypeCommand cmd = new AddTypeCommand();

+					cmd.setTypeElem(item);

+					cmd.setTargetElem(target);

+					ccmd.add(cmd);

+				}

+				else if (event.detail == DND.DROP_LINK)

+				{

+					// Link (CTRL+SHIFT) is new supertypeOf relation (supertype is dragged onto subtype)

+					AddSupertypeCommand cmd = new AddSupertypeCommand();

+					cmd.setSupertypeElem(item);

+					cmd.setTargetElem(target);

+					ccmd.add(cmd);

+				}

+				else

+				{

+					// End of added code

+					if (target instanceof IEntity) {

+						// either reparent or resource

+						MoveModelElementCommand cmd = new MoveModelElementCommand();

+						if (item instanceof IEntity) {

+							// reparent

+							cmd.setEntity((IEntity)item,(IEntity)target);

+						}

+						else if (item instanceof IRelation) {

+							cmd.setRelation((IRelation)item,target);

+						}

+						ccmd.add(cmd);

+					}

+					else if (target instanceof IRelation) {

+						// retarget or retarget relation

+						if (item instanceof IRelation) {

+							// resource item

+							MoveModelElementCommand cmd = new MoveModelElementCommand();

+							cmd.setRelation((IRelation)item,target);

+							ccmd.add(cmd);

+						}

+						else if (item instanceof IEntity) {

+							// retarget target

+							RetargetRelationCommand cmd = new RetargetRelationCommand();

+							cmd.setRelation((IRelation)target,item);

+							ccmd.add(cmd);

+						}

+					}

+				}

+			}

+			if (!ccmd.isEmpty())

+			{

+				iVTE.getCommandStack().execute(ccmd);

+				iVTE.updateActions();

+			}

+		}

+	}

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/transfer/ViatraTransfer.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/transfer/ViatraTransfer.java
new file mode 100644
index 0000000..6e3cb94
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/transfer/ViatraTransfer.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.transfer;

+

+import java.io.ByteArrayInputStream;

+import java.io.ByteArrayOutputStream;

+import java.io.DataInputStream;

+import java.io.DataOutputStream;

+import java.io.IOException;

+

+import org.eclipse.swt.dnd.ByteArrayTransfer;

+import org.eclipse.swt.dnd.TransferData;

+

+public class ViatraTransfer extends ByteArrayTransfer {

+	

+	private static ViatraTransfer iTransfer = new ViatraTransfer();

+	

+	private static final String VIATRATRANSFERTYPENAME = "VIATRA_TRANSFER";

+	private static final int VIATRATRANSFERTYPEID = registerType(VIATRATRANSFERTYPENAME);

+	

+	

+	public static ViatraTransfer getInstance() {

+		return iTransfer;

+	}

+	

+

+	private ViatraTransfer() { }

+

+	@Override

+	protected String[] getTypeNames() {

+		return new String[]{VIATRATRANSFERTYPENAME};

+	}

+

+	@Override

+	protected int[] getTypeIds() {

+		return new int[]{VIATRATRANSFERTYPEID};

+	}

+

+	@Override

+	protected void javaToNative(Object object, TransferData transferData) {

+		// System.out.println("javaToNative: "+object.toString()+", "+transferData.toString());

+		if (object == null || !(object instanceof ViatraTransferData[])) return;

+	 	

+	 	if (isSupportedType(transferData)) {

+	 		ViatraTransferData[] myTypes = (ViatraTransferData[]) object;	

+	 		try {

+	 			// write data to a byte array and then ask super to convert to pMedium

+	 			ByteArrayOutputStream out = new ByteArrayOutputStream();

+	 			DataOutputStream writeOut = new DataOutputStream(out);

+	 			for (int i = 0, length = myTypes.length; i < length;  i++){

+	 				byte[] buffer = myTypes[i].fullyQualifiedName.getBytes();

+	 				writeOut.writeInt(buffer.length);

+	 				writeOut.write(buffer);

+	 			}

+	 			byte[] buffer = out.toByteArray();

+	 			writeOut.close();

+	 

+	 			super.javaToNative(buffer, transferData);

+	 			

+	 		} catch (IOException e) {

+	 		}

+	 	}

+

+	}

+

+	@Override

+	protected Object nativeToJava(TransferData transferData) {

+		// System.out.println("nativeToJava: "+transferData.toString());

+		if (isSupportedType(transferData)) {

+	 		

+	 		byte[] buffer = (byte[])super.nativeToJava(transferData);

+	 		if (buffer == null) return null;

+	 		

+	 		ViatraTransferData[] myData = new ViatraTransferData[0];

+	 		try {

+	 			ByteArrayInputStream in = new ByteArrayInputStream(buffer);

+	 			DataInputStream readIn = new DataInputStream(in);

+	 			while(readIn.available() > 0) {

+	 				ViatraTransferData datum = new ViatraTransferData();

+	 				int size = readIn.readInt();

+	 				byte[] name = new byte[size];

+	 				readIn.read(name);

+	 				datum.fullyQualifiedName = new String(name);

+	 				

+	 				ViatraTransferData[] newMyData = new ViatraTransferData[myData.length + 1];

+	 				System.arraycopy(myData, 0, newMyData, 0, myData.length);

+	 				newMyData[myData.length] = datum;

+	 				myData = newMyData;

+	 			}

+	 			readIn.close();

+	 		} catch (IOException ex) {

+	 			return null;

+	 		}

+	 		return myData;

+	 	}

+	 

+	 	return null;

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/transfer/ViatraTransferData.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/transfer/ViatraTransferData.java
new file mode 100644
index 0000000..74ec223
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/transfer/ViatraTransferData.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.transfer;

+

+public class ViatraTransferData {

+

+	public String fullyQualifiedName;

+	

+	@Override

+	public String toString() {

+		return fullyQualifiedName;

+	}

+	

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/wizard/IWizardCategoryContributor.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/wizard/IWizardCategoryContributor.java
new file mode 100644
index 0000000..c08093a
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/wizard/IWizardCategoryContributor.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.wizard;

+

+/**

+ * Describes a New Modelspace Wizard category contribution.

+ * @author Istv�n R�th

+ */

+public interface IWizardCategoryContributor {

+

+	/**

+	 * The unique category contribution ID.

+	 */

+	public String getID();

+	

+	/**

+	 * The name of this category contribution.

+	 */

+	public String getName();

+	

+	/**

+	 * The Plugin ID of the contributing plugin.

+	 */

+	public String getPluginID();

+	

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/wizard/IWizardModelContributor.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/wizard/IWizardModelContributor.java
new file mode 100644
index 0000000..b89446a
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/wizard/IWizardModelContributor.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.wizard;

+

+import java.util.Collection;

+

+/**

+ * Describes a New Modelspace Wizard model contribution.

+ * @author Istv�n R�th

+ */

+public interface IWizardModelContributor extends Comparable {

+

+	/**

+	 * The unique model contribution ID.

+	 */

+	public String getID();

+	

+	/**

+	 * Contribution IDs required by this model contribution.

+	 */

+	public Collection<String> getRequiredIDs();

+	

+	/**

+	 * Contribution IDs which exclude this model contribution.

+	 */

+	public Collection<String> getForbiddenIDs();

+	

+	/**

+	 * Contribution IDs provided by this model multicontribution.

+	 * @return

+	 */

+	public Collection<String> getContainedIDs();

+	

+	/**

+	 * The category ID to which this model contribution belongs.

+	 */

+	public String getCategoryID();

+	

+	/**

+	 * The name of this model contribution.

+	 */

+	public String getName();

+	

+	/**

+	 * The description of this model contribution.

+	 */

+	public String getDescription();

+	

+	/**

+	 * The filename of the VTML file of this model contribution.

+	 */

+	public String getFileVTML();

+	

+	/**

+	 * The filename of the VPML file of this model contribution.

+	 */

+	public String getFileVPML();

+	

+	/**

+	 * The Plugin ID of the contributing plugin.

+	 */

+	public String getPluginID();

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/wizard/ViatraTreeEditorNewVPMLWizard.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/wizard/ViatraTreeEditorNewVPMLWizard.java
new file mode 100644
index 0000000..b7b5714
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/wizard/ViatraTreeEditorNewVPMLWizard.java
@@ -0,0 +1,704 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.wizard;

+

+

+import java.io.File;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Vector;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTreeViewer;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.ICheckable;
+import org.eclipse.jface.viewers.IElementComparer;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+import org.eclipse.ui.internal.util.BundleUtility;
+import org.eclipse.viatra2.framework.FrameworkManager;
+import org.eclipse.viatra2.framework.FrameworkManagerException;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.treeeditor.Plugin;
+import org.osgi.framework.Bundle;
+

+/**

+ * Summary:

+ *  Simple wizard, which creates a new, empty VPML modelspace file.

+ *

+ * Description:

+ *

+ *

+ * @author David Vago, Istvan Rath

+ */

+public class ViatraTreeEditorNewVPMLWizard extends Wizard implements INewWizard

+{

+    public class ViatraEditorNewVPMLWizardPage extends WizardNewFileCreationPage

+    {

+        public ViatraEditorNewVPMLWizardPage(IStructuredSelection aSelection)

+        {

+            // Call base class constructor (WizardNewFileCreationPage)

+            super("This wizard creates a new VPML modelspace", aSelection);

+

+            // Set dialog (wizard page) parameters

+            //setDescription("To set the initial contents of the created modelspace, use the vpm.properties " +

+            //       "file of the Viatra plug-in.");

+            setFileName("example.vpml");

+        }

+    }

+

+    public class ViatraEditorNewVPMLWizardSelectionPage extends WizardPage

+    {

+    	protected class InternalLabelProvider extends LabelProvider

+    	{

+    		@Override

+    		public String getText(Object element) {

+    			if (element instanceof IWizardCategoryContributor)

+    				return ((IWizardCategoryContributor)element).getName();

+    			else if (element instanceof IWizardModelContributor)

+    				return ((IWizardModelContributor)element).getName();

+    			else

+    				return null;

+    		}

+

+    	}

+

+    	protected class InternalContentProvider implements ITreeContentProvider

+    	{

+

+			public Object[] getChildren(Object parentElement) {

+				// System.out.println("getChildren: "+parentElement);

+				if (parentElement instanceof IWizardCategoryContributor)

+				{

+					String catid = ((IWizardCategoryContributor)parentElement).getID();

+					Vector<IWizardModelContributor> v = new Vector<IWizardModelContributor>();

+					for (IWizardModelContributor mc : Plugin.getDefault().getModelContributions())

+					{

+						if (mc.getCategoryID().equalsIgnoreCase(catid))

+							v.add(mc);

+					}

+					return v.toArray();

+				}

+				return null;

+			}

+

+			public Object getParent(Object element) {

+				if (element instanceof IWizardModelContributor)

+				{

+					for (IWizardCategoryContributor cc : Plugin.getDefault().getCategoryContributions())

+					{

+						if (cc.getID().equalsIgnoreCase(((IWizardModelContributor)element).getCategoryID()))

+							return cc;

+					}

+				}

+				return null;

+			}

+

+			public boolean hasChildren(Object element) {

+				if (element instanceof IWizardCategoryContributor)

+				{

+					String catid = ((IWizardCategoryContributor)element).getID();

+					for (IWizardModelContributor mc : Plugin.getDefault().getModelContributions())

+					{

+						if (mc.getCategoryID().equalsIgnoreCase(catid))

+							return true;

+					}

+				}

+				return false;

+			}

+

+			public Object[] getElements(Object inputElement) {

+				// System.out.println("getElements: "+inputElement);

+				if (inputElement instanceof Plugin)

+					return Plugin.getDefault().getCategoryContributions().toArray();

+				else

+					return null;

+			}

+

+			public void dispose() { }

+

+			public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { }

+

+    	}

+

+    	protected class TableDummy

+    	{

+    		public String key;

+    		public Object value;

+    		public int id;

+    		public TableDummy(int i, String k, Object v)

+    		{

+    			id=i;

+    			key=k;

+    			value=v;

+    		}

+    	}

+

+    	protected class InternalTableContentProvider implements IStructuredContentProvider

+    	{

+			public Object[] getElements(Object inputElement) {

+				if (inputElement instanceof IStructuredSelection)

+				{

+					IStructuredSelection sel = (IStructuredSelection)inputElement;

+					if (sel.getFirstElement() instanceof IWizardModelContributor)

+					{

+						IWizardModelContributor mc = (IWizardModelContributor)sel.getFirstElement();

+						Vector<TableDummy> v = new Vector<TableDummy>();

+						v.add(new TableDummy(0,"ID",mc.getID()));

+						v.add(new TableDummy(1,"Name",mc.getName()));

+						v.add(new TableDummy(2,"Description",mc.getDescription()));

+						v.add(new TableDummy(3,"Contained fragment ids",mc.getContainedIDs()));

+						v.add(new TableDummy(4,"Required fragment ids",mc.getRequiredIDs()));

+						v.add(new TableDummy(5,"Forbidden fragment ids",mc.getForbiddenIDs()));

+						v.add(new TableDummy(6,"VTML File",mc.getFileVTML()));

+						v.add(new TableDummy(7,"VPML File",mc.getFileVPML()));

+						return v.toArray();

+					}

+				}

+				return new Object[] {};

+			}

+

+			public void dispose() {	}

+

+			public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { }

+

+    	}

+

+    	protected class InternalTableLabelProvider implements ITableLabelProvider

+    	{

+

+			public Image getColumnImage(Object element, int columnIndex) {

+				return null;

+			}

+

+			@SuppressWarnings("unchecked")

+			public String getColumnText(Object element, int columnIndex) {

+				if (columnIndex==0)

+				{

+					return ((TableDummy)element).key;

+				}

+				else if (columnIndex==1)

+				{

+					TableDummy td = (TableDummy)element;

+					switch (td.id)

+					{

+					default: return (td.value==null?"":td.value.toString());

+					case 3:

+					case 4:

+					case 5: Collection<String> ss = (Collection<String>)td.value;

+							String r = "";

+							for (String s: ss)

+							{

+								r+=s+"; ";

+							}

+							return r;

+					}

+				}

+				return null;

+			}

+

+			public void addListener(ILabelProviderListener listener) { }

+

+			public void dispose() { }

+

+			public boolean isLabelProperty(Object element, String property) {

+				return false;

+			}

+

+			public void removeListener(ILabelProviderListener listener) { }

+

+    	}

+

+    	public CheckboxTreeViewer treeviewer;

+    	public TableViewer tableviewer;

+

+		protected ViatraEditorNewVPMLWizardSelectionPage(String name) {

+			super(name);

+		}

+

+		public void createControl(Composite parent) {

+	        SashForm sashform = new SashForm(parent, SWT.BORDER|SWT.VERTICAL);

+

+	        treeviewer = new CheckboxTreeViewer(sashform);

+	        treeviewer.setLabelProvider(new InternalLabelProvider());

+	        treeviewer.setContentProvider(new InternalContentProvider());

+	        treeviewer.setInput(Plugin.getDefault());

+

+

+	        tableviewer = new TableViewer(sashform);

+	        TableLayout tlay = new TableLayout();

+	    	tlay.addColumnData(new ColumnWeightData(30,true));

+			tlay.addColumnData(new ColumnWeightData(70,true));

+			tableviewer.getTable().setLayout(tlay);

+

+			TableColumn keyC  =new TableColumn(tableviewer.getTable(),SWT.LEFT);

+			keyC.setText("Key");

+			TableColumn valC  =new TableColumn(tableviewer.getTable(),SWT.LEFT);

+			valC.setText("Value");

+			tableviewer.getTable().setHeaderVisible(true);

+			tableviewer.getTable().setLinesVisible(true);

+			tableviewer.setLabelProvider(new InternalTableLabelProvider());

+			tableviewer.setContentProvider(new InternalTableContentProvider());

+

+			treeviewer.addSelectionChangedListener(

+	        		new ISelectionChangedListener()

+	        		{

+						public void selectionChanged(SelectionChangedEvent event) {

+							try {

+								tableviewer.setInput(event.getSelection());

+							}

+							catch (Exception e) { }

+							// ugly hack to swallow AsserionFailedException if user clicks on

+							// a category contribution in the tree

+						}

+	        		});

+

+			treeviewer.setComparer(

+					new IElementComparer()

+					{

+						public boolean equals(Object a, Object b) {

+							boolean aIsCategory  = a instanceof IWizardCategoryContributor;

+							boolean bIsCategory  = b instanceof IWizardCategoryContributor;

+							boolean aIsModel = a instanceof IWizardModelContributor;

+							boolean bIsModel = b instanceof IWizardModelContributor;

+							if (aIsCategory && bIsCategory)

+							{

+								return ((IWizardCategoryContributor)a).getID()

+									.equalsIgnoreCase(((IWizardCategoryContributor)b).getID());

+							}

+							else if (aIsModel && bIsModel)

+							{

+								return ((IWizardModelContributor)a).getID()

+									.equalsIgnoreCase(((IWizardModelContributor)b).getID());

+							}

+							return false;

+						}

+

+						public int hashCode(Object element) {

+							return element.hashCode();

+						}

+					});

+

+			treeviewer.addCheckStateListener(

+					new ICheckStateListener()

+					{

+						protected void check(Object element, boolean state)

+						{

+							if (treeviewer.getChecked(element) == state)

+								return;

+							treeviewer.setChecked(element,state);

+							ICheckable _dummy = new ICheckable()

+							{

+

+								public void addCheckStateListener(ICheckStateListener listener) { }

+

+								public boolean getChecked(Object element) {

+									return false;

+								}

+

+								public void removeCheckStateListener(ICheckStateListener listener) { }

+

+								public boolean setChecked(Object element, boolean state) {

+									return false;

+								}

+

+							};

+							checkStateChanged(new CheckStateChangedEvent(_dummy,element,state));

+						}

+

+

+						private void _colorize(Object element, TreeItem item, Color c)

+						{

+							if (treeviewer.getComparer().equals(item.getData(),element))

+							{

+								// System.out.println("Colorize: color ["+c+"] set on "+item);

+								item.setForeground(c);

+							}

+							else

+							for (TreeItem child : item.getItems())

+							{

+								_colorize(element,child,c);

+							}

+						}

+

+						protected void colorize(Object element, int color)

+						{

+							Color c = null;

+							switch (color)

+							{

+							default:

+							case 0: c = new Color(Display.getDefault(),0,0,0); break; // black

+							case 1: c = new Color(Display.getDefault(),255,0,0); break; // red

+							case 2: c = new Color(Display.getDefault(),127,127,127); break; // gray

+							}

+							for (TreeItem topitem : treeviewer.getTree().getItems())

+							{

+								_colorize(element,topitem,c);

+							}

+						}

+

+						public void checkStateChanged(CheckStateChangedEvent event) {

+							if (event.getElement() instanceof IWizardCategoryContributor)

+							{

+								IWizardCategoryContributor cc = (IWizardCategoryContributor)event.getElement();

+								if (event.getChecked())

+								{

+									// enable all model contributions belonging to this category

+									for (IWizardModelContributor mc : Plugin.getDefault().getModelContributions())

+									{

+										if (mc.getCategoryID().equalsIgnoreCase(cc.getID()))

+										{

+											colorize(mc,0);

+											check(mc,true);

+										}

+									}

+								}

+								else

+								{

+									// disable all model contributions

+									for (IWizardModelContributor mc : Plugin.getDefault().getModelContributions())

+									{

+										if (mc.getCategoryID().equalsIgnoreCase(cc.getID()))

+										{

+											// colorize(mc,0);

+											check(mc,false);

+										}

+									}

+								}

+							}

+							else if (event.getElement() instanceof IWizardModelContributor)

+							{

+								IWizardModelContributor mc = (IWizardModelContributor)event.getElement();

+								if (event.getChecked())

+								{

+									// model contribution was enabled

+									colorize(mc,0);

+									// 0. if this is the only contribution in its category, check the category

+									for (IWizardCategoryContributor cc : Plugin.getDefault().getCategoryContributions())

+									{

+										if (cc.getID().equalsIgnoreCase(mc.getCategoryID()))

+										{

+											int i = 0;

+											for (IWizardModelContributor _mc : Plugin.getDefault().getModelContributions())

+											{

+												if (_mc.getCategoryID().equalsIgnoreCase(mc.getCategoryID()))

+													i++;

+												if (i>1)

+													break; // this category has more than one model contribution entry

+											}

+											if (i==1)

+											{

+												check(cc,true);

+												break;

+											}

+										}

+									}

+									// 1. enable all required ids

+									for (String rid : mc.getRequiredIDs())

+									{

+										for (IWizardModelContributor rmc : Plugin.getDefault().getModelContributions())

+										{

+											if (rmc.getID().equalsIgnoreCase(rid))

+											{

+												colorize(rmc,0);

+												check(rmc,true);

+											}

+										}

+									}

+									// 2. disable all forbidden ids

+									for (String fid : mc.getForbiddenIDs())

+									{

+										for (IWizardModelContributor rmc : Plugin.getDefault().getModelContributions())

+										{

+											if (rmc.getID().equalsIgnoreCase(fid))

+											{

+												colorize(rmc,1); // red

+												check(rmc,false);

+											}

+										}

+									}

+								}

+								else

+								{

+									// model contribution was unchecked

+									// 0. if this is the only contribution in its category, uncheck the category

+									for (IWizardCategoryContributor cc : Plugin.getDefault().getCategoryContributions())

+									{

+										if (cc.getID().equalsIgnoreCase(mc.getCategoryID()))

+										{

+											int i = 0;

+											for (IWizardModelContributor _mc : Plugin.getDefault().getModelContributions())

+											{

+												if (_mc.getCategoryID().equalsIgnoreCase(mc.getCategoryID()))

+													i++;

+												if (i>1)

+													break; // this category has more than one model contribution entry

+											}

+											if (i==1)

+											{

+												check(cc,false);

+												break;

+											}

+										}

+									}

+									// 1. ungray any forbidden ids

+									for (String fid : mc.getForbiddenIDs())

+									{

+										for (IWizardModelContributor rmc : Plugin.getDefault().getModelContributions())

+										{

+											if (rmc.getID().equalsIgnoreCase(fid))

+											{

+												colorize(rmc,0);

+											}

+										}

+									}

+									// 2. uncheck and gray ids that require us

+									for (IWizardModelContributor _mc : Plugin.getDefault().getModelContributions())

+									{

+										if (_mc.getRequiredIDs().contains(mc.getID()))

+										{

+											colorize(_mc,2);

+											check(_mc,false);

+										}

+									}

+								}

+

+							}

+						}

+					});

+

+	        setDescription("Select the appropriate modelspace fragments for your new modelspace");

+	        sashform.setWeights(new int[]{2,1});

+	        setControl(sashform);

+		}

+

+

+    }

+

+

+    @SuppressWarnings("unchecked")

+	public boolean performFinish()

+    {

+        // Check main page completion

+        if (!iMainPage.isPageComplete())

+            return false;

+

+        // Check selection page completion

+        if (!iSelectionPage.isPageComplete())

+        	return false;

+

+        // Create new file

+        String basefn = iMainPage.getFileName();

+        if (!basefn.endsWith(".vpml"))

+            iMainPage.setFileName(basefn + ".vpml");

+        IFile newFile = iMainPage.createNewFile();

+        if (newFile == null)

+            return true;

+
+
+

+        // Create absolute file name using workspace root directory

+		//String ws_root = ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString();

+        //String filename = ws_root + newFile.getFullPath().toOSString();
+        //An IFile knows its current location, no need to circumvent this mechanism.
+        String filename = newFile.getLocation().toOSString();

+

+        // Create VPML file with Viatra

+		FrameworkManager fwm =  FrameworkManager.getInstance();

+		IFramework iViatra = null;

+

+		try {

+			iViatra = fwm.createFramework();

+			// import stuff into the modelspace

+			Vector<IWizardModelContributor> v = new Vector<IWizardModelContributor>();

+			for (Object o : iSelectionPage.treeviewer.getCheckedElements())

+			{

+				if (o instanceof IWizardModelContributor)

+				{

+					// System.out.println("Added "+((IWizardModelContributor)o).getID());

+					v.add((IWizardModelContributor)o);

+				}

+			}

+			Collections.sort(v);

+			// sorts according to dependency precedence, see WizardModelContributor.compateTo()

+			for (IWizardModelContributor mc : v)

+			{

+				String pluginid = mc.getPluginID();

+				//InputStream stream = null;

+				File f = null;

+				if (mc.getFileVPML()!=null)

+				{

+					f = getFragmentFile_fixed_3(pluginid,mc.getFileVPML());

+					iViatra.mergeFile(f.getAbsolutePath());

+				}

+				else if (mc.getFileVTML()!=null)

+				{

+					f = getFragmentFile_fixed_3(pluginid,mc.getFileVTML());

+					iViatra.nativeImport(f.getAbsolutePath(), iViatra.getNativeImportersForExtension("vtml").iterator().next());

+				}

+			}

+			iViatra.saveFile(filename);

+			//fwm.disposeFramework(iViatra.getId());

+		} catch (Exception e) {

+			e.printStackTrace();

+			iViatra.getLogger().message(0, "Error merging modelspace: " + e.getClass().getCanonicalName(), e );

+			return false;

+		}

+		finally

+		{

+			try

+			{

+				fwm.disposeFramework(iViatra.getId());

+				//ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+				// this is insane
+				newFile.getParent().refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());

+			}

+			catch (FrameworkManagerException e) {

+				iViatra.getLogger().fatal(e.getClass().getCanonicalName());

+			} catch (CoreException e) {

+				iViatra.getLogger().fatal(e.getClass().getCanonicalName());

+			}

+		}

+

+        return true;

+    }

+

+    /*

+    private URL _getFragmentFile(String pluginId, String imageFilePath)

+    {

+    	 if (pluginId == null || imageFilePath == null) {

+             throw new IllegalArgumentException();

+         }

+

+         // if the bundle is not ready then there is no image

+         Bundle bundle = Platform.getBundle(pluginId);

+         if (!BundleUtility.isReady(bundle))

+             return null;

+

+         // look for the image (this will check both the plugin and fragment folders

+         URL fullPathString = BundleUtility.find(bundle, imageFilePath);

+         if (fullPathString == null) {

+             try {

+                 fullPathString = new URL(imageFilePath);

+             } catch (MalformedURLException e) {

+                 return null;

+             }

+         }

+         return fullPathString;

+    }

+    */

+

+

+
+	private File getFragmentFile_fixed_3(String bundleId, String path)

+    {

+    	// ugly hack: switch /->\ on windoze

+     	if ("\\".equals(System.getProperty("file.separator")))

+    	{

+    		// switch / to \ on windoze

+       		path = path.replace('/', '\\');

+    	}

+     	else if ("/".equals(System.getProperty("file.separator")))

+     	{

+     		path = path.replace('\\', '/');

+     	}

+

+		File f= null;

+		// if the bundle is not ready then there is no file, however we may assume its perfectly ready

+        Bundle bundle = Platform.getBundle(bundleId);

+        if (bundle==null || !BundleUtility.isReady(bundle))

+           return null;

+

+        // look for the image (this will check both the plugin and fragment folders

+        java.net.URL fullPathString = null;

+        try {

+        	//fullPathString = BundleUtility.find(bundle, path);

+        	fullPathString = FileLocator.toFileURL(FileLocator.find(bundle, new Path(path), null));

+        	f = FrameworkManager.convertURLtoFile(fullPathString);

+        } catch (IllegalArgumentException e) {

+			f = new File(fullPathString.getPath());

+		} // impossible

+		catch (IOException e)

+		{

+			e.printStackTrace();

+		}

+		// FIXME nem lehet space az utvonalban windowson!

+		return f;

+    }

+

+

+

+    public void init(IWorkbench workbench, IStructuredSelection selection)

+    {

+        // Save arguments

+        iSelection = selection;

+

+        // Set wizard name

+        this.setWindowTitle("Create new VPML modelspace");

+    }

+

+

+    public void addPages()

+    {

+        // Create new (and single) wizard page, and add it to wizard

+        iMainPage = new ViatraEditorNewVPMLWizardPage(iSelection);

+        addPage(iMainPage);

+        iSelectionPage = new ViatraEditorNewVPMLWizardSelectionPage("Select modelspace fragments");

+        addPage(iSelectionPage);

+    }

+

+

+

+    /**

+     * Save IStructuredSelection argument of init().

+     */

+    protected IStructuredSelection iSelection;

+

+    /**

+     * Main page of the new VPML modelspace wizard.

+     */

+    protected ViatraEditorNewVPMLWizardPage iMainPage;

+

+    protected ViatraEditorNewVPMLWizardSelectionPage iSelectionPage;

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/wizard/WizardCategoryContributor.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/wizard/WizardCategoryContributor.java
new file mode 100644
index 0000000..395c2ac
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/wizard/WizardCategoryContributor.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.wizard;

+

+public class WizardCategoryContributor implements IWizardCategoryContributor {

+

+	String ID;

+	String Name;

+	String PluginID;

+	

+	public WizardCategoryContributor(String id, String name, String pid)

+	{

+		ID = id;

+		Name = name;

+		PluginID = pid;

+	}

+	

+	public String getID() {

+		return ID;

+	}

+

+	public String getName() {

+		return Name;

+	}

+	

+	public String getPluginID() {

+		return PluginID;

+	}

+

+}

diff --git a/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/wizard/WizardModelContributor.java b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/wizard/WizardModelContributor.java
new file mode 100644
index 0000000..8e36333
--- /dev/null
+++ b/org.eclipse.viatra2.editor/src/org/eclipse/viatra2/treeeditor/wizard/WizardModelContributor.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.treeeditor.wizard;

+

+import java.util.Collection;

+

+public class WizardModelContributor implements IWizardModelContributor {

+

+	String ID;

+	Collection<String> RequiredIDs;

+	Collection<String> ForbiddenIDs;

+	Collection<String> ContainedIDs;

+	String CategoryID;

+	String Name;

+	String Description;

+	String FileVTML;

+	String FileVPML;

+	String PluginID;

+	

+	public WizardModelContributor(String id, Collection<String> rids, Collection<String> fids,

+								  Collection<String> cids, String cid, String name, String desc,

+								  String fvtml, String fvpml, String pid)

+	{

+		ID = id;

+		RequiredIDs = rids;

+		ForbiddenIDs = fids;

+		ContainedIDs = cids;

+		CategoryID = cid;

+		Name = name;

+		Description = desc;

+		FileVPML = fvpml;

+		FileVTML = fvtml;

+		PluginID = pid;

+	}

+	

+	public String getID() {

+		return ID;

+	}

+

+	public Collection<String> getRequiredIDs() {

+		return RequiredIDs;

+	}

+

+	public Collection<String> getForbiddenIDs() {

+		return ForbiddenIDs;

+	}

+

+	public Collection<String> getContainedIDs() {

+		return ContainedIDs;

+	}

+

+	public String getCategoryID() {

+		return CategoryID;

+	}

+

+	public String getName() {

+		return Name;

+	}

+

+	public String getDescription() {

+		return Description;

+	}

+

+	public String getFileVTML() {

+		return FileVTML;

+	}

+

+	public String getFileVPML() {

+		return FileVPML;

+	}

+

+	public String getPluginID() {

+		return PluginID;

+	}

+	

+	public int compareTo(Object o) {

+		// sort according to dependency precedence

+		// FIXME: if there are dependency circles, that leads to chaos

+		IWizardModelContributor mc = (IWizardModelContributor)o;

+		// >0: this > mc

+		//  0: this = mc

+		// <0: this < mc

+		if (mc.getRequiredIDs().contains(this.getID()))

+			return -1;

+		if (this.getRequiredIDs().contains(mc.getID()))

+			return +1;

+		return 0;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/.classpath b/org.eclipse.viatra2.gtasm.interpreter.impl/.classpath
new file mode 100644
index 0000000..ad32c83
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/.project b/org.eclipse.viatra2.gtasm.interpreter.impl/.project
new file mode 100644
index 0000000..4b382b3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/.project
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.viatra2.gtasm.interpreter.impl</name>
+	<comment></comment>
+	<projects>
+		<project>viatra_gtasm_emf_model</project>
+		<project>viatra_pattern_matcher</project>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra2.gtasm.interpreter.impl/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..d55b000
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Wed Jan 12 11:18:00 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.6
diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.viatra2.gtasm.interpreter.impl/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..7854eca
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,4 @@
+#Tue Aug 01 08:50:24 CEST 2006
+eclipse.preferences.version=1
+internal.default.compliance=default
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.eclipse.viatra2.gtasm.interpreter.impl/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000..f3391b2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Thu Aug 03 02:30:54 CEST 2006
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/.settings/org.eclipse.wst.validation.prefs b/org.eclipse.viatra2.gtasm.interpreter.impl/.settings/org.eclipse.wst.validation.prefs
new file mode 100644
index 0000000..db982d7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/.settings/org.eclipse.wst.validation.prefs
@@ -0,0 +1,6 @@
+#Thu Aug 03 02:30:54 CEST 2006
+DELEGATES_PREFERENCE=delegateValidatorListorg.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator\=org.eclipse.wst.wsdl.validation.internal.eclipse.Validator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator\=org.eclipse.wst.xsd.core.internal.validation.eclipse.Validator;
+USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.jst.jsp.core.internal.validation.JSPJavaValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPDirectiveValidator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPELValidator;
+USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.jst.jsp.core.internal.validation.JSPJavaValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPDirectiveValidator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPELValidator;
+USER_PREFERENCE=overrideGlobalPreferencesfalse
+eclipse.preferences.version=1
diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/META-INF/MANIFEST.MF b/org.eclipse.viatra2.gtasm.interpreter.impl/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..99b70eb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: VIATRA2 R3 ASM Interpreter Implementation
+Bundle-SymbolicName: org.eclipse.viatra2.gtasm.interpreter.impl;singleton:=true
+Bundle-Version: 3.3.0.qualifier
+Require-Bundle: org.eclipse.viatra2.core2,
+ org.eclipse.viatra2.gtasm.model,
+ org.eclipse.viatra2.gtasm.patternmatcher,
+ org.eclipse.core.runtime,
+ org.eclipse.viatra2.gtasm.interpreter,
+ org.eclipse.viatra2.gtasm.interpreter.term,
+ org.eclipse.viatra2.gtasm.support;bundle-version="3.2.0"
+Bundle-Vendor: BUTE-FTSRG
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: org.eclipse.viatra2.gtasm.interpreter.impl.executionEnvironment,
+ org.eclipse.viatra2.gtasm.interpreter.impl.rules
diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/about.html b/org.eclipse.viatra2.gtasm.interpreter.impl/about.html
new file mode 100644
index 0000000..b72be18
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/about.html
@@ -0,0 +1,28 @@
+<!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>About</title>

+</head>

+<body lang="EN-US">

+<h2>About This Content</h2>

+ 

+<p>July 4th, 2008</p>	

+<h3>License</h3>

+

+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 

+indicated below, the Content is provided to you under the org.eclipse.viatra2.gtasm.interpreter.term.rules and conditions of the

+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is 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>If you did not receive this Content directly from the Eclipse Foundation, the Content is 

+being redistributed by another party (&quot;Redistributor&quot;) and different org.eclipse.viatra2.gtasm.interpreter.term.rules and conditions may

+apply to your use of any object code in the Content.  Check the Redistributor's license that was 

+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise

+indicated below, the org.eclipse.viatra2.gtasm.interpreter.term.rules and conditions of the EPL still apply to any source code in the Content

+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>

+

+</body>

+</html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/build.properties b/org.eclipse.viatra2.gtasm.interpreter.impl/build.properties
new file mode 100644
index 0000000..de99e18
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/build.properties
@@ -0,0 +1,5 @@
+bin.includes = META-INF/,\
+               plugin.xml,\
+               .
+
+source.. = src/
diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/plugin.xml b/org.eclipse.viatra2.gtasm.interpreter.impl/plugin.xml
new file mode 100644
index 0000000..c0a5003
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/plugin.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+   <extension
+         point="org.eclipse.viatra2.core2.interpreter">
+      <interpreter
+            class="org.eclipse.viatra2.gtasm.interpreter.impl.interpreter.EMFInterpreter"
+            description="Viatra2 R3 EMF-based model interpreter"
+            id="org.eclipse.viatra2.gtasm.interpreter.EMFInterpreter"
+            interpretedClasses="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.MachineImpl, org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.RuleImpl"
+            name="Viatra2 R3 EMF-based model interpreter"/>
+   </extension>
+</plugin>
diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/executionEnvironment/BlockRuleExecutionEnvironment.java b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/executionEnvironment/BlockRuleExecutionEnvironment.java
new file mode 100644
index 0000000..6dab3b5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/executionEnvironment/BlockRuleExecutionEnvironment.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.impl.executionEnvironment;
+
+import java.util.Map;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.framework.IFramework;
+
+public class BlockRuleExecutionEnvironment extends ExecutionEnvironment {
+	/**
+	 * This implies to the both BlockRule subclasses, LetRule and
+	 * CollectionIteratorRule.
+	 */
+	protected ASMRuleInvocation rule;
+
+	public BlockRuleExecutionEnvironment(IFramework framework,
+			ASMRuleInvocation innerRule) {
+		super(framework);
+
+		rule = innerRule;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.ExecutionEnvironment#onBegin()
+	 */
+
+	public BlockRuleExecutionEnvironment(IFramework framework) {
+		super(framework);
+	}
+
+	public void onBegin(Map<Variable, Object> variables) {
+		// Put in everything.
+		variableValues = // (Hashtable<Variable,Object>)
+		variables;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.ExecutionEnvironment#onTerminate()
+	 */
+	@Override
+	public Map<Variable, Object> onTerminate() {
+		// Return everything, the parent execution environment will sort out the
+		// variables.
+		return variableValues;
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/executionEnvironment/CallRuleExecutionEnvironment.java b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/executionEnvironment/CallRuleExecutionEnvironment.java
new file mode 100644
index 0000000..eea98bf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/executionEnvironment/CallRuleExecutionEnvironment.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.impl.executionEnvironment;
+
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DirectionKind;
+import org.eclipse.viatra2.framework.IFramework;
+
+public class CallRuleExecutionEnvironment extends ExecutionEnvironment {
+	/*
+	 * The symbolic-actual parameter mapping should be done. --> at the onBegin
+	 * for in and inout, and at the onTerminate for inout and out types. Out and
+	 * inout types must be Variables
+	 */
+
+	private Rule rule;
+
+	public CallRuleExecutionEnvironment(IFramework framework, Rule called) {
+		super(framework);
+		rule = called;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.ExecutionEnvironment#onBegin()
+	 */
+	public void onBegin(Map<Variable, Object> variables) {
+		variableValues.putAll(variables);
+
+		// super.onBegin();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.ExecutionEnvironment#onTerminate()
+	 */
+	@Override
+	public Map<Variable, Object> onTerminate() {
+		Hashtable<Variable, Object> returnVariables = new Hashtable<Variable, Object>();
+
+		for (Object symbolicRuleParameter : rule.getSymParameters()) {
+
+			// Only the OUT or INOUT type symbolic variables' values are
+			// returned
+			if (!DirectionKind.IN_LITERAL
+					.equals(((SymbolicRuleParameter) symbolicRuleParameter)
+							.getDirection())) {
+				returnVariables
+						.put(
+								((SymbolicRuleParameter) symbolicRuleParameter)
+										.getVariable(),
+								variableValues
+										.get(((SymbolicRuleParameter) symbolicRuleParameter)
+												.getVariable()));
+			}
+		}
+		return returnVariables;
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/executionEnvironment/ExecutionEnvironment.java b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/executionEnvironment/ExecutionEnvironment.java
new file mode 100644
index 0000000..531868d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/executionEnvironment/ExecutionEnvironment.java
@@ -0,0 +1,339 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.impl.executionEnvironment;
+
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.Vector;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ASMInterpreterErrorStrings;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.ASMFunctionContent;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.impl.machine.ASMInterpreterException;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+
+public class ExecutionEnvironment implements IExecutionEnvironment {
+	/**
+	 * This class is used to handle the execution environment when running an
+	 * ASM
+	 * 
+	 * If the TermEvaluator creates a sub-execution environment (stack) for its
+	 * operation for example at a function call, the values may change, the
+	 * variables and everything that changed needs to be refreshed
+	 * 
+	 * @author Peter Pasztor
+	 * 
+	 */
+	protected IExecutionEnvironment parentExecutionEnvironment;
+	protected IFramework framework;
+
+	/*
+	 * protected TermHandler termHandler; protected PatternBuilder
+	 * patternBuilder;
+	 */
+
+	// protected SimpleModelSpace modelSpace;
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment#getFramework()
+	 */
+	public IFramework getFramework() {
+		return framework;
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment#onBegin(java.util.Map)
+	 */
+	public void onBegin(Map<Variable, Object> variables) {
+		;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment#onTerminate()
+	 */
+	public Map<Variable, Object> onTerminate() {
+		return null;
+	}
+
+	// protected Hashtable<Variable, Object> variableValues;
+	protected Map<Variable, Object> variableValues;
+
+	protected ASMFunctionContent ASMFunctionValues;
+
+	public ExecutionEnvironment(IFramework framework) {
+		parentExecutionEnvironment = null;
+
+		// variableValues = new Hashtable<Variable, Object>();
+		variableValues = new TreeMap<Variable, Object>(
+				new Comparator<Variable>() {
+
+					/*
+					 * XXX Istvan: is it valid to compare variables in an
+					 * executionenvironment by their name?
+					 */
+
+					public int compare(Variable o1, Variable o2) {
+						// if (o1 instanceof PatternVariable || o2 instanceof
+						// PatternVariable)
+						// return o1.getName().compareTo(o2.getName());
+						// else
+						{
+							int h_o1 = o1.hashCode();
+							int h_o2 = o2.hashCode();
+							if (h_o1 == h_o2)
+								return 0;
+							else if (h_o1 > h_o2)
+								return 1;
+							else
+								return -1;
+						}
+
+					}
+				});
+		ASMFunctionValues = ASMFunctionContent.getInstance();
+
+		this.framework = framework;
+	}
+
+	public ExecutionEnvironment(IExecutionEnvironment parent) {
+		parentExecutionEnvironment = parent;
+
+		variableValues = new Hashtable<Variable, Object>(parent
+				.getVariableValues());
+		ASMFunctionValues = ASMFunctionContent.getInstance();
+		framework = parent.getFramework();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment#getValueOfASMFunction(org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction,
+	 *      org.eclipse.emf.common.util.EList)
+	 */
+	public Object getValueOfASMFunction(ASMFunction asmFunction, EList<Object> location) {
+		HashMap<EList<Object>, Object> af = ASMFunctionContent.getInstance().get(
+				asmFunction);
+		if (af == null)
+			return null;
+		return af.get(location);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment#updateASMFunction(org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction,
+	 *      org.eclipse.emf.common.util.EList, java.lang.Object)
+	 */
+	public void updateASMFunction(ASMFunction asmFunction, EList<Object> location,
+			Object value) throws ViatraTransformationException {
+		if (ASMFunctionValues.get(asmFunction) != null) {
+			ASMFunctionValues.get(asmFunction).put(location, value);
+			// notify value listeners
+			ASMFunctionValues.notifyListeners(asmFunction, location, value);
+		} else {
+			String[] context = {asmFunction.getName()};
+			throw new ASMInterpreterException(
+					ASMInterpreterErrorStrings.UPDATE_NONEXISTENT_ASMFUNCTION
+							, context
+							, asmFunction);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment#addVariable(org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable,
+	 *      java.lang.Object)
+	 */
+	public void addVariable(Variable key, Object value)
+			throws ViatraTransformationException {
+		if (variableValues.containsKey(key))
+			{
+			String[] context = {key.getName()};
+			throw new ASMInterpreterException(ASMInterpreterErrorStrings.ADD_EXISTING_VAR
+					, context
+					, key);
+			}
+		else
+			variableValues.put(key, value);
+	}
+
+	// This is necessary when returning from another ExecutionEnvironment
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment#updateVariables(java.util.Map)
+	 */
+	public void updateVariables(Map<Variable, Object> changedVariables) {
+		variableValues.putAll(changedVariables);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment#getVariableValue(org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable)
+	 */
+	public Object getVariableValue(Variable variable)
+			throws ViatraTransformationException {
+		// The local variables are more likely to be accessed, and are not so
+		// many as the global ones
+		if (variableValues.containsKey(variable))
+			return variableValues.get(variable);
+		else
+			{
+			String[] context = {variable.getName()};
+			throw new ASMInterpreterException(
+					ASMInterpreterErrorStrings.VALUE_OF_NOT_EXISTING_VAR
+					,context
+					,null);
+			}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment#setVariableValue(org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable,
+	 *      java.lang.Object)
+	 */
+	public void setVariableValue(Variable variable, Object value)
+			throws ViatraTransformationException { // The Variable itself doesn't
+												// change, just the value
+		if (variableValues.containsKey(variable)) {
+			// This is the easy case, just modify the value
+			variableValues.put(variable, value);
+		} else
+			{
+			String context[] = {variable.getName()};
+			throw new ASMInterpreterException(
+					ASMInterpreterErrorStrings.SET_VALUE_NOT_EXISTING_VAR
+							, context
+							, null);
+			}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment#getVariableValues()
+	 */
+	public Map<Variable, Object> getVariableValues() {
+		return variableValues;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment#fetchVariableVariations(java.util.HashMap,
+	 *      org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term)
+	 */
+	public void fetchVariableVariations(
+			HashMap<Variable, Vector<Object>> possibleVariableValues,
+			Term termToBeEvaluated) {
+		Integer index;
+		Set<EList<Object>> keys;
+
+		Set<Variable> variables = possibleVariableValues.keySet();
+		if (termToBeEvaluated instanceof FunctionInvocation) {
+			// Get into the parameters only
+			if (termToBeEvaluated instanceof ASMFunctionInvocation) {
+
+				// Here happens the real fetching of possibly good variable
+				// values
+				((ASMFunctionInvocation) termToBeEvaluated)
+						.getActualParameters();
+				for (Object parameter : ((ASMFunctionInvocation) termToBeEvaluated)
+						.getActualParameters()) {
+
+					// For every parameter, we check whether it's a variable
+					// from the list, or not.
+					if (parameter instanceof VariableReference) {
+						if (variables.contains(((VariableReference) parameter)
+								.getVariable())) {
+
+							// We found one. Now we must get the possible
+							// values.
+							// (parameter is now an instance of type Variable!)
+
+							index = ((ASMFunctionInvocation) termToBeEvaluated)
+									.getActualParameters().indexOf(parameter);
+
+							keys = this.ASMFunctionValues.get(
+									((ASMFunctionInvocation) termToBeEvaluated)
+											.getCalledFunction()).keySet();
+
+							for (EList<Object> key : keys) {
+
+								// Now we get a possible value (parameter holds
+								// the Variable!)
+								// Only one appearance allowed, hence the check
+								// It wastes time, but
+								// wastes much less time than having to
+								// re-evaluate the term again
+								// and again for the same parameters
+
+								if (!possibleVariableValues.get(
+										((VariableReference) parameter)
+												.getVariable()).contains(
+										key.get(index)))
+									possibleVariableValues.get(
+											((VariableReference) parameter)
+													.getVariable()).add(
+											key.get(index));
+							}
+						}
+					} else if (parameter instanceof FunctionInvocation) {
+						// It might be nested. Further investigation required.
+						fetchVariableVariations(possibleVariableValues,
+								((Term) parameter));
+					}
+				}
+			} // end of ASMFunctionInvocation
+			else {
+				// Other function invocations -- like operations etc.
+				// We must look at the operands, the operation itself is not
+				// important,
+				// the term evaluator will take care of that. It might be
+				// necessary to
+				// recursively process them, to be able to process not trivial
+				// conditions.
+				for (Object parameter : ((FunctionInvocation) termToBeEvaluated)
+						.getActualParameters()) {
+					this.fetchVariableVariations(possibleVariableValues,
+							((Term) parameter));
+				}
+			}
+		} else {
+			// There is a problem here, since only FunctionInvocations are
+			// allowed...
+
+		}
+	}
+}
diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/interpreter/EMFInterpreter.java b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/interpreter/EMFInterpreter.java
new file mode 100644
index 0000000..f3a3440
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/interpreter/EMFInterpreter.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.impl.interpreter;
+
+import java.util.Map;
+import java.util.Vector;
+
+import org.eclipse.viatra2.errors.VPMRuntimeControlledException;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ASMInterpreterErrorStrings;
+import org.eclipse.viatra2.gtasm.interpreter.impl.machine.MachineInterpreter;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter;
+import org.eclipse.viatra2.interpreters.IProgressReport;
+import org.eclipse.viatra2.interpreters.ModelInterpreter;
+
+
+/**
+ * VIATRA2 GTASM model interpreter, based on the EMF-based GTASM metamodel 
+ * representation (as encoded in the org.eclipse.viatra2.gtasm.model component).
+ * 
+ * Able to interpret machines and rules.
+ * @author Istvan Rath
+ *
+ */
+public class EMFInterpreter implements ModelInterpreter {
+
+	public String[] getParameters(IFramework fw, Object machineOrRule)
+			throws VPMRuntimeException {
+		Vector<String> ret = new Vector<String>();
+		if (machineOrRule instanceof Machine) {
+			Machine m = (Machine) machineOrRule;
+			if(m.getMainRule() == null)	
+				throw new VPMRuntimeControlledException(ASMInterpreterErrorStrings.MACHINE_WITHOUT_MAIN_RULE + m.getFqn());
+			
+			for (Object p : m.getMainRule().getSymParameters()) {
+				SymbolicRuleParameter par = (SymbolicRuleParameter) p;
+				ret.add(par.getVariable().getName());
+			}
+		}
+		else if (machineOrRule instanceof Rule) {
+			Rule r = (Rule) machineOrRule;
+			for (Object p : r.getSymParameters()) {
+				SymbolicRuleParameter par = (SymbolicRuleParameter) p;
+				ret.add(par.getVariable().getName());
+			}
+		}
+		return ret.toArray(new String[] {});
+	}
+
+	public boolean isRunnable(Object machineOrRule, IFramework fw) {
+		return (machineOrRule instanceof Machine) || (machineOrRule instanceof Rule);
+	}
+
+	public void run(IFramework fw, Object machineOrRule, Map<String, Object> parameters, IProgressReport pr) throws VPMRuntimeException 
+	{
+		Machine m = null;
+		Rule ep = null;
+	
+		if (machineOrRule instanceof Machine) {
+			m = (Machine) machineOrRule;
+			ep = m.getMainRule();
+			if (ep ==null) {
+				throw new VPMRuntimeControlledException(ASMInterpreterErrorStrings.MACHINE_WITHOUT_MAIN_RULE + m.getFqn());
+			}
+		}
+		else if (machineOrRule instanceof Rule) {
+			ep = (Rule) machineOrRule;
+			m = ep.getNamespace();
+		}
+		MachineInterpreter mi = new MachineInterpreter(fw, m);
+		mi.operate(parameters, pr, ep);
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/machine/ASMInterpreterException.java b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/machine/ASMInterpreterException.java
new file mode 100644
index 0000000..0e14d71
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/machine/ASMInterpreterException.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.impl.machine;
+
+import org.eclipse.viatra2.gtasm.interpreter.exception.GTASMException;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+
+/**
+ * 
+ * @author Peter Pasztor, Akos Horvath
+ * 
+ */
+public class ASMInterpreterException extends GTASMException {
+
+    private static final long serialVersionUID = -8202674621802024602L;
+    
+    
+    public ASMInterpreterException(String msg, String[] context, AnnotatedElement element) {
+		super(msg, context);
+		addNewStackElement(element);
+	}
+
+//    public ASMInterpreterException(String msg) {
+//    	super(msg);
+//    }
+//    
+//    public ASMInterpreterException(String msg, GTASMElement gtasmElement) {
+//        super(msg);
+//        interpreterStackTrace.add(createStackTraceElement(gtasmElement));
+//    }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/machine/MachineInterpreter.java b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/machine/MachineInterpreter.java
new file mode 100644
index 0000000..1824c87
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/machine/MachineInterpreter.java
@@ -0,0 +1,198 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.impl.machine;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.viatra2.codegen.CodeOutputPlugin;
+import org.eclipse.viatra2.errors.VPMRuntimeControlledException;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ASMInterpreterErrorStrings;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.ASMFunctionContent;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.impl.executionEnvironment.ExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.impl.rules.RuleInterpreter;
+import org.eclipse.viatra2.gtasm.interpreter.term.rules.TermEvaluator;
+import org.eclipse.viatra2.gtasm.patternmatcher.Scope;
+import org.eclipse.viatra2.gtasm.patternmatcher.extension.ViatraGTASMPatternMatcherPlugin;
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.PatternMatcherProvider;
+import org.eclipse.viatra2.gtasm.support.helper.GTASMHelper;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.interpreters.IProgressReport;
+import org.eclipse.viatra2.logger.Logger;
+
+
+/**
+ * Initializes the interpreter. 
+ * Will also initialize
+ *  - the pattern matcher
+ *  - the GT rule matcher
+ * 
+ * @author Peter Pasztor, Akos Horvath
+ * 
+ */
+public class MachineInterpreter {
+
+	protected Machine machine;
+	// VIATRA Framework on which we are working
+	protected IFramework frame;
+	protected IExecutionEnvironment mainExecutionEnvironment;
+
+	Logger log;
+	CodeOutputPlugin codeout;
+
+	public MachineInterpreter(IFramework f, Machine m) {
+		// FIXME this is extremely dangerous like this!
+		Scope.DEFAULT_PARENT = f.getTopmodel().getModelManager().getRoot();
+		frame = f;
+		machine = m;
+		log = frame.getLogger();
+		codeout = frame.getCodeOutput();
+		mainExecutionEnvironment = new ExecutionEnvironment(f);
+		log.debug("GTASM Interpreter initialized.");
+
+	}
+
+	private void initASMFunctions(Machine input_machine) throws VPMRuntimeException{
+		// TODO: In case of using multiple machines for a transformation it has to be
+		// checked that the Module contains all invoked machine!
+		List<Machine> machines = input_machine.getModule().getMachine();
+
+		for (Object obj : machines) {
+			Machine m = (Machine) obj;
+			for (ASMFunction fun : m.getAsmFunctionDefinitions()) {
+				HashMap<EList<Object>, Object> map = new HashMap<EList<Object>, Object>();
+				for (Object o2 : fun.getInitialValues()) {
+					InitialValue initialValue = (InitialValue) o2;
+					try {
+						EList<Object> locationsList = new BasicEList<Object>();
+						for (Object o3 : initialValue.getLocations()) {
+							Term locationsTerm = (Term) o3;
+							locationsList.add(TermEvaluator.getInstance().evaluate(
+											mainExecutionEnvironment,
+											locationsTerm));
+						}
+						map.put(locationsList, TermEvaluator.getInstance().evaluate(
+										mainExecutionEnvironment,
+										initialValue.getValue()));
+
+					} catch (ViatraTransformationException e) {
+						// log.debug("Initialization of ASMFunctions failed!");
+						VPMRuntimeException eNew = new VPMRuntimeException("Initialization of ASMFunctions failed: "+e.getMessage());
+						throw eNew;		
+					}
+				}
+				ASMFunctionContent.getInstance().put(fun, map);
+			}
+		}
+	}
+
+	private void initAllASMFunctions() throws VPMRuntimeException {
+		for (Object obj : frame.getMachines()) {
+			if (obj instanceof Machine)
+				initASMFunctions((Machine) obj);
+		}
+	}
+
+	public void initPatternMatcher() {
+		Map<String, String> patternMatcherIDbyAnnotationName = 
+			ViatraGTASMPatternMatcherPlugin.getDefault().getPatternMatcherIDbyAnnotationName();
+		for (Map.Entry<String, String> entry : patternMatcherIDbyAnnotationName.entrySet()) {
+			Map<String, String> runtimeAnnotation = 
+				GTASMHelper.extractLowerCaseRuntimeAnnotation(machine, "@" + entry.getKey());
+			if (runtimeAnnotation != null) {
+				PatternMatcherProvider.setPatternMatcherIDToUse(entry.getValue());
+				return;
+			}
+		}
+	}
+
+	public void operate(Map<String, Object> parameters, IProgressReport pr, Rule entryPoint)
+			throws VPMRuntimeException {
+//		if(machine.getMainRule() == null)	
+//			throw new VPMRuntimeException(ASMInterpreterErrorStrings.MACHINE_WITHOUT_MAIN_RULE);
+//		Istvan: this check has been moved to the {@link EMFInterpreter} class.
+		
+		log.debug("GTASM execution started");
+		// Initialization
+		try {
+			// set logger and codeout for org.eclipse.viatra2.gtasm.interpreter.impl.interpreter classes
+			initInterpreters();
+			// Initialization: load the initial values of variables and ASM
+			// functions in all Machines of the model space
+			initAllASMFunctions();
+			// modifies the default pattern matcher in case of specific
+			// annotations
+			initPatternMatcher();
+			// Starting code output
+			codeout.beginWork();
+			// Call main rule
+
+			try {
+//				for (Object localVariable : machine.getMainRule()
+				for (Object localVariable : entryPoint
+						.getLocalVariables()) {
+					if (parameters.containsKey(((Variable) localVariable)
+							.getName())) {
+						mainExecutionEnvironment.addVariable(
+								(Variable) localVariable, parameters
+										.get(((Variable) localVariable)
+												.getName()));
+					} else
+						mainExecutionEnvironment.addVariable(
+								(Variable) localVariable,
+								ValueKind.UNDEF_LITERAL);
+				}
+			} catch (ViatraTransformationException e) {
+				String[] context = {entryPoint.getFqn()};
+				throw new ASMInterpreterException(
+						ASMInterpreterErrorStrings.ENTRYPOINT_PARAMETERS_INITILAZIATION_FAILED
+								+ e.getMessage()
+								,context
+								, entryPoint);
+			}
+
+			RuleInterpreter.getInstance().interpretRule(mainExecutionEnvironment, entryPoint, pr);
+			clearASMFunctions();
+			log.debug("GTASM execution finished.");
+			
+		} catch (ViatraTransformationException e) {
+			log.message(Logger.ERROR, e.getMessage(), e);
+			throw new VPMRuntimeControlledException("The transformation encountered an error: "
+					+ e.getMessage(), e);
+		} finally {
+			PatternMatcherProvider.resetPatternMatcher();
+			// Stopping code output
+			codeout.endWork();
+		}
+	}
+
+	private void clearASMFunctions() {
+		ASMFunctionContent.getInstance().clear();
+	}
+
+	public void initInterpreters() {
+		RuleInterpreter.initInterpreters(log, codeout);
+	}
+}
diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/BasicRuleInterpreter.java b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/BasicRuleInterpreter.java
new file mode 100644
index 0000000..35bfe06
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/BasicRuleInterpreter.java
@@ -0,0 +1,323 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.impl.rules;

+

+import java.io.IOException;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Hashtable;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ASMInterpreterErrorStrings;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.impl.executionEnvironment.CallRuleExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.impl.machine.ASMInterpreterException;
+import org.eclipse.viatra2.gtasm.interpreter.term.rules.JavaNativeValue;
+import org.eclipse.viatra2.gtasm.interpreter.term.rules.TermEvaluator;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.IterateRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DirectionKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.LogLevel;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.FailRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SkipRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+import org.eclipse.viatra2.interpreters.IProgressReport;
+

+

+public class BasicRuleInterpreter extends RuleInterpreter {

+

+	private static BasicRuleInterpreter _instance = new BasicRuleInterpreter();

+

+	private BasicRuleInterpreter()

+	{

+	}

+	

+	public static BasicRuleInterpreter getInstance() {

+		return _instance; 

+	} 

+

+	@Override
+	public Boolean interpretRule(IExecutionEnvironment executionEnvironment, ASMRuleInvocation ruleToBeInterpreted, IProgressReport pr)
+		throws ViatraTransformationException

+	{

+		if(ruleToBeInterpreted instanceof SkipRule)

+		{

+			return Boolean.TRUE;			

+		}

+		else if(ruleToBeInterpreted instanceof FailRule)

+		{

+			return Boolean.FALSE;			

+		}

+		else if(ruleToBeInterpreted instanceof PrintLnRule)

+		{

+			//codeout.codeOut(""+org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.getTermEvaluator().evaluate(org.eclipse.viatra2.gtasm.interpreter.executionEnvironment,((PrintLnRule)ruleToBeInterpreted).getOut())+"\n");

+			PrintLnRule r = (PrintLnRule)ruleToBeInterpreted;

+			String s = ""+TermEvaluator.getInstance().evaluate(executionEnvironment,r.getOut())+System.getProperty("line.separator");

+			try

+			{

+				if (r.getBuffer()!=null)

+				{

+					// buffer is specified

+					Writer w = (Writer) ((JavaNativeValue)TermEvaluator.getInstance().evaluate(executionEnvironment,r.getBuffer())).getValue();

+					w.write(s);

+					//w.flush();

+				}

+				else

+				{

+					// print to default output

+					codeout.codeOut(s);

+				}

+			}

+			catch (VPMRuntimeException e) {
+				String[] context = {e.getMessage()};

+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.CODEOUT_ERROR
+						,context
+						,r);

+			} catch (IOException e) {

+				String[] context = {e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.CODEOUT_ERROR
+						,context
+						,r);

+			}

+			return Boolean.TRUE;

+		}

+		else if(ruleToBeInterpreted instanceof PrintRule)

+		{

+			PrintRule r = (PrintRule)ruleToBeInterpreted;

+			String s = ""+TermEvaluator.getInstance().evaluate(executionEnvironment,r.getOut());

+			try

+			{

+				if (r.getBuffer()!=null)

+				{

+					// buffer is specified
+					Object obj = TermEvaluator.getInstance().evaluate(executionEnvironment,r.getBuffer());

+					if(obj instanceof JavaNativeValue)
+					{
+						Object jNativeValueObj = ((JavaNativeValue)obj).getValue();
+						if(jNativeValueObj instanceof Writer)
+						{
+							Writer w = (Writer) jNativeValueObj;
+							w.write(s);
+						}
+						else
+						{
+						String[] context = {jNativeValueObj.toString()};
+						throw new ASMInterpreterException(ASMInterpreterErrorStrings.PRINTRULE_NOBUFFER
+								,context
+								,r);
+						}
+					}
+					else
+					{
+					String[] context = {obj.toString()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PRINTRULE_NOBUFFER
+							,context
+							,r);
+					}

+				}

+				else

+				{

+					// print to default output

+					codeout.codeOut(s);

+				}

+			}

+			catch (VPMRuntimeException e) {

+				String[] context = {e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.CODEOUT_ERROR
+						,context
+						,r);

+			} catch (IOException e) {

+				String[] context = {e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.CODEOUT_ERROR
+						,context
+						,r);

+			}

+			return Boolean.TRUE;

+		}

+		else if(ruleToBeInterpreted instanceof CallRule)

+		{

+			// Needs new, clean execution environment
+			CallRule callRule = (CallRule)ruleToBeInterpreted;
+			Rule calledASMRule = callRule.getRule();
+			EList<SymbolicRuleParameter> symParams = calledASMRule.getSymParameters();
+			
+			CallRuleExecutionEnvironment callRuleExecutionEnvironment=
+				new CallRuleExecutionEnvironment(executionEnvironment.getFramework(),
+						calledASMRule);
+			
+			Hashtable<Variable, Object> symVarBindings=new Hashtable<Variable, Object>();
+			Hashtable<Variable, Variable> outVarBindings=new Hashtable<Variable, Variable>();
+			
+			// Variable vector to check for any inout or out parameters that reference the same variable
+			ArrayList<Variable> outandInoutVariables=new ArrayList<Variable>();
+			
+			// Binding the symbolic variables. Need to evaluate them before running the actual rule.
+			for (int i=0;i<callRule.getActualParameters().size();i++)
+				{
+				// Bind the symbolic variables
+				Object evaluatedValue =TermEvaluator.getInstance().
+				evaluate(executionEnvironment, 
+						callRule.getActualParameters().get(i));
+				
+				SymbolicRuleParameter symbolicRuleParameter =  symParams.get(i);
+				Variable symbolicVariable = symbolicRuleParameter.getVariable();
+				
+				//if it is an OutPut variable it means then an undef must be passed rather than its actual value
+				if(symbolicRuleParameter.getDirection().equals(DirectionKind.OUT_LITERAL))
+					{
+					symVarBindings.put(symbolicVariable	, ValueKind.UNDEF_LITERAL);
+					}
+				else
+					{symVarBindings.put(symbolicVariable, evaluatedValue);}
+				
+				// If not an IN parameter, it must be a variable
+				if(!symbolicRuleParameter.getDirection().equals(DirectionKind.IN_LITERAL))
+				{
+					if(callRule.getActualParameters().get(i) instanceof VariableReference)
+						{
+						Variable actualVariable = ((VariableReference)callRule.getActualParameters().get(i)).getVariable();
+						outVarBindings.put(symbolicVariable,actualVariable)
+							;
+						
+						// If it contains the variable, there is an error, since it has already been referenced as an inout or out variable 
+						if(outandInoutVariables.contains(actualVariable))
+							{
+							String[] context = {actualVariable.getName(),symbolicRuleParameter.getDirection().toString()};
+							throw new ASMInterpreterException(ASMInterpreterErrorStrings.ASMRULE_PARAM_OUT_INOUT_MULTIPLE_REF
+											,context
+											,callRule);
+							
+						//					,callRule.getRule());
+						//	e.addNewStackElement(callRule);
+							}
+						else
+							outandInoutVariables.add(((VariableReference)callRule.getActualParameters().get(i)).getVariable());
+						}
+					else
+						{
+						String[] context = {symbolicVariable.getName(),symbolicRuleParameter.getDirection().toString(),callRule.getRule().getName()};
+						throw new ASMInterpreterException(ASMInterpreterErrorStrings.ASMRULE_PARAM_IN_INOUT_NOT_VARREF
+								,context
+								,callRule);
+						}
+				}
+				else if(ValueKind.UNDEF_LITERAL.equals(evaluatedValue))	// All in parameters must be bound! (inout parameters must be variables)
+					{
+					String[] context = {symbolicRuleParameter.getName(),callRule.getRule().getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.ASMRULE_PARAM_IN_NOT_BOUND
+							,context
+							,callRule);
+					}
+				}
+			
+			boolean isNative = false;
+			//Checks for the "native" annotation
+			for (Object annot : calledASMRule.getRuntimeAnnotations()) {
+				if ("@native".equals(((RuntimeAnnotation) annot).getAnnotationName().toLowerCase())) {
+					isNative = true; break;
+				}
+			}
+			Boolean result=Boolean.FALSE;
+			callRuleExecutionEnvironment.onBegin(symVarBindings);
+
+			if(isNative) //Native ASM Rule
+				{
+				result = NativeASMRuleInterpreter.getInstance().executeNativeASMRule(callRuleExecutionEnvironment, symVarBindings, callRule);
+				}
+			else
+				{//Normal ASM rule 
+					try {
+						result= RuleInterpreter.getInstance().interpretRule(callRuleExecutionEnvironment,calledASMRule.getBody(), pr);
+					} catch (ViatraTransformationException e) {
+						//throw e.addNewStackElement(((CallRule)ruleToBeInterpreted).getRule());
+						throw e.addNewStackElement(callRule.getRule()).addNewStackElement(callRule);
+					}  
+		
+					// If the rule failed, we have to restore the previous state. -> we don't have to write the values of the 
+					// variables back to the current execution environment
+					if(result)
+					{
+						symVarBindings=(Hashtable<Variable, Object>)callRuleExecutionEnvironment.onTerminate();
+					
+						// Getting the values back from the execution environment. Only for parameters with OUT or INOUT directions.
+						for (int i=0;i<callRule.getActualParameters().size();i++) {
+							if(!(symParams.get(i)).getDirection().equals(DirectionKind.IN_LITERAL))
+							{
+								Variable _sym=(symParams.get(i)).getVariable();
+								outVarBindings.put(_sym,((VariableReference)callRule.getActualParameters().get(i)).getVariable());
+							}	
+						}	
+					}
+					
+					// Putting the changed variables back to the original environment
+					for (Object symbolicVariableOut : outVarBindings.keySet()) {
+						try {
+							executionEnvironment.setVariableValue(outVarBindings.get(symbolicVariableOut), symVarBindings.get(symbolicVariableOut));
+						} catch (ViatraTransformationException e) {
+							String[] context = {((Variable)symbolicVariableOut).getName(),callRule.getRule().getName(),e.getMessage()};
+							throw new ASMInterpreterException(ASMInterpreterErrorStrings.SET_VAR_VALUE_AFTER_ASMRULE_CALL
+									,context
+									,callRule);
+						}
+					}
+				}
+			return result;

+		}

+		else if(ruleToBeInterpreted instanceof IterateRule)

+		{

+			while(RuleInterpreter.getInstance().interpretRule(executionEnvironment, ((IterateRule)ruleToBeInterpreted).getBody(),pr));

+			return Boolean.TRUE;

+		}

+		else if(ruleToBeInterpreted instanceof LogRule)

+		{

+			String msg = ""+(TermEvaluator.getInstance().evaluate(executionEnvironment,((LogRule)ruleToBeInterpreted).getOut()));

+			switch(((LogRule)ruleToBeInterpreted).getLevel().getValue())

+			{

+			case LogLevel.INFO:

+				log.info(msg);

+				break;

+			case LogLevel.DEBUG:

+				log.debug(msg);

+				break;

+			case LogLevel.WARNING:

+				log.warning(msg);

+				break;								

+			case LogLevel.ERROR:

+				log.error(msg);

+				break;

+			case LogLevel.FATAL:

+				log.fatal(msg);

+				break;

+			default:

+				log.fatal(msg);

+				break;			

+			}

+			return Boolean.TRUE;

+		}

+		String[] context = {ruleToBeInterpreted.getName()};

+		throw new ASMInterpreterException(ASMInterpreterErrorStrings.RULE_UNIMPL
+				,context
+				,ruleToBeInterpreted);

+		//return Boolean.FALSE;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/BlockRuleInterpreter.java b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/BlockRuleInterpreter.java
new file mode 100644
index 0000000..665a715
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/BlockRuleInterpreter.java
@@ -0,0 +1,730 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.impl.rules;

+

+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Vector;
+
+import org.eclipse.viatra2.gtasm.interpreter.exception.ASMInterpreterErrorStrings;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.impl.executionEnvironment.BlockRuleExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.impl.machine.ASMInterpreterException;
+import org.eclipse.viatra2.gtasm.interpreter.term.rules.TermEvaluator;
+import org.eclipse.viatra2.gtasm.patternmatcher.IMatching;
+import org.eclipse.viatra2.gtasm.patternmatcher.ParameterMode;
+import org.eclipse.viatra2.gtasm.patternmatcher.PatternMatcherParameters;
+import org.eclipse.viatra2.gtasm.patternmatcher.Scope;
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IGTRuleMatcher;
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IPatternMatcher;
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.PatternMatcherProvider;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.BlockRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ChooseRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ForallRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.LetRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;
+import org.eclipse.viatra2.interpreters.IProgressReport;
+

+

+

+/** Interprets the block rules of the GTASM language 

+ * @author Peter Pasztor, Akos Horvath and Istvan Rath

+ *

+ */

+public class BlockRuleInterpreter extends RuleInterpreter {

+

+	private static BlockRuleInterpreter _instance = new BlockRuleInterpreter();

+

+	private BlockRuleInterpreter()

+	{

+		;

+	}

+	

+	public static BlockRuleInterpreter getInstance() { 

+		return _instance; 

+	} 

+

+	@Override
+	public Boolean interpretRule(IExecutionEnvironment executionEnvironment, ASMRuleInvocation ruleToBeInterpreted, IProgressReport pr) 
+		throws ViatraTransformationException

+	{

+		

+		BlockRule blockRule=(BlockRule)ruleToBeInterpreted;

+		if(blockRule instanceof LetRule)

+		{

+			LetRule letBlockRule = (LetRule)ruleToBeInterpreted;

+			return interpretLetRule(executionEnvironment,letBlockRule,pr);

+		}

+		else if(blockRule instanceof ForallRule)

+		{

+			ForallRule forallBlockRule = (ForallRule) blockRule;

+			if (forallBlockRule.getGtrule()==null)

+			{

+				if(forallBlockRule.getCondition() instanceof GTPatternCall)

+				{

+//FORALL with GTPATTERN
+//					GTPatternCall patternCall = (GTPatternCall)forallBlockRule.getCondition();
+//					//boolean isParallel = false;
+//					//int threadPoolSize = 0;
+//					for (Object _ra : patternCall.getCalledPattern().getRuntimeAnnotations())
+//					{
+//						RuntimeAnnotation ra = (RuntimeAnnotation) _ra;
+//						if (ra.getAnnotationName().equalsIgnoreCase("@parallelforall"))
+//						{
+//							isParallel = true;
+//							for(Object _p : ra.getElements())
+//							{
+//								RuntimeAnnotationElement p = (RuntimeAnnotationElement) _p;
+//								if (p.getKey().equalsIgnoreCase("threadpoolsize"))
+//								{
+//									threadPoolSize = Integer.parseInt(p.getValue());
+//								}
+//							}
+//							break;
+//						}
+//					}
+//					if (isParallel)
+//						return interpretForallRulewithGTPattern_Parallel(executionEnvironment, forallBlockRule, pr, threadPoolSize);
+//					else

+						return interpretForallRulewithGTPattern(executionEnvironment, forallBlockRule,pr);

+				}

+				else 

+				{

+//FORALL with ASMFUNCTION

+					return interpretForallRulewithASMFunction(executionEnvironment, forallBlockRule,pr);

+				}

+			}

+			else

+			{

+//FORALL with GTRULE

+				return interpretForallRulewithGTRule(executionEnvironment, forallBlockRule,pr);

+			}

+		}

+		else if(blockRule instanceof ChooseRule)

+		{

+			ChooseRule chooseBlockRule = ((ChooseRule)blockRule);

+

+			if (chooseBlockRule.getGtrule()==null) {

+				if(chooseBlockRule.getCondition() instanceof GTPatternCall)

+				{

+//CHOOSE with GTPATTERN			

+					return interpretChooseRulewithGTPattern(executionEnvironment, chooseBlockRule,pr);	

+				}

+				else

+				{

+//CHOOSE with ASMFUNCTION				

+				return interpretChooseRulewithASMFunction(executionEnvironment, chooseBlockRule,pr);

+				}

+			}

+			else

+			{

+//CHOOSE with GTRULE

+				return interpretChooseRulewithGTRule(executionEnvironment, chooseBlockRule,pr);

+			}

+		}

+		return Boolean.FALSE;

+	}

+	

+	

+	private Boolean interpretLetRule(IExecutionEnvironment executionEnvironment, LetRule letBlockRule, IProgressReport pr) 
+		throws ViatraTransformationException

+	{

+		BlockRuleExecutionEnvironment letRuleExecutionEnvironment =
+			new BlockRuleExecutionEnvironment(executionEnvironment.getFramework(),letBlockRule.getBody());

+		Hashtable<Variable, Object> childExecutionEnvironmentVariables=new Hashtable<Variable, Object>();

+		childExecutionEnvironmentVariables.putAll(executionEnvironment.getVariableValues());

+		

+		//evaluate the variable definitions' values.

+		for (Object variableDefinition : letBlockRule.getDefinitions()) {

+            // This long line puts the variable's values into the execution environment. If the parser gave a null value,

+            // a ValueKind.UNDEF_LITERAL value is substituted.

+			VariableDefinition varDef  = (VariableDefinition)variableDefinition;

+			childExecutionEnvironmentVariables.put(varDef.getVariable(),(varDef.getValue())==null?

+					ValueKind.UNDEF_LITERAL:TermEvaluator.getInstance().evaluate(executionEnvironment, varDef.getValue()));

+		}

+		

+		letRuleExecutionEnvironment.onBegin(childExecutionEnvironmentVariables);

+		Boolean result= RuleInterpreter.getInstance().interpretRule(letRuleExecutionEnvironment,letBlockRule.getBody(),pr);

+		childExecutionEnvironmentVariables=(Hashtable<Variable, Object>)letRuleExecutionEnvironment.onTerminate();

+

+		for (Variable variable : executionEnvironment.getVariableValues().keySet()) {

+			try {

+				executionEnvironment.setVariableValue(variable, childExecutionEnvironmentVariables.get(variable));

+			} catch (ViatraTransformationException e) {

+				String[] context = {variable.getName(),e.getMessage()};
+				throw new ASMInterpreterException(
+						ASMInterpreterErrorStrings.SET_VAR_VALUE_AFTER_NATIVE_CALL
+						,context
+						,letBlockRule);

+			}

+		}

+		return result;

+	}

+	

+	private Boolean interpretForallRulewithGTRule(IExecutionEnvironment executionEnvironment, ForallRule forallBlockRule, IProgressReport pr) 
+		throws ViatraTransformationException{

+		HashMap<Variable, Scope> parameterParameterScopes = new HashMap<Variable, Scope>();

+		GTRule gtRule = forallBlockRule.getGtrule().getRule();

+		Collection<IMatching> lHSmatches;

+		//Needs a new Exec.env. for the ***DO*** part of the rule

+		BlockRuleExecutionEnvironment forallRuleExecutionEnvironment =
+			BlockRuleInterpreterHelper.getNewExecutionEnvironment(executionEnvironment, forallBlockRule);

+

+		//New GTEXEC. env. for the action part of the gtRule 

+		IExecutionEnvironment gtEnvironment= new BlockRuleExecutionEnvironment(executionEnvironment.getFramework());

+		

+		// get scopes for the gtRule

+		parameterParameterScopes = 
+			BlockRuleInterpreterHelper.getScopesFromContainmentConstraints(forallRuleExecutionEnvironment

+				, forallBlockRule);

+	

+		// get matcher parameters

+		PatternMatcherParameters mp=
+			BlockRuleInterpreterHelper.getGTRuleMatchParameters(forallRuleExecutionEnvironment

+				,forallBlockRule

+				, parameterParameterScopes

+				, gtRule

+				, forallBlockRule.getGtrule());

+		

+		// Get patternMatcher

+		IGTRuleMatcher gtMatcher;

+		

+		//evaluate the matches of the LHS for the gtRule

+		try{

+				gtMatcher = PatternMatcherProvider.getInstance().getGtRuleMatcher(gtEnvironment,gtRule,mp);

+				lHSmatches =gtMatcher.initMatchAll(mp.getCallSignature(), mp.getInputMapping(), mp.getQuantificationOrder());

+			} catch (ViatraTransformationException e1) {
+				throw e1.addNewStackElement(forallBlockRule);

+			}

+				

+		if(lHSmatches != null && lHSmatches.size() != 0)
+		{
+		// reorder if neccessary
+			lHSmatches = BlockRuleInterpreterHelper.
+			reorder(gtRule.getPrecondition().getCalledPattern(), lHSmatches);
+

+		// the RHS\LHS and action part of the rule are evaluated by the matchAll method	

+			for(IMatching lHSMatch: lHSmatches)

+			{		//get matches

+					Object[] match;

+					try {

+						match = gtMatcher.matchAll(lHSMatch, mp.getCallSignature(),mp.getInputMapping());

+					} catch (ViatraTransformationException e1) {
+						throw e1.addNewStackElement(forallBlockRule);

+					}

+					

+					//Bind the variables for the 'DO' part of the rule

+					BlockRuleInterpreterHelper.
+					evaulateDoPartofGTRuleInvocation(gtRule

+							,match

+							,forallBlockRule

+							,forallRuleExecutionEnvironment
+							,forallBlockRule.getGtrule()
+							,pr);

+			}// end of for cycle for the matches of the GTRULE
+		}

+	/*************************************************/

+		// write the changed values back

+		forallRuleExecutionEnvironment.onTerminate();

+		for(Variable var :executionEnvironment.getVariableValues().keySet())

+			executionEnvironment.setVariableValue(var, forallRuleExecutionEnvironment.getVariableValue(var));

+	/*************************************************/	

+	return Boolean.TRUE;

+	}

+	

+	private Boolean interpretForallRulewithASMFunction(IExecutionEnvironment executionEnvironment, ForallRule forallBlockRule, IProgressReport pr)
+		throws ViatraTransformationException{

+		// This will list all the values a symbolic variable might hold.

+		HashMap<Variable, Vector<Object>> valueList = new HashMap<Variable, Vector<Object>>();

+		Map<Variable, Object> variables = new Hashtable<Variable, Object>(executionEnvironment.getVariableValues());

+

+		for (Object variable : forallBlockRule.getLocalVariables()) {

+			valueList.put(((Variable) variable), new Vector<Object>());

+			variables.put((Variable)variable, ValueKind.UNDEF_LITERAL);

+		}

+		

+		executionEnvironment.fetchVariableVariations(valueList,forallBlockRule.getCondition());

+

+		// We have a list of possible values for the variables.

+		// Now we must get each configuration (just as a Cartesian multiplication

+		// would, but being a lot more efficient), and evaluate them using brute force.

+

+		Object[] keys = valueList.keySet().toArray();

+

+		// Needs a new Exec.env. the new Variables will be added later.

+		

+		BlockRuleExecutionEnvironment forallRuleExecutionEnvironment = 
+			new BlockRuleExecutionEnvironment(executionEnvironment.getFramework()

+				,forallBlockRule.getBody());

+

+		forallRuleExecutionEnvironment.onBegin(variables);

+		// We need a divider vector to be able to iterate through all the variations.

+		Vector<Integer> divVect = new Vector<Integer>();

+		divVect.add(new Integer(valueList.get(keys[0]).size()));

+		Integer maxCount = new Integer(valueList.get(keys[0]).size());

+			

+		for (int iter = 1; iter < valueList.size(); iter++) {

+			maxCount*=valueList.get(keys[iter]).size();

+			divVect.add(valueList.get(keys[iter]).size());

+			// Don't bother, if the function doesn't have any values. In such cases, this speeds up a lot.

+			
+			if(valueList.get(keys[iter]).size()==0) {
+				//return Boolean.FALSE; //Istvan: this causes incorrect behaviour, see #335
+				return Boolean.TRUE;
+			}
+			

+		}

+		// To speed up things a bit.

+		//Integer maxCount = divVect.lastElement();

+		Integer size = divVect.size();

+		//Evaluate all configurations

+		

+		for (Integer iter_config = 0; iter_config < maxCount; iter_config++) {

+			Integer config_no = new Integer(iter_config);

+		

+			// bind the variables

+			for (int iter_var = 0; iter_var < size; iter_var++) { 

+				//Integer num=config_no-config_no%(iter_var==0?1:divVect.get(iter_var-1))/divVect.get(iter_var);

+				Variable variable = (Variable) (valueList.keySet().toArray()[iter_var]);
+				try {
+					forallRuleExecutionEnvironment.setVariableValue(

+							variable,

+							valueList.get(valueList.keySet().toArray()[iter_var]).get(config_no	% divVect.get(iter_var)));

+				} catch (ViatraTransformationException e) {
+					String[] context = {variable.getName(),e.getMessage()};

+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.RULE_INIT_VAR_ASMFUNCTION
+							,context
+							,forallBlockRule);

+				}

+						config_no = (config_no - config_no % divVect.get(iter_var))/divVect.get(iter_var);

+			}

+			// Now for the last variable

+			//evaluate it in a sandbox-like execution environment.

+			

+			if (Boolean.TRUE.equals(

+					TermEvaluator.getInstance().evaluate(forallRuleExecutionEnvironment,forallBlockRule.getCondition()))) 

+			{

+				// The condition evaluated to true --> this is a good configuration to interpret

+				// the actual rule

+				//TODO: if it fails, what to do?

+				RuleInterpreter.getInstance().interpretRule(forallRuleExecutionEnvironment,forallBlockRule.getBody(),pr);

+			}

+		}

+		// all runs are done now

+		// write the changed values back

+		forallRuleExecutionEnvironment.onTerminate();

+		for(Variable var :executionEnvironment.getVariableValues().keySet())

+			executionEnvironment.setVariableValue(var, forallRuleExecutionEnvironment.getVariableValue(var));

+		

+		return Boolean.TRUE;

+	}

+/*	
+	private Boolean interpretForallRulewithGTPattern_Parallel(IExecutionEnvironment executionEnvironment, final ForallRule forallBlockRule, final IProgressReport pr, final int threadPoolSize) 
+		throws ViatraTransformationException
+	{	
+		int i=0;
+		GTPatternCall  forallGTPatternCall = (GTPatternCall)forallBlockRule.getCondition();
+		PatternMatcherParameters mp;
+		Collection<IMatching> matches;
+		
+		// make new execution environment
+		final BlockRuleExecutionEnvironment forallRuleExecutionEnvironment = getNewExecutionEnvironment(executionEnvironment, forallBlockRule);
+		
+		//Get scopes from containmentConstraints
+		HashMap<Variable, Scope> parameterParameterScopes =getScopesFromContainmentConstraints(forallRuleExecutionEnvironment,forallBlockRule);
+		
+		//Get patternMatcher
+		IPatternMatcher patternMatcher;
+		try
+		{
+			patternMatcher = PatternMatcherProvider.getInstance().getPatternMatcher(forallRuleExecutionEnvironment,
+						forallGTPatternCall.getCalledPattern());
+			
+			// get matcher parameters
+			mp=getMatchParameters(forallRuleExecutionEnvironment,forallBlockRule, parameterParameterScopes);
+			
+			// get matches
+			matches =patternMatcher.matchAll(mp.getInputMapping(), mp.getCallSignature(),mp.getQuantificationOrder() );
+			
+		} catch (ViatraTransformationException e1) {
+			throw e1.addNewStackElement(forallBlockRule);
+		}
+		
+		// create threadpool for execution
+		ThreadPool pool = new ThreadPool(threadPoolSize);
+		
+		// reorder if neccessary
+		matches = reorder(forallGTPatternCall.getCalledPattern(), matches);
+		
+		// Assign the parameters to the new exec.environment
+		for (IMatching match : matches) {
+			
+			// make a copy of the execution environment
+			final IExecutionEnvironment _forallRuleExecutionEnvironment = new ExecutionEnvironment(forallRuleExecutionEnvironment);
+			
+			
+			// bind the variables
+			// Update variables values from the matching
+			
+			for (i=0;i< forallGTPatternCall.getActualParameters().size();i++) {
+				// OUTPUT checking
+				if(mp.getCallSignature()[i].getParameterMode().equals(ParameterMode.OUTPUT)) 
+				{ Variable variable = ((VariableReference)forallGTPatternCall.getActualParameters().get(i)).getVariable();
+					try {
+						_forallRuleExecutionEnvironment.setVariableValue(
+								variable,
+								match.lookup(i));
+					} catch (ViatraTransformationException e) {
+						String[] context = {variable.getName(),e.getMessage()};
+						throw new ASMInterpreterException(ASMInterpreterErrorStrings.RULE_INIT_VAR_PARALLEL_FORALL
+								,context
+								,forallBlockRule);
+					}
+				}
+			}
+			pool.assign(new Runnable(){
+				public void run() {
+					try {
+						RuleInterpreter.getInstance().interpretRule(_forallRuleExecutionEnvironment,forallBlockRule.getBody(),null);
+					} catch (ViatraTransformationException e) {
+						e.printStackTrace();
+					}		
+				}
+			});
+			//TODO: what if fail???
+		}
+		pool.complete();
+
+		// write the changed values back -- TODO NO INFORMATION PROPAGATION SUPPORT FOR NOW
+		//forallRuleExecutionEnvironment.onTerminate();
+		//for(Variable var :org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.getVariableValues().keySet())
+		//	org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.setVariableValue(var, forallRuleExecutionEnvironment.getVariableValue(var));
+		return Boolean.TRUE;
+	}
+*/	
+	

+	

+	private Boolean interpretForallRulewithGTPattern(IExecutionEnvironment executionEnvironment, ForallRule forallBlockRule, IProgressReport pr)
+		throws ViatraTransformationException {

+		

+		int i=0;

+				GTPatternCall  forallGTPatternCall = (GTPatternCall)forallBlockRule.getCondition();

+				PatternMatcherParameters mp;

+				Collection<IMatching> matches;

+				

+				// make new execution environment

+				BlockRuleExecutionEnvironment forallRuleExecutionEnvironment = 
+					BlockRuleInterpreterHelper.getNewExecutionEnvironment(executionEnvironment, forallBlockRule);

+				

+				//Get scopes from containmentConstraints

+				HashMap<Variable, Scope> parameterParameterScopes =
+					BlockRuleInterpreterHelper.getScopesFromContainmentConstraints(forallRuleExecutionEnvironment,forallBlockRule);

+				

+				//Get patternMatcher

+				IPatternMatcher patternMatcher;

+				try{

+				patternMatcher = PatternMatcherProvider.getInstance().getPatternMatcher(forallRuleExecutionEnvironment,

+							forallGTPatternCall.getCalledPattern());

+				

+				// get matcher parameters

+				mp=
+					BlockRuleInterpreterHelper.getMatchParameters(
+							forallRuleExecutionEnvironment,forallBlockRule, parameterParameterScopes);

+				

+				// get matches

+				matches =patternMatcher.matchAll(mp.getInputMapping(), mp.getCallSignature(),mp.getQuantificationOrder() );

+				

+				} catch (ViatraTransformationException e1) {
+					throw e1.addNewStackElement(forallBlockRule);

+				}

+
+				// reorder if neccessary
+				matches = BlockRuleInterpreterHelper.
+					reorder(forallGTPatternCall.getCalledPattern(), matches);
+

+				// Assign the parameters to the new exec.environment

+				for (IMatching match : matches) {

+					// bind the variables

+					// Update variables values from the matching

+					

+					for (i=0;i< forallGTPatternCall.getActualParameters().size();i++) {

+						// OUTPUT checking

+						if(mp.getCallSignature()[i].getParameterMode().equals(ParameterMode.OUTPUT)) 

+						{ Variable variable = ((VariableReference)forallGTPatternCall.getActualParameters().get(i)).getVariable();

+							try {

+								forallRuleExecutionEnvironment.setVariableValue(

+										variable,

+										match.lookup(i));

+							} catch (ViatraTransformationException e) {
+								String[] context = {variable.getName(),e.getMessage()};

+								throw new ASMInterpreterException(ASMInterpreterErrorStrings.RULE_INIT_VAR_FORALL
+										,context
+										,forallBlockRule );

+							}

+						}

+					}

+					RuleInterpreter.getInstance().interpretRule(forallRuleExecutionEnvironment,forallBlockRule.getBody(),pr);

+					//TODO: what if fail???

+				}

+				/*************************************************/

+				// write the changed values back

+				forallRuleExecutionEnvironment.onTerminate();

+				for(Variable var :executionEnvironment.getVariableValues().keySet())

+					executionEnvironment.setVariableValue(var, forallRuleExecutionEnvironment.getVariableValue(var));

+				/*************************************************/

+			return Boolean.TRUE;

+	}
+
+

+	private Boolean interpretChooseRulewithGTPattern(

+			IExecutionEnvironment executionEnvironment,

+			ChooseRule chooseBlockRule, IProgressReport pr) throws ViatraTransformationException {

+		

+				int i= 0;

+				GTPatternCall chooseGTPatternCall = (GTPatternCall) chooseBlockRule.getCondition();

+				PatternMatcherParameters mp; 

+				IMatching match;

+				

+				HashMap<Variable, Scope> parameterParameterScopes = new HashMap<Variable, Scope>();

+		

+				// Needs a new Exec.env. the new Variables will be added also.

+				BlockRuleExecutionEnvironment chooseRuleExecutionEnvironment = 
+					BlockRuleInterpreterHelper.getNewExecutionEnvironment(executionEnvironment, chooseBlockRule);

+		

+				// get scopes

+				parameterParameterScopes = 
+					BlockRuleInterpreterHelper.getScopesFromContainmentConstraints(chooseRuleExecutionEnvironment, chooseBlockRule);

+		
+				// is true pseudorandom required?
+				GTPattern gtPattern = chooseGTPatternCall.getCalledPattern();
+				boolean isRandom = false;
+				for (Object annot : gtPattern.getRuntimeAnnotations()) {
+					if ("@random".equals(((RuntimeAnnotation) annot).getAnnotationName().toLowerCase())) {
+						isRandom = true; break;
+					}
+				}
+				

+				// Get patternMatcher

+				IPatternMatcher patternMatcher;

+				try{

+					patternMatcher = PatternMatcherProvider.getInstance().getPatternMatcher(chooseRuleExecutionEnvironment, gtPattern);

+					// get matcher parameters

+					mp = 
+						BlockRuleInterpreterHelper.getMatchParameters(chooseRuleExecutionEnvironment, chooseBlockRule,

+							parameterParameterScopes);

+			

+					// get matches

+					if (!isRandom) match = patternMatcher.match(mp.getInputMapping(), mp.getCallSignature()); 
+					else match = patternMatcher.matchRandomly(mp.getInputMapping(), mp.getCallSignature()); 

+				} catch (ViatraTransformationException e1) {
+					throw e1.addNewStackElement(chooseBlockRule);

+				}

+				

+				// no match found

+				if (match == null)

+					return Boolean.FALSE;

+		

+				// Update variables values from the matching

+				for (i = 0; i < chooseGTPatternCall.getActualParameters().size(); i++) {

+					if (mp.getCallSignature()[i].getParameterMode().equals(

+							ParameterMode.OUTPUT)) {

+						Variable variable = ((VariableReference) chooseGTPatternCall.getActualParameters().get(i)).getVariable();
+						try {

+							chooseRuleExecutionEnvironment.setVariableValue(

+									variable , match.lookup(i));

+						} catch (ViatraTransformationException e) {

+							String[] context = {variable.getName(), e.getMessage()};
+							throw new ASMInterpreterException(

+									ASMInterpreterErrorStrings.RULE_INIT_VAR_CHOOSE
+									,context

+									,chooseBlockRule);

+						}

+					}

+				}

+				Boolean result = RuleInterpreter.getInstance().interpretRule(chooseRuleExecutionEnvironment

+								,chooseBlockRule.getBody(),pr);

+				/** ********************************************** */

+				// write the changed values back

+				chooseRuleExecutionEnvironment.onTerminate();

+				for (Variable var : executionEnvironment.getVariableValues().keySet())

+					executionEnvironment.setVariableValue(var,

+							chooseRuleExecutionEnvironment.getVariableValue(var));

+				/** ********************************************** */

+				

+				return result;

+	}

+	

+	private Boolean interpretChooseRulewithASMFunction(IExecutionEnvironment executionEnvironment, ChooseRule chooseBlockRule, IProgressReport pr)
+		throws ViatraTransformationException{

+

+		// This will list all the values a symbolic variable might hold.

+		HashMap<Variable, Vector<Object>> valueList = new HashMap<Variable, Vector<Object>>();

+		Map<Variable, Object> variables = new Hashtable<Variable, Object>(executionEnvironment.getVariableValues());

+		for (Object variable : chooseBlockRule.getLocalVariables()) {

+			valueList.put(((Variable) variable), new Vector<Object>());

+			variables.put((Variable)variable, ValueKind.UNDEF_LITERAL);

+		}

+		

+		executionEnvironment.fetchVariableVariations(valueList,chooseBlockRule.getCondition());

+

+		// We have a list of possible values for the variables.

+		// Now we must get each configuration (just as a Cartesian multiplication

+		// would, but being a lot more efficient), and evaluate them using brute force.

+

+		Object[] keys = valueList.keySet().toArray();

+

+		// Needs a new Exec.env. the new Variables will be added later.

+		

+		BlockRuleExecutionEnvironment chooseRuleExecutionEnvironment = 
+			new BlockRuleExecutionEnvironment(executionEnvironment.getFramework(),

+				chooseBlockRule.getBody());

+		

+		chooseRuleExecutionEnvironment.onBegin(variables);

+		// We need a divider vector to be able to iterate through all the variations.

+		Vector<Integer> divVect = new Vector<Integer>();

+		divVect.add(new Integer(valueList.get(keys[0]).size()));

+		Integer maxCount = new Integer(valueList.get(keys[0]).size());

+		

+		for (int iter = 1; iter < valueList.size(); iter++) {

+			//divVect.add(valueList.get(keys[iter]).size()

+				//	* divVect.get(iter - 1));

+			maxCount*=valueList.get(keys[iter]).size();

+			divVect.add(valueList.get(keys[iter]).size());

+					

+

+			// Don't bother, if the function doesn't have any values. In such cases, this speeds up a lot.

+			if(valueList.get(keys[iter]).size()==0) return Boolean.FALSE;

+		}

+		// To speed up things a bit.

+		//Integer maxCount = divVect.lastElement();

+		Integer size = divVect.size();

+		//Evaluate all configurations

+		

+		for (Integer iter_config = 0; iter_config < maxCount; iter_config++) {

+			Integer config_no = new Integer(iter_config);

+		

+			// bind the variables

+			for (int iter_var = 0; iter_var < size; iter_var++) { 

+

+				//Integer num=config_no-config_no%(iter_var==0?1:divVect.get(iter_var-1))/divVect.get(iter_var);

+				Variable variable = (Variable) (valueList.keySet().toArray()[iter_var]);

+				try {

+					chooseRuleExecutionEnvironment.setVariableValue(

+							variable,

+							valueList.get(valueList.keySet().toArray()[iter_var]).get(config_no	% divVect.get(iter_var)));

+				} catch (ViatraTransformationException e) {

+					String[] context = {variable.getName(),e.getMessage()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.RULE_INIT_VAR_ASMFUNCTION
+							,context
+							,chooseBlockRule);

+				}

+						config_no = (config_no - config_no % divVect.get(iter_var))/divVect.get(iter_var);

+			}

+			//evaluate it in a sandbox-like execution environment.

+

+			if (Boolean.TRUE.equals(TermEvaluator.getInstance().evaluate(

+							chooseRuleExecutionEnvironment,

+							chooseBlockRule.getCondition()))) {

+				// The condition evaluated to true --> this is a good configuration to interpret

+				// the actual rule

+				//TODO: if it fails, what to do?

+				 boolean result = RuleInterpreter.getInstance()

+						.interpretRule(chooseRuleExecutionEnvironment,

+								chooseBlockRule.getBody(),pr);

+				// write the changed values back
+					chooseRuleExecutionEnvironment.onTerminate();
+					for(Variable var :executionEnvironment.getVariableValues().keySet())
+						executionEnvironment.setVariableValue(var, chooseRuleExecutionEnvironment.getVariableValue(var));
+				 
+				 return result;

+				/* ***********************************************************

+				 * The only difference to ForAllRule!!!!!!!!!!!!!!!!!!!!!!!!!

+				 *

+				 * THIS RETURNS ON THE FIRST MATCH!	

+				/* ***********************************************************/

+			}

+			//TODO: Akos Horvath check that this changed value back rewriter is required!
+			chooseRuleExecutionEnvironment.onTerminate();
+			for(Variable var :executionEnvironment.getVariableValues().keySet())
+				executionEnvironment.setVariableValue(var, chooseRuleExecutionEnvironment.getVariableValue(var));
+		 

+		}

+		return Boolean.FALSE;

+	}		

+	

+	private Boolean interpretChooseRulewithGTRule(IExecutionEnvironment executionEnvironment, ChooseRule chooseBlockRule, IProgressReport pr) 
+		throws ViatraTransformationException{

+		

+		//CHOOSE with GTRULE

+		HashMap<Variable, Scope> parameterParameterScopes = new HashMap<Variable, Scope>();

+		GTRule gtRule = (chooseBlockRule.getGtrule()).getRule();

+		//Collection<IMatching> lHSmatches;

+		// Needs a new Exec.env. for the ***DO*** part of the rule

+		BlockRuleExecutionEnvironment chooseRuleExecutionEnvironment = 
+			BlockRuleInterpreterHelper.getNewExecutionEnvironment(executionEnvironment, chooseBlockRule);

+

+		// New GTEXEC. env. for the action part of the gtRule 

+		IExecutionEnvironment gtEnvironment= new BlockRuleExecutionEnvironment(executionEnvironment.getFramework());

+		

+		// get scopes for the gtRule

+		parameterParameterScopes = BlockRuleInterpreterHelper.getScopesFromContainmentConstraints(chooseRuleExecutionEnvironment 

+				, chooseBlockRule);

+	

+		// get matcher parameters

+		PatternMatcherParameters mp=BlockRuleInterpreterHelper.getGTRuleMatchParameters(chooseRuleExecutionEnvironment 

+				,chooseBlockRule

+				, parameterParameterScopes

+				, gtRule

+				, chooseBlockRule.getGtrule());

+		

+		// Get patternMatcher

+		IGTRuleMatcher gtMatcher;

+		

+		// get matches

+		Object[] match;

+		try {

+			gtMatcher = PatternMatcherProvider.getInstance().getGtRuleMatcher(gtEnvironment,gtRule,mp);

+			match = gtMatcher.match(mp.getCallSignature(), mp.getInputMapping());

+			} catch (ViatraTransformationException e1) {
+				throw e1.addNewStackElement(chooseBlockRule);

+			}

+		//Bind the variable for the Do part of the rule

+		if(match != null)

+		{

+			Boolean result= BlockRuleInterpreterHelper.evaulateDoPartofGTRuleInvocation(gtRule

+					, match

+					, chooseBlockRule

+					, chooseRuleExecutionEnvironment
+					,chooseBlockRule.getGtrule(),pr);

+		//*************************************************/

+			// writes the changed values back

+			chooseRuleExecutionEnvironment.onTerminate();

+			for(Variable var :executionEnvironment.getVariableValues().keySet())

+				executionEnvironment.setVariableValue(var, chooseRuleExecutionEnvironment.getVariableValue(var));

+		//*************************************************/	

+			return result;

+		}

+		else // there is no match found, choose rule fails

+			return Boolean.FALSE;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/BlockRuleInterpreterHelper.java b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/BlockRuleInterpreterHelper.java
new file mode 100644
index 0000000..383955b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/BlockRuleInterpreterHelper.java
@@ -0,0 +1,587 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2011 Akos Horvath and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Akos Horvath - initial API and implementation

+ *******************************************************************************/

+

+

+package org.eclipse.viatra2.gtasm.interpreter.impl.rules;

+

+import java.util.ArrayList;

+import java.util.Collection;

+import java.util.Collections;

+import java.util.Comparator;

+import java.util.HashMap;

+import java.util.Hashtable;

+import java.util.Map;

+

+import org.eclipse.emf.common.util.EList;

+import org.eclipse.viatra2.core.IEntity;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.gtasm.interpreter.exception.ASMInterpreterErrorStrings;

+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;

+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;

+import org.eclipse.viatra2.gtasm.interpreter.impl.executionEnvironment.BlockRuleExecutionEnvironment;

+import org.eclipse.viatra2.gtasm.interpreter.impl.machine.ASMInterpreterException;

+import org.eclipse.viatra2.gtasm.interpreter.term.rules.TermEvaluator;

+import org.eclipse.viatra2.gtasm.patternmatcher.ExecutionMode;

+import org.eclipse.viatra2.gtasm.patternmatcher.IMatching;

+import org.eclipse.viatra2.gtasm.patternmatcher.ParameterMode;

+import org.eclipse.viatra2.gtasm.patternmatcher.PatternCallSignature;

+import org.eclipse.viatra2.gtasm.patternmatcher.PatternMatcherParameters;

+import org.eclipse.viatra2.gtasm.patternmatcher.Scope;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.BlockRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ForallRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DirectionKind;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;

+import org.eclipse.viatra2.interpreters.IProgressReport;

+

+/** Contains all the helper methods for the Block rule interpretation

+ * @author Akos Horvath

+ *

+ */

+public abstract class BlockRuleInterpreterHelper {

+

+	/** Returns the transformed scope constraints of a GT pattern or GT rule invocation

+	 * @param executionEnvironment The execution environment on which the elements are evaluated

+	 * @param containmentConstraints The constraints of the invocations

+	 * @return The variable and the corresponding Scope in a HashMap

+	 * @throws ViatraTransformationException

+	 */

+	static HashMap<Variable,Scope> getScopesFromContainmentConstraints(IExecutionEnvironment executionEnvironment

+			,CollectionIteratorRule rule) throws ViatraTransformationException

+	{

+		EList<ContainmentConstraint> containmentConstraints = rule.getContainmentConstraints();

+		HashMap<Variable,Scope> parameterScopes = new HashMap<Variable,Scope>();

+		for (Object cC: containmentConstraints) {

+			ContainmentConstraint containmentConstraint = (ContainmentConstraint) cC;

+			if(containmentConstraint.getParent()!=null)

+			{

+				Object constraintParent = TermEvaluator.getInstance().evaluate(executionEnvironment, containmentConstraint.getParent());

+						if(constraintParent instanceof IEntity)

+						{

+							parameterScopes .put((containmentConstraint).getVariable(),

+								new Scope( containmentConstraint.getMode().getValue(),

+										(IModelElement)(TermEvaluator.getInstance().evaluate(executionEnvironment, containmentConstraint.getParent() ))));

+						}

+						else

+						{

+							// Scope parent!= ENTITY, the element the scope references does not exist

+							String[] context = {containmentConstraint.getVariable().getName()};

+							ViatraTransformationException e = new ASMInterpreterException(ASMInterpreterErrorStrings.SCOPE_NOT_AN_ENTITY

+									,context

+									,containmentConstraint.getVariable());

+							throw e.addNewStackElement(rule);

+						}

+			}

+			else

+				parameterScopes .put(containmentConstraint.getVariable(), new Scope());

+		}

+		return parameterScopes;

+	}

+

+	/** Evaluates the do part of the GT Rule if it exists

+	 * @param gtRule The GTRule invoked

+	 * @param match The matching produced by the application of the GT rule

+	 * @param blockRule the block rule representing the DO part

+	 * @param blockRuleExecutionEnvironment the corresponding execution environment on which we the TERMS evaluated

+	 * @param ruleInvocation the actual gtRule invocation

+	 * @return true if it is successfully evaluated (or no DO part) else false

+	 * @throws ViatraTransformationException

+	 */

+	static boolean evaulateDoPartofGTRuleInvocation(GTRule gtRule

+			, Object[] match

+			, BlockRule blockRule

+			, IExecutionEnvironment blockRuleExecutionEnvironment

+			, GTRuleInvocation ruleInvocation

+			, IProgressReport pr)

+	throws ViatraTransformationException

+	{

+

+	// the block rule does not have a do part

+	if(blockRule.getBody() == null)

+		return Boolean.TRUE;

+

+	GTRuleInvocation gtRuleInvocation = ((CollectionIteratorRule) blockRule).getGtrule();

+

+		for (int i=0;i<gtRule.getSymParameters().size();i++) {

+			//Only OUT and INOUT parameters have to be updated

+			if(!(gtRule.getSymParameters().get(i)).getDirection().equals(DirectionKind.IN_LITERAL) )

+			{

+				if(match[i].equals(ValueKind.UNDEF_LITERAL))

+					//have to check that it is not a quantified variable

+					{

+					Object ActualTerm = ruleInvocation.getActualParameters().get(i);

+					if(!(ActualTerm instanceof VariableReference

+							// the CollectionIterator rule's actual parameter

+							&& ((CollectionIteratorRule)blockRule).getLocalVariables().contains(((VariableReference)ActualTerm).getVariable())))

+						{

+						String[] context = {(gtRule.getSymParameters().get(i)).getName(), gtRule.getName()};

+						throw new ASMInterpreterException(ASMInterpreterErrorStrings.GTOUTPUT_IN_INOUT_NOT_BOUND

+								,context

+								,blockRule);

+						}

+					}

+//				else

+//					throw new ASMInterpreterException(((SymbolicRuleParameter)gtRule.getSymParameters().get(i)).getName()+ASMInterpreterErrorStrings.GTOUTPUT_IN_INOUT_NOT_BOUND+gtRule.getName(),blockRule);

+//				//have to check that an input parameter is not changed during the execution of the GTRule

+//				if(!match[i]

+//						.equals(

+//								blockRuleExecutionEnvironment.getTermEvaluator().evaluate(blockRuleExecutionEnvironment

+//										,(Term)((CollectionIteratorRule)blockRule).getGtrule().getActualParameters().get(i))) )

+//				{

+//					ViatraTransformationException e = new ASMInterpreterException(ASMInterpreterErrorStrings.GTIN_OUTDIFFERENCE,(GTASMElement)chooseBlockRule.getGtrule().getActualParameters().get(i));

+//					e.addNewStackElement(blockRule);

+//					throw e;

+//				}

+			}

+//			else

+			//INOUT or OUT parameter has to be changed

+//			if(!((SymbolicRuleParameter)gtRule.getSymParameters().get(i)).getDirection().equals(DirectionKind.IN_LITERAL))

+//			{

+

+

+

+			try {

+				if(gtRuleInvocation.getActualParameters().get(i) instanceof VariableReference)

+					{

+					Variable variable = ((VariableReference)(gtRuleInvocation).getActualParameters().get(i)).getVariable();

+

+					blockRuleExecutionEnvironment.

+						setVariableValue(

+							variable,

+							match[i]);

+					}

+				} catch (ViatraTransformationException e) {

+					String n = "";

+					if(gtRuleInvocation.getActualParameters().get(i) instanceof VariableReference)

+						n = ((VariableReference)(gtRuleInvocation).getActualParameters().get(i)).getVariable().getName();

+					String[] context = {n,e.getMessage()};

+					throw new ASMInterpreterException(

+							blockRule instanceof ForallRule?ASMInterpreterErrorStrings.RULE_INIT_VAR_FORALL:ASMInterpreterErrorStrings.RULE_INIT_VAR_CHOOSE

+							,context

+							,blockRule);

+				}

+//			}

+		}

+	return RuleInterpreter.getInstance().interpretRule(blockRuleExecutionEnvironment,blockRule.getBody(),pr);

+	}

+

+

+

+	/** Returns the appropriate parameters for the GTRUleMatcher invocation.

+	 * @param executionEnvironment The environment in which the terms will be evaluated

+	 * @param ruleToBeInterpreted the Block rule containing the GT rule invocation

+	 * @param parameterScopes Scope parameters for the quantified variables

+	 * @param gtRule the invoked GT rule

+	 * @param invocation the GT rule invocation rule

+	 * @return

+	 * @throws ViatraTransformationException

+	 */

+	static PatternMatcherParameters getGTRuleMatchParameters(IExecutionEnvironment executionEnvironment

+			, CollectionIteratorRule ruleToBeInterpreted

+			, Map<Variable,Scope> parameterScopes

+			, GTRule gtRule

+			, GTRuleInvocation invocation)

+	throws ViatraTransformationException

+	{

+

+		Object[] patternParams = new Object[invocation.getActualParameters().size()];

+		Integer[] quantificationOrder=new Integer[invocation.getActualParameters().size()];

+		PatternCallSignature[] patternCallSignatures=new PatternCallSignature[invocation.getActualParameters().size()];

+//		quantification order in case of forall rule

+		int outerVariableCounterForQuantificationOrder=(ruleToBeInterpreted).getLocalVariables().size();

+		int localVariableCounterForQuantificationOrder=0;

+

+

+		for (int i = 0 ; i< invocation.getActualParameters().size(); i++) {

+			Object ActualTerm = invocation.getActualParameters().get(i);

+			SymbolicRuleParameter symParam = gtRule.getSymParameters().get(i);

+			PatternCallSignature pcs=new PatternCallSignature();

+			// the value of the actual parameter

+			patternParams[i] = TermEvaluator.getInstance().evaluate(executionEnvironment , (Term)ActualTerm);

+

+			/************* Execution mode handling*********************/

+			if( ActualTerm instanceof VariableReference

+				// the CollectionIterator rule's actual parameter

+				&& (ruleToBeInterpreted).getLocalVariables().contains(((VariableReference)ActualTerm).getVariable()))

+				{

+					if( ruleToBeInterpreted instanceof ForallRule)

+						pcs.setExecutionMode(ExecutionMode.MULTIPLE_RESULTS);

+					else

+						pcs.setExecutionMode(ExecutionMode.SINGLE_RESULT);

+					//	pcs.setParameterMode(ParameterMode.OUTPUT);	//the variable is quantified by the BlockRule

+					// checks that the quantified variable is a parameter of the LHS, if not exception

+					boolean isQuantifiedVariableinLHS = false;

+					for(int j = 0; j< gtRule.getPrecondition().getActualParameters().size(); j++){

+						if(((VariableReference)gtRule.getPrecondition().getActualParameters().get(j)).getVariable().equals(symParam.getVariable()))

+							isQuantifiedVariableinLHS = true;

+						}

+					if(!isQuantifiedVariableinLHS)

+						{

+						String[] context = {((VariableReference)ActualTerm).getVariable().getName(),gtRule.getName()};

+						ViatraTransformationException e = new ASMInterpreterException(

+								ASMInterpreterErrorStrings.GTINPUT_QUANTIFIED_NOTIN_LHS

+								,context

+								,gtRule);

+						throw e.addNewStackElement(ruleToBeInterpreted);

+						}

+				}

+			else

+				{

+				pcs.setExecutionMode(ExecutionMode.SINGLE_RESULT);

+				}

+			/************* Input / Output parameter handling*********************/

+			if(symParam.getDirection().equals(DirectionKind.IN_LITERAL))	//INPUT

+				{	if((patternParams[i]==null

+							|| ValueKind.UNDEF_LITERAL.equals(patternParams[i])))

+						{

+							String[] context = {symParam.getVariable().getName(),gtRule.getName()};

+							ViatraTransformationException e  = new ASMInterpreterException(ASMInterpreterErrorStrings.GTINPUT_IN

+									,context

+									,gtRule);

+							throw e.addNewStackElement(ruleToBeInterpreted);

+						}

+					else

+							pcs.setParameterMode(ParameterMode.INPUT);

+				}

+			else

+			if(symParam.getDirection().equals(DirectionKind.OUT_LITERAL))		//OUTPUT

+				{

+					if(ActualTerm instanceof VariableReference)

+					{	pcs.setParameterMode(ParameterMode.OUTPUT);

+						patternParams[i] = ValueKind.UNDEF_LITERAL;

+					}

+					else // an OUT parameter is not a Vairable -> throws exception as it is not allowed

+					{

+						String[] context = {symParam.getVariable().getName(),gtRule.getName()};

+						ViatraTransformationException e  = new ASMInterpreterException(ASMInterpreterErrorStrings.GTINPUT_OUT

+								,context

+								,gtRule);

+						throw e.addNewStackElement(ruleToBeInterpreted);

+					}

+					//if((patternParams[i]==null

+					//		|| ValueKind.UNDEF_LITERAL.equals(patternParams[i])))

+						//else

+				//		{

+						//if(pcs.getParameterMode() == null) // Its is a quantificated variable if paramterMode != null

+					//		{

+						//log.warning(symParam.getName()+" is an OUTPUT parameter but has a value at the invocation of the ");

+								//GTASMException e = new ASMInterpreterException(symParam.getVariable().getName()+ASMInterpreterErrorStrings.GTINPUT_OUT+gtRule.getName()+" gt rule.",gtRule);

+								//throw e.addNewStackElement(ruleToBeInterpreted);

+					//		}

+				//		}

+				}

+			else

+			//if(symParam.getDirection().equals(DirectionKind.INOUT_LITERAL))		//INOUT

+					{

+				// in and inout parameter has to have an input value!

+				if((patternParams[i]==null

+						|| ValueKind.UNDEF_LITERAL.equals(patternParams[i])))

+						{

+						String[] context = {symParam.getVariable().getName(),gtRule.getName()};

+						ViatraTransformationException e  = new ASMInterpreterException(ASMInterpreterErrorStrings.GTINPUT_IN

+								,context

+								,gtRule);

+						throw e.addNewStackElement(ruleToBeInterpreted);

+						}

+				else

+						pcs.setParameterMode(ParameterMode.INPUT);

+					}

+			/************* Scope of the parameters handling*********************/

+			if(ActualTerm instanceof VariableReference) // variable type element can be in the scope order

+			{

+				if(parameterScopes.containsKey(((VariableReference)ActualTerm).getVariable()))

+					pcs.setParameterScope(parameterScopes.get(((VariableReference)ActualTerm).getVariable()));

+				else

+					pcs.setParameterScope(new Scope());

+			}

+			else	//node varibaleReference type input parameter

+			{

+				pcs.setParameterScope(new Scope());

+			}

+			/************* Quantification order in case of forall rule*********************/

+			if(ruleToBeInterpreted instanceof ForallRule)

+				if(ActualTerm instanceof VariableReference)

+					{

+						if(((ruleToBeInterpreted).getLocalVariables().indexOf(((VariableReference)ActualTerm).getVariable()))==-1)

+						{

+							// an error occured, there is a variable which is quanitified by the BlockRule but not used in the GT rule

+							if(invocation.getActualParameters().size() == outerVariableCounterForQuantificationOrder)

+								getNoneUsedVariable(ruleToBeInterpreted);

+

+							quantificationOrder[outerVariableCounterForQuantificationOrder]=i;

+							outerVariableCounterForQuantificationOrder++;

+						}

+						else

+						{

+						quantificationOrder[((ruleToBeInterpreted).getLocalVariables().indexOf(((VariableReference)ActualTerm).getVariable()))]= i;

+						localVariableCounterForQuantificationOrder++;

+						}

+					}

+				else

+					{

+					//error a variable is not quantified varibale

+					if(invocation.getActualParameters().size() == outerVariableCounterForQuantificationOrder)

+						getNoneUsedVariable(ruleToBeInterpreted);

+

+					quantificationOrder[outerVariableCounterForQuantificationOrder]=i;

+					outerVariableCounterForQuantificationOrder++;

+					}

+		// the signature is assigned to the array

+		patternCallSignatures[i]=pcs;

+		}

+	return new PatternMatcherParameters(patternCallSignatures,patternParams,quantificationOrder);

+	}

+

+	/** Evaluates which parameter is quantified but not used in the (GT rule or pattern) invocation

+	 * @param ruleToBeInterpreted the Block rule which invokes the Pattern or GT rule

+	 * @throws ViatraTransformationException

+	 */

+	static void getNoneUsedVariable(CollectionIteratorRule ruleToBeInterpreted)

+	throws ViatraTransformationException{

+	//Called from a gtPattern or a gtRule

+	String name = (ruleToBeInterpreted).getCondition() instanceof GTPatternCall?

+				((GTPatternCall)(ruleToBeInterpreted).getCondition()).getCalledPattern().getName()+ " pattern"

+				:(ruleToBeInterpreted).getGtrule().getRule().getName() + " GT Rule";

+

+	EList<Term> actualParamater = (ruleToBeInterpreted).getCondition() instanceof GTPatternCall?

+				((GTPatternCall)(ruleToBeInterpreted).getCondition()).getActualParameters()

+				:(ruleToBeInterpreted).getGtrule().getActualParameters();

+

+	for(int j=0; j< ruleToBeInterpreted.getLocalVariables().size(); j++)

+		{// search for the errorfull variable

+		Variable locVar = ruleToBeInterpreted.getLocalVariables().get(j);

+		boolean usedInRule = false;

+		for(int k = 0; k < actualParamater.size(); k++)

+			{//if it is used in the gtRule then the usedInRule is set to true

+			if(actualParamater.get(k) instanceof VariableReference

+					&& ((VariableReference)actualParamater.get(k)).getVariable().equals(locVar))

+				usedInRule = true;

+			}

+		if(!usedInRule) //we have the errorful variable

+			{

+			String[] context = {locVar.getName(),name };

+			throw new ASMInterpreterException(ASMInterpreterErrorStrings.BLOCKRULE_PARAMS_NOT_USED

+					,context

+					,ruleToBeInterpreted);

+			}

+		}

+

+		String[] context = {name};

+		throw new ASMInterpreterException(ASMInterpreterErrorStrings.FATAL_ERROR

+				,context

+				,ruleToBeInterpreted);

+

+	}

+

+	/** Returns the appropriate parameters for the PatternMatcher invocation

+	 * @param executionEnvironment the execution environment of the invocation context

+	 * @param ruleToBeInterpreted the choose/forall rule that is invoked

+	 * @param parameterScopes the scope of the parameters

+	 * @return the parameters of the rule

+	 * @throws ViatraTransformationException

+	 */

+	static PatternMatcherParameters getMatchParameters(IExecutionEnvironment executionEnvironment

+			, CollectionIteratorRule ruleToBeInterpreted

+			, Map<Variable,Scope> parameterScopes)

+	throws ViatraTransformationException

+	{

+		CollectionIteratorRule iteratorBlockRule = (ruleToBeInterpreted);

+		int paramSize = ((GTPatternCall)iteratorBlockRule.getCondition()).getActualParameters().size();

+		//a quantified variable is not used

+		if(paramSize < iteratorBlockRule.getLocalVariables().size())

+			getNoneUsedVariable(ruleToBeInterpreted);

+

+		Object[] patternParams = new Object[paramSize];

+		Integer[] quantificationOrder=new Integer[paramSize];

+		PatternCallSignature[] patternCallSignatures=new PatternCallSignature[paramSize];

+		int outerVariableCounterForQuantificationOrder=iteratorBlockRule.getLocalVariables().size();

+		int localVariableCounterForQuantificationOrder=0;

+

+	//for (Object term : ((GTPatternCall)((CollectionIteratorRule)ruleToBeInterpreted).getCondition()).getActualParameters()) {

+		for (int i = 0 ; i< paramSize; i++) {

+			Object ActualTerm = ((GTPatternCall)iteratorBlockRule.getCondition()).getActualParameters().get(i);

+

+			PatternCallSignature pcs=new PatternCallSignature();

+			patternParams[i] = TermEvaluator.getInstance().evaluate(executionEnvironment , (Term)ActualTerm);

+

+			/************* Execution mode handling*********************/

+			if((Term)ActualTerm instanceof VariableReference

+					&& ruleToBeInterpreted instanceof ForallRule

+					&& iteratorBlockRule.getLocalVariables().contains(((VariableReference)ActualTerm).getVariable()))

+				pcs.setExecutionMode(ExecutionMode.MULTIPLE_RESULTS);

+			else

+				pcs.setExecutionMode(ExecutionMode.SINGLE_RESULT);

+

+			/************* Input / Output parameter handling*********************/

+			if(patternParams[i]==null||ValueKind.UNDEF_LITERAL.equals(patternParams[i]))

+				{

+				if((Term)ActualTerm instanceof VariableReference

+						&& iteratorBlockRule.getLocalVariables().contains(((VariableReference)ActualTerm).getVariable()))

+						pcs.setParameterMode(ParameterMode.OUTPUT);

+				else

+					{

+					String[] context = {""+i};

+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.BLOCKRULE_PARAM_NOT_QUANTIFIED

+							,context

+							,iteratorBlockRule);

+					}

+				}

+			else

+				pcs.setParameterMode(ParameterMode.INPUT);

+

+			/************* Scope of the parameters handling*********************/

+			if(ActualTerm instanceof VariableReference)

+			{	Variable variable = ((VariableReference)ActualTerm).getVariable();

+				if(parameterScopes.containsKey(variable))

+					pcs.setParameterScope(parameterScopes.get(variable));

+				else

+					pcs.setParameterScope(new Scope());

+			}

+			else

+			{

+				pcs.setParameterScope(new Scope());

+			}

+

+			patternCallSignatures[i]=pcs;

+			/************* Quantification order in case of forall rule*********************/

+			if(ruleToBeInterpreted instanceof ForallRule)

+				if(ActualTerm instanceof VariableReference)

+				{ Variable variable = ((VariableReference)ActualTerm).getVariable();

+					//is it a variable which is quantified

+					if(iteratorBlockRule.getLocalVariables().indexOf(variable)==-1)

+					{

+						//an error occured, there is a variable which is quanitificated by the BlockRule but not used in the GT pattern. Throws ViatraTransformationException

+						if(paramSize == outerVariableCounterForQuantificationOrder)

+							getNoneUsedVariable(ruleToBeInterpreted);

+

+						quantificationOrder[outerVariableCounterForQuantificationOrder]=i;

+						outerVariableCounterForQuantificationOrder++;

+					}

+					else

+					{

+					quantificationOrder[iteratorBlockRule .getLocalVariables().indexOf(variable)]= i;

+					localVariableCounterForQuantificationOrder++;

+					}

+				}

+			else

+				{

+				quantificationOrder[outerVariableCounterForQuantificationOrder]=i;

+				outerVariableCounterForQuantificationOrder++;

+				}

+		}// end of for cycle

+		return new PatternMatcherParameters(patternCallSignatures,patternParams,quantificationOrder);

+	}

+

+	/** Creates a new execution environment for a CollectionIterator rule

+	 * @param executionEnvironment the parent execution environment

+	 * @param ruleToBeInterpreted the CollectionIterator rule

+	 * @return new execution environment, where parent = executionEnviroment

+	 */

+	static BlockRuleExecutionEnvironment getNewExecutionEnvironment(IExecutionEnvironment executionEnvironment,CollectionIteratorRule ruleToBeInterpreted)

+	{

+		// Needs a new Exec.env. for the new Variables.

+		BlockRuleExecutionEnvironment forallRuleExecutionEnvironment =

+			new BlockRuleExecutionEnvironment(executionEnvironment.getFramework(),ruleToBeInterpreted.getBody());

+		Map<Variable, Object> variables = new Hashtable<Variable, Object>(executionEnvironment.getVariableValues());

+		for (Object variable : ruleToBeInterpreted.getLocalVariables()) {

+			variables.put((Variable)variable, ValueKind.UNDEF_LITERAL);

+		}

+		forallRuleExecutionEnvironment.onBegin(variables);

+		return forallRuleExecutionEnvironment;

+	}

+

+	/**

+	 * Reorders the matches of the pattern according to the ordering settings, if specified.

+	 *

+	 * @param gtPattern the pattern that was matched

+	 * @param matches the already retrieved matches of the pattern

+	 * @return the reordered matches, or the original collection if no ordering was specified

+	 */

+	@SuppressWarnings("unchecked")

+	static Collection<IMatching> reorder(GTPattern gtPattern, Collection<IMatching> matches) {

+		// is ordering required?

+		Integer orderColoumn = null;

+		boolean orderDesc = false;

+		String orderType = "string";

+		for (Object annot : gtPattern.getRuntimeAnnotations()) {

+			RuntimeAnnotation annot2 = (RuntimeAnnotation) annot;

+			if ("@orderby".equals(annot2.getAnnotationName().toLowerCase())) {

+				for (Object oRel: annot2.getElements()) {

+					RuntimeAnnotationElement rel = (RuntimeAnnotationElement)oRel;

+					if ("col".equals(rel.getKey().toLowerCase())) {

+						try {

+							orderColoumn = Integer.parseInt(rel.getValue());

+						} catch (NumberFormatException ex) {

+							//throw new ASMInterpreterException("", , forallGTPatternCall);

+						}

+					}

+					else if ("order".equals(rel.getKey().toLowerCase()) && "desc".equals(rel.getValue().toLowerCase()))

+						orderDesc = true;

+					else if ("type".equals(rel.getKey().toLowerCase()))

+						orderType = rel.getValue().toLowerCase();

+				}

+				break;

+			}

+		}

+		// if yes, do the ordering

+		if (orderColoumn !=null)

+		{

+			final boolean desc = orderDesc;

+			final Map<IMatching, Comparable> keys = new HashMap<IMatching, Comparable>();

+			for (IMatching match : matches) {

+				Object col = match.lookup(orderColoumn);

+				Comparable key = null;

+				if (col!=null) {

+					if (col instanceof IEntity) {

+						if ("name".equals(orderType)) key = ((IModelElement)col).getName();

+						else if ("name-nocase".equals(orderType)) key = ((IModelElement)col).getName().toLowerCase();

+						else if ("fqn".equals(orderType)) key = ((IModelElement)col).getFullyQualifiedName();

+						else if ("fqn-nocase".equals(orderType)) key = ((IModelElement)col).getFullyQualifiedName().toLowerCase();

+						else {

+							String value = ((IEntity)col).getValue();

+							if ("double".equals(orderType)) key = Double.parseDouble(value);

+							else if ("integer".equals(orderType)) key = Integer.parseInt(value);

+							else if ("nocase".equals(orderType)) key = value.toLowerCase();

+							else if ("value-nocase".equals(orderType)) key = value.toLowerCase();

+							else key = value;

+						}

+					} else if (col instanceof Comparable)

+						key = (Comparable) col;

+					else key = col.toString();

+				}

+				keys.put(match, key);

+			}

+			ArrayList<IMatching> matchList = new ArrayList<IMatching>(matches);

+			Collections.sort(matchList, new Comparator<IMatching>() {

+				@Override

+				public int compare(IMatching o1, IMatching o2) {

+					int compareResult = keys.get(o1).compareTo(keys.get(o2));

+					return desc ? -compareResult : compareResult;

+				}

+			});

+			matches = matchList;

+		}

+		return matches;

+	}

+

+

+}

diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/ConditionalRuleInterpreter.java b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/ConditionalRuleInterpreter.java
new file mode 100644
index 0000000..a387bb9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/ConditionalRuleInterpreter.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.impl.rules;

+

+
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.term.rules.TermEvaluator;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry;

+import org.eclipse.viatra2.interpreters.IProgressReport;

+

+

+public class ConditionalRuleInterpreter extends RuleInterpreter {

+

+	private static ConditionalRuleInterpreter _instance = new ConditionalRuleInterpreter();

+

+	private ConditionalRuleInterpreter() {

+		;

+	}

+

+	public static ConditionalRuleInterpreter getInstance() {

+		return _instance;

+	}

+

+	public Boolean interpretRule(IExecutionEnvironment executionEnvironment,

+			ASMRuleInvocation ruleToBeInterpreted, IProgressReport pr)

+			throws ViatraTransformationException {

+

+		Boolean condition = null;

+

+		/*

+		 * This long line is a concise form of determining whether the rule is

+		 * an if or a try type rule. In case it is an if type, the condition

+		 * term is evaluated, in the other case, the rule is interpreted.

+		 * Thereafter the appropriate rule is interpreted.

+		 */

+

+		condition = (ruleToBeInterpreted instanceof ConditionalRuleIf) ? (TermEvaluator.getInstance().evaluate(

+						executionEnvironment,

+						((ConditionalRuleIf) ruleToBeInterpreted)

+								.getExpressionToTest()).equals(Boolean.TRUE))

+				: (RuleInterpreter.getInstance().interpretRule(

+						executionEnvironment,

+						((ConditionalRuleTry) ruleToBeInterpreted)

+								.getRuleToTry(),pr));

+

+		if (condition.equals(Boolean.TRUE)) {

+			return (ruleToBeInterpreted instanceof ConditionalRuleIf) ? 

+					(RuleInterpreter.getInstance().interpretRule(executionEnvironment,

+					((ConditionalRuleIf) ruleToBeInterpreted).getRuleTrue(),pr))

+					: Boolean.TRUE;

+		} else {

+			ASMRuleInvocation elseRule = (ruleToBeInterpreted instanceof ConditionalRuleIf) ? (((ConditionalRuleIf) ruleToBeInterpreted)

+					.getRuleFalse())

+					: (((ConditionalRuleTry) ruleToBeInterpreted).getRuleElse());

+

+			if (elseRule == null)

+				return Boolean.TRUE;

+

+			return RuleInterpreter.getInstance().interpretRule(

+					executionEnvironment, elseRule,pr);

+		}

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/ModelManipulationRuleInterpreter.java b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/ModelManipulationRuleInterpreter.java
new file mode 100644
index 0000000..84c6c31
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/ModelManipulationRuleInterpreter.java
@@ -0,0 +1,1081 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.impl.rules;

+

+
+import org.eclipse.viatra2.core.EDeleteSemantics;
+import org.eclipse.viatra2.core.EMultiplicityKind;
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ASMInterpreterErrorStrings;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.impl.machine.ASMInterpreterException;
+import org.eclipse.viatra2.gtasm.interpreter.term.rules.TermEvaluator;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.CopySemantics;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DeleteSemantics;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.LogLevel;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.MultiplicityKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateInstanceOf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateSupertypeOf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.EntityCreateRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteInstanceOf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteSupertypeOf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.RenameRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAggregationRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnySourceRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnyTargetRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetInverseRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetMultiplicityRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationFrom;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationTo;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetValueRule;
+import org.eclipse.viatra2.interpreters.IProgressReport;
+

+

+public class ModelManipulationRuleInterpreter extends RuleInterpreter {

+	private static ModelManipulationRuleInterpreter _instance = new ModelManipulationRuleInterpreter();

+

+	private ModelManipulationRuleInterpreter() {

+		;

+	}

+	

+	public static ModelManipulationRuleInterpreter getInstance() {

+		return _instance; 

+	} 

+/**

+ * The current class encapsulates all model manipulation org.eclipse.viatra2.gtasm.interpreter.impl.rules.

+ * 

+ * @author: Pasztor Peter, Akos Horvath

+ * @see org.eclipse.viatra2.gtasm.interpreter.impl.rules.RuleInterpreter#interpretRule(org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment, org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation)

+ */

+	

+	@Override
+	public Boolean interpretRule(IExecutionEnvironment executionEnvironment, ASMRuleInvocation ruleToBeInterpreted, IProgressReport pr)
+		throws ViatraTransformationException

+	{ 
+	IModelManager manager = executionEnvironment.getFramework().getTopmodel().getModelManager();

+	TermEvaluator termEvaluator = TermEvaluator.getInstance();

+		

+	if(ruleToBeInterpreted instanceof RenameRule)

+		{

+			

+			Object name=(termEvaluator.evaluate(executionEnvironment, ((RenameRule)ruleToBeInterpreted).getValue()));

+							

+			if(ValueKind.UNDEF_LITERAL.equals(name))

+				{
+				String[] context = {"Name", ruleToBeInterpreted.getName()};

+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+						,context
+						,ruleToBeInterpreted);

+				}

+			if(name instanceof String)

+				{

+				

+				Object modelElement=(termEvaluator.evaluate(executionEnvironment,

+						((RenameRule)ruleToBeInterpreted).getElement()));

+				if(ValueKind.UNDEF_LITERAL.equals(modelElement))
+					{

+					String[] context = {"ModelElement", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);

+					}

+				if(modelElement instanceof IModelElement)

+					{

+						try {

+							manager.setName((IModelElement)modelElement,(String)name);

+							return Boolean.TRUE;

+						} catch (VPMCoreException e) {

+							String[] context = {e.getMessage()};
+							throw new ASMInterpreterException(ASMInterpreterErrorStrings.VPM_CORE
+									,context
+									,ruleToBeInterpreted);

+						}

+						

+					}

+				else {
+					String[] context = {"ModelElement","ModelElementToSet",ruleToBeInterpreted.getName(),convertToJavaType(modelElement)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+							,context
+							,ruleToBeInterpreted);
+					}

+				}

+			else 
+				{
+				String[] context = {"String","Name",ruleToBeInterpreted.getName(),convertToJavaType(name)};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+				}

+			

+		}

+		else if(ruleToBeInterpreted instanceof SetValueRule)

+		{

+			Object value=(termEvaluator.evaluate(executionEnvironment, ((SetRule)ruleToBeInterpreted).getValue()));

+
+			if(ValueKind.UNDEF_LITERAL.equals(value))
+				{
+				String[] context = {"Value", ruleToBeInterpreted.getName()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+						,context
+						,ruleToBeInterpreted);
+				}
+			

+			if(!(value instanceof String || value instanceof Integer || value instanceof Double))

+				{

+					String[] context = {"String","Value",ruleToBeInterpreted.getName(),convertToJavaType(value)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+							,context
+							,ruleToBeInterpreted);

+				}

+			

+			Object modelElement=(termEvaluator.evaluate(executionEnvironment, ((SetRule)ruleToBeInterpreted).getElement()));

+			if(modelElement instanceof IEntity)

+				{

+					try {

+						manager.setValue((IEntity)modelElement,	value.toString());

+						return Boolean.TRUE;

+					} catch (VPMCoreException e) {

+						String[] context = {e.getMessage()};
+						throw new ASMInterpreterException(ASMInterpreterErrorStrings.VPM_CORE
+								,context
+								,ruleToBeInterpreted);

+					}

+				} 

+			else if(ValueKind.UNDEF_LITERAL.equals(modelElement)) 
+				{
+				String[] context = {"ModelElement", ruleToBeInterpreted.getName()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+						,context
+						,ruleToBeInterpreted);
+				}

+			else
+				{String[] context = {"Entity","EntityToSet",ruleToBeInterpreted.getName(),convertToJavaType(modelElement)};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+				}

+			

+		}

+		//TODO: which is which parameter in the syntax??

+		else if(ruleToBeInterpreted instanceof SetRelationTo)

+		{

+			Object relation = (termEvaluator.evaluate(executionEnvironment, 

+					((SetRule)ruleToBeInterpreted).getElement()));

+			Object modelElement=(termEvaluator.evaluate(executionEnvironment, 

+					((SetRule)ruleToBeInterpreted).getValue()));

+			

+			if(!(relation instanceof IRelation))

+			{

+				if(ValueKind.UNDEF_LITERAL.equals(relation))

+					{
+					String[] context = {"RelationToSet", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}

+				else 
+					{String[] context = {"Relation","RelationToSet",ruleToBeInterpreted.getName(),convertToJavaType(modelElement)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+							,context
+							,ruleToBeInterpreted);
+					}

+			}

+			

+			if(!(modelElement instanceof IModelElement))

+			{

+				if(ValueKind.UNDEF_LITERAL.equals(modelElement))

+					{
+					String[] context = {"To", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}

+				else 
+					{String[] context = {"Entity","To",ruleToBeInterpreted.getName(),convertToJavaType(modelElement)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+							,context
+							,ruleToBeInterpreted);
+					}

+			}

+			

+			try {

+				manager.

+					setRelationTo((IRelation)relation,(IModelElement)modelElement);

+				return Boolean.TRUE;

+			} catch (VPMCoreException e) {

+				String[] context = {e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.VPM_CORE
+						,context
+						,ruleToBeInterpreted);

+			}

+			

+		}

+		else if(ruleToBeInterpreted instanceof SetRelationFrom)

+		{

+			Object relation = (termEvaluator.evaluate(executionEnvironment, 

+					((SetRule)ruleToBeInterpreted).getElement()));

+			Object modelElement=(termEvaluator.evaluate(executionEnvironment, 

+					((SetRule)ruleToBeInterpreted).getValue()));

+			if(!(relation instanceof IRelation))

+			{

+				if(ValueKind.UNDEF_LITERAL.equals(relation))

+					if(ValueKind.UNDEF_LITERAL.equals(relation))
+					{
+					String[] context = {"RelationToSet", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{String[] context = {"Relation","RelationToSet",ruleToBeInterpreted.getName(),convertToJavaType(modelElement)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+							,context
+							,ruleToBeInterpreted);
+					}

+			}

+			

+			if(!(modelElement instanceof IModelElement))

+			{

+				if(ValueKind.UNDEF_LITERAL.equals(modelElement))
+				{
+				String[] context = {"From", ruleToBeInterpreted.getName()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+						,context
+						,ruleToBeInterpreted);
+				}
+			else 
+				{String[] context = {"Entity","From",ruleToBeInterpreted.getName(),convertToJavaType(modelElement)};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+				}

+			}

+

+			try {

+				manager.

+					setRelationFrom((IRelation)relation,(IModelElement)modelElement);

+				return Boolean.TRUE;

+			} catch (VPMCoreException e) {

+				String[] context = {e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.VPM_CORE
+						,context
+						,ruleToBeInterpreted);

+			}

+			

+		}

+		else if(ruleToBeInterpreted instanceof SetMultiplicityRule)

+		{

+			Object relation= termEvaluator.evaluate(executionEnvironment, ((SetRule)ruleToBeInterpreted).getElement());

+			Object multiplicity=termEvaluator.evaluate(executionEnvironment, ((SetRule)ruleToBeInterpreted).getValue());

+

+			if(!(relation instanceof IRelation))

+			{

+				if(ValueKind.UNDEF_LITERAL.equals(relation))

+					{
+					String[] context = {"RelationToSet", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}

+				else 
+					{
+					String[] context = {"Relation","RelationToSet",ruleToBeInterpreted.getName(),convertToJavaType(relation)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}

+			}

+			if(!(multiplicity instanceof MultiplicityKind))

+			{

+				String[] context = {"Multiplicity","MultiplicityTobeSet",ruleToBeInterpreted.getName(),convertToJavaType(multiplicity)};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+					,context
+					,ruleToBeInterpreted);

+			}

+			

+			try {

+				manager.

+					setRelationMultiplicity(((IRelation)relation),(EMultiplicityKind)multiplicity);

+				return Boolean.TRUE;

+			} catch (VPMCoreException e) {

+				String[] context = {e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.VPM_CORE
+						,context
+						,ruleToBeInterpreted);

+			}

+			

+		}

+		else if(ruleToBeInterpreted instanceof SetInverseRule)

+		{

+			Object relation1 = (termEvaluator.evaluate(executionEnvironment, ((SetRule)ruleToBeInterpreted).getElement()));

+			Object relation2 = (termEvaluator.evaluate(executionEnvironment, ((SetRule)ruleToBeInterpreted).getValue()));

+

+			if(!(relation1 instanceof IRelation))

+			{

+				if(ValueKind.UNDEF_LITERAL.equals(relation1))

+					{
+					String[] context = {"RelationToSet", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"Relation","RelationToSet",ruleToBeInterpreted.getName(),convertToJavaType(relation1)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}

+			}

+			if(!(relation2 instanceof IRelation))

+			{

+				if(ValueKind.UNDEF_LITERAL.equals(relation2))

+					{
+					String[] context = {"InverseRelation", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"Relation","InverseRelation",ruleToBeInterpreted.getName(),convertToJavaType(relation2)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}

+			}

+			try {

+

+				manager.

+					setRelationInverse((IRelation)relation1,(IRelation)relation2);

+			} catch (VPMCoreException e) {

+				String[] context = {e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.VPM_CORE
+						,context
+						,ruleToBeInterpreted);

+			}

+			return Boolean.TRUE;

+		}

+		else if(ruleToBeInterpreted instanceof SetAnyTargetRule)

+		{

+			Object relation = (termEvaluator.evaluate(executionEnvironment, ((SetRule)ruleToBeInterpreted).getElement()));

+			Object bool = (termEvaluator.evaluate(executionEnvironment, ((SetRule)ruleToBeInterpreted).getValue()));

+

+			if(!(relation instanceof IRelation))

+			{

+				if(ValueKind.UNDEF_LITERAL.equals(relation))
+					{
+					String[] context = {"RelationToSet", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"Relation","RelationToSet",ruleToBeInterpreted.getName(),convertToJavaType(relation)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}

+			}

+		

+			if(!(bool instanceof Boolean))

+				{

+				if(ValueKind.UNDEF_LITERAL.equals(relation))
+					{
+					String[] context = {"isAnyTarget", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"Boolean","isAnyTarget",ruleToBeInterpreted.getName(),convertToJavaType(relation)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}

+				}

+			

+			try {

+				manager.

+					setIsAnyTo(((IRelation)relation),

+						((Boolean)bool));

+			} catch (VPMCoreException e) {

+				String[] context = {e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.VPM_CORE
+						,context
+						,ruleToBeInterpreted);

+			}

+			return Boolean.TRUE;

+		}

+		else if(ruleToBeInterpreted instanceof SetAnySourceRule)

+		{

+			Object relation = (termEvaluator.evaluate(executionEnvironment, ((SetRule)ruleToBeInterpreted).getElement()));

+			Object bool = (termEvaluator.evaluate(executionEnvironment, ((SetRule)ruleToBeInterpreted).getValue()));

+

+			if(!(relation instanceof IRelation))

+				{

+				if(ValueKind.UNDEF_LITERAL.equals(relation))
+					{
+					String[] context = {"RelationToSet", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"Relation","RelationToSet",ruleToBeInterpreted.getName(),convertToJavaType(relation)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}

+				}

+		

+			if(!(bool instanceof Boolean))

+			{

+				if(ValueKind.UNDEF_LITERAL.equals(relation))
+					{
+					String[] context = {"isAnySource", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"Boolean","isAnySource",ruleToBeInterpreted.getName(),convertToJavaType(relation)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}

+			}

+

+			try {

+				manager.

+					setIsAnyFrom(((IRelation)relation),

+						((Boolean)bool));

+			} catch (VPMCoreException e) {

+				String[] context = {e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.VPM_CORE
+						,context
+						,ruleToBeInterpreted);

+			}

+			return Boolean.TRUE;

+		}

+		else if(ruleToBeInterpreted instanceof SetAggregationRule)

+		{

+			Object relation = (termEvaluator.evaluate(executionEnvironment, ((SetRule)ruleToBeInterpreted).getElement()));

+			Object bool = (termEvaluator.evaluate(executionEnvironment, ((SetRule)ruleToBeInterpreted).getValue()));

+

+			if(!(relation instanceof IRelation))

+			{

+				if(ValueKind.UNDEF_LITERAL.equals(relation))
+					{
+					String[] context = {"RelationToSet", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"Relation","RelationToSet",ruleToBeInterpreted.getName(),convertToJavaType(relation)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}

+			}

+		

+			if(!(bool instanceof Boolean))

+			{

+				if(ValueKind.UNDEF_LITERAL.equals(relation))
+					{
+					String[] context = {"isAggregation", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"Boolean","isAggregation",ruleToBeInterpreted.getName(),convertToJavaType(relation)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}

+			}

+			

+

+			try {

+				manager.

+					setRelationIsAggregation(((IRelation)relation),

+						((Boolean)bool));

+			} catch (VPMCoreException e) {

+				String[] context = {e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.VPM_CORE
+						,context
+						,ruleToBeInterpreted);

+			}

+			return Boolean.TRUE;

+		}

+		/*

+		 * End of SetRules

+		 * 

+		 * 

+		 * 

+		 * 

+		 */

+		else if(ruleToBeInterpreted instanceof CreateSupertypeOf){

+					

+			Object sup = (termEvaluator.evaluate(executionEnvironment, ((CreateSupertypeOf)ruleToBeInterpreted).getSuper()));

+			Object sub = (termEvaluator.evaluate(executionEnvironment, ((CreateSupertypeOf)ruleToBeInterpreted).getSub()));

+			

+			if(!(sup instanceof IModelElement))

+				{

+				if(ValueKind.UNDEF_LITERAL.equals(sup))
+					{
+					String[] context = {"Supertype", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"ModelElement (Entity or Relation)","Supertype",ruleToBeInterpreted.getName(),convertToJavaType(sup)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}

+				}

+			if(!(sub instanceof IModelElement))

+				{

+				if(ValueKind.UNDEF_LITERAL.equals(sub))
+					{
+					String[] context = {"Subtype", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"ModelElement (Entity or Relation)","Subtype",ruleToBeInterpreted.getName(),convertToJavaType(sub)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}

+				}

+			try {

+				manager.

+					newSupertypeOf(((IModelElement)sup), ((IModelElement)sub));

+			} catch (VPMCoreException e) {

+				String[] context = {e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.VPM_CORE
+						,context
+						,ruleToBeInterpreted);

+			}

+			return Boolean.TRUE;

+		}

+		else if(ruleToBeInterpreted instanceof CreateInstanceOf){

+			Object type = (termEvaluator.evaluate(executionEnvironment, ((CreateInstanceOf)ruleToBeInterpreted).getSuper()));

+			Object inst = (termEvaluator.evaluate(executionEnvironment, ((CreateInstanceOf)ruleToBeInterpreted).getSub()));

+			

+			if(!(type instanceof IModelElement))

+			{

+				if(ValueKind.UNDEF_LITERAL.equals(type))
+					{
+					String[] context = {"Type", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"ModelElement (Entity or Relation)","Type",ruleToBeInterpreted.getName(),convertToJavaType(type)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}

+			}

+			if(!(inst instanceof IModelElement))

+			{

+				if(ValueKind.UNDEF_LITERAL.equals(inst))
+					{
+					String[] context = {"Instance", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"ModelElement (Entity or Relation)","Instance",ruleToBeInterpreted.getName(),convertToJavaType(inst)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}

+			}

+			

+			try {

+				manager.

+					newInstanceOf(((IModelElement)type), ((IModelElement)inst));

+			} catch (VPMCoreException e) {

+				String[] context = {e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.VPM_CORE
+						,context
+						,ruleToBeInterpreted);

+			}

+			return Boolean.TRUE;

+			

+		}

+		else if(ruleToBeInterpreted instanceof RelationCreateRule){

+			

+			RelationCreateRule relationCreateRule = (RelationCreateRule)ruleToBeInterpreted;

+			Object source = (termEvaluator.evaluate(executionEnvironment, relationCreateRule.getSource()));

+			Object target = (termEvaluator.evaluate(executionEnvironment, relationCreateRule.getTarget()));

+			

+			

+			if(!(source instanceof IModelElement))

+			{

+				if(ValueKind.UNDEF_LITERAL.equals(source))
+					{
+					String[] context = {"Source", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"ModelElement (Entity or Relation)","Source",ruleToBeInterpreted.getName(),convertToJavaType(source)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}

+			}

+			if(!(target instanceof IModelElement))

+			{

+				if(ValueKind.UNDEF_LITERAL.equals(target))
+					{
+					String[] context = {"Target", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"ModelElement (Entity or Relation)","Target",ruleToBeInterpreted.getName(),convertToJavaType(target)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}

+			}

+		    IRelation newRelation=null;

+			try {

+				newRelation=manager.

+					newRelation(((IModelElement)source), ((IModelElement)target));

+				try {

+					executionEnvironment.setVariableValue(relationCreateRule.getTargetVariable().getVariable(), newRelation );

+				} catch (ViatraTransformationException e) {

+					String[] context = {relationCreateRule.getTargetVariable().getVariable().getName(),relationCreateRule.getName(),e.getMessage()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.SET_VAR_VALUE_AFTER_MODEL_MANPULATION_RULE
+							,context
+							,relationCreateRule);

+				}

+                

+                if(relationCreateRule.getType()!=null)

+                {

+                    // Creating an instanceof relation for the type.

+                	Object type = termEvaluator.evaluate(executionEnvironment, relationCreateRule.getType());

+                	if(type instanceof IModelElement)

+                		manager.newInstanceOf((IModelElement)type, newRelation);

+                    else

+                		{
+                    	String[] context = {ruleToBeInterpreted.getName()};
+                    	throw new ASMInterpreterException(ASMInterpreterErrorStrings.MODEL_MANIPULATION_NOTYPE
+                    			,context
+                    			,ruleToBeInterpreted);
+                		}

+                }

+			} catch (VPMCoreException e) {

+				String[] context = {e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.VPM_CORE
+						,context
+						,ruleToBeInterpreted);

+			}

+

+			return Boolean.TRUE;

+			

+		}

+		else if(ruleToBeInterpreted instanceof EntityCreateRule){

+			

+		    IEntity newEntity = null;

+		    EntityCreateRule entityCreateRule = (EntityCreateRule)ruleToBeInterpreted;

+            try {

+				if(entityCreateRule.getParent()==null)

+				{

+                    newEntity = manager.newEntity();

+					try {

+						executionEnvironment.setVariableValue(entityCreateRule.getTargetVariable().getVariable(), newEntity);

+					} catch (ViatraTransformationException e) {

+						String[] context = {entityCreateRule.getTargetVariable().getVariable().getName(),entityCreateRule.getName(),e.getMessage()};
+						throw new ASMInterpreterException(ASMInterpreterErrorStrings.SET_VAR_VALUE_AFTER_MODEL_MANPULATION_RULE
+								,context
+								,entityCreateRule);

+					}					

+				}

+				else

+				{

+                    //the parent is not null but have to be checked that it is a valid IEntity

+					Object parent = termEvaluator.evaluate(executionEnvironment, entityCreateRule.getParent());

+					

+					if(!(parent instanceof IEntity))

+					{

+						if(ValueKind.UNDEF_LITERAL.equals(parent))
+							{
+							String[] context = {"Container", ruleToBeInterpreted.getName()};
+							throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+									,context
+									,ruleToBeInterpreted);
+							}
+						else 
+							{
+							String[] context = {"Entity","Container",ruleToBeInterpreted.getName(),convertToJavaType(parent)};
+							throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+								,context
+								,ruleToBeInterpreted);
+							}

+					}

+								

+					newEntity=manager.newEntity((IEntity)parent);

+					try {

+						executionEnvironment.setVariableValue(entityCreateRule.getTargetVariable().getVariable(), newEntity);

+					} catch (ViatraTransformationException e) {

+						String[] context = {entityCreateRule.getTargetVariable().getVariable().getName(),entityCreateRule.getName(),e.getMessage()};
+						throw new ASMInterpreterException(ASMInterpreterErrorStrings.SET_VAR_VALUE_AFTER_MODEL_MANPULATION_RULE
+								,context
+								,entityCreateRule);

+					}

+				}

+                

+                if((entityCreateRule.getType())!=null)

+                {

+                    // Creating an instanceof relation for the type.

+                	Object type = termEvaluator.evaluate(executionEnvironment, entityCreateRule.getType());

+                	if(type instanceof IModelElement)

+                		manager.newInstanceOf((IModelElement)type, newEntity);

+                	else

+                		{
+                    	String[] context = {ruleToBeInterpreted.getName()};
+                    	throw new ASMInterpreterException(ASMInterpreterErrorStrings.MODEL_MANIPULATION_NOTYPE
+                    			,context
+                    			,ruleToBeInterpreted);
+                		}

+                }

+                

+			} catch (VPMCoreException e) {

+				String[] context = {e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.VPM_CORE
+						,context
+						,ruleToBeInterpreted);

+			}

+			return Boolean.TRUE;

+		}

+		/*

+		 * End of Creation Rules

+		 * 

+		 * 

+		 * 

+		 * Deletion Rules 

+		 */

+		else if(ruleToBeInterpreted instanceof DeleteInstanceOf){

+

+			Object type = (termEvaluator.evaluate(executionEnvironment, ((DeleteInstanceOf)ruleToBeInterpreted).getSuper()));

+			Object inst = (termEvaluator.evaluate(executionEnvironment, ((DeleteInstanceOf)ruleToBeInterpreted).getSub()));

+
+			if(!(type instanceof IModelElement))
+			{
+				if(ValueKind.UNDEF_LITERAL.equals(type))
+					{
+					String[] context = {"Type", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"ModelElement (Entity or Relation)","Type",ruleToBeInterpreted.getName(),convertToJavaType(type)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}
+			}
+			if(!(inst instanceof IModelElement))
+			{
+				if(ValueKind.UNDEF_LITERAL.equals(inst))
+					{
+					String[] context = {"Instance", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"ModelElement (Entity or Relation)","Instance",ruleToBeInterpreted.getName(),convertToJavaType(inst)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}
+			}

+			

+			try {

+				manager.

+					deleteInstanceOf(

+							((IModelElement)type), 

+							((IModelElement)inst));

+			} catch (VPMCoreException e) {

+				String[] context = {e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.VPM_CORE
+						,context
+						,ruleToBeInterpreted);

+			}

+			return Boolean.TRUE;

+			

+		}

+		else if(ruleToBeInterpreted instanceof DeleteSupertypeOf){

+			Object sup = (termEvaluator.evaluate(executionEnvironment, ((DeleteSupertypeOf)ruleToBeInterpreted).getSuper()));

+			Object sub = (termEvaluator.evaluate(executionEnvironment, ((DeleteSupertypeOf)ruleToBeInterpreted).getSub()));

+			

+			if(!(sup instanceof IModelElement))
+				{
+				if(ValueKind.UNDEF_LITERAL.equals(sup))
+					{
+					String[] context = {"Supertype", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"ModelElement (Entity or Relation)","Supertype",ruleToBeInterpreted.getName(),convertToJavaType(sup)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}
+				}
+			if(!(sub instanceof IModelElement))
+				{
+				if(ValueKind.UNDEF_LITERAL.equals(sub))
+					{
+					String[] context = {"Subtype", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"ModelElement (Entity or Relation)","Subtype",ruleToBeInterpreted.getName(),convertToJavaType(sub)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}
+				}

+			

+			try {

+				manager.

+					deleteSupertypeOf(

+							((IModelElement)sup),

+							((IModelElement)sub));

+			} catch (VPMCoreException e) {

+				String[] context = {e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.VPM_CORE
+						,context
+						,ruleToBeInterpreted);

+			}

+			return Boolean.TRUE;

+			

+		}

+		else if(ruleToBeInterpreted instanceof ElementDeleteRule){

+			

+			EDeleteSemantics deleteSemantics=EDeleteSemantics.DELETE_SEMANTICS_BRANCH_FORCE;

+			ElementDeleteRule elementDeleteRule = (ElementDeleteRule)ruleToBeInterpreted;

+			

+			if((elementDeleteRule).getSemantics().equals(DeleteSemantics.MOVE_CONTENT_LITERAL))

+			{

+				deleteSemantics = EDeleteSemantics.DELETE_SEMANTICS_FORCE;

+			}

+			

+			try {

+				Object elementToBeDeleted=termEvaluator.evaluate(executionEnvironment,elementDeleteRule.getElement());

+				if(ValueKind.UNDEF_LITERAL.equals(elementToBeDeleted))

+				{

+					String sourceLine="";

+					String sourceFile="";

+					for (int i=0; i<elementDeleteRule.getAnnotations().size();i++) {

+						if("sourceline".equals(elementDeleteRule.getAnnotations().get(i).getKey()))

+						{

+							sourceLine=elementDeleteRule.getAnnotations().get(i).getValue();

+						}

+						else if("sourcefile".equals(elementDeleteRule.getAnnotations().get(i).getKey()))

+						{

+							sourceFile=elementDeleteRule.getAnnotations().get(i).getValue();

+						}

+					}

+					executionEnvironment.getFramework().getLogger().message(LogLevel.WARNING, "File: \""+sourceFile+"\", line: "+sourceLine+": Element Delete called for undefined argument!");

+					return Boolean.TRUE;

+				}

+				manager.deleteElement((IModelElement)elementToBeDeleted,deleteSemantics);

+				if(elementDeleteRule.getElement() instanceof VariableReference)

+				{

+					executionEnvironment.setVariableValue(((VariableReference)elementDeleteRule.getElement()).getVariable(),ValueKind.UNDEF_LITERAL);

+				}

+			} catch (VPMCoreException e) {

+				String[] context = {e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.VPM_CORE
+						,context
+						,ruleToBeInterpreted);

+			}

+			return Boolean.TRUE;

+			

+		}

+		/*

+		 * End of Deletion Rules

+		 * 

+		 * 

+		 * 

+		 * Copy/move Rules 

+		 */

+		else if(ruleToBeInterpreted instanceof MoveRule){

+			

+			Object srcRoot = (termEvaluator.evaluate(executionEnvironment, ((MoveRule)ruleToBeInterpreted).getSrcRoot()));

+			Object trgContainer = (termEvaluator.evaluate(executionEnvironment, ((MoveRule)ruleToBeInterpreted).getTrgContainer()));

+			

+			if(!(srcRoot instanceof IModelElement))

+			{

+				if(ValueKind.UNDEF_LITERAL.equals(srcRoot))
+					{
+					String[] context = {"Source", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"ModelElement (Entity or Relation)","Source",ruleToBeInterpreted.getName(),convertToJavaType(srcRoot)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}

+			}

+			if(!(trgContainer instanceof IModelElement))

+			{

+				if(ValueKind.UNDEF_LITERAL.equals(trgContainer))
+					{
+					String[] context = {"Target", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"ModelElement (Entity or Relation)","Target",ruleToBeInterpreted.getName(),convertToJavaType(trgContainer)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}

+			}

+			

+			try {

+				manager.

+					moveEntityTo((IEntity)srcRoot,(IEntity)trgContainer);

+			} catch (VPMCoreException e) {

+				String[] context = {e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.VPM_CORE
+						,context
+						,ruleToBeInterpreted);

+			}

+			return Boolean.TRUE;

+			

+		}

+		else if(ruleToBeInterpreted instanceof ModelCopyRule){

+			Object srcRoot = (termEvaluator.evaluate(executionEnvironment, ((ModelCopyRule)ruleToBeInterpreted).getSrcRoot()));

+			Object trgContainer = (termEvaluator.evaluate(executionEnvironment, ((ModelCopyRule)ruleToBeInterpreted).getTrgContainer()));

+						

+			

+			if(!(srcRoot instanceof IModelElement))
+			{
+				if(ValueKind.UNDEF_LITERAL.equals(srcRoot))
+					{
+					String[] context = {"Source", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"ModelElement (Entity or Relation)","Source",ruleToBeInterpreted.getName(),convertToJavaType(srcRoot)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}
+			}
+			if(!(trgContainer instanceof IModelElement))
+			{
+				if(ValueKind.UNDEF_LITERAL.equals(trgContainer))
+					{
+					String[] context = {"Target", ruleToBeInterpreted.getName()};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE_UNDEF
+							,context
+							,ruleToBeInterpreted);
+					}
+				else 
+					{
+					String[] context = {"ModelElement (Entity or Relation)","Target",ruleToBeInterpreted.getName(),convertToJavaType(trgContainer)};
+					throw new ASMInterpreterException(ASMInterpreterErrorStrings.PARAM_EXCEPTED_TYPE
+						,context
+						,ruleToBeInterpreted);
+					}
+			}

+			

+			try {

+				executionEnvironment.

+					setVariableValue(

+							((ModelCopyRule)ruleToBeInterpreted).getTargetVariable().getVariable(),

+							manager.

+								copyModelElement(

+										(IModelElement)srcRoot,

+										(IModelElement)trgContainer,

+										((ModelCopyRule)ruleToBeInterpreted).getSemantics()==CopySemantics.DROP_OUTER_EDGES_LITERAL));

+			} catch (VPMCoreException e) {

+				String[] context = {e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.VPM_CORE
+						,context
+						,ruleToBeInterpreted);

+			} catch (ViatraTransformationException e) {

+				String[] context = {((ModelCopyRule)ruleToBeInterpreted).getTargetVariable().getVariable().getName(),ruleToBeInterpreted.getName(),e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.SET_VAR_VALUE_AFTER_MODEL_MANPULATION_RULE
+						,context
+						,ruleToBeInterpreted);
+			}

+			return Boolean.TRUE;

+		}

+		return null;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/NativeASMRuleInterpreter.java b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/NativeASMRuleInterpreter.java
new file mode 100644
index 0000000..0fd0878
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/NativeASMRuleInterpreter.java
@@ -0,0 +1,113 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.gtasm.interpreter.impl.rules;

+

+

+import java.util.Hashtable;

+

+import org.eclipse.emf.common.util.EList;

+import org.eclipse.viatra2.gtasm.interpreter.exception.ASMInterpreterErrorStrings;

+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;

+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;

+import org.eclipse.viatra2.gtasm.interpreter.extension.INativeASMRule;

+import org.eclipse.viatra2.gtasm.interpreter.extension.NativeASMRuleProvider;

+import org.eclipse.viatra2.gtasm.interpreter.impl.machine.ASMInterpreterException;

+import org.eclipse.viatra2.gtasm.interpreter.term.rules.JavaNativeValue;

+import org.eclipse.viatra2.gtasm.interpreter.term.rules.TermEvaluator;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DirectionKind;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;

+

+

+public class NativeASMRuleInterpreter {

+	

+	private static NativeASMRuleInterpreter _instance = new NativeASMRuleInterpreter();

+	

+	public static NativeASMRuleInterpreter getInstance() {

+		return _instance;

+	}

+	

+	/** Executes the native ASM rule attached to the invoked ASM rule specified in the input parameter <i>callRule</i>

+	 * @param executionEnvironment The execution environment of the invocation context

+	 * @param symVarBindings The symmetric parameter binding

+	 * @param callRule The call rule invoking an annotated AMS rule

+	 * @return Returns true if the rule is executed without error

+	 * @throws ViatraTransformationException All exceptions are boxed into a subtype of the ViatraTransfomrationException.

+	 */

+	public boolean executeNativeASMRule(

+			IExecutionEnvironment executionEnvironment,

+			Hashtable<Variable, Object> symVarBindings,

+			CallRule callRule)

+			throws ViatraTransformationException{

+		

+		//checks if the native rule is available at the org.eclipse.viatra2.gtasm.patternmatcher.extension point 

+		INativeASMRule nativeRule = NativeASMRuleProvider.getNativeASMRule(callRule.getRule().getFqn());

+		//checks if the rule is available

+		if(nativeRule == null)

+			{

+			String[] context = {callRule.getRule().getFqn()};

+			throw new ASMInterpreterException(

+				ASMInterpreterErrorStrings.NATIVE_ASMRULE_DOES_NOT_EXIST

+				,context 	

+				,callRule);

+			}

+		

+		boolean result = false;

+		Hashtable<Variable, Variable> outVarBindings=new Hashtable<Variable, Variable>();

+		EList<SymbolicRuleParameter> symParams = callRule.getRule().getSymParameters();

+		

+		try {

+			result = nativeRule.invoke(executionEnvironment.getFramework().getTopmodel(), symVarBindings);

+		} catch (ViatraTransformationException e) {

+			throw e.addNewStackElement(callRule);

+		} catch (Throwable t){

+			String[] context = {callRule.getAsmRule().getNamespace().getFqn()+"."+callRule.getAsmRule().getFqn(),t.getMessage()};

+			throw new ASMInterpreterException(ASMInterpreterErrorStrings.NATIVE_ASMRULE_EXECUTION_ERROR

+					,context

+					,callRule);

+		}

+

+		// If the rule failed, we have to restore the previous state. - so we don't have to write the values of the 

+		// variables back to the current execution environment, and we have to (?) restore the ASMFunctions too.

+		if(result)

+		{

+		//	symVarBindings=(Hashtable<Variable, Object>)callRuleExecutionEnvironment.onTerminate();

+		

+			// Getting the values back from the execution environment. Only for parameters with OUT or INOUT directions.

+			for (int i=0;i<callRule.getActualParameters().size();i++) {

+				if(!symParams.get(i).getDirection().equals(DirectionKind.IN_LITERAL))

+				{

+					Variable sym=symParams.get(i).getVariable();

+					outVarBindings.put(sym,((VariableReference)callRule.getActualParameters().get(i)).getVariable());

+				}	

+			}	

+		}

+		

+		// Putting the changed variables back to the original environment

+		for (Object symbolicVariable : outVarBindings.keySet()) {

+			try {

+				executionEnvironment.setVariableValue(outVarBindings.get(symbolicVariable),

+						TermEvaluator.getInstance().isASMNativeType(symVarBindings.get(symbolicVariable))?

+								symVarBindings.get(symbolicVariable):

+									new JavaNativeValue(symVarBindings.get(symbolicVariable)));

+			} catch (ViatraTransformationException e) {

+				String[] context = {((Variable)symbolicVariable).getName(),callRule.getAsmRule().getNamespace().getFqn()+"."+callRule.getAsmRule().getFqn(),e.getMessage()};

+				throw new ASMInterpreterException(

+						ASMInterpreterErrorStrings.SET_VAR_VALUE_AFTER_NATIVE_CALL

+						,context

+						,callRule);

+			}

+		}

+		return result;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/NestedRuleInterpreter.java b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/NestedRuleInterpreter.java
new file mode 100644
index 0000000..8536c9b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/NestedRuleInterpreter.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.impl.rules;

+

+import org.eclipse.emf.common.util.EList;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.impl.executionEnvironment.ExecutionEnvironment;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.NestedRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ParallelRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.RandomRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.SequentialRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.interpreters.IProgressReport;
+

+

+public class NestedRuleInterpreter extends RuleInterpreter {

+

+	private static NestedRuleInterpreter _instance = new NestedRuleInterpreter();

+

+	

+	public static NestedRuleInterpreter getInstance() { 

+		return _instance; 

+	} 

+	

+	@Override
+	public Boolean interpretRule(IExecutionEnvironment executionEnvironment, ASMRuleInvocation ruleToBeInterpreted, final IProgressReport pr) 

+		throws ViatraTransformationException

+	{

+		NestedRule nestedRule = (NestedRule)ruleToBeInterpreted;

+		if(nestedRule instanceof SequentialRule)

+		{

+			for(int i=0;i<((SequentialRule)nestedRule).getSubrules().size();i++)

+			{

+				if(!(RuleInterpreter.getInstance().

+						interpretRule(executionEnvironment,

+								((SequentialRule)nestedRule).getSubrules().get(i),pr)))

+					return Boolean.FALSE;

+			}

+			return Boolean.TRUE;

+			

+		}

+		else if(nestedRule instanceof RandomRule)

+		{

+			int i=0;

+			i= (int)Math.round(Math.random()*(((RandomRule)nestedRule).getSubrules().size()-1));

+			return RuleInterpreter.getInstance().

+					interpretRule(executionEnvironment,

+							((RandomRule)nestedRule).getSubrules().get(i),pr);

+		}

+		else if(nestedRule instanceof ParallelRule)

+		{

+			EList<ASMRuleInvocation> subRules = ((ParallelRule)nestedRule).getSubrules(); 

+			Thread[] threads = new Thread[subRules.size()];

+			final boolean[] returnValues = new boolean[subRules.size()];

+			final IExecutionEnvironment[] eEnvs = new IExecutionEnvironment[subRules.size()];

+			for (int i=0; i<subRules.size(); i++) eEnvs[i] = new ExecutionEnvironment(executionEnvironment);

+			//for (int i=0; i<subRules.size(); i++) eEnvs[i] = org.eclipse.viatra2.gtasm.interpreter.executionEnvironment;

+			

+			for(int _i=0;_i<subRules.size();_i++)

+			{

+				final int i = _i;

+				final ASMRuleInvocation target = subRules.get(i);

+				threads[i] = new Thread(new Runnable(){

+					public void run() 

+					{

+						try

+						{

+							returnValues[i] = RuleInterpreter.getInstance().interpretRule(eEnvs[i], target, pr);

+						}

+						catch (ViatraTransformationException e)

+						{

+							e.printStackTrace();
+							//TODO: istvan proper error handling required 

+						}

+						

+					}

+				}, "ParallelVIATRA_R3");

+				//if(!(org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.getRuleInterpreter().interpretRule(org.eclipse.viatra2.gtasm.interpreter.executionEnvironment,(Rule)((ParallelRule)nestedRule).getSubrules().get(i))))

+				//	return Boolean.FALSE;

+			}

+			

+			// start org.eclipse.viatra2.gtasm.interpreter.impl.threads

+			for (Thread t : threads) t.start();

+			

+			// join org.eclipse.viatra2.gtasm.interpreter.impl.threads

+			try

+			{

+				for (Thread t : threads) t.join();

+			} catch (InterruptedException e) { e.printStackTrace(); }

+			

+			// calculate return value

+			boolean ret = Boolean.TRUE;

+			for (boolean b : returnValues) ret &= b;

+			return ret;

+		}

+		return Boolean.FALSE;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/RuleInterpreter.java b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/RuleInterpreter.java
new file mode 100644
index 0000000..0eeb2b6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/RuleInterpreter.java
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.impl.rules;

+

+
+import org.eclipse.viatra2.codegen.CodeOutputPlugin;
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.gtasm.interpreter.exception.GTASMException;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.term.rules.JavaNativeValue;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.BlockRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.NestedRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdate;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Multiplicity;
+import org.eclipse.viatra2.interpreters.IProgressReport;
+import org.eclipse.viatra2.logger.Logger;
+

+

+/**

+ * The RuleInterpreter is the super class for all interpreters.

+ * @author Peter Pasztor, Akos Horvath

+ *

+ */

+public class RuleInterpreter {

+	private static RuleInterpreter INSTANCE = new RuleInterpreter();
+
+

+		//protected ExecutionEnvironment org.eclipse.viatra2.gtasm.interpreter.executionEnvironment;

+		protected Logger log;

+		protected CodeOutputPlugin codeout;

+		

+		

+		public CodeOutputPlugin getCodeout() {

+			return codeout;

+		}

+

+		public void setCodeout(CodeOutputPlugin codeout) {

+			this.codeout = codeout;

+		}

+

+		public Logger getLog() {

+			return log;

+		}

+

+		public void setLog(Logger log) {

+			this.log = log;

+		}

+

+		RuleInterpreter() {

+

+		}

+

+		public static RuleInterpreter getInstance() {
+			return INSTANCE; 
+		} 
+
+		/** 

+		 * @param executionEnvironment The actual execution environment to work with

+		 * @param ruleToBeInterpreted the Rule to be interpreted

+		 * @return True if the rule is interpreted without failure else False

+		 * @throws GTASMException 

+		 */

+		public Boolean interpretRule(IExecutionEnvironment executionEnvironment, Rule ruleToBeInterpreted, IProgressReport pr) throws ViatraTransformationException

+		{

+				try {

+					return interpretRule(executionEnvironment, ruleToBeInterpreted.getBody(), pr);

+				} catch (ViatraTransformationException e) {
+					throw e.addNewStackElement(ruleToBeInterpreted);

+				}

+		}
+		
+		/**Returns the type of the input parameter in a serialized form
+		 * @param obj The object whose type is returned
+		 * @return The java type in serialized form.
+		 */
+		protected String convertToJavaType(Object obj){
+			
+			if(obj == null)
+				return "null";
+			
+			if(obj instanceof String)
+				return "String";
+			if(obj instanceof Integer)
+				return "Integer";
+			if(obj instanceof Double)
+				return "Double";
+			if(obj instanceof Boolean)
+				return "Boolean";
+			if(obj instanceof Multiplicity)
+				return "Multiplicity";
+			if(ValueKind.UNDEF_LITERAL.equals(obj))
+				return "UNDEF";
+			if(obj instanceof IRelation)
+				return "Relation (ModelElement)";
+			if(obj instanceof IEntity)
+				return "Entity (ModelElement)";
+			if(obj instanceof JavaNativeValue)
+				return "JavaNativeValue";
+			
+			return "unknown type";
+		}

+		

+		/**

+		 * @param executionEnvironment The actual execution environment to work with

+		 * @param ruleToBeInterpreted the ASMRuleInvocation to be interpreted

+		 * @return True if the rule is interpreted without failure else False

+		 * @throws GTASMException

+		 */

+		public Boolean interpretRule(IExecutionEnvironment executionEnvironment, ASMRuleInvocation ruleToBeInterpreted, IProgressReport pr) 
+			throws ViatraTransformationException

+		{

+			if (pr!=null) pr.progress(1);

+			

+				if(ruleToBeInterpreted instanceof RuleUpdate)

+				{

+					return RuleUpdateInterpreter.getInstance().interpretRule(executionEnvironment, ruleToBeInterpreted,pr);

+				}

+				else if(ruleToBeInterpreted instanceof NestedRule)

+				{

+					return NestedRuleInterpreter.getInstance().interpretRule(executionEnvironment, ruleToBeInterpreted,pr);			

+				}

+				else if(ruleToBeInterpreted instanceof ConditionalRuleIf || ruleToBeInterpreted instanceof ConditionalRuleTry)

+				{

+					return ConditionalRuleInterpreter.getInstance().interpretRule(executionEnvironment, ruleToBeInterpreted,pr);

+				}

+				else if(ruleToBeInterpreted instanceof BlockRule)

+				{

+					return BlockRuleInterpreter.getInstance().interpretRule(executionEnvironment, ruleToBeInterpreted,pr);

+				}

+				else if(ruleToBeInterpreted instanceof ModelManipulationRule)

+				{

+					return ModelManipulationRuleInterpreter.getInstance().interpretRule(executionEnvironment, ruleToBeInterpreted,pr);

+				}

+				else

+				{

+					return BasicRuleInterpreter.getInstance().interpretRule(executionEnvironment, ruleToBeInterpreted,pr);

+				}

+		}
+		
+		public static void initInterpreters(Logger log, CodeOutputPlugin codeout) {
+			BasicRuleInterpreter.getInstance().setCodeout(codeout);
+			BasicRuleInterpreter.getInstance().setLog(log);
+			BlockRuleInterpreter.getInstance().setLog(log);
+			ConditionalRuleInterpreter.getInstance().setLog(log);
+			NestedRuleInterpreter.getInstance().setLog(log);
+			RuleUpdateInterpreter.getInstance().setLog(log);
+		}
+

+}

diff --git a/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/RuleUpdateInterpreter.java b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/RuleUpdateInterpreter.java
new file mode 100644
index 0000000..d6f4ac1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.impl/src/org/eclipse/viatra2/gtasm/interpreter/impl/rules/RuleUpdateInterpreter.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.impl.rules;

+

+
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ASMInterpreterErrorStrings;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.impl.machine.ASMInterpreterException;
+import org.eclipse.viatra2.gtasm.interpreter.term.rules.TermEvaluator;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdate;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateVariable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.interpreters.IProgressReport;
+

+

+public class RuleUpdateInterpreter extends RuleInterpreter {

+

+	private static RuleUpdateInterpreter _instance = new RuleUpdateInterpreter();

+

+	

+	public static RuleUpdateInterpreter getInstance() { 

+		return _instance; 

+	} 

+

+	private RuleUpdateInterpreter()

+	{

+		;

+	}

+	

+	@Override
+	public Boolean interpretRule(IExecutionEnvironment executionEnvironment, ASMRuleInvocation ruleToBeInterpreted, IProgressReport pr) 
+		throws ViatraTransformationException

+	{

+		RuleUpdate ruleUpdate=(RuleUpdate)ruleToBeInterpreted;

+		if(ruleUpdate instanceof RuleUpdateVariable)

+		{Variable var = ((RuleUpdateVariable)ruleUpdate).getVariable().getVariable();
+		

+			try {
+				executionEnvironment.setVariableValue(var,TermEvaluator.getInstance().evaluate(executionEnvironment, ((RuleUpdateVariable)ruleUpdate).getValue()));

+				return Boolean.TRUE;

+			} catch (ViatraTransformationException e) {

+				String[] context = {var.getName(), e.getMessage()};
+				throw new ASMInterpreterException(ASMInterpreterErrorStrings.SET_VAR_VALUE_AFTER_UPDATE_RULE
+						,context
+						,ruleUpdate);

+			}

+			//org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.setVariableValue(((RuleUpdateVariable)ruleUpdate).getVariable().getVariable(),((RuleUpdateVariable)ruleUpdate).getValue());

+			//return Boolean.TRUE;

+		}

+		else if(ruleUpdate instanceof RuleUpdateASMFunction)

+		{

+			EList<Object> paramList = new BasicEList<Object>();

+			for (Term location : ((RuleUpdateASMFunction)ruleUpdate).getLocations()) {

+				paramList.add(TermEvaluator.getInstance().evaluate(executionEnvironment, location));

+			}

+			

+			executionEnvironment.updateASMFunction(((RuleUpdateASMFunction)ruleUpdate).getFunction(),paramList,TermEvaluator.getInstance().evaluate(executionEnvironment,((RuleUpdateASMFunction)ruleUpdate).getValue()));

+			return Boolean.TRUE;

+		}

+		return Boolean.FALSE;

+	}

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.interpreter.term/.classpath b/org.eclipse.viatra2.gtasm.interpreter.term/.classpath
new file mode 100644
index 0000000..ad32c83
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.term/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.viatra2.gtasm.interpreter.term/.project b/org.eclipse.viatra2.gtasm.interpreter.term/.project
new file mode 100644
index 0000000..0a9d571
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.term/.project
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.viatra2.gtasm.interpreter.term</name>
+	<comment></comment>
+	<projects>
+		<project>viatra_gtasm_emf_model</project>
+		<project>viatra_pattern_matcher</project>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.viatra2.gtasm.interpreter.term/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra2.gtasm.interpreter.term/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..4b905cf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.term/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Wed Jan 12 11:18:29 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.6
diff --git a/org.eclipse.viatra2.gtasm.interpreter.term/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.viatra2.gtasm.interpreter.term/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..7854eca
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.term/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,4 @@
+#Tue Aug 01 08:50:24 CEST 2006
+eclipse.preferences.version=1
+internal.default.compliance=default
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
diff --git a/org.eclipse.viatra2.gtasm.interpreter.term/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.eclipse.viatra2.gtasm.interpreter.term/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000..f3391b2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.term/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Thu Aug 03 02:30:54 CEST 2006
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/org.eclipse.viatra2.gtasm.interpreter.term/.settings/org.eclipse.wst.validation.prefs b/org.eclipse.viatra2.gtasm.interpreter.term/.settings/org.eclipse.wst.validation.prefs
new file mode 100644
index 0000000..db982d7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.term/.settings/org.eclipse.wst.validation.prefs
@@ -0,0 +1,6 @@
+#Thu Aug 03 02:30:54 CEST 2006
+DELEGATES_PREFERENCE=delegateValidatorListorg.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator\=org.eclipse.wst.wsdl.validation.internal.eclipse.Validator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator\=org.eclipse.wst.xsd.core.internal.validation.eclipse.Validator;
+USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.jst.jsp.core.internal.validation.JSPJavaValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPDirectiveValidator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPELValidator;
+USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.jst.jsp.core.internal.validation.JSPJavaValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPDirectiveValidator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPELValidator;
+USER_PREFERENCE=overrideGlobalPreferencesfalse
+eclipse.preferences.version=1
diff --git a/org.eclipse.viatra2.gtasm.interpreter.term/META-INF/MANIFEST.MF b/org.eclipse.viatra2.gtasm.interpreter.term/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..c0386b6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.term/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: VIATRA2 R3 Term Interpreter
+Bundle-SymbolicName: org.eclipse.viatra2.gtasm.interpreter.term;singleton:=true
+Bundle-Version: 3.3.0.qualifier
+Require-Bundle: org.eclipse.viatra2.core2,
+ org.eclipse.viatra2.gtasm.model,
+ org.eclipse.viatra2.gtasm.patternmatcher,
+ org.eclipse.viatra2.gtasm.interpreter
+Export-Package: org.eclipse.viatra2.gtasm.interpreter.term.rules
+Bundle-Vendor: BUTE-FTSRG
+Bundle-ClassPath: .
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/org.eclipse.viatra2.gtasm.interpreter.term/about.html b/org.eclipse.viatra2.gtasm.interpreter.term/about.html
new file mode 100644
index 0000000..b72be18
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.term/about.html
@@ -0,0 +1,28 @@
+<!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>About</title>

+</head>

+<body lang="EN-US">

+<h2>About This Content</h2>

+ 

+<p>July 4th, 2008</p>	

+<h3>License</h3>

+

+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 

+indicated below, the Content is provided to you under the org.eclipse.viatra2.gtasm.interpreter.term.rules and conditions of the

+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is 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>If you did not receive this Content directly from the Eclipse Foundation, the Content is 

+being redistributed by another party (&quot;Redistributor&quot;) and different org.eclipse.viatra2.gtasm.interpreter.term.rules and conditions may

+apply to your use of any object code in the Content.  Check the Redistributor's license that was 

+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise

+indicated below, the org.eclipse.viatra2.gtasm.interpreter.term.rules and conditions of the EPL still apply to any source code in the Content

+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>

+

+</body>

+</html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gtasm.interpreter.term/build.properties b/org.eclipse.viatra2.gtasm.interpreter.term/build.properties
new file mode 100644
index 0000000..5113c5f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.term/build.properties
@@ -0,0 +1,3 @@
+bin.includes = META-INF/,\
+               .
+source.. = src/
diff --git a/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/internal/TermInterpreterErrorString.java b/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/internal/TermInterpreterErrorString.java
new file mode 100644
index 0000000..a86c401
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/internal/TermInterpreterErrorString.java
@@ -0,0 +1,45 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Akos Horvath and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Akos Horvath - initial API and implementation

+ *******************************************************************************/

+

+

+package org.eclipse.viatra2.gtasm.interpreter.term.internal;

+

+public class TermInterpreterErrorString {

+	

+	public static String VPM_CORE = "VPM Core exception caught: {1}";

+	public static String NATIVE_FUNCTION_EXCEPTION= "The following exception was caught when evaluating the {1} Native Function: {2}";

+	public static String EXECUTION_ENVIRONMENT_EXCEPTION= "The following error happend when evaluating the {1} VariableReference: ";

+	

+	public static String PARAM_NUM_ARITHMETIC = "Incorrect number of parameters for the {1} arithmetic operation ";

+	public static String PARAM_NUM_CONVERSION = "Incorrect number of parameters. The {1} conversion operation requires only one input parameter";

+	public static String PARAM_NUM_RELATIONAL = "Incorrect number of parameters. The {1} relational operation requires two input parameters";

+	

+	public static String PARAM_NOT_SUITABLE_WITH_OPERATION_ONE_PARAM = "The {1} type of the parameter is not suitable for the {2} operation.";

+	public static String PARAM_NOT_SUITABLE_WITH_OPERATION_1 = "The type of the first parameter is not suitable for the {1} operation. First parameter: {2}, second parameter: {3}";

+	public static String PARAM_NOT_SUITABLE_WITH_OPERATION_2 = "The type of the second parameter is not suitable for the {1} operation. First parameter: {2}, second parameter: {3}";

+	

+	public static String UNIMP_ARITHMETIC = "Unimplemented Arithmetic Operation: {1}";

+	public static String UNIMP_CONVERSION = "Unimplemented Conversion Operation: {1}";

+	public static String UNIMP_MODELQUERY = "Unimplemented Model query: {1}";

+	public static String UNIMP_RELATIONAL = "Unimplemented Relational Operation: {1}";

+	public static String UNIMP_TERM = "Unimplemented Term type: {1}";

+	

+	public static String REF_NOT_RELATION_MODELELEMENTQUERY = "The {1} modelelement query was invoked with an argument that did not evaluate to a Relation, but instead to a(n) {2}.";

+	public static String REF_NOT_ENTITY_MODELELEMENTQUERY = "The {1} modelelement query was invoked with an argument that did not evaluate to a Entity, but instead to a(n) {2}.";

+	public static String REF_NOT_EXIST_MODELELEMENTQUERY = "The {1} modelelement query was invoked with undef";

+	public static String REF_NOT_MODELELEMENT_MODELELEMENTQUERY = "The {1} modelelement query was invoked with an argument that did not evaluate to a ModelElement (Entity or Relation), but instead to a(n) {2}.";

+	public static String REF_NOT_STRING_MODELELEMENTQUERY = "The {1} modelelement query was invoked with an argument that did not evaluate to a String, but instead to a(n) {2}.";

+

+	public static final String CONSTANT_MODELELEMENT_DOESNOTEXISTS = "The referred modelelement constant '{1}' is not present in the model space.";

+	public static final String TERM_NOT_BOOL_COMPATIBLE = "The input parameter of the {1} operation can not be converted to Boolean as its type is {2}.";

+	public static final String TERM_NOT_MULTIPLICITY_COMPATIBLE = "The input parameter of the {1} operation can not be converted to Multiplicity as its type is {2}.";

+	public static final String TERM_CAN_NOT_BE_CONVERTED = "'{1}' could not be converted to a(n) {2} by the {3} conversion operation.";

+}

diff --git a/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/internal/TermInterpreterException.java b/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/internal/TermInterpreterException.java
new file mode 100644
index 0000000..869f231
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/internal/TermInterpreterException.java
@@ -0,0 +1,29 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the  terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.interpreter.term.internal;

+

+import org.eclipse.viatra2.gtasm.interpreter.exception.GTASMException;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;

+

+public class TermInterpreterException extends GTASMException {

+

+	private static final long serialVersionUID = -3313291694540379516L;

+

+	/*public TermInterpreterException(String msg) {

+        super(msg);

+    }*/

+

+	public TermInterpreterException(String msg, String[] context,Term term) {

+        super(msg,context);

+        addNewStackElement(term);

+    }

+}

diff --git a/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/ArithmeticOperationEvaluator.java b/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/ArithmeticOperationEvaluator.java
new file mode 100644
index 0000000..7b9b849
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/ArithmeticOperationEvaluator.java
@@ -0,0 +1,387 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.term.rules;
+
+
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.term.internal.TermInterpreterErrorString;
+import org.eclipse.viatra2.gtasm.interpreter.term.internal.TermInterpreterException;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.MultiplicityKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ArithmeticOperation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Division;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Minus;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Multiply;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Plus;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Remainder;
+
+
+public class ArithmeticOperationEvaluator extends TermEvaluator {
+	private static ArithmeticOperationEvaluator _instance = new ArithmeticOperationEvaluator();
+
+	private ArithmeticOperationEvaluator() {
+		super();
+	}
+
+	public static ArithmeticOperationEvaluator getInstance() {
+		return _instance;
+	}
+
+	@Override
+	public Object evaluate(IExecutionEnvironment executionEnvironment,
+			Term termToBeEvaluated) throws ViatraTransformationException  {
+		ArithmeticOperation arithmeticOperation = (ArithmeticOperation) termToBeEvaluated;
+
+		if (arithmeticOperation.getActualParameters().size() != 2
+				&& (!(arithmeticOperation.getActualParameters().size() == 1 && arithmeticOperation instanceof Minus)))
+			{
+			String[] context = {arithmeticOperation.getName()};
+			throw new TermInterpreterException(TermInterpreterErrorString.PARAM_NUM_ARITHMETIC,
+					context,arithmeticOperation);
+			}
+
+		// First we have to evaluate both parameters, and then perform the
+		// operation.
+		TermEvaluator termEvaluator = TermEvaluator.getInstance();
+		Object op1 = termEvaluator.evaluate(executionEnvironment,
+				(arithmeticOperation.getActualParameters().get(0)));
+		if (ValueKind.UNDEF_LITERAL.equals(op1))
+			return ValueKind.UNDEF_LITERAL;
+
+		Object op2 = null;
+		if (arithmeticOperation.getActualParameters().size() == 2) {
+			op2 = termEvaluator.evaluate(executionEnvironment,
+					(arithmeticOperation.getActualParameters().get(1)));
+			if (ValueKind.UNDEF_LITERAL.equals(op2))
+				return ValueKind.UNDEF_LITERAL;
+		}
+
+		if (arithmeticOperation instanceof Plus) {
+			if (op1 instanceof String || op2 instanceof String) {
+				return convertToString(op1) + convertToString(op2);
+				// Only String allowed by now
+				/*
+				 * if(op2 instanceof String) return ((String) op1) +
+				 * (op2.toString()); else throw new
+				 * TermInterpreterException(TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_NO+"2",termToBeEvaluated);
+				 */
+			} else if (op1 instanceof Double) {
+				// Double and Integer permitted
+				if (op2 instanceof Double)
+					return ((Double) op1) + ((Double) op2);
+				else if (op2 instanceof Integer)
+					return ((Double) op1)
+							+ (Double.valueOf(((Integer) op2).doubleValue()));
+				else
+					{String[] context = {arithmeticOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+							context,
+							termToBeEvaluated);
+					}
+			} else if (op1 instanceof Integer) {
+				if (op2 instanceof Double)
+					return (Double.valueOf(((Integer) op1).doubleValue()
+							+ ((Double) op2)));
+				else if (op2 instanceof Integer)
+					return ((Integer) op1) + ((Integer) op2);
+				else
+					{String[] context = {arithmeticOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+							context,
+							termToBeEvaluated);
+					}
+			} else if (op1 instanceof MultiplicityKind) {
+				if (((MultiplicityKind.MANY_TO_MANY_LITERAL.equals(op1)) && (op2 instanceof MultiplicityKind))
+						|| ((MultiplicityKind.MANY_TO_MANY_LITERAL.equals(op2)) && (op1 instanceof MultiplicityKind))
+						|| ((MultiplicityKind.ONE_TO_MANY_LITERAL.equals(op1)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+								.equals(op2)))
+						|| ((MultiplicityKind.ONE_TO_MANY_LITERAL.equals(op2)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+								.equals(op1))))
+					return MultiplicityKind.MANY_TO_MANY_LITERAL;
+
+				else if (((MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op1)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+						.equals(op2)))
+						|| ((MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op2)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+								.equals(op1)))
+						|| ((MultiplicityKind.MANY_TO_ONE_LITERAL.equals(op1)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+								.equals(op2))))
+					return MultiplicityKind.MANY_TO_ONE_LITERAL;
+				else if (((MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op1)) && (MultiplicityKind.ONE_TO_MANY_LITERAL
+						.equals(op2)))
+						|| ((MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op2)) && (MultiplicityKind.ONE_TO_MANY_LITERAL
+								.equals(op1)))
+						|| ((MultiplicityKind.ONE_TO_MANY_LITERAL.equals(op1)) && (MultiplicityKind.ONE_TO_MANY_LITERAL
+								.equals(op2))))
+					return MultiplicityKind.ONE_TO_MANY_LITERAL;
+				else if (((MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op1)) && (MultiplicityKind.ONE_TO_ONE_LITERAL
+						.equals(op2))))
+					return MultiplicityKind.ONE_TO_ONE_LITERAL;
+				else
+					{String[] context = {arithmeticOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+							context,
+							termToBeEvaluated);
+					}
+			} else if (op1 instanceof Boolean)
+				if (op2 instanceof Boolean)
+					return (Boolean) op1 || (Boolean) op2;
+				else
+					{String[] context = {arithmeticOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+							context,
+							termToBeEvaluated);
+					}
+			else
+				{String[] context = {arithmeticOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+				throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_1,
+						context,
+						termToBeEvaluated);
+				}
+		} else if (arithmeticOperation instanceof Minus) {
+			if (op1 instanceof Double) { // a simple negative operator
+				if (arithmeticOperation.getActualParameters().size() == 1)
+					return ((Double) op1) * -1;
+				// Double and Integer permitted
+				if (op2 instanceof Double)
+					return ((Double) op1) - ((Double) op2);
+				else if (op2 instanceof Integer)
+					return ((Double) op1)
+							- (Double.valueOf(((Integer) op2).doubleValue()));
+				else
+					{String[] context = {arithmeticOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+							context,
+							termToBeEvaluated);
+					}
+			} else if (op1 instanceof Integer) { // a simple negative
+													// operator
+				if (arithmeticOperation.getActualParameters().size() == 1)
+					return ((Integer) op1) * -1;
+				if (op2 instanceof Double)
+					return (Double.valueOf(((Integer) op1).doubleValue()
+							- ((Double) op2)));
+				else if (op2 instanceof Integer)
+					return ((Integer) op1) - ((Integer) op2);
+				else
+					{String[] context = {arithmeticOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+							context,
+							termToBeEvaluated);
+					}
+			}
+			// else if(op1 instanceof String)
+			// if(op2 instanceof String)
+			// {
+			// // If it ends with the String op2, the operation cuts off the
+			// ending.
+			// if(((String)op1).endsWith((String)op2))
+			// {
+			// return
+			// ((String)op1).substring(0,((String)op1).length()-((String)op2).length());
+			// }
+			// else return ValueKind.UNDEF_LITERAL;
+			// }
+			// else throw new
+			// TermInterpreterException(TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_NO+"2",termToBeEvaluated);
+			else
+				{String[] context = {arithmeticOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+				throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_1,
+						context,
+						termToBeEvaluated);
+				}
+		} else if (arithmeticOperation instanceof Multiply) {
+
+			if (op1 instanceof Double) {
+				// Double and Integer permitted
+				if (op2 instanceof Double)
+					return ((Double) op1) * ((Double) op2);
+				else if (op2 instanceof Integer)
+					return ((Double) op1)
+							* (Double.valueOf(((Integer) op2).doubleValue()));
+				else
+					{String[] context = {arithmeticOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+							context,
+							termToBeEvaluated);
+					}
+			} else if (op1 instanceof Integer) {
+				if (op2 instanceof Double)
+					return (Double.valueOf(((Integer) op1).doubleValue()
+							* ((Double) op2)));
+				else if (op2 instanceof Integer)
+					return ((Integer) op1) * ((Integer) op2);
+				else
+					{String[] context = {arithmeticOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+							context,
+							termToBeEvaluated);
+					}
+			} else if (op1 instanceof MultiplicityKind) {
+				if (((MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op1)) && (op2 instanceof MultiplicityKind))
+						|| ((MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op2)) && (op1 instanceof MultiplicityKind))
+						|| ((MultiplicityKind.ONE_TO_MANY_LITERAL.equals(op1)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+								.equals(op2)))
+						|| ((MultiplicityKind.ONE_TO_MANY_LITERAL.equals(op2)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+								.equals(op1))))
+					return MultiplicityKind.ONE_TO_ONE_LITERAL;
+
+				else if (((MultiplicityKind.MANY_TO_MANY_LITERAL.equals(op1)) && (MultiplicityKind.ONE_TO_MANY_LITERAL
+						.equals(op2)))
+						|| ((MultiplicityKind.MANY_TO_MANY_LITERAL.equals(op2)) && (MultiplicityKind.ONE_TO_MANY_LITERAL
+								.equals(op1)))
+						|| ((MultiplicityKind.ONE_TO_MANY_LITERAL.equals(op1)) && (MultiplicityKind.ONE_TO_MANY_LITERAL
+								.equals(op2))))
+					return MultiplicityKind.ONE_TO_MANY_LITERAL;
+				else if (((MultiplicityKind.MANY_TO_MANY_LITERAL.equals(op1)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+						.equals(op2)))
+						|| ((MultiplicityKind.MANY_TO_MANY_LITERAL.equals(op2)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+								.equals(op1)))
+						|| ((MultiplicityKind.MANY_TO_ONE_LITERAL.equals(op1)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+								.equals(op2))))
+					return MultiplicityKind.MANY_TO_ONE_LITERAL;
+				else if (((MultiplicityKind.MANY_TO_MANY_LITERAL.equals(op1)) && (MultiplicityKind.MANY_TO_MANY_LITERAL
+						.equals(op2))))
+					return MultiplicityKind.MANY_TO_MANY_LITERAL;
+				else
+					{String[] context = {arithmeticOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+							context,
+							termToBeEvaluated);
+					}
+			} else if (op1 instanceof Boolean)
+				if (op2 instanceof Boolean)
+					return (Boolean) op1 && (Boolean) op2;
+				else
+					{String[] context = {arithmeticOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+							context,
+							termToBeEvaluated);
+					}
+			else
+				{String[] context = {arithmeticOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+				throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_1,
+						context,
+						termToBeEvaluated);
+				}
+		} else if (arithmeticOperation instanceof Division) { // Not
+																// implemented
+																// for strings
+			if (op1 instanceof Double) {
+				// Double and Integer permitted
+				if (op2 instanceof Double)
+					return ((Double) op1) / ((Double) op2);
+				else if (op2 instanceof Integer)
+					return ((Double) op1)
+							/ (Double.valueOf(((Integer) op2).doubleValue()));
+				else
+					{String[] context = {arithmeticOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+							context,
+							termToBeEvaluated);
+					}
+			} else if (op1 instanceof Integer) {
+				if (op2 instanceof Double)
+					return (Double.valueOf(((Integer) op1).doubleValue()
+							/ ((Double) op2)));
+				else if (op2 instanceof Integer)
+					return ((Integer) op1) / ((Integer) op2);
+				else
+					{String[] context = {arithmeticOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+							context,
+							termToBeEvaluated);
+					}
+			} else
+				{String[] context = {arithmeticOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+				throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_1,
+						context,
+						termToBeEvaluated);
+				}
+
+		} else if (arithmeticOperation instanceof Remainder) { // Only for
+																// Integer!
+			if (op1 instanceof Integer) {
+				if (op2 instanceof Integer)
+					return ((Integer) op1) % ((Integer) op2);
+				else
+				{String[] context = {arithmeticOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+				throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+				}
+			}
+			// else if(op1 instanceof String)
+			// if(op2 instanceof String)
+			// {
+			// // If it begins with the String op2, the operation cuts off the
+			// beginning.
+			//						
+			// if(((String)op1).substring(0,
+			// ((String)op2).length()).equals(op2))
+			// {
+			// return ((String)op1).substring(((String)op2).length());
+			// }
+			// else return op1;
+			// }
+			// else throw new
+			// TermInterpreterException(TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_NO+"2",termToBeEvaluated);
+			else
+				{String[] context = {arithmeticOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+				throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_1,
+						context,
+						termToBeEvaluated);
+				}
+
+		} else
+			{String[] context = {arithmeticOperation.getName()};
+			throw new TermInterpreterException(
+					TermInterpreterErrorString.UNIMP_ARITHMETIC,
+					context,
+					termToBeEvaluated);
+			}
+	}
+
+	public String convertToString(Object o) {
+		if (o instanceof MultiplicityKind) {
+			if (MultiplicityKind.MANY_TO_MANY_LITERAL.equals(o))
+				return "many to many";
+			else if (MultiplicityKind.ONE_TO_MANY_LITERAL.equals(o))
+				return "one to many";
+			else if (MultiplicityKind.MANY_TO_ONE_LITERAL.equals(o))
+				return "many to one";
+			else if (MultiplicityKind.ONE_TO_ONE_LITERAL.equals(o))
+				return "one to one";
+		}
+
+		return o.toString();
+	}
+}
diff --git a/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/BasicTermEvaluator.java b/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/BasicTermEvaluator.java
new file mode 100644
index 0000000..20d86fe
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/BasicTermEvaluator.java
@@ -0,0 +1,243 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.term.rules;
+
+import java.util.Vector;
+
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.term.internal.TermInterpreterErrorString;
+import org.eclipse.viatra2.gtasm.interpreter.term.internal.TermInterpreterException;
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IPatternMatcher;
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.PatternMatcherProvider;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.MultiplicityKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.NativeFunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Multiplicity;
+import org.eclipse.viatra2.natives.ASMNativeFunction;
+
+
+public class BasicTermEvaluator extends TermEvaluator {
+	private static BasicTermEvaluator _instance = new BasicTermEvaluator();
+
+	private BasicTermEvaluator() {
+		;
+	}
+
+	public static BasicTermEvaluator getInstance() {
+		return _instance;
+	}
+
+	/**
+	 * This function evaluates the basic Terms. Constants,
+	 * ASMFunctionInvocations, NativeFunctionInvocations, VeriableReferences.
+	 * 
+	 * The Native function invocation works for some functions, like
+	 * java.util.Random.nextInt(), but fails to work for example with
+	 * java.lang.Double.parseDouble(String)
+	 * 
+	 */
+	@Override
+	public Object evaluate(IExecutionEnvironment executionEnvironment,
+			Term termToBeEvaluated) throws ViatraTransformationException {
+		
+		
+		if (termToBeEvaluated instanceof Constant) {
+			int kind = ((Constant) termToBeEvaluated).getKind().getValue();
+			switch (kind) {
+			case ValueKind.BOOLEAN:
+				return Boolean.valueOf(((Constant) termToBeEvaluated)
+						.getValue());
+			case ValueKind.DOUBLE:
+				return Double
+						.valueOf(((Constant) termToBeEvaluated).getValue());
+			case ValueKind.INTEGER:
+				return Integer.valueOf(((Constant) termToBeEvaluated)
+						.getValue());
+			case ValueKind.STRING:
+				return ((Constant) termToBeEvaluated).getValue();
+			case ValueKind.MULTIPLICITY:
+				if ("one_to_one".equals(((Constant) termToBeEvaluated)
+						.getValue())) {
+					return MultiplicityKind.ONE_TO_ONE_LITERAL;
+				} else if ("one_to_many".equals(((Constant) termToBeEvaluated)
+						.getValue())) {
+					return MultiplicityKind.ONE_TO_MANY_LITERAL;
+				} else if ("many_to_many".equals(((Constant) termToBeEvaluated)
+						.getValue())) {
+					return MultiplicityKind.MANY_TO_MANY_LITERAL;
+				} else if ("many_to_one".equals(((Constant) termToBeEvaluated)
+						.getValue())) {
+					return MultiplicityKind.MANY_TO_ONE_LITERAL;
+				}
+			case ValueKind.UNDEF:
+				return ValueKind.UNDEF_LITERAL;
+			case ValueKind.MODELELEMENT:
+				String fqn = ((Constant) termToBeEvaluated).getValue();
+				// result is definitely not null
+				if (fqn == null)
+					{String[] context = {"Fully Qualified Name"};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.REF_NOT_STRING_MODELELEMENTQUERY,
+							context,
+							termToBeEvaluated);
+					}
+					
+				// get the IModelElement from the manager
+				IModelSpace _topmodel = executionEnvironment.getFramework()
+				.getTopmodel();
+				Object result = _topmodel.getModelManager().getElementByName(fqn);
+
+				if (result != null)
+					return result;
+				else
+					{
+					String[] context = {fqn};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.CONSTANT_MODELELEMENT_DOESNOTEXISTS
+							,context
+							,termToBeEvaluated);
+					}
+
+			default:
+				{String[] context = {termToBeEvaluated.getName()};
+				throw new TermInterpreterException(
+						TermInterpreterErrorString.UNIMP_TERM
+						,context
+						,termToBeEvaluated);
+				}
+			}
+		} else if (termToBeEvaluated instanceof ASMFunctionInvocation) {
+			EList<Object> evalParamList = new BasicEList<Object>();
+
+			for (Object term : ((ASMFunctionInvocation) termToBeEvaluated)
+					.getActualParameters()) {
+				evalParamList.add(TermEvaluator.getInstance()
+						.evaluate(executionEnvironment, (Term) term));
+			}
+
+			Object value = executionEnvironment.getValueOfASMFunction(
+					((ASMFunctionInvocation) termToBeEvaluated)
+							.getCalledFunction(), evalParamList);
+
+			return (value == null) ? ValueKind.UNDEF_LITERAL : value;
+		} else if (termToBeEvaluated instanceof NativeFunctionInvocation) {
+			// Name of the native function
+			String functionName = ((NativeFunctionInvocation) termToBeEvaluated)
+					.getFunctionName();
+			// array for the evaluated parameters
+			Object[] parameters = new Object[((NativeFunctionInvocation) termToBeEvaluated)
+					.getActualParameters().size()];
+
+			// Evaluating each parameter
+			int i = 0;
+			for (Object parameterToBeEvaluated : ((NativeFunctionInvocation) termToBeEvaluated)
+					.getActualParameters()) {
+				Object currparameter = TermEvaluator.getInstance()
+						.evaluate(executionEnvironment,
+								(Term) parameterToBeEvaluated);
+				// unbox java native values for native functions calls
+				if (currparameter instanceof JavaNativeValue)
+					parameters[i++] = ((JavaNativeValue) currparameter)
+							.getValue();
+				else
+					parameters[i++] = currparameter;
+			}
+
+			//try {
+				ASMNativeFunction _nativeFunction = executionEnvironment.getFramework()
+						.getNativeFunctionManager().getNativeFunctionForName(
+								functionName);
+				IModelSpace _topmodel = executionEnvironment.getFramework().getTopmodel();
+				Object o = null;
+				//Protects the Viatra runtime from any exception thrown from the native function invocation
+				try{
+					o = _nativeFunction.evaluate(
+									_topmodel, parameters);
+					}
+					catch (VPMRuntimeException e) {
+						String[] context = {e.getMessage()};
+						throw new TermInterpreterException(
+								TermInterpreterErrorString.VPM_CORE
+								,context
+								,termToBeEvaluated);
+					}// Any other exception that is not expected from the native ASM function
+					catch(Throwable t) {
+						String[] context = {functionName,t.getLocalizedMessage()};
+						throw new TermInterpreterException(
+								TermInterpreterErrorString.NATIVE_FUNCTION_EXCEPTION
+								,context
+								,termToBeEvaluated);
+					}
+				
+				if (isASMNativeType(o))
+					return o;
+				else
+					return new JavaNativeValue(o);
+			
+
+		} else if (termToBeEvaluated instanceof VariableReference) {
+			try {
+				return executionEnvironment
+						.getVariableValue(((VariableReference) termToBeEvaluated)
+								.getVariable());
+			} catch (ViatraTransformationException e) {
+				String[] context = {((VariableReference) termToBeEvaluated).getName()};
+				throw new TermInterpreterException(
+						TermInterpreterErrorString.EXECUTION_ENVIRONMENT_EXCEPTION
+								+ e.getMessage(), context, termToBeEvaluated);
+			}
+		} else if (termToBeEvaluated instanceof GTPatternCall) {
+			// Evaluates GTPatternCall for match. Boolean return value only.
+			// ((GTPatternBody)((GTPatternCall)termToBeEvaluated).getCalledPattern().getPatternBodies().get(0)).get
+
+			GTPattern gtPattern = ((GTPatternCall) termToBeEvaluated)
+					.getCalledPattern();
+
+			try {
+
+				IPatternMatcher patternMatcher = PatternMatcherProvider
+						.getInstance().getPatternMatcher(executionEnvironment,
+								gtPattern);
+
+				Vector<Object> patternParams = new Vector<Object>();
+				for (Object term : ((GTPatternCall) termToBeEvaluated)
+						.getActualParameters()) {
+					patternParams.add(TermEvaluator.getInstance()
+							.evaluate(executionEnvironment, (Term) term));
+				}
+
+				return patternMatcher.match(patternParams.toArray());
+			} catch (ViatraTransformationException e) {
+				throw e.addNewStackElement(termToBeEvaluated);
+			}
+
+		} else if (termToBeEvaluated instanceof Multiplicity) {
+			return termToBeEvaluated;
+		}
+		// the control gets here, if a non-implemented Term was evaluated.
+		String[] context = {termToBeEvaluated.getName()};
+		throw new TermInterpreterException(TermInterpreterErrorString.UNIMP_TERM, context, termToBeEvaluated);
+
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/ConversionOperationEvaluator.java b/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/ConversionOperationEvaluator.java
new file mode 100644
index 0000000..7302101
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/ConversionOperationEvaluator.java
@@ -0,0 +1,199 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.term.rules;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.term.internal.TermInterpreterErrorString;
+import org.eclipse.viatra2.gtasm.interpreter.term.internal.TermInterpreterException;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.MultiplicityKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ConversionOperation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToBoolean;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToDouble;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToInt;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToMultiplicity;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToString;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.MultiplicityImpl;
+
+
+/** Holds all Conversion operations 
+ * @author Peter Pasztor, Akos Horvath
+ *
+ */
+public class ConversionOperationEvaluator extends TermEvaluator {
+	private static ConversionOperationEvaluator _instance = new ConversionOperationEvaluator();
+
+	private ConversionOperationEvaluator() {
+		;
+	}
+
+	public static ConversionOperationEvaluator getInstance() {
+		return _instance;
+	}
+
+	@Override
+	public Object evaluate(IExecutionEnvironment executionEnvironment,
+			Term termToBeEvaluated) throws ViatraTransformationException{
+		ConversionOperation conversionOperation = ((ConversionOperation) termToBeEvaluated);
+
+		if (conversionOperation.getActualParameters().size() != 1)
+			{
+			String[] context = {conversionOperation.getName()};
+			throw new TermInterpreterException(TermInterpreterErrorString.PARAM_NUM_CONVERSION
+					,context
+					,conversionOperation);
+			}
+		// First we have to evaluate the parameter, and then perform the
+		// operation.
+
+		Term term = (conversionOperation.getActualParameters().get(0));
+		Object op1 = TermEvaluator.getInstance().evaluate(
+				executionEnvironment,
+				term);
+
+		if (conversionOperation instanceof ToBoolean) {
+			Object result = object2Boolean(op1, conversionOperation); // if null, it's undef!
+			return (result == null) ? (ValueKind.UNDEF_LITERAL) : (result);
+		} else if (conversionOperation instanceof ToString)
+			return op1.toString();
+		else if (conversionOperation instanceof ToInt) {
+			if (op1 instanceof Integer)
+				return op1;
+			else if (op1 instanceof Double)
+				return ((Double) op1).intValue();
+			else if (op1 instanceof String)
+				try {
+					return Integer.valueOf((String) op1);
+				} catch (NumberFormatException e) {
+					String[] context = {(String) op1,"Integer",conversionOperation.getName()};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.TERM_CAN_NOT_BE_CONVERTED
+							,context
+							,termToBeEvaluated);
+					//return ValueKind.UNDEF_LITERAL;
+				}
+			else if (op1 instanceof Boolean)
+				return (Boolean) op1 ? (Integer) 1 : (Integer) 0;
+			else if (ValueKind.UNDEF_LITERAL.equals(op1))
+				return ValueKind.UNDEF_LITERAL;
+			else
+				{
+				String[] context = {convertToJavaType(op1),conversionOperation.getName()};
+				throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_ONE_PARAM
+						,context
+						,termToBeEvaluated);
+				}
+
+		} else if (conversionOperation instanceof ToDouble) {
+			if (op1 instanceof Double)
+				return op1;
+			else if (op1 instanceof Integer)
+				return new Double(((Integer) op1).doubleValue());
+			else if (op1 instanceof String)
+				try {
+					return new Double((String) op1);
+				} catch (NumberFormatException e) {
+					String[] context = {(String) op1,"Double",conversionOperation.getName()};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.TERM_CAN_NOT_BE_CONVERTED
+							,context
+							,termToBeEvaluated);
+					//return ValueKind.UNDEF_LITERAL;
+				}
+			else if (op1 instanceof Boolean)
+				return (Boolean) op1 ? (Double) 1.0 : (Double) 0.0;
+			else if (ValueKind.UNDEF_LITERAL.equals(op1))
+				return ValueKind.UNDEF_LITERAL;
+			else
+				{
+				String[] context = {convertToJavaType(op1),conversionOperation.getName()};
+				throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_ONE_PARAM
+						,context
+						,termToBeEvaluated);
+				}
+		} else if (conversionOperation instanceof ToMultiplicity) {
+			if(op1 instanceof MultiplicityImpl)
+				return op1;
+			else if(op1 instanceof String)
+				{
+				String value = (String) op1;
+				
+				if(value.compareToIgnoreCase("one-to-one") == 0)
+					return MultiplicityKind.ONE_TO_ONE_LITERAL;
+				
+				if(value.compareToIgnoreCase("one-to-many") == 0)
+					return MultiplicityKind.ONE_TO_MANY_LITERAL;
+				
+				if(value.compareToIgnoreCase("many-to-one") == 0)
+					return MultiplicityKind.MANY_TO_ONE_LITERAL;
+					
+				if(value.compareToIgnoreCase("many-to-many") == 0)
+					return MultiplicityKind.MANY_TO_MANY_LITERAL;
+				
+				String[] context = {value,"Multiplicity",conversionOperation.getName()};
+				throw new TermInterpreterException(
+						TermInterpreterErrorString.TERM_CAN_NOT_BE_CONVERTED
+						,context
+						,termToBeEvaluated);
+				
+				}
+			else if (ValueKind.UNDEF_LITERAL.equals(op1))
+				return ValueKind.UNDEF_LITERAL;
+			else
+				{
+				String[] context = {convertToJavaType(op1),conversionOperation.getName()};
+				throw new TermInterpreterException(
+						TermInterpreterErrorString.TERM_NOT_MULTIPLICITY_COMPATIBLE
+						,context
+						,termToBeEvaluated);
+				}
+		}
+		// the control gets here, if a non-implemented Term was evaluated.
+		else
+			{
+			String[] context = {conversionOperation.getName()};
+			throw new TermInterpreterException(
+					TermInterpreterErrorString.UNIMP_CONVERSION
+					,context
+					,termToBeEvaluated);
+			}
+	}
+
+	protected Boolean object2Boolean(Object obj,ConversionOperation toBoolean)
+			throws TermInterpreterException  {
+		if (obj instanceof String) {
+			return "true".equals(obj) ? (Boolean.TRUE) : ("false"
+					.equals(obj) ? Boolean.FALSE : null);
+		} else if (obj instanceof Double) {
+			return (((Double) obj).equals(0.0)) ? Boolean.FALSE : Boolean.TRUE;
+		} else if (obj instanceof Integer) {
+			return (((Integer) obj).equals(0)) ? Boolean.FALSE : Boolean.TRUE;
+		} else if (obj instanceof Boolean) {
+			return (Boolean) obj;
+		} else if (obj.equals(ValueKind.UNDEF_LITERAL)) {
+			return Boolean.FALSE;
+
+		} else if (obj instanceof IModelElement) {
+			return Boolean.TRUE;
+		}
+		String[] context = {toBoolean.getName(),convertToJavaType(obj)};
+		throw new TermInterpreterException(
+				TermInterpreterErrorString.TERM_NOT_BOOL_COMPATIBLE
+				, context
+				, toBoolean);
+	}
+}
diff --git a/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/JavaNativeValue.java b/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/JavaNativeValue.java
new file mode 100644
index 0000000..1fef0cf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/JavaNativeValue.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.term.rules;
+
+/**
+ The class stores Java native objects that have been
+ received from evaluating a NativeFunctionInvocation.
+ * @author Peter Pasztor, Akos Horvath
+ *
+ */
+public class JavaNativeValue {
+	
+	private Object value;
+
+	public JavaNativeValue(Object object) {
+		value = object;
+	}
+
+	public Object getValue() {
+		return value;
+	}
+
+	public void setValue(Object value) {
+		this.value = value;
+	}
+}
diff --git a/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/ModelElementQueryEvaluator.java b/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/ModelElementQueryEvaluator.java
new file mode 100644
index 0000000..a596673
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/ModelElementQueryEvaluator.java
@@ -0,0 +1,265 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.term.rules;
+
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.term.internal.TermInterpreterErrorString;
+import org.eclipse.viatra2.gtasm.interpreter.term.internal.TermInterpreterException;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Aggregate;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.ElementReference;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.FullyQualifiedName;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Inverse;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Multiplicity;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Name;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Source;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Target;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Value;
+
+/**All model query operations evaluation are handled by the class
+ * @author Peter Pasztor, Akos Horvath
+ *
+ */
+public class ModelElementQueryEvaluator extends TermEvaluator {
+	private static ModelElementQueryEvaluator _instance = new ModelElementQueryEvaluator();
+
+	private ModelElementQueryEvaluator() {
+		;
+	}
+
+	public static ModelElementQueryEvaluator getInstance() {
+		return _instance;
+	}
+
+	@Override
+	public Object evaluate(IExecutionEnvironment executionEnvironment,
+			Term termToBeEvaluated) throws ViatraTransformationException {
+		ModelElementQuery modelElementQuery = (ModelElementQuery) termToBeEvaluated;
+		//evaluate the argument of the operation
+		Object result = TermEvaluator.getInstance().evaluate(
+				executionEnvironment, (modelElementQuery).getArgument());
+	
+		if (modelElementQuery instanceof Aggregate) {
+			
+			if (!(result instanceof IRelation)) {
+				if (ValueKind.UNDEF_LITERAL.equals(result))
+					{
+					String[] context = {modelElementQuery.getName()};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.REF_NOT_EXIST_MODELELEMENTQUERY
+							,context
+							,termToBeEvaluated);
+					}
+				else
+					{
+					String[] context = {modelElementQuery.getName(), convertToJavaType(result)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.REF_NOT_RELATION_MODELELEMENTQUERY
+							,context
+							,termToBeEvaluated);
+					}
+			}
+			return ((IRelation) result).getIsAggregation();
+		} else if (modelElementQuery instanceof FullyQualifiedName) {
+			// result is a model element right now - if it's correct...
+			if (!(result instanceof IModelElement)) {
+				if (ValueKind.UNDEF_LITERAL.equals(result))
+					{
+					String[] context = {modelElementQuery.getName()};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.REF_NOT_EXIST_MODELELEMENTQUERY
+							,context
+							,termToBeEvaluated);
+					}
+				else
+					{
+					String[] context = {modelElementQuery.getName(), convertToJavaType(result)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.REF_NOT_MODELELEMENT_MODELELEMENTQUERY
+							,context
+							,termToBeEvaluated);
+					}
+			}
+			return ((IModelElement) result).getFullyQualifiedName();
+		} else if (modelElementQuery instanceof Name) {
+			if (!(result instanceof IModelElement)) {
+				if (ValueKind.UNDEF_LITERAL.equals(result))
+					{
+					String[] context = {modelElementQuery.getName()};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.REF_NOT_EXIST_MODELELEMENTQUERY
+							,context
+							,termToBeEvaluated);
+					}
+				else
+					{
+					String[] context = {modelElementQuery.getName(), convertToJavaType(result)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.REF_NOT_MODELELEMENT_MODELELEMENTQUERY
+							,context
+							,termToBeEvaluated);
+					}
+			}
+			return ((IModelElement) result).getName();
+		}
+		else if (modelElementQuery instanceof ElementReference) {
+			// result is definitely not null
+			if (!(result instanceof String)) {
+				if (ValueKind.UNDEF_LITERAL.equals(result))
+					{
+					String[] context = {modelElementQuery.getName()};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.REF_NOT_EXIST_MODELELEMENTQUERY
+							,context
+							,termToBeEvaluated);
+					}
+				else
+					{
+					String[] context = {modelElementQuery.getName(), convertToJavaType(result)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.REF_NOT_STRING_MODELELEMENTQUERY
+							,context
+							,termToBeEvaluated);
+					}
+			}
+			result = executionEnvironment.getFramework().getTopmodel()
+					.getModelManager().getElementByName((String) result);
+
+			return result != null ? result : ValueKind.UNDEF_LITERAL;
+		} else if (modelElementQuery instanceof Value) {
+			if (!(result instanceof IEntity)) {
+				if (ValueKind.UNDEF_LITERAL.equals(result))
+					{
+					String[] context = {modelElementQuery.getName()};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.REF_NOT_EXIST_MODELELEMENTQUERY
+							,context
+							,termToBeEvaluated);
+					}
+				else
+					{
+					String[] context = {modelElementQuery.getName(), convertToJavaType(result)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.REF_NOT_ENTITY_MODELELEMENTQUERY
+							,context
+							,termToBeEvaluated);
+					}
+			}
+
+			return ((IEntity) result).getValue();
+
+		} else if (modelElementQuery instanceof Multiplicity) {
+			if (!(result instanceof IRelation)) {
+				if (ValueKind.UNDEF_LITERAL.equals(result))
+					{
+					String[] context = {modelElementQuery.getName()};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.REF_NOT_EXIST_MODELELEMENTQUERY
+							,context
+							,termToBeEvaluated);
+					}
+				else
+					{
+					String[] context = {modelElementQuery.getName(), convertToJavaType(result)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.REF_NOT_RELATION_MODELELEMENTQUERY
+							,context
+							,termToBeEvaluated);
+					}
+			}
+			return ((IRelation) result).getMultiplicity();
+		} else if (modelElementQuery instanceof Inverse) {
+			if (!(result instanceof IRelation)) {
+				if (ValueKind.UNDEF_LITERAL.equals(result))
+					{
+					String[] context = {modelElementQuery.getName()};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.REF_NOT_EXIST_MODELELEMENTQUERY
+							,context
+							,termToBeEvaluated);
+					}
+				else
+					{
+					String[] context = {modelElementQuery.getName(), convertToJavaType(result)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.REF_NOT_RELATION_MODELELEMENTQUERY
+							,context
+							,termToBeEvaluated);
+					}
+			}
+
+			return ((IRelation) result).getInverse();
+
+		} else if (modelElementQuery instanceof Target) {
+			if (!(result instanceof IRelation)) {
+				if (ValueKind.UNDEF_LITERAL.equals(result))
+					{
+					String[] context = {modelElementQuery.getName()};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.REF_NOT_EXIST_MODELELEMENTQUERY
+							,context
+							,termToBeEvaluated);
+					}
+				else
+					{
+					String[] context = {modelElementQuery.getName(), convertToJavaType(result)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.REF_NOT_RELATION_MODELELEMENTQUERY
+							,context
+							,termToBeEvaluated);
+					}
+			}
+
+			result = ((IRelation) result).getTo();
+			return result != null ? result : ValueKind.UNDEF_LITERAL;
+
+		} else if (modelElementQuery instanceof Source) {
+			if (!(result instanceof IRelation)) {
+				if (ValueKind.UNDEF_LITERAL.equals(result))
+					{
+					String[] context = {modelElementQuery.getName()};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.REF_NOT_EXIST_MODELELEMENTQUERY
+							,context
+							,termToBeEvaluated);
+					}
+				else
+					{
+					String[] context = {modelElementQuery.getName(), convertToJavaType(result)};
+					throw new TermInterpreterException(
+							TermInterpreterErrorString.REF_NOT_RELATION_MODELELEMENTQUERY
+							,context
+							,termToBeEvaluated);
+					}
+			}
+
+			result = ((IRelation) result).getFrom();
+			return result != null ? result : ValueKind.UNDEF_LITERAL;
+		}
+		else
+			{
+			String[] context = {modelElementQuery.getName()};
+			throw new TermInterpreterException(
+					TermInterpreterErrorString.UNIMP_MODELQUERY
+					,context
+					,termToBeEvaluated);
+			}
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/RelationalOperationEvaluator.java b/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/RelationalOperationEvaluator.java
new file mode 100644
index 0000000..9e1f890
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/RelationalOperationEvaluator.java
@@ -0,0 +1,645 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.term.rules;
+
+
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.term.internal.TermInterpreterErrorString;
+import org.eclipse.viatra2.gtasm.interpreter.term.internal.TermInterpreterException;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.MultiplicityKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.And;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Equals;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThan;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThanOrEqualTo;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThan;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThanOrEqualTo;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Not;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.NotEquals;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Or;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.RelationalOperation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.XOr;
+
+
+/**All relation operation evaluation are implemented by the class
+ * @author Peter Pasztor, Akos Horvath
+ *
+ */
+public class RelationalOperationEvaluator extends TermEvaluator {
+
+	private static RelationalOperationEvaluator _instance = new RelationalOperationEvaluator();
+
+	private RelationalOperationEvaluator() {
+		;
+	}
+
+	public static RelationalOperationEvaluator getInstance() {
+		return _instance;
+	}
+
+	@Override
+	public Object evaluate(IExecutionEnvironment executionEnvironment,
+			Term termToBeEvaluated) throws ViatraTransformationException  {
+		RelationalOperation relationalOperation = (RelationalOperation) termToBeEvaluated;
+
+		// Not is an operation with one parameter! Every other relational
+		// operations have two parameters.
+
+		if (relationalOperation instanceof Not) // only boolean is accepted
+		{
+			Object op1 = TermEvaluator.getInstance()
+			.evaluate(executionEnvironment,
+					(relationalOperation.getActualParameters()
+							.get(0)));
+			if(op1 instanceof Boolean)
+				return !((Boolean)op1);
+			else
+				{
+				String[] context = {relationalOperation.getName() ,convertToJavaType(op1)};
+				throw new TermInterpreterException(
+						TermInterpreterErrorString.TERM_NOT_BOOL_COMPATIBLE
+						, context
+						, relationalOperation);
+				}
+		}
+		// TODO: should the term be always evaluated? For example at an And
+		// operation, if the first parameter is false, it's unnecessary to
+		// evaluate the second parameter.
+
+		if (relationalOperation.getActualParameters().size() != 2)
+			{
+			String[] context = {relationalOperation.getName()};
+			throw new TermInterpreterException(TermInterpreterErrorString.PARAM_NUM_RELATIONAL
+					,context
+					,relationalOperation);
+			}
+
+		// First we have to evaluate both parameters, and then perform the
+		// operation.
+
+		Object op1 = TermEvaluator.getInstance().evaluate(
+				executionEnvironment,
+				(relationalOperation.getActualParameters().get(0)));
+		Object op2 = TermEvaluator.getInstance().evaluate(
+				executionEnvironment,
+				(relationalOperation.getActualParameters().get(1)));
+
+		if (relationalOperation instanceof And) {
+			if (op1 instanceof Boolean) {
+				if (op2 instanceof Boolean)
+					return ((Boolean) op1) && ((Boolean) op2);
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+						throw new TermInterpreterException(
+							TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+							context,
+							termToBeEvaluated);
+					}
+			} else if (op1 instanceof MultiplicityKind) {
+				if (((MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op1)) && (op2 instanceof MultiplicityKind))
+						|| ((MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op2)) && (op1 instanceof MultiplicityKind))
+						|| ((MultiplicityKind.ONE_TO_MANY_LITERAL.equals(op1)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+								.equals(op2)))
+						|| ((MultiplicityKind.ONE_TO_MANY_LITERAL.equals(op2)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+								.equals(op1))))
+					return MultiplicityKind.ONE_TO_ONE_LITERAL;
+
+				else if (((MultiplicityKind.MANY_TO_MANY_LITERAL.equals(op1)) && (MultiplicityKind.ONE_TO_MANY_LITERAL
+						.equals(op2)))
+						|| ((MultiplicityKind.MANY_TO_MANY_LITERAL.equals(op2)) && (MultiplicityKind.ONE_TO_MANY_LITERAL
+								.equals(op1)))
+						|| ((MultiplicityKind.ONE_TO_MANY_LITERAL.equals(op1)) && (MultiplicityKind.ONE_TO_MANY_LITERAL
+								.equals(op2))))
+					return MultiplicityKind.ONE_TO_MANY_LITERAL;
+				else if (((MultiplicityKind.MANY_TO_MANY_LITERAL.equals(op1)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+						.equals(op2)))
+						|| ((MultiplicityKind.MANY_TO_MANY_LITERAL.equals(op2)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+								.equals(op1)))
+						|| ((MultiplicityKind.MANY_TO_ONE_LITERAL.equals(op1)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+								.equals(op2))))
+					return MultiplicityKind.MANY_TO_ONE_LITERAL;
+				else if (((MultiplicityKind.MANY_TO_MANY_LITERAL.equals(op1)) && (MultiplicityKind.MANY_TO_MANY_LITERAL
+						.equals(op2))))
+					return MultiplicityKind.MANY_TO_MANY_LITERAL;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+			} else
+				{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+				throw new TermInterpreterException(
+					TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_1,
+					context,
+					termToBeEvaluated);
+				}
+		} else if (relationalOperation instanceof Or) {
+			if (op1 instanceof Boolean) {
+				if (op2 instanceof Boolean)
+					return ((Boolean) op1) || ((Boolean) op2);
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+			} else if (op1 instanceof MultiplicityKind) {
+				if (((MultiplicityKind.MANY_TO_MANY_LITERAL.equals(op1)) && (op2 instanceof MultiplicityKind))
+						|| ((MultiplicityKind.MANY_TO_MANY_LITERAL.equals(op2)) && (op1 instanceof MultiplicityKind))
+						|| ((MultiplicityKind.ONE_TO_MANY_LITERAL.equals(op1)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+								.equals(op2)))
+						|| ((MultiplicityKind.ONE_TO_MANY_LITERAL.equals(op2)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+								.equals(op1))))
+					return MultiplicityKind.MANY_TO_MANY_LITERAL;
+
+				else if (((MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op1)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+						.equals(op2)))
+						|| ((MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op2)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+								.equals(op1)))
+						|| ((MultiplicityKind.MANY_TO_ONE_LITERAL.equals(op1)) && (MultiplicityKind.MANY_TO_ONE_LITERAL
+								.equals(op2))))
+					return MultiplicityKind.MANY_TO_ONE_LITERAL;
+				else if (((MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op1)) && (MultiplicityKind.ONE_TO_MANY_LITERAL
+						.equals(op2)))
+						|| ((MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op2)) && (MultiplicityKind.ONE_TO_MANY_LITERAL
+								.equals(op1)))
+						|| ((MultiplicityKind.ONE_TO_MANY_LITERAL.equals(op1)) && (MultiplicityKind.ONE_TO_MANY_LITERAL
+								.equals(op2))))
+					return MultiplicityKind.ONE_TO_MANY_LITERAL;
+				else if (((MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op1)) && (MultiplicityKind.ONE_TO_ONE_LITERAL
+						.equals(op2))))
+					return MultiplicityKind.ONE_TO_ONE_LITERAL;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+			} else
+				{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+				throw new TermInterpreterException(
+					TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_1,
+					context,
+					termToBeEvaluated);
+				}
+		} else if (relationalOperation instanceof XOr) {
+			if (op1 instanceof Boolean) {
+				if (op2 instanceof Boolean)
+					return !((Boolean) op1).equals((op2));
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+			} else
+				{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+				throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_1,
+						context,
+						termToBeEvaluated);
+				}
+		} else if (relationalOperation instanceof NotEquals) // Valid for any
+																// type.
+		{
+			if (op1 instanceof Integer) {
+				if (op2 instanceof Double)
+					return (((Integer) op1).intValue() != ((Double) op2)
+							.doubleValue());
+				else
+					return !(op1.equals(op2));
+			} else if (op1 instanceof Double) {
+				if (op2 instanceof Integer)
+					return (((Double) op1).doubleValue() != ((Integer) op2)
+							.intValue());
+				else
+					return !(op1.equals(op2));
+			} else
+				return !(op1.equals(op2));
+		} else if (relationalOperation instanceof Equals) // Valid for any
+															// type.
+		{
+			if (op1 instanceof Integer) {
+				if (op2 instanceof Double)
+					return (((Integer) op1).intValue() == ((Double) op2)
+							.doubleValue());
+				else
+					return (op1.equals(op2));
+			} else if (op1 instanceof Double) {
+				if (op2 instanceof Integer)
+					return (((Double) op1).doubleValue() == ((Integer) op2)
+							.intValue());
+				else
+					return (op1.equals(op2));
+			} else
+				return (op1.equals(op2));
+
+		} else if (relationalOperation instanceof LessThan) {
+			if (op1 instanceof Integer) {
+				if (op2 instanceof Integer)
+					return ((Integer) op1) < ((Integer) op2);
+				else if (op2 instanceof Double)
+					return (Double.valueOf((((Integer) op1).doubleValue())) < ((Double) op2));
+				else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+			} else if (op1 instanceof Double) {
+				if (op2 instanceof Integer)
+					return ((Double) op1) < (new Double(((Integer) op2)));
+				else if (op2 instanceof Double)
+					return ((Double) op1) < ((Double) op2);
+				else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+			} else if (op1 instanceof String) {
+				if (op2 instanceof String)
+					return ((((String) op1).compareTo(((String) op2))) < 0);
+				else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+			} else if (op1 instanceof Boolean) {
+				if (op2 instanceof Boolean)
+					return !((Boolean) op1) ? (((Boolean) op2)) : Boolean.FALSE;
+				else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+			} else if (op1 instanceof MultiplicityKind) {
+				if (op2 instanceof MultiplicityKind) {
+					if (MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op1)
+							&& !MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op2))
+						return Boolean.TRUE;
+					else if (MultiplicityKind.MANY_TO_ONE_LITERAL.equals(op1)
+							&& MultiplicityKind.MANY_TO_MANY_LITERAL
+									.equals(op2))
+						return Boolean.TRUE;
+					else if (MultiplicityKind.ONE_TO_MANY_LITERAL.equals(op1)
+							&& MultiplicityKind.MANY_TO_MANY_LITERAL
+									.equals(op2))
+						return Boolean.TRUE;
+					else
+						return Boolean.FALSE;
+				} else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+
+			} else if (ValueKind.UNDEF_LITERAL.equals(op1))
+				return Boolean.FALSE;
+			else
+				{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+				throw new TermInterpreterException(
+					TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_1,
+					context,
+					termToBeEvaluated);
+				}
+
+		} else if (relationalOperation instanceof GreaterThan) {
+			if (op1 instanceof Integer) {
+				if (op2 instanceof Integer)
+					return ((Integer) op1) > ((Integer) op2);
+				else if (op2 instanceof Double)
+					return (Double.valueOf((((Integer) op1).doubleValue())) > ((Double) op2));
+				else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+			} else if (op1 instanceof Double) {
+				if (op2 instanceof Integer)
+					return ((Double) op1) > (new Double(((Integer) op2)));
+				else if (op2 instanceof Double)
+					return ((Double) op1) > ((Double) op2);
+				else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+				
+			} else if (op1 instanceof String) {
+				if (op2 instanceof String)
+					return ((((String) op1).compareTo(((String) op2))) > 0);
+				else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+			} else if (op1 instanceof Boolean) {
+				if (op2 instanceof Boolean)
+					return ((Boolean) op1) ? (!((Boolean) op2)) : Boolean.FALSE;
+				else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+			} else if (op1 instanceof MultiplicityKind) {
+				if (op2 instanceof MultiplicityKind) {
+					if (MultiplicityKind.MANY_TO_MANY_LITERAL.equals(op1)
+							&& !MultiplicityKind.MANY_TO_MANY_LITERAL
+									.equals(op2))
+						return Boolean.TRUE;
+					else if (MultiplicityKind.ONE_TO_MANY_LITERAL.equals(op1)
+							&& MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op2))
+						return Boolean.TRUE;
+					else if (MultiplicityKind.MANY_TO_ONE_LITERAL.equals(op1)
+							&& MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op2))
+						return Boolean.TRUE;
+					else
+						return Boolean.FALSE;
+				} else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+			} else if (ValueKind.UNDEF_LITERAL.equals(op1))
+				return Boolean.FALSE;
+			else
+				{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+				throw new TermInterpreterException(
+					TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_1,
+					context,
+					termToBeEvaluated);
+				}
+
+		} else if (relationalOperation instanceof LessThanOrEqualTo) {
+			if (op1 instanceof Integer) {
+				if (op2 instanceof Integer)
+					return ((Integer) op1) <= ((Integer) op2);
+				else if (op2 instanceof Double)
+					return (Double.valueOf((((Integer) op1).doubleValue())) <= ((Double) op2));
+				else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+			} else if (op1 instanceof Double) {
+				if (op2 instanceof Integer)
+					return ((Double) op1) <= (new Double(((Integer) op2)));
+				else if (op2 instanceof Double)
+					return ((Double) op1) <= ((Double) op2);
+				else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+
+			} else if (op1 instanceof String) {
+				if (op2 instanceof String)
+					return Boolean.valueOf(((((String) op2)
+							.indexOf(((String) op1))) != -1));
+				else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+			} else if (op1 instanceof Boolean) {
+				if (op2 instanceof Boolean)
+					return ((Boolean) op1) ? (((Boolean) op2)) : Boolean.TRUE;
+				else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+			} else if (op1 instanceof MultiplicityKind) {
+				if (op2 instanceof MultiplicityKind) {
+					if (MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op1)
+							&& !MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op2))
+						return Boolean.TRUE;
+					else if (MultiplicityKind.MANY_TO_ONE_LITERAL.equals(op1)
+							&& MultiplicityKind.MANY_TO_MANY_LITERAL
+									.equals(op2))
+						return Boolean.TRUE;
+					else if (MultiplicityKind.ONE_TO_MANY_LITERAL.equals(op1)
+							&& MultiplicityKind.MANY_TO_MANY_LITERAL
+									.equals(op2))
+						return Boolean.TRUE;
+					else if (op1.equals(op2))
+						return Boolean.TRUE;
+					else
+						return Boolean.FALSE;
+				} else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+
+			} else if (ValueKind.UNDEF_LITERAL.equals(op1))
+				return Boolean.FALSE;
+			else
+				{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+				throw new TermInterpreterException(
+					TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_1,
+					context,
+					termToBeEvaluated);
+				}
+
+		} else if (relationalOperation instanceof GreaterThanOrEqualTo) {
+			if (op1 instanceof Integer) {
+				if (op2 instanceof Integer)
+					return ((Integer) op1) >= ((Integer) op2);
+				else if (op2 instanceof Double)
+					return (Double.valueOf((((Integer) op1).doubleValue())) >= ((Double) op2));
+				else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+			} else if (op1 instanceof Double) {
+				if (op2 instanceof Integer)
+					return ((Double) op1) >= (new Double(((Integer) op2)));
+				else if (op2 instanceof Double)
+					return ((Double) op1) >= ((Double) op2);
+				else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+
+			} else if (op1 instanceof String) {
+				if (op2 instanceof String)
+					return Boolean.valueOf(((((String) op1)
+							.indexOf(((String) op2))) != -1));
+				else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+			} else if (op1 instanceof Boolean) {
+				if (op2 instanceof Boolean)
+					return ((Boolean) op1) ? Boolean.TRUE : (!((Boolean) op2));
+				else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+			} else if (op1 instanceof MultiplicityKind) {
+				if (op2 instanceof MultiplicityKind) {
+					if (MultiplicityKind.MANY_TO_MANY_LITERAL.equals(op1)
+							&& !MultiplicityKind.MANY_TO_MANY_LITERAL
+									.equals(op2))
+						return Boolean.TRUE;
+					else if (MultiplicityKind.ONE_TO_MANY_LITERAL.equals(op1)
+							&& MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op2))
+						return Boolean.TRUE;
+					else if (MultiplicityKind.MANY_TO_ONE_LITERAL.equals(op1)
+							&& MultiplicityKind.ONE_TO_ONE_LITERAL.equals(op2))
+						return Boolean.TRUE;
+					else if (op1.equals(op2))
+						return Boolean.TRUE;
+					else
+						return Boolean.FALSE;
+				} else if (ValueKind.UNDEF_LITERAL.equals(op2))
+					return Boolean.FALSE;
+				else
+					{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+					throw new TermInterpreterException(
+						TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_2,
+						context,
+						termToBeEvaluated);
+					}
+			} else if (ValueKind.UNDEF_LITERAL.equals(op1))
+				return Boolean.FALSE;
+			else
+				{String[] context = {relationalOperation.getName(),convertToJavaType(op1), convertToJavaType(op2)};
+				throw new TermInterpreterException(
+					TermInterpreterErrorString.PARAM_NOT_SUITABLE_WITH_OPERATION_1,
+					context,
+					termToBeEvaluated);
+				}
+
+		}
+		// The control can only get here, if it was a not implemented
+		// RelationalOperation
+		else
+			{String[] context = {relationalOperation.getName()};
+			throw new TermInterpreterException(
+					TermInterpreterErrorString.UNIMP_RELATIONAL,
+					context,
+					termToBeEvaluated);
+			}
+	}
+
+	/*protected Boolean object2Boolean(Object obj, RelationalOperation not)
+			throws TermInterpreterException  {
+		if (obj instanceof String) {
+			return "true".equals((String) obj) ? (Boolean.TRUE) : ("false"
+					.equals((String) obj) ? Boolean.FALSE : null);
+		} else if (obj instanceof Double) {
+			return (((Double) obj).equals(0.0)) ? Boolean.FALSE : Boolean.TRUE;
+		} else if (obj instanceof Integer) {
+			return (((Integer) obj).equals(0)) ? Boolean.FALSE : Boolean.TRUE;
+		} else if (obj instanceof Boolean) {
+			return (Boolean) obj;
+		} else if (obj.equals(ValueKind.UNDEF_LITERAL)) {
+			return Boolean.FALSE;
+
+		} else if (obj instanceof IModelElement) {
+			return Boolean.TRUE;
+		}
+		String[] context = {not.getName() ,convertToJavaType(obj)};
+		throw new TermInterpreterException(
+				TermInterpreterErrorString.TERM_NOT_BOOL_COMPATIBLE
+				, context
+				, not);
+	}*/
+}
diff --git a/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/TermEvaluator.java b/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/TermEvaluator.java
new file mode 100644
index 0000000..cc57d59
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter.term/src/org/eclipse/viatra2/gtasm/interpreter/term/rules/TermEvaluator.java
@@ -0,0 +1,179 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under theterms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.term.rules;
+
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ArithmeticOperation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ConversionOperation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.RelationalOperation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Multiplicity;
+
+/**
+ * This class is used to evaluate terms in the GTASM machine.
+ * 
+ * @author Peter Pasztor, Akos Horvath
+ * 
+ */
+
+public class TermEvaluator {
+	private static TermEvaluator _instance = new TermEvaluator();
+
+	TermEvaluator() {}
+
+	public static TermEvaluator getInstance() {
+		return _instance;
+	}
+
+	/**
+	 * Evaluates the given term
+	 * 
+	 * @param org.eclipse.viatra2.gtasm.interpreter.executionEnvironment
+	 *            The execution environment on which the term has to be
+	 *            evaluated
+	 * @param termToBeEvaluated
+	 *            The term to be evaluated
+	 * @return The result of the term evaluation
+	 * @throws ViatraTransformationException
+	 */
+	public Object evaluate(IExecutionEnvironment executionEnvironment,
+			Term termToBeEvaluated) throws ViatraTransformationException {
+		if (termToBeEvaluated instanceof ArithmeticOperation) {
+			// call the ArithmeticOperationEvaluator...
+			return (ArithmeticOperationEvaluator.getInstance().evaluate(
+					executionEnvironment,
+					termToBeEvaluated));
+		} else if (termToBeEvaluated instanceof ConversionOperation) {
+			return ConversionOperationEvaluator.getInstance().evaluate(
+					executionEnvironment, termToBeEvaluated);
+		} else if (termToBeEvaluated instanceof RelationalOperation) {
+			return RelationalOperationEvaluator.getInstance().evaluate(
+					executionEnvironment, termToBeEvaluated);
+		} else if (termToBeEvaluated instanceof ModelElementQuery) {
+			return ModelElementQueryEvaluator.getInstance().evaluate(
+					executionEnvironment, termToBeEvaluated);
+		} else if (null == termToBeEvaluated) {
+			// TODO: this is a hack. The parser returns null instead
+			// ValueKind.UNDEF_LITERAL when finding an undef constant.
+			return ValueKind.UNDEF_LITERAL;
+		} else {
+			return BasicTermEvaluator.getInstance().evaluate(
+					executionEnvironment, termToBeEvaluated);
+		}
+
+	}
+
+//	/**
+//	 * This method tries to convert a String to an arithmetic value.
+//	 * 
+//	 * At first it tries to convert is to Integer, then it tries to convert it
+//	 * to Double. If it fails, throws a TermEvaluatorException.
+//	 * 
+//	 * @return Integer or Double according to the String itself.
+//	 * @throws GTASMException
+//	 */
+//	public Object convertStringToArithmeticValue(String str)
+//			throws ViatraTransformationException {
+//		try {
+//			return new Integer(str);
+//		} catch (NumberFormatException e) {
+//			try {
+//				return new Double(str);
+//			} catch (NumberFormatException e1) {
+//				throw new TermInterpreterException("String \"" + str
+//						+ "\" is not a valid arithmetic value!", null);
+//			}
+//		}
+//	}
+
+	/** Returns true if the input Object o is a Native Java type, else false
+	 * @param o The input object to be checked.
+	 * @return 
+	 */
+	public Boolean isASMNativeType(Object o) {
+		if (o instanceof String || o instanceof Integer || o instanceof Double
+				|| o instanceof Boolean || o instanceof Multiplicity
+				|| ValueKind.UNDEF_LITERAL.equals(o)
+				|| o instanceof IModelElement)
+			return Boolean.TRUE;
+
+		return Boolean.FALSE;
+	}
+	
+	
+	/**Returns the type of the input parameter in a serialized form
+	 * @param obj The object whose type is returned
+	 * @return The java type in serialized form.
+	 */
+	protected String convertToJavaType(Object obj){
+		
+		if(obj == null)
+			return "null";
+		
+		if(obj instanceof String)
+			return "String";
+		if(obj instanceof Integer)
+			return "Integer";
+		if(obj instanceof Double)
+			return "Double";
+		if(obj instanceof Boolean)
+			return "Boolean";
+		if(obj instanceof Multiplicity)
+			return "Multiplicity";
+		if(ValueKind.UNDEF_LITERAL.equals(obj))
+			return "UNDEF";
+		if(obj instanceof IRelation)
+			return "Relation (ModelElement)";
+		if(obj instanceof IEntity)
+			return "Entity (ModelElement)";
+		if(obj instanceof JavaNativeValue)
+			return "JavaNativeValue";
+		
+		return "unknown type";
+	}
+
+	/** Converts the input type to its corresponding Java type String
+	 * @param type The type to be converted
+	 * @return The java equivalent type
+	 * @throws ViatraCompiledCompileTimeException
+	 */
+	public String convertValueKindtoJavaType(ValueKind type){
+		
+		if(type == null)
+			return "null";
+		
+		if(type.equals(ValueKind.BOOLEAN_LITERAL))
+			return "Boolean";
+		if(type.equals(ValueKind.DOUBLE_LITERAL))
+			return "Double";
+		if(type.equals(ValueKind.INTEGER_LITERAL))
+			return "Integer";
+		if(type.equals(ValueKind.MODELELEMENT_LITERAL))
+			return "EObject";
+		if(type.equals(ValueKind.MULTIPLICITY_LITERAL))
+			return "[Multiplicity]";
+		if(type.equals(ValueKind.STRING_LITERAL))
+			return "String";
+		// it is a ModelElement!!
+		if(type.equals(ValueKind.UNDEF_LITERAL))
+			return "Object";
+		
+		return "error: unknown type";
+	}
+}
diff --git a/org.eclipse.viatra2.gtasm.interpreter/.classpath b/org.eclipse.viatra2.gtasm.interpreter/.classpath
new file mode 100644
index 0000000..ad32c83
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.viatra2.gtasm.interpreter/.project b/org.eclipse.viatra2.gtasm.interpreter/.project
new file mode 100644
index 0000000..06398cc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/.project
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.viatra2.gtasm.interpreter</name>
+	<comment></comment>
+	<projects>
+		<project>viatra_gtasm_emf_model</project>
+		<project>viatra_pattern_matcher</project>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.viatra2.gtasm.interpreter/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra2.gtasm.interpreter/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..3da5ac9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Wed Jan 12 11:17:33 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.6
diff --git a/org.eclipse.viatra2.gtasm.interpreter/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.viatra2.gtasm.interpreter/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..7854eca
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,4 @@
+#Tue Aug 01 08:50:24 CEST 2006
+eclipse.preferences.version=1
+internal.default.compliance=default
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
diff --git a/org.eclipse.viatra2.gtasm.interpreter/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.eclipse.viatra2.gtasm.interpreter/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000..f3391b2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Thu Aug 03 02:30:54 CEST 2006
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/org.eclipse.viatra2.gtasm.interpreter/.settings/org.eclipse.wst.validation.prefs b/org.eclipse.viatra2.gtasm.interpreter/.settings/org.eclipse.wst.validation.prefs
new file mode 100644
index 0000000..db982d7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/.settings/org.eclipse.wst.validation.prefs
@@ -0,0 +1,6 @@
+#Thu Aug 03 02:30:54 CEST 2006
+DELEGATES_PREFERENCE=delegateValidatorListorg.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator\=org.eclipse.wst.wsdl.validation.internal.eclipse.Validator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator\=org.eclipse.wst.xsd.core.internal.validation.eclipse.Validator;
+USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.jst.jsp.core.internal.validation.JSPJavaValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPDirectiveValidator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPELValidator;
+USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.jst.jsp.core.internal.validation.JSPJavaValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPDirectiveValidator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPELValidator;
+USER_PREFERENCE=overrideGlobalPreferencesfalse
+eclipse.preferences.version=1
diff --git a/org.eclipse.viatra2.gtasm.interpreter/META-INF/MANIFEST.MF b/org.eclipse.viatra2.gtasm.interpreter/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..ed4210e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: VIATRA2 R3 ASM Interpreter
+Bundle-SymbolicName: org.eclipse.viatra2.gtasm.interpreter;singleton:=true
+Bundle-Version: 3.3.0.qualifier
+Require-Bundle: org.eclipse.viatra2.core2;visibility:=reexport,
+ org.eclipse.viatra2.gtasm.model;visibility:=reexport,
+ org.eclipse.core.runtime
+Export-Package: org.eclipse.viatra2.gtasm.interpreter.exception,
+ org.eclipse.viatra2.gtasm.interpreter.executionEnvironment,
+ org.eclipse.viatra2.gtasm.interpreter.extension
+Bundle-Vendor: BUTE-FTSRG
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-Activator: org.eclipse.viatra2.gtasm.interpreter.internal.ViatraGTASMInterpreterPlugin
diff --git a/org.eclipse.viatra2.gtasm.interpreter/about.html b/org.eclipse.viatra2.gtasm.interpreter/about.html
new file mode 100644
index 0000000..1262b8c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/about.html
@@ -0,0 +1,28 @@
+<!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>About</title>

+</head>

+<body lang="EN-US">

+<h2>About This Content</h2>

+ 

+<p>July 4th, 2008</p>	

+<h3>License</h3>

+

+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 

+indicated below, the Content 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 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>If you did not receive this Content directly from the Eclipse Foundation, the Content is 

+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may

+apply to your use of any object code in the Content.  Check the Redistributor's license that was 

+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise

+indicated below, the terms and conditions of the EPL still apply to any source code in the Content

+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>

+

+</body>

+</html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gtasm.interpreter/build.properties b/org.eclipse.viatra2.gtasm.interpreter/build.properties
new file mode 100644
index 0000000..5fd9a19
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/build.properties
@@ -0,0 +1,7 @@
+bin.includes = META-INF/,\
+               plugin.xml,\
+               .,\
+               schema/
+
+source.. = src/
+src.includes = schema/
diff --git a/org.eclipse.viatra2.gtasm.interpreter/plugin.xml b/org.eclipse.viatra2.gtasm.interpreter/plugin.xml
new file mode 100644
index 0000000..5296251
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/plugin.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin

+>
+   <extension-point id="nativeasmrule" name="Native ASM Rule" schema="schema/org.eclipse.viatra2.gtasm.interpreter.nativeasmrule.exsd"/>
+</plugin>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gtasm.interpreter/schema/org.eclipse.viatra2.gtasm.interpreter.nativeasmrule.exsd b/org.eclipse.viatra2.gtasm.interpreter/schema/org.eclipse.viatra2.gtasm.interpreter.nativeasmrule.exsd
new file mode 100644
index 0000000..4c69482
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/schema/org.eclipse.viatra2.gtasm.interpreter.nativeasmrule.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>

+<!-- Schema file written by PDE -->

+<schema targetNamespace="org.eclipse.viatra2.gtasm.interpreter" xmlns="http://www.w3.org/2001/XMLSchema">

+<annotation>

+      <appInfo>

+         <meta.schema plugin="org.eclipse.viatra2.gtasm.interpreter" id="nativeasmrule" name="Native ASM Rule"/>

+      </appInfo>

+      <documentation>

+         [Enter description of this extension point.]

+      </documentation>

+   </annotation>

+

+   <element name="extension">

+      <annotation>

+         <appInfo>

+            <meta.element />

+         </appInfo>

+      </annotation>

+      <complexType>

+         <sequence minOccurs="1" maxOccurs="unbounded">

+            <element ref="nativeasmrule"/>

+         </sequence>

+         <attribute name="point" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appInfo>

+                  <meta.attribute translatable="true"/>

+               </appInfo>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <element name="nativeasmrule">

+      <complexType>

+         <attribute name="class" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appInfo>

+                  <meta.attribute kind="java" basedOn=":org.eclipse.viatra2.gtasm.interpreter.extension.INativeASMRule"/>

+               </appInfo>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="since"/>

+      </appInfo>

+      <documentation>

+         [Enter the first release in which this extension point appears.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="examples"/>

+      </appInfo>

+      <documentation>

+         [Enter extension point usage example here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="apiinfo"/>

+      </appInfo>

+      <documentation>

+         [Enter API information here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="implementation"/>

+      </appInfo>

+      <documentation>

+         [Enter information about supplied implementation of this extension point.]

+      </documentation>

+   </annotation>

+

+

+</schema>

diff --git a/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/exception/ASMInterpreterErrorStrings.java b/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/exception/ASMInterpreterErrorStrings.java
new file mode 100644
index 0000000..1150aba
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/exception/ASMInterpreterErrorStrings.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.exception;
+
+public class ASMInterpreterErrorStrings {
+
+	public static final String VPM_CORE = "[INTERNAL ERROR] VPM Core exception caught: {1}";
+	public static final String ENTRYPOINT_PARAMETERS_INITILAZIATION_FAILED = "Error initializing the parameters of the {1} entrypoint rule:";
+	public static final String FATAL_ERROR = "[INTERNAL ERROR] A FATAL error occured during the execution of the {1} rule.";
+	public static final String ANNOTATION_ILLEGAL = "[INTERNAL ERROR] Illegal Annoation for the rule could not be cast to RunTimeAnnotation: {1}";
+	public static final String CODEOUT_ERROR = "Error while writing to the codeout buffer: {1}";
+	public static final String RULE_UNIMPL = "'{1}' ASM Rule type is not supported.";
+	
+	public static final String SCOPE_NOT_AN_ENTITY = "The {1} Scope is not an Entity";
+	public static final String SCOPE_NOT_SCOPE = "Referenced Element for Scope does not exist!";
+	public static final String SCOPE_NOT_MODELELEMENT = "Referenced Element for Scope is not a Model Element!";
+
+	public static final String ASMRULE_PARAM_IN_INOUT_NOT_VARREF = "The input of the {1} '{2}' symbolic parameter of the {3} ASM rule is not a variable";
+	public static final String ASMRULE_PARAM_OUT_INOUT_MULTIPLE_REF = "The {1} input variable is referred the second time as an {2} parameter";
+	public static final String ASMRULE_PARAM_IN_NOT_BOUND = "The input value of the {1} 'IN' symbolic parameter of the {2} ASM rule is not bound";
+	public static final String PARAM_EXCPECTED_PARENT = "Entity excepted as the container (parent) element! ";
+	
+	public static final String ADD_EXISTING_VAR = "Tried to add the {1} variable twice to the execution environment.";
+	public static final String VALUE_OF_NOT_EXISTING_VAR = "Tried to get the value of the {1} variable that has not been declared in the execution environment.";
+	public static final String SET_VALUE_NOT_EXISTING_VAR = "Tried to set the vallue of the {1} non-existent variable. ";
+	//public static final String SET_VAR_VALUE = "Error at setting variable value: ";
+	public static final String SET_VAR_VALUE_AFTER_ASMRULE_CALL = "Error at setting the value of the {1} variable after returning from the {2} ASM rule call: {3}";
+	public static final String SET_VAR_VALUE_AFTER_NATIVE_CALL = "Error at setting the value of the {1} variable after returning from the {2} native ASM rule call: {3}";
+	public static final String SET_VAR_VALUE_AFTER_LET_RULE = "Error at setting the value of the {1} variable after returning from the let rule: {3}";
+	public static final String SET_VAR_VALUE_AFTER_UPDATE_RULE = "Error at setting the value of the {1} variable by the update rule: {2}";
+	public static final String SET_VAR_VALUE_AFTER_MODEL_MANPULATION_RULE= "Error at setting the value of the {1} variable by the {2} model manipulation rule: {3}";
+	
+	
+	public static final String RULE_INIT_VAR_ASMFUNCTION = "Error at setting the initial value of the {1} variable: {2} ";
+	public static final String RULE_INIT_VAR_PARALLEL_FORALL= "Error at setting the initial value of the {1} variable in the parallel forall execution context: {2} ";
+	public static final String RULE_INIT_VAR_FORALL= "Error at setting the initial value of the {1} variable in the forall execution context: {2} ";
+	public static final String RULE_INIT_VAR_CHOOSE= "Error at setting the initial value of the {1} variable in the choose execution context: {2} ";
+
+	public static final String NATIVE_ASMRULE_DOES_NOT_EXIST = "No native ASM rule extension is available with the following id: {1}";
+	public static final String NATIVE_ASMRULE_EXECUTION_ERROR = "Fatal Exception occured during the execution of the invoked {1} Native ASM rule with the following message: \n {2}";
+	
+	public static final String BLOCKRULE_PARAMS_NOT_USED = " The {1} variable is quantified but not used in the {2}.";
+	public static final String BLOCKRULE_PARAM_NOT_QUANTIFIED = "As the {1}. parameter is not quantified by the forall/choose rule it must be an INPUT parameter with a non-UNDEF value.";
+
+	public static final String GTINPUT_QUANTIFIED_NOTIN_LHS = "The {1} variable is quantified but not used in the LHS of the {2} gtRule";
+	public static final String GTOUTPUT_IN_INOUT_NOT_BOUND = "The {1} variable is not bound after the execution of the {2} gtrule";
+	public static final String GTINPUT_IN = "The value of the {1} variable can not be 'UNDEF' as it is an INPUT parameter for the {2} gtRule";
+	public static final String GTINPUT_OUT = "The OUTPUT {1} parameter of the {2} gtRule is invoked with a nonvariable parameter, thus the output value of the gtrule invocation cannot be written into the caller variable";
+
+	
+	public static final String PARAM_EXCEPTED_TYPE = "{1} excepted as the {2} parameter of the {3} rule instead of {4}.";
+	public static final String PARAM_EXCEPTED_TYPE_UNDEF = "The '{1}' parameter of the {2} rule can not be UNDEF";
+	
+	public static final String UPDATE_NONEXISTENT_ASMFUNCTION = "Trying to update the {1} non-existent ASMFunction";
+	
+	public static final String MODEL_MANIPULATION_NOTYPE = "TYPE (instanceof) Element of the {1} model manipulation operation does not exit in the modelspace";
+	public static final String MACHINE_WITHOUT_MAIN_RULE = "The invoked machine does not have a main rule: ";
+	public static final String PRINTRULE_NOBUFFER = "The required buffer cannot be loaded. The required buffer evaluted to {1}.";
+	
+	
+	
+	
+//	public static final String PARAM_NAME_UNDEF = "Parameter Name\" is undefined! ";
+//	public static final String PARAM_NOT_STRING = "Parameter didn't evaluate to a String type ";
+//	public static final String PARAM_NOT_MULTIPLICITY = "Parameter didn't evaluate to a Multiplicity type, but to type: ";
+//	public static final String PARAM_EXCPECTED_STRING = "String expected at parameter no: ";
+//	public static final String PARAM_EXCPECTED_INTEGER = "Integer expected at parameter no: ";
+//	public static final String PARAM_EXCPECTED_DOUBLE = "Double expected at parameter no: ";
+//	public static final String PARAM_EXCPECTED_MULTIPLICITY = "Multiplicity expected at parameter no: ";
+//	public static final String PARAM_EXCPECTED_MODELELEMENT = "Model element expected at parameter no: ";
+//	public static final String PARAM_EXCPECTED_BOOLEAN = "Boolean expected at parameter no: ";
+//	public static final String PARAM_EXCPECTED_ENTITY = "Entity expected at parameter no: ";
+//	public static final String PARAM_EXCPECTED_RELATION = "Relation expected at parameter no: ";
+	
+//	public static final String PATTERNMATCHER = "PatternMatcher error:";
+//	public static final String GTMATCHER = "GTMatcher error:";
+	
+	// public static String GTIN_OUTDIFFERENCE ="An input parameter was changed
+	// during the GT rule matching: ";
+	// public static String GTINPUT_OUT ="'s value must be 'UNDEF' as it is an
+	// OUTPUT parameter for the ";
+	
+//	public static final String RELATIONAL_PARAM_UNSUITABLE = "The combination of the relational operation's parameters is incorrect!";
+	//public static final String CONSTANT_MODELELEMENT_DOESNOTEXISTS = "The referred modelelement constant is not presented in the model space: ";
+}
diff --git a/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/exception/GTASMException.java b/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/exception/GTASMException.java
new file mode 100644
index 0000000..45a657a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/exception/GTASMException.java
@@ -0,0 +1,188 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.exception;

+

+import java.io.File;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ChooseRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ForallRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.LetRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;
+
+/**
+ * This exception is used to signal the failure of the GTASM interpreter.
+ * @author Akos Horvath, Gergely Varro
+ *
+ */
+abstract public class GTASMException extends ViatraTransformationException {

+	
+	
+	private static final long serialVersionUID = -3717049954955553256L;

+	

+	protected ArrayList<StackTraceElement> interpreterStackTrace = new ArrayList<StackTraceElement>();
+	
+	public GTASMException(String msg, String[] context) {
+		super(msg, context);
+	}	
+	public GTASMException(String msg, String[] context, Throwable cause) {
+		super(msg, context, cause);
+	}
+	
+	public Collection<StackTraceElement> getStackTraceCollection() {
+	        return interpreterStackTrace;
+	}
+	
+	

+    @Override
+    public StackTraceElement[] getStackTrace() {
+        StackTraceElement[] array = 
+            new StackTraceElement[interpreterStackTrace.size()];
+        return interpreterStackTrace.toArray(array);
+    }
+
+    @Override
+    public void printStackTrace() {
+ 	   StackTraceElement[] stackTrace = getStackTrace();
+        for (int i = 0; i < stackTrace.length; i++) {
+            System.err.println("["+(stackTrace.length-i)+"] "+stackTrace[i].toString());
+        }
+    }
+
+    @Override
+    public void printStackTrace(PrintStream s) {
+    	StackTraceElement[] stackTrace = getStackTrace();
+    	for (int i = 0; i < stackTrace.length; i++) {
+    		s.println("["+(stackTrace.length-i)+"] "+stackTrace[i].toString());
+    	}
+    }
+
+    @Override
+    public void printStackTrace(PrintWriter arg0) {
+    	StackTraceElement[] stackTrace = getStackTrace();
+    	for (int i = 0; i < stackTrace.length; i++) {
+    		arg0.println(stackTrace[i].toString());
+    	}
+    }
+    
+    /**Adds a new element to the stack trace
+     * @param element The element to be added
+     * @return
+     */
+//    public GTASMException addNewStackElement(StackTraceElement element) {
+//    	interpreterStackTrace.add(element);
+//    	return this;
+//    }
+    
+    
+    @Override
+	public ViatraTransformationException addNewStackElement(EObject element) {
+    	if(element != null && element instanceof AnnotatedElement)
+    		{
+    		StackTraceElement _ste = createStackTraceElement((AnnotatedElement)element);
+    		interpreterStackTrace.add(_ste);
+    		}
+    	return this;
+    }
+
+    /** Returns the FQN of the containing machine
+     * @param element The contained element
+     * @return
+     */
+    private static String getMachineFQN(EObject element) {
+    	while (!(element.eContainer() instanceof Machine)
+                && !(element.eContainer() == null)) {
+    		element = element.eContainer();
+        }
+    	
+    	if (element.eContainer() == null) {
+    		return "Error, element not under any machine!!!";
+        } else {
+            return ((Machine) element.eContainer()).getName();
+        }
+    }
+   
+    /**Creates a stack trace element based on the information (source file, line info etc.) of the GTASMElement.
+     * @param element
+     * @return
+     */
+    protected static StackTraceElement createStackTraceElement(AnnotatedElement element) {
+        int size = element.getAnnotations().size();
+        String sourceFile = "";
+        String elementName="";
+        int sourceLine = -1;
+        // Have to check the annotations
+        for (int j = 0; j < size; j++) {
+            Annotation annotation = 
+                element.getAnnotations().get(j);
+            // annotation handling of the Babo parser
+            if (annotation.getKey().equals("sourcefile")) {
+                sourceFile = new File(annotation.getValue()).getName();
+            } else if (annotation.getKey().equals("sourceline")) {
+                String value = annotation.getValue();
+                sourceLine = (value == null || value == "") 
+                        ? -1 
+                        : Integer.parseInt(value);
+            } else if (annotation.getKey().equals("node_info")) {
+            	String value = annotation.getValue();
+            	sourceLine = (value == null || value == "") 
+            			? -1 : Integer.parseInt(value.substring(0,value.indexOf(',')));
+            }
+        }
+        
+        // Name cannot be null!
+        if (element instanceof GTASMElement && ((GTASMElement)element).getName() != null) {
+        	elementName = ((GTASMElement)element).getName();
+        }
+        else
+        if(element instanceof ModelElement && ((ModelElement)element).getName() != null){ 
+        	elementName = ((ModelElement)element).getName();
+        }else {
+        	if (element instanceof Constant) {
+        		elementName = "Constant value ="+((Constant)element).getValue();
+        	} else if (element instanceof ForallRule) {
+        		elementName = "forall";
+        	} else if(element instanceof ChooseRule) {
+        		elementName = "choose";
+        	} else if(element instanceof LetRule) {
+        		elementName = "let";
+        	} else {
+        		elementName = element.eClass().getName();
+        	}
+        }
+        return new StackTraceElement(getMachineFQN(element), 
+                    elementName, 
+                    sourceFile, 
+                    sourceLine);
+    }
+ 
+    /** Returns the complete Viatra specific stack trace
+     * @return
+     */
+    public String getSerializedStackTrace(){

+    	String buffer=this.getMessage();

+    	StackTraceElement[] stackTrace = getStackTrace();

+        for (int i = 0; i < stackTrace.length; i++) {

+            buffer+=System.getProperty("line.separator")+stackTrace[i].toString();

+        }

+        return buffer;

+    }

+}

diff --git a/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/exception/ViatraTransformationException.java b/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/exception/ViatraTransformationException.java
new file mode 100644
index 0000000..73d26b0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/exception/ViatraTransformationException.java
@@ -0,0 +1,68 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Akos Horvath and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Akos Horvath - initial API and implementation

+ *******************************************************************************/

+

+

+package org.eclipse.viatra2.gtasm.interpreter.exception;

+

+import org.eclipse.emf.ecore.EObject;

+

+/** A common supertype for all GTASM exceptions

+ * @author Akos Horvath

+ *

+ */

+public abstract class ViatraTransformationException extends Exception {

+	private static final long serialVersionUID = 3668689213176229953L;

+	

+//	private ViatraTransformationException(String msg) {

+//		super(msg);

+//	}

+	

+	/** Constructor for the common GTASM exception class

+	 * @param msg The template of the exception message

+	 * @param context The data elements to be used to instantiate the template. Can be null if no context parameter is defined

+	 * 

+	 */

+	public ViatraTransformationException(String msg, String[] context) {

+		super(bind(msg,context));

+	}

+	

+	/** Constructor for the common GTASM exception class

+	 * @param msg The template of the exception message

+	 * @param context The data elements to be used to instantiate the template. Can be null if no context parameter is defined

+	 * @param cause The internal exception identifiable as cause

+	 */

+	public ViatraTransformationException(String msg, String[] context, Throwable cause) {

+		super(bind(msg,context), cause);

+	}	

+	/**

+	 * Binding the '{n}' (n = 1..N) strings to contextual conditions in 'context'

+	 * @param context : array of context-sensitive Strings

+	 */

+	private static String bind(String message, String[] context) {

+		String additionalError = "";

+		

+		if(context == null) return message;

+		

+		for(int i = 0; i<context.length; i++){

+			message = message.replace("{"+(i+1)+"}", context[i]!= null? context[i] : "<<null>>");

+			//error handling in case there is a null value in the context array

+			if(context[i] == null)

+				additionalError = "[INTERNAL ERROR] A name value in the GTASM model is null. \n\n";

+		}

+		return additionalError+message;

+	}

+	

+	/**Tries to add a new element to the stack trace based on its input element

+	 * @param element Element to be processed for source information

+	 * @return

+	 */

+	public ViatraTransformationException addNewStackElement(EObject element){ return null;}

+}

diff --git a/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/executionEnvironment/ASMFunctionContent.java b/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/executionEnvironment/ASMFunctionContent.java
new file mode 100644
index 0000000..e854100
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/executionEnvironment/ASMFunctionContent.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.executionEnvironment;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+
+public class ASMFunctionContent extends
+		HashMap<ASMFunction, HashMap<EList<Object>, Object>> {
+
+	/**
+	 * Stores the ASMFunction values
+	 * 
+	 * @author Peter Pasztor
+	 */
+	private static final long serialVersionUID = 1L;
+	private static ASMFunctionContent _instance = new ASMFunctionContent();
+
+	public static ASMFunctionContent getInstance() {
+		return _instance;
+	}
+
+	private ASMFunctionContent() {
+		super();
+	}
+
+	private final Set<ASMFunctionContentChangeListener> listeners = new HashSet<ASMFunctionContentChangeListener>();
+
+	public void addListener(ASMFunction f, ASMFunctionContentChangeListener l) {
+		listeners.add(l);
+	}
+
+	public void removeListener(ASMFunction f, ASMFunctionContentChangeListener l) {
+		listeners.remove(l);
+	}
+
+	public void notifyListeners(ASMFunction f, EList<Object> key, Object newValue) {
+		for (ASMFunctionContentChangeListener l : listeners)
+			l.valueChanged(f, key, newValue);
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/executionEnvironment/ASMFunctionContentChangeListener.java b/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/executionEnvironment/ASMFunctionContentChangeListener.java
new file mode 100644
index 0000000..af67bab
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/executionEnvironment/ASMFunctionContentChangeListener.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.executionEnvironment;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+
+/**
+ * Listener interface for clients that wish to be notified when a value in an
+ * ASMFunction changes.
+ * 
+ * @author Istvan Rath
+ * 
+ */
+public interface ASMFunctionContentChangeListener {
+
+	/**
+	 * Signals that a given key-value pair has changed.
+	 * 
+	 * @param f
+	 * @param key
+	 * @param newValue
+	 */
+	public void valueChanged(ASMFunction f, EList<Object> key, Object newValue);
+
+}
diff --git a/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/executionEnvironment/IExecutionEnvironment.java b/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/executionEnvironment/IExecutionEnvironment.java
new file mode 100644
index 0000000..67da0db
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/executionEnvironment/IExecutionEnvironment.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.interpreter.executionEnvironment;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Vector;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+
+public interface IExecutionEnvironment {
+
+	public IFramework getFramework();
+
+	// public void onBegin(Map<Variable, Object> variables);
+
+	// public Map<Variable, Object> onTerminate();
+
+	public Object getValueOfASMFunction(ASMFunction asmFunction, EList<Object> location);
+
+	public void updateASMFunction(ASMFunction asmFunction, EList<Object> location,
+			Object value) throws ViatraTransformationException;
+
+	public void addVariable(Variable key, Object value)
+			throws ViatraTransformationException;
+
+	public Object getVariableValue(Variable variable)
+			throws ViatraTransformationException;
+
+	public void setVariableValue(Variable variable, Object value)
+			throws ViatraTransformationException;
+
+	/**
+	 * @return the variableValues
+	 */
+	public Map<Variable, Object> getVariableValues();
+
+	public void fetchVariableVariations(
+			HashMap<Variable, Vector<Object>> possibleVariableValues,
+			Term termToBeEvaluated);
+
+}
diff --git a/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/extension/INativeASMRule.java b/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/extension/INativeASMRule.java
new file mode 100644
index 0000000..9bc05ba
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/extension/INativeASMRule.java
@@ -0,0 +1,53 @@
+/********************************************************************************

+ *  Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.interpreter.extension;

+

+import java.util.Map;

+

+import org.eclipse.viatra2.core.IModelSpace;

+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;

+

+

+/**

+ * A nativeASMRule is a Java method which can be called directly from a

+ * VTCL program instead of its vtcl equivalent (using the @native annotation).

+ * Its ID is the fully qualified name of the asm rule

+ * @author Akos Horvath

+ */

+public interface INativeASMRule {

+	

+	/** This function will be called by the GTASM interpreter instead of the ASM rule invocation.

+	 * @param msp The model space of the invocation context

+	 * @param params The variable to term mapping table. All return parameters will have to added to the map

+	 * @return true if the execution succeeded false in all other case which will indicate the same behaviour as in case of the ASM rule failure

+	 * @throws ViatraTransformationException

+	 */

+	public Boolean invoke(IModelSpace msp, Map<Variable,Object> params)

+			throws ViatraTransformationException;

+

+	/**

+	 * The name of the native ASM rule.

+	 */

+	public String getName();

+

+	/**

+	 * The unique ID of the native ASM rule. Has to be the FQN of the ASM rule that it will replace

+	 */

+	public String getID();

+

+	/**

+	 * The textual description of the ASM rule.

+	 */

+	public String getDescription();

+

+}

diff --git a/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/extension/NativeASMRuleProvider.java b/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/extension/NativeASMRuleProvider.java
new file mode 100644
index 0000000..d79fa68
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/extension/NativeASMRuleProvider.java
@@ -0,0 +1,33 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Akos Horvath and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Akos Horvath - initial API and implementation

+ *******************************************************************************/

+

+

+package org.eclipse.viatra2.gtasm.interpreter.extension;

+

+import org.eclipse.viatra2.gtasm.interpreter.internal.ViatraGTASMInterpreterPlugin;

+

+/** Interface class for ASM native rules

+ * @author Akos Horvath

+ *

+ */

+public class NativeASMRuleProvider {

+	

+	

+	/** Returns the Native ASM rule if it is available by the input fqn name

+	 * @param fqn The fqn of the asm rule

+	 * @return The INativeASMRule implementing the rule 

+	 */

+	public static INativeASMRule getNativeASMRule(String fqn){

+	//checks if the native rule is available at the org.eclipse.viatra2.gtasm.patternmatcher.extension point 

+	INativeASMRule nativeRule = ViatraGTASMInterpreterPlugin.getDefault().getNativeAMSRules(fqn);

+	return nativeRule;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/internal/ViatraGTASMInterpreterPlugin.java b/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/internal/ViatraGTASMInterpreterPlugin.java
new file mode 100644
index 0000000..8b12e12
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.interpreter/src/org/eclipse/viatra2/gtasm/interpreter/internal/ViatraGTASMInterpreterPlugin.java
@@ -0,0 +1,122 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.interpreter.internal;

+

+import org.eclipse.core.runtime.Plugin;

+import java.util.HashMap;

+import java.util.Map;

+

+import org.eclipse.core.runtime.IConfigurationElement;

+import org.eclipse.core.runtime.IExtension;

+import org.eclipse.core.runtime.IExtensionPoint;

+import org.eclipse.core.runtime.IExtensionRegistry;

+import org.eclipse.core.runtime.Platform;

+import org.eclipse.viatra2.gtasm.interpreter.extension.INativeASMRule;

+import org.osgi.framework.BundleContext;

+

+public class ViatraGTASMInterpreterPlugin extends Plugin {

+

+

+	// The plug-in ID

+	public static final String PLUGIN_ID = "org.eclipse.viatra2.gtasm.interpreter";

+	// Extension points

+	public static final String NATIVE_ASM_RULE_EXT_ID = "org.eclipse.viatra2.gtasm.interpreter.nativeasmrule";

+	

+	// The shared instance

+	private static ViatraGTASMInterpreterPlugin plugin;

+

+	/* Native ASM rules*/

+	private Map<String,INativeASMRule> nativeASMRules; 

+	

+	/**

+	 * The constructor

+	 */

+	public ViatraGTASMInterpreterPlugin () {

+		plugin = this;

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * 

+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)

+	 */

+	public void start(BundleContext context) throws Exception {

+		super.start(context);

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * 

+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)

+	 */

+	public void stop(BundleContext context) throws Exception {

+		plugin = null;

+		super.stop(context);

+	}

+

+	/**

+	 * Returns the shared instance

+	 * 

+	 * @return the shared instance

+	 */

+	public static ViatraGTASMInterpreterPlugin getDefault() {

+		return plugin;

+	}

+	

+	

+	/** Returns a Map that contains all Native AMS rule implementation attached to the org.eclipse.viatra2.gtasm.interpreter.impl.interpreter

+	 * @return

+	 */

+	public Map<String, INativeASMRule> getNativeAMSRules() {

+		if (nativeASMRules == null) {

+			nativeASMRules = initNativeASMRules();

+		}

+		return nativeASMRules;

+	}

+	

+	/**

+	 * Returns the native ASM rules registered to the interpreter

+	 * @param id

+	 *        The id of the registered native AMS rule

+	 * @return its implementing object

+	 */

+	public INativeASMRule getNativeAMSRules(String id) {

+		if (nativeASMRules == null || nativeASMRules.size() == 0) {

+			nativeASMRules= initNativeASMRules();

+		}

+		return nativeASMRules.containsKey(id)?nativeASMRules.get(id):null;

+	}

+

+	private Map<String, INativeASMRule> initNativeASMRules() {

+		IExtensionRegistry reg = Platform.getExtensionRegistry();

+		IExtensionPoint poi = reg.getExtensionPoint(NATIVE_ASM_RULE_EXT_ID);

+		HashMap<String, INativeASMRule> r = new HashMap<String, INativeASMRule>();

+		if (poi == null)

+			return r;

+		IExtension[] exts = poi.getExtensions();

+		for (int i = 0; i < exts.length; i++) {

+			IConfigurationElement[] el = exts[i].getConfigurationElements();

+			for (int j = 0; j < el.length; j++) {

+				try {

+					Object o = el[j].createExecutableExtension("class");

+					if (o instanceof INativeASMRule) {

+						String id = ((INativeASMRule)o).getID();

+						r.put(id, (INativeASMRule) o);

+					}

+				} catch (Exception e) {

+					e.printStackTrace();

+				}

+			}

+		}

+		return r;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.model.edit/.classpath b/org.eclipse.viatra2.gtasm.model.edit/.classpath
new file mode 100644
index 0000000..121e527
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.viatra2.gtasm.model.edit/.project b/org.eclipse.viatra2.gtasm.model.edit/.project
new file mode 100644
index 0000000..09e766a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.viatra2.gtasm.model.edit</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.viatra2.gtasm.model.edit/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra2.gtasm.model.edit/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..8a5d9c5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Wed Jan 12 11:19:33 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/org.eclipse.viatra2.gtasm.model.edit/META-INF/MANIFEST.MF b/org.eclipse.viatra2.gtasm.model.edit/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..21fbf0e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,27 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.viatra2.gtasm.model.edit;singleton:=true
+Bundle-Version: 3.3.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.provider,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.provider,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.provider,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.provider,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.provider,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.provider,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.provider,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.provider,
+ org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.viatra2.gtasm.model;visibility:=reexport,
+ org.eclipse.emf.edit;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.viatra2.gtasm.model.edit/build.properties b/org.eclipse.viatra2.gtasm.model.edit/build.properties
new file mode 100644
index 0000000..31c5161
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/build.properties
@@ -0,0 +1,18 @@
+#  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+#  * All rights reserved. This program and the accompanying materials
+#  * are made available under the terms of the Eclipse Public License v1.0
+#  * which accompanies this distribution, and is available at
+#  * http://www.eclipse.org/legal/epl-v10.html
+#  *
+#  * Contributors:
+#  *    Istvan Rath, Daniel Varro - initial API and implementation
+# 
+
+bin.includes = .,\
+               icons/,\
+               META-INF/,\
+               plugin.xml,\
+               plugin.properties
+jars.compile.order = .
+source.. = src/
+output.. = bin/
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateASMFunction_argumentTypes_TypeConstant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateASMFunction_argumentTypes_TypeConstant.gif
new file mode 100644
index 0000000..11bcd0b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateASMFunction_argumentTypes_TypeConstant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateASMFunction_initialValues_InitialValue.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateASMFunction_initialValues_InitialValue.gif
new file mode 100644
index 0000000..23b4848
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateASMFunction_initialValues_InitialValue.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateASMFunction_returnType_TypeConstant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateASMFunction_returnType_TypeConstant.gif
new file mode 100644
index 0000000..11bcd0b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateASMFunction_returnType_TypeConstant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateAnnotatedElement_annotations_Annotation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateAnnotatedElement_annotations_Annotation.gif
new file mode 100644
index 0000000..2b447c2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateAnnotatedElement_annotations_Annotation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateBlockRule_localVariables_PatternVariable.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateBlockRule_localVariables_PatternVariable.gif
new file mode 100644
index 0000000..8cc0e0a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateBlockRule_localVariables_PatternVariable.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateBlockRule_localVariables_Variable.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateBlockRule_localVariables_Variable.gif
new file mode 100644
index 0000000..c449285
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateBlockRule_localVariables_Variable.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..3ccdd04
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Aggregate.gif
new file mode 100644
index 0000000..dcbb9e8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_And.gif
new file mode 100644
index 0000000..52cb135
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Constant.gif
new file mode 100644
index 0000000..a8fe4f5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Division.gif
new file mode 100644
index 0000000..6b2a568
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ElementReference.gif
new file mode 100644
index 0000000..ec4ba79
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Equals.gif
new file mode 100644
index 0000000..6560457
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_FullyQualifiedName.gif
new file mode 100644
index 0000000..2bed2e1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_GTPatternCall.gif
new file mode 100644
index 0000000..a88072d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_GreaterThan.gif
new file mode 100644
index 0000000..ca92866
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..f24c310
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Inverse.gif
new file mode 100644
index 0000000..5baef5a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_LessThan.gif
new file mode 100644
index 0000000..19c4a59
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..16095d6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Minus.gif
new file mode 100644
index 0000000..555150e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ModelElementQuery.gif
new file mode 100644
index 0000000..57826cc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Multiplicity.gif
new file mode 100644
index 0000000..29d68a2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Multiply.gif
new file mode 100644
index 0000000..555150e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Name.gif
new file mode 100644
index 0000000..45bc7b7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..9206001
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Not.gif
new file mode 100644
index 0000000..1027a3d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_NotEquals.gif
new file mode 100644
index 0000000..1027a3d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Or.gif
new file mode 100644
index 0000000..b9b30db
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Plus.gif
new file mode 100644
index 0000000..1d91288
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Remainder.gif
new file mode 100644
index 0000000..70eb540
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Source.gif
new file mode 100644
index 0000000..55e209b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Target.gif
new file mode 100644
index 0000000..52cb135
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ToBoolean.gif
new file mode 100644
index 0000000..180d9c7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ToDouble.gif
new file mode 100644
index 0000000..31d1de7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ToInt.gif
new file mode 100644
index 0000000..2bed2e1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ToModelElement.gif
new file mode 100644
index 0000000..3248e68
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ToMultiplicity.gif
new file mode 100644
index 0000000..a88072d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ToString.gif
new file mode 100644
index 0000000..70eb540
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Value.gif
new file mode 100644
index 0000000..6e14d42
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_VariableReference.gif
new file mode 100644
index 0000000..3167a52
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_XOr.gif
new file mode 100644
index 0000000..6f2f9e7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCallRule_actualParameters_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateChangeEvent_variableReference_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateChangeEvent_variableReference_VariableReference.gif
new file mode 100644
index 0000000..e6874a4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateChangeEvent_variableReference_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..d69b5c7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Aggregate.gif
new file mode 100644
index 0000000..03c1266
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_And.gif
new file mode 100644
index 0000000..67b924c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Constant.gif
new file mode 100644
index 0000000..31cb2e2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Division.gif
new file mode 100644
index 0000000..36bc72b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ElementReference.gif
new file mode 100644
index 0000000..8e2a326
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Equals.gif
new file mode 100644
index 0000000..8f218cb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_FullyQualifiedName.gif
new file mode 100644
index 0000000..f6ec10a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_GTPatternCall.gif
new file mode 100644
index 0000000..67dbac2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_GreaterThan.gif
new file mode 100644
index 0000000..e050920
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..0e886ec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Inverse.gif
new file mode 100644
index 0000000..c825541
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_LessThan.gif
new file mode 100644
index 0000000..ff485d7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..8524da4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Minus.gif
new file mode 100644
index 0000000..1e65bec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ModelElementQuery.gif
new file mode 100644
index 0000000..1b80aea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Multiplicity.gif
new file mode 100644
index 0000000..90c9485
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Multiply.gif
new file mode 100644
index 0000000..1e65bec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Name.gif
new file mode 100644
index 0000000..cc34a0f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..83d72c4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Not.gif
new file mode 100644
index 0000000..436a9c5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_NotEquals.gif
new file mode 100644
index 0000000..436a9c5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Or.gif
new file mode 100644
index 0000000..43d93ae
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Plus.gif
new file mode 100644
index 0000000..b729998
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Remainder.gif
new file mode 100644
index 0000000..62f7a1e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Source.gif
new file mode 100644
index 0000000..e0e45bd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Target.gif
new file mode 100644
index 0000000..67b924c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ToBoolean.gif
new file mode 100644
index 0000000..497cf86
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ToDouble.gif
new file mode 100644
index 0000000..fee466d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ToInt.gif
new file mode 100644
index 0000000..f6ec10a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ToModelElement.gif
new file mode 100644
index 0000000..e8626bf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ToMultiplicity.gif
new file mode 100644
index 0000000..67dbac2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ToString.gif
new file mode 100644
index 0000000..62f7a1e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Value.gif
new file mode 100644
index 0000000..55c6166
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_VariableReference.gif
new file mode 100644
index 0000000..9c6b7fc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_XOr.gif
new file mode 100644
index 0000000..bc2f6d5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_condition_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_containmentConstraints_ContainmentConstraint.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_containmentConstraints_ContainmentConstraint.gif
new file mode 100644
index 0000000..9cb21a6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_containmentConstraints_ContainmentConstraint.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_gtrule_GTRuleInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_gtrule_GTRuleInvocation.gif
new file mode 100644
index 0000000..3f70d4d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCollectionIteratorRule_gtrule_GTRuleInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_CallRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_CallRule.gif
new file mode 100644
index 0000000..c06fe36
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_CallRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ChooseRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ChooseRule.gif
new file mode 100644
index 0000000..f768689
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ChooseRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ConditionalRuleIf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ConditionalRuleIf.gif
new file mode 100644
index 0000000..79cec2b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ConditionalRuleIf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ConditionalRuleTry.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ConditionalRuleTry.gif
new file mode 100644
index 0000000..2782e6e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ConditionalRuleTry.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_CreateInstanceOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_CreateInstanceOf.gif
new file mode 100644
index 0000000..6966d76
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_CreateInstanceOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_CreateSupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_CreateSupertypeOf.gif
new file mode 100644
index 0000000..8dd4d74
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_CreateSupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_DeleteInstanceOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_DeleteInstanceOf.gif
new file mode 100644
index 0000000..3d86ecd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_DeleteInstanceOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_DeleteSupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_DeleteSupertypeOf.gif
new file mode 100644
index 0000000..f733077
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_DeleteSupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ElementDeleteRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ElementDeleteRule.gif
new file mode 100644
index 0000000..985d0f6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ElementDeleteRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_EntityCreateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_EntityCreateRule.gif
new file mode 100644
index 0000000..bc08383
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_EntityCreateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_FailRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_FailRule.gif
new file mode 100644
index 0000000..c06fe36
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_FailRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ForallRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ForallRule.gif
new file mode 100644
index 0000000..e3921e9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ForallRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_GTRuleInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_GTRuleInvocation.gif
new file mode 100644
index 0000000..99ba18b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_GTRuleInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_IterateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_IterateRule.gif
new file mode 100644
index 0000000..5f1770b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_IterateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_LetRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_LetRule.gif
new file mode 100644
index 0000000..f733077
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_LetRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_LogRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_LogRule.gif
new file mode 100644
index 0000000..c8cc4e9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_LogRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ModelCopyRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ModelCopyRule.gif
new file mode 100644
index 0000000..1f06e1f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ModelCopyRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_MoveRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_MoveRule.gif
new file mode 100644
index 0000000..2782e6e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_MoveRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ParallelRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ParallelRule.gif
new file mode 100644
index 0000000..c06fe36
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_ParallelRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_PrintLnRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_PrintLnRule.gif
new file mode 100644
index 0000000..81b3c88
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_PrintLnRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_PrintRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_PrintRule.gif
new file mode 100644
index 0000000..81b3c88
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_PrintRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_RandomRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_RandomRule.gif
new file mode 100644
index 0000000..f768689
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_RandomRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_RelationCreateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_RelationCreateRule.gif
new file mode 100644
index 0000000..738febb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_RelationCreateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_RenameRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_RenameRule.gif
new file mode 100644
index 0000000..3b01cc9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_RenameRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_RuleUpdateASMFunction.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_RuleUpdateASMFunction.gif
new file mode 100644
index 0000000..4e7f8d9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_RuleUpdateASMFunction.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_RuleUpdateVariable.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_RuleUpdateVariable.gif
new file mode 100644
index 0000000..e74be58
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_RuleUpdateVariable.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SequentialRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SequentialRule.gif
new file mode 100644
index 0000000..81b3c88
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SequentialRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetAggregationRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetAggregationRule.gif
new file mode 100644
index 0000000..5336acb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetAggregationRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetAnySourceRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetAnySourceRule.gif
new file mode 100644
index 0000000..e6967b7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetAnySourceRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetAnyTargetRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetAnyTargetRule.gif
new file mode 100644
index 0000000..67646f2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetAnyTargetRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetInverseRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetInverseRule.gif
new file mode 100644
index 0000000..e20cf5e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetInverseRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetMultiplicityRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetMultiplicityRule.gif
new file mode 100644
index 0000000..c8cc4e9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetMultiplicityRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetRelationFrom.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetRelationFrom.gif
new file mode 100644
index 0000000..3b01cc9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetRelationFrom.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetRelationTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetRelationTo.gif
new file mode 100644
index 0000000..54e2cd9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetRelationTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetValueRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetValueRule.gif
new file mode 100644
index 0000000..5336acb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SetValueRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SkipRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SkipRule.gif
new file mode 100644
index 0000000..2782e6e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_SkipRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_WhenRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_WhenRule.gif
new file mode 100644
index 0000000..7403d39
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateCompoundRule_body_WhenRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..a44d89b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Aggregate.gif
new file mode 100644
index 0000000..d0db396
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_And.gif
new file mode 100644
index 0000000..5e822cd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Constant.gif
new file mode 100644
index 0000000..5a340d5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Division.gif
new file mode 100644
index 0000000..4aaad5a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ElementReference.gif
new file mode 100644
index 0000000..7cd7a6b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Equals.gif
new file mode 100644
index 0000000..37dad61
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_FullyQualifiedName.gif
new file mode 100644
index 0000000..0cc4a4a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_GTPatternCall.gif
new file mode 100644
index 0000000..fe70894
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_GreaterThan.gif
new file mode 100644
index 0000000..7a99bf2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..52d5d68
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Inverse.gif
new file mode 100644
index 0000000..8ce82e3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_LessThan.gif
new file mode 100644
index 0000000..44afafd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..2249611
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Minus.gif
new file mode 100644
index 0000000..e180c4c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ModelElementQuery.gif
new file mode 100644
index 0000000..993980b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Multiplicity.gif
new file mode 100644
index 0000000..83775d0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Multiply.gif
new file mode 100644
index 0000000..e180c4c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Name.gif
new file mode 100644
index 0000000..446da01
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..a675390
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Not.gif
new file mode 100644
index 0000000..dea9e2d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_NotEquals.gif
new file mode 100644
index 0000000..dea9e2d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Or.gif
new file mode 100644
index 0000000..b5c74a1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Plus.gif
new file mode 100644
index 0000000..85d42e1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Remainder.gif
new file mode 100644
index 0000000..bbf242d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Source.gif
new file mode 100644
index 0000000..2fc02f8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Target.gif
new file mode 100644
index 0000000..5e822cd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ToBoolean.gif
new file mode 100644
index 0000000..f0846fb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ToDouble.gif
new file mode 100644
index 0000000..da5a15f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ToInt.gif
new file mode 100644
index 0000000..0cc4a4a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ToModelElement.gif
new file mode 100644
index 0000000..d3effc1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ToMultiplicity.gif
new file mode 100644
index 0000000..fe70894
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ToString.gif
new file mode 100644
index 0000000..bbf242d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Value.gif
new file mode 100644
index 0000000..5ef9a94
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_VariableReference.gif
new file mode 100644
index 0000000..6b99a7f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_XOr.gif
new file mode 100644
index 0000000..1d991c2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_expressionToTest_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_CallRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_CallRule.gif
new file mode 100644
index 0000000..5ef9a94
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_CallRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ChooseRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ChooseRule.gif
new file mode 100644
index 0000000..dea9e2d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ChooseRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ConditionalRuleIf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ConditionalRuleIf.gif
new file mode 100644
index 0000000..8ce82e3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ConditionalRuleIf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ConditionalRuleTry.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ConditionalRuleTry.gif
new file mode 100644
index 0000000..fe1b5ce
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ConditionalRuleTry.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_CreateInstanceOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_CreateInstanceOf.gif
new file mode 100644
index 0000000..bdc32e3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_CreateInstanceOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_CreateSupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_CreateSupertypeOf.gif
new file mode 100644
index 0000000..83775d0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_CreateSupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_DeleteInstanceOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_DeleteInstanceOf.gif
new file mode 100644
index 0000000..85d42e1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_DeleteInstanceOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_DeleteSupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_DeleteSupertypeOf.gif
new file mode 100644
index 0000000..1f765e1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_DeleteSupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ElementDeleteRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ElementDeleteRule.gif
new file mode 100644
index 0000000..6b99a7f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ElementDeleteRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_EntityCreateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_EntityCreateRule.gif
new file mode 100644
index 0000000..11b8bc1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_EntityCreateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_FailRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_FailRule.gif
new file mode 100644
index 0000000..5ef9a94
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_FailRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ForallRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ForallRule.gif
new file mode 100644
index 0000000..7a99bf2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ForallRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_GTRuleInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_GTRuleInvocation.gif
new file mode 100644
index 0000000..6f8b380
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_GTRuleInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_IterateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_IterateRule.gif
new file mode 100644
index 0000000..993980b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_IterateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_LetRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_LetRule.gif
new file mode 100644
index 0000000..1f765e1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_LetRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_LogRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_LogRule.gif
new file mode 100644
index 0000000..33e0742
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_LogRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ModelCopyRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ModelCopyRule.gif
new file mode 100644
index 0000000..e7e086f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ModelCopyRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_MoveRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_MoveRule.gif
new file mode 100644
index 0000000..fe1b5ce
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_MoveRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ParallelRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ParallelRule.gif
new file mode 100644
index 0000000..5ef9a94
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_ParallelRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_PrintLnRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_PrintLnRule.gif
new file mode 100644
index 0000000..8e46df1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_PrintLnRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_PrintRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_PrintRule.gif
new file mode 100644
index 0000000..8e46df1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_PrintRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_RandomRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_RandomRule.gif
new file mode 100644
index 0000000..dea9e2d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_RandomRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_RelationCreateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_RelationCreateRule.gif
new file mode 100644
index 0000000..a44d89b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_RelationCreateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_RenameRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_RenameRule.gif
new file mode 100644
index 0000000..f08356e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_RenameRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_RuleUpdateASMFunction.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_RuleUpdateASMFunction.gif
new file mode 100644
index 0000000..b5c74a1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_RuleUpdateASMFunction.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_RuleUpdateVariable.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_RuleUpdateVariable.gif
new file mode 100644
index 0000000..0cc4a4a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_RuleUpdateVariable.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SequentialRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SequentialRule.gif
new file mode 100644
index 0000000..8e46df1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SequentialRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetAggregationRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetAggregationRule.gif
new file mode 100644
index 0000000..20f19ea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetAggregationRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetAnySourceRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetAnySourceRule.gif
new file mode 100644
index 0000000..52d5d68
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetAnySourceRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetAnyTargetRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetAnyTargetRule.gif
new file mode 100644
index 0000000..54cc4dd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetAnyTargetRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetInverseRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetInverseRule.gif
new file mode 100644
index 0000000..5aeef18
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetInverseRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetMultiplicityRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetMultiplicityRule.gif
new file mode 100644
index 0000000..33e0742
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetMultiplicityRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetRelationFrom.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetRelationFrom.gif
new file mode 100644
index 0000000..f08356e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetRelationFrom.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetRelationTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetRelationTo.gif
new file mode 100644
index 0000000..f22f374
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetRelationTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetValueRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetValueRule.gif
new file mode 100644
index 0000000..20f19ea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SetValueRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SkipRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SkipRule.gif
new file mode 100644
index 0000000..fe1b5ce
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_SkipRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_WhenRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_WhenRule.gif
new file mode 100644
index 0000000..d0db396
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleFalse_WhenRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_CallRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_CallRule.gif
new file mode 100644
index 0000000..5ef9a94
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_CallRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ChooseRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ChooseRule.gif
new file mode 100644
index 0000000..dea9e2d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ChooseRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ConditionalRuleIf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ConditionalRuleIf.gif
new file mode 100644
index 0000000..8ce82e3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ConditionalRuleIf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ConditionalRuleTry.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ConditionalRuleTry.gif
new file mode 100644
index 0000000..fe1b5ce
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ConditionalRuleTry.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_CreateInstanceOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_CreateInstanceOf.gif
new file mode 100644
index 0000000..bdc32e3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_CreateInstanceOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_CreateSupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_CreateSupertypeOf.gif
new file mode 100644
index 0000000..83775d0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_CreateSupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_DeleteInstanceOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_DeleteInstanceOf.gif
new file mode 100644
index 0000000..85d42e1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_DeleteInstanceOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_DeleteSupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_DeleteSupertypeOf.gif
new file mode 100644
index 0000000..1f765e1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_DeleteSupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ElementDeleteRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ElementDeleteRule.gif
new file mode 100644
index 0000000..6b99a7f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ElementDeleteRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_EntityCreateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_EntityCreateRule.gif
new file mode 100644
index 0000000..11b8bc1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_EntityCreateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_FailRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_FailRule.gif
new file mode 100644
index 0000000..5ef9a94
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_FailRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ForallRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ForallRule.gif
new file mode 100644
index 0000000..7a99bf2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ForallRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_GTRuleInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_GTRuleInvocation.gif
new file mode 100644
index 0000000..6f8b380
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_GTRuleInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_IterateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_IterateRule.gif
new file mode 100644
index 0000000..993980b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_IterateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_LetRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_LetRule.gif
new file mode 100644
index 0000000..1f765e1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_LetRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_LogRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_LogRule.gif
new file mode 100644
index 0000000..33e0742
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_LogRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ModelCopyRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ModelCopyRule.gif
new file mode 100644
index 0000000..e7e086f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ModelCopyRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_MoveRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_MoveRule.gif
new file mode 100644
index 0000000..fe1b5ce
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_MoveRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ParallelRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ParallelRule.gif
new file mode 100644
index 0000000..5ef9a94
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_ParallelRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_PrintLnRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_PrintLnRule.gif
new file mode 100644
index 0000000..8e46df1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_PrintLnRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_PrintRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_PrintRule.gif
new file mode 100644
index 0000000..8e46df1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_PrintRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_RandomRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_RandomRule.gif
new file mode 100644
index 0000000..dea9e2d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_RandomRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_RelationCreateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_RelationCreateRule.gif
new file mode 100644
index 0000000..a44d89b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_RelationCreateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_RenameRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_RenameRule.gif
new file mode 100644
index 0000000..f08356e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_RenameRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_RuleUpdateASMFunction.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_RuleUpdateASMFunction.gif
new file mode 100644
index 0000000..b5c74a1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_RuleUpdateASMFunction.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_RuleUpdateVariable.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_RuleUpdateVariable.gif
new file mode 100644
index 0000000..0cc4a4a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_RuleUpdateVariable.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SequentialRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SequentialRule.gif
new file mode 100644
index 0000000..8e46df1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SequentialRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetAggregationRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetAggregationRule.gif
new file mode 100644
index 0000000..20f19ea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetAggregationRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetAnySourceRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetAnySourceRule.gif
new file mode 100644
index 0000000..52d5d68
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetAnySourceRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetAnyTargetRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetAnyTargetRule.gif
new file mode 100644
index 0000000..54cc4dd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetAnyTargetRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetInverseRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetInverseRule.gif
new file mode 100644
index 0000000..5aeef18
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetInverseRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetMultiplicityRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetMultiplicityRule.gif
new file mode 100644
index 0000000..33e0742
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetMultiplicityRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetRelationFrom.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetRelationFrom.gif
new file mode 100644
index 0000000..f08356e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetRelationFrom.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetRelationTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetRelationTo.gif
new file mode 100644
index 0000000..f22f374
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetRelationTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetValueRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetValueRule.gif
new file mode 100644
index 0000000..20f19ea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SetValueRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SkipRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SkipRule.gif
new file mode 100644
index 0000000..fe1b5ce
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_SkipRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_WhenRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_WhenRule.gif
new file mode 100644
index 0000000..d0db396
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleIf_ruleTrue_WhenRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_CallRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_CallRule.gif
new file mode 100644
index 0000000..3ddab58
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_CallRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ChooseRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ChooseRule.gif
new file mode 100644
index 0000000..0fb82fc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ChooseRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ConditionalRuleIf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ConditionalRuleIf.gif
new file mode 100644
index 0000000..5a78e87
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ConditionalRuleIf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ConditionalRuleTry.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ConditionalRuleTry.gif
new file mode 100644
index 0000000..e07c4ed
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ConditionalRuleTry.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_CreateInstanceOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_CreateInstanceOf.gif
new file mode 100644
index 0000000..974a35b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_CreateInstanceOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_CreateSupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_CreateSupertypeOf.gif
new file mode 100644
index 0000000..628ea3f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_CreateSupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_DeleteInstanceOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_DeleteInstanceOf.gif
new file mode 100644
index 0000000..69010af
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_DeleteInstanceOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_DeleteSupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_DeleteSupertypeOf.gif
new file mode 100644
index 0000000..5da9e2d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_DeleteSupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ElementDeleteRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ElementDeleteRule.gif
new file mode 100644
index 0000000..91619bc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ElementDeleteRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_EntityCreateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_EntityCreateRule.gif
new file mode 100644
index 0000000..585fa35
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_EntityCreateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_FailRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_FailRule.gif
new file mode 100644
index 0000000..3ddab58
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_FailRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ForallRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ForallRule.gif
new file mode 100644
index 0000000..519be70
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ForallRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_GTRuleInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_GTRuleInvocation.gif
new file mode 100644
index 0000000..27c2e4c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_GTRuleInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_IterateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_IterateRule.gif
new file mode 100644
index 0000000..85e7906
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_IterateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_LetRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_LetRule.gif
new file mode 100644
index 0000000..5da9e2d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_LetRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_LogRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_LogRule.gif
new file mode 100644
index 0000000..968ffa6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_LogRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ModelCopyRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ModelCopyRule.gif
new file mode 100644
index 0000000..190f08e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ModelCopyRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_MoveRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_MoveRule.gif
new file mode 100644
index 0000000..e07c4ed
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_MoveRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ParallelRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ParallelRule.gif
new file mode 100644
index 0000000..3ddab58
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_ParallelRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_PrintLnRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_PrintLnRule.gif
new file mode 100644
index 0000000..fc1a2e8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_PrintLnRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_PrintRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_PrintRule.gif
new file mode 100644
index 0000000..fc1a2e8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_PrintRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_RandomRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_RandomRule.gif
new file mode 100644
index 0000000..0fb82fc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_RandomRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_RelationCreateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_RelationCreateRule.gif
new file mode 100644
index 0000000..993d090
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_RelationCreateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_RenameRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_RenameRule.gif
new file mode 100644
index 0000000..c4524ef
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_RenameRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_RuleUpdateASMFunction.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_RuleUpdateASMFunction.gif
new file mode 100644
index 0000000..9d2db8f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_RuleUpdateASMFunction.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_RuleUpdateVariable.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_RuleUpdateVariable.gif
new file mode 100644
index 0000000..de1bf6d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_RuleUpdateVariable.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SequentialRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SequentialRule.gif
new file mode 100644
index 0000000..fc1a2e8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SequentialRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetAggregationRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetAggregationRule.gif
new file mode 100644
index 0000000..90ccce9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetAggregationRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetAnySourceRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetAnySourceRule.gif
new file mode 100644
index 0000000..9fff14a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetAnySourceRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetAnyTargetRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetAnyTargetRule.gif
new file mode 100644
index 0000000..64a9ca4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetAnyTargetRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetInverseRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetInverseRule.gif
new file mode 100644
index 0000000..d022471
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetInverseRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetMultiplicityRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetMultiplicityRule.gif
new file mode 100644
index 0000000..968ffa6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetMultiplicityRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetRelationFrom.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetRelationFrom.gif
new file mode 100644
index 0000000..c4524ef
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetRelationFrom.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetRelationTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetRelationTo.gif
new file mode 100644
index 0000000..43637f5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetRelationTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetValueRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetValueRule.gif
new file mode 100644
index 0000000..90ccce9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SetValueRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SkipRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SkipRule.gif
new file mode 100644
index 0000000..e07c4ed
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_SkipRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_WhenRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_WhenRule.gif
new file mode 100644
index 0000000..845de0f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleElse_WhenRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_CallRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_CallRule.gif
new file mode 100644
index 0000000..3ddab58
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_CallRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ChooseRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ChooseRule.gif
new file mode 100644
index 0000000..0fb82fc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ChooseRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ConditionalRuleIf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ConditionalRuleIf.gif
new file mode 100644
index 0000000..5a78e87
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ConditionalRuleIf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ConditionalRuleTry.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ConditionalRuleTry.gif
new file mode 100644
index 0000000..e07c4ed
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ConditionalRuleTry.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_CreateInstanceOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_CreateInstanceOf.gif
new file mode 100644
index 0000000..974a35b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_CreateInstanceOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_CreateSupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_CreateSupertypeOf.gif
new file mode 100644
index 0000000..628ea3f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_CreateSupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_DeleteInstanceOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_DeleteInstanceOf.gif
new file mode 100644
index 0000000..69010af
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_DeleteInstanceOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_DeleteSupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_DeleteSupertypeOf.gif
new file mode 100644
index 0000000..5da9e2d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_DeleteSupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ElementDeleteRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ElementDeleteRule.gif
new file mode 100644
index 0000000..91619bc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ElementDeleteRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_EntityCreateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_EntityCreateRule.gif
new file mode 100644
index 0000000..585fa35
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_EntityCreateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_FailRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_FailRule.gif
new file mode 100644
index 0000000..3ddab58
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_FailRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ForallRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ForallRule.gif
new file mode 100644
index 0000000..519be70
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ForallRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_GTRuleInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_GTRuleInvocation.gif
new file mode 100644
index 0000000..27c2e4c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_GTRuleInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_IterateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_IterateRule.gif
new file mode 100644
index 0000000..85e7906
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_IterateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_LetRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_LetRule.gif
new file mode 100644
index 0000000..5da9e2d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_LetRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_LogRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_LogRule.gif
new file mode 100644
index 0000000..968ffa6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_LogRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ModelCopyRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ModelCopyRule.gif
new file mode 100644
index 0000000..190f08e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ModelCopyRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_MoveRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_MoveRule.gif
new file mode 100644
index 0000000..e07c4ed
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_MoveRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ParallelRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ParallelRule.gif
new file mode 100644
index 0000000..3ddab58
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_ParallelRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_PrintLnRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_PrintLnRule.gif
new file mode 100644
index 0000000..fc1a2e8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_PrintLnRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_PrintRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_PrintRule.gif
new file mode 100644
index 0000000..fc1a2e8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_PrintRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_RandomRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_RandomRule.gif
new file mode 100644
index 0000000..0fb82fc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_RandomRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_RelationCreateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_RelationCreateRule.gif
new file mode 100644
index 0000000..993d090
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_RelationCreateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_RenameRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_RenameRule.gif
new file mode 100644
index 0000000..c4524ef
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_RenameRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_RuleUpdateASMFunction.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_RuleUpdateASMFunction.gif
new file mode 100644
index 0000000..9d2db8f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_RuleUpdateASMFunction.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_RuleUpdateVariable.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_RuleUpdateVariable.gif
new file mode 100644
index 0000000..de1bf6d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_RuleUpdateVariable.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SequentialRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SequentialRule.gif
new file mode 100644
index 0000000..fc1a2e8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SequentialRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetAggregationRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetAggregationRule.gif
new file mode 100644
index 0000000..90ccce9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetAggregationRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetAnySourceRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetAnySourceRule.gif
new file mode 100644
index 0000000..9fff14a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetAnySourceRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetAnyTargetRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetAnyTargetRule.gif
new file mode 100644
index 0000000..64a9ca4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetAnyTargetRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetInverseRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetInverseRule.gif
new file mode 100644
index 0000000..d022471
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetInverseRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetMultiplicityRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetMultiplicityRule.gif
new file mode 100644
index 0000000..968ffa6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetMultiplicityRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetRelationFrom.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetRelationFrom.gif
new file mode 100644
index 0000000..c4524ef
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetRelationFrom.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetRelationTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetRelationTo.gif
new file mode 100644
index 0000000..43637f5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetRelationTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetValueRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetValueRule.gif
new file mode 100644
index 0000000..90ccce9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SetValueRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SkipRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SkipRule.gif
new file mode 100644
index 0000000..e07c4ed
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_SkipRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_WhenRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_WhenRule.gif
new file mode 100644
index 0000000..845de0f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateConditionalRuleTry_ruleToTry_WhenRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..9388789
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Aggregate.gif
new file mode 100644
index 0000000..99e6aae
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_And.gif
new file mode 100644
index 0000000..fda4ab1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Constant.gif
new file mode 100644
index 0000000..921b65a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Division.gif
new file mode 100644
index 0000000..ab64276
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ElementReference.gif
new file mode 100644
index 0000000..be2f815
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Equals.gif
new file mode 100644
index 0000000..c461d57
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_FullyQualifiedName.gif
new file mode 100644
index 0000000..5087b0e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_GTPatternCall.gif
new file mode 100644
index 0000000..0650d76
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_GreaterThan.gif
new file mode 100644
index 0000000..1dbde94
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..d2845b4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Inverse.gif
new file mode 100644
index 0000000..2943295
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_LessThan.gif
new file mode 100644
index 0000000..da050a4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..bee89db
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Minus.gif
new file mode 100644
index 0000000..88d12d2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ModelElementQuery.gif
new file mode 100644
index 0000000..dcbeb3e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Multiplicity.gif
new file mode 100644
index 0000000..3c3c2d0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Multiply.gif
new file mode 100644
index 0000000..88d12d2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Name.gif
new file mode 100644
index 0000000..4d57a2b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..4db7ffe
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Not.gif
new file mode 100644
index 0000000..ac5b1fa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_NotEquals.gif
new file mode 100644
index 0000000..ac5b1fa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Or.gif
new file mode 100644
index 0000000..981646d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Plus.gif
new file mode 100644
index 0000000..dfaed68
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Remainder.gif
new file mode 100644
index 0000000..bfe4a39
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Source.gif
new file mode 100644
index 0000000..6769c1b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Target.gif
new file mode 100644
index 0000000..fda4ab1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ToBoolean.gif
new file mode 100644
index 0000000..e9245bc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ToDouble.gif
new file mode 100644
index 0000000..f8f8bb3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ToInt.gif
new file mode 100644
index 0000000..5087b0e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ToModelElement.gif
new file mode 100644
index 0000000..305fa05
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ToMultiplicity.gif
new file mode 100644
index 0000000..0650d76
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ToString.gif
new file mode 100644
index 0000000..bfe4a39
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Value.gif
new file mode 100644
index 0000000..925e79d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_VariableReference.gif
new file mode 100644
index 0000000..1546f35
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_XOr.gif
new file mode 100644
index 0000000..8ad9f4f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateContainmentConstraint_parent_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_targetVariable_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_targetVariable_VariableReference.gif
new file mode 100644
index 0000000..632bb40
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_targetVariable_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..eb2a33b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Aggregate.gif
new file mode 100644
index 0000000..fa6a5ee
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_And.gif
new file mode 100644
index 0000000..9862390
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Constant.gif
new file mode 100644
index 0000000..c72000a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Division.gif
new file mode 100644
index 0000000..90f4828
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ElementReference.gif
new file mode 100644
index 0000000..cbd1b19
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Equals.gif
new file mode 100644
index 0000000..3fa9c54
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_FullyQualifiedName.gif
new file mode 100644
index 0000000..2e8ec2d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_GTPatternCall.gif
new file mode 100644
index 0000000..b3c6924
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_GreaterThan.gif
new file mode 100644
index 0000000..fd34d5f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..d7743e1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Inverse.gif
new file mode 100644
index 0000000..440a154
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_LessThan.gif
new file mode 100644
index 0000000..72306dc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..3548c7d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Minus.gif
new file mode 100644
index 0000000..7d4073e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ModelElementQuery.gif
new file mode 100644
index 0000000..80dd10a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Multiplicity.gif
new file mode 100644
index 0000000..ebe40ea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Multiply.gif
new file mode 100644
index 0000000..7d4073e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Name.gif
new file mode 100644
index 0000000..a8fcd74
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..355e3d0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Not.gif
new file mode 100644
index 0000000..1061b8f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_NotEquals.gif
new file mode 100644
index 0000000..1061b8f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Or.gif
new file mode 100644
index 0000000..bdfb88b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Plus.gif
new file mode 100644
index 0000000..ee915d4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Remainder.gif
new file mode 100644
index 0000000..c213999
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Source.gif
new file mode 100644
index 0000000..02ca8c0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Target.gif
new file mode 100644
index 0000000..9862390
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ToBoolean.gif
new file mode 100644
index 0000000..545d888
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ToDouble.gif
new file mode 100644
index 0000000..b33e855
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ToInt.gif
new file mode 100644
index 0000000..2e8ec2d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ToModelElement.gif
new file mode 100644
index 0000000..54b651d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ToMultiplicity.gif
new file mode 100644
index 0000000..b3c6924
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ToString.gif
new file mode 100644
index 0000000..c213999
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Value.gif
new file mode 100644
index 0000000..ffbeece
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_VariableReference.gif
new file mode 100644
index 0000000..632bb40
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_XOr.gif
new file mode 100644
index 0000000..5347030
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementCreateRule_type_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..b2120c1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Aggregate.gif
new file mode 100644
index 0000000..40cc20b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_And.gif
new file mode 100644
index 0000000..671a6f1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Constant.gif
new file mode 100644
index 0000000..76f9cb7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Division.gif
new file mode 100644
index 0000000..0c1ee4c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ElementReference.gif
new file mode 100644
index 0000000..99f2fe5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Equals.gif
new file mode 100644
index 0000000..52baab8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_FullyQualifiedName.gif
new file mode 100644
index 0000000..3841fce
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_GTPatternCall.gif
new file mode 100644
index 0000000..cc2ef52
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_GreaterThan.gif
new file mode 100644
index 0000000..6325826
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..6a08579
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Inverse.gif
new file mode 100644
index 0000000..de6af47
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_LessThan.gif
new file mode 100644
index 0000000..a382f74
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..a4c5e23
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Minus.gif
new file mode 100644
index 0000000..bc7b7f9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ModelElementQuery.gif
new file mode 100644
index 0000000..be1e90e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Multiplicity.gif
new file mode 100644
index 0000000..8247b72
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Multiply.gif
new file mode 100644
index 0000000..bc7b7f9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Name.gif
new file mode 100644
index 0000000..535a30a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..99a4283
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Not.gif
new file mode 100644
index 0000000..655f0eb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_NotEquals.gif
new file mode 100644
index 0000000..655f0eb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Or.gif
new file mode 100644
index 0000000..d68f55c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Plus.gif
new file mode 100644
index 0000000..3145841
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Remainder.gif
new file mode 100644
index 0000000..01d1dbb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Source.gif
new file mode 100644
index 0000000..3494d53
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Target.gif
new file mode 100644
index 0000000..671a6f1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ToBoolean.gif
new file mode 100644
index 0000000..390f12c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ToDouble.gif
new file mode 100644
index 0000000..13d1a04
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ToInt.gif
new file mode 100644
index 0000000..3841fce
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ToModelElement.gif
new file mode 100644
index 0000000..b727479
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ToMultiplicity.gif
new file mode 100644
index 0000000..cc2ef52
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ToString.gif
new file mode 100644
index 0000000..01d1dbb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Value.gif
new file mode 100644
index 0000000..b32e049
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_VariableReference.gif
new file mode 100644
index 0000000..2bd03ce
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_XOr.gif
new file mode 100644
index 0000000..cfb5278
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateElementDeleteRule_element_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..e171810
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Aggregate.gif
new file mode 100644
index 0000000..0e24345
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_And.gif
new file mode 100644
index 0000000..8764fa2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Constant.gif
new file mode 100644
index 0000000..7765d44
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Division.gif
new file mode 100644
index 0000000..febad48
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ElementReference.gif
new file mode 100644
index 0000000..f3ab440
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Equals.gif
new file mode 100644
index 0000000..fa1f359
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_FullyQualifiedName.gif
new file mode 100644
index 0000000..7a702c9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_GTPatternCall.gif
new file mode 100644
index 0000000..c707940
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_GreaterThan.gif
new file mode 100644
index 0000000..f72fe57
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..e9a46da
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Inverse.gif
new file mode 100644
index 0000000..cc09417
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_LessThan.gif
new file mode 100644
index 0000000..bdb6bd5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..72defd9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Minus.gif
new file mode 100644
index 0000000..5624de7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ModelElementQuery.gif
new file mode 100644
index 0000000..0db3a10
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Multiplicity.gif
new file mode 100644
index 0000000..7ee5dea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Multiply.gif
new file mode 100644
index 0000000..5624de7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Name.gif
new file mode 100644
index 0000000..4c29533
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..1974ebc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Not.gif
new file mode 100644
index 0000000..c5e047b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_NotEquals.gif
new file mode 100644
index 0000000..c5e047b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Or.gif
new file mode 100644
index 0000000..4ae0144
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Plus.gif
new file mode 100644
index 0000000..14641dd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Remainder.gif
new file mode 100644
index 0000000..c8cbe62
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Source.gif
new file mode 100644
index 0000000..bf12bb4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Target.gif
new file mode 100644
index 0000000..8764fa2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ToBoolean.gif
new file mode 100644
index 0000000..aae1b35
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ToDouble.gif
new file mode 100644
index 0000000..a14dda6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ToInt.gif
new file mode 100644
index 0000000..7a702c9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ToModelElement.gif
new file mode 100644
index 0000000..9fa11c0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ToMultiplicity.gif
new file mode 100644
index 0000000..c707940
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ToString.gif
new file mode 100644
index 0000000..c8cbe62
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Value.gif
new file mode 100644
index 0000000..527e4e8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_VariableReference.gif
new file mode 100644
index 0000000..3052dce
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_XOr.gif
new file mode 100644
index 0000000..79caa88
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntityCreateRule_parent_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntity_components_Entity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntity_components_Entity.gif
new file mode 100644
index 0000000..272aa9b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateEntity_components_Entity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..e171810
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Aggregate.gif
new file mode 100644
index 0000000..0e24345
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_And.gif
new file mode 100644
index 0000000..8764fa2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Constant.gif
new file mode 100644
index 0000000..7765d44
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Division.gif
new file mode 100644
index 0000000..febad48
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ElementReference.gif
new file mode 100644
index 0000000..f3ab440
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Equals.gif
new file mode 100644
index 0000000..fa1f359
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_FullyQualifiedName.gif
new file mode 100644
index 0000000..7a702c9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_GTPatternCall.gif
new file mode 100644
index 0000000..c707940
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_GreaterThan.gif
new file mode 100644
index 0000000..f72fe57
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..e9a46da
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Inverse.gif
new file mode 100644
index 0000000..cc09417
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_LessThan.gif
new file mode 100644
index 0000000..bdb6bd5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..72defd9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Minus.gif
new file mode 100644
index 0000000..5624de7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ModelElementQuery.gif
new file mode 100644
index 0000000..0db3a10
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Multiplicity.gif
new file mode 100644
index 0000000..7ee5dea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Multiply.gif
new file mode 100644
index 0000000..5624de7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Name.gif
new file mode 100644
index 0000000..4c29533
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..1974ebc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Not.gif
new file mode 100644
index 0000000..c5e047b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_NotEquals.gif
new file mode 100644
index 0000000..c5e047b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Or.gif
new file mode 100644
index 0000000..4ae0144
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Plus.gif
new file mode 100644
index 0000000..14641dd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Remainder.gif
new file mode 100644
index 0000000..c8cbe62
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Source.gif
new file mode 100644
index 0000000..bf12bb4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Target.gif
new file mode 100644
index 0000000..8764fa2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ToBoolean.gif
new file mode 100644
index 0000000..aae1b35
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ToDouble.gif
new file mode 100644
index 0000000..a14dda6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ToInt.gif
new file mode 100644
index 0000000..7a702c9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ToModelElement.gif
new file mode 100644
index 0000000..9fa11c0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ToMultiplicity.gif
new file mode 100644
index 0000000..c707940
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ToString.gif
new file mode 100644
index 0000000..c8cbe62
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Value.gif
new file mode 100644
index 0000000..527e4e8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_VariableReference.gif
new file mode 100644
index 0000000..3052dce
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_XOr.gif
new file mode 100644
index 0000000..79caa88
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateFunctionInvocation_actualParameters_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTASMElement_runtimeAnnotations_RuntimeAnnotation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTASMElement_runtimeAnnotations_RuntimeAnnotation.gif
new file mode 100644
index 0000000..0468f1c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTASMElement_runtimeAnnotations_RuntimeAnnotation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTMatchCounter_variableReference_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTMatchCounter_variableReference_VariableReference.gif
new file mode 100644
index 0000000..89ed2c9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTMatchCounter_variableReference_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_calledPatterns_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_calledPatterns_GTPatternCall.gif
new file mode 100644
index 0000000..ecce8cb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_calledPatterns_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..f01be4e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Aggregate.gif
new file mode 100644
index 0000000..16dbb0e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_And.gif
new file mode 100644
index 0000000..12536cb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Constant.gif
new file mode 100644
index 0000000..cba39ba
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Division.gif
new file mode 100644
index 0000000..88150e6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ElementReference.gif
new file mode 100644
index 0000000..f7a9c9f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Equals.gif
new file mode 100644
index 0000000..d66ff4a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_FullyQualifiedName.gif
new file mode 100644
index 0000000..a03a30e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_GTPatternCall.gif
new file mode 100644
index 0000000..ecce8cb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_GreaterThan.gif
new file mode 100644
index 0000000..04a6748
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..4cc4140
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Inverse.gif
new file mode 100644
index 0000000..ac6a8a2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_LessThan.gif
new file mode 100644
index 0000000..3f6e5f7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..b42028e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Minus.gif
new file mode 100644
index 0000000..c3f3ffa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ModelElementQuery.gif
new file mode 100644
index 0000000..a0ba127
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Multiplicity.gif
new file mode 100644
index 0000000..324a64d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Multiply.gif
new file mode 100644
index 0000000..c3f3ffa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Name.gif
new file mode 100644
index 0000000..5a20caa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..ba67912
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Not.gif
new file mode 100644
index 0000000..43a8eef
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_NotEquals.gif
new file mode 100644
index 0000000..43a8eef
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Or.gif
new file mode 100644
index 0000000..3473a1f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Plus.gif
new file mode 100644
index 0000000..2243f6a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Remainder.gif
new file mode 100644
index 0000000..3ca8bfa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Source.gif
new file mode 100644
index 0000000..0062ded
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Target.gif
new file mode 100644
index 0000000..12536cb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ToBoolean.gif
new file mode 100644
index 0000000..39428c7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ToDouble.gif
new file mode 100644
index 0000000..3b06750
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ToInt.gif
new file mode 100644
index 0000000..a03a30e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ToModelElement.gif
new file mode 100644
index 0000000..70597ff
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ToMultiplicity.gif
new file mode 100644
index 0000000..ecce8cb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ToString.gif
new file mode 100644
index 0000000..3ca8bfa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Value.gif
new file mode 100644
index 0000000..e6b48d9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_VariableReference.gif
new file mode 100644
index 0000000..6010ac9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_XOr.gif
new file mode 100644
index 0000000..573d6ee
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_checkExpressions_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_containmentConstraints_ContainmentConstraint.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_containmentConstraints_ContainmentConstraint.gif
new file mode 100644
index 0000000..6974180
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_containmentConstraints_ContainmentConstraint.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_danglingRelations_Relation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_danglingRelations_Relation.gif
new file mode 100644
index 0000000..04a6748
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_danglingRelations_Relation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_danglingRelationships_SupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_danglingRelationships_SupertypeOf.gif
new file mode 100644
index 0000000..5a20caa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_danglingRelationships_SupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_danglingRelationships_TypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_danglingRelationships_TypeOf.gif
new file mode 100644
index 0000000..633da34
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_danglingRelationships_TypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_elementWrappers_Entity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_elementWrappers_Entity.gif
new file mode 100644
index 0000000..63e7a6f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_elementWrappers_Entity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_elementWrappers_Relation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_elementWrappers_Relation.gif
new file mode 100644
index 0000000..04a6748
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_elementWrappers_Relation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_localPatternDefinition_GTPattern.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_localPatternDefinition_GTPattern.gif
new file mode 100644
index 0000000..b42028e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_localPatternDefinition_GTPattern.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_localVariables_PatternVariable.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_localVariables_PatternVariable.gif
new file mode 100644
index 0000000..e268a9e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_localVariables_PatternVariable.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_negativePatterns_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_negativePatterns_GTPatternCall.gif
new file mode 100644
index 0000000..ecce8cb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_negativePatterns_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_nonInjectivityConstraints_NonInjectivityConstraint.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_nonInjectivityConstraints_NonInjectivityConstraint.gif
new file mode 100644
index 0000000..3b06750
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_nonInjectivityConstraints_NonInjectivityConstraint.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_patternGraph_Entity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_patternGraph_Entity.gif
new file mode 100644
index 0000000..63e7a6f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_patternGraph_Entity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_variableAssignments_PatternVariableAssignment.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_variableAssignments_PatternVariableAssignment.gif
new file mode 100644
index 0000000..ac6a8a2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternBody_variableAssignments_PatternVariableAssignment.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..fd5f7bb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Aggregate.gif
new file mode 100644
index 0000000..ffebaf4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_And.gif
new file mode 100644
index 0000000..0674698
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Constant.gif
new file mode 100644
index 0000000..f82b4be
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Division.gif
new file mode 100644
index 0000000..8526cb6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ElementReference.gif
new file mode 100644
index 0000000..dde736f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Equals.gif
new file mode 100644
index 0000000..9c8833e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_FullyQualifiedName.gif
new file mode 100644
index 0000000..73aa62a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_GTPatternCall.gif
new file mode 100644
index 0000000..3744cee
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_GreaterThan.gif
new file mode 100644
index 0000000..66cbc4c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..053b434
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Inverse.gif
new file mode 100644
index 0000000..ebd9b3e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_LessThan.gif
new file mode 100644
index 0000000..79a0b58
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..4d51bba
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Minus.gif
new file mode 100644
index 0000000..c053c91
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ModelElementQuery.gif
new file mode 100644
index 0000000..a4d42e0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Multiplicity.gif
new file mode 100644
index 0000000..7515406
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Multiply.gif
new file mode 100644
index 0000000..c053c91
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Name.gif
new file mode 100644
index 0000000..0c07047
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..a4aa4f8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Not.gif
new file mode 100644
index 0000000..13e215e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_NotEquals.gif
new file mode 100644
index 0000000..13e215e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Or.gif
new file mode 100644
index 0000000..f3f1023
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Plus.gif
new file mode 100644
index 0000000..c9b7bd5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Remainder.gif
new file mode 100644
index 0000000..72a560f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Source.gif
new file mode 100644
index 0000000..8b41d35
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Target.gif
new file mode 100644
index 0000000..0674698
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ToBoolean.gif
new file mode 100644
index 0000000..0d2e262
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ToDouble.gif
new file mode 100644
index 0000000..bbdb41d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ToInt.gif
new file mode 100644
index 0000000..73aa62a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ToModelElement.gif
new file mode 100644
index 0000000..7561bfa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ToMultiplicity.gif
new file mode 100644
index 0000000..3744cee
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ToString.gif
new file mode 100644
index 0000000..72a560f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Value.gif
new file mode 100644
index 0000000..84d3267
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_VariableReference.gif
new file mode 100644
index 0000000..e441ba7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_XOr.gif
new file mode 100644
index 0000000..f0eecfb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_actualParameters_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_matchCounter_GTMatchCounter.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_matchCounter_GTMatchCounter.gif
new file mode 100644
index 0000000..72a560f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPatternCall_matchCounter_GTMatchCounter.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPattern_patternBodies_GTPatternBody.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPattern_patternBodies_GTPatternBody.gif
new file mode 100644
index 0000000..457a698
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPattern_patternBodies_GTPatternBody.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPattern_symParameters_PatternVariable.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPattern_symParameters_PatternVariable.gif
new file mode 100644
index 0000000..c2554c2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTPattern_symParameters_PatternVariable.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..738bdbd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Aggregate.gif
new file mode 100644
index 0000000..e0bed64
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_And.gif
new file mode 100644
index 0000000..66a097b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Constant.gif
new file mode 100644
index 0000000..4a2fd2e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Division.gif
new file mode 100644
index 0000000..51bab8f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ElementReference.gif
new file mode 100644
index 0000000..3c08924
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Equals.gif
new file mode 100644
index 0000000..4d1f9ad
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_FullyQualifiedName.gif
new file mode 100644
index 0000000..7c47952
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_GTPatternCall.gif
new file mode 100644
index 0000000..bfcb3a1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_GreaterThan.gif
new file mode 100644
index 0000000..e03542c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..c525027
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Inverse.gif
new file mode 100644
index 0000000..0131b56
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_LessThan.gif
new file mode 100644
index 0000000..22bd4d1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..6b00e67
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Minus.gif
new file mode 100644
index 0000000..8bb4bb6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ModelElementQuery.gif
new file mode 100644
index 0000000..c171fe0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Multiplicity.gif
new file mode 100644
index 0000000..7faa8da
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Multiply.gif
new file mode 100644
index 0000000..8bb4bb6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Name.gif
new file mode 100644
index 0000000..5cee800
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..f796f6c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Not.gif
new file mode 100644
index 0000000..ca9caba
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_NotEquals.gif
new file mode 100644
index 0000000..ca9caba
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Or.gif
new file mode 100644
index 0000000..c18e273
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Plus.gif
new file mode 100644
index 0000000..bd41c11
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Remainder.gif
new file mode 100644
index 0000000..7f033f3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Source.gif
new file mode 100644
index 0000000..df2b32d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Target.gif
new file mode 100644
index 0000000..66a097b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ToBoolean.gif
new file mode 100644
index 0000000..b021070
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ToDouble.gif
new file mode 100644
index 0000000..c128024
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ToInt.gif
new file mode 100644
index 0000000..7c47952
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ToModelElement.gif
new file mode 100644
index 0000000..9466445
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ToMultiplicity.gif
new file mode 100644
index 0000000..bfcb3a1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ToString.gif
new file mode 100644
index 0000000..7f033f3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Value.gif
new file mode 100644
index 0000000..debadf0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_VariableReference.gif
new file mode 100644
index 0000000..6467d42
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_XOr.gif
new file mode 100644
index 0000000..ff11711
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRuleInvocation_actualParameters_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_CallRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_CallRule.gif
new file mode 100644
index 0000000..65e9a41
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_CallRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ChooseRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ChooseRule.gif
new file mode 100644
index 0000000..67ba99c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ChooseRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ConditionalRuleIf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ConditionalRuleIf.gif
new file mode 100644
index 0000000..a7c98ad
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ConditionalRuleIf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ConditionalRuleTry.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ConditionalRuleTry.gif
new file mode 100644
index 0000000..19ae144
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ConditionalRuleTry.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_CreateInstanceOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_CreateInstanceOf.gif
new file mode 100644
index 0000000..b8fa9f3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_CreateInstanceOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_CreateSupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_CreateSupertypeOf.gif
new file mode 100644
index 0000000..2c9fb7d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_CreateSupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_DeleteInstanceOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_DeleteInstanceOf.gif
new file mode 100644
index 0000000..c69e87c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_DeleteInstanceOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_DeleteSupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_DeleteSupertypeOf.gif
new file mode 100644
index 0000000..e343f28
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_DeleteSupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ElementDeleteRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ElementDeleteRule.gif
new file mode 100644
index 0000000..e30b401
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ElementDeleteRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_EntityCreateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_EntityCreateRule.gif
new file mode 100644
index 0000000..6fc892d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_EntityCreateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_FailRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_FailRule.gif
new file mode 100644
index 0000000..65e9a41
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_FailRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ForallRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ForallRule.gif
new file mode 100644
index 0000000..e9ccde5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ForallRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_GTRuleInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_GTRuleInvocation.gif
new file mode 100644
index 0000000..f6ad66a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_GTRuleInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_IterateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_IterateRule.gif
new file mode 100644
index 0000000..af3c30f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_IterateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_LetRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_LetRule.gif
new file mode 100644
index 0000000..e343f28
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_LetRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_LogRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_LogRule.gif
new file mode 100644
index 0000000..0932960
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_LogRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ModelCopyRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ModelCopyRule.gif
new file mode 100644
index 0000000..f3fb35e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ModelCopyRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_MoveRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_MoveRule.gif
new file mode 100644
index 0000000..19ae144
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_MoveRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ParallelRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ParallelRule.gif
new file mode 100644
index 0000000..65e9a41
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_ParallelRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_PrintLnRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_PrintLnRule.gif
new file mode 100644
index 0000000..ad594ff
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_PrintLnRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_PrintRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_PrintRule.gif
new file mode 100644
index 0000000..ad594ff
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_PrintRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_RandomRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_RandomRule.gif
new file mode 100644
index 0000000..67ba99c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_RandomRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_RelationCreateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_RelationCreateRule.gif
new file mode 100644
index 0000000..574943b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_RelationCreateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_RenameRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_RenameRule.gif
new file mode 100644
index 0000000..9c9b7c6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_RenameRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_RuleUpdateASMFunction.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_RuleUpdateASMFunction.gif
new file mode 100644
index 0000000..291b062
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_RuleUpdateASMFunction.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_RuleUpdateVariable.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_RuleUpdateVariable.gif
new file mode 100644
index 0000000..a259b8f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_RuleUpdateVariable.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SequentialRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SequentialRule.gif
new file mode 100644
index 0000000..ad594ff
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SequentialRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetAggregationRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetAggregationRule.gif
new file mode 100644
index 0000000..f0b400c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetAggregationRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetAnySourceRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetAnySourceRule.gif
new file mode 100644
index 0000000..d2df954
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetAnySourceRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetAnyTargetRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetAnyTargetRule.gif
new file mode 100644
index 0000000..77b5f03
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetAnyTargetRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetInverseRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetInverseRule.gif
new file mode 100644
index 0000000..960fd9d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetInverseRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetMultiplicityRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetMultiplicityRule.gif
new file mode 100644
index 0000000..0932960
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetMultiplicityRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetRelationFrom.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetRelationFrom.gif
new file mode 100644
index 0000000..9c9b7c6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetRelationFrom.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetRelationTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetRelationTo.gif
new file mode 100644
index 0000000..29daffe
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetRelationTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetValueRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetValueRule.gif
new file mode 100644
index 0000000..f0b400c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SetValueRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SkipRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SkipRule.gif
new file mode 100644
index 0000000..19ae144
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_SkipRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_WhenRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_WhenRule.gif
new file mode 100644
index 0000000..e01fab4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_action_WhenRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_localPatternDefinition_GTPattern.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_localPatternDefinition_GTPattern.gif
new file mode 100644
index 0000000..3e3b45a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_localPatternDefinition_GTPattern.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_localVariables_PatternVariable.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_localVariables_PatternVariable.gif
new file mode 100644
index 0000000..e007789
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_localVariables_PatternVariable.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_localVariables_Variable.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_localVariables_Variable.gif
new file mode 100644
index 0000000..535fd38
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_localVariables_Variable.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_postcondition_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_postcondition_GTPatternCall.gif
new file mode 100644
index 0000000..9f92d6f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_postcondition_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_precondition_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_precondition_GTPatternCall.gif
new file mode 100644
index 0000000..9f92d6f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_precondition_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_symParameters_SymbolicRuleParameter.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_symParameters_SymbolicRuleParameter.gif
new file mode 100644
index 0000000..ad594ff
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateGTRule_symParameters_SymbolicRuleParameter.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..517abc7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Aggregate.gif
new file mode 100644
index 0000000..ad157ff
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_And.gif
new file mode 100644
index 0000000..9a73c8d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Constant.gif
new file mode 100644
index 0000000..bf50c76
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Division.gif
new file mode 100644
index 0000000..1584981
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ElementReference.gif
new file mode 100644
index 0000000..3b60193
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Equals.gif
new file mode 100644
index 0000000..b68de5e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_FullyQualifiedName.gif
new file mode 100644
index 0000000..ecde335
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_GTPatternCall.gif
new file mode 100644
index 0000000..eabf210
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_GreaterThan.gif
new file mode 100644
index 0000000..5fc9320
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..1ebcee0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Inverse.gif
new file mode 100644
index 0000000..5a308e5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_LessThan.gif
new file mode 100644
index 0000000..28525df
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..c200e69
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Minus.gif
new file mode 100644
index 0000000..3daea53
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ModelElementQuery.gif
new file mode 100644
index 0000000..b8a285a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Multiplicity.gif
new file mode 100644
index 0000000..159895b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Multiply.gif
new file mode 100644
index 0000000..3daea53
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Name.gif
new file mode 100644
index 0000000..954afa1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..ce5530e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Not.gif
new file mode 100644
index 0000000..7a76354
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_NotEquals.gif
new file mode 100644
index 0000000..7a76354
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Or.gif
new file mode 100644
index 0000000..a785c69
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Plus.gif
new file mode 100644
index 0000000..aced3dd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Remainder.gif
new file mode 100644
index 0000000..5f4cee6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Source.gif
new file mode 100644
index 0000000..a4565df
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Target.gif
new file mode 100644
index 0000000..9a73c8d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ToBoolean.gif
new file mode 100644
index 0000000..d56a04b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ToDouble.gif
new file mode 100644
index 0000000..997e434
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ToInt.gif
new file mode 100644
index 0000000..ecde335
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ToModelElement.gif
new file mode 100644
index 0000000..57fa1bb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ToMultiplicity.gif
new file mode 100644
index 0000000..eabf210
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ToString.gif
new file mode 100644
index 0000000..5f4cee6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Value.gif
new file mode 100644
index 0000000..3274511
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_VariableReference.gif
new file mode 100644
index 0000000..73b08f7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_XOr.gif
new file mode 100644
index 0000000..4455fd0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_locations_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..517abc7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Aggregate.gif
new file mode 100644
index 0000000..ad157ff
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_And.gif
new file mode 100644
index 0000000..9a73c8d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Constant.gif
new file mode 100644
index 0000000..bf50c76
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Division.gif
new file mode 100644
index 0000000..1584981
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ElementReference.gif
new file mode 100644
index 0000000..3b60193
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Equals.gif
new file mode 100644
index 0000000..b68de5e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_FullyQualifiedName.gif
new file mode 100644
index 0000000..ecde335
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_GTPatternCall.gif
new file mode 100644
index 0000000..eabf210
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_GreaterThan.gif
new file mode 100644
index 0000000..5fc9320
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..1ebcee0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Inverse.gif
new file mode 100644
index 0000000..5a308e5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_LessThan.gif
new file mode 100644
index 0000000..28525df
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..c200e69
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Minus.gif
new file mode 100644
index 0000000..3daea53
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ModelElementQuery.gif
new file mode 100644
index 0000000..b8a285a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Multiplicity.gif
new file mode 100644
index 0000000..159895b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Multiply.gif
new file mode 100644
index 0000000..3daea53
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Name.gif
new file mode 100644
index 0000000..954afa1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..ce5530e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Not.gif
new file mode 100644
index 0000000..7a76354
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_NotEquals.gif
new file mode 100644
index 0000000..7a76354
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Or.gif
new file mode 100644
index 0000000..a785c69
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Plus.gif
new file mode 100644
index 0000000..aced3dd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Remainder.gif
new file mode 100644
index 0000000..5f4cee6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Source.gif
new file mode 100644
index 0000000..a4565df
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Target.gif
new file mode 100644
index 0000000..9a73c8d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ToBoolean.gif
new file mode 100644
index 0000000..d56a04b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ToDouble.gif
new file mode 100644
index 0000000..997e434
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ToInt.gif
new file mode 100644
index 0000000..ecde335
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ToModelElement.gif
new file mode 100644
index 0000000..57fa1bb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ToMultiplicity.gif
new file mode 100644
index 0000000..eabf210
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ToString.gif
new file mode 100644
index 0000000..5f4cee6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Value.gif
new file mode 100644
index 0000000..3274511
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_VariableReference.gif
new file mode 100644
index 0000000..73b08f7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_XOr.gif
new file mode 100644
index 0000000..4455fd0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateInitialValue_value_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLetRule_definitions_VariableDefinition.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLetRule_definitions_VariableDefinition.gif
new file mode 100644
index 0000000..50ac6da
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLetRule_definitions_VariableDefinition.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..df7c27b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Aggregate.gif
new file mode 100644
index 0000000..33623fc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_And.gif
new file mode 100644
index 0000000..1fd067e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Constant.gif
new file mode 100644
index 0000000..3dc627e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Division.gif
new file mode 100644
index 0000000..a825df2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ElementReference.gif
new file mode 100644
index 0000000..0313101
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Equals.gif
new file mode 100644
index 0000000..ff42300
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_FullyQualifiedName.gif
new file mode 100644
index 0000000..14febdf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_GTPatternCall.gif
new file mode 100644
index 0000000..1c8df2f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_GreaterThan.gif
new file mode 100644
index 0000000..e45936a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..37ddf24
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Inverse.gif
new file mode 100644
index 0000000..e910934
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_LessThan.gif
new file mode 100644
index 0000000..e8326d4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..e04b1b4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Minus.gif
new file mode 100644
index 0000000..61c2b26
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ModelElementQuery.gif
new file mode 100644
index 0000000..7afe9dc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Multiplicity.gif
new file mode 100644
index 0000000..639ce14
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Multiply.gif
new file mode 100644
index 0000000..61c2b26
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Name.gif
new file mode 100644
index 0000000..fa9b519
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..06e47ff
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Not.gif
new file mode 100644
index 0000000..9b4e66a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_NotEquals.gif
new file mode 100644
index 0000000..9b4e66a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Or.gif
new file mode 100644
index 0000000..c715ea9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Plus.gif
new file mode 100644
index 0000000..49009e0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Remainder.gif
new file mode 100644
index 0000000..8ae0d15
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Source.gif
new file mode 100644
index 0000000..761cb2b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Target.gif
new file mode 100644
index 0000000..1fd067e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ToBoolean.gif
new file mode 100644
index 0000000..42d5408
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ToDouble.gif
new file mode 100644
index 0000000..78645ad
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ToInt.gif
new file mode 100644
index 0000000..14febdf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ToModelElement.gif
new file mode 100644
index 0000000..229e2e1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ToMultiplicity.gif
new file mode 100644
index 0000000..1c8df2f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ToString.gif
new file mode 100644
index 0000000..8ae0d15
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Value.gif
new file mode 100644
index 0000000..2e9e401
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_VariableReference.gif
new file mode 100644
index 0000000..5c5dfd4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_XOr.gif
new file mode 100644
index 0000000..2dc1706
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateLogRule_out_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMachine_asmFunctionDefinitions_ASMFunction.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMachine_asmFunctionDefinitions_ASMFunction.gif
new file mode 100644
index 0000000..a45fc7d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMachine_asmFunctionDefinitions_ASMFunction.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMachine_asmRuleDefinitions_Rule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMachine_asmRuleDefinitions_Rule.gif
new file mode 100644
index 0000000..a12f58d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMachine_asmRuleDefinitions_Rule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMachine_gtPatternDefinitions_GTPattern.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMachine_gtPatternDefinitions_GTPattern.gif
new file mode 100644
index 0000000..8cd9cfa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMachine_gtPatternDefinitions_GTPattern.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMachine_gtRuleDefinitions_GTRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMachine_gtRuleDefinitions_GTRule.gif
new file mode 100644
index 0000000..fac7c9b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMachine_gtRuleDefinitions_GTRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..517abc7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Aggregate.gif
new file mode 100644
index 0000000..ad157ff
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_And.gif
new file mode 100644
index 0000000..9a73c8d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Constant.gif
new file mode 100644
index 0000000..bf50c76
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Division.gif
new file mode 100644
index 0000000..1584981
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ElementReference.gif
new file mode 100644
index 0000000..3b60193
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Equals.gif
new file mode 100644
index 0000000..b68de5e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_FullyQualifiedName.gif
new file mode 100644
index 0000000..ecde335
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_GTPatternCall.gif
new file mode 100644
index 0000000..eabf210
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_GreaterThan.gif
new file mode 100644
index 0000000..5fc9320
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..1ebcee0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Inverse.gif
new file mode 100644
index 0000000..5a308e5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_LessThan.gif
new file mode 100644
index 0000000..28525df
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..c200e69
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Minus.gif
new file mode 100644
index 0000000..3daea53
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ModelElementQuery.gif
new file mode 100644
index 0000000..b8a285a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Multiplicity.gif
new file mode 100644
index 0000000..159895b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Multiply.gif
new file mode 100644
index 0000000..3daea53
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Name.gif
new file mode 100644
index 0000000..954afa1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..ce5530e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Not.gif
new file mode 100644
index 0000000..7a76354
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_NotEquals.gif
new file mode 100644
index 0000000..7a76354
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Or.gif
new file mode 100644
index 0000000..a785c69
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Plus.gif
new file mode 100644
index 0000000..aced3dd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Remainder.gif
new file mode 100644
index 0000000..5f4cee6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Source.gif
new file mode 100644
index 0000000..a4565df
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Target.gif
new file mode 100644
index 0000000..9a73c8d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ToBoolean.gif
new file mode 100644
index 0000000..d56a04b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ToDouble.gif
new file mode 100644
index 0000000..997e434
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ToInt.gif
new file mode 100644
index 0000000..ecde335
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ToModelElement.gif
new file mode 100644
index 0000000..57fa1bb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ToMultiplicity.gif
new file mode 100644
index 0000000..eabf210
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ToString.gif
new file mode 100644
index 0000000..5f4cee6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Value.gif
new file mode 100644
index 0000000..3274511
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_VariableReference.gif
new file mode 100644
index 0000000..73b08f7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_XOr.gif
new file mode 100644
index 0000000..4455fd0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_srcRoot_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_targetVariable_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_targetVariable_VariableReference.gif
new file mode 100644
index 0000000..73b08f7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_targetVariable_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..517abc7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Aggregate.gif
new file mode 100644
index 0000000..ad157ff
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_And.gif
new file mode 100644
index 0000000..9a73c8d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Constant.gif
new file mode 100644
index 0000000..bf50c76
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Division.gif
new file mode 100644
index 0000000..1584981
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ElementReference.gif
new file mode 100644
index 0000000..3b60193
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Equals.gif
new file mode 100644
index 0000000..b68de5e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_FullyQualifiedName.gif
new file mode 100644
index 0000000..ecde335
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_GTPatternCall.gif
new file mode 100644
index 0000000..eabf210
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_GreaterThan.gif
new file mode 100644
index 0000000..5fc9320
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..1ebcee0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Inverse.gif
new file mode 100644
index 0000000..5a308e5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_LessThan.gif
new file mode 100644
index 0000000..28525df
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..c200e69
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Minus.gif
new file mode 100644
index 0000000..3daea53
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ModelElementQuery.gif
new file mode 100644
index 0000000..b8a285a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Multiplicity.gif
new file mode 100644
index 0000000..159895b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Multiply.gif
new file mode 100644
index 0000000..3daea53
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Name.gif
new file mode 100644
index 0000000..954afa1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..ce5530e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Not.gif
new file mode 100644
index 0000000..7a76354
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_NotEquals.gif
new file mode 100644
index 0000000..7a76354
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Or.gif
new file mode 100644
index 0000000..a785c69
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Plus.gif
new file mode 100644
index 0000000..aced3dd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Remainder.gif
new file mode 100644
index 0000000..5f4cee6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Source.gif
new file mode 100644
index 0000000..a4565df
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Target.gif
new file mode 100644
index 0000000..9a73c8d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ToBoolean.gif
new file mode 100644
index 0000000..d56a04b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ToDouble.gif
new file mode 100644
index 0000000..997e434
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ToInt.gif
new file mode 100644
index 0000000..ecde335
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ToModelElement.gif
new file mode 100644
index 0000000..57fa1bb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ToMultiplicity.gif
new file mode 100644
index 0000000..eabf210
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ToString.gif
new file mode 100644
index 0000000..5f4cee6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Value.gif
new file mode 100644
index 0000000..3274511
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_VariableReference.gif
new file mode 100644
index 0000000..73b08f7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_XOr.gif
new file mode 100644
index 0000000..4455fd0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelCopyRule_trgContainer_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..845e9f4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Aggregate.gif
new file mode 100644
index 0000000..fac7c9b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_And.gif
new file mode 100644
index 0000000..1dd58e1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Constant.gif
new file mode 100644
index 0000000..84d142d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Division.gif
new file mode 100644
index 0000000..1230fa4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ElementReference.gif
new file mode 100644
index 0000000..be83d34
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Equals.gif
new file mode 100644
index 0000000..870d2b2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_FullyQualifiedName.gif
new file mode 100644
index 0000000..7be6ec4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_GTPatternCall.gif
new file mode 100644
index 0000000..b93b3d2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_GreaterThan.gif
new file mode 100644
index 0000000..aa0a098
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..c5686b5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Inverse.gif
new file mode 100644
index 0000000..daa2b9d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_LessThan.gif
new file mode 100644
index 0000000..1e49376
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..8cd9cfa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Minus.gif
new file mode 100644
index 0000000..a46fda5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ModelElementQuery.gif
new file mode 100644
index 0000000..d8b262a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Multiplicity.gif
new file mode 100644
index 0000000..96a3cb7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Multiply.gif
new file mode 100644
index 0000000..a46fda5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Name.gif
new file mode 100644
index 0000000..252ab40
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..9e34a53
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Not.gif
new file mode 100644
index 0000000..889f3af
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_NotEquals.gif
new file mode 100644
index 0000000..889f3af
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Or.gif
new file mode 100644
index 0000000..149a215
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Plus.gif
new file mode 100644
index 0000000..d82f226
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Remainder.gif
new file mode 100644
index 0000000..f2b0a1e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Source.gif
new file mode 100644
index 0000000..0f107c5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Target.gif
new file mode 100644
index 0000000..1dd58e1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ToBoolean.gif
new file mode 100644
index 0000000..ca61c9e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ToDouble.gif
new file mode 100644
index 0000000..b6f318a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ToInt.gif
new file mode 100644
index 0000000..7be6ec4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ToModelElement.gif
new file mode 100644
index 0000000..d1b1538
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ToMultiplicity.gif
new file mode 100644
index 0000000..b93b3d2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ToString.gif
new file mode 100644
index 0000000..f2b0a1e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Value.gif
new file mode 100644
index 0000000..dac0ebb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_VariableReference.gif
new file mode 100644
index 0000000..05f18cc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_XOr.gif
new file mode 100644
index 0000000..eb8204c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElementQuery_argument_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElement_relationsFrom_Relation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElement_relationsFrom_Relation.gif
new file mode 100644
index 0000000..eb4dbff
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElement_relationsFrom_Relation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElement_superRelationships_SupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElement_superRelationships_SupertypeOf.gif
new file mode 100644
index 0000000..a5e5f97
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElement_superRelationships_SupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElement_superRelationships_TypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElement_superRelationships_TypeOf.gif
new file mode 100644
index 0000000..c048169
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModelElement_superRelationships_TypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModule_import_ImportDeclaration.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModule_import_ImportDeclaration.gif
new file mode 100644
index 0000000..9531433
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModule_import_ImportDeclaration.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModule_machine_Machine.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModule_machine_Machine.gif
new file mode 100644
index 0000000..a6d8558
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModule_machine_Machine.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModule_namespace_NamespaceDefinition.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModule_namespace_NamespaceDefinition.gif
new file mode 100644
index 0000000..f3d7cb9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateModule_namespace_NamespaceDefinition.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..993d090
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Aggregate.gif
new file mode 100644
index 0000000..845de0f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_And.gif
new file mode 100644
index 0000000..2a3bcb3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Constant.gif
new file mode 100644
index 0000000..294bcb2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Division.gif
new file mode 100644
index 0000000..94665b1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ElementReference.gif
new file mode 100644
index 0000000..fb87467
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Equals.gif
new file mode 100644
index 0000000..8fc2166
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_FullyQualifiedName.gif
new file mode 100644
index 0000000..de1bf6d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_GTPatternCall.gif
new file mode 100644
index 0000000..4b9f986
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_GreaterThan.gif
new file mode 100644
index 0000000..519be70
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..9fff14a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Inverse.gif
new file mode 100644
index 0000000..5a78e87
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_LessThan.gif
new file mode 100644
index 0000000..6cb3a27
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..d53ad79
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Minus.gif
new file mode 100644
index 0000000..2f75407
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ModelElementQuery.gif
new file mode 100644
index 0000000..85e7906
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Multiplicity.gif
new file mode 100644
index 0000000..628ea3f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Multiply.gif
new file mode 100644
index 0000000..2f75407
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Name.gif
new file mode 100644
index 0000000..4699e94
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..780caea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Not.gif
new file mode 100644
index 0000000..0fb82fc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_NotEquals.gif
new file mode 100644
index 0000000..0fb82fc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Or.gif
new file mode 100644
index 0000000..9d2db8f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Plus.gif
new file mode 100644
index 0000000..69010af
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Remainder.gif
new file mode 100644
index 0000000..930f743
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Source.gif
new file mode 100644
index 0000000..261e05c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Target.gif
new file mode 100644
index 0000000..2a3bcb3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ToBoolean.gif
new file mode 100644
index 0000000..a8d71d8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ToDouble.gif
new file mode 100644
index 0000000..e1982d4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ToInt.gif
new file mode 100644
index 0000000..de1bf6d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ToModelElement.gif
new file mode 100644
index 0000000..9bacb28
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ToMultiplicity.gif
new file mode 100644
index 0000000..4b9f986
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ToString.gif
new file mode 100644
index 0000000..930f743
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Value.gif
new file mode 100644
index 0000000..3ddab58
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_VariableReference.gif
new file mode 100644
index 0000000..91619bc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_XOr.gif
new file mode 100644
index 0000000..eb658f3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_srcRoot_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..993d090
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Aggregate.gif
new file mode 100644
index 0000000..845de0f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_And.gif
new file mode 100644
index 0000000..2a3bcb3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Constant.gif
new file mode 100644
index 0000000..294bcb2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Division.gif
new file mode 100644
index 0000000..94665b1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ElementReference.gif
new file mode 100644
index 0000000..fb87467
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Equals.gif
new file mode 100644
index 0000000..8fc2166
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_FullyQualifiedName.gif
new file mode 100644
index 0000000..de1bf6d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_GTPatternCall.gif
new file mode 100644
index 0000000..4b9f986
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_GreaterThan.gif
new file mode 100644
index 0000000..519be70
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..9fff14a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Inverse.gif
new file mode 100644
index 0000000..5a78e87
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_LessThan.gif
new file mode 100644
index 0000000..6cb3a27
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..d53ad79
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Minus.gif
new file mode 100644
index 0000000..2f75407
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ModelElementQuery.gif
new file mode 100644
index 0000000..85e7906
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Multiplicity.gif
new file mode 100644
index 0000000..628ea3f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Multiply.gif
new file mode 100644
index 0000000..2f75407
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Name.gif
new file mode 100644
index 0000000..4699e94
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..780caea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Not.gif
new file mode 100644
index 0000000..0fb82fc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_NotEquals.gif
new file mode 100644
index 0000000..0fb82fc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Or.gif
new file mode 100644
index 0000000..9d2db8f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Plus.gif
new file mode 100644
index 0000000..69010af
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Remainder.gif
new file mode 100644
index 0000000..930f743
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Source.gif
new file mode 100644
index 0000000..261e05c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Target.gif
new file mode 100644
index 0000000..2a3bcb3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ToBoolean.gif
new file mode 100644
index 0000000..a8d71d8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ToDouble.gif
new file mode 100644
index 0000000..e1982d4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ToInt.gif
new file mode 100644
index 0000000..de1bf6d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ToModelElement.gif
new file mode 100644
index 0000000..9bacb28
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ToMultiplicity.gif
new file mode 100644
index 0000000..4b9f986
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ToString.gif
new file mode 100644
index 0000000..930f743
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Value.gif
new file mode 100644
index 0000000..3ddab58
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_VariableReference.gif
new file mode 100644
index 0000000..91619bc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_XOr.gif
new file mode 100644
index 0000000..eb658f3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateMoveRule_trgContainer_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_CallRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_CallRule.gif
new file mode 100644
index 0000000..ff1bc46
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_CallRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ChooseRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ChooseRule.gif
new file mode 100644
index 0000000..e1a974d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ChooseRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ConditionalRuleIf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ConditionalRuleIf.gif
new file mode 100644
index 0000000..625be45
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ConditionalRuleIf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ConditionalRuleTry.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ConditionalRuleTry.gif
new file mode 100644
index 0000000..039d611
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ConditionalRuleTry.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_CreateInstanceOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_CreateInstanceOf.gif
new file mode 100644
index 0000000..678bf2f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_CreateInstanceOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_CreateSupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_CreateSupertypeOf.gif
new file mode 100644
index 0000000..5ac844d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_CreateSupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_DeleteInstanceOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_DeleteInstanceOf.gif
new file mode 100644
index 0000000..8a81cf6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_DeleteInstanceOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_DeleteSupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_DeleteSupertypeOf.gif
new file mode 100644
index 0000000..aefaad1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_DeleteSupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ElementDeleteRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ElementDeleteRule.gif
new file mode 100644
index 0000000..27dc0ef
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ElementDeleteRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_EntityCreateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_EntityCreateRule.gif
new file mode 100644
index 0000000..b928348
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_EntityCreateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_FailRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_FailRule.gif
new file mode 100644
index 0000000..ff1bc46
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_FailRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ForallRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ForallRule.gif
new file mode 100644
index 0000000..6083e65
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ForallRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_GTRuleInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_GTRuleInvocation.gif
new file mode 100644
index 0000000..dd6cda7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_GTRuleInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_IterateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_IterateRule.gif
new file mode 100644
index 0000000..d59b3c9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_IterateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_LetRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_LetRule.gif
new file mode 100644
index 0000000..aefaad1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_LetRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_LogRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_LogRule.gif
new file mode 100644
index 0000000..be01e39
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_LogRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ModelCopyRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ModelCopyRule.gif
new file mode 100644
index 0000000..5b170f7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ModelCopyRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_MoveRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_MoveRule.gif
new file mode 100644
index 0000000..039d611
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_MoveRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ParallelRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ParallelRule.gif
new file mode 100644
index 0000000..ff1bc46
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_ParallelRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_PrintLnRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_PrintLnRule.gif
new file mode 100644
index 0000000..f13bfed
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_PrintLnRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_PrintRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_PrintRule.gif
new file mode 100644
index 0000000..f13bfed
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_PrintRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_RandomRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_RandomRule.gif
new file mode 100644
index 0000000..e1a974d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_RandomRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_RelationCreateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_RelationCreateRule.gif
new file mode 100644
index 0000000..7e55e97
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_RelationCreateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_RenameRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_RenameRule.gif
new file mode 100644
index 0000000..764013a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_RenameRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_RuleUpdateASMFunction.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_RuleUpdateASMFunction.gif
new file mode 100644
index 0000000..17408b8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_RuleUpdateASMFunction.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_RuleUpdateVariable.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_RuleUpdateVariable.gif
new file mode 100644
index 0000000..49d5160
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_RuleUpdateVariable.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SequentialRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SequentialRule.gif
new file mode 100644
index 0000000..f13bfed
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SequentialRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetAggregationRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetAggregationRule.gif
new file mode 100644
index 0000000..c0805c4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetAggregationRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetAnySourceRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetAnySourceRule.gif
new file mode 100644
index 0000000..adf0a6f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetAnySourceRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetAnyTargetRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetAnyTargetRule.gif
new file mode 100644
index 0000000..dcf6e96
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetAnyTargetRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetInverseRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetInverseRule.gif
new file mode 100644
index 0000000..30b27aa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetInverseRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetMultiplicityRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetMultiplicityRule.gif
new file mode 100644
index 0000000..be01e39
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetMultiplicityRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetRelationFrom.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetRelationFrom.gif
new file mode 100644
index 0000000..764013a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetRelationFrom.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetRelationTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetRelationTo.gif
new file mode 100644
index 0000000..cbc3f43
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetRelationTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetValueRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetValueRule.gif
new file mode 100644
index 0000000..c0805c4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SetValueRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SkipRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SkipRule.gif
new file mode 100644
index 0000000..039d611
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_SkipRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_WhenRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_WhenRule.gif
new file mode 100644
index 0000000..f9c132c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateNestedRule_subrules_WhenRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePatternContainer_gtPatternDefinitions_GTPattern.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePatternContainer_gtPatternDefinitions_GTPattern.gif
new file mode 100644
index 0000000..70d9b43
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePatternContainer_gtPatternDefinitions_GTPattern.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePatternVariableConstraint_leftValue_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePatternVariableConstraint_leftValue_VariableReference.gif
new file mode 100644
index 0000000..5498173
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePatternVariableConstraint_leftValue_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePatternVariableConstraint_rightValue_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePatternVariableConstraint_rightValue_VariableReference.gif
new file mode 100644
index 0000000..5498173
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePatternVariableConstraint_rightValue_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..5fe40c4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Aggregate.gif
new file mode 100644
index 0000000..a36743b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_And.gif
new file mode 100644
index 0000000..92d407e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Constant.gif
new file mode 100644
index 0000000..86d7811
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Division.gif
new file mode 100644
index 0000000..b7adb36
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ElementReference.gif
new file mode 100644
index 0000000..dd8ab8d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Equals.gif
new file mode 100644
index 0000000..3353cf6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_FullyQualifiedName.gif
new file mode 100644
index 0000000..5381067
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_GTPatternCall.gif
new file mode 100644
index 0000000..28de654
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_GreaterThan.gif
new file mode 100644
index 0000000..1651076
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..0d55746
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Inverse.gif
new file mode 100644
index 0000000..8b6df37
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_LessThan.gif
new file mode 100644
index 0000000..1329dce
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..9e35a4e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Minus.gif
new file mode 100644
index 0000000..d4cb25e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ModelElementQuery.gif
new file mode 100644
index 0000000..b9cd878
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Multiplicity.gif
new file mode 100644
index 0000000..d065203
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Multiply.gif
new file mode 100644
index 0000000..d4cb25e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Name.gif
new file mode 100644
index 0000000..a303761
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..c022715
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Not.gif
new file mode 100644
index 0000000..0cf27b2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_NotEquals.gif
new file mode 100644
index 0000000..0cf27b2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Or.gif
new file mode 100644
index 0000000..4f7ee52
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Plus.gif
new file mode 100644
index 0000000..f420604
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Remainder.gif
new file mode 100644
index 0000000..9144498
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Source.gif
new file mode 100644
index 0000000..de6e628
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Target.gif
new file mode 100644
index 0000000..92d407e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ToBoolean.gif
new file mode 100644
index 0000000..7b652ac
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ToDouble.gif
new file mode 100644
index 0000000..bee2a07
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ToInt.gif
new file mode 100644
index 0000000..5381067
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ToModelElement.gif
new file mode 100644
index 0000000..06250be
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ToMultiplicity.gif
new file mode 100644
index 0000000..28de654
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ToString.gif
new file mode 100644
index 0000000..9144498
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Value.gif
new file mode 100644
index 0000000..9fcf2c7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_VariableReference.gif
new file mode 100644
index 0000000..e88df1c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_XOr.gif
new file mode 100644
index 0000000..68ea265
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_buffer_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..5fe40c4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Aggregate.gif
new file mode 100644
index 0000000..a36743b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_And.gif
new file mode 100644
index 0000000..92d407e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Constant.gif
new file mode 100644
index 0000000..86d7811
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Division.gif
new file mode 100644
index 0000000..b7adb36
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ElementReference.gif
new file mode 100644
index 0000000..dd8ab8d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Equals.gif
new file mode 100644
index 0000000..3353cf6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_FullyQualifiedName.gif
new file mode 100644
index 0000000..5381067
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_GTPatternCall.gif
new file mode 100644
index 0000000..28de654
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_GreaterThan.gif
new file mode 100644
index 0000000..1651076
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..0d55746
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Inverse.gif
new file mode 100644
index 0000000..8b6df37
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_LessThan.gif
new file mode 100644
index 0000000..1329dce
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..9e35a4e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Minus.gif
new file mode 100644
index 0000000..d4cb25e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ModelElementQuery.gif
new file mode 100644
index 0000000..b9cd878
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Multiplicity.gif
new file mode 100644
index 0000000..d065203
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Multiply.gif
new file mode 100644
index 0000000..d4cb25e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Name.gif
new file mode 100644
index 0000000..a303761
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..c022715
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Not.gif
new file mode 100644
index 0000000..0cf27b2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_NotEquals.gif
new file mode 100644
index 0000000..0cf27b2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Or.gif
new file mode 100644
index 0000000..4f7ee52
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Plus.gif
new file mode 100644
index 0000000..f420604
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Remainder.gif
new file mode 100644
index 0000000..9144498
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Source.gif
new file mode 100644
index 0000000..de6e628
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Target.gif
new file mode 100644
index 0000000..92d407e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ToBoolean.gif
new file mode 100644
index 0000000..7b652ac
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ToDouble.gif
new file mode 100644
index 0000000..bee2a07
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ToInt.gif
new file mode 100644
index 0000000..5381067
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ToModelElement.gif
new file mode 100644
index 0000000..06250be
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ToMultiplicity.gif
new file mode 100644
index 0000000..28de654
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ToString.gif
new file mode 100644
index 0000000..9144498
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Value.gif
new file mode 100644
index 0000000..9fcf2c7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_VariableReference.gif
new file mode 100644
index 0000000..e88df1c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_XOr.gif
new file mode 100644
index 0000000..68ea265
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintLnRule_out_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..5fe40c4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Aggregate.gif
new file mode 100644
index 0000000..a36743b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_And.gif
new file mode 100644
index 0000000..92d407e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Constant.gif
new file mode 100644
index 0000000..86d7811
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Division.gif
new file mode 100644
index 0000000..b7adb36
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ElementReference.gif
new file mode 100644
index 0000000..dd8ab8d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Equals.gif
new file mode 100644
index 0000000..3353cf6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_FullyQualifiedName.gif
new file mode 100644
index 0000000..5381067
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_GTPatternCall.gif
new file mode 100644
index 0000000..28de654
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_GreaterThan.gif
new file mode 100644
index 0000000..1651076
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..0d55746
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Inverse.gif
new file mode 100644
index 0000000..8b6df37
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_LessThan.gif
new file mode 100644
index 0000000..1329dce
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..9e35a4e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Minus.gif
new file mode 100644
index 0000000..d4cb25e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ModelElementQuery.gif
new file mode 100644
index 0000000..b9cd878
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Multiplicity.gif
new file mode 100644
index 0000000..d065203
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Multiply.gif
new file mode 100644
index 0000000..d4cb25e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Name.gif
new file mode 100644
index 0000000..a303761
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..c022715
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Not.gif
new file mode 100644
index 0000000..0cf27b2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_NotEquals.gif
new file mode 100644
index 0000000..0cf27b2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Or.gif
new file mode 100644
index 0000000..4f7ee52
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Plus.gif
new file mode 100644
index 0000000..f420604
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Remainder.gif
new file mode 100644
index 0000000..9144498
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Source.gif
new file mode 100644
index 0000000..de6e628
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Target.gif
new file mode 100644
index 0000000..92d407e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ToBoolean.gif
new file mode 100644
index 0000000..7b652ac
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ToDouble.gif
new file mode 100644
index 0000000..bee2a07
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ToInt.gif
new file mode 100644
index 0000000..5381067
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ToModelElement.gif
new file mode 100644
index 0000000..06250be
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ToMultiplicity.gif
new file mode 100644
index 0000000..28de654
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ToString.gif
new file mode 100644
index 0000000..9144498
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Value.gif
new file mode 100644
index 0000000..9fcf2c7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_VariableReference.gif
new file mode 100644
index 0000000..e88df1c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_XOr.gif
new file mode 100644
index 0000000..68ea265
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_buffer_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..5fe40c4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Aggregate.gif
new file mode 100644
index 0000000..a36743b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_And.gif
new file mode 100644
index 0000000..92d407e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Constant.gif
new file mode 100644
index 0000000..86d7811
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Division.gif
new file mode 100644
index 0000000..b7adb36
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ElementReference.gif
new file mode 100644
index 0000000..dd8ab8d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Equals.gif
new file mode 100644
index 0000000..3353cf6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_FullyQualifiedName.gif
new file mode 100644
index 0000000..5381067
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_GTPatternCall.gif
new file mode 100644
index 0000000..28de654
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_GreaterThan.gif
new file mode 100644
index 0000000..1651076
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..0d55746
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Inverse.gif
new file mode 100644
index 0000000..8b6df37
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_LessThan.gif
new file mode 100644
index 0000000..1329dce
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..9e35a4e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Minus.gif
new file mode 100644
index 0000000..d4cb25e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ModelElementQuery.gif
new file mode 100644
index 0000000..b9cd878
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Multiplicity.gif
new file mode 100644
index 0000000..d065203
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Multiply.gif
new file mode 100644
index 0000000..d4cb25e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Name.gif
new file mode 100644
index 0000000..a303761
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..c022715
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Not.gif
new file mode 100644
index 0000000..0cf27b2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_NotEquals.gif
new file mode 100644
index 0000000..0cf27b2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Or.gif
new file mode 100644
index 0000000..4f7ee52
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Plus.gif
new file mode 100644
index 0000000..f420604
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Remainder.gif
new file mode 100644
index 0000000..9144498
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Source.gif
new file mode 100644
index 0000000..de6e628
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Target.gif
new file mode 100644
index 0000000..92d407e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ToBoolean.gif
new file mode 100644
index 0000000..7b652ac
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ToDouble.gif
new file mode 100644
index 0000000..bee2a07
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ToInt.gif
new file mode 100644
index 0000000..5381067
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ToModelElement.gif
new file mode 100644
index 0000000..06250be
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ToMultiplicity.gif
new file mode 100644
index 0000000..28de654
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ToString.gif
new file mode 100644
index 0000000..9144498
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Value.gif
new file mode 100644
index 0000000..9fcf2c7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_VariableReference.gif
new file mode 100644
index 0000000..e88df1c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_XOr.gif
new file mode 100644
index 0000000..68ea265
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreatePrintRule_out_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..f9b01aa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Aggregate.gif
new file mode 100644
index 0000000..3ffbd19
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_And.gif
new file mode 100644
index 0000000..84f9729
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Constant.gif
new file mode 100644
index 0000000..cdb5a67
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Division.gif
new file mode 100644
index 0000000..ebb7793
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ElementReference.gif
new file mode 100644
index 0000000..9a4c243
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Equals.gif
new file mode 100644
index 0000000..0b5901d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_FullyQualifiedName.gif
new file mode 100644
index 0000000..ddf7fec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_GTPatternCall.gif
new file mode 100644
index 0000000..1254d2c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_GreaterThan.gif
new file mode 100644
index 0000000..ddd2316
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..03d63cb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Inverse.gif
new file mode 100644
index 0000000..42030b5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_LessThan.gif
new file mode 100644
index 0000000..2af4cd3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..7dade8c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Minus.gif
new file mode 100644
index 0000000..a989445
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ModelElementQuery.gif
new file mode 100644
index 0000000..20ca1b8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Multiplicity.gif
new file mode 100644
index 0000000..1cb8c19
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Multiply.gif
new file mode 100644
index 0000000..a989445
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Name.gif
new file mode 100644
index 0000000..29d9678
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..2f7d4aa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Not.gif
new file mode 100644
index 0000000..67f1b2b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_NotEquals.gif
new file mode 100644
index 0000000..67f1b2b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Or.gif
new file mode 100644
index 0000000..33440bf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Plus.gif
new file mode 100644
index 0000000..0c2d652
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Remainder.gif
new file mode 100644
index 0000000..d1d7856
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Source.gif
new file mode 100644
index 0000000..8b0bcba
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Target.gif
new file mode 100644
index 0000000..84f9729
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ToBoolean.gif
new file mode 100644
index 0000000..8e471a0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ToDouble.gif
new file mode 100644
index 0000000..96aaeb4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ToInt.gif
new file mode 100644
index 0000000..ddf7fec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ToModelElement.gif
new file mode 100644
index 0000000..a571571
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ToMultiplicity.gif
new file mode 100644
index 0000000..1254d2c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ToString.gif
new file mode 100644
index 0000000..d1d7856
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Value.gif
new file mode 100644
index 0000000..a10c850
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_VariableReference.gif
new file mode 100644
index 0000000..a15cacf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_XOr.gif
new file mode 100644
index 0000000..79e1b2d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_source_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..f9b01aa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Aggregate.gif
new file mode 100644
index 0000000..3ffbd19
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_And.gif
new file mode 100644
index 0000000..84f9729
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Constant.gif
new file mode 100644
index 0000000..cdb5a67
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Division.gif
new file mode 100644
index 0000000..ebb7793
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ElementReference.gif
new file mode 100644
index 0000000..9a4c243
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Equals.gif
new file mode 100644
index 0000000..0b5901d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_FullyQualifiedName.gif
new file mode 100644
index 0000000..ddf7fec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_GTPatternCall.gif
new file mode 100644
index 0000000..1254d2c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_GreaterThan.gif
new file mode 100644
index 0000000..ddd2316
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..03d63cb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Inverse.gif
new file mode 100644
index 0000000..42030b5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_LessThan.gif
new file mode 100644
index 0000000..2af4cd3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..7dade8c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Minus.gif
new file mode 100644
index 0000000..a989445
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ModelElementQuery.gif
new file mode 100644
index 0000000..20ca1b8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Multiplicity.gif
new file mode 100644
index 0000000..1cb8c19
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Multiply.gif
new file mode 100644
index 0000000..a989445
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Name.gif
new file mode 100644
index 0000000..29d9678
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..2f7d4aa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Not.gif
new file mode 100644
index 0000000..67f1b2b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_NotEquals.gif
new file mode 100644
index 0000000..67f1b2b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Or.gif
new file mode 100644
index 0000000..33440bf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Plus.gif
new file mode 100644
index 0000000..0c2d652
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Remainder.gif
new file mode 100644
index 0000000..d1d7856
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Source.gif
new file mode 100644
index 0000000..8b0bcba
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Target.gif
new file mode 100644
index 0000000..84f9729
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ToBoolean.gif
new file mode 100644
index 0000000..8e471a0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ToDouble.gif
new file mode 100644
index 0000000..96aaeb4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ToInt.gif
new file mode 100644
index 0000000..ddf7fec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ToModelElement.gif
new file mode 100644
index 0000000..a571571
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ToMultiplicity.gif
new file mode 100644
index 0000000..1254d2c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ToString.gif
new file mode 100644
index 0000000..d1d7856
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Value.gif
new file mode 100644
index 0000000..a10c850
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_VariableReference.gif
new file mode 100644
index 0000000..a15cacf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_XOr.gif
new file mode 100644
index 0000000..79e1b2d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationCreateRule_target_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..78e35c7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Aggregate.gif
new file mode 100644
index 0000000..decea7b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_And.gif
new file mode 100644
index 0000000..d61425d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Constant.gif
new file mode 100644
index 0000000..fa71566
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Division.gif
new file mode 100644
index 0000000..7b18d42
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ElementReference.gif
new file mode 100644
index 0000000..c5f41ea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Equals.gif
new file mode 100644
index 0000000..78cd3d7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_FullyQualifiedName.gif
new file mode 100644
index 0000000..1b453f4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_GTPatternCall.gif
new file mode 100644
index 0000000..dd5419d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_GreaterThan.gif
new file mode 100644
index 0000000..60a3818
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..4d1b6d6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Inverse.gif
new file mode 100644
index 0000000..9ef55d2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_LessThan.gif
new file mode 100644
index 0000000..1370956
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..373052d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Minus.gif
new file mode 100644
index 0000000..9b0e092
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ModelElementQuery.gif
new file mode 100644
index 0000000..3c33fd3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Multiplicity.gif
new file mode 100644
index 0000000..abc4689
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Multiply.gif
new file mode 100644
index 0000000..9b0e092
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Name.gif
new file mode 100644
index 0000000..7aed015
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..cf5dedc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Not.gif
new file mode 100644
index 0000000..65e5a9b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_NotEquals.gif
new file mode 100644
index 0000000..65e5a9b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Or.gif
new file mode 100644
index 0000000..1e7b42f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Plus.gif
new file mode 100644
index 0000000..ee92050
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Remainder.gif
new file mode 100644
index 0000000..a496774
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Source.gif
new file mode 100644
index 0000000..282ee03
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Target.gif
new file mode 100644
index 0000000..d61425d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ToBoolean.gif
new file mode 100644
index 0000000..899f356
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ToDouble.gif
new file mode 100644
index 0000000..8dd74f6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ToInt.gif
new file mode 100644
index 0000000..1b453f4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ToModelElement.gif
new file mode 100644
index 0000000..00edc85
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ToMultiplicity.gif
new file mode 100644
index 0000000..dd5419d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ToString.gif
new file mode 100644
index 0000000..a496774
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Value.gif
new file mode 100644
index 0000000..b1f6c55
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_VariableReference.gif
new file mode 100644
index 0000000..89171a9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_XOr.gif
new file mode 100644
index 0000000..355b140
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_sub_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..78e35c7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Aggregate.gif
new file mode 100644
index 0000000..decea7b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_And.gif
new file mode 100644
index 0000000..d61425d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Constant.gif
new file mode 100644
index 0000000..fa71566
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Division.gif
new file mode 100644
index 0000000..7b18d42
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ElementReference.gif
new file mode 100644
index 0000000..c5f41ea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Equals.gif
new file mode 100644
index 0000000..78cd3d7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_FullyQualifiedName.gif
new file mode 100644
index 0000000..1b453f4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_GTPatternCall.gif
new file mode 100644
index 0000000..dd5419d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_GreaterThan.gif
new file mode 100644
index 0000000..60a3818
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..4d1b6d6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Inverse.gif
new file mode 100644
index 0000000..9ef55d2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_LessThan.gif
new file mode 100644
index 0000000..1370956
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..373052d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Minus.gif
new file mode 100644
index 0000000..9b0e092
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ModelElementQuery.gif
new file mode 100644
index 0000000..3c33fd3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Multiplicity.gif
new file mode 100644
index 0000000..abc4689
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Multiply.gif
new file mode 100644
index 0000000..9b0e092
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Name.gif
new file mode 100644
index 0000000..7aed015
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..cf5dedc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Not.gif
new file mode 100644
index 0000000..65e5a9b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_NotEquals.gif
new file mode 100644
index 0000000..65e5a9b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Or.gif
new file mode 100644
index 0000000..1e7b42f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Plus.gif
new file mode 100644
index 0000000..ee92050
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Remainder.gif
new file mode 100644
index 0000000..a496774
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Source.gif
new file mode 100644
index 0000000..282ee03
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Target.gif
new file mode 100644
index 0000000..d61425d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ToBoolean.gif
new file mode 100644
index 0000000..899f356
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ToDouble.gif
new file mode 100644
index 0000000..8dd74f6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ToInt.gif
new file mode 100644
index 0000000..1b453f4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ToModelElement.gif
new file mode 100644
index 0000000..00edc85
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ToMultiplicity.gif
new file mode 100644
index 0000000..dd5419d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ToString.gif
new file mode 100644
index 0000000..a496774
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Value.gif
new file mode 100644
index 0000000..b1f6c55
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_VariableReference.gif
new file mode 100644
index 0000000..89171a9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_XOr.gif
new file mode 100644
index 0000000..355b140
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipCreateRule_super_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..791d85c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Aggregate.gif
new file mode 100644
index 0000000..cc09082
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_And.gif
new file mode 100644
index 0000000..ffa729c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Constant.gif
new file mode 100644
index 0000000..78b8363
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Division.gif
new file mode 100644
index 0000000..ed0bc9b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ElementReference.gif
new file mode 100644
index 0000000..7ad30d9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Equals.gif
new file mode 100644
index 0000000..b665bc8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_FullyQualifiedName.gif
new file mode 100644
index 0000000..a4f320b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_GTPatternCall.gif
new file mode 100644
index 0000000..74497a7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_GreaterThan.gif
new file mode 100644
index 0000000..fe10b8e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..a9fbc1a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Inverse.gif
new file mode 100644
index 0000000..1376267
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_LessThan.gif
new file mode 100644
index 0000000..6678f80
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..c1f6bdf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Minus.gif
new file mode 100644
index 0000000..0e1822f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ModelElementQuery.gif
new file mode 100644
index 0000000..5a655f5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Multiplicity.gif
new file mode 100644
index 0000000..598c4e6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Multiply.gif
new file mode 100644
index 0000000..0e1822f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Name.gif
new file mode 100644
index 0000000..1c0d080
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..6c914cb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Not.gif
new file mode 100644
index 0000000..9f96e37
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_NotEquals.gif
new file mode 100644
index 0000000..9f96e37
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Or.gif
new file mode 100644
index 0000000..bf79eff
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Plus.gif
new file mode 100644
index 0000000..8c276d9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Remainder.gif
new file mode 100644
index 0000000..16e695e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Source.gif
new file mode 100644
index 0000000..841cd27
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Target.gif
new file mode 100644
index 0000000..ffa729c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ToBoolean.gif
new file mode 100644
index 0000000..0be9b53
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ToDouble.gif
new file mode 100644
index 0000000..16b4d06
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ToInt.gif
new file mode 100644
index 0000000..a4f320b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ToModelElement.gif
new file mode 100644
index 0000000..7959b30
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ToMultiplicity.gif
new file mode 100644
index 0000000..74497a7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ToString.gif
new file mode 100644
index 0000000..16e695e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Value.gif
new file mode 100644
index 0000000..e292d2a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_VariableReference.gif
new file mode 100644
index 0000000..1390ab7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_XOr.gif
new file mode 100644
index 0000000..f9adee7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_sub_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..791d85c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Aggregate.gif
new file mode 100644
index 0000000..cc09082
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_And.gif
new file mode 100644
index 0000000..ffa729c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Constant.gif
new file mode 100644
index 0000000..78b8363
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Division.gif
new file mode 100644
index 0000000..ed0bc9b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ElementReference.gif
new file mode 100644
index 0000000..7ad30d9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Equals.gif
new file mode 100644
index 0000000..b665bc8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_FullyQualifiedName.gif
new file mode 100644
index 0000000..a4f320b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_GTPatternCall.gif
new file mode 100644
index 0000000..74497a7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_GreaterThan.gif
new file mode 100644
index 0000000..fe10b8e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..a9fbc1a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Inverse.gif
new file mode 100644
index 0000000..1376267
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_LessThan.gif
new file mode 100644
index 0000000..6678f80
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..c1f6bdf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Minus.gif
new file mode 100644
index 0000000..0e1822f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ModelElementQuery.gif
new file mode 100644
index 0000000..5a655f5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Multiplicity.gif
new file mode 100644
index 0000000..598c4e6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Multiply.gif
new file mode 100644
index 0000000..0e1822f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Name.gif
new file mode 100644
index 0000000..1c0d080
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..6c914cb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Not.gif
new file mode 100644
index 0000000..9f96e37
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_NotEquals.gif
new file mode 100644
index 0000000..9f96e37
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Or.gif
new file mode 100644
index 0000000..bf79eff
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Plus.gif
new file mode 100644
index 0000000..8c276d9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Remainder.gif
new file mode 100644
index 0000000..16e695e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Source.gif
new file mode 100644
index 0000000..841cd27
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Target.gif
new file mode 100644
index 0000000..ffa729c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ToBoolean.gif
new file mode 100644
index 0000000..0be9b53
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ToDouble.gif
new file mode 100644
index 0000000..16b4d06
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ToInt.gif
new file mode 100644
index 0000000..a4f320b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ToModelElement.gif
new file mode 100644
index 0000000..7959b30
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ToMultiplicity.gif
new file mode 100644
index 0000000..74497a7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ToString.gif
new file mode 100644
index 0000000..16e695e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Value.gif
new file mode 100644
index 0000000..e292d2a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_VariableReference.gif
new file mode 100644
index 0000000..1390ab7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_XOr.gif
new file mode 100644
index 0000000..f9adee7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRelationshipDeleteRule_super_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..738febb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Aggregate.gif
new file mode 100644
index 0000000..7403d39
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_And.gif
new file mode 100644
index 0000000..fe734c7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Constant.gif
new file mode 100644
index 0000000..eab3c35
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Division.gif
new file mode 100644
index 0000000..e22a370
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ElementReference.gif
new file mode 100644
index 0000000..1368d9a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Equals.gif
new file mode 100644
index 0000000..502523b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_FullyQualifiedName.gif
new file mode 100644
index 0000000..e74be58
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_GTPatternCall.gif
new file mode 100644
index 0000000..84c773e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_GreaterThan.gif
new file mode 100644
index 0000000..e3921e9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..e6967b7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Inverse.gif
new file mode 100644
index 0000000..79cec2b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_LessThan.gif
new file mode 100644
index 0000000..5723f6d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..28e491c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Minus.gif
new file mode 100644
index 0000000..ba2882e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ModelElementQuery.gif
new file mode 100644
index 0000000..5f1770b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Multiplicity.gif
new file mode 100644
index 0000000..8dd4d74
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Multiply.gif
new file mode 100644
index 0000000..ba2882e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Name.gif
new file mode 100644
index 0000000..976910a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..c15eee4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Not.gif
new file mode 100644
index 0000000..f768689
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_NotEquals.gif
new file mode 100644
index 0000000..f768689
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Or.gif
new file mode 100644
index 0000000..4e7f8d9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Plus.gif
new file mode 100644
index 0000000..3d86ecd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Remainder.gif
new file mode 100644
index 0000000..6f4d80e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Source.gif
new file mode 100644
index 0000000..b1bf686
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Target.gif
new file mode 100644
index 0000000..fe734c7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ToBoolean.gif
new file mode 100644
index 0000000..2142c4f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ToDouble.gif
new file mode 100644
index 0000000..aac8a7f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ToInt.gif
new file mode 100644
index 0000000..e74be58
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ToModelElement.gif
new file mode 100644
index 0000000..c3d4aed
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ToMultiplicity.gif
new file mode 100644
index 0000000..84c773e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ToString.gif
new file mode 100644
index 0000000..6f4d80e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Value.gif
new file mode 100644
index 0000000..c06fe36
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_VariableReference.gif
new file mode 100644
index 0000000..985d0f6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_XOr.gif
new file mode 100644
index 0000000..7a5b362
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateASMFunction_locations_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateVariable_variable_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateVariable_variable_VariableReference.gif
new file mode 100644
index 0000000..c4063fe
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdateVariable_variable_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..7e55e97
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Aggregate.gif
new file mode 100644
index 0000000..f9c132c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_And.gif
new file mode 100644
index 0000000..dd1ad84
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Constant.gif
new file mode 100644
index 0000000..0e04648
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Division.gif
new file mode 100644
index 0000000..eb4681a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ElementReference.gif
new file mode 100644
index 0000000..4047eaa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Equals.gif
new file mode 100644
index 0000000..eacefe8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_FullyQualifiedName.gif
new file mode 100644
index 0000000..49d5160
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_GTPatternCall.gif
new file mode 100644
index 0000000..46fcd0c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_GreaterThan.gif
new file mode 100644
index 0000000..6083e65
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..adf0a6f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Inverse.gif
new file mode 100644
index 0000000..625be45
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_LessThan.gif
new file mode 100644
index 0000000..7303e2d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..ba97841
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Minus.gif
new file mode 100644
index 0000000..8f1bd13
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ModelElementQuery.gif
new file mode 100644
index 0000000..d59b3c9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Multiplicity.gif
new file mode 100644
index 0000000..5ac844d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Multiply.gif
new file mode 100644
index 0000000..8f1bd13
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Name.gif
new file mode 100644
index 0000000..22168e6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..d9ee5d0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Not.gif
new file mode 100644
index 0000000..e1a974d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_NotEquals.gif
new file mode 100644
index 0000000..e1a974d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Or.gif
new file mode 100644
index 0000000..17408b8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Plus.gif
new file mode 100644
index 0000000..8a81cf6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Remainder.gif
new file mode 100644
index 0000000..31a5cbb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Source.gif
new file mode 100644
index 0000000..c32abef
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Target.gif
new file mode 100644
index 0000000..dd1ad84
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ToBoolean.gif
new file mode 100644
index 0000000..f2cd14d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ToDouble.gif
new file mode 100644
index 0000000..74b2027
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ToInt.gif
new file mode 100644
index 0000000..49d5160
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ToModelElement.gif
new file mode 100644
index 0000000..9b4804d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ToMultiplicity.gif
new file mode 100644
index 0000000..46fcd0c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ToString.gif
new file mode 100644
index 0000000..31a5cbb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Value.gif
new file mode 100644
index 0000000..ff1bc46
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_VariableReference.gif
new file mode 100644
index 0000000..27dc0ef
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_XOr.gif
new file mode 100644
index 0000000..7a3fca1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuleUpdate_value_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_CallRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_CallRule.gif
new file mode 100644
index 0000000..51319fc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_CallRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ChooseRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ChooseRule.gif
new file mode 100644
index 0000000..d677d34
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ChooseRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ConditionalRuleIf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ConditionalRuleIf.gif
new file mode 100644
index 0000000..1e4e4b3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ConditionalRuleIf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ConditionalRuleTry.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ConditionalRuleTry.gif
new file mode 100644
index 0000000..e3e95e6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ConditionalRuleTry.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_CreateInstanceOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_CreateInstanceOf.gif
new file mode 100644
index 0000000..dcfe752
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_CreateInstanceOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_CreateSupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_CreateSupertypeOf.gif
new file mode 100644
index 0000000..1ce135f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_CreateSupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_DeleteInstanceOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_DeleteInstanceOf.gif
new file mode 100644
index 0000000..051fac7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_DeleteInstanceOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_DeleteSupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_DeleteSupertypeOf.gif
new file mode 100644
index 0000000..12ec17b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_DeleteSupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ElementDeleteRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ElementDeleteRule.gif
new file mode 100644
index 0000000..ab255f3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ElementDeleteRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_EntityCreateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_EntityCreateRule.gif
new file mode 100644
index 0000000..f9e5fa8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_EntityCreateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_FailRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_FailRule.gif
new file mode 100644
index 0000000..51319fc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_FailRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ForallRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ForallRule.gif
new file mode 100644
index 0000000..e8bebbf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ForallRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_GTRuleInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_GTRuleInvocation.gif
new file mode 100644
index 0000000..b80902b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_GTRuleInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_IterateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_IterateRule.gif
new file mode 100644
index 0000000..1571ae8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_IterateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_LetRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_LetRule.gif
new file mode 100644
index 0000000..12ec17b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_LetRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_LogRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_LogRule.gif
new file mode 100644
index 0000000..b6a1ace
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_LogRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ModelCopyRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ModelCopyRule.gif
new file mode 100644
index 0000000..064dd75
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ModelCopyRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_MoveRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_MoveRule.gif
new file mode 100644
index 0000000..e3e95e6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_MoveRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ParallelRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ParallelRule.gif
new file mode 100644
index 0000000..51319fc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_ParallelRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_PrintLnRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_PrintLnRule.gif
new file mode 100644
index 0000000..f7e8a7b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_PrintLnRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_PrintRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_PrintRule.gif
new file mode 100644
index 0000000..f7e8a7b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_PrintRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_RandomRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_RandomRule.gif
new file mode 100644
index 0000000..d677d34
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_RandomRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_RelationCreateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_RelationCreateRule.gif
new file mode 100644
index 0000000..a85ee8f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_RelationCreateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_RenameRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_RenameRule.gif
new file mode 100644
index 0000000..86be5ba
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_RenameRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_RuleUpdateASMFunction.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_RuleUpdateASMFunction.gif
new file mode 100644
index 0000000..8128b07
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_RuleUpdateASMFunction.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_RuleUpdateVariable.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_RuleUpdateVariable.gif
new file mode 100644
index 0000000..25e38e9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_RuleUpdateVariable.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SequentialRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SequentialRule.gif
new file mode 100644
index 0000000..f7e8a7b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SequentialRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetAggregationRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetAggregationRule.gif
new file mode 100644
index 0000000..d415ad7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetAggregationRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetAnySourceRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetAnySourceRule.gif
new file mode 100644
index 0000000..01436dd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetAnySourceRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetAnyTargetRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetAnyTargetRule.gif
new file mode 100644
index 0000000..9715040
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetAnyTargetRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetInverseRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetInverseRule.gif
new file mode 100644
index 0000000..381214b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetInverseRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetMultiplicityRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetMultiplicityRule.gif
new file mode 100644
index 0000000..b6a1ace
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetMultiplicityRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetRelationFrom.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetRelationFrom.gif
new file mode 100644
index 0000000..86be5ba
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetRelationFrom.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetRelationTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetRelationTo.gif
new file mode 100644
index 0000000..bf56763
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetRelationTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetValueRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetValueRule.gif
new file mode 100644
index 0000000..d415ad7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SetValueRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SkipRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SkipRule.gif
new file mode 100644
index 0000000..e3e95e6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_SkipRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_WhenRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_WhenRule.gif
new file mode 100644
index 0000000..89d8767
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_body_WhenRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_localVariables_PatternVariable.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_localVariables_PatternVariable.gif
new file mode 100644
index 0000000..f5718d5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_localVariables_PatternVariable.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_localVariables_Variable.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_localVariables_Variable.gif
new file mode 100644
index 0000000..3242175
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_localVariables_Variable.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_symParameters_SymbolicRuleParameter.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_symParameters_SymbolicRuleParameter.gif
new file mode 100644
index 0000000..f7e8a7b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRule_symParameters_SymbolicRuleParameter.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuntimeAnnotation_elements_RuntimeAnnotationElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuntimeAnnotation_elements_RuntimeAnnotationElement.gif
new file mode 100644
index 0000000..f54edc6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateRuntimeAnnotation_elements_RuntimeAnnotationElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..d69b5c7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Aggregate.gif
new file mode 100644
index 0000000..03c1266
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_And.gif
new file mode 100644
index 0000000..67b924c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Constant.gif
new file mode 100644
index 0000000..31cb2e2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Division.gif
new file mode 100644
index 0000000..36bc72b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ElementReference.gif
new file mode 100644
index 0000000..8e2a326
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Equals.gif
new file mode 100644
index 0000000..8f218cb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_FullyQualifiedName.gif
new file mode 100644
index 0000000..f6ec10a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_GTPatternCall.gif
new file mode 100644
index 0000000..67dbac2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_GreaterThan.gif
new file mode 100644
index 0000000..e050920
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..0e886ec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Inverse.gif
new file mode 100644
index 0000000..c825541
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_LessThan.gif
new file mode 100644
index 0000000..ff485d7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..8524da4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Minus.gif
new file mode 100644
index 0000000..1e65bec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ModelElementQuery.gif
new file mode 100644
index 0000000..1b80aea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Multiplicity.gif
new file mode 100644
index 0000000..90c9485
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Multiply.gif
new file mode 100644
index 0000000..1e65bec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Name.gif
new file mode 100644
index 0000000..cc34a0f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..83d72c4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Not.gif
new file mode 100644
index 0000000..436a9c5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_NotEquals.gif
new file mode 100644
index 0000000..436a9c5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Or.gif
new file mode 100644
index 0000000..43d93ae
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Plus.gif
new file mode 100644
index 0000000..b729998
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Remainder.gif
new file mode 100644
index 0000000..62f7a1e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Source.gif
new file mode 100644
index 0000000..e0e45bd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Target.gif
new file mode 100644
index 0000000..67b924c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ToBoolean.gif
new file mode 100644
index 0000000..497cf86
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ToDouble.gif
new file mode 100644
index 0000000..fee466d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ToInt.gif
new file mode 100644
index 0000000..f6ec10a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ToModelElement.gif
new file mode 100644
index 0000000..e8626bf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ToMultiplicity.gif
new file mode 100644
index 0000000..67dbac2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ToString.gif
new file mode 100644
index 0000000..62f7a1e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Value.gif
new file mode 100644
index 0000000..55c6166
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_VariableReference.gif
new file mode 100644
index 0000000..9c6b7fc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_XOr.gif
new file mode 100644
index 0000000..bc2f6d5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_element_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..d69b5c7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Aggregate.gif
new file mode 100644
index 0000000..03c1266
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_And.gif
new file mode 100644
index 0000000..67b924c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Constant.gif
new file mode 100644
index 0000000..31cb2e2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Division.gif
new file mode 100644
index 0000000..36bc72b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ElementReference.gif
new file mode 100644
index 0000000..8e2a326
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Equals.gif
new file mode 100644
index 0000000..8f218cb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_FullyQualifiedName.gif
new file mode 100644
index 0000000..f6ec10a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_GTPatternCall.gif
new file mode 100644
index 0000000..67dbac2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_GreaterThan.gif
new file mode 100644
index 0000000..e050920
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..0e886ec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Inverse.gif
new file mode 100644
index 0000000..c825541
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_LessThan.gif
new file mode 100644
index 0000000..ff485d7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..8524da4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Minus.gif
new file mode 100644
index 0000000..1e65bec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ModelElementQuery.gif
new file mode 100644
index 0000000..1b80aea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Multiplicity.gif
new file mode 100644
index 0000000..90c9485
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Multiply.gif
new file mode 100644
index 0000000..1e65bec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Name.gif
new file mode 100644
index 0000000..cc34a0f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..83d72c4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Not.gif
new file mode 100644
index 0000000..436a9c5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_NotEquals.gif
new file mode 100644
index 0000000..436a9c5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Or.gif
new file mode 100644
index 0000000..43d93ae
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Plus.gif
new file mode 100644
index 0000000..b729998
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Remainder.gif
new file mode 100644
index 0000000..62f7a1e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Source.gif
new file mode 100644
index 0000000..e0e45bd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Target.gif
new file mode 100644
index 0000000..67b924c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ToBoolean.gif
new file mode 100644
index 0000000..497cf86
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ToDouble.gif
new file mode 100644
index 0000000..fee466d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ToInt.gif
new file mode 100644
index 0000000..f6ec10a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ToModelElement.gif
new file mode 100644
index 0000000..e8626bf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ToMultiplicity.gif
new file mode 100644
index 0000000..67dbac2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ToString.gif
new file mode 100644
index 0000000..62f7a1e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Value.gif
new file mode 100644
index 0000000..55c6166
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_VariableReference.gif
new file mode 100644
index 0000000..9c6b7fc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_XOr.gif
new file mode 100644
index 0000000..bc2f6d5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateSetRule_value_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateTransformation_modules_Module.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateTransformation_modules_Module.gif
new file mode 100644
index 0000000..af9f818
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateTransformation_modules_Module.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVPMElement_variableReferences_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVPMElement_variableReferences_VariableReference.gif
new file mode 100644
index 0000000..20b24c9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVPMElement_variableReferences_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ASMFunctionInvocation.gif
new file mode 100644
index 0000000..4d3fded
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Aggregate.gif
new file mode 100644
index 0000000..db9d0e3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_And.gif
new file mode 100644
index 0000000..32ba862
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Constant.gif
new file mode 100644
index 0000000..46ea360
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Division.gif
new file mode 100644
index 0000000..8cda162
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ElementReference.gif
new file mode 100644
index 0000000..2dde1a2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Equals.gif
new file mode 100644
index 0000000..9402ae7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_FullyQualifiedName.gif
new file mode 100644
index 0000000..a9aaa51
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_GTPatternCall.gif
new file mode 100644
index 0000000..b72dc20
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_GreaterThan.gif
new file mode 100644
index 0000000..85812b6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..e7f28e1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Inverse.gif
new file mode 100644
index 0000000..f7e40a3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_LessThan.gif
new file mode 100644
index 0000000..191a36a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_LessThanOrEqualTo.gif
new file mode 100644
index 0000000..eb94bc6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Minus.gif
new file mode 100644
index 0000000..ef031f4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ModelElementQuery.gif
new file mode 100644
index 0000000..78987b0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Multiplicity.gif
new file mode 100644
index 0000000..01fd9b7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Multiply.gif
new file mode 100644
index 0000000..ef031f4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Name.gif
new file mode 100644
index 0000000..ee3c4a9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_NativeFunctionInvocation.gif
new file mode 100644
index 0000000..b77c059
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Not.gif
new file mode 100644
index 0000000..23121e3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_NotEquals.gif
new file mode 100644
index 0000000..23121e3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Or.gif
new file mode 100644
index 0000000..205071f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Plus.gif
new file mode 100644
index 0000000..f5be155
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Remainder.gif
new file mode 100644
index 0000000..3270f4e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Source.gif
new file mode 100644
index 0000000..70f48d3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Target.gif
new file mode 100644
index 0000000..32ba862
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ToBoolean.gif
new file mode 100644
index 0000000..1d24f79
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ToDouble.gif
new file mode 100644
index 0000000..9c4e0af
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ToInt.gif
new file mode 100644
index 0000000..a9aaa51
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ToModelElement.gif
new file mode 100644
index 0000000..0d619ab
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ToMultiplicity.gif
new file mode 100644
index 0000000..b72dc20
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ToString.gif
new file mode 100644
index 0000000..3270f4e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Value.gif
new file mode 100644
index 0000000..70812c3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_VariableReference.gif
new file mode 100644
index 0000000..8b59ba1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_XOr.gif
new file mode 100644
index 0000000..cbeac46
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/ctool16/CreateVariableDefinition_value_XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ASMFunction.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ASMFunction.gif
new file mode 100644
index 0000000..35ef84e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ASMFunction.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ASMFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ASMFunctionInvocation.gif
new file mode 100644
index 0000000..a17dc7d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ASMFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Aggregate.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Aggregate.gif
new file mode 100644
index 0000000..d3dc5a9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Aggregate.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/And.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/And.gif
new file mode 100644
index 0000000..53500da
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/And.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Annotation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Annotation.gif
new file mode 100644
index 0000000..90d10f9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Annotation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/CallRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/CallRule.gif
new file mode 100644
index 0000000..45731fe
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/CallRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ChangeEvent.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ChangeEvent.gif
new file mode 100644
index 0000000..ea58a65
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ChangeEvent.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ChooseRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ChooseRule.gif
new file mode 100644
index 0000000..89ad5da
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ChooseRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ConditionalRuleIf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ConditionalRuleIf.gif
new file mode 100644
index 0000000..e4bc22d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ConditionalRuleIf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ConditionalRuleTry.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ConditionalRuleTry.gif
new file mode 100644
index 0000000..afb82ea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ConditionalRuleTry.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Constant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Constant.gif
new file mode 100644
index 0000000..a26660e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Constant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ContainmentConstraint.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ContainmentConstraint.gif
new file mode 100644
index 0000000..98b351f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ContainmentConstraint.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/CreateInstanceOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/CreateInstanceOf.gif
new file mode 100644
index 0000000..e4b530e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/CreateInstanceOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/CreateSupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/CreateSupertypeOf.gif
new file mode 100644
index 0000000..134551b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/CreateSupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/DeleteInstanceOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/DeleteInstanceOf.gif
new file mode 100644
index 0000000..cb1755a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/DeleteInstanceOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/DeleteSupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/DeleteSupertypeOf.gif
new file mode 100644
index 0000000..7b7c428
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/DeleteSupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Division.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Division.gif
new file mode 100644
index 0000000..33a997a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Division.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ElementDeleteRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ElementDeleteRule.gif
new file mode 100644
index 0000000..2b69256
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ElementDeleteRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ElementReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ElementReference.gif
new file mode 100644
index 0000000..7bac4fd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ElementReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Entity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Entity.gif
new file mode 100644
index 0000000..ef56c14
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Entity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/EntityCreateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/EntityCreateRule.gif
new file mode 100644
index 0000000..a3908bc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/EntityCreateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Equals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Equals.gif
new file mode 100644
index 0000000..9250fec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Equals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/FailRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/FailRule.gif
new file mode 100644
index 0000000..45731fe
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/FailRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ForallRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ForallRule.gif
new file mode 100644
index 0000000..caf2804
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ForallRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/FullyQualifiedName.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/FullyQualifiedName.gif
new file mode 100644
index 0000000..badaab0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/FullyQualifiedName.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GTMatchCounter.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GTMatchCounter.gif
new file mode 100644
index 0000000..5915591
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GTMatchCounter.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GTPattern.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GTPattern.gif
new file mode 100644
index 0000000..9041598
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GTPattern.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GTPatternBody.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GTPatternBody.gif
new file mode 100644
index 0000000..33854e9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GTPatternBody.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GTPatternCall.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GTPatternCall.gif
new file mode 100644
index 0000000..90d10f9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GTPatternCall.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GTRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GTRule.gif
new file mode 100644
index 0000000..d3dc5a9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GTRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GTRuleInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GTRuleInvocation.gif
new file mode 100644
index 0000000..136e3b2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GTRuleInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GreaterThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GreaterThan.gif
new file mode 100644
index 0000000..caf2804
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GreaterThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GreaterThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GreaterThanOrEqualTo.gif
new file mode 100644
index 0000000..8a5c70c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/GreaterThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ImportDeclaration.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ImportDeclaration.gif
new file mode 100644
index 0000000..05dc74a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ImportDeclaration.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/InitialValue.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/InitialValue.gif
new file mode 100644
index 0000000..b1f8afa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/InitialValue.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Inverse.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Inverse.gif
new file mode 100644
index 0000000..e4bc22d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Inverse.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/IterateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/IterateRule.gif
new file mode 100644
index 0000000..c4a8af4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/IterateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/LessThan.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/LessThan.gif
new file mode 100644
index 0000000..05dc74a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/LessThan.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/LessThanOrEqualTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/LessThanOrEqualTo.gif
new file mode 100644
index 0000000..9041598
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/LessThanOrEqualTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/LetRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/LetRule.gif
new file mode 100644
index 0000000..7b7c428
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/LetRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/LogRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/LogRule.gif
new file mode 100644
index 0000000..420eee1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/LogRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Machine.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Machine.gif
new file mode 100644
index 0000000..c4a8af4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Machine.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Minus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Minus.gif
new file mode 100644
index 0000000..30f0c48
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Minus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ModelCopyRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ModelCopyRule.gif
new file mode 100644
index 0000000..b1f8afa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ModelCopyRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ModelElementQuery.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ModelElementQuery.gif
new file mode 100644
index 0000000..c4a8af4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ModelElementQuery.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Module.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Module.gif
new file mode 100644
index 0000000..c414fe9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Module.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/MoveRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/MoveRule.gif
new file mode 100644
index 0000000..afb82ea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/MoveRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Multiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Multiplicity.gif
new file mode 100644
index 0000000..134551b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Multiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Multiply.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Multiply.gif
new file mode 100644
index 0000000..30f0c48
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Multiply.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Name.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Name.gif
new file mode 100644
index 0000000..739ebbf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Name.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/NamespaceDefinition.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/NamespaceDefinition.gif
new file mode 100644
index 0000000..c4fb30e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/NamespaceDefinition.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/NativeFunctionInvocation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/NativeFunctionInvocation.gif
new file mode 100644
index 0000000..1e5345f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/NativeFunctionInvocation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/NonInjectivityConstraint.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/NonInjectivityConstraint.gif
new file mode 100644
index 0000000..4365960
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/NonInjectivityConstraint.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Not.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Not.gif
new file mode 100644
index 0000000..89ad5da
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Not.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/NotEquals.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/NotEquals.gif
new file mode 100644
index 0000000..89ad5da
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/NotEquals.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Or.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Or.gif
new file mode 100644
index 0000000..c673a52
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Or.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ParallelRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ParallelRule.gif
new file mode 100644
index 0000000..45731fe
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ParallelRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/PatternContainer.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/PatternContainer.gif
new file mode 100644
index 0000000..c8d381f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/PatternContainer.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/PatternVariable.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/PatternVariable.gif
new file mode 100644
index 0000000..c3370c7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/PatternVariable.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/PatternVariableAssignment.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/PatternVariableAssignment.gif
new file mode 100644
index 0000000..e4bc22d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/PatternVariableAssignment.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Plus.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Plus.gif
new file mode 100644
index 0000000..cb1755a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Plus.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/PrintLnRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/PrintLnRule.gif
new file mode 100644
index 0000000..338fb8d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/PrintLnRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/PrintRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/PrintRule.gif
new file mode 100644
index 0000000..338fb8d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/PrintRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RandomRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RandomRule.gif
new file mode 100644
index 0000000..89ad5da
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RandomRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Relation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Relation.gif
new file mode 100644
index 0000000..caf2804
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Relation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RelationCreateRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RelationCreateRule.gif
new file mode 100644
index 0000000..a17dc7d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RelationCreateRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Relationship.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Relationship.gif
new file mode 100644
index 0000000..2124f3e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Relationship.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Remainder.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Remainder.gif
new file mode 100644
index 0000000..5915591
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Remainder.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RenameRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RenameRule.gif
new file mode 100644
index 0000000..33854e9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RenameRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Rule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Rule.gif
new file mode 100644
index 0000000..cdd3b76
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Rule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RuleUpdateASMFunction.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RuleUpdateASMFunction.gif
new file mode 100644
index 0000000..c673a52
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RuleUpdateASMFunction.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RuleUpdateVariable.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RuleUpdateVariable.gif
new file mode 100644
index 0000000..badaab0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RuleUpdateVariable.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RuntimeAnnotation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RuntimeAnnotation.gif
new file mode 100644
index 0000000..1e5345f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RuntimeAnnotation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RuntimeAnnotationElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RuntimeAnnotationElement.gif
new file mode 100644
index 0000000..badaab0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/RuntimeAnnotationElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SequentialRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SequentialRule.gif
new file mode 100644
index 0000000..338fb8d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SequentialRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetAggregationRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetAggregationRule.gif
new file mode 100644
index 0000000..35ef84e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetAggregationRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetAnySourceRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetAnySourceRule.gif
new file mode 100644
index 0000000..8a5c70c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetAnySourceRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetAnyTargetRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetAnyTargetRule.gif
new file mode 100644
index 0000000..db7414e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetAnyTargetRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetInverseRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetInverseRule.gif
new file mode 100644
index 0000000..98b351f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetInverseRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetMultiplicityRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetMultiplicityRule.gif
new file mode 100644
index 0000000..420eee1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetMultiplicityRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetRelationFrom.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetRelationFrom.gif
new file mode 100644
index 0000000..33854e9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetRelationFrom.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetRelationTo.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetRelationTo.gif
new file mode 100644
index 0000000..c8d381f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetRelationTo.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetValueRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetValueRule.gif
new file mode 100644
index 0000000..35ef84e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SetValueRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SkipRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SkipRule.gif
new file mode 100644
index 0000000..afb82ea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SkipRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Source.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Source.gif
new file mode 100644
index 0000000..106881e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Source.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SupertypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SupertypeOf.gif
new file mode 100644
index 0000000..739ebbf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SupertypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SymbolicRuleParameter.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SymbolicRuleParameter.gif
new file mode 100644
index 0000000..338fb8d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/SymbolicRuleParameter.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Target.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Target.gif
new file mode 100644
index 0000000..53500da
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Target.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ToBoolean.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ToBoolean.gif
new file mode 100644
index 0000000..83afb9b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ToBoolean.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ToDouble.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ToDouble.gif
new file mode 100644
index 0000000..4365960
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ToDouble.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ToInt.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ToInt.gif
new file mode 100644
index 0000000..badaab0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ToInt.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ToModelElement.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ToModelElement.gif
new file mode 100644
index 0000000..48e3cf2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ToModelElement.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ToMultiplicity.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ToMultiplicity.gif
new file mode 100644
index 0000000..90d10f9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ToMultiplicity.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ToString.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ToString.gif
new file mode 100644
index 0000000..5915591
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/ToString.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Transformation.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Transformation.gif
new file mode 100644
index 0000000..afb82ea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Transformation.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/TypeConstant.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/TypeConstant.gif
new file mode 100644
index 0000000..14af8aa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/TypeConstant.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/TypeOf.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/TypeOf.gif
new file mode 100644
index 0000000..ed87474
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/TypeOf.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Value.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Value.gif
new file mode 100644
index 0000000..45731fe
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Value.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Variable.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Variable.gif
new file mode 100644
index 0000000..83afb9b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/Variable.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/VariableDefinition.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/VariableDefinition.gif
new file mode 100644
index 0000000..48e3cf2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/VariableDefinition.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/VariableReference.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/VariableReference.gif
new file mode 100644
index 0000000..2b69256
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/VariableReference.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/WhenRule.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/WhenRule.gif
new file mode 100644
index 0000000..d3dc5a9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/WhenRule.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/XOr.gif b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/XOr.gif
new file mode 100644
index 0000000..f8041d2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/icons/full/obj16/XOr.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.model.edit/plugin.properties b/org.eclipse.viatra2.gtasm.model.edit/plugin.properties
new file mode 100644
index 0000000..e34f207
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/plugin.properties
@@ -0,0 +1,347 @@
+#  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+#  * All rights reserved. This program and the accompanying materials
+#  * are made available under the terms of the Eclipse Public License v1.0
+#  * which accompanies this distribution, and is available at
+#  * http://www.eclipse.org/legal/epl-v10.html
+#  *
+#  * Contributors:
+#  *    Istvan Rath, Daniel Varro - initial API and implementation
+# 
+
+pluginName = Gtasm Edit Support
+providerName = www.example.org
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_ModelElement_type = Model Element
+_UI_Relationship_type = Relationship
+_UI_Entity_type = Entity
+_UI_Relation_type = Relation
+_UI_TypeOf_type = Type Of
+_UI_SupertypeOf_type = Supertype Of
+_UI_VPMElement_type = VPM Element
+_UI_Aggregate_type = Aggregate
+_UI_Source_type = Source
+_UI_Target_type = Target
+_UI_ElementReference_type = Element Reference
+_UI_FullyQualifiedName_type = Fully Qualified Name
+_UI_Name_type = Name
+_UI_Value_type = Value
+_UI_Inverse_type = Inverse
+_UI_Multiplicity_type = Multiplicity
+_UI_RelationshipDeleteRule_type = Relationship Delete Rule
+_UI_ElementDeleteRule_type = Element Delete Rule
+_UI_DeleteInstanceOf_type = Delete Instance Of
+_UI_DeleteSupertypeOf_type = Delete Supertype Of
+_UI_RelationshipCreateRule_type = Relationship Create Rule
+_UI_RelationCreateRule_type = Relation Create Rule
+_UI_ElementCreateRule_type = Element Create Rule
+_UI_EntityCreateRule_type = Entity Create Rule
+_UI_CreateSupertypeOf_type = Create Supertype Of
+_UI_CreateInstanceOf_type = Create Instance Of
+_UI_MoveRule_type = Move Rule
+_UI_ModelCopyRule_type = Model Copy Rule
+_UI_RenameRule_type = Rename Rule
+_UI_SetRule_type = Set Rule
+_UI_SetValueRule_type = Set Value Rule
+_UI_SetRelationTo_type = Set Relation To
+_UI_SetRelationEndPoint_type = Set Relation End Point
+_UI_SetRelationFrom_type = Set Relation From
+_UI_SetMultiplicityRule_type = Set Multiplicity Rule
+_UI_SetInverseRule_type = Set Inverse Rule
+_UI_SetAnyTargetRule_type = Set Any Target Rule
+_UI_SetAnyEndpointRule_type = Set Any Endpoint Rule
+_UI_SetAnySourceRule_type = Set Any Source Rule
+_UI_SetAggregationRule_type = Set Aggregation Rule
+_UI_Machine_type = Machine
+_UI_Rule_type = Rule
+_UI_Variable_type = Variable
+_UI_VariableDefinition_type = Variable Definition
+_UI_ASMFunction_type = ASM Function
+_UI_FunctionDefinition_type = Function Definition
+_UI_InitialValue_type = Initial Value
+_UI_SymbolicRuleParameter_type = Symbolic Rule Parameter
+_UI_Module_type = Module
+_UI_ImportDeclaration_type = Import Declaration
+_UI_NamespaceDefinition_type = Namespace Definition
+_UI_Transformation_type = Transformation
+_UI_TypeConstant_type = Type Constant
+_UI_ChangeEvent_type = Change Event
+_UI_Annotation_type = Annotation
+_UI_GTASMElement_type = GTASM Element
+_UI_RuntimeAnnotation_type = Runtime Annotation
+_UI_RuntimeAnnotationElement_type = Runtime Annotation Element
+_UI_AnnotatedElement_type = Annotated Element
+_UI_ConditionalRuleTry_type = Conditional Rule Try
+_UI_ConditionalRuleIf_type = Conditional Rule If
+_UI_CallRule_type = Call Rule
+_UI_RuleUpdateVariable_type = Rule Update Variable
+_UI_RuleUpdate_type = Rule Update
+_UI_GTRuleInvocation_type = GT Rule Invocation
+_UI_RuleUpdateASMFunction_type = Rule Update ASM Function
+_UI_FailRule_type = Fail Rule
+_UI_LogRule_type = Log Rule
+_UI_PrintRule_type = Print Rule
+_UI_SkipRule_type = Skip Rule
+_UI_ModelManipulationRule_type = Model Manipulation Rule
+_UI_ASMRuleInvocation_type = ASM Rule Invocation
+_UI_PrintLnRule_type = Print Ln Rule
+_UI_SequentialRule_type = Sequential Rule
+_UI_NestedRule_type = Nested Rule
+_UI_RandomRule_type = Random Rule
+_UI_ParallelRule_type = Parallel Rule
+_UI_ChooseRule_type = Choose Rule
+_UI_CollectionIteratorRule_type = Collection Iterator Rule
+_UI_CompoundRule_type = Compound Rule
+_UI_ForallRule_type = Forall Rule
+_UI_IterateRule_type = Iterate Rule
+_UI_LetRule_type = Let Rule
+_UI_BlockRule_type = Block Rule
+_UI_WhenRule_type = When Rule
+_UI_Term_type = Term
+_UI_VariableReference_type = Variable Reference
+_UI_GTPatternCall_type = GT Pattern Call
+_UI_ASMFunctionInvocation_type = ASM Function Invocation
+_UI_FunctionInvocation_type = Function Invocation
+_UI_Constant_type = Constant
+_UI_NativeFunctionInvocation_type = Native Function Invocation
+_UI_ModelElementQuery_type = Model Element Query
+_UI_ArithmeticOperation_type = Arithmetic Operation
+_UI_Remainder_type = Remainder
+_UI_Multiply_type = Multiply
+_UI_Plus_type = Plus
+_UI_Minus_type = Minus
+_UI_Division_type = Division
+_UI_RelationalOperation_type = Relational Operation
+_UI_And_type = And
+_UI_Equals_type = Equals
+_UI_GreaterThan_type = Greater Than
+_UI_GreaterThanOrEqualTo_type = Greater Than Or Equal To
+_UI_LessThan_type = Less Than
+_UI_LessThanOrEqualTo_type = Less Than Or Equal To
+_UI_Not_type = Not
+_UI_NotEquals_type = Not Equals
+_UI_Or_type = Or
+_UI_XOr_type = XOr
+_UI_ToString_type = To String
+_UI_ToInt_type = To Int
+_UI_ToBoolean_type = To Boolean
+_UI_ToDouble_type = To Double
+_UI_ToModelElement_type = To Model Element
+_UI_ToMultiplicity_type = To Multiplicity
+_UI_ConversionOperation_type = Conversion Operation
+_UI_GTPatternBody_type = GT Pattern Body
+_UI_GTPattern_type = GT Pattern
+_UI_PatternVariable_type = Pattern Variable
+_UI_PatternVariableAssignment_type = Pattern Variable Assignment
+_UI_GTRule_type = GT Rule
+_UI_ContainmentConstraint_type = Containment Constraint
+_UI_GTMatchCounter_type = GT Match Counter
+_UI_NonInjectivityConstraint_type = Non Injectivity Constraint
+_UI_PatternVariableConstraint_type = Pattern Variable Constraint
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_ModelElement_type_feature = Type
+_UI_ModelElement_instance_feature = Instance
+_UI_ModelElement_supertype_feature = Supertype
+_UI_ModelElement_subtype_feature = Subtype
+_UI_ModelElement_relationsTo_feature = Relations To
+_UI_ModelElement_subRelationships_feature = Sub Relationships
+_UI_ModelElement_superRelationships_feature = Super Relationships
+_UI_ModelElement_typeStr_feature = Type Str
+_UI_ModelElement_name_feature = Name
+_UI_ModelElement_namespaceStr_feature = Namespace Str
+_UI_ModelElement_realElement_feature = Real Element
+_UI_ModelElement_relationsFrom_feature = Relations From
+_UI_Relationship_clientStr_feature = Client Str
+_UI_Relationship_supplierStr_feature = Supplier Str
+_UI_Relationship_client_feature = Client
+_UI_Relationship_supplier_feature = Supplier
+_UI_Entity_parent_feature = Parent
+_UI_Entity_components_feature = Components
+_UI_Entity_value_feature = Value
+_UI_Relation_to_feature = To
+_UI_Relation_fromStr_feature = From Str
+_UI_Relation_toStr_feature = To Str
+_UI_Relation_from_feature = From
+_UI_VPMElement_variableReferences_feature = Variable References
+_UI_RelationshipDeleteRule_super_feature = Super
+_UI_RelationshipDeleteRule_sub_feature = Sub
+_UI_ElementDeleteRule_element_feature = Element
+_UI_ElementDeleteRule_semantics_feature = Semantics
+_UI_RelationshipCreateRule_super_feature = Super
+_UI_RelationshipCreateRule_sub_feature = Sub
+_UI_RelationCreateRule_target_feature = Target
+_UI_RelationCreateRule_source_feature = Source
+_UI_ElementCreateRule_type_feature = Type
+_UI_ElementCreateRule_targetVariable_feature = Target Variable
+_UI_EntityCreateRule_parent_feature = Parent
+_UI_MoveRule_trgContainer_feature = Trg Container
+_UI_MoveRule_srcRoot_feature = Src Root
+_UI_ModelCopyRule_targetVariable_feature = Target Variable
+_UI_ModelCopyRule_trgContainer_feature = Trg Container
+_UI_ModelCopyRule_srcRoot_feature = Src Root
+_UI_ModelCopyRule_semantics_feature = Semantics
+_UI_SetRule_element_feature = Element
+_UI_SetRule_value_feature = Value
+_UI_Machine_mainRule_feature = Main Rule
+_UI_Machine_gtRuleDefinitions_feature = Gt Rule Definitions
+_UI_Machine_gtPatternDefinitions_feature = Gt Pattern Definitions
+_UI_Machine_asmFunctionDefinitions_feature = Asm Function Definitions
+_UI_Machine_asmRuleDefinitions_feature = Asm Rule Definitions
+_UI_Machine_module_feature = Module
+_UI_Rule_body_feature = Body
+_UI_Rule_symParameters_feature = Sym Parameters
+_UI_Rule_localVariables_feature = Local Variables
+_UI_Rule_namespace_feature = Namespace
+_UI_Variable_references_feature = References
+_UI_Variable_scope_feature = Scope
+_UI_Variable_variableType_feature = Variable Type
+_UI_VariableDefinition_variable_feature = Variable
+_UI_VariableDefinition_value_feature = Value
+_UI_ASMFunction_initialValues_feature = Initial Values
+_UI_ASMFunction_arity_feature = Arity
+_UI_ASMFunction_namespace_feature = Namespace
+_UI_ASMFunction_returnType_feature = Return Type
+_UI_ASMFunction_argumentTypes_feature = Argument Types
+_UI_InitialValue_locations_feature = Locations
+_UI_InitialValue_value_feature = Value
+_UI_SymbolicRuleParameter_variable_feature = Variable
+_UI_SymbolicRuleParameter_direction_feature = Direction
+_UI_Module_fileName_feature = File Name
+_UI_Module_machine_feature = Machine
+_UI_Module_import_feature = Import
+_UI_Module_namespace_feature = Namespace
+_UI_ImportDeclaration_importValue_feature = Import Value
+_UI_NamespaceDefinition_namespaceValue_feature = Namespace Value
+_UI_Transformation_modules_feature = Modules
+_UI_TypeConstant_kind_feature = Kind
+_UI_ChangeEvent_changeKind_feature = Change Kind
+_UI_ChangeEvent_variableReference_feature = Variable Reference
+_UI_Annotation_value_feature = Value
+_UI_Annotation_key_feature = Key
+_UI_GTASMElement_name_feature = Name
+_UI_GTASMElement_id_feature = Id
+_UI_GTASMElement_fqn_feature = Fqn
+_UI_GTASMElement_runtimeAnnotations_feature = Runtime Annotations
+_UI_RuntimeAnnotation_elements_feature = Elements
+_UI_RuntimeAnnotation_annotationName_feature = Annotation Name
+_UI_RuntimeAnnotationElement_value_feature = Value
+_UI_RuntimeAnnotationElement_key_feature = Key
+_UI_AnnotatedElement_annotations_feature = Annotations
+_UI_ConditionalRuleTry_ruleToTry_feature = Rule To Try
+_UI_ConditionalRuleTry_ruleElse_feature = Rule Else
+_UI_ConditionalRuleIf_expressionToTest_feature = Expression To Test
+_UI_ConditionalRuleIf_ruleTrue_feature = Rule True
+_UI_ConditionalRuleIf_ruleFalse_feature = Rule False
+_UI_CallRule_rule_feature = Rule
+_UI_CallRule_actualParameters_feature = Actual Parameters
+_UI_RuleUpdateVariable_variable_feature = Variable
+_UI_RuleUpdate_value_feature = Value
+_UI_GTRuleInvocation_rule_feature = Rule
+_UI_GTRuleInvocation_invoker_feature = Invoker
+_UI_GTRuleInvocation_actualParameters_feature = Actual Parameters
+_UI_RuleUpdateASMFunction_locations_feature = Locations
+_UI_RuleUpdateASMFunction_function_feature = Function
+_UI_LogRule_out_feature = Out
+_UI_LogRule_level_feature = Level
+_UI_PrintRule_out_feature = Out
+_UI_PrintRule_buffer_feature = Buffer
+_UI_ASMRuleInvocation_caller_feature = Caller
+_UI_ASMRuleInvocation_asmRule_feature = Asm Rule
+_UI_PrintLnRule_out_feature = Out
+_UI_PrintLnRule_buffer_feature = Buffer
+_UI_NestedRule_subrules_feature = Subrules
+_UI_CollectionIteratorRule_containmentConstraints_feature = Containment Constraints
+_UI_CollectionIteratorRule_condition_feature = Condition
+_UI_CollectionIteratorRule_gtrule_feature = Gtrule
+_UI_CompoundRule_body_feature = Body
+_UI_LetRule_definitions_feature = Definitions
+_UI_BlockRule_localVariables_feature = Local Variables
+_UI_WhenRule_conditions_feature = Conditions
+_UI_Term_kind_feature = Kind
+_UI_Term_type_feature = Type
+_UI_VariableReference_variable_feature = Variable
+_UI_GTPatternCall_actualParameters_feature = Actual Parameters
+_UI_GTPatternCall_calledPattern_feature = Called Pattern
+_UI_GTPatternCall_matchCounter_feature = Match Counter
+_UI_ASMFunctionInvocation_calledFunction_feature = Called Function
+_UI_FunctionInvocation_actualParameters_feature = Actual Parameters
+_UI_Constant_value_feature = Value
+_UI_NativeFunctionInvocation_functionName_feature = Function Name
+_UI_ModelElementQuery_argument_feature = Argument
+_UI_GTPatternBody_negativePatterns_feature = Negative Patterns
+_UI_GTPatternBody_localVariables_feature = Local Variables
+_UI_GTPatternBody_calledPatterns_feature = Called Patterns
+_UI_GTPatternBody_checkExpressions_feature = Check Expressions
+_UI_GTPatternBody_patternGraph_feature = Pattern Graph
+_UI_GTPatternBody_containmentConstraints_feature = Containment Constraints
+_UI_GTPatternBody_localPatternDefinition_feature = Local Pattern Definition
+_UI_GTPatternBody_variableAssignments_feature = Variable Assignments
+_UI_GTPatternBody_header_feature = Header
+_UI_GTPatternBody_elementWrappers_feature = Element Wrappers
+_UI_GTPatternBody_danglingRelationships_feature = Dangling Relationships
+_UI_GTPatternBody_danglingRelations_feature = Dangling Relations
+_UI_GTPatternBody_nonInjectivityConstraints_feature = Non Injectivity Constraints
+_UI_GTPattern_symParameters_feature = Sym Parameters
+_UI_GTPattern_patternBodies_feature = Pattern Bodies
+_UI_GTPattern_namespace_feature = Namespace
+_UI_GTPattern_distinctMatching_feature = Distinct Matching
+_UI_PatternVariable_elementInPattern_feature = Element In Pattern
+_UI_GTRule_symParameters_feature = Sym Parameters
+_UI_GTRule_precondition_feature = Precondition
+_UI_GTRule_localVariables_feature = Local Variables
+_UI_GTRule_action_feature = Action
+_UI_GTRule_postcondition_feature = Postcondition
+_UI_GTRule_localPatternDefinition_feature = Local Pattern Definition
+_UI_GTRule_namespace_feature = Namespace
+_UI_ContainmentConstraint_variable_feature = Variable
+_UI_ContainmentConstraint_mode_feature = Mode
+_UI_ContainmentConstraint_parent_feature = Parent
+_UI_GTMatchCounter_patternCall_feature = Pattern Call
+_UI_GTMatchCounter_variableReference_feature = Variable Reference
+_UI_PatternVariableConstraint_leftValue_feature = Left Value
+_UI_PatternVariableConstraint_rightValue_feature = Right Value
+_UI_Unknown_feature = Unspecified
+
+_UI_CopySemantics_dropOuterEdges_literal = dropOuterEdges
+_UI_CopySemantics_copyOuterEdges_literal = copyOuterEdges
+_UI_DeleteSemantics_dropContent_literal = dropContent
+_UI_DeleteSemantics_moveContent_literal = moveContent
+_UI_LogLevel_debug_literal = debug
+_UI_LogLevel_warning_literal = warning
+_UI_LogLevel_error_literal = error
+_UI_LogLevel_fatal_literal = fatal
+_UI_LogLevel_info_literal = info
+_UI_ContainmentMode_in_literal = in
+_UI_ContainmentMode_below_literal = below
+_UI_ValueKind_undef_literal = undef
+_UI_ValueKind_boolean_literal = boolean
+_UI_ValueKind_string_literal = string
+_UI_ValueKind_integer_literal = integer
+_UI_ValueKind_double_literal = double
+_UI_ValueKind_modelelement_literal = modelelement
+_UI_ValueKind_multiplicity_literal = multiplicity
+_UI_ValueKind_error_literal = error
+_UI_DirectionKind_in_literal = in
+_UI_DirectionKind_inout_literal = inout
+_UI_DirectionKind_out_literal = out
+_UI_MultiplicityKind_one_to_one_literal = one_to_one
+_UI_MultiplicityKind_one_to_many_literal = one_to_many
+_UI_MultiplicityKind_many_to_one_literal = many_to_one
+_UI_MultiplicityKind_many_to_many_literal = many_to_many
+_UI_ChangeKind_new_literal = new
+_UI_ChangeKind_delete_literal = delete
+_UI_ChangeKind_changed_literal = changed
+_UI_PatternContainer_type = Pattern Container
+_UI_GTPattern_container_feature = Container
+_UI_PatternContainer_gtPatternDefinitions_feature = Gt Pattern Definitions
diff --git a/org.eclipse.viatra2.gtasm.model.edit/plugin.xml b/org.eclipse.viatra2.gtasm.model.edit/plugin.xml
new file mode 100644
index 0000000..5dea664
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/plugin.xml
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+  * All rights reserved. This program and the accompanying materials
+  * are made available under the terms of the Eclipse Public License v1.0
+  * which accompanies this distribution, and is available at
+  * http://www.eclipse.org/legal/epl-v10.html
+  *
+  * Contributors:
+  *    Istvan Rath, Daniel Varro - initial API and implementation
+ 
+-->
+
+<plugin>
+
+   <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+      <factory
+            uri="http:///viatragtasmmodel/vpm/editmodel.ecore"
+            class="org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.EditmodelItemProviderAdapterFactory"
+            supportedTypes=
+              "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+               org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+               org.eclipse.emf.edit.provider.ITreeItemContentProvider
+               org.eclipse.emf.edit.provider.IItemLabelProvider
+               org.eclipse.emf.edit.provider.IItemPropertySource"/>
+   </extension>
+
+   <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+      <factory
+            uri="http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions.ecore"
+            class="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.provider.QueryFunctionsItemProviderAdapterFactory"
+            supportedTypes=
+              "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+               org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+               org.eclipse.emf.edit.provider.ITreeItemContentProvider
+               org.eclipse.emf.edit.provider.IItemLabelProvider
+               org.eclipse.emf.edit.provider.IItemPropertySource"/>
+   </extension>
+
+   <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+      <factory
+            uri="http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion.ecore"
+            class="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.provider.DeletionItemProviderAdapterFactory"
+            supportedTypes=
+              "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+               org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+               org.eclipse.emf.edit.provider.ITreeItemContentProvider
+               org.eclipse.emf.edit.provider.IItemLabelProvider
+               org.eclipse.emf.edit.provider.IItemPropertySource"/>
+   </extension>
+
+   <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+      <factory
+            uri="http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation.ecore"
+            class="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.provider.CreationItemProviderAdapterFactory"
+            supportedTypes=
+              "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+               org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+               org.eclipse.emf.edit.provider.ITreeItemContentProvider
+               org.eclipse.emf.edit.provider.IItemLabelProvider
+               org.eclipse.emf.edit.provider.IItemPropertySource"/>
+   </extension>
+
+   <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+      <factory
+            uri="http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove.ecore"
+            class="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.provider.CopymoveItemProviderAdapterFactory"
+            supportedTypes=
+              "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+               org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+               org.eclipse.emf.edit.provider.ITreeItemContentProvider
+               org.eclipse.emf.edit.provider.IItemLabelProvider
+               org.eclipse.emf.edit.provider.IItemPropertySource"/>
+   </extension>
+
+   <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+      <factory
+            uri="http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update.ecore"
+            class="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.provider.UpdateItemProviderAdapterFactory"
+            supportedTypes=
+              "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+               org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+               org.eclipse.emf.edit.provider.ITreeItemContentProvider
+               org.eclipse.emf.edit.provider.IItemLabelProvider
+               org.eclipse.emf.edit.provider.IItemPropertySource"/>
+   </extension>
+
+   <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+      <factory
+            uri="http:///viatragtasmmodel/gtasm/metamodel/asm/definitions.ecore"
+            class="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.provider.DefinitionsItemProviderAdapterFactory"
+            supportedTypes=
+              "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+               org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+               org.eclipse.emf.edit.provider.ITreeItemContentProvider
+               org.eclipse.emf.edit.provider.IItemLabelProvider
+               org.eclipse.emf.edit.provider.IItemPropertySource"/>
+   </extension>
+
+   <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+      <factory
+            uri="http:///viatragtasmmodel/gtasm/metamodel/asm/core.ecore"
+            class="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.CoreItemProviderAdapterFactory"
+            supportedTypes=
+              "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+               org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+               org.eclipse.emf.edit.provider.ITreeItemContentProvider
+               org.eclipse.emf.edit.provider.IItemLabelProvider
+               org.eclipse.emf.edit.provider.IItemPropertySource"/>
+   </extension>
+
+   <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+      <factory
+            uri="http:///viatragtasmmodel/gtasm/metamodel/asm/simpleRules.ecore"
+            class="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider.SimpleRulesItemProviderAdapterFactory"
+            supportedTypes=
+              "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+               org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+               org.eclipse.emf.edit.provider.ITreeItemContentProvider
+               org.eclipse.emf.edit.provider.IItemLabelProvider
+               org.eclipse.emf.edit.provider.IItemPropertySource"/>
+   </extension>
+
+   <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+      <factory
+            uri="http:///viatragtasmmodel/gtasm/metamodel/asm/compoundRules.ecore"
+            class="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.provider.CompoundRulesItemProviderAdapterFactory"
+            supportedTypes=
+              "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+               org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+               org.eclipse.emf.edit.provider.ITreeItemContentProvider
+               org.eclipse.emf.edit.provider.IItemLabelProvider
+               org.eclipse.emf.edit.provider.IItemPropertySource"/>
+   </extension>
+
+   <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+      <factory
+            uri="http:///viatragtasmmodel/gtasm/metamodel/asm/terms.ecore"
+            class="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider.TermsItemProviderAdapterFactory"
+            supportedTypes=
+              "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+               org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+               org.eclipse.emf.edit.provider.ITreeItemContentProvider
+               org.eclipse.emf.edit.provider.IItemLabelProvider
+               org.eclipse.emf.edit.provider.IItemPropertySource"/>
+   </extension>
+
+   <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+      <factory
+            uri="http:///viatragtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions.ecore"
+            class="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider.BuiltInFunctionsItemProviderAdapterFactory"
+            supportedTypes=
+              "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+               org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+               org.eclipse.emf.edit.provider.ITreeItemContentProvider
+               org.eclipse.emf.edit.provider.IItemLabelProvider
+               org.eclipse.emf.edit.provider.IItemPropertySource"/>
+   </extension>
+
+   <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+      <factory
+            uri="http:///viatragtasmmodel/gtasm/metamodel/gt.ecore"
+            class="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.provider.GtItemProviderAdapterFactory"
+            supportedTypes=
+              "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+               org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+               org.eclipse.emf.edit.provider.ITreeItemContentProvider
+               org.eclipse.emf.edit.provider.IItemLabelProvider
+               org.eclipse.emf.edit.provider.IItemPropertySource"/>
+   </extension>
+
+</plugin>
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/BlockRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/BlockRuleItemProvider.java
new file mode 100644
index 0000000..4b494b7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/BlockRuleItemProvider.java
@@ -0,0 +1,180 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.BlockRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.BlockRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class BlockRuleItemProvider
+  extends CompoundRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public BlockRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(CompoundRulesPackage.Literals.BLOCK_RULE__LOCAL_VARIABLES);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((BlockRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_BlockRule_type") :
+      getString("_UI_BlockRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(BlockRule.class))
+    {
+      case CompoundRulesPackage.BLOCK_RULE__LOCAL_VARIABLES:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.BLOCK_RULE__LOCAL_VARIABLES,
+         DefinitionsFactory.eINSTANCE.createVariable()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.BLOCK_RULE__LOCAL_VARIABLES,
+         GtFactory.eINSTANCE.createPatternVariable()));
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/ChooseRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/ChooseRuleItemProvider.java
new file mode 100644
index 0000000..bec4a05
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/ChooseRuleItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ChooseRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ChooseRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ChooseRuleItemProvider
+  extends CollectionIteratorRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ChooseRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns ChooseRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ChooseRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ChooseRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ChooseRule_type") :
+      getString("_UI_ChooseRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == CompoundRulesPackage.Literals.COMPOUND_RULE__BODY ||
+      childFeature == CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__GTRULE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/CollectionIteratorRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/CollectionIteratorRuleItemProvider.java
new file mode 100644
index 0000000..3979889
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/CollectionIteratorRuleItemProvider.java
@@ -0,0 +1,395 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CollectionIteratorRuleItemProvider
+  extends BlockRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CollectionIteratorRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONTAINMENT_CONSTRAINTS);
+      childrenFeatures.add(CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION);
+      childrenFeatures.add(CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__GTRULE);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((CollectionIteratorRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_CollectionIteratorRule_type") :
+      getString("_UI_CollectionIteratorRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(CollectionIteratorRule.class))
+    {
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE__CONTAINMENT_CONSTRAINTS:
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE__CONDITION:
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE__GTRULE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONTAINMENT_CONSTRAINTS,
+         GtFactory.eINSTANCE.createContainmentConstraint()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__CONDITION,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__GTRULE,
+         SimpleRulesFactory.eINSTANCE.createGTRuleInvocation()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == CompoundRulesPackage.Literals.COMPOUND_RULE__BODY ||
+      childFeature == CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__GTRULE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/CompoundRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/CompoundRuleItemProvider.java
new file mode 100644
index 0000000..998ea9f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/CompoundRuleItemProvider.java
@@ -0,0 +1,380 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider.ASMRuleInvocationItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymoveFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdateFactory;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CompoundRuleItemProvider
+  extends ASMRuleInvocationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CompoundRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(CompoundRulesPackage.Literals.COMPOUND_RULE__BODY);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((CompoundRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_CompoundRule_type") :
+      getString("_UI_CompoundRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(CompoundRule.class))
+    {
+      case CompoundRulesPackage.COMPOUND_RULE__BODY:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         CompoundRulesFactory.eINSTANCE.createSequentialRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         CompoundRulesFactory.eINSTANCE.createRandomRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         CompoundRulesFactory.eINSTANCE.createParallelRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         CompoundRulesFactory.eINSTANCE.createChooseRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         CompoundRulesFactory.eINSTANCE.createForallRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         CompoundRulesFactory.eINSTANCE.createIterateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         CompoundRulesFactory.eINSTANCE.createLetRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         CompoundRulesFactory.eINSTANCE.createWhenRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         DeletionFactory.eINSTANCE.createElementDeleteRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         DeletionFactory.eINSTANCE.createDeleteInstanceOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         DeletionFactory.eINSTANCE.createDeleteSupertypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         CreationFactory.eINSTANCE.createRelationCreateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         CreationFactory.eINSTANCE.createEntityCreateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         CreationFactory.eINSTANCE.createCreateSupertypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         CreationFactory.eINSTANCE.createCreateInstanceOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         CopymoveFactory.eINSTANCE.createMoveRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         CopymoveFactory.eINSTANCE.createModelCopyRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         UpdateFactory.eINSTANCE.createRenameRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         UpdateFactory.eINSTANCE.createSetValueRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         UpdateFactory.eINSTANCE.createSetRelationTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         UpdateFactory.eINSTANCE.createSetRelationFrom()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         UpdateFactory.eINSTANCE.createSetMultiplicityRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         UpdateFactory.eINSTANCE.createSetInverseRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         UpdateFactory.eINSTANCE.createSetAnyTargetRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         UpdateFactory.eINSTANCE.createSetAnySourceRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         UpdateFactory.eINSTANCE.createSetAggregationRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createConditionalRuleTry()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createConditionalRuleIf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createCallRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createRuleUpdateVariable()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createGTRuleInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createRuleUpdateASMFunction()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createFailRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createLogRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createPrintRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createSkipRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.COMPOUND_RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createPrintLnRule()));
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/CompoundRulesItemProviderAdapterFactory.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/CompoundRulesItemProviderAdapterFactory.java
new file mode 100644
index 0000000..1f768f5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/CompoundRulesItemProviderAdapterFactory.java
@@ -0,0 +1,413 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.util.CompoundRulesAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CompoundRulesItemProviderAdapterFactory extends CompoundRulesAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This keeps track of the root adapter factory that delegates to this adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ComposedAdapterFactory parentAdapterFactory;
+
+  /**
+   * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+  /**
+   * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+  /**
+   * This constructs an instance.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CompoundRulesItemProviderAdapterFactory()
+  {
+    supportedTypes.add(IEditingDomainItemProvider.class);
+    supportedTypes.add(IStructuredItemContentProvider.class);
+    supportedTypes.add(ITreeItemContentProvider.class);
+    supportedTypes.add(IItemLabelProvider.class);
+    supportedTypes.add(IItemPropertySource.class);
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.SequentialRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SequentialRuleItemProvider sequentialRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.SequentialRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createSequentialRuleAdapter()
+  {
+    if (sequentialRuleItemProvider == null)
+    {
+      sequentialRuleItemProvider = new SequentialRuleItemProvider(this);
+    }
+
+    return sequentialRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.RandomRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RandomRuleItemProvider randomRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.RandomRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createRandomRuleAdapter()
+  {
+    if (randomRuleItemProvider == null)
+    {
+      randomRuleItemProvider = new RandomRuleItemProvider(this);
+    }
+
+    return randomRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ParallelRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ParallelRuleItemProvider parallelRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ParallelRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createParallelRuleAdapter()
+  {
+    if (parallelRuleItemProvider == null)
+    {
+      parallelRuleItemProvider = new ParallelRuleItemProvider(this);
+    }
+
+    return parallelRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ChooseRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ChooseRuleItemProvider chooseRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ChooseRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createChooseRuleAdapter()
+  {
+    if (chooseRuleItemProvider == null)
+    {
+      chooseRuleItemProvider = new ChooseRuleItemProvider(this);
+    }
+
+    return chooseRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ForallRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ForallRuleItemProvider forallRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ForallRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createForallRuleAdapter()
+  {
+    if (forallRuleItemProvider == null)
+    {
+      forallRuleItemProvider = new ForallRuleItemProvider(this);
+    }
+
+    return forallRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.IterateRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected IterateRuleItemProvider iterateRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.IterateRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createIterateRuleAdapter()
+  {
+    if (iterateRuleItemProvider == null)
+    {
+      iterateRuleItemProvider = new IterateRuleItemProvider(this);
+    }
+
+    return iterateRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.LetRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected LetRuleItemProvider letRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.LetRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createLetRuleAdapter()
+  {
+    if (letRuleItemProvider == null)
+    {
+      letRuleItemProvider = new LetRuleItemProvider(this);
+    }
+
+    return letRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.WhenRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected WhenRuleItemProvider whenRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.WhenRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createWhenRuleAdapter()
+  {
+    if (whenRuleItemProvider == null)
+    {
+      whenRuleItemProvider = new WhenRuleItemProvider(this);
+    }
+
+    return whenRuleItemProvider;
+  }
+
+  /**
+   * This returns the root adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ComposeableAdapterFactory getRootAdapterFactory()
+  {
+    return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+  }
+
+  /**
+   * This sets the composed adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
+  {
+    this.parentAdapterFactory = parentAdapterFactory;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object type)
+  {
+    return supportedTypes.contains(type) || super.isFactoryForType(type);
+  }
+
+  /**
+   * This implementation substitutes the factory itself as the key for the adapter.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter adapt(Notifier notifier, Object type)
+  {
+    return super.adapt(notifier, this);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object adapt(Object object, Object type)
+  {
+    if (isFactoryForType(type))
+    {
+      Object adapter = super.adapt(object, type);
+      if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter)))
+      {
+        return adapter;
+      }
+    }
+
+    return null;
+  }
+
+  /**
+   * This adds a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void addListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.addListener(notifyChangedListener);
+  }
+
+  /**
+   * This removes a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void removeListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.removeListener(notifyChangedListener);
+  }
+
+  /**
+   * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void fireNotifyChanged(Notification notification)
+  {
+    changeNotifier.fireNotifyChanged(notification);
+
+    if (parentAdapterFactory != null)
+    {
+      parentAdapterFactory.fireNotifyChanged(notification);
+    }
+  }
+
+  /**
+   * This disposes all of the item providers created by this factory. 
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void dispose()
+  {
+    if (sequentialRuleItemProvider != null) sequentialRuleItemProvider.dispose();
+    if (randomRuleItemProvider != null) randomRuleItemProvider.dispose();
+    if (parallelRuleItemProvider != null) parallelRuleItemProvider.dispose();
+    if (chooseRuleItemProvider != null) chooseRuleItemProvider.dispose();
+    if (forallRuleItemProvider != null) forallRuleItemProvider.dispose();
+    if (iterateRuleItemProvider != null) iterateRuleItemProvider.dispose();
+    if (letRuleItemProvider != null) letRuleItemProvider.dispose();
+    if (whenRuleItemProvider != null) whenRuleItemProvider.dispose();
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/ForallRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/ForallRuleItemProvider.java
new file mode 100644
index 0000000..0e701ba
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/ForallRuleItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ForallRule;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ForallRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ForallRuleItemProvider
+  extends CollectionIteratorRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ForallRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns ForallRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ForallRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ForallRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ForallRule_type") :
+      getString("_UI_ForallRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == CompoundRulesPackage.Literals.COMPOUND_RULE__BODY ||
+      childFeature == CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE__GTRULE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/IterateRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/IterateRuleItemProvider.java
new file mode 100644
index 0000000..d7b18d8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/IterateRuleItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.IterateRule;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.IterateRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class IterateRuleItemProvider
+  extends CompoundRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public IterateRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns IterateRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/IterateRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((IterateRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_IterateRule_type") :
+      getString("_UI_IterateRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/LetRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/LetRuleItemProvider.java
new file mode 100644
index 0000000..56d0481
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/LetRuleItemProvider.java
@@ -0,0 +1,185 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.LetRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.LetRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class LetRuleItemProvider
+  extends BlockRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public LetRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(CompoundRulesPackage.Literals.LET_RULE__DEFINITIONS);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns LetRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/LetRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((LetRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_LetRule_type") :
+      getString("_UI_LetRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(LetRule.class))
+    {
+      case CompoundRulesPackage.LET_RULE__DEFINITIONS:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.LET_RULE__DEFINITIONS,
+         DefinitionsFactory.eINSTANCE.createVariableDefinition()));
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/NestedRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/NestedRuleItemProvider.java
new file mode 100644
index 0000000..048949d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/NestedRuleItemProvider.java
@@ -0,0 +1,380 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.NestedRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider.ASMRuleInvocationItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymoveFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdateFactory;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.NestedRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NestedRuleItemProvider
+  extends ASMRuleInvocationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NestedRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((NestedRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_NestedRule_type") :
+      getString("_UI_NestedRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(NestedRule.class))
+    {
+      case CompoundRulesPackage.NESTED_RULE__SUBRULES:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         CompoundRulesFactory.eINSTANCE.createSequentialRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         CompoundRulesFactory.eINSTANCE.createRandomRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         CompoundRulesFactory.eINSTANCE.createParallelRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         CompoundRulesFactory.eINSTANCE.createChooseRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         CompoundRulesFactory.eINSTANCE.createForallRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         CompoundRulesFactory.eINSTANCE.createIterateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         CompoundRulesFactory.eINSTANCE.createLetRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         CompoundRulesFactory.eINSTANCE.createWhenRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         DeletionFactory.eINSTANCE.createElementDeleteRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         DeletionFactory.eINSTANCE.createDeleteInstanceOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         DeletionFactory.eINSTANCE.createDeleteSupertypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         CreationFactory.eINSTANCE.createRelationCreateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         CreationFactory.eINSTANCE.createEntityCreateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         CreationFactory.eINSTANCE.createCreateSupertypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         CreationFactory.eINSTANCE.createCreateInstanceOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         CopymoveFactory.eINSTANCE.createMoveRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         CopymoveFactory.eINSTANCE.createModelCopyRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         UpdateFactory.eINSTANCE.createRenameRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         UpdateFactory.eINSTANCE.createSetValueRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         UpdateFactory.eINSTANCE.createSetRelationTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         UpdateFactory.eINSTANCE.createSetRelationFrom()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         UpdateFactory.eINSTANCE.createSetMultiplicityRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         UpdateFactory.eINSTANCE.createSetInverseRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         UpdateFactory.eINSTANCE.createSetAnyTargetRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         UpdateFactory.eINSTANCE.createSetAnySourceRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         UpdateFactory.eINSTANCE.createSetAggregationRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         SimpleRulesFactory.eINSTANCE.createConditionalRuleTry()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         SimpleRulesFactory.eINSTANCE.createConditionalRuleIf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         SimpleRulesFactory.eINSTANCE.createCallRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         SimpleRulesFactory.eINSTANCE.createRuleUpdateVariable()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         SimpleRulesFactory.eINSTANCE.createGTRuleInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         SimpleRulesFactory.eINSTANCE.createRuleUpdateASMFunction()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         SimpleRulesFactory.eINSTANCE.createFailRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         SimpleRulesFactory.eINSTANCE.createLogRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         SimpleRulesFactory.eINSTANCE.createPrintRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         SimpleRulesFactory.eINSTANCE.createSkipRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CompoundRulesPackage.Literals.NESTED_RULE__SUBRULES,
+         SimpleRulesFactory.eINSTANCE.createPrintLnRule()));
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/ParallelRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/ParallelRuleItemProvider.java
new file mode 100644
index 0000000..7f524dd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/ParallelRuleItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ParallelRule;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ParallelRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ParallelRuleItemProvider
+  extends NestedRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ParallelRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns ParallelRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ParallelRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ParallelRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ParallelRule_type") :
+      getString("_UI_ParallelRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/RandomRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/RandomRuleItemProvider.java
new file mode 100644
index 0000000..cb7f403
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/RandomRuleItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.RandomRule;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.RandomRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RandomRuleItemProvider
+  extends NestedRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RandomRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns RandomRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/RandomRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((RandomRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_RandomRule_type") :
+      getString("_UI_RandomRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/SequentialRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/SequentialRuleItemProvider.java
new file mode 100644
index 0000000..9be46e5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/SequentialRuleItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.SequentialRule;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.SequentialRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SequentialRuleItemProvider
+  extends NestedRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SequentialRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns SequentialRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/SequentialRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((SequentialRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_SequentialRule_type") :
+      getString("_UI_SequentialRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/WhenRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/WhenRuleItemProvider.java
new file mode 100644
index 0000000..d5b2606
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/provider/WhenRuleItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.WhenRule;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.WhenRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class WhenRuleItemProvider
+  extends CompoundRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public WhenRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addConditionsPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Conditions feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addConditionsPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_WhenRule_conditions_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_WhenRule_conditions_feature", "_UI_WhenRule_type"),
+         CompoundRulesPackage.Literals.WHEN_RULE__CONDITIONS,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This returns WhenRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/WhenRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((WhenRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_WhenRule_type") :
+      getString("_UI_WhenRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/provider/AnnotatedElementItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/provider/AnnotatedElementItemProvider.java
new file mode 100644
index 0000000..3b658cf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/provider/AnnotatedElementItemProvider.java
@@ -0,0 +1,186 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CoreFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AnnotatedElementItemProvider
+  extends ItemProviderAdapter
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public AnnotatedElementItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(CorePackage.Literals.ANNOTATED_ELEMENT__ANNOTATIONS);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    return getString("_UI_AnnotatedElement_type");
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(AnnotatedElement.class))
+    {
+      case CorePackage.ANNOTATED_ELEMENT__ANNOTATIONS:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CorePackage.Literals.ANNOTATED_ELEMENT__ANNOTATIONS,
+         CoreFactory.eINSTANCE.createAnnotation()));
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/provider/AnnotationItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/provider/AnnotationItemProvider.java
new file mode 100644
index 0000000..90c4795
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/provider/AnnotationItemProvider.java
@@ -0,0 +1,211 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AnnotationItemProvider
+  extends ItemProviderAdapter
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public AnnotationItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addValuePropertyDescriptor(object);
+      addKeyPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Value feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addValuePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_Annotation_value_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_Annotation_value_feature", "_UI_Annotation_type"),
+         CorePackage.Literals.ANNOTATION__VALUE,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the Key feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addKeyPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_Annotation_key_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_Annotation_key_feature", "_UI_Annotation_type"),
+         CorePackage.Literals.ANNOTATION__KEY,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This returns Annotation.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Annotation"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Annotation)object).getValue();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Annotation_type") :
+      getString("_UI_Annotation_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(Annotation.class))
+    {
+      case CorePackage.ANNOTATION__VALUE:
+      case CorePackage.ANNOTATION__KEY:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/provider/CoreItemProviderAdapterFactory.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/provider/CoreItemProviderAdapterFactory.java
new file mode 100644
index 0000000..330cf8c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/provider/CoreItemProviderAdapterFactory.java
@@ -0,0 +1,283 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.util.CoreAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CoreItemProviderAdapterFactory extends CoreAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This keeps track of the root adapter factory that delegates to this adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ComposedAdapterFactory parentAdapterFactory;
+
+  /**
+   * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+  /**
+   * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+  /**
+   * This constructs an instance.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CoreItemProviderAdapterFactory()
+  {
+    supportedTypes.add(IEditingDomainItemProvider.class);
+    supportedTypes.add(IStructuredItemContentProvider.class);
+    supportedTypes.add(ITreeItemContentProvider.class);
+    supportedTypes.add(IItemLabelProvider.class);
+    supportedTypes.add(IItemPropertySource.class);
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected AnnotationItemProvider annotationItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createAnnotationAdapter()
+  {
+    if (annotationItemProvider == null)
+    {
+      annotationItemProvider = new AnnotationItemProvider(this);
+    }
+
+    return annotationItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RuntimeAnnotationItemProvider runtimeAnnotationItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createRuntimeAnnotationAdapter()
+  {
+    if (runtimeAnnotationItemProvider == null)
+    {
+      runtimeAnnotationItemProvider = new RuntimeAnnotationItemProvider(this);
+    }
+
+    return runtimeAnnotationItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RuntimeAnnotationElementItemProvider runtimeAnnotationElementItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createRuntimeAnnotationElementAdapter()
+  {
+    if (runtimeAnnotationElementItemProvider == null)
+    {
+      runtimeAnnotationElementItemProvider = new RuntimeAnnotationElementItemProvider(this);
+    }
+
+    return runtimeAnnotationElementItemProvider;
+  }
+
+  /**
+   * This returns the root adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ComposeableAdapterFactory getRootAdapterFactory()
+  {
+    return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+  }
+
+  /**
+   * This sets the composed adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
+  {
+    this.parentAdapterFactory = parentAdapterFactory;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object type)
+  {
+    return supportedTypes.contains(type) || super.isFactoryForType(type);
+  }
+
+  /**
+   * This implementation substitutes the factory itself as the key for the adapter.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter adapt(Notifier notifier, Object type)
+  {
+    return super.adapt(notifier, this);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object adapt(Object object, Object type)
+  {
+    if (isFactoryForType(type))
+    {
+      Object adapter = super.adapt(object, type);
+      if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter)))
+      {
+        return adapter;
+      }
+    }
+
+    return null;
+  }
+
+  /**
+   * This adds a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void addListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.addListener(notifyChangedListener);
+  }
+
+  /**
+   * This removes a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void removeListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.removeListener(notifyChangedListener);
+  }
+
+  /**
+   * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void fireNotifyChanged(Notification notification)
+  {
+    changeNotifier.fireNotifyChanged(notification);
+
+    if (parentAdapterFactory != null)
+    {
+      parentAdapterFactory.fireNotifyChanged(notification);
+    }
+  }
+
+  /**
+   * This disposes all of the item providers created by this factory. 
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void dispose()
+  {
+    if (annotationItemProvider != null) annotationItemProvider.dispose();
+    if (runtimeAnnotationItemProvider != null) runtimeAnnotationItemProvider.dispose();
+    if (runtimeAnnotationElementItemProvider != null) runtimeAnnotationElementItemProvider.dispose();
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/provider/GTASMElementItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/provider/GTASMElementItemProvider.java
new file mode 100644
index 0000000..9781fa7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/provider/GTASMElementItemProvider.java
@@ -0,0 +1,251 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CoreFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GTASMElementItemProvider
+  extends AnnotatedElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTASMElementItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addNamePropertyDescriptor(object);
+      addIdPropertyDescriptor(object);
+      addFqnPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Name feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addNamePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_GTASMElement_name_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_GTASMElement_name_feature", "_UI_GTASMElement_type"),
+         CorePackage.Literals.GTASM_ELEMENT__NAME,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the Id feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addIdPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_GTASMElement_id_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_GTASMElement_id_feature", "_UI_GTASMElement_type"),
+         CorePackage.Literals.GTASM_ELEMENT__ID,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the Fqn feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addFqnPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_GTASMElement_fqn_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_GTASMElement_fqn_feature", "_UI_GTASMElement_type"),
+         CorePackage.Literals.GTASM_ELEMENT__FQN,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(CorePackage.Literals.GTASM_ELEMENT__RUNTIME_ANNOTATIONS);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((GTASMElement)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_GTASMElement_type") :
+      getString("_UI_GTASMElement_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(GTASMElement.class))
+    {
+      case CorePackage.GTASM_ELEMENT__NAME:
+      case CorePackage.GTASM_ELEMENT__ID:
+      case CorePackage.GTASM_ELEMENT__FQN:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+      case CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CorePackage.Literals.GTASM_ELEMENT__RUNTIME_ANNOTATIONS,
+         CoreFactory.eINSTANCE.createRuntimeAnnotation()));
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/provider/RuntimeAnnotationElementItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/provider/RuntimeAnnotationElementItemProvider.java
new file mode 100644
index 0000000..f0685e4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/provider/RuntimeAnnotationElementItemProvider.java
@@ -0,0 +1,194 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RuntimeAnnotationElementItemProvider
+  extends AnnotatedElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RuntimeAnnotationElementItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addValuePropertyDescriptor(object);
+      addKeyPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Value feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addValuePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_RuntimeAnnotationElement_value_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_RuntimeAnnotationElement_value_feature", "_UI_RuntimeAnnotationElement_type"),
+         CorePackage.Literals.RUNTIME_ANNOTATION_ELEMENT__VALUE,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the Key feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addKeyPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_RuntimeAnnotationElement_key_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_RuntimeAnnotationElement_key_feature", "_UI_RuntimeAnnotationElement_type"),
+         CorePackage.Literals.RUNTIME_ANNOTATION_ELEMENT__KEY,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This returns RuntimeAnnotationElement.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/RuntimeAnnotationElement"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((RuntimeAnnotationElement)object).getValue();
+    return label == null || label.length() == 0 ?
+      getString("_UI_RuntimeAnnotationElement_type") :
+      getString("_UI_RuntimeAnnotationElement_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(RuntimeAnnotationElement.class))
+    {
+      case CorePackage.RUNTIME_ANNOTATION_ELEMENT__VALUE:
+      case CorePackage.RUNTIME_ANNOTATION_ELEMENT__KEY:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/provider/RuntimeAnnotationItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/provider/RuntimeAnnotationItemProvider.java
new file mode 100644
index 0000000..9717b42
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/provider/RuntimeAnnotationItemProvider.java
@@ -0,0 +1,213 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CoreFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RuntimeAnnotationItemProvider
+  extends AnnotatedElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RuntimeAnnotationItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addAnnotationNamePropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Annotation Name feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addAnnotationNamePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_RuntimeAnnotation_annotationName_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_RuntimeAnnotation_annotationName_feature", "_UI_RuntimeAnnotation_type"),
+         CorePackage.Literals.RUNTIME_ANNOTATION__ANNOTATION_NAME,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(CorePackage.Literals.RUNTIME_ANNOTATION__ELEMENTS);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns RuntimeAnnotation.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/RuntimeAnnotation"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((RuntimeAnnotation)object).getAnnotationName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_RuntimeAnnotation_type") :
+      getString("_UI_RuntimeAnnotation_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(RuntimeAnnotation.class))
+    {
+      case CorePackage.RUNTIME_ANNOTATION__ANNOTATION_NAME:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+      case CorePackage.RUNTIME_ANNOTATION__ELEMENTS:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CorePackage.Literals.RUNTIME_ANNOTATION__ELEMENTS,
+         CoreFactory.eINSTANCE.createRuntimeAnnotationElement()));
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/ASMFunctionItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/ASMFunctionItemProvider.java
new file mode 100644
index 0000000..5811c31
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/ASMFunctionItemProvider.java
@@ -0,0 +1,252 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ASMFunctionItemProvider
+  extends FunctionDefinitionItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ASMFunctionItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addArityPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Arity feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addArityPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_ASMFunction_arity_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_ASMFunction_arity_feature", "_UI_ASMFunction_type"),
+         DefinitionsPackage.Literals.ASM_FUNCTION__ARITY,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(DefinitionsPackage.Literals.ASM_FUNCTION__INITIAL_VALUES);
+      childrenFeatures.add(DefinitionsPackage.Literals.ASM_FUNCTION__RETURN_TYPE);
+      childrenFeatures.add(DefinitionsPackage.Literals.ASM_FUNCTION__ARGUMENT_TYPES);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns ASMFunction.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ASMFunction"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ASMFunction)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ASMFunction_type") :
+      getString("_UI_ASMFunction_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(ASMFunction.class))
+    {
+      case DefinitionsPackage.ASM_FUNCTION__ARITY:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+      case DefinitionsPackage.ASM_FUNCTION__INITIAL_VALUES:
+      case DefinitionsPackage.ASM_FUNCTION__RETURN_TYPE:
+      case DefinitionsPackage.ASM_FUNCTION__ARGUMENT_TYPES:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.ASM_FUNCTION__INITIAL_VALUES,
+         DefinitionsFactory.eINSTANCE.createInitialValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.ASM_FUNCTION__RETURN_TYPE,
+         DefinitionsFactory.eINSTANCE.createTypeConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.ASM_FUNCTION__ARGUMENT_TYPES,
+         DefinitionsFactory.eINSTANCE.createTypeConstant()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == DefinitionsPackage.Literals.ASM_FUNCTION__RETURN_TYPE ||
+      childFeature == DefinitionsPackage.Literals.ASM_FUNCTION__ARGUMENT_TYPES;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/ChangeEventItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/ChangeEventItemProvider.java
new file mode 100644
index 0000000..757bbfa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/ChangeEventItemProvider.java
@@ -0,0 +1,232 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.GTASMElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ChangeEventItemProvider
+  extends GTASMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ChangeEventItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addChangeKindPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Change Kind feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addChangeKindPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_ChangeEvent_changeKind_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_ChangeEvent_changeKind_feature", "_UI_ChangeEvent_type"),
+         DefinitionsPackage.Literals.CHANGE_EVENT__CHANGE_KIND,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(DefinitionsPackage.Literals.CHANGE_EVENT__VARIABLE_REFERENCE);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns ChangeEvent.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ChangeEvent"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ChangeEvent)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ChangeEvent_type") :
+      getString("_UI_ChangeEvent_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(ChangeEvent.class))
+    {
+      case DefinitionsPackage.CHANGE_EVENT__CHANGE_KIND:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+      case DefinitionsPackage.CHANGE_EVENT__VARIABLE_REFERENCE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.CHANGE_EVENT__VARIABLE_REFERENCE,
+         TermsFactory.eINSTANCE.createVariableReference()));
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/DefinitionsItemProviderAdapterFactory.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/DefinitionsItemProviderAdapterFactory.java
new file mode 100644
index 0000000..288b501
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/DefinitionsItemProviderAdapterFactory.java
@@ -0,0 +1,543 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.util.DefinitionsAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DefinitionsItemProviderAdapterFactory extends DefinitionsAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This keeps track of the root adapter factory that delegates to this adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ComposedAdapterFactory parentAdapterFactory;
+
+  /**
+   * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+  /**
+   * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+  /**
+   * This constructs an instance.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DefinitionsItemProviderAdapterFactory()
+  {
+    supportedTypes.add(IEditingDomainItemProvider.class);
+    supportedTypes.add(IStructuredItemContentProvider.class);
+    supportedTypes.add(ITreeItemContentProvider.class);
+    supportedTypes.add(IItemLabelProvider.class);
+    supportedTypes.add(IItemPropertySource.class);
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected MachineItemProvider machineItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createMachineAdapter()
+  {
+    if (machineItemProvider == null)
+    {
+      machineItemProvider = new MachineItemProvider(this);
+    }
+
+    return machineItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RuleItemProvider ruleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createRuleAdapter()
+  {
+    if (ruleItemProvider == null)
+    {
+      ruleItemProvider = new RuleItemProvider(this);
+    }
+
+    return ruleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected VariableItemProvider variableItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createVariableAdapter()
+  {
+    if (variableItemProvider == null)
+    {
+      variableItemProvider = new VariableItemProvider(this);
+    }
+
+    return variableItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected VariableDefinitionItemProvider variableDefinitionItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createVariableDefinitionAdapter()
+  {
+    if (variableDefinitionItemProvider == null)
+    {
+      variableDefinitionItemProvider = new VariableDefinitionItemProvider(this);
+    }
+
+    return variableDefinitionItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ASMFunctionItemProvider asmFunctionItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createASMFunctionAdapter()
+  {
+    if (asmFunctionItemProvider == null)
+    {
+      asmFunctionItemProvider = new ASMFunctionItemProvider(this);
+    }
+
+    return asmFunctionItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected InitialValueItemProvider initialValueItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createInitialValueAdapter()
+  {
+    if (initialValueItemProvider == null)
+    {
+      initialValueItemProvider = new InitialValueItemProvider(this);
+    }
+
+    return initialValueItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SymbolicRuleParameterItemProvider symbolicRuleParameterItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createSymbolicRuleParameterAdapter()
+  {
+    if (symbolicRuleParameterItemProvider == null)
+    {
+      symbolicRuleParameterItemProvider = new SymbolicRuleParameterItemProvider(this);
+    }
+
+    return symbolicRuleParameterItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ModuleItemProvider moduleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createModuleAdapter()
+  {
+    if (moduleItemProvider == null)
+    {
+      moduleItemProvider = new ModuleItemProvider(this);
+    }
+
+    return moduleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ImportDeclaration} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ImportDeclarationItemProvider importDeclarationItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ImportDeclaration}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createImportDeclarationAdapter()
+  {
+    if (importDeclarationItemProvider == null)
+    {
+      importDeclarationItemProvider = new ImportDeclarationItemProvider(this);
+    }
+
+    return importDeclarationItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.NamespaceDefinition} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected NamespaceDefinitionItemProvider namespaceDefinitionItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.NamespaceDefinition}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createNamespaceDefinitionAdapter()
+  {
+    if (namespaceDefinitionItemProvider == null)
+    {
+      namespaceDefinitionItemProvider = new NamespaceDefinitionItemProvider(this);
+    }
+
+    return namespaceDefinitionItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Transformation} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected TransformationItemProvider transformationItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Transformation}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createTransformationAdapter()
+  {
+    if (transformationItemProvider == null)
+    {
+      transformationItemProvider = new TransformationItemProvider(this);
+    }
+
+    return transformationItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected TypeConstantItemProvider typeConstantItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createTypeConstantAdapter()
+  {
+    if (typeConstantItemProvider == null)
+    {
+      typeConstantItemProvider = new TypeConstantItemProvider(this);
+    }
+
+    return typeConstantItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ChangeEventItemProvider changeEventItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createChangeEventAdapter()
+  {
+    if (changeEventItemProvider == null)
+    {
+      changeEventItemProvider = new ChangeEventItemProvider(this);
+    }
+
+    return changeEventItemProvider;
+  }
+
+  /**
+   * This returns the root adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ComposeableAdapterFactory getRootAdapterFactory()
+  {
+    return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+  }
+
+  /**
+   * This sets the composed adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
+  {
+    this.parentAdapterFactory = parentAdapterFactory;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object type)
+  {
+    return supportedTypes.contains(type) || super.isFactoryForType(type);
+  }
+
+  /**
+   * This implementation substitutes the factory itself as the key for the adapter.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter adapt(Notifier notifier, Object type)
+  {
+    return super.adapt(notifier, this);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object adapt(Object object, Object type)
+  {
+    if (isFactoryForType(type))
+    {
+      Object adapter = super.adapt(object, type);
+      if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter)))
+      {
+        return adapter;
+      }
+    }
+
+    return null;
+  }
+
+  /**
+   * This adds a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void addListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.addListener(notifyChangedListener);
+  }
+
+  /**
+   * This removes a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void removeListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.removeListener(notifyChangedListener);
+  }
+
+  /**
+   * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void fireNotifyChanged(Notification notification)
+  {
+    changeNotifier.fireNotifyChanged(notification);
+
+    if (parentAdapterFactory != null)
+    {
+      parentAdapterFactory.fireNotifyChanged(notification);
+    }
+  }
+
+  /**
+   * This disposes all of the item providers created by this factory. 
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void dispose()
+  {
+    if (machineItemProvider != null) machineItemProvider.dispose();
+    if (ruleItemProvider != null) ruleItemProvider.dispose();
+    if (variableItemProvider != null) variableItemProvider.dispose();
+    if (variableDefinitionItemProvider != null) variableDefinitionItemProvider.dispose();
+    if (asmFunctionItemProvider != null) asmFunctionItemProvider.dispose();
+    if (initialValueItemProvider != null) initialValueItemProvider.dispose();
+    if (symbolicRuleParameterItemProvider != null) symbolicRuleParameterItemProvider.dispose();
+    if (moduleItemProvider != null) moduleItemProvider.dispose();
+    if (importDeclarationItemProvider != null) importDeclarationItemProvider.dispose();
+    if (namespaceDefinitionItemProvider != null) namespaceDefinitionItemProvider.dispose();
+    if (transformationItemProvider != null) transformationItemProvider.dispose();
+    if (typeConstantItemProvider != null) typeConstantItemProvider.dispose();
+    if (changeEventItemProvider != null) changeEventItemProvider.dispose();
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/FunctionDefinitionItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/FunctionDefinitionItemProvider.java
new file mode 100644
index 0000000..9f6b032
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/FunctionDefinitionItemProvider.java
@@ -0,0 +1,140 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.GTASMElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.FunctionDefinition;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.FunctionDefinition} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class FunctionDefinitionItemProvider
+  extends GTASMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public FunctionDefinitionItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((FunctionDefinition)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_FunctionDefinition_type") :
+      getString("_UI_FunctionDefinition_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/ImportDeclarationItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/ImportDeclarationItemProvider.java
new file mode 100644
index 0000000..e0d97a6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/ImportDeclarationItemProvider.java
@@ -0,0 +1,187 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.GTASMElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ImportDeclaration;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ImportDeclaration} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ImportDeclarationItemProvider
+  extends GTASMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ImportDeclarationItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addImportValuePropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Import Value feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addImportValuePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_ImportDeclaration_importValue_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_ImportDeclaration_importValue_feature", "_UI_ImportDeclaration_type"),
+         DefinitionsPackage.Literals.IMPORT_DECLARATION__IMPORT_VALUE,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This returns ImportDeclaration.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ImportDeclaration"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ImportDeclaration)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ImportDeclaration_type") :
+      getString("_UI_ImportDeclaration_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(ImportDeclaration.class))
+    {
+      case DefinitionsPackage.IMPORT_DECLARATION__IMPORT_VALUE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/InitialValueItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/InitialValueItemProvider.java
new file mode 100644
index 0000000..d16c539
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/InitialValueItemProvider.java
@@ -0,0 +1,589 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.GTASMElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class InitialValueItemProvider
+  extends GTASMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public InitialValueItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS);
+      childrenFeatures.add(DefinitionsPackage.Literals.INITIAL_VALUE__VALUE);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns InitialValue.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/InitialValue"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((InitialValue)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_InitialValue_type") :
+      getString("_UI_InitialValue_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(InitialValue.class))
+    {
+      case DefinitionsPackage.INITIAL_VALUE__LOCATIONS:
+      case DefinitionsPackage.INITIAL_VALUE__VALUE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.INITIAL_VALUE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == DefinitionsPackage.Literals.INITIAL_VALUE__LOCATIONS ||
+      childFeature == DefinitionsPackage.Literals.INITIAL_VALUE__VALUE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/MachineItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/MachineItemProvider.java
new file mode 100644
index 0000000..e94490c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/MachineItemProvider.java
@@ -0,0 +1,243 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.provider.PatternContainerItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class MachineItemProvider
+  extends PatternContainerItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public MachineItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addMainRulePropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Main Rule feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addMainRulePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_Machine_mainRule_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_Machine_mainRule_feature", "_UI_Machine_type"),
+         DefinitionsPackage.Literals.MACHINE__MAIN_RULE,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(DefinitionsPackage.Literals.MACHINE__GT_RULE_DEFINITIONS);
+      childrenFeatures.add(DefinitionsPackage.Literals.MACHINE__ASM_FUNCTION_DEFINITIONS);
+      childrenFeatures.add(DefinitionsPackage.Literals.MACHINE__ASM_RULE_DEFINITIONS);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns Machine.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Machine"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Machine)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Machine_type") :
+      getString("_UI_Machine_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(Machine.class))
+    {
+      case DefinitionsPackage.MACHINE__GT_RULE_DEFINITIONS:
+      case DefinitionsPackage.MACHINE__ASM_FUNCTION_DEFINITIONS:
+      case DefinitionsPackage.MACHINE__ASM_RULE_DEFINITIONS:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.MACHINE__GT_RULE_DEFINITIONS,
+         GtFactory.eINSTANCE.createGTRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.MACHINE__ASM_FUNCTION_DEFINITIONS,
+         DefinitionsFactory.eINSTANCE.createASMFunction()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.MACHINE__ASM_RULE_DEFINITIONS,
+         DefinitionsFactory.eINSTANCE.createRule()));
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/ModuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/ModuleItemProvider.java
new file mode 100644
index 0000000..76b0ae9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/ModuleItemProvider.java
@@ -0,0 +1,245 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.GTASMElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ModuleItemProvider
+  extends GTASMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ModuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addFileNamePropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the File Name feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addFileNamePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_Module_fileName_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_Module_fileName_feature", "_UI_Module_type"),
+         DefinitionsPackage.Literals.MODULE__FILE_NAME,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(DefinitionsPackage.Literals.MODULE__MACHINE);
+      childrenFeatures.add(DefinitionsPackage.Literals.MODULE__IMPORT);
+      childrenFeatures.add(DefinitionsPackage.Literals.MODULE__NAMESPACE);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns Module.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Module"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Module)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Module_type") :
+      getString("_UI_Module_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(Module.class))
+    {
+      case DefinitionsPackage.MODULE__FILE_NAME:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+      case DefinitionsPackage.MODULE__MACHINE:
+      case DefinitionsPackage.MODULE__IMPORT:
+      case DefinitionsPackage.MODULE__NAMESPACE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.MODULE__MACHINE,
+         DefinitionsFactory.eINSTANCE.createMachine()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.MODULE__IMPORT,
+         DefinitionsFactory.eINSTANCE.createImportDeclaration()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.MODULE__NAMESPACE,
+         DefinitionsFactory.eINSTANCE.createNamespaceDefinition()));
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/NamespaceDefinitionItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/NamespaceDefinitionItemProvider.java
new file mode 100644
index 0000000..27226d2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/NamespaceDefinitionItemProvider.java
@@ -0,0 +1,187 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.GTASMElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.NamespaceDefinition;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.NamespaceDefinition} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NamespaceDefinitionItemProvider
+  extends GTASMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NamespaceDefinitionItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addNamespaceValuePropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Namespace Value feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addNamespaceValuePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_NamespaceDefinition_namespaceValue_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_NamespaceDefinition_namespaceValue_feature", "_UI_NamespaceDefinition_type"),
+         DefinitionsPackage.Literals.NAMESPACE_DEFINITION__NAMESPACE_VALUE,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This returns NamespaceDefinition.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/NamespaceDefinition"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((NamespaceDefinition)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_NamespaceDefinition_type") :
+      getString("_UI_NamespaceDefinition_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(NamespaceDefinition.class))
+    {
+      case DefinitionsPackage.NAMESPACE_DEFINITION__NAMESPACE_VALUE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/RuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/RuleItemProvider.java
new file mode 100644
index 0000000..541d846
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/RuleItemProvider.java
@@ -0,0 +1,415 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.GTASMElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymoveFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdateFactory;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RuleItemProvider
+  extends GTASMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(DefinitionsPackage.Literals.RULE__BODY);
+      childrenFeatures.add(DefinitionsPackage.Literals.RULE__SYM_PARAMETERS);
+      childrenFeatures.add(DefinitionsPackage.Literals.RULE__LOCAL_VARIABLES);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns Rule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Rule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Rule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Rule_type") :
+      getString("_UI_Rule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(Rule.class))
+    {
+      case DefinitionsPackage.RULE__BODY:
+      case DefinitionsPackage.RULE__SYM_PARAMETERS:
+      case DefinitionsPackage.RULE__LOCAL_VARIABLES:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         DeletionFactory.eINSTANCE.createElementDeleteRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         DeletionFactory.eINSTANCE.createDeleteInstanceOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         DeletionFactory.eINSTANCE.createDeleteSupertypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         CreationFactory.eINSTANCE.createRelationCreateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         CreationFactory.eINSTANCE.createEntityCreateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         CreationFactory.eINSTANCE.createCreateSupertypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         CreationFactory.eINSTANCE.createCreateInstanceOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         CopymoveFactory.eINSTANCE.createMoveRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         CopymoveFactory.eINSTANCE.createModelCopyRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         UpdateFactory.eINSTANCE.createRenameRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         UpdateFactory.eINSTANCE.createSetValueRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         UpdateFactory.eINSTANCE.createSetRelationTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         UpdateFactory.eINSTANCE.createSetRelationFrom()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         UpdateFactory.eINSTANCE.createSetMultiplicityRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         UpdateFactory.eINSTANCE.createSetInverseRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         UpdateFactory.eINSTANCE.createSetAnyTargetRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         UpdateFactory.eINSTANCE.createSetAnySourceRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         UpdateFactory.eINSTANCE.createSetAggregationRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createConditionalRuleTry()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createConditionalRuleIf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createCallRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createRuleUpdateVariable()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createGTRuleInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createRuleUpdateASMFunction()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createFailRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createLogRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createPrintRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createSkipRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         SimpleRulesFactory.eINSTANCE.createPrintLnRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         CompoundRulesFactory.eINSTANCE.createSequentialRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         CompoundRulesFactory.eINSTANCE.createRandomRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         CompoundRulesFactory.eINSTANCE.createParallelRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         CompoundRulesFactory.eINSTANCE.createChooseRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         CompoundRulesFactory.eINSTANCE.createForallRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         CompoundRulesFactory.eINSTANCE.createIterateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         CompoundRulesFactory.eINSTANCE.createLetRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__BODY,
+         CompoundRulesFactory.eINSTANCE.createWhenRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__SYM_PARAMETERS,
+         DefinitionsFactory.eINSTANCE.createSymbolicRuleParameter()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__LOCAL_VARIABLES,
+         DefinitionsFactory.eINSTANCE.createVariable()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.RULE__LOCAL_VARIABLES,
+         GtFactory.eINSTANCE.createPatternVariable()));
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/SymbolicRuleParameterItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/SymbolicRuleParameterItemProvider.java
new file mode 100644
index 0000000..5812ba4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/SymbolicRuleParameterItemProvider.java
@@ -0,0 +1,211 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.GTASMElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SymbolicRuleParameterItemProvider
+  extends GTASMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SymbolicRuleParameterItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addVariablePropertyDescriptor(object);
+      addDirectionPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Variable feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addVariablePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_SymbolicRuleParameter_variable_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_SymbolicRuleParameter_variable_feature", "_UI_SymbolicRuleParameter_type"),
+         DefinitionsPackage.Literals.SYMBOLIC_RULE_PARAMETER__VARIABLE,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the Direction feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addDirectionPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_SymbolicRuleParameter_direction_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_SymbolicRuleParameter_direction_feature", "_UI_SymbolicRuleParameter_type"),
+         DefinitionsPackage.Literals.SYMBOLIC_RULE_PARAMETER__DIRECTION,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This returns SymbolicRuleParameter.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/SymbolicRuleParameter"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((SymbolicRuleParameter)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_SymbolicRuleParameter_type") :
+      getString("_UI_SymbolicRuleParameter_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(SymbolicRuleParameter.class))
+    {
+      case DefinitionsPackage.SYMBOLIC_RULE_PARAMETER__DIRECTION:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/TransformationItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/TransformationItemProvider.java
new file mode 100644
index 0000000..5080386
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/TransformationItemProvider.java
@@ -0,0 +1,202 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.GTASMElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Transformation;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Transformation} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TransformationItemProvider
+  extends GTASMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public TransformationItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(DefinitionsPackage.Literals.TRANSFORMATION__MODULES);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns Transformation.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Transformation"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Transformation)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Transformation_type") :
+      getString("_UI_Transformation_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(Transformation.class))
+    {
+      case DefinitionsPackage.TRANSFORMATION__MODULES:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.TRANSFORMATION__MODULES,
+         DefinitionsFactory.eINSTANCE.createModule()));
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/TypeConstantItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/TypeConstantItemProvider.java
new file mode 100644
index 0000000..594e4ba
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/TypeConstantItemProvider.java
@@ -0,0 +1,187 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.GTASMElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TypeConstantItemProvider
+  extends GTASMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public TypeConstantItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addKindPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Kind feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addKindPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_TypeConstant_kind_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_TypeConstant_kind_feature", "_UI_TypeConstant_type"),
+         DefinitionsPackage.Literals.TYPE_CONSTANT__KIND,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This returns TypeConstant.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeConstant"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((TypeConstant)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_TypeConstant_type") :
+      getString("_UI_TypeConstant_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(TypeConstant.class))
+    {
+      case DefinitionsPackage.TYPE_CONSTANT__KIND:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/VariableDefinitionItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/VariableDefinitionItemProvider.java
new file mode 100644
index 0000000..ef4b224
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/VariableDefinitionItemProvider.java
@@ -0,0 +1,407 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.GTASMElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VariableDefinitionItemProvider
+  extends GTASMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public VariableDefinitionItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addVariablePropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Variable feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addVariablePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_VariableDefinition_variable_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_VariableDefinition_variable_feature", "_UI_VariableDefinition_type"),
+         DefinitionsPackage.Literals.VARIABLE_DEFINITION__VARIABLE,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns VariableDefinition.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/VariableDefinition"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((VariableDefinition)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_VariableDefinition_type") :
+      getString("_UI_VariableDefinition_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(VariableDefinition.class))
+    {
+      case DefinitionsPackage.VARIABLE_DEFINITION__VALUE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DefinitionsPackage.Literals.VARIABLE_DEFINITION__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/VariableItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/VariableItemProvider.java
new file mode 100644
index 0000000..738d0f8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/provider/VariableItemProvider.java
@@ -0,0 +1,210 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.GTASMElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VariableItemProvider
+  extends GTASMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public VariableItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addReferencesPropertyDescriptor(object);
+      addVariableTypePropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the References feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addReferencesPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_Variable_references_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_Variable_references_feature", "_UI_Variable_type"),
+         DefinitionsPackage.Literals.VARIABLE__REFERENCES,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the Variable Type feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addVariableTypePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_Variable_variableType_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_Variable_variableType_feature", "_UI_Variable_type"),
+         DefinitionsPackage.Literals.VARIABLE__VARIABLE_TYPE,
+         true,
+         false,
+         false,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This returns Variable.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Variable"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Variable)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Variable_type") :
+      getString("_UI_Variable_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(Variable.class))
+    {
+      case DefinitionsPackage.VARIABLE__VARIABLE_TYPE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/ASMRuleInvocationItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/ASMRuleInvocationItemProvider.java
new file mode 100644
index 0000000..c6593d2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/ASMRuleInvocationItemProvider.java
@@ -0,0 +1,166 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.GTASMElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ASMRuleInvocationItemProvider
+  extends GTASMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ASMRuleInvocationItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addCallerPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Caller feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addCallerPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_ASMRuleInvocation_caller_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_ASMRuleInvocation_caller_feature", "_UI_ASMRuleInvocation_type"),
+         SimpleRulesPackage.Literals.ASM_RULE_INVOCATION__CALLER,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ASMRuleInvocation)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ASMRuleInvocation_type") :
+      getString("_UI_ASMRuleInvocation_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/CallRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/CallRuleItemProvider.java
new file mode 100644
index 0000000..8849c74
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/CallRuleItemProvider.java
@@ -0,0 +1,389 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CallRuleItemProvider
+  extends ASMRuleInvocationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CallRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addRulePropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Rule feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addRulePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_CallRule_rule_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_CallRule_rule_feature", "_UI_CallRule_type"),
+         SimpleRulesPackage.Literals.CALL_RULE__RULE,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns CallRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/CallRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((CallRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_CallRule_type") :
+      getString("_UI_CallRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(CallRule.class))
+    {
+      case SimpleRulesPackage.CALL_RULE__ACTUAL_PARAMETERS:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CALL_RULE__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/ConditionalRuleIfItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/ConditionalRuleIfItemProvider.java
new file mode 100644
index 0000000..ce3cb39
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/ConditionalRuleIfItemProvider.java
@@ -0,0 +1,774 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymoveFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdateFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ConditionalRuleIfItemProvider
+  extends ASMRuleInvocationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ConditionalRuleIfItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST);
+      childrenFeatures.add(SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE);
+      childrenFeatures.add(SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns ConditionalRuleIf.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ConditionalRuleIf"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ConditionalRuleIf)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ConditionalRuleIf_type") :
+      getString("_UI_ConditionalRuleIf_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(ConditionalRuleIf.class))
+    {
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST:
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_TRUE:
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_FALSE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         SimpleRulesFactory.eINSTANCE.createConditionalRuleTry()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         SimpleRulesFactory.eINSTANCE.createConditionalRuleIf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         SimpleRulesFactory.eINSTANCE.createCallRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         SimpleRulesFactory.eINSTANCE.createRuleUpdateVariable()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         SimpleRulesFactory.eINSTANCE.createGTRuleInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         SimpleRulesFactory.eINSTANCE.createRuleUpdateASMFunction()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         SimpleRulesFactory.eINSTANCE.createFailRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         SimpleRulesFactory.eINSTANCE.createLogRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         SimpleRulesFactory.eINSTANCE.createPrintRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         SimpleRulesFactory.eINSTANCE.createSkipRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         SimpleRulesFactory.eINSTANCE.createPrintLnRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         DeletionFactory.eINSTANCE.createElementDeleteRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         DeletionFactory.eINSTANCE.createDeleteInstanceOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         DeletionFactory.eINSTANCE.createDeleteSupertypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         CreationFactory.eINSTANCE.createRelationCreateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         CreationFactory.eINSTANCE.createEntityCreateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         CreationFactory.eINSTANCE.createCreateSupertypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         CreationFactory.eINSTANCE.createCreateInstanceOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         CopymoveFactory.eINSTANCE.createMoveRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         CopymoveFactory.eINSTANCE.createModelCopyRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         UpdateFactory.eINSTANCE.createRenameRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         UpdateFactory.eINSTANCE.createSetValueRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         UpdateFactory.eINSTANCE.createSetRelationTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         UpdateFactory.eINSTANCE.createSetRelationFrom()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         UpdateFactory.eINSTANCE.createSetMultiplicityRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         UpdateFactory.eINSTANCE.createSetInverseRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         UpdateFactory.eINSTANCE.createSetAnyTargetRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         UpdateFactory.eINSTANCE.createSetAnySourceRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         UpdateFactory.eINSTANCE.createSetAggregationRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         CompoundRulesFactory.eINSTANCE.createSequentialRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         CompoundRulesFactory.eINSTANCE.createRandomRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         CompoundRulesFactory.eINSTANCE.createParallelRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         CompoundRulesFactory.eINSTANCE.createChooseRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         CompoundRulesFactory.eINSTANCE.createForallRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         CompoundRulesFactory.eINSTANCE.createIterateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         CompoundRulesFactory.eINSTANCE.createLetRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE,
+         CompoundRulesFactory.eINSTANCE.createWhenRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         SimpleRulesFactory.eINSTANCE.createConditionalRuleTry()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         SimpleRulesFactory.eINSTANCE.createConditionalRuleIf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         SimpleRulesFactory.eINSTANCE.createCallRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         SimpleRulesFactory.eINSTANCE.createRuleUpdateVariable()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         SimpleRulesFactory.eINSTANCE.createGTRuleInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         SimpleRulesFactory.eINSTANCE.createRuleUpdateASMFunction()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         SimpleRulesFactory.eINSTANCE.createFailRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         SimpleRulesFactory.eINSTANCE.createLogRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         SimpleRulesFactory.eINSTANCE.createPrintRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         SimpleRulesFactory.eINSTANCE.createSkipRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         SimpleRulesFactory.eINSTANCE.createPrintLnRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         DeletionFactory.eINSTANCE.createElementDeleteRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         DeletionFactory.eINSTANCE.createDeleteInstanceOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         DeletionFactory.eINSTANCE.createDeleteSupertypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         CreationFactory.eINSTANCE.createRelationCreateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         CreationFactory.eINSTANCE.createEntityCreateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         CreationFactory.eINSTANCE.createCreateSupertypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         CreationFactory.eINSTANCE.createCreateInstanceOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         CopymoveFactory.eINSTANCE.createMoveRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         CopymoveFactory.eINSTANCE.createModelCopyRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         UpdateFactory.eINSTANCE.createRenameRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         UpdateFactory.eINSTANCE.createSetValueRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         UpdateFactory.eINSTANCE.createSetRelationTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         UpdateFactory.eINSTANCE.createSetRelationFrom()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         UpdateFactory.eINSTANCE.createSetMultiplicityRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         UpdateFactory.eINSTANCE.createSetInverseRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         UpdateFactory.eINSTANCE.createSetAnyTargetRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         UpdateFactory.eINSTANCE.createSetAnySourceRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         UpdateFactory.eINSTANCE.createSetAggregationRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         CompoundRulesFactory.eINSTANCE.createSequentialRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         CompoundRulesFactory.eINSTANCE.createRandomRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         CompoundRulesFactory.eINSTANCE.createParallelRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         CompoundRulesFactory.eINSTANCE.createChooseRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         CompoundRulesFactory.eINSTANCE.createForallRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         CompoundRulesFactory.eINSTANCE.createIterateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         CompoundRulesFactory.eINSTANCE.createLetRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE,
+         CompoundRulesFactory.eINSTANCE.createWhenRule()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_TRUE ||
+      childFeature == SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF__RULE_FALSE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/ConditionalRuleTryItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/ConditionalRuleTryItemProvider.java
new file mode 100644
index 0000000..0f187b1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/ConditionalRuleTryItemProvider.java
@@ -0,0 +1,586 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymoveFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdateFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ConditionalRuleTryItemProvider
+  extends ASMRuleInvocationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ConditionalRuleTryItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY);
+      childrenFeatures.add(SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns ConditionalRuleTry.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ConditionalRuleTry"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ConditionalRuleTry)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ConditionalRuleTry_type") :
+      getString("_UI_ConditionalRuleTry_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(ConditionalRuleTry.class))
+    {
+      case SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_TO_TRY:
+      case SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_ELSE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         SimpleRulesFactory.eINSTANCE.createConditionalRuleTry()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         SimpleRulesFactory.eINSTANCE.createConditionalRuleIf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         SimpleRulesFactory.eINSTANCE.createCallRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         SimpleRulesFactory.eINSTANCE.createRuleUpdateVariable()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         SimpleRulesFactory.eINSTANCE.createGTRuleInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         SimpleRulesFactory.eINSTANCE.createRuleUpdateASMFunction()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         SimpleRulesFactory.eINSTANCE.createFailRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         SimpleRulesFactory.eINSTANCE.createLogRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         SimpleRulesFactory.eINSTANCE.createPrintRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         SimpleRulesFactory.eINSTANCE.createSkipRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         SimpleRulesFactory.eINSTANCE.createPrintLnRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         DeletionFactory.eINSTANCE.createElementDeleteRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         DeletionFactory.eINSTANCE.createDeleteInstanceOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         DeletionFactory.eINSTANCE.createDeleteSupertypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         CreationFactory.eINSTANCE.createRelationCreateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         CreationFactory.eINSTANCE.createEntityCreateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         CreationFactory.eINSTANCE.createCreateSupertypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         CreationFactory.eINSTANCE.createCreateInstanceOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         CopymoveFactory.eINSTANCE.createMoveRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         CopymoveFactory.eINSTANCE.createModelCopyRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         UpdateFactory.eINSTANCE.createRenameRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         UpdateFactory.eINSTANCE.createSetValueRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         UpdateFactory.eINSTANCE.createSetRelationTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         UpdateFactory.eINSTANCE.createSetRelationFrom()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         UpdateFactory.eINSTANCE.createSetMultiplicityRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         UpdateFactory.eINSTANCE.createSetInverseRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         UpdateFactory.eINSTANCE.createSetAnyTargetRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         UpdateFactory.eINSTANCE.createSetAnySourceRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         UpdateFactory.eINSTANCE.createSetAggregationRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         CompoundRulesFactory.eINSTANCE.createSequentialRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         CompoundRulesFactory.eINSTANCE.createRandomRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         CompoundRulesFactory.eINSTANCE.createParallelRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         CompoundRulesFactory.eINSTANCE.createChooseRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         CompoundRulesFactory.eINSTANCE.createForallRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         CompoundRulesFactory.eINSTANCE.createIterateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         CompoundRulesFactory.eINSTANCE.createLetRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY,
+         CompoundRulesFactory.eINSTANCE.createWhenRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         SimpleRulesFactory.eINSTANCE.createConditionalRuleTry()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         SimpleRulesFactory.eINSTANCE.createConditionalRuleIf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         SimpleRulesFactory.eINSTANCE.createCallRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         SimpleRulesFactory.eINSTANCE.createRuleUpdateVariable()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         SimpleRulesFactory.eINSTANCE.createGTRuleInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         SimpleRulesFactory.eINSTANCE.createRuleUpdateASMFunction()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         SimpleRulesFactory.eINSTANCE.createFailRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         SimpleRulesFactory.eINSTANCE.createLogRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         SimpleRulesFactory.eINSTANCE.createPrintRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         SimpleRulesFactory.eINSTANCE.createSkipRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         SimpleRulesFactory.eINSTANCE.createPrintLnRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         DeletionFactory.eINSTANCE.createElementDeleteRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         DeletionFactory.eINSTANCE.createDeleteInstanceOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         DeletionFactory.eINSTANCE.createDeleteSupertypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         CreationFactory.eINSTANCE.createRelationCreateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         CreationFactory.eINSTANCE.createEntityCreateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         CreationFactory.eINSTANCE.createCreateSupertypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         CreationFactory.eINSTANCE.createCreateInstanceOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         CopymoveFactory.eINSTANCE.createMoveRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         CopymoveFactory.eINSTANCE.createModelCopyRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         UpdateFactory.eINSTANCE.createRenameRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         UpdateFactory.eINSTANCE.createSetValueRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         UpdateFactory.eINSTANCE.createSetRelationTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         UpdateFactory.eINSTANCE.createSetRelationFrom()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         UpdateFactory.eINSTANCE.createSetMultiplicityRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         UpdateFactory.eINSTANCE.createSetInverseRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         UpdateFactory.eINSTANCE.createSetAnyTargetRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         UpdateFactory.eINSTANCE.createSetAnySourceRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         UpdateFactory.eINSTANCE.createSetAggregationRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         CompoundRulesFactory.eINSTANCE.createSequentialRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         CompoundRulesFactory.eINSTANCE.createRandomRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         CompoundRulesFactory.eINSTANCE.createParallelRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         CompoundRulesFactory.eINSTANCE.createChooseRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         CompoundRulesFactory.eINSTANCE.createForallRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         CompoundRulesFactory.eINSTANCE.createIterateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         CompoundRulesFactory.eINSTANCE.createLetRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE,
+         CompoundRulesFactory.eINSTANCE.createWhenRule()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_TO_TRY ||
+      childFeature == SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY__RULE_ELSE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/FailRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/FailRuleItemProvider.java
new file mode 100644
index 0000000..1e9d448
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/FailRuleItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.FailRule;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.FailRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class FailRuleItemProvider
+  extends ASMRuleInvocationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public FailRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns FailRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/FailRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((FailRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_FailRule_type") :
+      getString("_UI_FailRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/GTRuleInvocationItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/GTRuleInvocationItemProvider.java
new file mode 100644
index 0000000..6c15e5d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/GTRuleInvocationItemProvider.java
@@ -0,0 +1,389 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GTRuleInvocationItemProvider
+  extends ASMRuleInvocationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTRuleInvocationItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addRulePropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Rule feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addRulePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_GTRuleInvocation_rule_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_GTRuleInvocation_rule_feature", "_UI_GTRuleInvocation_type"),
+         SimpleRulesPackage.Literals.GT_RULE_INVOCATION__RULE,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns GTRuleInvocation.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/GTRuleInvocation"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((GTRuleInvocation)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_GTRuleInvocation_type") :
+      getString("_UI_GTRuleInvocation_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(GTRuleInvocation.class))
+    {
+      case SimpleRulesPackage.GT_RULE_INVOCATION__ACTUAL_PARAMETERS:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.GT_RULE_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/LogRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/LogRuleItemProvider.java
new file mode 100644
index 0000000..f2d57b4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/LogRuleItemProvider.java
@@ -0,0 +1,393 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class LogRuleItemProvider
+  extends ASMRuleInvocationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public LogRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addLevelPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Level feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addLevelPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_LogRule_level_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_LogRule_level_feature", "_UI_LogRule_type"),
+         SimpleRulesPackage.Literals.LOG_RULE__LEVEL,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(SimpleRulesPackage.Literals.LOG_RULE__OUT);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns LogRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/LogRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((LogRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_LogRule_type") :
+      getString("_UI_LogRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(LogRule.class))
+    {
+      case SimpleRulesPackage.LOG_RULE__LEVEL:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+      case SimpleRulesPackage.LOG_RULE__OUT:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.LOG_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/ModelManipulationRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/ModelManipulationRuleItemProvider.java
new file mode 100644
index 0000000..22e9cf1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/ModelManipulationRuleItemProvider.java
@@ -0,0 +1,122 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ModelManipulationRuleItemProvider
+  extends ASMRuleInvocationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ModelManipulationRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ModelManipulationRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ModelManipulationRule_type") :
+      getString("_UI_ModelManipulationRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/PrintLnRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/PrintLnRuleItemProvider.java
new file mode 100644
index 0000000..55854a8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/PrintLnRuleItemProvider.java
@@ -0,0 +1,571 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PrintLnRuleItemProvider
+  extends ASMRuleInvocationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public PrintLnRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT);
+      childrenFeatures.add(SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns PrintLnRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/PrintLnRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((PrintLnRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_PrintLnRule_type") :
+      getString("_UI_PrintLnRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(PrintLnRule.class))
+    {
+      case SimpleRulesPackage.PRINT_LN_RULE__OUT:
+      case SimpleRulesPackage.PRINT_LN_RULE__BUFFER:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == SimpleRulesPackage.Literals.PRINT_LN_RULE__OUT ||
+      childFeature == SimpleRulesPackage.Literals.PRINT_LN_RULE__BUFFER;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/PrintRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/PrintRuleItemProvider.java
new file mode 100644
index 0000000..45303bf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/PrintRuleItemProvider.java
@@ -0,0 +1,571 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PrintRuleItemProvider
+  extends ASMRuleInvocationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public PrintRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(SimpleRulesPackage.Literals.PRINT_RULE__OUT);
+      childrenFeatures.add(SimpleRulesPackage.Literals.PRINT_RULE__BUFFER);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns PrintRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/PrintRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((PrintRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_PrintRule_type") :
+      getString("_UI_PrintRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(PrintRule.class))
+    {
+      case SimpleRulesPackage.PRINT_RULE__OUT:
+      case SimpleRulesPackage.PRINT_RULE__BUFFER:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__OUT,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.PRINT_RULE__BUFFER,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == SimpleRulesPackage.Literals.PRINT_RULE__OUT ||
+      childFeature == SimpleRulesPackage.Literals.PRINT_RULE__BUFFER;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/RuleUpdateASMFunctionItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/RuleUpdateASMFunctionItemProvider.java
new file mode 100644
index 0000000..9693b64
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/RuleUpdateASMFunctionItemProvider.java
@@ -0,0 +1,414 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RuleUpdateASMFunctionItemProvider
+  extends RuleUpdateItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RuleUpdateASMFunctionItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addFunctionPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Function feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addFunctionPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_RuleUpdateASMFunction_function_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_RuleUpdateASMFunction_function_feature", "_UI_RuleUpdateASMFunction_type"),
+         SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__FUNCTION,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns RuleUpdateASMFunction.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/RuleUpdateASMFunction"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((RuleUpdateASMFunction)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_RuleUpdateASMFunction_type") :
+      getString("_UI_RuleUpdateASMFunction_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(RuleUpdateASMFunction.class))
+    {
+      case SimpleRulesPackage.RULE_UPDATE_ASM_FUNCTION__LOCATIONS:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == SimpleRulesPackage.Literals.RULE_UPDATE__VALUE ||
+      childFeature == SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION__LOCATIONS;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/RuleUpdateItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/RuleUpdateItemProvider.java
new file mode 100644
index 0000000..6dad084
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/RuleUpdateItemProvider.java
@@ -0,0 +1,352 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdate;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdate} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RuleUpdateItemProvider
+  extends ASMRuleInvocationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RuleUpdateItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(SimpleRulesPackage.Literals.RULE_UPDATE__VALUE);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((RuleUpdate)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_RuleUpdate_type") :
+      getString("_UI_RuleUpdate_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(RuleUpdate.class))
+    {
+      case SimpleRulesPackage.RULE_UPDATE__VALUE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/RuleUpdateVariableItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/RuleUpdateVariableItemProvider.java
new file mode 100644
index 0000000..ad01331
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/RuleUpdateVariableItemProvider.java
@@ -0,0 +1,210 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateVariable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateVariable} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RuleUpdateVariableItemProvider
+  extends RuleUpdateItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RuleUpdateVariableItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(SimpleRulesPackage.Literals.RULE_UPDATE_VARIABLE__VARIABLE);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns RuleUpdateVariable.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/RuleUpdateVariable"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((RuleUpdateVariable)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_RuleUpdateVariable_type") :
+      getString("_UI_RuleUpdateVariable_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(RuleUpdateVariable.class))
+    {
+      case SimpleRulesPackage.RULE_UPDATE_VARIABLE__VARIABLE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (SimpleRulesPackage.Literals.RULE_UPDATE_VARIABLE__VARIABLE,
+         TermsFactory.eINSTANCE.createVariableReference()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == SimpleRulesPackage.Literals.RULE_UPDATE__VALUE ||
+      childFeature == SimpleRulesPackage.Literals.RULE_UPDATE_VARIABLE__VARIABLE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/SimpleRulesItemProviderAdapterFactory.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/SimpleRulesItemProviderAdapterFactory.java
new file mode 100644
index 0000000..43c0759
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/SimpleRulesItemProviderAdapterFactory.java
@@ -0,0 +1,491 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.util.SimpleRulesAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SimpleRulesItemProviderAdapterFactory extends SimpleRulesAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This keeps track of the root adapter factory that delegates to this adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ComposedAdapterFactory parentAdapterFactory;
+
+  /**
+   * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+  /**
+   * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+  /**
+   * This constructs an instance.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SimpleRulesItemProviderAdapterFactory()
+  {
+    supportedTypes.add(IEditingDomainItemProvider.class);
+    supportedTypes.add(IStructuredItemContentProvider.class);
+    supportedTypes.add(ITreeItemContentProvider.class);
+    supportedTypes.add(IItemLabelProvider.class);
+    supportedTypes.add(IItemPropertySource.class);
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ConditionalRuleTryItemProvider conditionalRuleTryItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createConditionalRuleTryAdapter()
+  {
+    if (conditionalRuleTryItemProvider == null)
+    {
+      conditionalRuleTryItemProvider = new ConditionalRuleTryItemProvider(this);
+    }
+
+    return conditionalRuleTryItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ConditionalRuleIfItemProvider conditionalRuleIfItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createConditionalRuleIfAdapter()
+  {
+    if (conditionalRuleIfItemProvider == null)
+    {
+      conditionalRuleIfItemProvider = new ConditionalRuleIfItemProvider(this);
+    }
+
+    return conditionalRuleIfItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected CallRuleItemProvider callRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createCallRuleAdapter()
+  {
+    if (callRuleItemProvider == null)
+    {
+      callRuleItemProvider = new CallRuleItemProvider(this);
+    }
+
+    return callRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateVariable} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RuleUpdateVariableItemProvider ruleUpdateVariableItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateVariable}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createRuleUpdateVariableAdapter()
+  {
+    if (ruleUpdateVariableItemProvider == null)
+    {
+      ruleUpdateVariableItemProvider = new RuleUpdateVariableItemProvider(this);
+    }
+
+    return ruleUpdateVariableItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected GTRuleInvocationItemProvider gtRuleInvocationItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createGTRuleInvocationAdapter()
+  {
+    if (gtRuleInvocationItemProvider == null)
+    {
+      gtRuleInvocationItemProvider = new GTRuleInvocationItemProvider(this);
+    }
+
+    return gtRuleInvocationItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RuleUpdateASMFunctionItemProvider ruleUpdateASMFunctionItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createRuleUpdateASMFunctionAdapter()
+  {
+    if (ruleUpdateASMFunctionItemProvider == null)
+    {
+      ruleUpdateASMFunctionItemProvider = new RuleUpdateASMFunctionItemProvider(this);
+    }
+
+    return ruleUpdateASMFunctionItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.FailRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected FailRuleItemProvider failRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.FailRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createFailRuleAdapter()
+  {
+    if (failRuleItemProvider == null)
+    {
+      failRuleItemProvider = new FailRuleItemProvider(this);
+    }
+
+    return failRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected LogRuleItemProvider logRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createLogRuleAdapter()
+  {
+    if (logRuleItemProvider == null)
+    {
+      logRuleItemProvider = new LogRuleItemProvider(this);
+    }
+
+    return logRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected PrintRuleItemProvider printRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createPrintRuleAdapter()
+  {
+    if (printRuleItemProvider == null)
+    {
+      printRuleItemProvider = new PrintRuleItemProvider(this);
+    }
+
+    return printRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SkipRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SkipRuleItemProvider skipRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SkipRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createSkipRuleAdapter()
+  {
+    if (skipRuleItemProvider == null)
+    {
+      skipRuleItemProvider = new SkipRuleItemProvider(this);
+    }
+
+    return skipRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected PrintLnRuleItemProvider printLnRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createPrintLnRuleAdapter()
+  {
+    if (printLnRuleItemProvider == null)
+    {
+      printLnRuleItemProvider = new PrintLnRuleItemProvider(this);
+    }
+
+    return printLnRuleItemProvider;
+  }
+
+  /**
+   * This returns the root adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ComposeableAdapterFactory getRootAdapterFactory()
+  {
+    return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+  }
+
+  /**
+   * This sets the composed adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
+  {
+    this.parentAdapterFactory = parentAdapterFactory;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object type)
+  {
+    return supportedTypes.contains(type) || super.isFactoryForType(type);
+  }
+
+  /**
+   * This implementation substitutes the factory itself as the key for the adapter.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter adapt(Notifier notifier, Object type)
+  {
+    return super.adapt(notifier, this);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object adapt(Object object, Object type)
+  {
+    if (isFactoryForType(type))
+    {
+      Object adapter = super.adapt(object, type);
+      if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter)))
+      {
+        return adapter;
+      }
+    }
+
+    return null;
+  }
+
+  /**
+   * This adds a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void addListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.addListener(notifyChangedListener);
+  }
+
+  /**
+   * This removes a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void removeListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.removeListener(notifyChangedListener);
+  }
+
+  /**
+   * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void fireNotifyChanged(Notification notification)
+  {
+    changeNotifier.fireNotifyChanged(notification);
+
+    if (parentAdapterFactory != null)
+    {
+      parentAdapterFactory.fireNotifyChanged(notification);
+    }
+  }
+
+  /**
+   * This disposes all of the item providers created by this factory. 
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void dispose()
+  {
+    if (conditionalRuleTryItemProvider != null) conditionalRuleTryItemProvider.dispose();
+    if (conditionalRuleIfItemProvider != null) conditionalRuleIfItemProvider.dispose();
+    if (callRuleItemProvider != null) callRuleItemProvider.dispose();
+    if (ruleUpdateVariableItemProvider != null) ruleUpdateVariableItemProvider.dispose();
+    if (gtRuleInvocationItemProvider != null) gtRuleInvocationItemProvider.dispose();
+    if (ruleUpdateASMFunctionItemProvider != null) ruleUpdateASMFunctionItemProvider.dispose();
+    if (failRuleItemProvider != null) failRuleItemProvider.dispose();
+    if (logRuleItemProvider != null) logRuleItemProvider.dispose();
+    if (printRuleItemProvider != null) printRuleItemProvider.dispose();
+    if (skipRuleItemProvider != null) skipRuleItemProvider.dispose();
+    if (printLnRuleItemProvider != null) printLnRuleItemProvider.dispose();
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/SkipRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/SkipRuleItemProvider.java
new file mode 100644
index 0000000..1b4816f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/provider/SkipRuleItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SkipRule;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SkipRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SkipRuleItemProvider
+  extends ASMRuleInvocationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SkipRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns SkipRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/SkipRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((SkipRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_SkipRule_type") :
+      getString("_UI_SkipRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/AndItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/AndItemProvider.java
new file mode 100644
index 0000000..85b743c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/AndItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.And;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.And} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AndItemProvider
+  extends RelationalOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public AndItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns And.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/And"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((And)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_And_type") :
+      getString("_UI_And_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ArithmeticOperationItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ArithmeticOperationItemProvider.java
new file mode 100644
index 0000000..7874abb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ArithmeticOperationItemProvider.java
@@ -0,0 +1,140 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ArithmeticOperation;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider.FunctionInvocationItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ArithmeticOperation} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ArithmeticOperationItemProvider
+  extends FunctionInvocationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ArithmeticOperationItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ArithmeticOperation)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ArithmeticOperation_type") :
+      getString("_UI_ArithmeticOperation_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/BuiltInFunctionsItemProviderAdapterFactory.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/BuiltInFunctionsItemProviderAdapterFactory.java
new file mode 100644
index 0000000..085645d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/BuiltInFunctionsItemProviderAdapterFactory.java
@@ -0,0 +1,751 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.util.BuiltInFunctionsAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class BuiltInFunctionsItemProviderAdapterFactory extends BuiltInFunctionsAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This keeps track of the root adapter factory that delegates to this adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ComposedAdapterFactory parentAdapterFactory;
+
+  /**
+   * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+  /**
+   * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+  /**
+   * This constructs an instance.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public BuiltInFunctionsItemProviderAdapterFactory()
+  {
+    supportedTypes.add(IEditingDomainItemProvider.class);
+    supportedTypes.add(IStructuredItemContentProvider.class);
+    supportedTypes.add(ITreeItemContentProvider.class);
+    supportedTypes.add(IItemLabelProvider.class);
+    supportedTypes.add(IItemPropertySource.class);
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Remainder} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RemainderItemProvider remainderItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Remainder}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createRemainderAdapter()
+  {
+    if (remainderItemProvider == null)
+    {
+      remainderItemProvider = new RemainderItemProvider(this);
+    }
+
+    return remainderItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Multiply} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected MultiplyItemProvider multiplyItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Multiply}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createMultiplyAdapter()
+  {
+    if (multiplyItemProvider == null)
+    {
+      multiplyItemProvider = new MultiplyItemProvider(this);
+    }
+
+    return multiplyItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Plus} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected PlusItemProvider plusItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Plus}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createPlusAdapter()
+  {
+    if (plusItemProvider == null)
+    {
+      plusItemProvider = new PlusItemProvider(this);
+    }
+
+    return plusItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Minus} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected MinusItemProvider minusItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Minus}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createMinusAdapter()
+  {
+    if (minusItemProvider == null)
+    {
+      minusItemProvider = new MinusItemProvider(this);
+    }
+
+    return minusItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Division} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected DivisionItemProvider divisionItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Division}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createDivisionAdapter()
+  {
+    if (divisionItemProvider == null)
+    {
+      divisionItemProvider = new DivisionItemProvider(this);
+    }
+
+    return divisionItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.And} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected AndItemProvider andItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.And}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createAndAdapter()
+  {
+    if (andItemProvider == null)
+    {
+      andItemProvider = new AndItemProvider(this);
+    }
+
+    return andItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Equals} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected EqualsItemProvider equalsItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Equals}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createEqualsAdapter()
+  {
+    if (equalsItemProvider == null)
+    {
+      equalsItemProvider = new EqualsItemProvider(this);
+    }
+
+    return equalsItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThan} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected GreaterThanItemProvider greaterThanItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThan}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createGreaterThanAdapter()
+  {
+    if (greaterThanItemProvider == null)
+    {
+      greaterThanItemProvider = new GreaterThanItemProvider(this);
+    }
+
+    return greaterThanItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThanOrEqualTo} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected GreaterThanOrEqualToItemProvider greaterThanOrEqualToItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThanOrEqualTo}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createGreaterThanOrEqualToAdapter()
+  {
+    if (greaterThanOrEqualToItemProvider == null)
+    {
+      greaterThanOrEqualToItemProvider = new GreaterThanOrEqualToItemProvider(this);
+    }
+
+    return greaterThanOrEqualToItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThan} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected LessThanItemProvider lessThanItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThan}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createLessThanAdapter()
+  {
+    if (lessThanItemProvider == null)
+    {
+      lessThanItemProvider = new LessThanItemProvider(this);
+    }
+
+    return lessThanItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThanOrEqualTo} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected LessThanOrEqualToItemProvider lessThanOrEqualToItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThanOrEqualTo}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createLessThanOrEqualToAdapter()
+  {
+    if (lessThanOrEqualToItemProvider == null)
+    {
+      lessThanOrEqualToItemProvider = new LessThanOrEqualToItemProvider(this);
+    }
+
+    return lessThanOrEqualToItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Not} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected NotItemProvider notItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Not}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createNotAdapter()
+  {
+    if (notItemProvider == null)
+    {
+      notItemProvider = new NotItemProvider(this);
+    }
+
+    return notItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.NotEquals} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected NotEqualsItemProvider notEqualsItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.NotEquals}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createNotEqualsAdapter()
+  {
+    if (notEqualsItemProvider == null)
+    {
+      notEqualsItemProvider = new NotEqualsItemProvider(this);
+    }
+
+    return notEqualsItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Or} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected OrItemProvider orItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Or}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createOrAdapter()
+  {
+    if (orItemProvider == null)
+    {
+      orItemProvider = new OrItemProvider(this);
+    }
+
+    return orItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.XOr} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected XOrItemProvider xOrItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.XOr}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createXOrAdapter()
+  {
+    if (xOrItemProvider == null)
+    {
+      xOrItemProvider = new XOrItemProvider(this);
+    }
+
+    return xOrItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToString} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ToStringItemProvider toStringItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToString}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createToStringAdapter()
+  {
+    if (toStringItemProvider == null)
+    {
+      toStringItemProvider = new ToStringItemProvider(this);
+    }
+
+    return toStringItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToInt} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ToIntItemProvider toIntItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToInt}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createToIntAdapter()
+  {
+    if (toIntItemProvider == null)
+    {
+      toIntItemProvider = new ToIntItemProvider(this);
+    }
+
+    return toIntItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToBoolean} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ToBooleanItemProvider toBooleanItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToBoolean}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createToBooleanAdapter()
+  {
+    if (toBooleanItemProvider == null)
+    {
+      toBooleanItemProvider = new ToBooleanItemProvider(this);
+    }
+
+    return toBooleanItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToDouble} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ToDoubleItemProvider toDoubleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToDouble}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createToDoubleAdapter()
+  {
+    if (toDoubleItemProvider == null)
+    {
+      toDoubleItemProvider = new ToDoubleItemProvider(this);
+    }
+
+    return toDoubleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToModelElement} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ToModelElementItemProvider toModelElementItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToModelElement}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createToModelElementAdapter()
+  {
+    if (toModelElementItemProvider == null)
+    {
+      toModelElementItemProvider = new ToModelElementItemProvider(this);
+    }
+
+    return toModelElementItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToMultiplicity} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ToMultiplicityItemProvider toMultiplicityItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToMultiplicity}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createToMultiplicityAdapter()
+  {
+    if (toMultiplicityItemProvider == null)
+    {
+      toMultiplicityItemProvider = new ToMultiplicityItemProvider(this);
+    }
+
+    return toMultiplicityItemProvider;
+  }
+
+  /**
+   * This returns the root adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ComposeableAdapterFactory getRootAdapterFactory()
+  {
+    return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+  }
+
+  /**
+   * This sets the composed adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
+  {
+    this.parentAdapterFactory = parentAdapterFactory;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object type)
+  {
+    return supportedTypes.contains(type) || super.isFactoryForType(type);
+  }
+
+  /**
+   * This implementation substitutes the factory itself as the key for the adapter.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter adapt(Notifier notifier, Object type)
+  {
+    return super.adapt(notifier, this);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object adapt(Object object, Object type)
+  {
+    if (isFactoryForType(type))
+    {
+      Object adapter = super.adapt(object, type);
+      if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter)))
+      {
+        return adapter;
+      }
+    }
+
+    return null;
+  }
+
+  /**
+   * This adds a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void addListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.addListener(notifyChangedListener);
+  }
+
+  /**
+   * This removes a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void removeListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.removeListener(notifyChangedListener);
+  }
+
+  /**
+   * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void fireNotifyChanged(Notification notification)
+  {
+    changeNotifier.fireNotifyChanged(notification);
+
+    if (parentAdapterFactory != null)
+    {
+      parentAdapterFactory.fireNotifyChanged(notification);
+    }
+  }
+
+  /**
+   * This disposes all of the item providers created by this factory. 
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void dispose()
+  {
+    if (remainderItemProvider != null) remainderItemProvider.dispose();
+    if (multiplyItemProvider != null) multiplyItemProvider.dispose();
+    if (plusItemProvider != null) plusItemProvider.dispose();
+    if (minusItemProvider != null) minusItemProvider.dispose();
+    if (divisionItemProvider != null) divisionItemProvider.dispose();
+    if (andItemProvider != null) andItemProvider.dispose();
+    if (equalsItemProvider != null) equalsItemProvider.dispose();
+    if (greaterThanItemProvider != null) greaterThanItemProvider.dispose();
+    if (greaterThanOrEqualToItemProvider != null) greaterThanOrEqualToItemProvider.dispose();
+    if (lessThanItemProvider != null) lessThanItemProvider.dispose();
+    if (lessThanOrEqualToItemProvider != null) lessThanOrEqualToItemProvider.dispose();
+    if (notItemProvider != null) notItemProvider.dispose();
+    if (notEqualsItemProvider != null) notEqualsItemProvider.dispose();
+    if (orItemProvider != null) orItemProvider.dispose();
+    if (xOrItemProvider != null) xOrItemProvider.dispose();
+    if (toStringItemProvider != null) toStringItemProvider.dispose();
+    if (toIntItemProvider != null) toIntItemProvider.dispose();
+    if (toBooleanItemProvider != null) toBooleanItemProvider.dispose();
+    if (toDoubleItemProvider != null) toDoubleItemProvider.dispose();
+    if (toModelElementItemProvider != null) toModelElementItemProvider.dispose();
+    if (toMultiplicityItemProvider != null) toMultiplicityItemProvider.dispose();
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ConversionOperationItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ConversionOperationItemProvider.java
new file mode 100644
index 0000000..a9649a2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ConversionOperationItemProvider.java
@@ -0,0 +1,140 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ConversionOperation;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider.FunctionInvocationItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ConversionOperation} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ConversionOperationItemProvider
+  extends FunctionInvocationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ConversionOperationItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ConversionOperation)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ConversionOperation_type") :
+      getString("_UI_ConversionOperation_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/DivisionItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/DivisionItemProvider.java
new file mode 100644
index 0000000..56ef458
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/DivisionItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Division;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Division} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DivisionItemProvider
+  extends ArithmeticOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DivisionItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns Division.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Division"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Division)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Division_type") :
+      getString("_UI_Division_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/EqualsItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/EqualsItemProvider.java
new file mode 100644
index 0000000..c45fb64
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/EqualsItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Equals;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Equals} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class EqualsItemProvider
+  extends RelationalOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EqualsItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns Equals.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Equals"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Equals)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Equals_type") :
+      getString("_UI_Equals_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/GreaterThanItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/GreaterThanItemProvider.java
new file mode 100644
index 0000000..c427b88
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/GreaterThanItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThan;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThan} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GreaterThanItemProvider
+  extends RelationalOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GreaterThanItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns GreaterThan.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/GreaterThan"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((GreaterThan)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_GreaterThan_type") :
+      getString("_UI_GreaterThan_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/GreaterThanOrEqualToItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/GreaterThanOrEqualToItemProvider.java
new file mode 100644
index 0000000..a8adbb7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/GreaterThanOrEqualToItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThanOrEqualTo;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThanOrEqualTo} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GreaterThanOrEqualToItemProvider
+  extends RelationalOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GreaterThanOrEqualToItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns GreaterThanOrEqualTo.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/GreaterThanOrEqualTo"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((GreaterThanOrEqualTo)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_GreaterThanOrEqualTo_type") :
+      getString("_UI_GreaterThanOrEqualTo_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/LessThanItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/LessThanItemProvider.java
new file mode 100644
index 0000000..2043eec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/LessThanItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThan;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThan} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class LessThanItemProvider
+  extends RelationalOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public LessThanItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns LessThan.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/LessThan"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((LessThan)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_LessThan_type") :
+      getString("_UI_LessThan_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/LessThanOrEqualToItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/LessThanOrEqualToItemProvider.java
new file mode 100644
index 0000000..1423d43
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/LessThanOrEqualToItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThanOrEqualTo;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThanOrEqualTo} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class LessThanOrEqualToItemProvider
+  extends RelationalOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public LessThanOrEqualToItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns LessThanOrEqualTo.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/LessThanOrEqualTo"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((LessThanOrEqualTo)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_LessThanOrEqualTo_type") :
+      getString("_UI_LessThanOrEqualTo_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/MinusItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/MinusItemProvider.java
new file mode 100644
index 0000000..a2653b7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/MinusItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Minus;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Minus} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class MinusItemProvider
+  extends ArithmeticOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public MinusItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns Minus.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Minus"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Minus)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Minus_type") :
+      getString("_UI_Minus_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/MultiplyItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/MultiplyItemProvider.java
new file mode 100644
index 0000000..024016c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/MultiplyItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Multiply;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Multiply} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class MultiplyItemProvider
+  extends ArithmeticOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public MultiplyItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns Multiply.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Multiply"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Multiply)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Multiply_type") :
+      getString("_UI_Multiply_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/NotEqualsItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/NotEqualsItemProvider.java
new file mode 100644
index 0000000..56dc50a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/NotEqualsItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.NotEquals;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.NotEquals} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NotEqualsItemProvider
+  extends RelationalOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotEqualsItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns NotEquals.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/NotEquals"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((NotEquals)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_NotEquals_type") :
+      getString("_UI_NotEquals_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/NotItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/NotItemProvider.java
new file mode 100644
index 0000000..c258f0b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/NotItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Not;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Not} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NotItemProvider
+  extends RelationalOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns Not.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Not"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Not)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Not_type") :
+      getString("_UI_Not_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/OrItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/OrItemProvider.java
new file mode 100644
index 0000000..d538c48
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/OrItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Or;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Or} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class OrItemProvider
+  extends RelationalOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public OrItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns Or.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Or"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Or)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Or_type") :
+      getString("_UI_Or_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/PlusItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/PlusItemProvider.java
new file mode 100644
index 0000000..13cfa2f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/PlusItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Plus;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Plus} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PlusItemProvider
+  extends ArithmeticOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public PlusItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns Plus.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Plus"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Plus)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Plus_type") :
+      getString("_UI_Plus_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/RelationalOperationItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/RelationalOperationItemProvider.java
new file mode 100644
index 0000000..45c75ff
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/RelationalOperationItemProvider.java
@@ -0,0 +1,140 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.RelationalOperation;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider.FunctionInvocationItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.RelationalOperation} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RelationalOperationItemProvider
+  extends FunctionInvocationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RelationalOperationItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((RelationalOperation)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_RelationalOperation_type") :
+      getString("_UI_RelationalOperation_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/RemainderItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/RemainderItemProvider.java
new file mode 100644
index 0000000..1141082
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/RemainderItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Remainder;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Remainder} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RemainderItemProvider
+  extends ArithmeticOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RemainderItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns Remainder.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Remainder"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Remainder)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Remainder_type") :
+      getString("_UI_Remainder_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ToBooleanItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ToBooleanItemProvider.java
new file mode 100644
index 0000000..671897d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ToBooleanItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToBoolean;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToBoolean} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ToBooleanItemProvider
+  extends ConversionOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ToBooleanItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns ToBoolean.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ToBoolean"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ToBoolean)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ToBoolean_type") :
+      getString("_UI_ToBoolean_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ToDoubleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ToDoubleItemProvider.java
new file mode 100644
index 0000000..a769f7b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ToDoubleItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToDouble;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToDouble} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ToDoubleItemProvider
+  extends ConversionOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ToDoubleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns ToDouble.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ToDouble"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ToDouble)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ToDouble_type") :
+      getString("_UI_ToDouble_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ToIntItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ToIntItemProvider.java
new file mode 100644
index 0000000..f4b0baf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ToIntItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToInt;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToInt} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ToIntItemProvider
+  extends ConversionOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ToIntItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns ToInt.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ToInt"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ToInt)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ToInt_type") :
+      getString("_UI_ToInt_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ToModelElementItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ToModelElementItemProvider.java
new file mode 100644
index 0000000..74e4b80
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ToModelElementItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToModelElement;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToModelElement} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ToModelElementItemProvider
+  extends ConversionOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ToModelElementItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns ToModelElement.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ToModelElement"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ToModelElement)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ToModelElement_type") :
+      getString("_UI_ToModelElement_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ToMultiplicityItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ToMultiplicityItemProvider.java
new file mode 100644
index 0000000..9cc4a18
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ToMultiplicityItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToMultiplicity;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToMultiplicity} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ToMultiplicityItemProvider
+  extends ConversionOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ToMultiplicityItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns ToMultiplicity.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ToMultiplicity"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ToMultiplicity)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ToMultiplicity_type") :
+      getString("_UI_ToMultiplicity_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ToStringItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ToStringItemProvider.java
new file mode 100644
index 0000000..5ebe56e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/ToStringItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToString;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToString} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ToStringItemProvider
+  extends ConversionOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ToStringItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns ToString.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ToString"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ToString)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ToString_type") :
+      getString("_UI_ToString_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/XOrItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/XOrItemProvider.java
new file mode 100644
index 0000000..3e5a46d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/provider/XOrItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.XOr;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.XOr} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class XOrItemProvider
+  extends RelationalOperationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public XOrItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns XOr.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/XOr"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((XOr)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_XOr_type") :
+      getString("_UI_XOr_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/ASMFunctionInvocationItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/ASMFunctionInvocationItemProvider.java
new file mode 100644
index 0000000..aac18b8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/ASMFunctionInvocationItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ASMFunctionInvocationItemProvider
+  extends FunctionInvocationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ASMFunctionInvocationItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addCalledFunctionPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Called Function feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addCalledFunctionPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_ASMFunctionInvocation_calledFunction_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_ASMFunctionInvocation_calledFunction_feature", "_UI_ASMFunctionInvocation_type"),
+         TermsPackage.Literals.ASM_FUNCTION_INVOCATION__CALLED_FUNCTION,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This returns ASMFunctionInvocation.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ASMFunctionInvocation"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ASMFunctionInvocation)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ASMFunctionInvocation_type") :
+      getString("_UI_ASMFunctionInvocation_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/ConstantItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/ConstantItemProvider.java
new file mode 100644
index 0000000..ef8fcae
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/ConstantItemProvider.java
@@ -0,0 +1,169 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ConstantItemProvider
+  extends TermItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ConstantItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addValuePropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Value feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addValuePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_Constant_value_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_Constant_value_feature", "_UI_Constant_type"),
+         TermsPackage.Literals.CONSTANT__VALUE,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This returns Constant.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Constant"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Constant)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Constant_type") :
+      getString("_UI_Constant_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(Constant.class))
+    {
+      case TermsPackage.CONSTANT__VALUE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/FunctionInvocationItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/FunctionInvocationItemProvider.java
new file mode 100644
index 0000000..ac3c0d2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/FunctionInvocationItemProvider.java
@@ -0,0 +1,351 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class FunctionInvocationItemProvider
+  extends TermItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public FunctionInvocationItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((FunctionInvocation)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_FunctionInvocation_type") :
+      getString("_UI_FunctionInvocation_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(FunctionInvocation.class))
+    {
+      case TermsPackage.FUNCTION_INVOCATION__ACTUAL_PARAMETERS:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.FUNCTION_INVOCATION__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/GTPatternCallItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/GTPatternCallItemProvider.java
new file mode 100644
index 0000000..454506c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/GTPatternCallItemProvider.java
@@ -0,0 +1,397 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GTPatternCallItemProvider
+  extends TermItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTPatternCallItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addCalledPatternPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Called Pattern feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addCalledPatternPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_GTPatternCall_calledPattern_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_GTPatternCall_calledPattern_feature", "_UI_GTPatternCall_type"),
+         TermsPackage.Literals.GT_PATTERN_CALL__CALLED_PATTERN,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS);
+      childrenFeatures.add(TermsPackage.Literals.GT_PATTERN_CALL__MATCH_COUNTER);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns GTPatternCall.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/GTPatternCall"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((GTPatternCall)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_GTPatternCall_type") :
+      getString("_UI_GTPatternCall_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(GTPatternCall.class))
+    {
+      case TermsPackage.GT_PATTERN_CALL__ACTUAL_PARAMETERS:
+      case TermsPackage.GT_PATTERN_CALL__MATCH_COUNTER:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__ACTUAL_PARAMETERS,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.GT_PATTERN_CALL__MATCH_COUNTER,
+         GtFactory.eINSTANCE.createGTMatchCounter()));
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/ModelElementQueryItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/ModelElementQueryItemProvider.java
new file mode 100644
index 0000000..ddfea8b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/ModelElementQueryItemProvider.java
@@ -0,0 +1,363 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ModelElementQueryItemProvider
+  extends TermItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ModelElementQueryItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns ModelElementQuery.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ModelElementQuery"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ModelElementQuery)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ModelElementQuery_type") :
+      getString("_UI_ModelElementQuery_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(ModelElementQuery.class))
+    {
+      case TermsPackage.MODEL_ELEMENT_QUERY__ARGUMENT:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (TermsPackage.Literals.MODEL_ELEMENT_QUERY__ARGUMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/NativeFunctionInvocationItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/NativeFunctionInvocationItemProvider.java
new file mode 100644
index 0000000..814d7ac
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/NativeFunctionInvocationItemProvider.java
@@ -0,0 +1,169 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.NativeFunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.NativeFunctionInvocation} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NativeFunctionInvocationItemProvider
+  extends FunctionInvocationItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NativeFunctionInvocationItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addFunctionNamePropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Function Name feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addFunctionNamePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_NativeFunctionInvocation_functionName_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_NativeFunctionInvocation_functionName_feature", "_UI_NativeFunctionInvocation_type"),
+         TermsPackage.Literals.NATIVE_FUNCTION_INVOCATION__FUNCTION_NAME,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This returns NativeFunctionInvocation.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/NativeFunctionInvocation"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((NativeFunctionInvocation)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_NativeFunctionInvocation_type") :
+      getString("_UI_NativeFunctionInvocation_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(NativeFunctionInvocation.class))
+    {
+      case TermsPackage.NATIVE_FUNCTION_INVOCATION__FUNCTION_NAME:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/TermItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/TermItemProvider.java
new file mode 100644
index 0000000..51e7e8a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/TermItemProvider.java
@@ -0,0 +1,200 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.GTASMElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TermItemProvider
+  extends GTASMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public TermItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addKindPropertyDescriptor(object);
+      addTypePropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Kind feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addKindPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_Term_kind_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_Term_kind_feature", "_UI_Term_type"),
+         TermsPackage.Literals.TERM__KIND,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the Type feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addTypePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_Term_type_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_Term_type_feature", "_UI_Term_type"),
+         TermsPackage.Literals.TERM__TYPE,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Term)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Term_type") :
+      getString("_UI_Term_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(Term.class))
+    {
+      case TermsPackage.TERM__KIND:
+      case TermsPackage.TERM__TYPE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/TermsItemProviderAdapterFactory.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/TermsItemProviderAdapterFactory.java
new file mode 100644
index 0000000..f1036bb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/TermsItemProviderAdapterFactory.java
@@ -0,0 +1,361 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.util.TermsAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TermsItemProviderAdapterFactory extends TermsAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This keeps track of the root adapter factory that delegates to this adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ComposedAdapterFactory parentAdapterFactory;
+
+  /**
+   * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+  /**
+   * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+  /**
+   * This constructs an instance.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public TermsItemProviderAdapterFactory()
+  {
+    supportedTypes.add(IEditingDomainItemProvider.class);
+    supportedTypes.add(IStructuredItemContentProvider.class);
+    supportedTypes.add(ITreeItemContentProvider.class);
+    supportedTypes.add(IItemLabelProvider.class);
+    supportedTypes.add(IItemPropertySource.class);
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected VariableReferenceItemProvider variableReferenceItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createVariableReferenceAdapter()
+  {
+    if (variableReferenceItemProvider == null)
+    {
+      variableReferenceItemProvider = new VariableReferenceItemProvider(this);
+    }
+
+    return variableReferenceItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected GTPatternCallItemProvider gtPatternCallItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createGTPatternCallAdapter()
+  {
+    if (gtPatternCallItemProvider == null)
+    {
+      gtPatternCallItemProvider = new GTPatternCallItemProvider(this);
+    }
+
+    return gtPatternCallItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ASMFunctionInvocationItemProvider asmFunctionInvocationItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createASMFunctionInvocationAdapter()
+  {
+    if (asmFunctionInvocationItemProvider == null)
+    {
+      asmFunctionInvocationItemProvider = new ASMFunctionInvocationItemProvider(this);
+    }
+
+    return asmFunctionInvocationItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ConstantItemProvider constantItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createConstantAdapter()
+  {
+    if (constantItemProvider == null)
+    {
+      constantItemProvider = new ConstantItemProvider(this);
+    }
+
+    return constantItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.NativeFunctionInvocation} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected NativeFunctionInvocationItemProvider nativeFunctionInvocationItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.NativeFunctionInvocation}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createNativeFunctionInvocationAdapter()
+  {
+    if (nativeFunctionInvocationItemProvider == null)
+    {
+      nativeFunctionInvocationItemProvider = new NativeFunctionInvocationItemProvider(this);
+    }
+
+    return nativeFunctionInvocationItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ModelElementQueryItemProvider modelElementQueryItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createModelElementQueryAdapter()
+  {
+    if (modelElementQueryItemProvider == null)
+    {
+      modelElementQueryItemProvider = new ModelElementQueryItemProvider(this);
+    }
+
+    return modelElementQueryItemProvider;
+  }
+
+  /**
+   * This returns the root adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ComposeableAdapterFactory getRootAdapterFactory()
+  {
+    return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+  }
+
+  /**
+   * This sets the composed adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
+  {
+    this.parentAdapterFactory = parentAdapterFactory;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object type)
+  {
+    return supportedTypes.contains(type) || super.isFactoryForType(type);
+  }
+
+  /**
+   * This implementation substitutes the factory itself as the key for the adapter.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter adapt(Notifier notifier, Object type)
+  {
+    return super.adapt(notifier, this);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object adapt(Object object, Object type)
+  {
+    if (isFactoryForType(type))
+    {
+      Object adapter = super.adapt(object, type);
+      if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter)))
+      {
+        return adapter;
+      }
+    }
+
+    return null;
+  }
+
+  /**
+   * This adds a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void addListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.addListener(notifyChangedListener);
+  }
+
+  /**
+   * This removes a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void removeListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.removeListener(notifyChangedListener);
+  }
+
+  /**
+   * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void fireNotifyChanged(Notification notification)
+  {
+    changeNotifier.fireNotifyChanged(notification);
+
+    if (parentAdapterFactory != null)
+    {
+      parentAdapterFactory.fireNotifyChanged(notification);
+    }
+  }
+
+  /**
+   * This disposes all of the item providers created by this factory. 
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void dispose()
+  {
+    if (variableReferenceItemProvider != null) variableReferenceItemProvider.dispose();
+    if (gtPatternCallItemProvider != null) gtPatternCallItemProvider.dispose();
+    if (asmFunctionInvocationItemProvider != null) asmFunctionInvocationItemProvider.dispose();
+    if (constantItemProvider != null) constantItemProvider.dispose();
+    if (nativeFunctionInvocationItemProvider != null) nativeFunctionInvocationItemProvider.dispose();
+    if (modelElementQueryItemProvider != null) modelElementQueryItemProvider.dispose();
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/VariableReferenceItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/VariableReferenceItemProvider.java
new file mode 100644
index 0000000..71d3380
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/provider/VariableReferenceItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VariableReferenceItemProvider
+  extends TermItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public VariableReferenceItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addVariablePropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Variable feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addVariablePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_VariableReference_variable_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_VariableReference_variable_feature", "_UI_VariableReference_type"),
+         TermsPackage.Literals.VARIABLE_REFERENCE__VARIABLE,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This returns VariableReference.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/VariableReference"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((VariableReference)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_VariableReference_type") :
+      getString("_UI_VariableReference_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/ContainmentConstraintItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/ContainmentConstraintItemProvider.java
new file mode 100644
index 0000000..527ee75
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/ContainmentConstraintItemProvider.java
@@ -0,0 +1,435 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.GTASMElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ContainmentConstraintItemProvider
+  extends GTASMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ContainmentConstraintItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addVariablePropertyDescriptor(object);
+      addModePropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Variable feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addVariablePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_ContainmentConstraint_variable_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_ContainmentConstraint_variable_feature", "_UI_ContainmentConstraint_type"),
+         GtPackage.Literals.CONTAINMENT_CONSTRAINT__VARIABLE,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the Mode feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addModePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_ContainmentConstraint_mode_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_ContainmentConstraint_mode_feature", "_UI_ContainmentConstraint_type"),
+         GtPackage.Literals.CONTAINMENT_CONSTRAINT__MODE,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns ContainmentConstraint.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ContainmentConstraint"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ContainmentConstraint)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ContainmentConstraint_type") :
+      getString("_UI_ContainmentConstraint_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(ContainmentConstraint.class))
+    {
+      case GtPackage.CONTAINMENT_CONSTRAINT__MODE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+      case GtPackage.CONTAINMENT_CONSTRAINT__PARENT:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.CONTAINMENT_CONSTRAINT__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/GTMatchCounterItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/GTMatchCounterItemProvider.java
new file mode 100644
index 0000000..a6054a2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/GTMatchCounterItemProvider.java
@@ -0,0 +1,203 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.GTASMElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GTMatchCounterItemProvider
+  extends GTASMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTMatchCounterItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(GtPackage.Literals.GT_MATCH_COUNTER__VARIABLE_REFERENCE);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns GTMatchCounter.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/GTMatchCounter"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((GTMatchCounter)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_GTMatchCounter_type") :
+      getString("_UI_GTMatchCounter_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(GTMatchCounter.class))
+    {
+      case GtPackage.GT_MATCH_COUNTER__VARIABLE_REFERENCE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_MATCH_COUNTER__VARIABLE_REFERENCE,
+         TermsFactory.eINSTANCE.createVariableReference()));
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/GTPatternBodyItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/GTPatternBodyItemProvider.java
new file mode 100644
index 0000000..2000390
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/GTPatternBodyItemProvider.java
@@ -0,0 +1,476 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GTPatternBodyItemProvider
+  extends PatternContainerItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTPatternBodyItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(GtPackage.Literals.GT_PATTERN_BODY__NEGATIVE_PATTERNS);
+      childrenFeatures.add(GtPackage.Literals.GT_PATTERN_BODY__LOCAL_VARIABLES);
+      childrenFeatures.add(GtPackage.Literals.GT_PATTERN_BODY__CALLED_PATTERNS);
+      childrenFeatures.add(GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS);
+      childrenFeatures.add(GtPackage.Literals.GT_PATTERN_BODY__PATTERN_GRAPH);
+      childrenFeatures.add(GtPackage.Literals.GT_PATTERN_BODY__CONTAINMENT_CONSTRAINTS);
+      childrenFeatures.add(GtPackage.Literals.GT_PATTERN_BODY__VARIABLE_ASSIGNMENTS);
+      childrenFeatures.add(GtPackage.Literals.GT_PATTERN_BODY__ELEMENT_WRAPPERS);
+      childrenFeatures.add(GtPackage.Literals.GT_PATTERN_BODY__DANGLING_RELATIONSHIPS);
+      childrenFeatures.add(GtPackage.Literals.GT_PATTERN_BODY__DANGLING_RELATIONS);
+      childrenFeatures.add(GtPackage.Literals.GT_PATTERN_BODY__NON_INJECTIVITY_CONSTRAINTS);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns GTPatternBody.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/GTPatternBody"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((GTPatternBody)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_GTPatternBody_type") :
+      getString("_UI_GTPatternBody_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(GTPatternBody.class))
+    {
+      case GtPackage.GT_PATTERN_BODY__NEGATIVE_PATTERNS:
+      case GtPackage.GT_PATTERN_BODY__LOCAL_VARIABLES:
+      case GtPackage.GT_PATTERN_BODY__CALLED_PATTERNS:
+      case GtPackage.GT_PATTERN_BODY__CHECK_EXPRESSIONS:
+      case GtPackage.GT_PATTERN_BODY__PATTERN_GRAPH:
+      case GtPackage.GT_PATTERN_BODY__CONTAINMENT_CONSTRAINTS:
+      case GtPackage.GT_PATTERN_BODY__VARIABLE_ASSIGNMENTS:
+      case GtPackage.GT_PATTERN_BODY__ELEMENT_WRAPPERS:
+      case GtPackage.GT_PATTERN_BODY__DANGLING_RELATIONSHIPS:
+      case GtPackage.GT_PATTERN_BODY__DANGLING_RELATIONS:
+      case GtPackage.GT_PATTERN_BODY__NON_INJECTIVITY_CONSTRAINTS:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__NEGATIVE_PATTERNS,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__LOCAL_VARIABLES,
+         GtFactory.eINSTANCE.createPatternVariable()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CALLED_PATTERNS,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__PATTERN_GRAPH,
+         EditmodelFactory.eINSTANCE.createEntity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__CONTAINMENT_CONSTRAINTS,
+         GtFactory.eINSTANCE.createContainmentConstraint()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__VARIABLE_ASSIGNMENTS,
+         GtFactory.eINSTANCE.createPatternVariableAssignment()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__ELEMENT_WRAPPERS,
+         EditmodelFactory.eINSTANCE.createEntity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__ELEMENT_WRAPPERS,
+         EditmodelFactory.eINSTANCE.createRelation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__DANGLING_RELATIONSHIPS,
+         EditmodelFactory.eINSTANCE.createTypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__DANGLING_RELATIONSHIPS,
+         EditmodelFactory.eINSTANCE.createSupertypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__DANGLING_RELATIONS,
+         EditmodelFactory.eINSTANCE.createRelation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN_BODY__NON_INJECTIVITY_CONSTRAINTS,
+         GtFactory.eINSTANCE.createNonInjectivityConstraint()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == GtPackage.Literals.GT_PATTERN_BODY__NEGATIVE_PATTERNS ||
+      childFeature == GtPackage.Literals.GT_PATTERN_BODY__CALLED_PATTERNS ||
+      childFeature == GtPackage.Literals.GT_PATTERN_BODY__CHECK_EXPRESSIONS ||
+      childFeature == GtPackage.Literals.GT_PATTERN_BODY__PATTERN_GRAPH ||
+      childFeature == GtPackage.Literals.GT_PATTERN_BODY__ELEMENT_WRAPPERS ||
+      childFeature == GtPackage.Literals.GT_PATTERN_BODY__DANGLING_RELATIONS;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/GTPatternItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/GTPatternItemProvider.java
new file mode 100644
index 0000000..56ef30a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/GTPatternItemProvider.java
@@ -0,0 +1,238 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.GTASMElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GTPatternItemProvider
+  extends GTASMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTPatternItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addDistinctMatchingPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Distinct Matching feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addDistinctMatchingPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_GTPattern_distinctMatching_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_GTPattern_distinctMatching_feature", "_UI_GTPattern_type"),
+         GtPackage.Literals.GT_PATTERN__DISTINCT_MATCHING,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(GtPackage.Literals.GT_PATTERN__SYM_PARAMETERS);
+      childrenFeatures.add(GtPackage.Literals.GT_PATTERN__PATTERN_BODIES);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns GTPattern.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/GTPattern"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((GTPattern)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_GTPattern_type") :
+      getString("_UI_GTPattern_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(GTPattern.class))
+    {
+      case GtPackage.GT_PATTERN__DISTINCT_MATCHING:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+      case GtPackage.GT_PATTERN__SYM_PARAMETERS:
+      case GtPackage.GT_PATTERN__PATTERN_BODIES:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN__SYM_PARAMETERS,
+         GtFactory.eINSTANCE.createPatternVariable()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_PATTERN__PATTERN_BODIES,
+         GtFactory.eINSTANCE.createGTPatternBody()));
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/GTRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/GTRuleItemProvider.java
new file mode 100644
index 0000000..791c346
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/GTRuleItemProvider.java
@@ -0,0 +1,438 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymoveFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdateFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GTRuleItemProvider
+  extends PatternContainerItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(GtPackage.Literals.GT_RULE__SYM_PARAMETERS);
+      childrenFeatures.add(GtPackage.Literals.GT_RULE__PRECONDITION);
+      childrenFeatures.add(GtPackage.Literals.GT_RULE__LOCAL_VARIABLES);
+      childrenFeatures.add(GtPackage.Literals.GT_RULE__ACTION);
+      childrenFeatures.add(GtPackage.Literals.GT_RULE__POSTCONDITION);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns GTRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/GTRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((GTRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_GTRule_type") :
+      getString("_UI_GTRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(GTRule.class))
+    {
+      case GtPackage.GT_RULE__SYM_PARAMETERS:
+      case GtPackage.GT_RULE__PRECONDITION:
+      case GtPackage.GT_RULE__LOCAL_VARIABLES:
+      case GtPackage.GT_RULE__ACTION:
+      case GtPackage.GT_RULE__POSTCONDITION:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__SYM_PARAMETERS,
+         DefinitionsFactory.eINSTANCE.createSymbolicRuleParameter()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__PRECONDITION,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__LOCAL_VARIABLES,
+         GtFactory.eINSTANCE.createPatternVariable()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__LOCAL_VARIABLES,
+         DefinitionsFactory.eINSTANCE.createVariable()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         DeletionFactory.eINSTANCE.createElementDeleteRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         DeletionFactory.eINSTANCE.createDeleteInstanceOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         DeletionFactory.eINSTANCE.createDeleteSupertypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         CreationFactory.eINSTANCE.createRelationCreateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         CreationFactory.eINSTANCE.createEntityCreateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         CreationFactory.eINSTANCE.createCreateSupertypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         CreationFactory.eINSTANCE.createCreateInstanceOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         CopymoveFactory.eINSTANCE.createMoveRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         CopymoveFactory.eINSTANCE.createModelCopyRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         UpdateFactory.eINSTANCE.createRenameRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         UpdateFactory.eINSTANCE.createSetValueRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         UpdateFactory.eINSTANCE.createSetRelationTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         UpdateFactory.eINSTANCE.createSetRelationFrom()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         UpdateFactory.eINSTANCE.createSetMultiplicityRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         UpdateFactory.eINSTANCE.createSetInverseRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         UpdateFactory.eINSTANCE.createSetAnyTargetRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         UpdateFactory.eINSTANCE.createSetAnySourceRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         UpdateFactory.eINSTANCE.createSetAggregationRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         SimpleRulesFactory.eINSTANCE.createConditionalRuleTry()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         SimpleRulesFactory.eINSTANCE.createConditionalRuleIf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         SimpleRulesFactory.eINSTANCE.createCallRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         SimpleRulesFactory.eINSTANCE.createRuleUpdateVariable()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         SimpleRulesFactory.eINSTANCE.createGTRuleInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         SimpleRulesFactory.eINSTANCE.createRuleUpdateASMFunction()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         SimpleRulesFactory.eINSTANCE.createFailRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         SimpleRulesFactory.eINSTANCE.createLogRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         SimpleRulesFactory.eINSTANCE.createPrintRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         SimpleRulesFactory.eINSTANCE.createSkipRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         SimpleRulesFactory.eINSTANCE.createPrintLnRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         CompoundRulesFactory.eINSTANCE.createSequentialRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         CompoundRulesFactory.eINSTANCE.createRandomRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         CompoundRulesFactory.eINSTANCE.createParallelRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         CompoundRulesFactory.eINSTANCE.createChooseRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         CompoundRulesFactory.eINSTANCE.createForallRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         CompoundRulesFactory.eINSTANCE.createIterateRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         CompoundRulesFactory.eINSTANCE.createLetRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__ACTION,
+         CompoundRulesFactory.eINSTANCE.createWhenRule()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.GT_RULE__POSTCONDITION,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == GtPackage.Literals.GT_RULE__PRECONDITION ||
+      childFeature == GtPackage.Literals.GT_RULE__POSTCONDITION;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/GtItemProviderAdapterFactory.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/GtItemProviderAdapterFactory.java
new file mode 100644
index 0000000..7c77eec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/GtItemProviderAdapterFactory.java
@@ -0,0 +1,413 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.util.GtAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GtItemProviderAdapterFactory extends GtAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This keeps track of the root adapter factory that delegates to this adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ComposedAdapterFactory parentAdapterFactory;
+
+  /**
+   * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+  /**
+   * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+  /**
+   * This constructs an instance.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GtItemProviderAdapterFactory()
+  {
+    supportedTypes.add(IEditingDomainItemProvider.class);
+    supportedTypes.add(IStructuredItemContentProvider.class);
+    supportedTypes.add(ITreeItemContentProvider.class);
+    supportedTypes.add(IItemLabelProvider.class);
+    supportedTypes.add(IItemPropertySource.class);
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected GTPatternBodyItemProvider gtPatternBodyItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createGTPatternBodyAdapter()
+  {
+    if (gtPatternBodyItemProvider == null)
+    {
+      gtPatternBodyItemProvider = new GTPatternBodyItemProvider(this);
+    }
+
+    return gtPatternBodyItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected GTPatternItemProvider gtPatternItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createGTPatternAdapter()
+  {
+    if (gtPatternItemProvider == null)
+    {
+      gtPatternItemProvider = new GTPatternItemProvider(this);
+    }
+
+    return gtPatternItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected PatternVariableItemProvider patternVariableItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createPatternVariableAdapter()
+  {
+    if (patternVariableItemProvider == null)
+    {
+      patternVariableItemProvider = new PatternVariableItemProvider(this);
+    }
+
+    return patternVariableItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableAssignment} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected PatternVariableAssignmentItemProvider patternVariableAssignmentItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableAssignment}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createPatternVariableAssignmentAdapter()
+  {
+    if (patternVariableAssignmentItemProvider == null)
+    {
+      patternVariableAssignmentItemProvider = new PatternVariableAssignmentItemProvider(this);
+    }
+
+    return patternVariableAssignmentItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected GTRuleItemProvider gtRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createGTRuleAdapter()
+  {
+    if (gtRuleItemProvider == null)
+    {
+      gtRuleItemProvider = new GTRuleItemProvider(this);
+    }
+
+    return gtRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ContainmentConstraintItemProvider containmentConstraintItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createContainmentConstraintAdapter()
+  {
+    if (containmentConstraintItemProvider == null)
+    {
+      containmentConstraintItemProvider = new ContainmentConstraintItemProvider(this);
+    }
+
+    return containmentConstraintItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected GTMatchCounterItemProvider gtMatchCounterItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createGTMatchCounterAdapter()
+  {
+    if (gtMatchCounterItemProvider == null)
+    {
+      gtMatchCounterItemProvider = new GTMatchCounterItemProvider(this);
+    }
+
+    return gtMatchCounterItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.NonInjectivityConstraint} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected NonInjectivityConstraintItemProvider nonInjectivityConstraintItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.NonInjectivityConstraint}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createNonInjectivityConstraintAdapter()
+  {
+    if (nonInjectivityConstraintItemProvider == null)
+    {
+      nonInjectivityConstraintItemProvider = new NonInjectivityConstraintItemProvider(this);
+    }
+
+    return nonInjectivityConstraintItemProvider;
+  }
+
+  /**
+   * This returns the root adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ComposeableAdapterFactory getRootAdapterFactory()
+  {
+    return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+  }
+
+  /**
+   * This sets the composed adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
+  {
+    this.parentAdapterFactory = parentAdapterFactory;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object type)
+  {
+    return supportedTypes.contains(type) || super.isFactoryForType(type);
+  }
+
+  /**
+   * This implementation substitutes the factory itself as the key for the adapter.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter adapt(Notifier notifier, Object type)
+  {
+    return super.adapt(notifier, this);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object adapt(Object object, Object type)
+  {
+    if (isFactoryForType(type))
+    {
+      Object adapter = super.adapt(object, type);
+      if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter)))
+      {
+        return adapter;
+      }
+    }
+
+    return null;
+  }
+
+  /**
+   * This adds a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void addListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.addListener(notifyChangedListener);
+  }
+
+  /**
+   * This removes a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void removeListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.removeListener(notifyChangedListener);
+  }
+
+  /**
+   * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void fireNotifyChanged(Notification notification)
+  {
+    changeNotifier.fireNotifyChanged(notification);
+
+    if (parentAdapterFactory != null)
+    {
+      parentAdapterFactory.fireNotifyChanged(notification);
+    }
+  }
+
+  /**
+   * This disposes all of the item providers created by this factory. 
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void dispose()
+  {
+    if (gtPatternBodyItemProvider != null) gtPatternBodyItemProvider.dispose();
+    if (gtPatternItemProvider != null) gtPatternItemProvider.dispose();
+    if (patternVariableItemProvider != null) patternVariableItemProvider.dispose();
+    if (patternVariableAssignmentItemProvider != null) patternVariableAssignmentItemProvider.dispose();
+    if (gtRuleItemProvider != null) gtRuleItemProvider.dispose();
+    if (containmentConstraintItemProvider != null) containmentConstraintItemProvider.dispose();
+    if (gtMatchCounterItemProvider != null) gtMatchCounterItemProvider.dispose();
+    if (nonInjectivityConstraintItemProvider != null) nonInjectivityConstraintItemProvider.dispose();
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/NonInjectivityConstraintItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/NonInjectivityConstraintItemProvider.java
new file mode 100644
index 0000000..b25d855
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/NonInjectivityConstraintItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.NonInjectivityConstraint;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.NonInjectivityConstraint} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NonInjectivityConstraintItemProvider
+  extends PatternVariableConstraintItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NonInjectivityConstraintItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns NonInjectivityConstraint.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/NonInjectivityConstraint"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((NonInjectivityConstraint)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_NonInjectivityConstraint_type") :
+      getString("_UI_NonInjectivityConstraint_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == GtPackage.Literals.PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE ||
+      childFeature == GtPackage.Literals.PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/PatternContainerItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/PatternContainerItemProvider.java
new file mode 100644
index 0000000..b45b3ba
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/PatternContainerItemProvider.java
@@ -0,0 +1,190 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.GTASMElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternContainer;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternContainer} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PatternContainerItemProvider
+  extends GTASMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public PatternContainerItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(GtPackage.Literals.PATTERN_CONTAINER__GT_PATTERN_DEFINITIONS);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((PatternContainer)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_PatternContainer_type") :
+      getString("_UI_PatternContainer_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(PatternContainer.class))
+    {
+      case GtPackage.PATTERN_CONTAINER__GT_PATTERN_DEFINITIONS:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.PATTERN_CONTAINER__GT_PATTERN_DEFINITIONS,
+         GtFactory.eINSTANCE.createGTPattern()));
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/PatternVariableAssignmentItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/PatternVariableAssignmentItemProvider.java
new file mode 100644
index 0000000..ef241af
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/PatternVariableAssignmentItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableAssignment;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableAssignment} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PatternVariableAssignmentItemProvider
+  extends PatternVariableConstraintItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public PatternVariableAssignmentItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns PatternVariableAssignment.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/PatternVariableAssignment"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((PatternVariableAssignment)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_PatternVariableAssignment_type") :
+      getString("_UI_PatternVariableAssignment_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == GtPackage.Literals.PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE ||
+      childFeature == GtPackage.Literals.PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/PatternVariableConstraintItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/PatternVariableConstraintItemProvider.java
new file mode 100644
index 0000000..27e5364
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/PatternVariableConstraintItemProvider.java
@@ -0,0 +1,223 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.GTASMElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableConstraint;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableConstraint} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PatternVariableConstraintItemProvider
+  extends GTASMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public PatternVariableConstraintItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(GtPackage.Literals.PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE);
+      childrenFeatures.add(GtPackage.Literals.PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((PatternVariableConstraint)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_PatternVariableConstraint_type") :
+      getString("_UI_PatternVariableConstraint_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(PatternVariableConstraint.class))
+    {
+      case GtPackage.PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE:
+      case GtPackage.PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (GtPackage.Literals.PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE,
+         TermsFactory.eINSTANCE.createVariableReference()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == GtPackage.Literals.PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE ||
+      childFeature == GtPackage.Literals.PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/PatternVariableItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/PatternVariableItemProvider.java
new file mode 100644
index 0000000..e7baf27
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/provider/PatternVariableItemProvider.java
@@ -0,0 +1,178 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.provider.VariableItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PatternVariableItemProvider
+  extends VariableItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public PatternVariableItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addElementInPatternPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Element In Pattern feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addElementInPatternPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_PatternVariable_elementInPattern_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_PatternVariable_elementInPattern_feature", "_UI_PatternVariable_type"),
+         GtPackage.Literals.PATTERN_VARIABLE__ELEMENT_IN_PATTERN,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This returns PatternVariable.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/PatternVariable"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((PatternVariable)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_PatternVariable_type") :
+      getString("_UI_PatternVariable_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/provider/CopymoveItemProviderAdapterFactory.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/provider/CopymoveItemProviderAdapterFactory.java
new file mode 100644
index 0000000..3b7ae8b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/provider/CopymoveItemProviderAdapterFactory.java
@@ -0,0 +1,257 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.util.CopymoveAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CopymoveItemProviderAdapterFactory extends CopymoveAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This keeps track of the root adapter factory that delegates to this adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ComposedAdapterFactory parentAdapterFactory;
+
+  /**
+   * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+  /**
+   * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+  /**
+   * This constructs an instance.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CopymoveItemProviderAdapterFactory()
+  {
+    supportedTypes.add(IEditingDomainItemProvider.class);
+    supportedTypes.add(IStructuredItemContentProvider.class);
+    supportedTypes.add(ITreeItemContentProvider.class);
+    supportedTypes.add(IItemLabelProvider.class);
+    supportedTypes.add(IItemPropertySource.class);
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected MoveRuleItemProvider moveRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createMoveRuleAdapter()
+  {
+    if (moveRuleItemProvider == null)
+    {
+      moveRuleItemProvider = new MoveRuleItemProvider(this);
+    }
+
+    return moveRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ModelCopyRuleItemProvider modelCopyRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createModelCopyRuleAdapter()
+  {
+    if (modelCopyRuleItemProvider == null)
+    {
+      modelCopyRuleItemProvider = new ModelCopyRuleItemProvider(this);
+    }
+
+    return modelCopyRuleItemProvider;
+  }
+
+  /**
+   * This returns the root adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ComposeableAdapterFactory getRootAdapterFactory()
+  {
+    return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+  }
+
+  /**
+   * This sets the composed adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
+  {
+    this.parentAdapterFactory = parentAdapterFactory;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object type)
+  {
+    return supportedTypes.contains(type) || super.isFactoryForType(type);
+  }
+
+  /**
+   * This implementation substitutes the factory itself as the key for the adapter.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter adapt(Notifier notifier, Object type)
+  {
+    return super.adapt(notifier, this);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object adapt(Object object, Object type)
+  {
+    if (isFactoryForType(type))
+    {
+      Object adapter = super.adapt(object, type);
+      if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter)))
+      {
+        return adapter;
+      }
+    }
+
+    return null;
+  }
+
+  /**
+   * This adds a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void addListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.addListener(notifyChangedListener);
+  }
+
+  /**
+   * This removes a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void removeListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.removeListener(notifyChangedListener);
+  }
+
+  /**
+   * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void fireNotifyChanged(Notification notification)
+  {
+    changeNotifier.fireNotifyChanged(notification);
+
+    if (parentAdapterFactory != null)
+    {
+      parentAdapterFactory.fireNotifyChanged(notification);
+    }
+  }
+
+  /**
+   * This disposes all of the item providers created by this factory. 
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void dispose()
+  {
+    if (moveRuleItemProvider != null) moveRuleItemProvider.dispose();
+    if (modelCopyRuleItemProvider != null) modelCopyRuleItemProvider.dispose();
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/provider/ModelCopyRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/provider/ModelCopyRuleItemProvider.java
new file mode 100644
index 0000000..cab7fbf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/provider/ModelCopyRuleItemProvider.java
@@ -0,0 +1,626 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider.ModelManipulationRuleItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ModelCopyRuleItemProvider
+  extends ModelManipulationRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ModelCopyRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addSemanticsPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Semantics feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addSemanticsPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_ModelCopyRule_semantics_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_ModelCopyRule_semantics_feature", "_UI_ModelCopyRule_type"),
+         CopymovePackage.Literals.MODEL_COPY_RULE__SEMANTICS,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(CopymovePackage.Literals.MODEL_COPY_RULE__TARGET_VARIABLE);
+      childrenFeatures.add(CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER);
+      childrenFeatures.add(CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns ModelCopyRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ModelCopyRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ModelCopyRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ModelCopyRule_type") :
+      getString("_UI_ModelCopyRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(ModelCopyRule.class))
+    {
+      case CopymovePackage.MODEL_COPY_RULE__SEMANTICS:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+      case CopymovePackage.MODEL_COPY_RULE__TARGET_VARIABLE:
+      case CopymovePackage.MODEL_COPY_RULE__TRG_CONTAINER:
+      case CopymovePackage.MODEL_COPY_RULE__SRC_ROOT:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TARGET_VARIABLE,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == CopymovePackage.Literals.MODEL_COPY_RULE__TARGET_VARIABLE ||
+      childFeature == CopymovePackage.Literals.MODEL_COPY_RULE__TRG_CONTAINER ||
+      childFeature == CopymovePackage.Literals.MODEL_COPY_RULE__SRC_ROOT;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/provider/MoveRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/provider/MoveRuleItemProvider.java
new file mode 100644
index 0000000..470910e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/provider/MoveRuleItemProvider.java
@@ -0,0 +1,589 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider.ModelManipulationRuleItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class MoveRuleItemProvider
+  extends ModelManipulationRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public MoveRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER);
+      childrenFeatures.add(CopymovePackage.Literals.MOVE_RULE__SRC_ROOT);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns MoveRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/MoveRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((MoveRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_MoveRule_type") :
+      getString("_UI_MoveRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(MoveRule.class))
+    {
+      case CopymovePackage.MOVE_RULE__TRG_CONTAINER:
+      case CopymovePackage.MOVE_RULE__SRC_ROOT:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CopymovePackage.Literals.MOVE_RULE__SRC_ROOT,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == CopymovePackage.Literals.MOVE_RULE__TRG_CONTAINER ||
+      childFeature == CopymovePackage.Literals.MOVE_RULE__SRC_ROOT;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/CreateInstanceOfItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/CreateInstanceOfItemProvider.java
new file mode 100644
index 0000000..21dea8d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/CreateInstanceOfItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateInstanceOf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateInstanceOf} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CreateInstanceOfItemProvider
+  extends RelationshipCreateRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CreateInstanceOfItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns CreateInstanceOf.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/CreateInstanceOf"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((CreateInstanceOf)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_CreateInstanceOf_type") :
+      getString("_UI_CreateInstanceOf_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER ||
+      childFeature == CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/CreateSupertypeOfItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/CreateSupertypeOfItemProvider.java
new file mode 100644
index 0000000..5b1a9e2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/CreateSupertypeOfItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateSupertypeOf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateSupertypeOf} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CreateSupertypeOfItemProvider
+  extends RelationshipCreateRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CreateSupertypeOfItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns CreateSupertypeOf.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/CreateSupertypeOf"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((CreateSupertypeOf)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_CreateSupertypeOf_type") :
+      getString("_UI_CreateSupertypeOf_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER ||
+      childFeature == CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/CreationItemProviderAdapterFactory.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/CreationItemProviderAdapterFactory.java
new file mode 100644
index 0000000..858de63
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/CreationItemProviderAdapterFactory.java
@@ -0,0 +1,309 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.util.CreationAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CreationItemProviderAdapterFactory extends CreationAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This keeps track of the root adapter factory that delegates to this adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ComposedAdapterFactory parentAdapterFactory;
+
+  /**
+   * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+  /**
+   * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+  /**
+   * This constructs an instance.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CreationItemProviderAdapterFactory()
+  {
+    supportedTypes.add(IEditingDomainItemProvider.class);
+    supportedTypes.add(IStructuredItemContentProvider.class);
+    supportedTypes.add(ITreeItemContentProvider.class);
+    supportedTypes.add(IItemLabelProvider.class);
+    supportedTypes.add(IItemPropertySource.class);
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RelationCreateRuleItemProvider relationCreateRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createRelationCreateRuleAdapter()
+  {
+    if (relationCreateRuleItemProvider == null)
+    {
+      relationCreateRuleItemProvider = new RelationCreateRuleItemProvider(this);
+    }
+
+    return relationCreateRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.EntityCreateRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected EntityCreateRuleItemProvider entityCreateRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.EntityCreateRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createEntityCreateRuleAdapter()
+  {
+    if (entityCreateRuleItemProvider == null)
+    {
+      entityCreateRuleItemProvider = new EntityCreateRuleItemProvider(this);
+    }
+
+    return entityCreateRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateSupertypeOf} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected CreateSupertypeOfItemProvider createSupertypeOfItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateSupertypeOf}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createCreateSupertypeOfAdapter()
+  {
+    if (createSupertypeOfItemProvider == null)
+    {
+      createSupertypeOfItemProvider = new CreateSupertypeOfItemProvider(this);
+    }
+
+    return createSupertypeOfItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateInstanceOf} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected CreateInstanceOfItemProvider createInstanceOfItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateInstanceOf}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createCreateInstanceOfAdapter()
+  {
+    if (createInstanceOfItemProvider == null)
+    {
+      createInstanceOfItemProvider = new CreateInstanceOfItemProvider(this);
+    }
+
+    return createInstanceOfItemProvider;
+  }
+
+  /**
+   * This returns the root adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ComposeableAdapterFactory getRootAdapterFactory()
+  {
+    return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+  }
+
+  /**
+   * This sets the composed adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
+  {
+    this.parentAdapterFactory = parentAdapterFactory;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object type)
+  {
+    return supportedTypes.contains(type) || super.isFactoryForType(type);
+  }
+
+  /**
+   * This implementation substitutes the factory itself as the key for the adapter.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter adapt(Notifier notifier, Object type)
+  {
+    return super.adapt(notifier, this);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object adapt(Object object, Object type)
+  {
+    if (isFactoryForType(type))
+    {
+      Object adapter = super.adapt(object, type);
+      if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter)))
+      {
+        return adapter;
+      }
+    }
+
+    return null;
+  }
+
+  /**
+   * This adds a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void addListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.addListener(notifyChangedListener);
+  }
+
+  /**
+   * This removes a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void removeListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.removeListener(notifyChangedListener);
+  }
+
+  /**
+   * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void fireNotifyChanged(Notification notification)
+  {
+    changeNotifier.fireNotifyChanged(notification);
+
+    if (parentAdapterFactory != null)
+    {
+      parentAdapterFactory.fireNotifyChanged(notification);
+    }
+  }
+
+  /**
+   * This disposes all of the item providers created by this factory. 
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void dispose()
+  {
+    if (relationCreateRuleItemProvider != null) relationCreateRuleItemProvider.dispose();
+    if (entityCreateRuleItemProvider != null) entityCreateRuleItemProvider.dispose();
+    if (createSupertypeOfItemProvider != null) createSupertypeOfItemProvider.dispose();
+    if (createInstanceOfItemProvider != null) createInstanceOfItemProvider.dispose();
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/ElementCreateRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/ElementCreateRuleItemProvider.java
new file mode 100644
index 0000000..f41fee9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/ElementCreateRuleItemProvider.java
@@ -0,0 +1,402 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider.ModelManipulationRuleItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.ElementCreateRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.ElementCreateRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ElementCreateRuleItemProvider
+  extends ModelManipulationRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ElementCreateRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE);
+      childrenFeatures.add(CreationPackage.Literals.ELEMENT_CREATE_RULE__TARGET_VARIABLE);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ElementCreateRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ElementCreateRule_type") :
+      getString("_UI_ElementCreateRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(ElementCreateRule.class))
+    {
+      case CreationPackage.ELEMENT_CREATE_RULE__TYPE:
+      case CreationPackage.ELEMENT_CREATE_RULE__TARGET_VARIABLE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ELEMENT_CREATE_RULE__TARGET_VARIABLE,
+         TermsFactory.eINSTANCE.createVariableReference()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE ||
+      childFeature == CreationPackage.Literals.ELEMENT_CREATE_RULE__TARGET_VARIABLE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/EntityCreateRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/EntityCreateRuleItemProvider.java
new file mode 100644
index 0000000..d7dcc08
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/EntityCreateRuleItemProvider.java
@@ -0,0 +1,390 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.EntityCreateRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.EntityCreateRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class EntityCreateRuleItemProvider
+  extends ElementCreateRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EntityCreateRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns EntityCreateRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/EntityCreateRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((EntityCreateRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_EntityCreateRule_type") :
+      getString("_UI_EntityCreateRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(EntityCreateRule.class))
+    {
+      case CreationPackage.ENTITY_CREATE_RULE__PARENT:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE ||
+      childFeature == CreationPackage.Literals.ENTITY_CREATE_RULE__PARENT ||
+      childFeature == CreationPackage.Literals.ELEMENT_CREATE_RULE__TARGET_VARIABLE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/RelationCreateRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/RelationCreateRuleItemProvider.java
new file mode 100644
index 0000000..63a5ff1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/RelationCreateRuleItemProvider.java
@@ -0,0 +1,573 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RelationCreateRuleItemProvider
+  extends ElementCreateRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RelationCreateRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(CreationPackage.Literals.RELATION_CREATE_RULE__TARGET);
+      childrenFeatures.add(CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns RelationCreateRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/RelationCreateRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((RelationCreateRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_RelationCreateRule_type") :
+      getString("_UI_RelationCreateRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(RelationCreateRule.class))
+    {
+      case CreationPackage.RELATION_CREATE_RULE__TARGET:
+      case CreationPackage.RELATION_CREATE_RULE__SOURCE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__TARGET,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == CreationPackage.Literals.ELEMENT_CREATE_RULE__TYPE ||
+      childFeature == CreationPackage.Literals.RELATION_CREATE_RULE__TARGET ||
+      childFeature == CreationPackage.Literals.RELATION_CREATE_RULE__SOURCE ||
+      childFeature == CreationPackage.Literals.ELEMENT_CREATE_RULE__TARGET_VARIABLE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/RelationshipCreateRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/RelationshipCreateRuleItemProvider.java
new file mode 100644
index 0000000..55648d8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/provider/RelationshipCreateRuleItemProvider.java
@@ -0,0 +1,577 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider.ModelManipulationRuleItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationshipCreateRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationshipCreateRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RelationshipCreateRuleItemProvider
+  extends ModelManipulationRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RelationshipCreateRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER);
+      childrenFeatures.add(CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((RelationshipCreateRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_RelationshipCreateRule_type") :
+      getString("_UI_RelationshipCreateRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(RelationshipCreateRule.class))
+    {
+      case CreationPackage.RELATIONSHIP_CREATE_RULE__SUPER:
+      case CreationPackage.RELATIONSHIP_CREATE_RULE__SUB:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUPER ||
+      childFeature == CreationPackage.Literals.RELATIONSHIP_CREATE_RULE__SUB;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/provider/DeleteInstanceOfItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/provider/DeleteInstanceOfItemProvider.java
new file mode 100644
index 0000000..7ee6339
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/provider/DeleteInstanceOfItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteInstanceOf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteInstanceOf} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DeleteInstanceOfItemProvider
+  extends RelationshipDeleteRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DeleteInstanceOfItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns DeleteInstanceOf.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/DeleteInstanceOf"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((DeleteInstanceOf)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_DeleteInstanceOf_type") :
+      getString("_UI_DeleteInstanceOf_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER ||
+      childFeature == DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/provider/DeleteSupertypeOfItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/provider/DeleteSupertypeOfItemProvider.java
new file mode 100644
index 0000000..bbd5d32
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/provider/DeleteSupertypeOfItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteSupertypeOf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteSupertypeOf} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DeleteSupertypeOfItemProvider
+  extends RelationshipDeleteRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DeleteSupertypeOfItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns DeleteSupertypeOf.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/DeleteSupertypeOf"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((DeleteSupertypeOf)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_DeleteSupertypeOf_type") :
+      getString("_UI_DeleteSupertypeOf_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER ||
+      childFeature == DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/provider/DeletionItemProviderAdapterFactory.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/provider/DeletionItemProviderAdapterFactory.java
new file mode 100644
index 0000000..c5fd778
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/provider/DeletionItemProviderAdapterFactory.java
@@ -0,0 +1,283 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.util.DeletionAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DeletionItemProviderAdapterFactory extends DeletionAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This keeps track of the root adapter factory that delegates to this adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ComposedAdapterFactory parentAdapterFactory;
+
+  /**
+   * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+  /**
+   * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+  /**
+   * This constructs an instance.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DeletionItemProviderAdapterFactory()
+  {
+    supportedTypes.add(IEditingDomainItemProvider.class);
+    supportedTypes.add(IStructuredItemContentProvider.class);
+    supportedTypes.add(ITreeItemContentProvider.class);
+    supportedTypes.add(IItemLabelProvider.class);
+    supportedTypes.add(IItemPropertySource.class);
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ElementDeleteRuleItemProvider elementDeleteRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createElementDeleteRuleAdapter()
+  {
+    if (elementDeleteRuleItemProvider == null)
+    {
+      elementDeleteRuleItemProvider = new ElementDeleteRuleItemProvider(this);
+    }
+
+    return elementDeleteRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteInstanceOf} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected DeleteInstanceOfItemProvider deleteInstanceOfItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteInstanceOf}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createDeleteInstanceOfAdapter()
+  {
+    if (deleteInstanceOfItemProvider == null)
+    {
+      deleteInstanceOfItemProvider = new DeleteInstanceOfItemProvider(this);
+    }
+
+    return deleteInstanceOfItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteSupertypeOf} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected DeleteSupertypeOfItemProvider deleteSupertypeOfItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteSupertypeOf}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createDeleteSupertypeOfAdapter()
+  {
+    if (deleteSupertypeOfItemProvider == null)
+    {
+      deleteSupertypeOfItemProvider = new DeleteSupertypeOfItemProvider(this);
+    }
+
+    return deleteSupertypeOfItemProvider;
+  }
+
+  /**
+   * This returns the root adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ComposeableAdapterFactory getRootAdapterFactory()
+  {
+    return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+  }
+
+  /**
+   * This sets the composed adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
+  {
+    this.parentAdapterFactory = parentAdapterFactory;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object type)
+  {
+    return supportedTypes.contains(type) || super.isFactoryForType(type);
+  }
+
+  /**
+   * This implementation substitutes the factory itself as the key for the adapter.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter adapt(Notifier notifier, Object type)
+  {
+    return super.adapt(notifier, this);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object adapt(Object object, Object type)
+  {
+    if (isFactoryForType(type))
+    {
+      Object adapter = super.adapt(object, type);
+      if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter)))
+      {
+        return adapter;
+      }
+    }
+
+    return null;
+  }
+
+  /**
+   * This adds a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void addListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.addListener(notifyChangedListener);
+  }
+
+  /**
+   * This removes a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void removeListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.removeListener(notifyChangedListener);
+  }
+
+  /**
+   * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void fireNotifyChanged(Notification notification)
+  {
+    changeNotifier.fireNotifyChanged(notification);
+
+    if (parentAdapterFactory != null)
+    {
+      parentAdapterFactory.fireNotifyChanged(notification);
+    }
+  }
+
+  /**
+   * This disposes all of the item providers created by this factory. 
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void dispose()
+  {
+    if (elementDeleteRuleItemProvider != null) elementDeleteRuleItemProvider.dispose();
+    if (deleteInstanceOfItemProvider != null) deleteInstanceOfItemProvider.dispose();
+    if (deleteSupertypeOfItemProvider != null) deleteSupertypeOfItemProvider.dispose();
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/provider/ElementDeleteRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/provider/ElementDeleteRuleItemProvider.java
new file mode 100644
index 0000000..16a3de2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/provider/ElementDeleteRuleItemProvider.java
@@ -0,0 +1,411 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider.ModelManipulationRuleItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ElementDeleteRuleItemProvider
+  extends ModelManipulationRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ElementDeleteRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addSemanticsPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Semantics feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addSemanticsPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_ElementDeleteRule_semantics_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_ElementDeleteRule_semantics_feature", "_UI_ElementDeleteRule_type"),
+         DeletionPackage.Literals.ELEMENT_DELETE_RULE__SEMANTICS,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns ElementDeleteRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ElementDeleteRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ElementDeleteRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ElementDeleteRule_type") :
+      getString("_UI_ElementDeleteRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(ElementDeleteRule.class))
+    {
+      case DeletionPackage.ELEMENT_DELETE_RULE__SEMANTICS:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+      case DeletionPackage.ELEMENT_DELETE_RULE__ELEMENT:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.ELEMENT_DELETE_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/provider/RelationshipDeleteRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/provider/RelationshipDeleteRuleItemProvider.java
new file mode 100644
index 0000000..62eaf93
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/provider/RelationshipDeleteRuleItemProvider.java
@@ -0,0 +1,577 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider.ModelManipulationRuleItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.RelationshipDeleteRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.RelationshipDeleteRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RelationshipDeleteRuleItemProvider
+  extends ModelManipulationRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RelationshipDeleteRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER);
+      childrenFeatures.add(DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((RelationshipDeleteRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_RelationshipDeleteRule_type") :
+      getString("_UI_RelationshipDeleteRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(RelationshipDeleteRule.class))
+    {
+      case DeletionPackage.RELATIONSHIP_DELETE_RULE__SUPER:
+      case DeletionPackage.RELATIONSHIP_DELETE_RULE__SUB:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUPER ||
+      childFeature == DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE__SUB;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/RenameRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/RenameRuleItemProvider.java
new file mode 100644
index 0000000..21336b6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/RenameRuleItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.RenameRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.RenameRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RenameRuleItemProvider
+  extends SetRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RenameRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns RenameRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/RenameRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((RenameRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_RenameRule_type") :
+      getString("_UI_RenameRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == UpdatePackage.Literals.SET_RULE__ELEMENT ||
+      childFeature == UpdatePackage.Literals.SET_RULE__VALUE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetAggregationRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetAggregationRuleItemProvider.java
new file mode 100644
index 0000000..801ce1f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetAggregationRuleItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAggregationRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAggregationRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SetAggregationRuleItemProvider
+  extends SetRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SetAggregationRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns SetAggregationRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/SetAggregationRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((SetAggregationRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_SetAggregationRule_type") :
+      getString("_UI_SetAggregationRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == UpdatePackage.Literals.SET_RULE__ELEMENT ||
+      childFeature == UpdatePackage.Literals.SET_RULE__VALUE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetAnyEndpointRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetAnyEndpointRuleItemProvider.java
new file mode 100644
index 0000000..2bf7706
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetAnyEndpointRuleItemProvider.java
@@ -0,0 +1,148 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnyEndpointRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnyEndpointRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SetAnyEndpointRuleItemProvider
+  extends SetRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SetAnyEndpointRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((SetAnyEndpointRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_SetAnyEndpointRule_type") :
+      getString("_UI_SetAnyEndpointRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == UpdatePackage.Literals.SET_RULE__ELEMENT ||
+      childFeature == UpdatePackage.Literals.SET_RULE__VALUE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetAnySourceRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetAnySourceRuleItemProvider.java
new file mode 100644
index 0000000..f1f8689
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetAnySourceRuleItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnySourceRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnySourceRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SetAnySourceRuleItemProvider
+  extends SetAnyEndpointRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SetAnySourceRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns SetAnySourceRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/SetAnySourceRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((SetAnySourceRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_SetAnySourceRule_type") :
+      getString("_UI_SetAnySourceRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == UpdatePackage.Literals.SET_RULE__ELEMENT ||
+      childFeature == UpdatePackage.Literals.SET_RULE__VALUE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetAnyTargetRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetAnyTargetRuleItemProvider.java
new file mode 100644
index 0000000..2bf5a43
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetAnyTargetRuleItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnyTargetRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnyTargetRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SetAnyTargetRuleItemProvider
+  extends SetAnyEndpointRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SetAnyTargetRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns SetAnyTargetRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/SetAnyTargetRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((SetAnyTargetRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_SetAnyTargetRule_type") :
+      getString("_UI_SetAnyTargetRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == UpdatePackage.Literals.SET_RULE__ELEMENT ||
+      childFeature == UpdatePackage.Literals.SET_RULE__VALUE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetInverseRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetInverseRuleItemProvider.java
new file mode 100644
index 0000000..a9f75ff
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetInverseRuleItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetInverseRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetInverseRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SetInverseRuleItemProvider
+  extends SetRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SetInverseRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns SetInverseRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/SetInverseRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((SetInverseRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_SetInverseRule_type") :
+      getString("_UI_SetInverseRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == UpdatePackage.Literals.SET_RULE__ELEMENT ||
+      childFeature == UpdatePackage.Literals.SET_RULE__VALUE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetMultiplicityRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetMultiplicityRuleItemProvider.java
new file mode 100644
index 0000000..1197bae
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetMultiplicityRuleItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetMultiplicityRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetMultiplicityRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SetMultiplicityRuleItemProvider
+  extends SetRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SetMultiplicityRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns SetMultiplicityRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/SetMultiplicityRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((SetMultiplicityRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_SetMultiplicityRule_type") :
+      getString("_UI_SetMultiplicityRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == UpdatePackage.Literals.SET_RULE__ELEMENT ||
+      childFeature == UpdatePackage.Literals.SET_RULE__VALUE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetRelationEndPointItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetRelationEndPointItemProvider.java
new file mode 100644
index 0000000..fa11680
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetRelationEndPointItemProvider.java
@@ -0,0 +1,148 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationEndPoint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationEndPoint} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SetRelationEndPointItemProvider
+  extends SetRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SetRelationEndPointItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((SetRelationEndPoint)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_SetRelationEndPoint_type") :
+      getString("_UI_SetRelationEndPoint_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == UpdatePackage.Literals.SET_RULE__ELEMENT ||
+      childFeature == UpdatePackage.Literals.SET_RULE__VALUE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetRelationFromItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetRelationFromItemProvider.java
new file mode 100644
index 0000000..adf0026
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetRelationFromItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationFrom;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationFrom} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SetRelationFromItemProvider
+  extends SetRelationEndPointItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SetRelationFromItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns SetRelationFrom.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/SetRelationFrom"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((SetRelationFrom)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_SetRelationFrom_type") :
+      getString("_UI_SetRelationFrom_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == UpdatePackage.Literals.SET_RULE__ELEMENT ||
+      childFeature == UpdatePackage.Literals.SET_RULE__VALUE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetRelationToItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetRelationToItemProvider.java
new file mode 100644
index 0000000..3500ac6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetRelationToItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationTo;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationTo} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SetRelationToItemProvider
+  extends SetRelationEndPointItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SetRelationToItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns SetRelationTo.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/SetRelationTo"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((SetRelationTo)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_SetRelationTo_type") :
+      getString("_UI_SetRelationTo_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == UpdatePackage.Literals.SET_RULE__ELEMENT ||
+      childFeature == UpdatePackage.Literals.SET_RULE__VALUE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetRuleItemProvider.java
new file mode 100644
index 0000000..510ec20
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetRuleItemProvider.java
@@ -0,0 +1,577 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.provider.ModelManipulationRuleItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SetRuleItemProvider
+  extends ModelManipulationRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SetRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(UpdatePackage.Literals.SET_RULE__ELEMENT);
+      childrenFeatures.add(UpdatePackage.Literals.SET_RULE__VALUE);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((SetRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_SetRule_type") :
+      getString("_UI_SetRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(SetRule.class))
+    {
+      case UpdatePackage.SET_RULE__ELEMENT:
+      case UpdatePackage.SET_RULE__VALUE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__ELEMENT,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createAggregate()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createSource()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createTarget()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createElementReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createName()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createValue()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createInverse()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         QueryFunctionsFactory.eINSTANCE.createMultiplicity()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         TermsFactory.eINSTANCE.createVariableReference()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         TermsFactory.eINSTANCE.createGTPatternCall()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         TermsFactory.eINSTANCE.createASMFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         TermsFactory.eINSTANCE.createConstant()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         TermsFactory.eINSTANCE.createNativeFunctionInvocation()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         TermsFactory.eINSTANCE.createModelElementQuery()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createRemainder()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createMultiply()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createPlus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createMinus()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createDivision()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createAnd()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThan()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createNot()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createNotEquals()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createXOr()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToString()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToInt()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToBoolean()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToDouble()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToModelElement()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (UpdatePackage.Literals.SET_RULE__VALUE,
+         BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity()));
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == UpdatePackage.Literals.SET_RULE__ELEMENT ||
+      childFeature == UpdatePackage.Literals.SET_RULE__VALUE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetValueRuleItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetValueRuleItemProvider.java
new file mode 100644
index 0000000..f875b98
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/SetValueRuleItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetValueRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetValueRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SetValueRuleItemProvider
+  extends SetRuleItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SetValueRuleItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns SetValueRule.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/SetValueRule"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((SetValueRule)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_SetValueRule_type") :
+      getString("_UI_SetValueRule_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
+  {
+    Object childFeature = feature;
+    Object childObject = child;
+
+    boolean qualify =
+      childFeature == UpdatePackage.Literals.SET_RULE__ELEMENT ||
+      childFeature == UpdatePackage.Literals.SET_RULE__VALUE;
+
+    if (qualify)
+    {
+      return getString
+        ("_UI_CreateChild_text2",
+         new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
+    }
+    return super.getCreateChildText(owner, feature, child, selection);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/UpdateItemProviderAdapterFactory.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/UpdateItemProviderAdapterFactory.java
new file mode 100644
index 0000000..d770678
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/provider/UpdateItemProviderAdapterFactory.java
@@ -0,0 +1,439 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.util.UpdateAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class UpdateItemProviderAdapterFactory extends UpdateAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This keeps track of the root adapter factory that delegates to this adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ComposedAdapterFactory parentAdapterFactory;
+
+  /**
+   * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+  /**
+   * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+  /**
+   * This constructs an instance.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public UpdateItemProviderAdapterFactory()
+  {
+    supportedTypes.add(IEditingDomainItemProvider.class);
+    supportedTypes.add(IStructuredItemContentProvider.class);
+    supportedTypes.add(ITreeItemContentProvider.class);
+    supportedTypes.add(IItemLabelProvider.class);
+    supportedTypes.add(IItemPropertySource.class);
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.RenameRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RenameRuleItemProvider renameRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.RenameRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createRenameRuleAdapter()
+  {
+    if (renameRuleItemProvider == null)
+    {
+      renameRuleItemProvider = new RenameRuleItemProvider(this);
+    }
+
+    return renameRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetValueRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SetValueRuleItemProvider setValueRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetValueRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createSetValueRuleAdapter()
+  {
+    if (setValueRuleItemProvider == null)
+    {
+      setValueRuleItemProvider = new SetValueRuleItemProvider(this);
+    }
+
+    return setValueRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationTo} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SetRelationToItemProvider setRelationToItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationTo}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createSetRelationToAdapter()
+  {
+    if (setRelationToItemProvider == null)
+    {
+      setRelationToItemProvider = new SetRelationToItemProvider(this);
+    }
+
+    return setRelationToItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationFrom} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SetRelationFromItemProvider setRelationFromItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationFrom}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createSetRelationFromAdapter()
+  {
+    if (setRelationFromItemProvider == null)
+    {
+      setRelationFromItemProvider = new SetRelationFromItemProvider(this);
+    }
+
+    return setRelationFromItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetMultiplicityRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SetMultiplicityRuleItemProvider setMultiplicityRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetMultiplicityRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createSetMultiplicityRuleAdapter()
+  {
+    if (setMultiplicityRuleItemProvider == null)
+    {
+      setMultiplicityRuleItemProvider = new SetMultiplicityRuleItemProvider(this);
+    }
+
+    return setMultiplicityRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetInverseRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SetInverseRuleItemProvider setInverseRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetInverseRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createSetInverseRuleAdapter()
+  {
+    if (setInverseRuleItemProvider == null)
+    {
+      setInverseRuleItemProvider = new SetInverseRuleItemProvider(this);
+    }
+
+    return setInverseRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnyTargetRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SetAnyTargetRuleItemProvider setAnyTargetRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnyTargetRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createSetAnyTargetRuleAdapter()
+  {
+    if (setAnyTargetRuleItemProvider == null)
+    {
+      setAnyTargetRuleItemProvider = new SetAnyTargetRuleItemProvider(this);
+    }
+
+    return setAnyTargetRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnySourceRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SetAnySourceRuleItemProvider setAnySourceRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnySourceRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createSetAnySourceRuleAdapter()
+  {
+    if (setAnySourceRuleItemProvider == null)
+    {
+      setAnySourceRuleItemProvider = new SetAnySourceRuleItemProvider(this);
+    }
+
+    return setAnySourceRuleItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAggregationRule} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SetAggregationRuleItemProvider setAggregationRuleItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAggregationRule}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createSetAggregationRuleAdapter()
+  {
+    if (setAggregationRuleItemProvider == null)
+    {
+      setAggregationRuleItemProvider = new SetAggregationRuleItemProvider(this);
+    }
+
+    return setAggregationRuleItemProvider;
+  }
+
+  /**
+   * This returns the root adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ComposeableAdapterFactory getRootAdapterFactory()
+  {
+    return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+  }
+
+  /**
+   * This sets the composed adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
+  {
+    this.parentAdapterFactory = parentAdapterFactory;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object type)
+  {
+    return supportedTypes.contains(type) || super.isFactoryForType(type);
+  }
+
+  /**
+   * This implementation substitutes the factory itself as the key for the adapter.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter adapt(Notifier notifier, Object type)
+  {
+    return super.adapt(notifier, this);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object adapt(Object object, Object type)
+  {
+    if (isFactoryForType(type))
+    {
+      Object adapter = super.adapt(object, type);
+      if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter)))
+      {
+        return adapter;
+      }
+    }
+
+    return null;
+  }
+
+  /**
+   * This adds a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void addListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.addListener(notifyChangedListener);
+  }
+
+  /**
+   * This removes a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void removeListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.removeListener(notifyChangedListener);
+  }
+
+  /**
+   * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void fireNotifyChanged(Notification notification)
+  {
+    changeNotifier.fireNotifyChanged(notification);
+
+    if (parentAdapterFactory != null)
+    {
+      parentAdapterFactory.fireNotifyChanged(notification);
+    }
+  }
+
+  /**
+   * This disposes all of the item providers created by this factory. 
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void dispose()
+  {
+    if (renameRuleItemProvider != null) renameRuleItemProvider.dispose();
+    if (setValueRuleItemProvider != null) setValueRuleItemProvider.dispose();
+    if (setRelationToItemProvider != null) setRelationToItemProvider.dispose();
+    if (setRelationFromItemProvider != null) setRelationFromItemProvider.dispose();
+    if (setMultiplicityRuleItemProvider != null) setMultiplicityRuleItemProvider.dispose();
+    if (setInverseRuleItemProvider != null) setInverseRuleItemProvider.dispose();
+    if (setAnyTargetRuleItemProvider != null) setAnyTargetRuleItemProvider.dispose();
+    if (setAnySourceRuleItemProvider != null) setAnySourceRuleItemProvider.dispose();
+    if (setAggregationRuleItemProvider != null) setAggregationRuleItemProvider.dispose();
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/AggregateItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/AggregateItemProvider.java
new file mode 100644
index 0000000..c19508d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/AggregateItemProvider.java
@@ -0,0 +1,152 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider.ModelElementQueryItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Aggregate;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Aggregate} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AggregateItemProvider
+  extends ModelElementQueryItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public AggregateItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns Aggregate.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Aggregate"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Aggregate)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Aggregate_type") :
+      getString("_UI_Aggregate_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/ElementReferenceItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/ElementReferenceItemProvider.java
new file mode 100644
index 0000000..24093d0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/ElementReferenceItemProvider.java
@@ -0,0 +1,152 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider.ModelElementQueryItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.ElementReference;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.ElementReference} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ElementReferenceItemProvider
+  extends ModelElementQueryItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ElementReferenceItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns ElementReference.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/ElementReference"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ElementReference)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ElementReference_type") :
+      getString("_UI_ElementReference_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/FullyQualifiedNameItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/FullyQualifiedNameItemProvider.java
new file mode 100644
index 0000000..f6f1a46
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/FullyQualifiedNameItemProvider.java
@@ -0,0 +1,152 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider.ModelElementQueryItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.FullyQualifiedName;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.FullyQualifiedName} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class FullyQualifiedNameItemProvider
+  extends ModelElementQueryItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public FullyQualifiedNameItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns FullyQualifiedName.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/FullyQualifiedName"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((FullyQualifiedName)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_FullyQualifiedName_type") :
+      getString("_UI_FullyQualifiedName_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/InverseItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/InverseItemProvider.java
new file mode 100644
index 0000000..3b713af
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/InverseItemProvider.java
@@ -0,0 +1,152 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider.ModelElementQueryItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Inverse;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Inverse} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class InverseItemProvider
+  extends ModelElementQueryItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public InverseItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns Inverse.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Inverse"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Inverse)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Inverse_type") :
+      getString("_UI_Inverse_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/MultiplicityItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/MultiplicityItemProvider.java
new file mode 100644
index 0000000..20c1076
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/MultiplicityItemProvider.java
@@ -0,0 +1,152 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider.ModelElementQueryItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Multiplicity;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Multiplicity} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class MultiplicityItemProvider
+  extends ModelElementQueryItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public MultiplicityItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns Multiplicity.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Multiplicity"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Multiplicity)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Multiplicity_type") :
+      getString("_UI_Multiplicity_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/NameItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/NameItemProvider.java
new file mode 100644
index 0000000..c330c1f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/NameItemProvider.java
@@ -0,0 +1,152 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider.ModelElementQueryItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Name;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Name} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NameItemProvider
+  extends ModelElementQueryItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NameItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns Name.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Name"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Name)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Name_type") :
+      getString("_UI_Name_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/QueryFunctionsItemProviderAdapterFactory.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/QueryFunctionsItemProviderAdapterFactory.java
new file mode 100644
index 0000000..aa37b9e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/QueryFunctionsItemProviderAdapterFactory.java
@@ -0,0 +1,439 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.util.QueryFunctionsAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class QueryFunctionsItemProviderAdapterFactory extends QueryFunctionsAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This keeps track of the root adapter factory that delegates to this adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ComposedAdapterFactory parentAdapterFactory;
+
+  /**
+   * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+  /**
+   * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+  /**
+   * This constructs an instance.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public QueryFunctionsItemProviderAdapterFactory()
+  {
+    supportedTypes.add(IEditingDomainItemProvider.class);
+    supportedTypes.add(IStructuredItemContentProvider.class);
+    supportedTypes.add(ITreeItemContentProvider.class);
+    supportedTypes.add(IItemLabelProvider.class);
+    supportedTypes.add(IItemPropertySource.class);
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Aggregate} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected AggregateItemProvider aggregateItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Aggregate}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createAggregateAdapter()
+  {
+    if (aggregateItemProvider == null)
+    {
+      aggregateItemProvider = new AggregateItemProvider(this);
+    }
+
+    return aggregateItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Source} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SourceItemProvider sourceItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Source}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createSourceAdapter()
+  {
+    if (sourceItemProvider == null)
+    {
+      sourceItemProvider = new SourceItemProvider(this);
+    }
+
+    return sourceItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Target} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected TargetItemProvider targetItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Target}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createTargetAdapter()
+  {
+    if (targetItemProvider == null)
+    {
+      targetItemProvider = new TargetItemProvider(this);
+    }
+
+    return targetItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.ElementReference} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ElementReferenceItemProvider elementReferenceItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.ElementReference}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createElementReferenceAdapter()
+  {
+    if (elementReferenceItemProvider == null)
+    {
+      elementReferenceItemProvider = new ElementReferenceItemProvider(this);
+    }
+
+    return elementReferenceItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.FullyQualifiedName} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected FullyQualifiedNameItemProvider fullyQualifiedNameItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.FullyQualifiedName}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createFullyQualifiedNameAdapter()
+  {
+    if (fullyQualifiedNameItemProvider == null)
+    {
+      fullyQualifiedNameItemProvider = new FullyQualifiedNameItemProvider(this);
+    }
+
+    return fullyQualifiedNameItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Name} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected NameItemProvider nameItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Name}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createNameAdapter()
+  {
+    if (nameItemProvider == null)
+    {
+      nameItemProvider = new NameItemProvider(this);
+    }
+
+    return nameItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Value} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ValueItemProvider valueItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Value}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createValueAdapter()
+  {
+    if (valueItemProvider == null)
+    {
+      valueItemProvider = new ValueItemProvider(this);
+    }
+
+    return valueItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Inverse} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected InverseItemProvider inverseItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Inverse}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createInverseAdapter()
+  {
+    if (inverseItemProvider == null)
+    {
+      inverseItemProvider = new InverseItemProvider(this);
+    }
+
+    return inverseItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Multiplicity} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected MultiplicityItemProvider multiplicityItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Multiplicity}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createMultiplicityAdapter()
+  {
+    if (multiplicityItemProvider == null)
+    {
+      multiplicityItemProvider = new MultiplicityItemProvider(this);
+    }
+
+    return multiplicityItemProvider;
+  }
+
+  /**
+   * This returns the root adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ComposeableAdapterFactory getRootAdapterFactory()
+  {
+    return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+  }
+
+  /**
+   * This sets the composed adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
+  {
+    this.parentAdapterFactory = parentAdapterFactory;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object type)
+  {
+    return supportedTypes.contains(type) || super.isFactoryForType(type);
+  }
+
+  /**
+   * This implementation substitutes the factory itself as the key for the adapter.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter adapt(Notifier notifier, Object type)
+  {
+    return super.adapt(notifier, this);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object adapt(Object object, Object type)
+  {
+    if (isFactoryForType(type))
+    {
+      Object adapter = super.adapt(object, type);
+      if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter)))
+      {
+        return adapter;
+      }
+    }
+
+    return null;
+  }
+
+  /**
+   * This adds a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void addListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.addListener(notifyChangedListener);
+  }
+
+  /**
+   * This removes a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void removeListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.removeListener(notifyChangedListener);
+  }
+
+  /**
+   * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void fireNotifyChanged(Notification notification)
+  {
+    changeNotifier.fireNotifyChanged(notification);
+
+    if (parentAdapterFactory != null)
+    {
+      parentAdapterFactory.fireNotifyChanged(notification);
+    }
+  }
+
+  /**
+   * This disposes all of the item providers created by this factory. 
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void dispose()
+  {
+    if (aggregateItemProvider != null) aggregateItemProvider.dispose();
+    if (sourceItemProvider != null) sourceItemProvider.dispose();
+    if (targetItemProvider != null) targetItemProvider.dispose();
+    if (elementReferenceItemProvider != null) elementReferenceItemProvider.dispose();
+    if (fullyQualifiedNameItemProvider != null) fullyQualifiedNameItemProvider.dispose();
+    if (nameItemProvider != null) nameItemProvider.dispose();
+    if (valueItemProvider != null) valueItemProvider.dispose();
+    if (inverseItemProvider != null) inverseItemProvider.dispose();
+    if (multiplicityItemProvider != null) multiplicityItemProvider.dispose();
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/SourceItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/SourceItemProvider.java
new file mode 100644
index 0000000..4794c9a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/SourceItemProvider.java
@@ -0,0 +1,152 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider.ModelElementQueryItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Source;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Source} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SourceItemProvider
+  extends ModelElementQueryItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SourceItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns Source.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Source"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Source)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Source_type") :
+      getString("_UI_Source_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/TargetItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/TargetItemProvider.java
new file mode 100644
index 0000000..58af297
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/TargetItemProvider.java
@@ -0,0 +1,152 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider.ModelElementQueryItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Target;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Target} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TargetItemProvider
+  extends ModelElementQueryItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public TargetItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns Target.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Target"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Target)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Target_type") :
+      getString("_UI_Target_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/ValueItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/ValueItemProvider.java
new file mode 100644
index 0000000..b3ea85b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/provider/ValueItemProvider.java
@@ -0,0 +1,152 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.provider.ModelElementQueryItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Value;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Value} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ValueItemProvider
+  extends ModelElementQueryItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ValueItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns Value.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Value"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Value)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Value_type") :
+      getString("_UI_Value_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/EditmodelItemProviderAdapterFactory.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/EditmodelItemProviderAdapterFactory.java
new file mode 100644
index 0000000..fd1c42a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/EditmodelItemProviderAdapterFactory.java
@@ -0,0 +1,309 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.util.EditmodelAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class EditmodelItemProviderAdapterFactory extends EditmodelAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This keeps track of the root adapter factory that delegates to this adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ComposedAdapterFactory parentAdapterFactory;
+
+  /**
+   * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+  /**
+   * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+  /**
+   * This constructs an instance.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EditmodelItemProviderAdapterFactory()
+  {
+    supportedTypes.add(IEditingDomainItemProvider.class);
+    supportedTypes.add(IStructuredItemContentProvider.class);
+    supportedTypes.add(ITreeItemContentProvider.class);
+    supportedTypes.add(IItemLabelProvider.class);
+    supportedTypes.add(IItemPropertySource.class);
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected EntityItemProvider entityItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createEntityAdapter()
+  {
+    if (entityItemProvider == null)
+    {
+      entityItemProvider = new EntityItemProvider(this);
+    }
+
+    return entityItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RelationItemProvider relationItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createRelationAdapter()
+  {
+    if (relationItemProvider == null)
+    {
+      relationItemProvider = new RelationItemProvider(this);
+    }
+
+    return relationItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.TypeOf} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected TypeOfItemProvider typeOfItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.TypeOf}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createTypeOfAdapter()
+  {
+    if (typeOfItemProvider == null)
+    {
+      typeOfItemProvider = new TypeOfItemProvider(this);
+    }
+
+    return typeOfItemProvider;
+  }
+
+  /**
+   * This keeps track of the one adapter used for all {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.SupertypeOf} instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SupertypeOfItemProvider supertypeOfItemProvider;
+
+  /**
+   * This creates an adapter for a {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.SupertypeOf}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter createSupertypeOfAdapter()
+  {
+    if (supertypeOfItemProvider == null)
+    {
+      supertypeOfItemProvider = new SupertypeOfItemProvider(this);
+    }
+
+    return supertypeOfItemProvider;
+  }
+
+  /**
+   * This returns the root adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ComposeableAdapterFactory getRootAdapterFactory()
+  {
+    return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+  }
+
+  /**
+   * This sets the composed adapter factory that contains this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
+  {
+    this.parentAdapterFactory = parentAdapterFactory;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object type)
+  {
+    return supportedTypes.contains(type) || super.isFactoryForType(type);
+  }
+
+  /**
+   * This implementation substitutes the factory itself as the key for the adapter.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Adapter adapt(Notifier notifier, Object type)
+  {
+    return super.adapt(notifier, this);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object adapt(Object object, Object type)
+  {
+    if (isFactoryForType(type))
+    {
+      Object adapter = super.adapt(object, type);
+      if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter)))
+      {
+        return adapter;
+      }
+    }
+
+    return null;
+  }
+
+  /**
+   * This adds a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void addListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.addListener(notifyChangedListener);
+  }
+
+  /**
+   * This removes a listener.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void removeListener(INotifyChangedListener notifyChangedListener)
+  {
+    changeNotifier.removeListener(notifyChangedListener);
+  }
+
+  /**
+   * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void fireNotifyChanged(Notification notification)
+  {
+    changeNotifier.fireNotifyChanged(notification);
+
+    if (parentAdapterFactory != null)
+    {
+      parentAdapterFactory.fireNotifyChanged(notification);
+    }
+  }
+
+  /**
+   * This disposes all of the item providers created by this factory. 
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void dispose()
+  {
+    if (entityItemProvider != null) entityItemProvider.dispose();
+    if (relationItemProvider != null) relationItemProvider.dispose();
+    if (typeOfItemProvider != null) typeOfItemProvider.dispose();
+    if (supertypeOfItemProvider != null) supertypeOfItemProvider.dispose();
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/EntityItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/EntityItemProvider.java
new file mode 100644
index 0000000..a39cb3a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/EntityItemProvider.java
@@ -0,0 +1,213 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelFactory;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class EntityItemProvider
+  extends ModelElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EntityItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addValuePropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Value feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addValuePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_Entity_value_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_Entity_value_feature", "_UI_Entity_type"),
+         EditmodelPackage.Literals.ENTITY__VALUE,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(EditmodelPackage.Literals.ENTITY__COMPONENTS);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns Entity.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Entity"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Entity)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Entity_type") :
+      getString("_UI_Entity_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(Entity.class))
+    {
+      case EditmodelPackage.ENTITY__VALUE:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+      case EditmodelPackage.ENTITY__COMPONENTS:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (EditmodelPackage.Literals.ENTITY__COMPONENTS,
+         EditmodelFactory.eINSTANCE.createEntity()));
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/GtasmEditPlugin.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/GtasmEditPlugin.java
new file mode 100644
index 0000000..642bf3c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/GtasmEditPlugin.java
@@ -0,0 +1,112 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the Gtasm edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class GtasmEditPlugin extends EMFPlugin
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Keep track of the singleton.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final GtasmEditPlugin INSTANCE = new GtasmEditPlugin();
+
+  /**
+   * Keep track of the singleton.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static Implementation plugin;
+
+  /**
+   * Create the instance.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GtasmEditPlugin()
+  {
+    super
+      (new ResourceLocator [] 
+       {
+       });
+  }
+
+  /**
+   * Returns the singleton instance of the Eclipse plugin.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the singleton instance.
+   * @generated
+   */
+  @Override
+  public ResourceLocator getPluginResourceLocator()
+  {
+    return plugin;
+  }
+
+  /**
+   * Returns the singleton instance of the Eclipse plugin.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the singleton instance.
+   * @generated
+   */
+  public static Implementation getPlugin()
+  {
+    return plugin;
+  }
+
+  /**
+   * The actual implementation of the Eclipse <b>Plugin</b>.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static class Implementation extends EclipsePlugin
+  {
+    /**
+     * Creates an instance.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    public Implementation()
+    {
+      super();
+
+      // Remember the static instance.
+      //
+      plugin = this;
+    }
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/ModelElementItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/ModelElementItemProvider.java
new file mode 100644
index 0000000..e695cce
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/ModelElementItemProvider.java
@@ -0,0 +1,432 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelFactory;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ModelElementItemProvider
+  extends VPMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ModelElementItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addTypePropertyDescriptor(object);
+      addInstancePropertyDescriptor(object);
+      addSupertypePropertyDescriptor(object);
+      addSubtypePropertyDescriptor(object);
+      addRelationsToPropertyDescriptor(object);
+      addSubRelationshipsPropertyDescriptor(object);
+      addTypeStrPropertyDescriptor(object);
+      addNamePropertyDescriptor(object);
+      addNamespaceStrPropertyDescriptor(object);
+      addRealElementPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Type feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addTypePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_ModelElement_type_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_ModelElement_type_feature", "_UI_ModelElement_type"),
+         EditmodelPackage.Literals.MODEL_ELEMENT__TYPE,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the Instance feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addInstancePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_ModelElement_instance_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_ModelElement_instance_feature", "_UI_ModelElement_type"),
+         EditmodelPackage.Literals.MODEL_ELEMENT__INSTANCE,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the Supertype feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addSupertypePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_ModelElement_supertype_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_ModelElement_supertype_feature", "_UI_ModelElement_type"),
+         EditmodelPackage.Literals.MODEL_ELEMENT__SUPERTYPE,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the Subtype feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addSubtypePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_ModelElement_subtype_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_ModelElement_subtype_feature", "_UI_ModelElement_type"),
+         EditmodelPackage.Literals.MODEL_ELEMENT__SUBTYPE,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the Relations To feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addRelationsToPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_ModelElement_relationsTo_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_ModelElement_relationsTo_feature", "_UI_ModelElement_type"),
+         EditmodelPackage.Literals.MODEL_ELEMENT__RELATIONS_TO,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the Sub Relationships feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addSubRelationshipsPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_ModelElement_subRelationships_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_ModelElement_subRelationships_feature", "_UI_ModelElement_type"),
+         EditmodelPackage.Literals.MODEL_ELEMENT__SUB_RELATIONSHIPS,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the Type Str feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addTypeStrPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_ModelElement_typeStr_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_ModelElement_typeStr_feature", "_UI_ModelElement_type"),
+         EditmodelPackage.Literals.MODEL_ELEMENT__TYPE_STR,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the Name feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addNamePropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_ModelElement_name_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_ModelElement_name_feature", "_UI_ModelElement_type"),
+         EditmodelPackage.Literals.MODEL_ELEMENT__NAME,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the Namespace Str feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addNamespaceStrPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_ModelElement_namespaceStr_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_ModelElement_namespaceStr_feature", "_UI_ModelElement_type"),
+         EditmodelPackage.Literals.MODEL_ELEMENT__NAMESPACE_STR,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the Real Element feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addRealElementPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_ModelElement_realElement_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_ModelElement_realElement_feature", "_UI_ModelElement_type"),
+         EditmodelPackage.Literals.MODEL_ELEMENT__REAL_ELEMENT,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(EditmodelPackage.Literals.MODEL_ELEMENT__SUPER_RELATIONSHIPS);
+      childrenFeatures.add(EditmodelPackage.Literals.MODEL_ELEMENT__RELATIONS_FROM);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((ModelElement)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_ModelElement_type") :
+      getString("_UI_ModelElement_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(ModelElement.class))
+    {
+      case EditmodelPackage.MODEL_ELEMENT__TYPE_STR:
+      case EditmodelPackage.MODEL_ELEMENT__NAME:
+      case EditmodelPackage.MODEL_ELEMENT__NAMESPACE_STR:
+      case EditmodelPackage.MODEL_ELEMENT__REAL_ELEMENT:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__SUPER_RELATIONSHIPS:
+      case EditmodelPackage.MODEL_ELEMENT__RELATIONS_FROM:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (EditmodelPackage.Literals.MODEL_ELEMENT__SUPER_RELATIONSHIPS,
+         EditmodelFactory.eINSTANCE.createTypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (EditmodelPackage.Literals.MODEL_ELEMENT__SUPER_RELATIONSHIPS,
+         EditmodelFactory.eINSTANCE.createSupertypeOf()));
+
+    newChildDescriptors.add
+      (createChildParameter
+        (EditmodelPackage.Literals.MODEL_ELEMENT__RELATIONS_FROM,
+         EditmodelFactory.eINSTANCE.createRelation()));
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/RelationItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/RelationItemProvider.java
new file mode 100644
index 0000000..fdd5008
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/RelationItemProvider.java
@@ -0,0 +1,218 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RelationItemProvider
+  extends ModelElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RelationItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addToPropertyDescriptor(object);
+      addFromStrPropertyDescriptor(object);
+      addToStrPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the To feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addToPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_Relation_to_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_Relation_to_feature", "_UI_Relation_type"),
+         EditmodelPackage.Literals.RELATION__TO,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the From Str feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addFromStrPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_Relation_fromStr_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_Relation_fromStr_feature", "_UI_Relation_type"),
+         EditmodelPackage.Literals.RELATION__FROM_STR,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the To Str feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addToStrPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_Relation_toStr_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_Relation_toStr_feature", "_UI_Relation_type"),
+         EditmodelPackage.Literals.RELATION__TO_STR,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This returns Relation.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Relation"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Relation)object).getName();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Relation_type") :
+      getString("_UI_Relation_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(Relation.class))
+    {
+      case EditmodelPackage.RELATION__FROM_STR:
+      case EditmodelPackage.RELATION__TO_STR:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/RelationshipItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/RelationshipItemProvider.java
new file mode 100644
index 0000000..e3fb867
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/RelationshipItemProvider.java
@@ -0,0 +1,218 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RelationshipItemProvider
+  extends VPMElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RelationshipItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+      addClientStrPropertyDescriptor(object);
+      addSupplierStrPropertyDescriptor(object);
+      addSupplierPropertyDescriptor(object);
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This adds a property descriptor for the Client Str feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addClientStrPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_Relationship_clientStr_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_Relationship_clientStr_feature", "_UI_Relationship_type"),
+         EditmodelPackage.Literals.RELATIONSHIP__CLIENT_STR,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the Supplier Str feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addSupplierStrPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_Relationship_supplierStr_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_Relationship_supplierStr_feature", "_UI_Relationship_type"),
+         EditmodelPackage.Literals.RELATIONSHIP__SUPPLIER_STR,
+         true,
+         false,
+         false,
+         ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+         null,
+         null));
+  }
+
+  /**
+   * This adds a property descriptor for the Supplier feature.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected void addSupplierPropertyDescriptor(Object object)
+  {
+    itemPropertyDescriptors.add
+      (createItemPropertyDescriptor
+        (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+         getResourceLocator(),
+         getString("_UI_Relationship_supplier_feature"),
+         getString("_UI_PropertyDescriptor_description", "_UI_Relationship_supplier_feature", "_UI_Relationship_type"),
+         EditmodelPackage.Literals.RELATIONSHIP__SUPPLIER,
+         true,
+         false,
+         true,
+         null,
+         null,
+         null));
+  }
+
+  /**
+   * This returns Relationship.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/Relationship"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((Relationship)object).getClientStr();
+    return label == null || label.length() == 0 ?
+      getString("_UI_Relationship_type") :
+      getString("_UI_Relationship_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(Relationship.class))
+    {
+      case EditmodelPackage.RELATIONSHIP__CLIENT_STR:
+      case EditmodelPackage.RELATIONSHIP__SUPPLIER_STR:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/SupertypeOfItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/SupertypeOfItemProvider.java
new file mode 100644
index 0000000..a060db1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/SupertypeOfItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.SupertypeOf;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.SupertypeOf} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SupertypeOfItemProvider
+  extends RelationshipItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SupertypeOfItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns SupertypeOf.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/SupertypeOf"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((SupertypeOf)object).getClientStr();
+    return label == null || label.length() == 0 ?
+      getString("_UI_SupertypeOf_type") :
+      getString("_UI_SupertypeOf_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/TypeOfItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/TypeOfItemProvider.java
new file mode 100644
index 0000000..c8424df
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/TypeOfItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.TypeOf;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.TypeOf} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TypeOfItemProvider
+  extends RelationshipItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public TypeOfItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This returns TypeOf.gif.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object getImage(Object object)
+  {
+    return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeOf"));
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    String label = ((TypeOf)object).getClientStr();
+    return label == null || label.length() == 0 ?
+      getString("_UI_TypeOf_type") :
+      getString("_UI_TypeOf_type") + " " + label;
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/VPMElementItemProvider.java b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/VPMElementItemProvider.java
new file mode 100644
index 0000000..3f63e82
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model.edit/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/provider/VPMElementItemProvider.java
@@ -0,0 +1,186 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.provider.AnnotatedElementItemProvider;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.VPMElement;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.VPMElement} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VPMElementItemProvider
+  extends AnnotatedElementItemProvider
+  implements
+    IEditingDomainItemProvider,
+    IStructuredItemContentProvider,
+    ITreeItemContentProvider,
+    IItemLabelProvider,
+    IItemPropertySource
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * This constructs an instance from a factory and a notifier.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public VPMElementItemProvider(AdapterFactory adapterFactory)
+  {
+    super(adapterFactory);
+  }
+
+  /**
+   * This returns the property descriptors for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+  {
+    if (itemPropertyDescriptors == null)
+    {
+      super.getPropertyDescriptors(object);
+
+    }
+    return itemPropertyDescriptors;
+  }
+
+  /**
+   * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+   * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+   * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+  {
+    if (childrenFeatures == null)
+    {
+      super.getChildrenFeatures(object);
+      childrenFeatures.add(EditmodelPackage.Literals.VPM_ELEMENT__VARIABLE_REFERENCES);
+    }
+    return childrenFeatures;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EStructuralFeature getChildFeature(Object object, Object child)
+  {
+    // Check the type of the specified child object and return the proper feature to use for
+    // adding (see {@link AddCommand}) it as a child.
+
+    return super.getChildFeature(object, child);
+  }
+
+  /**
+   * This returns the label text for the adapted class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String getText(Object object)
+  {
+    return getString("_UI_VPMElement_type");
+  }
+
+  /**
+   * This handles model notifications by calling {@link #updateChildren} to update any cached
+   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void notifyChanged(Notification notification)
+  {
+    updateChildren(notification);
+
+    switch (notification.getFeatureID(VPMElement.class))
+    {
+      case EditmodelPackage.VPM_ELEMENT__VARIABLE_REFERENCES:
+        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+        return;
+    }
+    super.notifyChanged(notification);
+  }
+
+  /**
+   * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+   * that can be created under this object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+  {
+    super.collectNewChildDescriptors(newChildDescriptors, object);
+
+    newChildDescriptors.add
+      (createChildParameter
+        (EditmodelPackage.Literals.VPM_ELEMENT__VARIABLE_REFERENCES,
+         TermsFactory.eINSTANCE.createVariableReference()));
+  }
+
+  /**
+   * Return the resource locator for this item provider's resources.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public ResourceLocator getResourceLocator()
+  {
+    return GtasmEditPlugin.INSTANCE;
+  }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.model/.classpath b/org.eclipse.viatra2.gtasm.model/.classpath
new file mode 100644
index 0000000..121e527
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.viatra2.gtasm.model/.externalToolBuilders/GTASM code generation.launch b/org.eclipse.viatra2.gtasm.model/.externalToolBuilders/GTASM code generation.launch
new file mode 100644
index 0000000..96a658c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/.externalToolBuilders/GTASM code generation.launch
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="clean,"/>
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;resources&gt;&#10;&lt;item path=&quot;/org.eclipse.viatra2.gtasm.model&quot; type=&quot;4&quot;/&gt;&#10;&lt;item path=&quot;/org.eclipse.viatra2.gtasm.model.edit&quot; type=&quot;4&quot;/&gt;&#10;&lt;/resources&gt;}"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.viatra2.gtasm.model/build.xml"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.viatra2.gtasm.model"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;resources&gt;&#10;&lt;item path=&quot;/org.eclipse.viatra2.gtasm.model/.classpath&quot; type=&quot;1&quot;/&gt;&#10;&lt;item path=&quot;/org.eclipse.viatra2.gtasm.model/META-INF&quot; type=&quot;2&quot;/&gt;&#10;&lt;item path=&quot;/org.eclipse.viatra2.gtasm.model/build.xml&quot; type=&quot;1&quot;/&gt;&#10;&lt;item path=&quot;/org.eclipse.viatra2.gtasm.model/model&quot; type=&quot;2&quot;/&gt;&#10;&lt;item path=&quot;/org.eclipse.viatra2.gtasm.model/plugin.xml&quot; type=&quot;1&quot;/&gt;&#10;&lt;/resources&gt;}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.viatra2.gtasm.model/generate-emf.xml}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,clean"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/org.eclipse.viatra2.gtasm.model}"/>
+</launchConfiguration>
diff --git a/org.eclipse.viatra2.gtasm.model/.project b/org.eclipse.viatra2.gtasm.model/.project
new file mode 100644
index 0000000..60e9924
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/.project
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.viatra2.gtasm.model</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+			<arguments>
+				<dictionary>
+					<key>LaunchConfigHandle</key>
+					<value>&lt;project&gt;/.externalToolBuilders/GTASM code generation.launch</value>
+				</dictionary>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.viatra2.gtasm.model/.settings/org.eclipse.core.resources.prefs b/org.eclipse.viatra2.gtasm.model/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..8281628
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Tue Aug 10 21:51:26 CEST 2010
+eclipse.preferences.version=1
+encoding//model/gtasmmodel.ecorediag=UTF-8
diff --git a/org.eclipse.viatra2.gtasm.model/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra2.gtasm.model/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..d2111da
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Tue Sep 02 12:14:54 CEST 2008

+eclipse.preferences.version=1

+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5

+org.eclipse.jdt.core.compiler.compliance=1.5

+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error

+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error

+org.eclipse.jdt.core.compiler.source=1.5

diff --git a/org.eclipse.viatra2.gtasm.model/GTASM_code-gen.launch b/org.eclipse.viatra2.gtasm.model/GTASM_code-gen.launch
new file mode 100644
index 0000000..c1510f4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/GTASM_code-gen.launch
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.viatra2.gtasm.model/build.xml"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.viatra2.gtasm.model"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.viatra2.gtasm.model/build.xml}"/>
+<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
+</launchConfiguration>
diff --git a/org.eclipse.viatra2.gtasm.model/META-INF/MANIFEST.MF b/org.eclipse.viatra2.gtasm.model/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..f65c0d2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/META-INF/MANIFEST.MF
@@ -0,0 +1,52 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: VIATRA2 R3 EMF metamodel
+Bundle-SymbolicName: org.eclipse.viatra2.gtasm.model;singleton:=true
+Bundle-Version: 3.3.0.qualifier
+Bundle-Vendor: BUTE-FTSRG
+Bundle-Localization: plugin
+Export-Package: org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.util,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.util,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.util,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.util,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.util,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.util,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.util,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.util,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.util,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.util,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.util,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl,
+ org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.util,
+ org.eclipse.viatra2.gtasmmodel.vpm.editmodel,
+ org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl,
+ org.eclipse.viatra2.gtasmmodel.vpm.editmodel.util
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport
+Bundle-ClassPath: .
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/org.eclipse.viatra2.gtasm.model/about.html b/org.eclipse.viatra2.gtasm.model/about.html
new file mode 100644
index 0000000..1262b8c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/about.html
@@ -0,0 +1,28 @@
+<!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>About</title>

+</head>

+<body lang="EN-US">

+<h2>About This Content</h2>

+ 

+<p>July 4th, 2008</p>	

+<h3>License</h3>

+

+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 

+indicated below, the Content 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 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>If you did not receive this Content directly from the Eclipse Foundation, the Content is 

+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may

+apply to your use of any object code in the Content.  Check the Redistributor's license that was 

+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise

+indicated below, the terms and conditions of the EPL still apply to any source code in the Content

+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>

+

+</body>

+</html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gtasm.model/buckminster.cspex b/org.eclipse.viatra2.gtasm.model/buckminster.cspex
new file mode 100644
index 0000000..b8ca852
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/buckminster.cspex
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<cspecExtension
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0"
+	xmlns="http://www.eclipse.org/buckminster/CSpec-1.0">
+	<dependencies>
+		<!-- Place your Dependencies here -->
+	</dependencies>
+	<generators>
+		<!-- Place your Generators here -->
+	</generators>
+	<artifacts>
+		<!-- Place your Artifacts here -->
+	</artifacts>
+	<actions>
+		<!-- Place your Actions here -->
+	<public name="emf.generate" actor="ant">
+            <actorProperties>
+                <property key="buildFile" value="generate-emf.xml" />
+                <property key="targets" value="default" />
+            </actorProperties>
+        </public>
+	</actions>
+	<groups>
+		<!-- Place your Groups here -->
+	</groups>
+	<alterDependencies>
+		<!-- Place your Dependency alterations here -->
+	</alterDependencies>
+	<alterArtifacts>
+		<!-- Place your Artifact alterations here -->
+	</alterArtifacts>
+	<alterActions>
+		<!-- Place your Action alterations here -->
+	</alterActions>
+	<alterGroups>
+		<!-- Place your Group alterations here -->
+	</alterGroups>
+</cspecExtension>
+
diff --git a/org.eclipse.viatra2.gtasm.model/build.properties b/org.eclipse.viatra2.gtasm.model/build.properties
new file mode 100644
index 0000000..8cb3fcb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/build.properties
@@ -0,0 +1,9 @@
+bin.includes = model/,\
+               META-INF/,\
+               plugin.xml,\
+               plugin.properties,\
+               .
+
+source.. = src/
+src.includes = model/
+
diff --git a/org.eclipse.viatra2.gtasm.model/generate-emf.xml b/org.eclipse.viatra2.gtasm.model/generate-emf.xml
new file mode 100644
index 0000000..e85a6ee
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/generate-emf.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ======================================================================
+     Nov 16, 2010 10:33:34 PM
+
+     org.eclipse.viatra2.gtasm.model
+     A build script to execute GTASM model generation
+
+     Zoltan Ujhelyi
+     ====================================================================== -->
+<project name="org.eclipse.viatra2.gtasm.model" default="default">
+    <description>
+            A test build script to execute GTASM model generation
+    </description>
+
+    <!-- =================================
+          target: default
+         ================================= -->
+    <target name="default" description="A test build script to execute GTASM model generation">
+        <emf.Ecore2Java genModel="model/gtasmmodel_updated.genmodel"
+        	model="model/gtasmmodel.ecore"
+        	generateJavaCode="true"
+                generatemodelproject="true"
+        	generateeditproject="true"
+    		generateeditorproject="false"
+        	reconcilegenmodel="keep">
+        	  <arg line="-modelProject . src" />
+        	  <arg line="-editProject ../org.eclipse.viatra2.gtasm.edit src"/>
+        </emf.Ecore2Java>
+    	<eclipse.refreshLocal resource="org.eclipse.viatra2.gtasm.model/src" depth="infinite"/>
+    	<eclipse.refreshLocal resource="../org.eclipse.viatra2.gtasm.edit/src" depth="infinite"/>
+    </target>
+	
+	<!-- ================================= 
+          target: clean              
+         ================================= -->
+    <target name="clean" description="Removes generated files">
+    	<delete dir = "..">
+    		<include name = "org.eclipse.viatra2.gtasm.model/src/**" />
+    		<include name = "org.eclipse.viatra2.gtasm.model.edit/src/**" />
+    	</delete>
+    </target>
+
+</project>
diff --git a/org.eclipse.viatra2.gtasm.model/model/gtasmmodel.ecore b/org.eclipse.viatra2.gtasm.model/model/gtasmmodel.ecore
new file mode 100644
index 0000000..13a1a67
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/model/gtasmmodel.ecore
@@ -0,0 +1,677 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="gtasmmodel"
+    nsURI="http:///gtasmmodel.ecore" nsPrefix="gtasmmodel">
+  <eSubpackages name="vpm" nsURI="http:///viatragtasmmodel/vpm.ecore" nsPrefix="viatragtasmmodel.vpm">
+    <eSubpackages name="editmodel" nsURI="http:///viatragtasmmodel/vpm/editmodel.ecore"
+        nsPrefix="viatragtasmmodel.vpm.editmodel">
+      <eClassifiers xsi:type="ecore:EClass" name="ModelElement" abstract="true" eSuperTypes="#//vpm/editmodel/VPMElement">
+        <eStructuralFeatures xsi:type="ecore:EReference" name="type" ordered="false"
+            upperBound="-1" eType="#//vpm/editmodel/ModelElement" eOpposite="#//vpm/editmodel/ModelElement/instance"/>
+        <eStructuralFeatures xsi:type="ecore:EReference" name="instance" ordered="false"
+            upperBound="-1" eType="#//vpm/editmodel/ModelElement" eOpposite="#//vpm/editmodel/ModelElement/type"/>
+        <eStructuralFeatures xsi:type="ecore:EReference" name="supertype" ordered="false"
+            upperBound="-1" eType="#//vpm/editmodel/ModelElement" eOpposite="#//vpm/editmodel/ModelElement/subtype"/>
+        <eStructuralFeatures xsi:type="ecore:EReference" name="subtype" ordered="false"
+            upperBound="-1" eType="#//vpm/editmodel/ModelElement" eOpposite="#//vpm/editmodel/ModelElement/supertype"/>
+        <eStructuralFeatures xsi:type="ecore:EReference" name="relationsTo" upperBound="-1"
+            eType="#//vpm/editmodel/Relation" eOpposite="#//vpm/editmodel/Relation/to"/>
+        <eStructuralFeatures xsi:type="ecore:EReference" name="subRelationships" ordered="false"
+            upperBound="-1" eType="#//vpm/editmodel/Relationship" eOpposite="#//vpm/editmodel/Relationship/supplier"/>
+        <eStructuralFeatures xsi:type="ecore:EReference" name="superRelationships"
+            ordered="false" upperBound="-1" eType="#//vpm/editmodel/Relationship"
+            containment="true" eOpposite="#//vpm/editmodel/Relationship/client"/>
+        <eStructuralFeatures xsi:type="ecore:EAttribute" name="typeStr" ordered="false"
+            unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+        <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false"
+            unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+        <eStructuralFeatures xsi:type="ecore:EAttribute" name="namespaceStr" ordered="false"
+            unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+        <eStructuralFeatures xsi:type="ecore:EAttribute" name="realElement" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+        <eStructuralFeatures xsi:type="ecore:EReference" name="relationsFrom" upperBound="-1"
+            eType="#//vpm/editmodel/Relation" containment="true" eOpposite="#//vpm/editmodel/Relation/from"/>
+      </eClassifiers>
+      <eClassifiers xsi:type="ecore:EClass" name="Relationship" abstract="true" eSuperTypes="#//vpm/editmodel/VPMElement">
+        <eStructuralFeatures xsi:type="ecore:EAttribute" name="clientStr" ordered="false"
+            unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+        <eStructuralFeatures xsi:type="ecore:EAttribute" name="supplierStr" ordered="false"
+            unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+        <eStructuralFeatures xsi:type="ecore:EReference" name="client" ordered="false"
+            eType="#//vpm/editmodel/ModelElement" transient="true" eOpposite="#//vpm/editmodel/ModelElement/superRelationships"/>
+        <eStructuralFeatures xsi:type="ecore:EReference" name="supplier" ordered="false"
+            lowerBound="1" eType="#//vpm/editmodel/ModelElement" eOpposite="#//vpm/editmodel/ModelElement/subRelationships"/>
+      </eClassifiers>
+      <eClassifiers xsi:type="ecore:EClass" name="Entity" eSuperTypes="#//vpm/editmodel/ModelElement">
+        <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//vpm/editmodel/Entity"
+            eOpposite="#//vpm/editmodel/Entity/components"/>
+        <eStructuralFeatures xsi:type="ecore:EReference" name="components" ordered="false"
+            upperBound="-1" eType="#//vpm/editmodel/Entity" containment="true" eOpposite="#//vpm/editmodel/Entity/parent"/>
+        <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" ordered="false"
+            unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+      </eClassifiers>
+      <eClassifiers xsi:type="ecore:EClass" name="Relation" eSuperTypes="#//vpm/editmodel/ModelElement">
+        <eStructuralFeatures xsi:type="ecore:EReference" name="to" ordered="false"
+            lowerBound="1" eType="#//vpm/editmodel/ModelElement" eOpposite="#//vpm/editmodel/ModelElement/relationsTo"/>
+        <eStructuralFeatures xsi:type="ecore:EAttribute" name="fromStr" ordered="false"
+            unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+        <eStructuralFeatures xsi:type="ecore:EAttribute" name="toStr" ordered="false"
+            unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+        <eStructuralFeatures xsi:type="ecore:EReference" name="from" eType="#//vpm/editmodel/ModelElement"
+            eOpposite="#//vpm/editmodel/ModelElement/relationsFrom"/>
+      </eClassifiers>
+      <eClassifiers xsi:type="ecore:EClass" name="TypeOf" eSuperTypes="#//vpm/editmodel/Relationship"/>
+      <eClassifiers xsi:type="ecore:EClass" name="SupertypeOf" eSuperTypes="#//vpm/editmodel/Relationship"/>
+      <eClassifiers xsi:type="ecore:EClass" name="VPMElement" abstract="true" eSuperTypes="#//gtasm/metamodel/asm/core/AnnotatedElement">
+        <eStructuralFeatures xsi:type="ecore:EReference" name="variableReferences"
+            upperBound="-1" eType="#//gtasm/metamodel/asm/terms/VariableReference"
+            containment="true"/>
+      </eClassifiers>
+    </eSubpackages>
+  </eSubpackages>
+  <eSubpackages name="gtasm" nsURI="http:///viatragtasmmodel/gtasm.ecore" nsPrefix="viatragtasmmodel.gtasm">
+    <eSubpackages name="metamodel" nsURI="http:///viatragtasmmodel/gtasm/metamodel.ecore"
+        nsPrefix="viatragtasmmodel.gtasm.metamodel">
+      <eSubpackages name="modelmanagement" nsURI="http:///viatragtasmmodel/gtasm/metamodel/modelmanagement.ecore"
+          nsPrefix="viatragtasmmodel.gtasm.metamodel.modelmanagement">
+        <eSubpackages name="queryFunctions" nsURI="http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions.ecore"
+            nsPrefix="viatragtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions">
+          <eClassifiers xsi:type="ecore:EClass" name="Aggregate" eSuperTypes="#//gtasm/metamodel/asm/terms/ModelElementQuery"/>
+          <eClassifiers xsi:type="ecore:EClass" name="Source" eSuperTypes="#//gtasm/metamodel/asm/terms/ModelElementQuery"/>
+          <eClassifiers xsi:type="ecore:EClass" name="Target" eSuperTypes="#//gtasm/metamodel/asm/terms/ModelElementQuery"/>
+          <eClassifiers xsi:type="ecore:EClass" name="ElementReference" eSuperTypes="#//gtasm/metamodel/asm/terms/ModelElementQuery"/>
+          <eClassifiers xsi:type="ecore:EClass" name="FullyQualifiedName" eSuperTypes="#//gtasm/metamodel/asm/terms/ModelElementQuery"/>
+          <eClassifiers xsi:type="ecore:EClass" name="Name" eSuperTypes="#//gtasm/metamodel/asm/terms/ModelElementQuery"/>
+          <eClassifiers xsi:type="ecore:EClass" name="Value" eSuperTypes="#//gtasm/metamodel/asm/terms/ModelElementQuery"/>
+          <eClassifiers xsi:type="ecore:EClass" name="Inverse" eSuperTypes="#//gtasm/metamodel/asm/terms/ModelElementQuery"/>
+          <eClassifiers xsi:type="ecore:EClass" name="Multiplicity" eSuperTypes="#//gtasm/metamodel/asm/terms/ModelElementQuery"/>
+        </eSubpackages>
+        <eSubpackages name="manipulationRules" nsURI="http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules.ecore"
+            nsPrefix="viatragtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules">
+          <eSubpackages name="deletion" nsURI="http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion.ecore"
+              nsPrefix="viatragtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion">
+            <eClassifiers xsi:type="ecore:EClass" name="RelationshipDeleteRule" abstract="true"
+                eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ModelManipulationRule">
+              <eStructuralFeatures xsi:type="ecore:EReference" name="super" ordered="false"
+                  lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+              <eStructuralFeatures xsi:type="ecore:EReference" name="sub" ordered="false"
+                  lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+            </eClassifiers>
+            <eClassifiers xsi:type="ecore:EClass" name="ElementDeleteRule" eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ModelManipulationRule">
+              <eStructuralFeatures xsi:type="ecore:EReference" name="element" ordered="false"
+                  lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+              <eStructuralFeatures xsi:type="ecore:EAttribute" name="semantics" ordered="false"
+                  lowerBound="1" eType="#//gtasm/metamodel/asm/enums/DeleteSemantics"
+                  defaultValueLiteral="dropContent"/>
+            </eClassifiers>
+            <eClassifiers xsi:type="ecore:EClass" name="DeleteInstanceOf" eSuperTypes="#//gtasm/metamodel/modelmanagement/manipulationRules/deletion/RelationshipDeleteRule"/>
+            <eClassifiers xsi:type="ecore:EClass" name="DeleteSupertypeOf" eSuperTypes="#//gtasm/metamodel/modelmanagement/manipulationRules/deletion/RelationshipDeleteRule"/>
+          </eSubpackages>
+          <eSubpackages name="creation" nsURI="http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation.ecore"
+              nsPrefix="viatragtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation">
+            <eClassifiers xsi:type="ecore:EClass" name="RelationshipCreateRule" abstract="true"
+                eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ModelManipulationRule">
+              <eStructuralFeatures xsi:type="ecore:EReference" name="super" ordered="false"
+                  lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+              <eStructuralFeatures xsi:type="ecore:EReference" name="sub" ordered="false"
+                  lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+            </eClassifiers>
+            <eClassifiers xsi:type="ecore:EClass" name="RelationCreateRule" eSuperTypes="#//gtasm/metamodel/modelmanagement/manipulationRules/creation/ElementCreateRule">
+              <eStructuralFeatures xsi:type="ecore:EReference" name="target" ordered="false"
+                  lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+              <eStructuralFeatures xsi:type="ecore:EReference" name="source" ordered="false"
+                  lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+            </eClassifiers>
+            <eClassifiers xsi:type="ecore:EClass" name="ElementCreateRule" abstract="true"
+                eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ModelManipulationRule">
+              <eStructuralFeatures xsi:type="ecore:EReference" name="type" ordered="false"
+                  lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+              <eStructuralFeatures xsi:type="ecore:EReference" name="targetVariable"
+                  ordered="false" lowerBound="1" eType="#//gtasm/metamodel/asm/terms/VariableReference"
+                  containment="true"/>
+            </eClassifiers>
+            <eClassifiers xsi:type="ecore:EClass" name="EntityCreateRule" eSuperTypes="#//gtasm/metamodel/modelmanagement/manipulationRules/creation/ElementCreateRule">
+              <eStructuralFeatures xsi:type="ecore:EReference" name="parent" ordered="false"
+                  lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+            </eClassifiers>
+            <eClassifiers xsi:type="ecore:EClass" name="CreateSupertypeOf" eSuperTypes="#//gtasm/metamodel/modelmanagement/manipulationRules/creation/RelationshipCreateRule"/>
+            <eClassifiers xsi:type="ecore:EClass" name="CreateInstanceOf" eSuperTypes="#//gtasm/metamodel/modelmanagement/manipulationRules/creation/RelationshipCreateRule"/>
+          </eSubpackages>
+          <eSubpackages name="copymove" nsURI="http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove.ecore"
+              nsPrefix="viatragtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove">
+            <eClassifiers xsi:type="ecore:EClass" name="MoveRule" eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ModelManipulationRule">
+              <eStructuralFeatures xsi:type="ecore:EReference" name="trgContainer"
+                  ordered="false" lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term"
+                  containment="true"/>
+              <eStructuralFeatures xsi:type="ecore:EReference" name="srcRoot" ordered="false"
+                  lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+            </eClassifiers>
+            <eClassifiers xsi:type="ecore:EClass" name="ModelCopyRule" eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ModelManipulationRule">
+              <eStructuralFeatures xsi:type="ecore:EReference" name="targetVariable"
+                  ordered="false" eType="#//gtasm/metamodel/asm/terms/VariableReference"
+                  containment="true"/>
+              <eStructuralFeatures xsi:type="ecore:EReference" name="trgContainer"
+                  ordered="false" lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term"
+                  containment="true"/>
+              <eStructuralFeatures xsi:type="ecore:EReference" name="srcRoot" ordered="false"
+                  lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+              <eStructuralFeatures xsi:type="ecore:EAttribute" name="semantics" ordered="false"
+                  lowerBound="1" eType="#//gtasm/metamodel/asm/enums/CopySemantics"
+                  defaultValueLiteral="dropOuterEdges"/>
+            </eClassifiers>
+          </eSubpackages>
+          <eSubpackages name="update" nsURI="http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update.ecore"
+              nsPrefix="viatragtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update">
+            <eClassifiers xsi:type="ecore:EClass" name="RenameRule" eSuperTypes="#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetRule"/>
+            <eClassifiers xsi:type="ecore:EClass" name="SetRule" abstract="true" eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ModelManipulationRule">
+              <eStructuralFeatures xsi:type="ecore:EReference" name="element" ordered="false"
+                  lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+              <eStructuralFeatures xsi:type="ecore:EReference" name="value" ordered="false"
+                  lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+            </eClassifiers>
+            <eClassifiers xsi:type="ecore:EClass" name="SetValueRule" eSuperTypes="#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetRule"/>
+            <eClassifiers xsi:type="ecore:EClass" name="SetRelationTo" eSuperTypes="#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetRelationEndPoint"/>
+            <eClassifiers xsi:type="ecore:EClass" name="SetRelationEndPoint" abstract="true"
+                eSuperTypes="#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetRule"/>
+            <eClassifiers xsi:type="ecore:EClass" name="SetRelationFrom" eSuperTypes="#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetRelationEndPoint"/>
+            <eClassifiers xsi:type="ecore:EClass" name="SetMultiplicityRule" eSuperTypes="#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetRule"/>
+            <eClassifiers xsi:type="ecore:EClass" name="SetInverseRule" eSuperTypes="#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetRule"/>
+            <eClassifiers xsi:type="ecore:EClass" name="SetAnyTargetRule" eSuperTypes="#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetAnyEndpointRule"/>
+            <eClassifiers xsi:type="ecore:EClass" name="SetAnyEndpointRule" abstract="true"
+                eSuperTypes="#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetRule"/>
+            <eClassifiers xsi:type="ecore:EClass" name="SetAnySourceRule" eSuperTypes="#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetAnyEndpointRule"/>
+            <eClassifiers xsi:type="ecore:EClass" name="SetAggregationRule" eSuperTypes="#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetRule"/>
+          </eSubpackages>
+        </eSubpackages>
+      </eSubpackages>
+      <eSubpackages name="asm" nsURI="http:///viatragtasmmodel/gtasm/metamodel/asm.ecore"
+          nsPrefix="viatragtasmmodel.gtasm.metamodel.asm">
+        <eSubpackages name="definitions" nsURI="http:///viatragtasmmodel/gtasm/metamodel/asm/definitions.ecore"
+            nsPrefix="viatragtasmmodel.gtasm.metamodel.asm.definitions">
+          <eClassifiers xsi:type="ecore:EClass" name="Machine" eSuperTypes="#//gtasm/metamodel/gt/PatternContainer">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="mainRule" ordered="false"
+                eType="#//gtasm/metamodel/asm/definitions/Rule"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="gtRuleDefinitions"
+                ordered="false" upperBound="-1" eType="#//gtasm/metamodel/gt/GTRule"
+                containment="true" eOpposite="#//gtasm/metamodel/gt/GTRule/namespace"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="asmFunctionDefinitions"
+                ordered="false" upperBound="-1" eType="#//gtasm/metamodel/asm/definitions/ASMFunction"
+                containment="true" eOpposite="#//gtasm/metamodel/asm/definitions/ASMFunction/namespace"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="asmRuleDefinitions"
+                ordered="false" upperBound="-1" eType="#//gtasm/metamodel/asm/definitions/Rule"
+                containment="true" eOpposite="#//gtasm/metamodel/asm/definitions/Rule/namespace"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="module" eType="#//gtasm/metamodel/asm/definitions/Module"
+                eOpposite="#//gtasm/metamodel/asm/definitions/Module/machine"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="Rule" eSuperTypes="#//gtasm/metamodel/asm/core/GTASMElement">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="body" ordered="false"
+                eType="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation" containment="true"
+                eOpposite="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation/asmRule"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="symParameters"
+                ordered="false" upperBound="-1" eType="#//gtasm/metamodel/asm/definitions/SymbolicRuleParameter"
+                containment="true"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="localVariables"
+                ordered="false" upperBound="-1" eType="#//gtasm/metamodel/asm/definitions/Variable"
+                containment="true"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="namespace" lowerBound="1"
+                eType="#//gtasm/metamodel/asm/definitions/Machine" eOpposite="#//gtasm/metamodel/asm/definitions/Machine/asmRuleDefinitions"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="Variable" eSuperTypes="#//gtasm/metamodel/asm/core/GTASMElement">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="references" ordered="false"
+                upperBound="-1" eType="#//gtasm/metamodel/asm/terms/VariableReference"
+                eOpposite="#//gtasm/metamodel/asm/terms/VariableReference/variable"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="scope" ordered="false"
+                eType="#//gtasm/metamodel/asm/compoundRules/BlockRule" transient="true"
+                eOpposite="#//gtasm/metamodel/asm/compoundRules/BlockRule/localVariables"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="variableType" eType="#//gtasm/metamodel/asm/definitions/TypeConstant"
+                containment="true"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="VariableDefinition" eSuperTypes="#//gtasm/metamodel/asm/core/GTASMElement">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="variable" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/definitions/Variable"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="value" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="ASMFunction" eSuperTypes="#//gtasm/metamodel/asm/definitions/FunctionDefinition">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="initialValues"
+                ordered="false" upperBound="-1" eType="#//gtasm/metamodel/asm/definitions/InitialValue"
+                containment="true"/>
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="arity" ordered="false"
+                unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="namespace" lowerBound="1"
+                eType="#//gtasm/metamodel/asm/definitions/Machine" eOpposite="#//gtasm/metamodel/asm/definitions/Machine/asmFunctionDefinitions"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="returnType" eType="#//gtasm/metamodel/asm/definitions/TypeConstant"
+                containment="true"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="argumentTypes"
+                upperBound="-1" eType="#//gtasm/metamodel/asm/definitions/TypeConstant"
+                containment="true"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="FunctionDefinition" abstract="true"
+              eSuperTypes="#//gtasm/metamodel/asm/core/GTASMElement"/>
+          <eClassifiers xsi:type="ecore:EClass" name="InitialValue" eSuperTypes="#//gtasm/metamodel/asm/core/GTASMElement">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="locations" ordered="false"
+                upperBound="-1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="value" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="SymbolicRuleParameter" eSuperTypes="#//gtasm/metamodel/asm/core/GTASMElement">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="variable" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/definitions/Variable"/>
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="direction" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/enums/DirectionKind"
+                defaultValueLiteral="in"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="Module" eSuperTypes="#//gtasm/metamodel/asm/core/GTASMElement">
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="fileName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="machine" upperBound="-1"
+                eType="#//gtasm/metamodel/asm/definitions/Machine" containment="true"
+                eOpposite="#//gtasm/metamodel/asm/definitions/Machine/module"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="import" upperBound="-1"
+                eType="#//gtasm/metamodel/asm/definitions/ImportDeclaration" containment="true"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="namespace" eType="#//gtasm/metamodel/asm/definitions/NamespaceDefinition"
+                containment="true"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="ImportDeclaration" eSuperTypes="#//gtasm/metamodel/asm/core/GTASMElement">
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="importValue" lowerBound="1"
+                eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="NamespaceDefinition" eSuperTypes="#//gtasm/metamodel/asm/core/GTASMElement">
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="namespaceValue"
+                lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="Transformation" eSuperTypes="#//gtasm/metamodel/asm/core/GTASMElement">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="modules" upperBound="-1"
+                eType="#//gtasm/metamodel/asm/definitions/Module" containment="true"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="TypeConstant" eSuperTypes="#//gtasm/metamodel/asm/core/GTASMElement">
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" lowerBound="1"
+                eType="#//gtasm/metamodel/asm/enums/ValueKind"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="ChangeEvent" eSuperTypes="#//gtasm/metamodel/asm/core/GTASMElement">
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="changeKind" lowerBound="1"
+                eType="#//gtasm/metamodel/asm/enums/ChangeKind" defaultValueLiteral="new"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="variableReference"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/terms/VariableReference"
+                containment="true"/>
+          </eClassifiers>
+        </eSubpackages>
+        <eSubpackages name="core" nsURI="http:///viatragtasmmodel/gtasm/metamodel/asm/core.ecore"
+            nsPrefix="viatragtasmmodel.gtasm.metamodel.asm.core">
+          <eClassifiers xsi:type="ecore:EClass" name="Annotation">
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" ordered="false"
+                unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="key" ordered="false"
+                unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="GTASMElement" abstract="true"
+              eSuperTypes="#//gtasm/metamodel/asm/core/AnnotatedElement">
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false"
+                unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" ordered="false"
+                lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong"/>
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="fqn" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="runtimeAnnotations"
+                ordered="false" upperBound="-1" eType="#//gtasm/metamodel/asm/core/RuntimeAnnotation"
+                containment="true"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="RuntimeAnnotation" eSuperTypes="#//gtasm/metamodel/asm/core/AnnotatedElement">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="elements" upperBound="-1"
+                eType="#//gtasm/metamodel/asm/core/RuntimeAnnotationElement" containment="true"/>
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="annotationName"
+                lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="RuntimeAnnotationElement" eSuperTypes="#//gtasm/metamodel/asm/core/AnnotatedElement">
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" ordered="false"
+                unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="key" ordered="false"
+                unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="AnnotatedElement" abstract="true">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="annotations" ordered="false"
+                upperBound="-1" eType="#//gtasm/metamodel/asm/core/Annotation" containment="true"/>
+          </eClassifiers>
+        </eSubpackages>
+        <eSubpackages name="simpleRules" nsURI="http:///viatragtasmmodel/gtasm/metamodel/asm/simpleRules.ecore"
+            nsPrefix="viatragtasmmodel.gtasm.metamodel.asm.simpleRules">
+          <eClassifiers xsi:type="ecore:EClass" name="ConditionalRuleTry" eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="ruleToTry" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation"
+                containment="true"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="ruleElse" ordered="false"
+                eType="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation" containment="true"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="ConditionalRuleIf" eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="expressionToTest"
+                ordered="false" lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term"
+                containment="true"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="ruleTrue" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation"
+                containment="true"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="ruleFalse" ordered="false"
+                eType="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation" containment="true"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="CallRule" eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="rule" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/definitions/Rule"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="actualParameters"
+                upperBound="-1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="RuleUpdateVariable" eSuperTypes="#//gtasm/metamodel/asm/simpleRules/RuleUpdate">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="variable" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/terms/VariableReference"
+                containment="true"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="RuleUpdate" abstract="true"
+              eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="value" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="GTRuleInvocation" eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="rule" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/gt/GTRule"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="invoker" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/compoundRules/CollectionIteratorRule"
+                transient="true" eOpposite="#//gtasm/metamodel/asm/compoundRules/CollectionIteratorRule/gtrule"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="actualParameters"
+                upperBound="-1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="RuleUpdateASMFunction" eSuperTypes="#//gtasm/metamodel/asm/simpleRules/RuleUpdate">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="locations" ordered="false"
+                upperBound="-1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="function" ordered="false"
+                eType="#//gtasm/metamodel/asm/definitions/ASMFunction"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="FailRule" eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation"/>
+          <eClassifiers xsi:type="ecore:EClass" name="LogRule" eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="out" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="level" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/enums/LogLevel" defaultValueLiteral="debug"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="PrintRule" eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="out" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="buffer" eType="#//gtasm/metamodel/asm/terms/Term"
+                containment="true"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="SkipRule" eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation"/>
+          <eClassifiers xsi:type="ecore:EClass" name="ModelManipulationRule" abstract="true"
+              eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation"/>
+          <eClassifiers xsi:type="ecore:EClass" name="ASMRuleInvocation" abstract="true"
+              eSuperTypes="#//gtasm/metamodel/asm/core/GTASMElement">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="caller" ordered="false"
+                eType="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation" transient="true"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="asmRule" eType="#//gtasm/metamodel/asm/definitions/Rule"
+                eOpposite="#//gtasm/metamodel/asm/definitions/Rule/body"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="PrintLnRule" eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="out" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="buffer" eType="#//gtasm/metamodel/asm/terms/Term"
+                containment="true"/>
+          </eClassifiers>
+        </eSubpackages>
+        <eSubpackages name="compoundRules" nsURI="http:///viatragtasmmodel/gtasm/metamodel/asm/compoundRules.ecore"
+            nsPrefix="viatragtasmmodel.gtasm.metamodel.asm.compoundRules">
+          <eClassifiers xsi:type="ecore:EClass" name="SequentialRule" eSuperTypes="#//gtasm/metamodel/asm/compoundRules/NestedRule"/>
+          <eClassifiers xsi:type="ecore:EClass" name="NestedRule" abstract="true"
+              eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="subrules" upperBound="-1"
+                eType="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation" containment="true"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="RandomRule" eSuperTypes="#//gtasm/metamodel/asm/compoundRules/NestedRule"/>
+          <eClassifiers xsi:type="ecore:EClass" name="ParallelRule" eSuperTypes="#//gtasm/metamodel/asm/compoundRules/NestedRule"/>
+          <eClassifiers xsi:type="ecore:EClass" name="ChooseRule" eSuperTypes="#//gtasm/metamodel/asm/compoundRules/CollectionIteratorRule"/>
+          <eClassifiers xsi:type="ecore:EClass" name="CollectionIteratorRule" abstract="true"
+              eSuperTypes="#//gtasm/metamodel/asm/compoundRules/BlockRule">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="containmentConstraints"
+                upperBound="-1" eType="#//gtasm/metamodel/gt/ContainmentConstraint"
+                containment="true"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="condition" ordered="false"
+                eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="gtrule" ordered="false"
+                eType="#//gtasm/metamodel/asm/simpleRules/GTRuleInvocation" containment="true"
+                eOpposite="#//gtasm/metamodel/asm/simpleRules/GTRuleInvocation/invoker"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="CompoundRule" abstract="true"
+              eSuperTypes="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="body" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation"
+                containment="true"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="ForallRule" eSuperTypes="#//gtasm/metamodel/asm/compoundRules/CollectionIteratorRule"/>
+          <eClassifiers xsi:type="ecore:EClass" name="IterateRule" eSuperTypes="#//gtasm/metamodel/asm/compoundRules/CompoundRule"/>
+          <eClassifiers xsi:type="ecore:EClass" name="LetRule" eSuperTypes="#//gtasm/metamodel/asm/compoundRules/BlockRule">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="definitions" upperBound="-1"
+                eType="#//gtasm/metamodel/asm/definitions/VariableDefinition" containment="true"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="BlockRule" abstract="true" eSuperTypes="#//gtasm/metamodel/asm/compoundRules/CompoundRule">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="localVariables"
+                upperBound="-1" eType="#//gtasm/metamodel/asm/definitions/Variable"
+                containment="true" eOpposite="#//gtasm/metamodel/asm/definitions/Variable/scope"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="WhenRule" eSuperTypes="#//gtasm/metamodel/asm/compoundRules/CompoundRule">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="conditions" eType="#//gtasm/metamodel/asm/definitions/ChangeEvent"/>
+          </eClassifiers>
+        </eSubpackages>
+        <eSubpackages name="enums" nsURI="http:///viatragtasmmodel/gtasm/metamodel/asm/enums.ecore"
+            nsPrefix="viatragtasmmodel.gtasm.metamodel.asm.enums">
+          <eClassifiers xsi:type="ecore:EEnum" name="CopySemantics">
+            <eLiterals name="dropOuterEdges"/>
+            <eLiterals name="copyOuterEdges" value="1"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EEnum" name="DeleteSemantics">
+            <eLiterals name="dropContent"/>
+            <eLiterals name="moveContent" value="1"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EEnum" name="LogLevel">
+            <eLiterals name="debug"/>
+            <eLiterals name="warning" value="1"/>
+            <eLiterals name="error" value="2"/>
+            <eLiterals name="fatal" value="3"/>
+            <eLiterals name="info" value="4"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EEnum" name="ContainmentMode">
+            <eLiterals name="in"/>
+            <eLiterals name="below" value="1"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EEnum" name="ValueKind">
+            <eLiterals name="undef"/>
+            <eLiterals name="boolean" value="1"/>
+            <eLiterals name="string" value="2"/>
+            <eLiterals name="integer" value="3"/>
+            <eLiterals name="double" value="4"/>
+            <eLiterals name="modelelement" value="5"/>
+            <eLiterals name="multiplicity" value="6"/>
+            <eLiterals name="error" value="7"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EEnum" name="DirectionKind">
+            <eLiterals name="in"/>
+            <eLiterals name="inout" value="1"/>
+            <eLiterals name="out" value="2"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EEnum" name="MultiplicityKind">
+            <eLiterals name="one_to_one"/>
+            <eLiterals name="one_to_many" value="1"/>
+            <eLiterals name="many_to_one" value="2"/>
+            <eLiterals name="many_to_many" value="3"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EEnum" name="ChangeKind">
+            <eLiterals name="new"/>
+            <eLiterals name="delete" value="1"/>
+            <eLiterals name="changed" value="2"/>
+          </eClassifiers>
+        </eSubpackages>
+        <eSubpackages name="terms" nsURI="http:///viatragtasmmodel/gtasm/metamodel/asm/terms.ecore"
+            nsPrefix="viatragtasmmodel.gtasm.metamodel.asm.terms">
+          <eClassifiers xsi:type="ecore:EClass" name="Term" abstract="true" eSuperTypes="#//gtasm/metamodel/asm/core/GTASMElement">
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/enums/ValueKind" defaultValueLiteral="undef"/>
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="VariableReference" eSuperTypes="#//gtasm/metamodel/asm/terms/Term">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="variable" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/definitions/Variable"
+                eOpposite="#//gtasm/metamodel/asm/definitions/Variable/references"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="GTPatternCall" eSuperTypes="#//gtasm/metamodel/asm/terms/Term">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="actualParameters"
+                upperBound="-1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="calledPattern"
+                ordered="false" eType="#//gtasm/metamodel/gt/GTPattern"/>
+            <eStructuralFeatures xsi:type="ecore:EReference" name="matchCounter" eType="#//gtasm/metamodel/gt/GTMatchCounter"
+                containment="true" eOpposite="#//gtasm/metamodel/gt/GTMatchCounter/patternCall"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="ASMFunctionInvocation" eSuperTypes="#//gtasm/metamodel/asm/terms/FunctionInvocation">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="calledFunction"
+                ordered="false" eType="#//gtasm/metamodel/asm/definitions/ASMFunction"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="FunctionInvocation" abstract="true"
+              eSuperTypes="#//gtasm/metamodel/asm/terms/Term">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="actualParameters"
+                ordered="false" upperBound="-1" eType="#//gtasm/metamodel/asm/terms/Term"
+                containment="true"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="Constant" eSuperTypes="#//gtasm/metamodel/asm/terms/Term">
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" ordered="false"
+                unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="NativeFunctionInvocation" eSuperTypes="#//gtasm/metamodel/asm/terms/FunctionInvocation">
+            <eStructuralFeatures xsi:type="ecore:EAttribute" name="functionName" ordered="false"
+                unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+          </eClassifiers>
+          <eClassifiers xsi:type="ecore:EClass" name="ModelElementQuery" eSuperTypes="#//gtasm/metamodel/asm/terms/Term">
+            <eStructuralFeatures xsi:type="ecore:EReference" name="argument" ordered="false"
+                lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+          </eClassifiers>
+          <eSubpackages name="builtInFunctions" nsURI="http:///viatragtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions.ecore"
+              nsPrefix="viatragtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions">
+            <eClassifiers xsi:type="ecore:EClass" name="ArithmeticOperation" abstract="true"
+                eSuperTypes="#//gtasm/metamodel/asm/terms/FunctionInvocation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="Remainder" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/ArithmeticOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="Multiply" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/ArithmeticOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="Plus" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/ArithmeticOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="Minus" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/ArithmeticOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="Division" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/ArithmeticOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="RelationalOperation" abstract="true"
+                eSuperTypes="#//gtasm/metamodel/asm/terms/FunctionInvocation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="And" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/RelationalOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="Equals" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/RelationalOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="GreaterThan" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/RelationalOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="GreaterThanOrEqualTo" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/RelationalOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="LessThan" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/RelationalOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="LessThanOrEqualTo" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/RelationalOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="Not" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/RelationalOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="NotEquals" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/RelationalOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="Or" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/RelationalOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="XOr" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/RelationalOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="ToString" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/ConversionOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="ToInt" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/ConversionOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="ToBoolean" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/ConversionOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="ToDouble" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/ConversionOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="ToModelElement" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/ConversionOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="ToMultiplicity" eSuperTypes="#//gtasm/metamodel/asm/terms/builtInFunctions/ConversionOperation"/>
+            <eClassifiers xsi:type="ecore:EClass" name="ConversionOperation" abstract="true"
+                eSuperTypes="#//gtasm/metamodel/asm/terms/FunctionInvocation"/>
+          </eSubpackages>
+        </eSubpackages>
+      </eSubpackages>
+      <eSubpackages name="gt" nsURI="http:///viatragtasmmodel/gtasm/metamodel/gt.ecore"
+          nsPrefix="viatragtasmmodel.gtasm.metamodel.gt">
+        <eClassifiers xsi:type="ecore:EClass" name="GTPatternBody" eSuperTypes="#//gtasm/metamodel/gt/PatternContainer">
+          <eStructuralFeatures xsi:type="ecore:EReference" name="negativePatterns"
+              ordered="false" upperBound="-1" eType="#//gtasm/metamodel/asm/terms/GTPatternCall"
+              containment="true"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="localVariables" ordered="false"
+              upperBound="-1" eType="#//gtasm/metamodel/gt/PatternVariable" containment="true"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="calledPatterns" ordered="false"
+              upperBound="-1" eType="#//gtasm/metamodel/asm/terms/GTPatternCall" containment="true"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="checkExpressions"
+              ordered="false" upperBound="-1" eType="#//gtasm/metamodel/asm/terms/Term"
+              containment="true"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="patternGraph" ordered="false"
+              lowerBound="1" eType="#//vpm/editmodel/Entity" containment="true"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="containmentConstraints"
+              ordered="false" upperBound="-1" eType="#//gtasm/metamodel/gt/ContainmentConstraint"
+              containment="true"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="variableAssignments"
+              ordered="false" upperBound="-1" eType="#//gtasm/metamodel/gt/PatternVariableAssignment"
+              containment="true"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="header" lowerBound="1"
+              eType="#//gtasm/metamodel/gt/GTPattern" eOpposite="#//gtasm/metamodel/gt/GTPattern/patternBodies"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="elementWrappers"
+              upperBound="-1" eType="#//vpm/editmodel/ModelElement" containment="true"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="danglingRelationships"
+              upperBound="-1" eType="#//vpm/editmodel/Relationship" containment="true"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="danglingRelations"
+              upperBound="-1" eType="#//vpm/editmodel/Relation" containment="true"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="nonInjectivityConstraints"
+              upperBound="-1" eType="#//gtasm/metamodel/gt/NonInjectivityConstraint"
+              containment="true"/>
+        </eClassifiers>
+        <eClassifiers xsi:type="ecore:EClass" name="GTPattern" eSuperTypes="#//gtasm/metamodel/asm/core/GTASMElement">
+          <eStructuralFeatures xsi:type="ecore:EReference" name="symParameters" ordered="false"
+              upperBound="-1" eType="#//gtasm/metamodel/gt/PatternVariable" containment="true"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="patternBodies" ordered="false"
+              upperBound="-1" eType="#//gtasm/metamodel/gt/GTPatternBody" containment="true"
+              eOpposite="#//gtasm/metamodel/gt/GTPatternBody/header"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="namespace" lowerBound="1"
+              eType="#//gtasm/metamodel/asm/definitions/Machine"/>
+          <eStructuralFeatures xsi:type="ecore:EAttribute" name="distinctMatching"
+              eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+              defaultValueLiteral="true"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="container" lowerBound="1"
+              eType="#//gtasm/metamodel/gt/PatternContainer" eOpposite="#//gtasm/metamodel/gt/PatternContainer/gtPatternDefinitions"/>
+        </eClassifiers>
+        <eClassifiers xsi:type="ecore:EClass" name="PatternVariable" eSuperTypes="#//gtasm/metamodel/asm/definitions/Variable">
+          <eStructuralFeatures xsi:type="ecore:EReference" name="elementInPattern"
+              ordered="false" upperBound="-1" eType="#//vpm/editmodel/ModelElement"/>
+        </eClassifiers>
+        <eClassifiers xsi:type="ecore:EClass" name="PatternVariableAssignment" eSuperTypes="#//gtasm/metamodel/gt/PatternVariableConstraint"/>
+        <eClassifiers xsi:type="ecore:EClass" name="GTRule" eSuperTypes="#//gtasm/metamodel/gt/PatternContainer">
+          <eStructuralFeatures xsi:type="ecore:EReference" name="symParameters" upperBound="-1"
+              eType="#//gtasm/metamodel/asm/definitions/SymbolicRuleParameter" containment="true"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="precondition" ordered="false"
+              eType="#//gtasm/metamodel/asm/terms/GTPatternCall" containment="true"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="localVariables" upperBound="-1"
+              eType="#//gtasm/metamodel/asm/definitions/Variable" containment="true"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="action" ordered="false"
+              eType="#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation" containment="true"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="postcondition" ordered="false"
+              eType="#//gtasm/metamodel/asm/terms/GTPatternCall" containment="true"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="namespace" eType="#//gtasm/metamodel/asm/definitions/Machine"
+              eOpposite="#//gtasm/metamodel/asm/definitions/Machine/gtRuleDefinitions"/>
+        </eClassifiers>
+        <eClassifiers xsi:type="ecore:EClass" name="ContainmentConstraint" eSuperTypes="#//gtasm/metamodel/asm/core/GTASMElement">
+          <eStructuralFeatures xsi:type="ecore:EReference" name="variable" ordered="false"
+              lowerBound="1" eType="#//gtasm/metamodel/asm/definitions/Variable"/>
+          <eStructuralFeatures xsi:type="ecore:EAttribute" name="mode" ordered="false"
+              lowerBound="1" eType="#//gtasm/metamodel/asm/enums/ContainmentMode"
+              defaultValueLiteral="in"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="parent" ordered="false"
+              lowerBound="1" eType="#//gtasm/metamodel/asm/terms/Term" containment="true"/>
+        </eClassifiers>
+        <eClassifiers xsi:type="ecore:EClass" name="GTMatchCounter" eSuperTypes="#//gtasm/metamodel/asm/core/GTASMElement">
+          <eStructuralFeatures xsi:type="ecore:EReference" name="patternCall" eType="#//gtasm/metamodel/asm/terms/GTPatternCall"
+              eOpposite="#//gtasm/metamodel/asm/terms/GTPatternCall/matchCounter"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="variableReference"
+              eType="#//gtasm/metamodel/asm/terms/VariableReference" containment="true"/>
+        </eClassifiers>
+        <eClassifiers xsi:type="ecore:EClass" name="NonInjectivityConstraint" eSuperTypes="#//gtasm/metamodel/gt/PatternVariableConstraint"/>
+        <eClassifiers xsi:type="ecore:EClass" name="PatternVariableConstraint" abstract="true"
+            eSuperTypes="#//gtasm/metamodel/asm/core/GTASMElement">
+          <eStructuralFeatures xsi:type="ecore:EReference" name="leftValue" ordered="false"
+              eType="#//gtasm/metamodel/asm/terms/VariableReference" containment="true"/>
+          <eStructuralFeatures xsi:type="ecore:EReference" name="rightValue" ordered="false"
+              eType="#//gtasm/metamodel/asm/terms/VariableReference" containment="true"/>
+        </eClassifiers>
+        <eClassifiers xsi:type="ecore:EClass" name="PatternContainer" abstract="true"
+            eSuperTypes="#//gtasm/metamodel/asm/core/GTASMElement">
+          <eStructuralFeatures xsi:type="ecore:EReference" name="gtPatternDefinitions"
+              upperBound="-1" eType="#//gtasm/metamodel/gt/GTPattern" containment="true"
+              eOpposite="#//gtasm/metamodel/gt/GTPattern/container"/>
+        </eClassifiers>
+      </eSubpackages>
+    </eSubpackages>
+  </eSubpackages>
+</ecore:EPackage>
diff --git a/org.eclipse.viatra2.gtasm.model/model/gtasmmodel.ecorediag b/org.eclipse.viatra2.gtasm.model/model/gtasmmodel.ecorediag
new file mode 100644
index 0000000..4a1e9b6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/model/gtasmmodel.ecorediag
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_qaAK4aS4Ed-ymvO7Wc-dcg" type="EcoreTools" measurementUnit="Pixel">
+  <children xmi:type="notation:Node" xmi:id="_qjeP8KS4Ed-ymvO7Wc-dcg" type="1002">
+    <children xmi:type="notation:Node" xmi:id="_qlxWAKS4Ed-ymvO7Wc-dcg" type="4006"/>
+    <children xmi:type="notation:Node" xmi:id="_qlzyQKS4Ed-ymvO7Wc-dcg" type="5003">
+      <styles xmi:type="notation:DrawerStyle" xmi:id="_qlzyQaS4Ed-ymvO7Wc-dcg"/>
+      <styles xmi:type="notation:SortingStyle" xmi:id="_ql0ZUKS4Ed-ymvO7Wc-dcg"/>
+      <styles xmi:type="notation:FilteringStyle" xmi:id="_ql0ZUaS4Ed-ymvO7Wc-dcg"/>
+    </children>
+    <styles xmi:type="notation:ShapeStyle" xmi:id="_qjeP8aS4Ed-ymvO7Wc-dcg" fontColor="4210752" fontName="Lucida Grande" fontHeight="10" fillColor="13150135" lineColor="4210752"/>
+    <styles xmi:type="notation:MultiDiagramLinkStyle" xmi:id="_qjeP8qS4Ed-ymvO7Wc-dcg"/>
+    <element xmi:type="ecore:EPackage" href="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement"/>
+    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qjeP86S4Ed-ymvO7Wc-dcg"/>
+  </children>
+  <children xmi:type="notation:Node" xmi:id="_ql1AYKS4Ed-ymvO7Wc-dcg" type="1002">
+    <children xmi:type="notation:Node" xmi:id="_ql1AZKS4Ed-ymvO7Wc-dcg" type="4006"/>
+    <children xmi:type="notation:Node" xmi:id="_ql1ncKS4Ed-ymvO7Wc-dcg" type="5003">
+      <styles xmi:type="notation:DrawerStyle" xmi:id="_ql1ncaS4Ed-ymvO7Wc-dcg"/>
+      <styles xmi:type="notation:SortingStyle" xmi:id="_ql1ncqS4Ed-ymvO7Wc-dcg"/>
+      <styles xmi:type="notation:FilteringStyle" xmi:id="_ql1nc6S4Ed-ymvO7Wc-dcg"/>
+    </children>
+    <styles xmi:type="notation:ShapeStyle" xmi:id="_ql1AYaS4Ed-ymvO7Wc-dcg" fontColor="4210752" fontName="Lucida Grande" fontHeight="10" fillColor="13150135" lineColor="4210752"/>
+    <styles xmi:type="notation:MultiDiagramLinkStyle" xmi:id="_ql1AYqS4Ed-ymvO7Wc-dcg"/>
+    <element xmi:type="ecore:EPackage" href="gtasmmodel.ecore#//gtasm/metamodel/asm"/>
+    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ql1AY6S4Ed-ymvO7Wc-dcg" x="185"/>
+  </children>
+  <children xmi:type="notation:Node" xmi:id="_ql1ndKS4Ed-ymvO7Wc-dcg" type="1002">
+    <children xmi:type="notation:Node" xmi:id="_ql2OgKS4Ed-ymvO7Wc-dcg" type="4006"/>
+    <children xmi:type="notation:Node" xmi:id="_ql2OgaS4Ed-ymvO7Wc-dcg" type="5003">
+      <styles xmi:type="notation:DrawerStyle" xmi:id="_ql2OgqS4Ed-ymvO7Wc-dcg"/>
+      <styles xmi:type="notation:SortingStyle" xmi:id="_ql2Og6S4Ed-ymvO7Wc-dcg"/>
+      <styles xmi:type="notation:FilteringStyle" xmi:id="_ql2OhKS4Ed-ymvO7Wc-dcg"/>
+    </children>
+    <styles xmi:type="notation:ShapeStyle" xmi:id="_ql1ndaS4Ed-ymvO7Wc-dcg" fontColor="4210752" fontName="Lucida Grande" fontHeight="10" fillColor="13150135" lineColor="4210752"/>
+    <styles xmi:type="notation:MultiDiagramLinkStyle" xmi:id="_ql1ndqS4Ed-ymvO7Wc-dcg"/>
+    <element xmi:type="ecore:EPackage" href="gtasmmodel.ecore#//gtasm/metamodel/gt"/>
+    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ql1nd6S4Ed-ymvO7Wc-dcg" x="357"/>
+  </children>
+  <styles xmi:type="notation:DiagramStyle" xmi:id="_qaAx8KS4Ed-ymvO7Wc-dcg"/>
+  <element xmi:type="ecore:EPackage" href="gtasmmodel.ecore#//gtasm/metamodel"/>
+</notation:Diagram>
diff --git a/org.eclipse.viatra2.gtasm.model/model/gtasmmodel_updated.genmodel b/org.eclipse.viatra2.gtasm.model/model/gtasmmodel_updated.genmodel
new file mode 100644
index 0000000..20bfbec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/model/gtasmmodel_updated.genmodel
@@ -0,0 +1,495 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+    xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+    xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText=" * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro&#xD;&#xA; * All rights reserved. This program and the accompanying materials&#xD;&#xA; * are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA; * which accompanies this distribution, and is available at&#xD;&#xA; * http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA; *&#xD;&#xA; * Contributors:&#xD;&#xA; *    Istvan Rath, Daniel Varro - initial API and implementation&#xD;&#xA;"
+    modelDirectory="/org.eclipse.viatra2.gtasm.model/src" editDirectory="/org.eclipse.viatra2.gtasm.model.edit/src"
+    editorDirectory="/org.eclipse.viatra2.gtasm.model.editor/src" modelPluginID="org.eclipse.viatra2.gtasm.model"
+    modelName="Gtasm" editPluginClass="org.eclipse.viatra2.gtasmmodel.vpm.editmodel.provider.GtasmEditPlugin"
+    editorPluginClass="org.eclipse.viatra2.gtasmmodel.vpm.editmodel.presentation.GtasmEditorPlugin"
+    testSuiteClass="org.eclipse.viatra2.gtasmmodel.vpm.editmodel.tests.GtasmAllTests"
+    importerID="org.eclipse.emf.importer.ecore" complianceLevel="6.0" runtimeVersion="2.4"
+    language="">
+  <foreignModel>gtasmmodel.ecore</foreignModel>
+  <genPackages prefix="Gtasmmodel" basePackage="org.eclipse.viatra2" disposableProviderFactory="true"
+      ecorePackage="gtasmmodel.ecore#/">
+    <nestedGenPackages prefix="Vpm" basePackage="org.eclipse.viatra2.gtasmmodel" disposableProviderFactory="true"
+        ecorePackage="gtasmmodel.ecore#//vpm">
+      <nestedGenPackages prefix="Editmodel" basePackage="org.eclipse.viatra2.gtasmmodel.vpm"
+          disposableProviderFactory="true" ecorePackage="gtasmmodel.ecore#//vpm/editmodel">
+        <genClasses image="false" ecoreClass="gtasmmodel.ecore#//vpm/editmodel/ModelElement">
+          <genFeatures notify="false" createChild="false" propertySortChoices="true"
+              ecoreFeature="ecore:EReference gtasmmodel.ecore#//vpm/editmodel/ModelElement/type"/>
+          <genFeatures notify="false" createChild="false" propertySortChoices="true"
+              ecoreFeature="ecore:EReference gtasmmodel.ecore#//vpm/editmodel/ModelElement/instance"/>
+          <genFeatures notify="false" createChild="false" propertySortChoices="true"
+              ecoreFeature="ecore:EReference gtasmmodel.ecore#//vpm/editmodel/ModelElement/supertype"/>
+          <genFeatures notify="false" createChild="false" propertySortChoices="true"
+              ecoreFeature="ecore:EReference gtasmmodel.ecore#//vpm/editmodel/ModelElement/subtype"/>
+          <genFeatures notify="false" createChild="false" propertySortChoices="true"
+              ecoreFeature="ecore:EReference gtasmmodel.ecore#//vpm/editmodel/ModelElement/relationsTo"/>
+          <genFeatures notify="false" createChild="false" propertySortChoices="true"
+              ecoreFeature="ecore:EReference gtasmmodel.ecore#//vpm/editmodel/ModelElement/subRelationships"/>
+          <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//vpm/editmodel/ModelElement/superRelationships"/>
+          <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//vpm/editmodel/ModelElement/typeStr"/>
+          <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//vpm/editmodel/ModelElement/name"/>
+          <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//vpm/editmodel/ModelElement/namespaceStr"/>
+          <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//vpm/editmodel/ModelElement/realElement"/>
+          <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//vpm/editmodel/ModelElement/relationsFrom"/>
+        </genClasses>
+        <genClasses ecoreClass="gtasmmodel.ecore#//vpm/editmodel/Relationship">
+          <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//vpm/editmodel/Relationship/clientStr"/>
+          <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//vpm/editmodel/Relationship/supplierStr"/>
+          <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gtasmmodel.ecore#//vpm/editmodel/Relationship/client"/>
+          <genFeatures notify="false" createChild="false" propertySortChoices="true"
+              ecoreFeature="ecore:EReference gtasmmodel.ecore#//vpm/editmodel/Relationship/supplier"/>
+        </genClasses>
+        <genClasses ecoreClass="gtasmmodel.ecore#//vpm/editmodel/Entity">
+          <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gtasmmodel.ecore#//vpm/editmodel/Entity/parent"/>
+          <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//vpm/editmodel/Entity/components"/>
+          <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//vpm/editmodel/Entity/value"/>
+        </genClasses>
+        <genClasses ecoreClass="gtasmmodel.ecore#//vpm/editmodel/Relation">
+          <genFeatures notify="false" createChild="false" propertySortChoices="true"
+              ecoreFeature="ecore:EReference gtasmmodel.ecore#//vpm/editmodel/Relation/to"/>
+          <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//vpm/editmodel/Relation/fromStr"/>
+          <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//vpm/editmodel/Relation/toStr"/>
+          <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gtasmmodel.ecore#//vpm/editmodel/Relation/from"/>
+        </genClasses>
+        <genClasses ecoreClass="gtasmmodel.ecore#//vpm/editmodel/TypeOf"/>
+        <genClasses ecoreClass="gtasmmodel.ecore#//vpm/editmodel/SupertypeOf"/>
+        <genClasses image="false" ecoreClass="gtasmmodel.ecore#//vpm/editmodel/VPMElement">
+          <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//vpm/editmodel/VPMElement/variableReferences"/>
+        </genClasses>
+      </nestedGenPackages>
+    </nestedGenPackages>
+    <nestedGenPackages prefix="Gtasm" basePackage="org.eclipse.viatra2.gtasmmodel"
+        disposableProviderFactory="true" ecorePackage="gtasmmodel.ecore#//gtasm">
+      <nestedGenPackages prefix="Metamodel" basePackage="org.eclipse.viatra2.gtasmmodel.gtasm"
+          disposableProviderFactory="true" ecorePackage="gtasmmodel.ecore#//gtasm/metamodel">
+        <nestedGenPackages prefix="Modelmanagement" basePackage="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel"
+            disposableProviderFactory="true" ecorePackage="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement">
+          <nestedGenPackages prefix="QueryFunctions" basePackage="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement"
+              disposableProviderFactory="true" ecorePackage="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/queryFunctions">
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/queryFunctions/Aggregate"/>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/queryFunctions/Source"/>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/queryFunctions/Target"/>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/queryFunctions/ElementReference"/>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/queryFunctions/FullyQualifiedName"/>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/queryFunctions/Name"/>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/queryFunctions/Value"/>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/queryFunctions/Inverse"/>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/queryFunctions/Multiplicity"/>
+          </nestedGenPackages>
+          <nestedGenPackages prefix="ManipulationRules" basePackage="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement"
+              disposableProviderFactory="true" ecorePackage="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules">
+            <nestedGenPackages prefix="Deletion" basePackage="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules"
+                disposableProviderFactory="true" ecorePackage="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/deletion">
+              <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/deletion/RelationshipDeleteRule">
+                <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/deletion/RelationshipDeleteRule/super"/>
+                <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/deletion/RelationshipDeleteRule/sub"/>
+              </genClasses>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/deletion/ElementDeleteRule">
+                <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/deletion/ElementDeleteRule/element"/>
+                <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/deletion/ElementDeleteRule/semantics"/>
+              </genClasses>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/deletion/DeleteInstanceOf"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/deletion/DeleteSupertypeOf"/>
+            </nestedGenPackages>
+            <nestedGenPackages prefix="Creation" basePackage="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules"
+                disposableProviderFactory="true" ecorePackage="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/creation">
+              <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/creation/RelationshipCreateRule">
+                <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/creation/RelationshipCreateRule/super"/>
+                <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/creation/RelationshipCreateRule/sub"/>
+              </genClasses>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/creation/RelationCreateRule">
+                <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/creation/RelationCreateRule/target"/>
+                <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/creation/RelationCreateRule/source"/>
+              </genClasses>
+              <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/creation/ElementCreateRule">
+                <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/creation/ElementCreateRule/type"/>
+                <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/creation/ElementCreateRule/targetVariable"/>
+              </genClasses>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/creation/EntityCreateRule">
+                <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/creation/EntityCreateRule/parent"/>
+              </genClasses>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/creation/CreateSupertypeOf"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/creation/CreateInstanceOf"/>
+            </nestedGenPackages>
+            <nestedGenPackages prefix="Copymove" basePackage="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules"
+                disposableProviderFactory="true" ecorePackage="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/copymove">
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/copymove/MoveRule">
+                <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/copymove/MoveRule/trgContainer"/>
+                <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/copymove/MoveRule/srcRoot"/>
+              </genClasses>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/copymove/ModelCopyRule">
+                <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/copymove/ModelCopyRule/targetVariable"/>
+                <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/copymove/ModelCopyRule/trgContainer"/>
+                <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/copymove/ModelCopyRule/srcRoot"/>
+                <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/copymove/ModelCopyRule/semantics"/>
+              </genClasses>
+            </nestedGenPackages>
+            <nestedGenPackages prefix="Update" basePackage="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules"
+                disposableProviderFactory="true" ecorePackage="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/update">
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/update/RenameRule"/>
+              <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetRule">
+                <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetRule/element"/>
+                <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetRule/value"/>
+              </genClasses>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetValueRule"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetRelationTo"/>
+              <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetRelationEndPoint"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetRelationFrom"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetMultiplicityRule"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetInverseRule"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetAnyTargetRule"/>
+              <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetAnyEndpointRule"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetAnySourceRule"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/modelmanagement/manipulationRules/update/SetAggregationRule"/>
+            </nestedGenPackages>
+          </nestedGenPackages>
+        </nestedGenPackages>
+        <nestedGenPackages prefix="Asm" basePackage="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel"
+            disposableProviderFactory="true" ecorePackage="gtasmmodel.ecore#//gtasm/metamodel/asm">
+          <nestedGenPackages prefix="Definitions" basePackage="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm"
+              disposableProviderFactory="true" ecorePackage="gtasmmodel.ecore#//gtasm/metamodel/asm/definitions">
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Machine">
+              <genFeatures notify="false" createChild="false" propertySortChoices="true"
+                  ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Machine/mainRule"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Machine/gtRuleDefinitions"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Machine/asmFunctionDefinitions"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Machine/asmRuleDefinitions"/>
+              <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Machine/module"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Rule">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Rule/body"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Rule/symParameters"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Rule/localVariables"/>
+              <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Rule/namespace"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Variable">
+              <genFeatures notify="false" createChild="false" propertySortChoices="true"
+                  ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Variable/references"/>
+              <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Variable/scope"/>
+              <genFeatures createChild="false" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Variable/variableType"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/VariableDefinition">
+              <genFeatures notify="false" createChild="false" propertySortChoices="true"
+                  ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/VariableDefinition/variable"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/VariableDefinition/value"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/ASMFunction">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/ASMFunction/initialValues"/>
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/ASMFunction/arity"/>
+              <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/ASMFunction/namespace"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/ASMFunction/returnType"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/ASMFunction/argumentTypes"/>
+            </genClasses>
+            <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/FunctionDefinition"/>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/InitialValue">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/InitialValue/locations"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/InitialValue/value"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/SymbolicRuleParameter">
+              <genFeatures notify="false" createChild="false" propertySortChoices="true"
+                  ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/SymbolicRuleParameter/variable"/>
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/SymbolicRuleParameter/direction"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Module">
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Module/fileName"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Module/machine"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Module/import"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Module/namespace"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/ImportDeclaration">
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/ImportDeclaration/importValue"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/NamespaceDefinition">
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/NamespaceDefinition/namespaceValue"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Transformation">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/Transformation/modules"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/TypeConstant">
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/TypeConstant/kind"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/ChangeEvent">
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/ChangeEvent/changeKind"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/definitions/ChangeEvent/variableReference"/>
+            </genClasses>
+          </nestedGenPackages>
+          <nestedGenPackages prefix="Core" basePackage="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm"
+              disposableProviderFactory="true" ecorePackage="gtasmmodel.ecore#//gtasm/metamodel/asm/core">
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/core/Annotation">
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/core/Annotation/value"/>
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/core/Annotation/key"/>
+            </genClasses>
+            <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/core/GTASMElement">
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/core/GTASMElement/name"/>
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/core/GTASMElement/id"/>
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/core/GTASMElement/fqn"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/core/GTASMElement/runtimeAnnotations"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/core/RuntimeAnnotation">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/core/RuntimeAnnotation/elements"/>
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/core/RuntimeAnnotation/annotationName"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/core/RuntimeAnnotationElement">
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/core/RuntimeAnnotationElement/value"/>
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/core/RuntimeAnnotationElement/key"/>
+            </genClasses>
+            <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/core/AnnotatedElement">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/core/AnnotatedElement/annotations"/>
+            </genClasses>
+          </nestedGenPackages>
+          <nestedGenPackages prefix="SimpleRules" basePackage="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm"
+              disposableProviderFactory="true" ecorePackage="gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules">
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/ConditionalRuleTry">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/ConditionalRuleTry/ruleToTry"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/ConditionalRuleTry/ruleElse"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/ConditionalRuleIf">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/ConditionalRuleIf/expressionToTest"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/ConditionalRuleIf/ruleTrue"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/ConditionalRuleIf/ruleFalse"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/CallRule">
+              <genFeatures notify="false" createChild="false" propertySortChoices="true"
+                  ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/CallRule/rule"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/CallRule/actualParameters"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/RuleUpdateVariable">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/RuleUpdateVariable/variable"/>
+            </genClasses>
+            <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/RuleUpdate">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/RuleUpdate/value"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/GTRuleInvocation">
+              <genFeatures notify="false" createChild="false" propertySortChoices="true"
+                  ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/GTRuleInvocation/rule"/>
+              <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/GTRuleInvocation/invoker"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/GTRuleInvocation/actualParameters"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/RuleUpdateASMFunction">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/RuleUpdateASMFunction/locations"/>
+              <genFeatures notify="false" createChild="false" propertySortChoices="true"
+                  ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/RuleUpdateASMFunction/function"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/FailRule"/>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/LogRule">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/LogRule/out"/>
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/LogRule/level"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/PrintRule">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/PrintRule/out"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/PrintRule/buffer"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/SkipRule"/>
+            <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/ModelManipulationRule"/>
+            <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation">
+              <genFeatures notify="false" createChild="false" propertySortChoices="true"
+                  ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation/caller"/>
+              <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/ASMRuleInvocation/asmRule"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/PrintLnRule">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/PrintLnRule/out"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/simpleRules/PrintLnRule/buffer"/>
+            </genClasses>
+          </nestedGenPackages>
+          <nestedGenPackages prefix="CompoundRules" basePackage="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm"
+              disposableProviderFactory="true" ecorePackage="gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules">
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/SequentialRule"/>
+            <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/NestedRule">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/NestedRule/subrules"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/RandomRule"/>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/ParallelRule"/>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/ChooseRule"/>
+            <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/CollectionIteratorRule">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/CollectionIteratorRule/containmentConstraints"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/CollectionIteratorRule/condition"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/CollectionIteratorRule/gtrule"/>
+            </genClasses>
+            <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/CompoundRule">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/CompoundRule/body"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/ForallRule"/>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/IterateRule"/>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/LetRule">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/LetRule/definitions"/>
+            </genClasses>
+            <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/BlockRule">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/BlockRule/localVariables"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/WhenRule">
+              <genFeatures notify="false" createChild="false" propertySortChoices="true"
+                  ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/compoundRules/WhenRule/conditions"/>
+            </genClasses>
+          </nestedGenPackages>
+          <nestedGenPackages prefix="Enums" basePackage="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm"
+              disposableProviderFactory="true" ecorePackage="gtasmmodel.ecore#//gtasm/metamodel/asm/enums">
+            <genEnums ecoreEnum="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/CopySemantics">
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/CopySemantics/dropOuterEdges"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/CopySemantics/copyOuterEdges"/>
+            </genEnums>
+            <genEnums ecoreEnum="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/DeleteSemantics">
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/DeleteSemantics/dropContent"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/DeleteSemantics/moveContent"/>
+            </genEnums>
+            <genEnums ecoreEnum="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/LogLevel">
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/LogLevel/debug"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/LogLevel/warning"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/LogLevel/error"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/LogLevel/fatal"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/LogLevel/info"/>
+            </genEnums>
+            <genEnums ecoreEnum="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/ContainmentMode">
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/ContainmentMode/in"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/ContainmentMode/below"/>
+            </genEnums>
+            <genEnums ecoreEnum="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/ValueKind">
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/ValueKind/undef"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/ValueKind/boolean"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/ValueKind/string"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/ValueKind/integer"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/ValueKind/double"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/ValueKind/modelelement"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/ValueKind/multiplicity"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/ValueKind/error"/>
+            </genEnums>
+            <genEnums ecoreEnum="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/DirectionKind">
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/DirectionKind/in"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/DirectionKind/inout"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/DirectionKind/out"/>
+            </genEnums>
+            <genEnums ecoreEnum="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/MultiplicityKind">
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/MultiplicityKind/one_to_one"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/MultiplicityKind/one_to_many"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/MultiplicityKind/many_to_one"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/MultiplicityKind/many_to_many"/>
+            </genEnums>
+            <genEnums typeSafeEnumCompatible="false" ecoreEnum="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/ChangeKind">
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/ChangeKind/new"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/ChangeKind/delete"/>
+              <genEnumLiterals ecoreEnumLiteral="gtasmmodel.ecore#//gtasm/metamodel/asm/enums/ChangeKind/changed"/>
+            </genEnums>
+          </nestedGenPackages>
+          <nestedGenPackages prefix="Terms" basePackage="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm"
+              disposableProviderFactory="true" ecorePackage="gtasmmodel.ecore#//gtasm/metamodel/asm/terms">
+            <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/Term">
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/terms/Term/kind"/>
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/terms/Term/type"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/VariableReference">
+              <genFeatures notify="false" createChild="false" propertySortChoices="true"
+                  ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/terms/VariableReference/variable"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/GTPatternCall">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/terms/GTPatternCall/actualParameters"/>
+              <genFeatures notify="false" createChild="false" propertySortChoices="true"
+                  ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/terms/GTPatternCall/calledPattern"/>
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/terms/GTPatternCall/matchCounter"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/ASMFunctionInvocation">
+              <genFeatures notify="false" createChild="false" propertySortChoices="true"
+                  ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/terms/ASMFunctionInvocation/calledFunction"/>
+            </genClasses>
+            <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/FunctionInvocation">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/terms/FunctionInvocation/actualParameters"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/Constant">
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/terms/Constant/value"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/NativeFunctionInvocation">
+              <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/asm/terms/NativeFunctionInvocation/functionName"/>
+            </genClasses>
+            <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/ModelElementQuery">
+              <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/asm/terms/ModelElementQuery/argument"/>
+            </genClasses>
+            <nestedGenPackages prefix="BuiltInFunctions" basePackage="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms"
+                disposableProviderFactory="true" ecorePackage="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions">
+              <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/ArithmeticOperation"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/Remainder"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/Multiply"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/Plus"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/Minus"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/Division"/>
+              <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/RelationalOperation"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/And"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/Equals"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/GreaterThan"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/GreaterThanOrEqualTo"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/LessThan"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/LessThanOrEqualTo"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/Not"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/NotEquals"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/Or"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/XOr"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/ToString"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/ToInt"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/ToBoolean"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/ToDouble"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/ToModelElement"/>
+              <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/ToMultiplicity"/>
+              <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/asm/terms/builtInFunctions/ConversionOperation"/>
+            </nestedGenPackages>
+          </nestedGenPackages>
+        </nestedGenPackages>
+        <nestedGenPackages prefix="Gt" basePackage="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel"
+            disposableProviderFactory="true" ecorePackage="gtasmmodel.ecore#//gtasm/metamodel/gt">
+          <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/gt/GTPatternBody">
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTPatternBody/negativePatterns"/>
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTPatternBody/localVariables"/>
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTPatternBody/calledPatterns"/>
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTPatternBody/checkExpressions"/>
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTPatternBody/patternGraph"/>
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTPatternBody/containmentConstraints"/>
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTPatternBody/variableAssignments"/>
+            <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTPatternBody/header"/>
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTPatternBody/elementWrappers"/>
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTPatternBody/danglingRelationships"/>
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTPatternBody/danglingRelations"/>
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTPatternBody/nonInjectivityConstraints"/>
+          </genClasses>
+          <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/gt/GTPattern">
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTPattern/symParameters"/>
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTPattern/patternBodies"/>
+            <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTPattern/namespace"/>
+            <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/gt/GTPattern/distinctMatching"/>
+            <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTPattern/container"/>
+          </genClasses>
+          <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/gt/PatternVariable">
+            <genFeatures notify="false" createChild="false" propertySortChoices="true"
+                ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/PatternVariable/elementInPattern"/>
+          </genClasses>
+          <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/gt/PatternVariableAssignment"/>
+          <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/gt/GTRule">
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTRule/symParameters"/>
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTRule/precondition"/>
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTRule/localVariables"/>
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTRule/action"/>
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTRule/postcondition"/>
+            <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTRule/namespace"/>
+          </genClasses>
+          <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/gt/ContainmentConstraint">
+            <genFeatures notify="false" createChild="false" propertySortChoices="true"
+                ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/ContainmentConstraint/variable"/>
+            <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gtasmmodel.ecore#//gtasm/metamodel/gt/ContainmentConstraint/mode"/>
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/ContainmentConstraint/parent"/>
+          </genClasses>
+          <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/gt/GTMatchCounter">
+            <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTMatchCounter/patternCall"/>
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/GTMatchCounter/variableReference"/>
+          </genClasses>
+          <genClasses ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/gt/NonInjectivityConstraint"/>
+          <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/gt/PatternVariableConstraint">
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/PatternVariableConstraint/leftValue"/>
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/PatternVariableConstraint/rightValue"/>
+          </genClasses>
+          <genClasses image="false" ecoreClass="gtasmmodel.ecore#//gtasm/metamodel/gt/PatternContainer">
+            <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gtasmmodel.ecore#//gtasm/metamodel/gt/PatternContainer/gtPatternDefinitions"/>
+          </genClasses>
+        </nestedGenPackages>
+      </nestedGenPackages>
+    </nestedGenPackages>
+  </genPackages>
+</genmodel:GenModel>
diff --git a/org.eclipse.viatra2.gtasm.model/plugin.properties b/org.eclipse.viatra2.gtasm.model/plugin.properties
new file mode 100644
index 0000000..a281192
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/plugin.properties
@@ -0,0 +1,20 @@
+# <copyright>
+# </copyright>
+#
+# $Id: plugin.properties,v 1.2 2007-09-12 15:38:15 ristvan Exp $
+
+# ====================================================================
+# To code developer:
+#   Do NOT change the properties between this line and the
+#   "%%% END OF TRANSLATED PROPERTIES %%%" line.
+#   Make a new property name, append to the end of the file and change
+#   the code to use the new property.
+# ====================================================================
+
+# ====================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# ====================================================================
+
+pluginName = Gtasm Model
+providerName = www.example.org
+
diff --git a/org.eclipse.viatra2.gtasm.model/plugin.xml b/org.eclipse.viatra2.gtasm.model/plugin.xml
new file mode 100644
index 0000000..b2a95f5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/plugin.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ <copyright>
+ </copyright>
+
+ $Id: plugin.xml,v 1.1 2006-07-18 13:06:17 babo Exp $
+-->
+
+<plugin>
+
+  <extension point="org.eclipse.emf.ecore.generated_package">
+    <package 
+       uri = "http:///viatragtasmmodel/vpm/editmodel.ecore" 
+       class = "org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage"
+       genModel = "gtasm.genmodel" /> 
+  </extension>
+
+  <extension point="org.eclipse.emf.ecore.generated_package">
+    <package 
+       uri = "http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions.ecore" 
+       class = "org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage"
+       genModel = "gtasm.genmodel" /> 
+  </extension>
+
+  <extension point="org.eclipse.emf.ecore.generated_package">
+    <package 
+       uri = "http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion.ecore" 
+       class = "org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage"
+       genModel = "gtasm.genmodel" /> 
+  </extension>
+
+  <extension point="org.eclipse.emf.ecore.generated_package">
+    <package 
+       uri = "http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation.ecore" 
+       class = "org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage"
+       genModel = "gtasm.genmodel" /> 
+  </extension>
+
+  <extension point="org.eclipse.emf.ecore.generated_package">
+    <package 
+       uri = "http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove.ecore" 
+       class = "org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage"
+       genModel = "gtasm.genmodel" /> 
+  </extension>
+
+  <extension point="org.eclipse.emf.ecore.generated_package">
+    <package 
+       uri = "http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update.ecore" 
+       class = "org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage"
+       genModel = "gtasm.genmodel" /> 
+  </extension>
+
+  <extension point="org.eclipse.emf.ecore.generated_package">
+    <package 
+       uri = "http:///viatragtasmmodel/gtasm/metamodel/asm/definitions.ecore" 
+       class = "org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage"
+       genModel = "gtasm.genmodel" /> 
+  </extension>
+
+  <extension point="org.eclipse.emf.ecore.generated_package">
+    <package 
+       uri = "http:///viatragtasmmodel/gtasm/metamodel/asm/core.ecore" 
+       class = "org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage"
+       genModel = "gtasm.genmodel" /> 
+  </extension>
+
+  <extension point="org.eclipse.emf.ecore.generated_package">
+    <package 
+       uri = "http:///viatragtasmmodel/gtasm/metamodel/asm/simpleRules.ecore" 
+       class = "org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage"
+       genModel = "gtasm.genmodel" /> 
+  </extension>
+
+  <extension point="org.eclipse.emf.ecore.generated_package">
+    <package 
+       uri = "http:///viatragtasmmodel/gtasm/metamodel/asm/compoundRules.ecore" 
+       class = "org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage"
+       genModel = "gtasm.genmodel" /> 
+  </extension>
+
+
+  <extension point="org.eclipse.emf.ecore.generated_package">
+    <package 
+       uri = "http:///viatragtasmmodel/gtasm/metamodel/asm/enums.ecore" 
+       class = "org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage"
+       genModel = "gtasm.genmodel" /> 
+  </extension>
+
+  <extension point="org.eclipse.emf.ecore.generated_package">
+    <package 
+       uri = "http:///viatragtasmmodel/gtasm/metamodel/asm/terms.ecore" 
+       class = "org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage"
+       genModel = "gtasm.genmodel" /> 
+  </extension>
+
+  <extension point="org.eclipse.emf.ecore.generated_package">
+    <package 
+       uri = "http:///viatragtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions.ecore" 
+       class = "org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage"
+       genModel = "gtasm.genmodel" /> 
+  </extension>
+
+  <extension point="org.eclipse.emf.ecore.generated_package">
+    <package 
+       uri = "http:///viatragtasmmodel/gtasm/metamodel/gt.ecore" 
+       class = "org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage"
+       genModel = "gtasm.genmodel" /> 
+  </extension>
+
+</plugin>
+
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/BlockRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/BlockRule.java
new file mode 100644
index 0000000..cf13a85
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/BlockRule.java
@@ -0,0 +1,61 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Block Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.BlockRule#getLocalVariables <em>Local Variables</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getBlockRule()
+ * @model abstract="true"
+ * @generated
+ */
+public interface BlockRule extends CompoundRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Local Variables</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable}.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable#getScope <em>Scope</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Local Variables</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Local Variables</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getBlockRule_LocalVariables()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable#getScope
+   * @model opposite="scope" containment="true"
+   * @generated
+   */
+  EList<Variable> getLocalVariables();
+
+} // BlockRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/ChooseRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/ChooseRule.java
new file mode 100644
index 0000000..9b1c743
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/ChooseRule.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Choose Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getChooseRule()
+ * @model
+ * @generated
+ */
+public interface ChooseRule extends CollectionIteratorRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // ChooseRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/CollectionIteratorRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/CollectionIteratorRule.java
new file mode 100644
index 0000000..0ea48a4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/CollectionIteratorRule.java
@@ -0,0 +1,119 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Collection Iterator Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule#getContainmentConstraints <em>Containment Constraints</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule#getCondition <em>Condition</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule#getGtrule <em>Gtrule</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getCollectionIteratorRule()
+ * @model abstract="true"
+ * @generated
+ */
+public interface CollectionIteratorRule extends BlockRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Containment Constraints</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Containment Constraints</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Containment Constraints</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getCollectionIteratorRule_ContainmentConstraints()
+   * @model containment="true"
+   * @generated
+   */
+  EList<ContainmentConstraint> getContainmentConstraints();
+
+  /**
+   * Returns the value of the '<em><b>Condition</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Condition</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Condition</em>' containment reference.
+   * @see #setCondition(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getCollectionIteratorRule_Condition()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  Term getCondition();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule#getCondition <em>Condition</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Condition</em>' containment reference.
+   * @see #getCondition()
+   * @generated
+   */
+  void setCondition(Term value);
+
+  /**
+   * Returns the value of the '<em><b>Gtrule</b></em>' containment reference.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation#getInvoker <em>Invoker</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Gtrule</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Gtrule</em>' containment reference.
+   * @see #setGtrule(GTRuleInvocation)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getCollectionIteratorRule_Gtrule()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation#getInvoker
+   * @model opposite="invoker" containment="true" ordered="false"
+   * @generated
+   */
+  GTRuleInvocation getGtrule();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule#getGtrule <em>Gtrule</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Gtrule</em>' containment reference.
+   * @see #getGtrule()
+   * @generated
+   */
+  void setGtrule(GTRuleInvocation value);
+
+} // CollectionIteratorRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/CompoundRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/CompoundRule.java
new file mode 100644
index 0000000..144efdc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/CompoundRule.java
@@ -0,0 +1,67 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Compound Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRule#getBody <em>Body</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getCompoundRule()
+ * @model abstract="true"
+ * @generated
+ */
+public interface CompoundRule extends ASMRuleInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Body</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Body</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Body</em>' containment reference.
+   * @see #setBody(ASMRuleInvocation)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getCompoundRule_Body()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  ASMRuleInvocation getBody();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRule#getBody <em>Body</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Body</em>' containment reference.
+   * @see #getBody()
+   * @generated
+   */
+  void setBody(ASMRuleInvocation value);
+
+} // CompoundRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/CompoundRulesFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/CompoundRulesFactory.java
new file mode 100644
index 0000000..d7c48bb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/CompoundRulesFactory.java
@@ -0,0 +1,122 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage
+ * @generated
+ */
+public interface CompoundRulesFactory extends EFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The singleton instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  CompoundRulesFactory eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesFactoryImpl.init();
+
+  /**
+   * Returns a new object of class '<em>Sequential Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Sequential Rule</em>'.
+   * @generated
+   */
+  SequentialRule createSequentialRule();
+
+  /**
+   * Returns a new object of class '<em>Random Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Random Rule</em>'.
+   * @generated
+   */
+  RandomRule createRandomRule();
+
+  /**
+   * Returns a new object of class '<em>Parallel Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Parallel Rule</em>'.
+   * @generated
+   */
+  ParallelRule createParallelRule();
+
+  /**
+   * Returns a new object of class '<em>Choose Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Choose Rule</em>'.
+   * @generated
+   */
+  ChooseRule createChooseRule();
+
+  /**
+   * Returns a new object of class '<em>Forall Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Forall Rule</em>'.
+   * @generated
+   */
+  ForallRule createForallRule();
+
+  /**
+   * Returns a new object of class '<em>Iterate Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Iterate Rule</em>'.
+   * @generated
+   */
+  IterateRule createIterateRule();
+
+  /**
+   * Returns a new object of class '<em>Let Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Let Rule</em>'.
+   * @generated
+   */
+  LetRule createLetRule();
+
+  /**
+   * Returns a new object of class '<em>When Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>When Rule</em>'.
+   * @generated
+   */
+  WhenRule createWhenRule();
+
+  /**
+   * Returns the package supported by this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the package supported by this factory.
+   * @generated
+   */
+  CompoundRulesPackage getCompoundRulesPackage();
+
+} //CompoundRulesFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/CompoundRulesPackage.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/CompoundRulesPackage.java
new file mode 100644
index 0000000..e078ccc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/CompoundRulesPackage.java
@@ -0,0 +1,1730 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ *   <li>each class,</li>
+ *   <li>each feature of each class,</li>
+ *   <li>each enum,</li>
+ *   <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface CompoundRulesPackage extends EPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The package name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNAME = "compoundRules";
+
+  /**
+   * The package namespace URI.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_URI = "http:///viatragtasmmodel/gtasm/metamodel/asm/compoundRules.ecore";
+
+  /**
+   * The package namespace name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_PREFIX = "viatragtasmmodel.gtasm.metamodel.asm.compoundRules";
+
+  /**
+   * The singleton instance of the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  CompoundRulesPackage eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl.init();
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.NestedRuleImpl <em>Nested Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.NestedRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getNestedRule()
+   * @generated
+   */
+  int NESTED_RULE = 1;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NESTED_RULE__ANNOTATIONS = SimpleRulesPackage.ASM_RULE_INVOCATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NESTED_RULE__NAME = SimpleRulesPackage.ASM_RULE_INVOCATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NESTED_RULE__ID = SimpleRulesPackage.ASM_RULE_INVOCATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NESTED_RULE__FQN = SimpleRulesPackage.ASM_RULE_INVOCATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NESTED_RULE__RUNTIME_ANNOTATIONS = SimpleRulesPackage.ASM_RULE_INVOCATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NESTED_RULE__CALLER = SimpleRulesPackage.ASM_RULE_INVOCATION__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NESTED_RULE__ASM_RULE = SimpleRulesPackage.ASM_RULE_INVOCATION__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Subrules</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NESTED_RULE__SUBRULES = SimpleRulesPackage.ASM_RULE_INVOCATION_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>Nested Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NESTED_RULE_FEATURE_COUNT = SimpleRulesPackage.ASM_RULE_INVOCATION_FEATURE_COUNT + 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.SequentialRuleImpl <em>Sequential Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.SequentialRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getSequentialRule()
+   * @generated
+   */
+  int SEQUENTIAL_RULE = 0;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SEQUENTIAL_RULE__ANNOTATIONS = NESTED_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SEQUENTIAL_RULE__NAME = NESTED_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SEQUENTIAL_RULE__ID = NESTED_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SEQUENTIAL_RULE__FQN = NESTED_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SEQUENTIAL_RULE__RUNTIME_ANNOTATIONS = NESTED_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SEQUENTIAL_RULE__CALLER = NESTED_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SEQUENTIAL_RULE__ASM_RULE = NESTED_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Subrules</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SEQUENTIAL_RULE__SUBRULES = NESTED_RULE__SUBRULES;
+
+  /**
+   * The number of structural features of the '<em>Sequential Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SEQUENTIAL_RULE_FEATURE_COUNT = NESTED_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.RandomRuleImpl <em>Random Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.RandomRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getRandomRule()
+   * @generated
+   */
+  int RANDOM_RULE = 2;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RANDOM_RULE__ANNOTATIONS = NESTED_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RANDOM_RULE__NAME = NESTED_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RANDOM_RULE__ID = NESTED_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RANDOM_RULE__FQN = NESTED_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RANDOM_RULE__RUNTIME_ANNOTATIONS = NESTED_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RANDOM_RULE__CALLER = NESTED_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RANDOM_RULE__ASM_RULE = NESTED_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Subrules</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RANDOM_RULE__SUBRULES = NESTED_RULE__SUBRULES;
+
+  /**
+   * The number of structural features of the '<em>Random Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RANDOM_RULE_FEATURE_COUNT = NESTED_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.ParallelRuleImpl <em>Parallel Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.ParallelRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getParallelRule()
+   * @generated
+   */
+  int PARALLEL_RULE = 3;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PARALLEL_RULE__ANNOTATIONS = NESTED_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PARALLEL_RULE__NAME = NESTED_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PARALLEL_RULE__ID = NESTED_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PARALLEL_RULE__FQN = NESTED_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PARALLEL_RULE__RUNTIME_ANNOTATIONS = NESTED_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PARALLEL_RULE__CALLER = NESTED_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PARALLEL_RULE__ASM_RULE = NESTED_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Subrules</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PARALLEL_RULE__SUBRULES = NESTED_RULE__SUBRULES;
+
+  /**
+   * The number of structural features of the '<em>Parallel Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PARALLEL_RULE_FEATURE_COUNT = NESTED_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRuleImpl <em>Compound Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getCompoundRule()
+   * @generated
+   */
+  int COMPOUND_RULE = 6;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COMPOUND_RULE__ANNOTATIONS = SimpleRulesPackage.ASM_RULE_INVOCATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COMPOUND_RULE__NAME = SimpleRulesPackage.ASM_RULE_INVOCATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COMPOUND_RULE__ID = SimpleRulesPackage.ASM_RULE_INVOCATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COMPOUND_RULE__FQN = SimpleRulesPackage.ASM_RULE_INVOCATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COMPOUND_RULE__RUNTIME_ANNOTATIONS = SimpleRulesPackage.ASM_RULE_INVOCATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COMPOUND_RULE__CALLER = SimpleRulesPackage.ASM_RULE_INVOCATION__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COMPOUND_RULE__ASM_RULE = SimpleRulesPackage.ASM_RULE_INVOCATION__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Body</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COMPOUND_RULE__BODY = SimpleRulesPackage.ASM_RULE_INVOCATION_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>Compound Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COMPOUND_RULE_FEATURE_COUNT = SimpleRulesPackage.ASM_RULE_INVOCATION_FEATURE_COUNT + 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.BlockRuleImpl <em>Block Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.BlockRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getBlockRule()
+   * @generated
+   */
+  int BLOCK_RULE = 10;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int BLOCK_RULE__ANNOTATIONS = COMPOUND_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int BLOCK_RULE__NAME = COMPOUND_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int BLOCK_RULE__ID = COMPOUND_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int BLOCK_RULE__FQN = COMPOUND_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int BLOCK_RULE__RUNTIME_ANNOTATIONS = COMPOUND_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int BLOCK_RULE__CALLER = COMPOUND_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int BLOCK_RULE__ASM_RULE = COMPOUND_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Body</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int BLOCK_RULE__BODY = COMPOUND_RULE__BODY;
+
+  /**
+   * The feature id for the '<em><b>Local Variables</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int BLOCK_RULE__LOCAL_VARIABLES = COMPOUND_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>Block Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int BLOCK_RULE_FEATURE_COUNT = COMPOUND_RULE_FEATURE_COUNT + 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CollectionIteratorRuleImpl <em>Collection Iterator Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CollectionIteratorRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getCollectionIteratorRule()
+   * @generated
+   */
+  int COLLECTION_ITERATOR_RULE = 5;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COLLECTION_ITERATOR_RULE__ANNOTATIONS = BLOCK_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COLLECTION_ITERATOR_RULE__NAME = BLOCK_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COLLECTION_ITERATOR_RULE__ID = BLOCK_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COLLECTION_ITERATOR_RULE__FQN = BLOCK_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COLLECTION_ITERATOR_RULE__RUNTIME_ANNOTATIONS = BLOCK_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COLLECTION_ITERATOR_RULE__CALLER = BLOCK_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COLLECTION_ITERATOR_RULE__ASM_RULE = BLOCK_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Body</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COLLECTION_ITERATOR_RULE__BODY = BLOCK_RULE__BODY;
+
+  /**
+   * The feature id for the '<em><b>Local Variables</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COLLECTION_ITERATOR_RULE__LOCAL_VARIABLES = BLOCK_RULE__LOCAL_VARIABLES;
+
+  /**
+   * The feature id for the '<em><b>Containment Constraints</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COLLECTION_ITERATOR_RULE__CONTAINMENT_CONSTRAINTS = BLOCK_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Condition</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COLLECTION_ITERATOR_RULE__CONDITION = BLOCK_RULE_FEATURE_COUNT + 1;
+
+  /**
+   * The feature id for the '<em><b>Gtrule</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COLLECTION_ITERATOR_RULE__GTRULE = BLOCK_RULE_FEATURE_COUNT + 2;
+
+  /**
+   * The number of structural features of the '<em>Collection Iterator Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int COLLECTION_ITERATOR_RULE_FEATURE_COUNT = BLOCK_RULE_FEATURE_COUNT + 3;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.ChooseRuleImpl <em>Choose Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.ChooseRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getChooseRule()
+   * @generated
+   */
+  int CHOOSE_RULE = 4;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHOOSE_RULE__ANNOTATIONS = COLLECTION_ITERATOR_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHOOSE_RULE__NAME = COLLECTION_ITERATOR_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHOOSE_RULE__ID = COLLECTION_ITERATOR_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHOOSE_RULE__FQN = COLLECTION_ITERATOR_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHOOSE_RULE__RUNTIME_ANNOTATIONS = COLLECTION_ITERATOR_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHOOSE_RULE__CALLER = COLLECTION_ITERATOR_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHOOSE_RULE__ASM_RULE = COLLECTION_ITERATOR_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Body</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHOOSE_RULE__BODY = COLLECTION_ITERATOR_RULE__BODY;
+
+  /**
+   * The feature id for the '<em><b>Local Variables</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHOOSE_RULE__LOCAL_VARIABLES = COLLECTION_ITERATOR_RULE__LOCAL_VARIABLES;
+
+  /**
+   * The feature id for the '<em><b>Containment Constraints</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHOOSE_RULE__CONTAINMENT_CONSTRAINTS = COLLECTION_ITERATOR_RULE__CONTAINMENT_CONSTRAINTS;
+
+  /**
+   * The feature id for the '<em><b>Condition</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHOOSE_RULE__CONDITION = COLLECTION_ITERATOR_RULE__CONDITION;
+
+  /**
+   * The feature id for the '<em><b>Gtrule</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHOOSE_RULE__GTRULE = COLLECTION_ITERATOR_RULE__GTRULE;
+
+  /**
+   * The number of structural features of the '<em>Choose Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHOOSE_RULE_FEATURE_COUNT = COLLECTION_ITERATOR_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.ForallRuleImpl <em>Forall Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.ForallRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getForallRule()
+   * @generated
+   */
+  int FORALL_RULE = 7;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FORALL_RULE__ANNOTATIONS = COLLECTION_ITERATOR_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FORALL_RULE__NAME = COLLECTION_ITERATOR_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FORALL_RULE__ID = COLLECTION_ITERATOR_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FORALL_RULE__FQN = COLLECTION_ITERATOR_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FORALL_RULE__RUNTIME_ANNOTATIONS = COLLECTION_ITERATOR_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FORALL_RULE__CALLER = COLLECTION_ITERATOR_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FORALL_RULE__ASM_RULE = COLLECTION_ITERATOR_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Body</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FORALL_RULE__BODY = COLLECTION_ITERATOR_RULE__BODY;
+
+  /**
+   * The feature id for the '<em><b>Local Variables</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FORALL_RULE__LOCAL_VARIABLES = COLLECTION_ITERATOR_RULE__LOCAL_VARIABLES;
+
+  /**
+   * The feature id for the '<em><b>Containment Constraints</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FORALL_RULE__CONTAINMENT_CONSTRAINTS = COLLECTION_ITERATOR_RULE__CONTAINMENT_CONSTRAINTS;
+
+  /**
+   * The feature id for the '<em><b>Condition</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FORALL_RULE__CONDITION = COLLECTION_ITERATOR_RULE__CONDITION;
+
+  /**
+   * The feature id for the '<em><b>Gtrule</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FORALL_RULE__GTRULE = COLLECTION_ITERATOR_RULE__GTRULE;
+
+  /**
+   * The number of structural features of the '<em>Forall Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FORALL_RULE_FEATURE_COUNT = COLLECTION_ITERATOR_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.IterateRuleImpl <em>Iterate Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.IterateRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getIterateRule()
+   * @generated
+   */
+  int ITERATE_RULE = 8;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ITERATE_RULE__ANNOTATIONS = COMPOUND_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ITERATE_RULE__NAME = COMPOUND_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ITERATE_RULE__ID = COMPOUND_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ITERATE_RULE__FQN = COMPOUND_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ITERATE_RULE__RUNTIME_ANNOTATIONS = COMPOUND_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ITERATE_RULE__CALLER = COMPOUND_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ITERATE_RULE__ASM_RULE = COMPOUND_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Body</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ITERATE_RULE__BODY = COMPOUND_RULE__BODY;
+
+  /**
+   * The number of structural features of the '<em>Iterate Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ITERATE_RULE_FEATURE_COUNT = COMPOUND_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.LetRuleImpl <em>Let Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.LetRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getLetRule()
+   * @generated
+   */
+  int LET_RULE = 9;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LET_RULE__ANNOTATIONS = BLOCK_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LET_RULE__NAME = BLOCK_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LET_RULE__ID = BLOCK_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LET_RULE__FQN = BLOCK_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LET_RULE__RUNTIME_ANNOTATIONS = BLOCK_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LET_RULE__CALLER = BLOCK_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LET_RULE__ASM_RULE = BLOCK_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Body</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LET_RULE__BODY = BLOCK_RULE__BODY;
+
+  /**
+   * The feature id for the '<em><b>Local Variables</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LET_RULE__LOCAL_VARIABLES = BLOCK_RULE__LOCAL_VARIABLES;
+
+  /**
+   * The feature id for the '<em><b>Definitions</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LET_RULE__DEFINITIONS = BLOCK_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>Let Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LET_RULE_FEATURE_COUNT = BLOCK_RULE_FEATURE_COUNT + 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.WhenRuleImpl <em>When Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.WhenRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getWhenRule()
+   * @generated
+   */
+  int WHEN_RULE = 11;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int WHEN_RULE__ANNOTATIONS = COMPOUND_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int WHEN_RULE__NAME = COMPOUND_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int WHEN_RULE__ID = COMPOUND_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int WHEN_RULE__FQN = COMPOUND_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int WHEN_RULE__RUNTIME_ANNOTATIONS = COMPOUND_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int WHEN_RULE__CALLER = COMPOUND_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int WHEN_RULE__ASM_RULE = COMPOUND_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Body</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int WHEN_RULE__BODY = COMPOUND_RULE__BODY;
+
+  /**
+   * The feature id for the '<em><b>Conditions</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int WHEN_RULE__CONDITIONS = COMPOUND_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>When Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int WHEN_RULE_FEATURE_COUNT = COMPOUND_RULE_FEATURE_COUNT + 1;
+
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.SequentialRule <em>Sequential Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Sequential Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.SequentialRule
+   * @generated
+   */
+  EClass getSequentialRule();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.NestedRule <em>Nested Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Nested Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.NestedRule
+   * @generated
+   */
+  EClass getNestedRule();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.NestedRule#getSubrules <em>Subrules</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Subrules</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.NestedRule#getSubrules()
+   * @see #getNestedRule()
+   * @generated
+   */
+  EReference getNestedRule_Subrules();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.RandomRule <em>Random Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Random Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.RandomRule
+   * @generated
+   */
+  EClass getRandomRule();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ParallelRule <em>Parallel Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Parallel Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ParallelRule
+   * @generated
+   */
+  EClass getParallelRule();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ChooseRule <em>Choose Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Choose Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ChooseRule
+   * @generated
+   */
+  EClass getChooseRule();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule <em>Collection Iterator Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Collection Iterator Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule
+   * @generated
+   */
+  EClass getCollectionIteratorRule();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule#getContainmentConstraints <em>Containment Constraints</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Containment Constraints</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule#getContainmentConstraints()
+   * @see #getCollectionIteratorRule()
+   * @generated
+   */
+  EReference getCollectionIteratorRule_ContainmentConstraints();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule#getCondition <em>Condition</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Condition</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule#getCondition()
+   * @see #getCollectionIteratorRule()
+   * @generated
+   */
+  EReference getCollectionIteratorRule_Condition();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule#getGtrule <em>Gtrule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Gtrule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule#getGtrule()
+   * @see #getCollectionIteratorRule()
+   * @generated
+   */
+  EReference getCollectionIteratorRule_Gtrule();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRule <em>Compound Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Compound Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRule
+   * @generated
+   */
+  EClass getCompoundRule();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRule#getBody <em>Body</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Body</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRule#getBody()
+   * @see #getCompoundRule()
+   * @generated
+   */
+  EReference getCompoundRule_Body();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ForallRule <em>Forall Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Forall Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ForallRule
+   * @generated
+   */
+  EClass getForallRule();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.IterateRule <em>Iterate Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Iterate Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.IterateRule
+   * @generated
+   */
+  EClass getIterateRule();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.LetRule <em>Let Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Let Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.LetRule
+   * @generated
+   */
+  EClass getLetRule();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.LetRule#getDefinitions <em>Definitions</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Definitions</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.LetRule#getDefinitions()
+   * @see #getLetRule()
+   * @generated
+   */
+  EReference getLetRule_Definitions();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.BlockRule <em>Block Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Block Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.BlockRule
+   * @generated
+   */
+  EClass getBlockRule();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.BlockRule#getLocalVariables <em>Local Variables</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Local Variables</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.BlockRule#getLocalVariables()
+   * @see #getBlockRule()
+   * @generated
+   */
+  EReference getBlockRule_LocalVariables();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.WhenRule <em>When Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>When Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.WhenRule
+   * @generated
+   */
+  EClass getWhenRule();
+
+  /**
+   * Returns the meta object for the reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.WhenRule#getConditions <em>Conditions</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference '<em>Conditions</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.WhenRule#getConditions()
+   * @see #getWhenRule()
+   * @generated
+   */
+  EReference getWhenRule_Conditions();
+
+  /**
+   * Returns the factory that creates the instances of the model.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the factory that creates the instances of the model.
+   * @generated
+   */
+  CompoundRulesFactory getCompoundRulesFactory();
+
+  /**
+   * <!-- begin-user-doc -->
+   * Defines literals for the meta objects that represent
+   * <ul>
+   *   <li>each class,</li>
+   *   <li>each feature of each class,</li>
+   *   <li>each enum,</li>
+   *   <li>and each data type</li>
+   * </ul>
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  interface Literals
+  {
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.SequentialRuleImpl <em>Sequential Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.SequentialRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getSequentialRule()
+     * @generated
+     */
+    EClass SEQUENTIAL_RULE = eINSTANCE.getSequentialRule();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.NestedRuleImpl <em>Nested Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.NestedRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getNestedRule()
+     * @generated
+     */
+    EClass NESTED_RULE = eINSTANCE.getNestedRule();
+
+    /**
+     * The meta object literal for the '<em><b>Subrules</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference NESTED_RULE__SUBRULES = eINSTANCE.getNestedRule_Subrules();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.RandomRuleImpl <em>Random Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.RandomRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getRandomRule()
+     * @generated
+     */
+    EClass RANDOM_RULE = eINSTANCE.getRandomRule();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.ParallelRuleImpl <em>Parallel Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.ParallelRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getParallelRule()
+     * @generated
+     */
+    EClass PARALLEL_RULE = eINSTANCE.getParallelRule();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.ChooseRuleImpl <em>Choose Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.ChooseRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getChooseRule()
+     * @generated
+     */
+    EClass CHOOSE_RULE = eINSTANCE.getChooseRule();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CollectionIteratorRuleImpl <em>Collection Iterator Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CollectionIteratorRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getCollectionIteratorRule()
+     * @generated
+     */
+    EClass COLLECTION_ITERATOR_RULE = eINSTANCE.getCollectionIteratorRule();
+
+    /**
+     * The meta object literal for the '<em><b>Containment Constraints</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference COLLECTION_ITERATOR_RULE__CONTAINMENT_CONSTRAINTS = eINSTANCE.getCollectionIteratorRule_ContainmentConstraints();
+
+    /**
+     * The meta object literal for the '<em><b>Condition</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference COLLECTION_ITERATOR_RULE__CONDITION = eINSTANCE.getCollectionIteratorRule_Condition();
+
+    /**
+     * The meta object literal for the '<em><b>Gtrule</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference COLLECTION_ITERATOR_RULE__GTRULE = eINSTANCE.getCollectionIteratorRule_Gtrule();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRuleImpl <em>Compound Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getCompoundRule()
+     * @generated
+     */
+    EClass COMPOUND_RULE = eINSTANCE.getCompoundRule();
+
+    /**
+     * The meta object literal for the '<em><b>Body</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference COMPOUND_RULE__BODY = eINSTANCE.getCompoundRule_Body();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.ForallRuleImpl <em>Forall Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.ForallRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getForallRule()
+     * @generated
+     */
+    EClass FORALL_RULE = eINSTANCE.getForallRule();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.IterateRuleImpl <em>Iterate Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.IterateRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getIterateRule()
+     * @generated
+     */
+    EClass ITERATE_RULE = eINSTANCE.getIterateRule();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.LetRuleImpl <em>Let Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.LetRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getLetRule()
+     * @generated
+     */
+    EClass LET_RULE = eINSTANCE.getLetRule();
+
+    /**
+     * The meta object literal for the '<em><b>Definitions</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference LET_RULE__DEFINITIONS = eINSTANCE.getLetRule_Definitions();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.BlockRuleImpl <em>Block Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.BlockRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getBlockRule()
+     * @generated
+     */
+    EClass BLOCK_RULE = eINSTANCE.getBlockRule();
+
+    /**
+     * The meta object literal for the '<em><b>Local Variables</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference BLOCK_RULE__LOCAL_VARIABLES = eINSTANCE.getBlockRule_LocalVariables();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.WhenRuleImpl <em>When Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.WhenRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl#getWhenRule()
+     * @generated
+     */
+    EClass WHEN_RULE = eINSTANCE.getWhenRule();
+
+    /**
+     * The meta object literal for the '<em><b>Conditions</b></em>' reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference WHEN_RULE__CONDITIONS = eINSTANCE.getWhenRule_Conditions();
+
+  }
+
+} //CompoundRulesPackage
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/ForallRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/ForallRule.java
new file mode 100644
index 0000000..0b6fdf7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/ForallRule.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Forall Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getForallRule()
+ * @model
+ * @generated
+ */
+public interface ForallRule extends CollectionIteratorRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // ForallRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/IterateRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/IterateRule.java
new file mode 100644
index 0000000..615b2b7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/IterateRule.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Iterate Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getIterateRule()
+ * @model
+ * @generated
+ */
+public interface IterateRule extends CompoundRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // IterateRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/LetRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/LetRule.java
new file mode 100644
index 0000000..418a6a8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/LetRule.java
@@ -0,0 +1,59 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Let Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.LetRule#getDefinitions <em>Definitions</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getLetRule()
+ * @model
+ * @generated
+ */
+public interface LetRule extends BlockRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Definitions</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Definitions</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Definitions</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getLetRule_Definitions()
+   * @model containment="true"
+   * @generated
+   */
+  EList<VariableDefinition> getDefinitions();
+
+} // LetRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/NestedRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/NestedRule.java
new file mode 100644
index 0000000..fbf7b10
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/NestedRule.java
@@ -0,0 +1,59 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Nested Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.NestedRule#getSubrules <em>Subrules</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getNestedRule()
+ * @model abstract="true"
+ * @generated
+ */
+public interface NestedRule extends ASMRuleInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Subrules</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Subrules</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Subrules</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getNestedRule_Subrules()
+   * @model containment="true"
+   * @generated
+   */
+  EList<ASMRuleInvocation> getSubrules();
+
+} // NestedRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/ParallelRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/ParallelRule.java
new file mode 100644
index 0000000..bfe127c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/ParallelRule.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Parallel Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getParallelRule()
+ * @model
+ * @generated
+ */
+public interface ParallelRule extends NestedRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // ParallelRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/RandomRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/RandomRule.java
new file mode 100644
index 0000000..1c45e4f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/RandomRule.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Random Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getRandomRule()
+ * @model
+ * @generated
+ */
+public interface RandomRule extends NestedRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // RandomRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/SequentialRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/SequentialRule.java
new file mode 100644
index 0000000..2786fe7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/SequentialRule.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Sequential Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getSequentialRule()
+ * @model
+ * @generated
+ */
+public interface SequentialRule extends NestedRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // SequentialRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/WhenRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/WhenRule.java
new file mode 100644
index 0000000..b34929e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/WhenRule.java
@@ -0,0 +1,67 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>When Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.WhenRule#getConditions <em>Conditions</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getWhenRule()
+ * @model
+ * @generated
+ */
+public interface WhenRule extends CompoundRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Conditions</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Conditions</em>' reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Conditions</em>' reference.
+   * @see #setConditions(ChangeEvent)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#getWhenRule_Conditions()
+   * @model
+   * @generated
+   */
+  ChangeEvent getConditions();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.WhenRule#getConditions <em>Conditions</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Conditions</em>' reference.
+   * @see #getConditions()
+   * @generated
+   */
+  void setConditions(ChangeEvent value);
+
+} // WhenRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/BlockRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/BlockRuleImpl.java
new file mode 100644
index 0000000..32878de
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/BlockRuleImpl.java
@@ -0,0 +1,200 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.BlockRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Block Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.BlockRuleImpl#getLocalVariables <em>Local Variables</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class BlockRuleImpl extends CompoundRuleImpl implements BlockRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getLocalVariables() <em>Local Variables</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getLocalVariables()
+   * @generated
+   * @ordered
+   */
+  protected EList<Variable> localVariables;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected BlockRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CompoundRulesPackage.Literals.BLOCK_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Variable> getLocalVariables()
+  {
+    if (localVariables == null)
+    {
+      localVariables = new EObjectContainmentWithInverseEList<Variable>(Variable.class, this, CompoundRulesPackage.BLOCK_RULE__LOCAL_VARIABLES, DefinitionsPackage.VARIABLE__SCOPE);
+    }
+    return localVariables;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.BLOCK_RULE__LOCAL_VARIABLES:
+        return ((InternalEList<InternalEObject>)(InternalEList<?>)getLocalVariables()).basicAdd(otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.BLOCK_RULE__LOCAL_VARIABLES:
+        return ((InternalEList<?>)getLocalVariables()).basicRemove(otherEnd, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.BLOCK_RULE__LOCAL_VARIABLES:
+        return getLocalVariables();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.BLOCK_RULE__LOCAL_VARIABLES:
+        getLocalVariables().clear();
+        getLocalVariables().addAll((Collection<? extends Variable>)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.BLOCK_RULE__LOCAL_VARIABLES:
+        getLocalVariables().clear();
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.BLOCK_RULE__LOCAL_VARIABLES:
+        return localVariables != null && !localVariables.isEmpty();
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //BlockRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/ChooseRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/ChooseRuleImpl.java
new file mode 100644
index 0000000..10fda2e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/ChooseRuleImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ChooseRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Choose Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class ChooseRuleImpl extends CollectionIteratorRuleImpl implements ChooseRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ChooseRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CompoundRulesPackage.Literals.CHOOSE_RULE;
+  }
+
+} //ChooseRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/CollectionIteratorRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/CollectionIteratorRuleImpl.java
new file mode 100644
index 0000000..903fc60
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/CollectionIteratorRuleImpl.java
@@ -0,0 +1,350 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Collection Iterator Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CollectionIteratorRuleImpl#getContainmentConstraints <em>Containment Constraints</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CollectionIteratorRuleImpl#getCondition <em>Condition</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CollectionIteratorRuleImpl#getGtrule <em>Gtrule</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class CollectionIteratorRuleImpl extends BlockRuleImpl implements CollectionIteratorRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getContainmentConstraints() <em>Containment Constraints</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getContainmentConstraints()
+   * @generated
+   * @ordered
+   */
+  protected EList<ContainmentConstraint> containmentConstraints;
+
+  /**
+   * The cached value of the '{@link #getCondition() <em>Condition</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getCondition()
+   * @generated
+   * @ordered
+   */
+  protected Term condition;
+
+  /**
+   * The cached value of the '{@link #getGtrule() <em>Gtrule</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getGtrule()
+   * @generated
+   * @ordered
+   */
+  protected GTRuleInvocation gtrule;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected CollectionIteratorRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CompoundRulesPackage.Literals.COLLECTION_ITERATOR_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<ContainmentConstraint> getContainmentConstraints()
+  {
+    if (containmentConstraints == null)
+    {
+      containmentConstraints = new EObjectContainmentEList<ContainmentConstraint>(ContainmentConstraint.class, this, CompoundRulesPackage.COLLECTION_ITERATOR_RULE__CONTAINMENT_CONSTRAINTS);
+    }
+    return containmentConstraints;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getCondition()
+  {
+    return condition;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetCondition(Term newCondition, NotificationChain msgs)
+  {
+    Term oldCondition = condition;
+    condition = newCondition;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CompoundRulesPackage.COLLECTION_ITERATOR_RULE__CONDITION, oldCondition, newCondition);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setCondition(Term newCondition)
+  {
+    if (newCondition != condition)
+    {
+      NotificationChain msgs = null;
+      if (condition != null)
+        msgs = ((InternalEObject)condition).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CompoundRulesPackage.COLLECTION_ITERATOR_RULE__CONDITION, null, msgs);
+      if (newCondition != null)
+        msgs = ((InternalEObject)newCondition).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CompoundRulesPackage.COLLECTION_ITERATOR_RULE__CONDITION, null, msgs);
+      msgs = basicSetCondition(newCondition, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CompoundRulesPackage.COLLECTION_ITERATOR_RULE__CONDITION, newCondition, newCondition));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTRuleInvocation getGtrule()
+  {
+    return gtrule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetGtrule(GTRuleInvocation newGtrule, NotificationChain msgs)
+  {
+    GTRuleInvocation oldGtrule = gtrule;
+    gtrule = newGtrule;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CompoundRulesPackage.COLLECTION_ITERATOR_RULE__GTRULE, oldGtrule, newGtrule);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setGtrule(GTRuleInvocation newGtrule)
+  {
+    if (newGtrule != gtrule)
+    {
+      NotificationChain msgs = null;
+      if (gtrule != null)
+        msgs = ((InternalEObject)gtrule).eInverseRemove(this, SimpleRulesPackage.GT_RULE_INVOCATION__INVOKER, GTRuleInvocation.class, msgs);
+      if (newGtrule != null)
+        msgs = ((InternalEObject)newGtrule).eInverseAdd(this, SimpleRulesPackage.GT_RULE_INVOCATION__INVOKER, GTRuleInvocation.class, msgs);
+      msgs = basicSetGtrule(newGtrule, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CompoundRulesPackage.COLLECTION_ITERATOR_RULE__GTRULE, newGtrule, newGtrule));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE__GTRULE:
+        if (gtrule != null)
+          msgs = ((InternalEObject)gtrule).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CompoundRulesPackage.COLLECTION_ITERATOR_RULE__GTRULE, null, msgs);
+        return basicSetGtrule((GTRuleInvocation)otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE__CONTAINMENT_CONSTRAINTS:
+        return ((InternalEList<?>)getContainmentConstraints()).basicRemove(otherEnd, msgs);
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE__CONDITION:
+        return basicSetCondition(null, msgs);
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE__GTRULE:
+        return basicSetGtrule(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE__CONTAINMENT_CONSTRAINTS:
+        return getContainmentConstraints();
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE__CONDITION:
+        return getCondition();
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE__GTRULE:
+        return getGtrule();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE__CONTAINMENT_CONSTRAINTS:
+        getContainmentConstraints().clear();
+        getContainmentConstraints().addAll((Collection<? extends ContainmentConstraint>)newValue);
+        return;
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE__CONDITION:
+        setCondition((Term)newValue);
+        return;
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE__GTRULE:
+        setGtrule((GTRuleInvocation)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE__CONTAINMENT_CONSTRAINTS:
+        getContainmentConstraints().clear();
+        return;
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE__CONDITION:
+        setCondition((Term)null);
+        return;
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE__GTRULE:
+        setGtrule((GTRuleInvocation)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE__CONTAINMENT_CONSTRAINTS:
+        return containmentConstraints != null && !containmentConstraints.isEmpty();
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE__CONDITION:
+        return condition != null;
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE__GTRULE:
+        return gtrule != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //CollectionIteratorRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/CompoundRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/CompoundRuleImpl.java
new file mode 100644
index 0000000..9c1fdf7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/CompoundRuleImpl.java
@@ -0,0 +1,212 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ASMRuleInvocationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Compound Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRuleImpl#getBody <em>Body</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class CompoundRuleImpl extends ASMRuleInvocationImpl implements CompoundRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getBody() <em>Body</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getBody()
+   * @generated
+   * @ordered
+   */
+  protected ASMRuleInvocation body;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected CompoundRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CompoundRulesPackage.Literals.COMPOUND_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ASMRuleInvocation getBody()
+  {
+    return body;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetBody(ASMRuleInvocation newBody, NotificationChain msgs)
+  {
+    ASMRuleInvocation oldBody = body;
+    body = newBody;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CompoundRulesPackage.COMPOUND_RULE__BODY, oldBody, newBody);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setBody(ASMRuleInvocation newBody)
+  {
+    if (newBody != body)
+    {
+      NotificationChain msgs = null;
+      if (body != null)
+        msgs = ((InternalEObject)body).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CompoundRulesPackage.COMPOUND_RULE__BODY, null, msgs);
+      if (newBody != null)
+        msgs = ((InternalEObject)newBody).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CompoundRulesPackage.COMPOUND_RULE__BODY, null, msgs);
+      msgs = basicSetBody(newBody, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CompoundRulesPackage.COMPOUND_RULE__BODY, newBody, newBody));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.COMPOUND_RULE__BODY:
+        return basicSetBody(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.COMPOUND_RULE__BODY:
+        return getBody();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.COMPOUND_RULE__BODY:
+        setBody((ASMRuleInvocation)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.COMPOUND_RULE__BODY:
+        setBody((ASMRuleInvocation)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.COMPOUND_RULE__BODY:
+        return body != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //CompoundRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/CompoundRulesFactoryImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/CompoundRulesFactoryImpl.java
new file mode 100644
index 0000000..5390390
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/CompoundRulesFactoryImpl.java
@@ -0,0 +1,206 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CompoundRulesFactoryImpl extends EFactoryImpl implements CompoundRulesFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Creates the default factory implementation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static CompoundRulesFactory init()
+  {
+    try
+    {
+      CompoundRulesFactory theCompoundRulesFactory = (CompoundRulesFactory)EPackage.Registry.INSTANCE.getEFactory("http:///viatragtasmmodel/gtasm/metamodel/asm/compoundRules.ecore"); 
+      if (theCompoundRulesFactory != null)
+      {
+        return theCompoundRulesFactory;
+      }
+    }
+    catch (Exception exception)
+    {
+      EcorePlugin.INSTANCE.log(exception);
+    }
+    return new CompoundRulesFactoryImpl();
+  }
+
+  /**
+   * Creates an instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CompoundRulesFactoryImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public EObject create(EClass eClass)
+  {
+    switch (eClass.getClassifierID())
+    {
+      case CompoundRulesPackage.SEQUENTIAL_RULE: return createSequentialRule();
+      case CompoundRulesPackage.RANDOM_RULE: return createRandomRule();
+      case CompoundRulesPackage.PARALLEL_RULE: return createParallelRule();
+      case CompoundRulesPackage.CHOOSE_RULE: return createChooseRule();
+      case CompoundRulesPackage.FORALL_RULE: return createForallRule();
+      case CompoundRulesPackage.ITERATE_RULE: return createIterateRule();
+      case CompoundRulesPackage.LET_RULE: return createLetRule();
+      case CompoundRulesPackage.WHEN_RULE: return createWhenRule();
+      default:
+        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+    }
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SequentialRule createSequentialRule()
+  {
+    SequentialRuleImpl sequentialRule = new SequentialRuleImpl();
+    return sequentialRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RandomRule createRandomRule()
+  {
+    RandomRuleImpl randomRule = new RandomRuleImpl();
+    return randomRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ParallelRule createParallelRule()
+  {
+    ParallelRuleImpl parallelRule = new ParallelRuleImpl();
+    return parallelRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ChooseRule createChooseRule()
+  {
+    ChooseRuleImpl chooseRule = new ChooseRuleImpl();
+    return chooseRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ForallRule createForallRule()
+  {
+    ForallRuleImpl forallRule = new ForallRuleImpl();
+    return forallRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public IterateRule createIterateRule()
+  {
+    IterateRuleImpl iterateRule = new IterateRuleImpl();
+    return iterateRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public LetRule createLetRule()
+  {
+    LetRuleImpl letRule = new LetRuleImpl();
+    return letRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public WhenRule createWhenRule()
+  {
+    WhenRuleImpl whenRule = new WhenRuleImpl();
+    return whenRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CompoundRulesPackage getCompoundRulesPackage()
+  {
+    return (CompoundRulesPackage)getEPackage();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @deprecated
+   * @generated
+   */
+  @Deprecated
+  public static CompoundRulesPackage getPackage()
+  {
+    return CompoundRulesPackage.eINSTANCE;
+  }
+
+} //CompoundRulesFactoryImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/CompoundRulesPackageImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/CompoundRulesPackageImpl.java
new file mode 100644
index 0000000..8f48c13
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/CompoundRulesPackageImpl.java
@@ -0,0 +1,638 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.BlockRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ChooseRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ForallRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.IterateRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.LetRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.NestedRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ParallelRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.RandomRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.SequentialRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.WhenRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymovePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CompoundRulesPackageImpl extends EPackageImpl implements CompoundRulesPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass sequentialRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass nestedRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass randomRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass parallelRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass chooseRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass collectionIteratorRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass compoundRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass forallRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass iterateRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass letRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass blockRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass whenRuleEClass = null;
+
+  /**
+   * Creates an instance of the model <b>Package</b>, registered with
+   * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+   * package URI value.
+   * <p>Note: the correct way to create the package is via the static
+   * factory method {@link #init init()}, which also performs
+   * initialization of the package, or returns the registered package,
+   * if one already exists.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.emf.ecore.EPackage.Registry
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage#eNS_URI
+   * @see #init()
+   * @generated
+   */
+  private CompoundRulesPackageImpl()
+  {
+    super(eNS_URI, CompoundRulesFactory.eINSTANCE);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static boolean isInited = false;
+
+  /**
+   * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+   * 
+   * <p>This method is used to initialize {@link CompoundRulesPackage#eINSTANCE} when that field is accessed.
+   * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #eNS_URI
+   * @see #createPackageContents()
+   * @see #initializePackageContents()
+   * @generated
+   */
+  public static CompoundRulesPackage init()
+  {
+    if (isInited) return (CompoundRulesPackage)EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI);
+
+    // Obtain or create and register package
+    CompoundRulesPackageImpl theCompoundRulesPackage = (CompoundRulesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof CompoundRulesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new CompoundRulesPackageImpl());
+
+    isInited = true;
+
+    // Obtain or create and register interdependencies
+    EditmodelPackageImpl theEditmodelPackage = (EditmodelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) instanceof EditmodelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) : EditmodelPackage.eINSTANCE);
+    QueryFunctionsPackageImpl theQueryFunctionsPackage = (QueryFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) instanceof QueryFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) : QueryFunctionsPackage.eINSTANCE);
+    DeletionPackageImpl theDeletionPackage = (DeletionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) instanceof DeletionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) : DeletionPackage.eINSTANCE);
+    CreationPackageImpl theCreationPackage = (CreationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) instanceof CreationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) : CreationPackage.eINSTANCE);
+    CopymovePackageImpl theCopymovePackage = (CopymovePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) instanceof CopymovePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) : CopymovePackage.eINSTANCE);
+    UpdatePackageImpl theUpdatePackage = (UpdatePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) instanceof UpdatePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) : UpdatePackage.eINSTANCE);
+    DefinitionsPackageImpl theDefinitionsPackage = (DefinitionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) instanceof DefinitionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) : DefinitionsPackage.eINSTANCE);
+    CorePackageImpl theCorePackage = (CorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) instanceof CorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) : CorePackage.eINSTANCE);
+    SimpleRulesPackageImpl theSimpleRulesPackage = (SimpleRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) instanceof SimpleRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) : SimpleRulesPackage.eINSTANCE);
+    EnumsPackageImpl theEnumsPackage = (EnumsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) instanceof EnumsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) : EnumsPackage.eINSTANCE);
+    TermsPackageImpl theTermsPackage = (TermsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) instanceof TermsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) : TermsPackage.eINSTANCE);
+    BuiltInFunctionsPackageImpl theBuiltInFunctionsPackage = (BuiltInFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) instanceof BuiltInFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) : BuiltInFunctionsPackage.eINSTANCE);
+    GtPackageImpl theGtPackage = (GtPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) instanceof GtPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) : GtPackage.eINSTANCE);
+
+    // Create package meta-data objects
+    theCompoundRulesPackage.createPackageContents();
+    theEditmodelPackage.createPackageContents();
+    theQueryFunctionsPackage.createPackageContents();
+    theDeletionPackage.createPackageContents();
+    theCreationPackage.createPackageContents();
+    theCopymovePackage.createPackageContents();
+    theUpdatePackage.createPackageContents();
+    theDefinitionsPackage.createPackageContents();
+    theCorePackage.createPackageContents();
+    theSimpleRulesPackage.createPackageContents();
+    theEnumsPackage.createPackageContents();
+    theTermsPackage.createPackageContents();
+    theBuiltInFunctionsPackage.createPackageContents();
+    theGtPackage.createPackageContents();
+
+    // Initialize created meta-data
+    theCompoundRulesPackage.initializePackageContents();
+    theEditmodelPackage.initializePackageContents();
+    theQueryFunctionsPackage.initializePackageContents();
+    theDeletionPackage.initializePackageContents();
+    theCreationPackage.initializePackageContents();
+    theCopymovePackage.initializePackageContents();
+    theUpdatePackage.initializePackageContents();
+    theDefinitionsPackage.initializePackageContents();
+    theCorePackage.initializePackageContents();
+    theSimpleRulesPackage.initializePackageContents();
+    theEnumsPackage.initializePackageContents();
+    theTermsPackage.initializePackageContents();
+    theBuiltInFunctionsPackage.initializePackageContents();
+    theGtPackage.initializePackageContents();
+
+    // Mark meta-data to indicate it can't be changed
+    theCompoundRulesPackage.freeze();
+
+  
+    // Update the registry and return the package
+    EPackage.Registry.INSTANCE.put(CompoundRulesPackage.eNS_URI, theCompoundRulesPackage);
+    return theCompoundRulesPackage;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getSequentialRule()
+  {
+    return sequentialRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getNestedRule()
+  {
+    return nestedRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getNestedRule_Subrules()
+  {
+    return (EReference)nestedRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getRandomRule()
+  {
+    return randomRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getParallelRule()
+  {
+    return parallelRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getChooseRule()
+  {
+    return chooseRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getCollectionIteratorRule()
+  {
+    return collectionIteratorRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getCollectionIteratorRule_ContainmentConstraints()
+  {
+    return (EReference)collectionIteratorRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getCollectionIteratorRule_Condition()
+  {
+    return (EReference)collectionIteratorRuleEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getCollectionIteratorRule_Gtrule()
+  {
+    return (EReference)collectionIteratorRuleEClass.getEStructuralFeatures().get(2);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getCompoundRule()
+  {
+    return compoundRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getCompoundRule_Body()
+  {
+    return (EReference)compoundRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getForallRule()
+  {
+    return forallRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getIterateRule()
+  {
+    return iterateRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getLetRule()
+  {
+    return letRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getLetRule_Definitions()
+  {
+    return (EReference)letRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getBlockRule()
+  {
+    return blockRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getBlockRule_LocalVariables()
+  {
+    return (EReference)blockRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getWhenRule()
+  {
+    return whenRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getWhenRule_Conditions()
+  {
+    return (EReference)whenRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CompoundRulesFactory getCompoundRulesFactory()
+  {
+    return (CompoundRulesFactory)getEFactoryInstance();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isCreated = false;
+
+  /**
+   * Creates the meta-model objects for the package.  This method is
+   * guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void createPackageContents()
+  {
+    if (isCreated) return;
+    isCreated = true;
+
+    // Create classes and their features
+    sequentialRuleEClass = createEClass(SEQUENTIAL_RULE);
+
+    nestedRuleEClass = createEClass(NESTED_RULE);
+    createEReference(nestedRuleEClass, NESTED_RULE__SUBRULES);
+
+    randomRuleEClass = createEClass(RANDOM_RULE);
+
+    parallelRuleEClass = createEClass(PARALLEL_RULE);
+
+    chooseRuleEClass = createEClass(CHOOSE_RULE);
+
+    collectionIteratorRuleEClass = createEClass(COLLECTION_ITERATOR_RULE);
+    createEReference(collectionIteratorRuleEClass, COLLECTION_ITERATOR_RULE__CONTAINMENT_CONSTRAINTS);
+    createEReference(collectionIteratorRuleEClass, COLLECTION_ITERATOR_RULE__CONDITION);
+    createEReference(collectionIteratorRuleEClass, COLLECTION_ITERATOR_RULE__GTRULE);
+
+    compoundRuleEClass = createEClass(COMPOUND_RULE);
+    createEReference(compoundRuleEClass, COMPOUND_RULE__BODY);
+
+    forallRuleEClass = createEClass(FORALL_RULE);
+
+    iterateRuleEClass = createEClass(ITERATE_RULE);
+
+    letRuleEClass = createEClass(LET_RULE);
+    createEReference(letRuleEClass, LET_RULE__DEFINITIONS);
+
+    blockRuleEClass = createEClass(BLOCK_RULE);
+    createEReference(blockRuleEClass, BLOCK_RULE__LOCAL_VARIABLES);
+
+    whenRuleEClass = createEClass(WHEN_RULE);
+    createEReference(whenRuleEClass, WHEN_RULE__CONDITIONS);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isInitialized = false;
+
+  /**
+   * Complete the initialization of the package and its meta-model.  This
+   * method is guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void initializePackageContents()
+  {
+    if (isInitialized) return;
+    isInitialized = true;
+
+    // Initialize package
+    setName(eNAME);
+    setNsPrefix(eNS_PREFIX);
+    setNsURI(eNS_URI);
+
+    // Obtain other dependent packages
+    SimpleRulesPackage theSimpleRulesPackage = (SimpleRulesPackage)EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI);
+    GtPackage theGtPackage = (GtPackage)EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI);
+    TermsPackage theTermsPackage = (TermsPackage)EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI);
+    DefinitionsPackage theDefinitionsPackage = (DefinitionsPackage)EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI);
+
+    // Create type parameters
+
+    // Set bounds for type parameters
+
+    // Add supertypes to classes
+    sequentialRuleEClass.getESuperTypes().add(this.getNestedRule());
+    nestedRuleEClass.getESuperTypes().add(theSimpleRulesPackage.getASMRuleInvocation());
+    randomRuleEClass.getESuperTypes().add(this.getNestedRule());
+    parallelRuleEClass.getESuperTypes().add(this.getNestedRule());
+    chooseRuleEClass.getESuperTypes().add(this.getCollectionIteratorRule());
+    collectionIteratorRuleEClass.getESuperTypes().add(this.getBlockRule());
+    compoundRuleEClass.getESuperTypes().add(theSimpleRulesPackage.getASMRuleInvocation());
+    forallRuleEClass.getESuperTypes().add(this.getCollectionIteratorRule());
+    iterateRuleEClass.getESuperTypes().add(this.getCompoundRule());
+    letRuleEClass.getESuperTypes().add(this.getBlockRule());
+    blockRuleEClass.getESuperTypes().add(this.getCompoundRule());
+    whenRuleEClass.getESuperTypes().add(this.getCompoundRule());
+
+    // Initialize classes and features; add operations and parameters
+    initEClass(sequentialRuleEClass, SequentialRule.class, "SequentialRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(nestedRuleEClass, NestedRule.class, "NestedRule", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getNestedRule_Subrules(), theSimpleRulesPackage.getASMRuleInvocation(), null, "subrules", null, 0, -1, NestedRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(randomRuleEClass, RandomRule.class, "RandomRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(parallelRuleEClass, ParallelRule.class, "ParallelRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(chooseRuleEClass, ChooseRule.class, "ChooseRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(collectionIteratorRuleEClass, CollectionIteratorRule.class, "CollectionIteratorRule", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getCollectionIteratorRule_ContainmentConstraints(), theGtPackage.getContainmentConstraint(), null, "containmentConstraints", null, 0, -1, CollectionIteratorRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getCollectionIteratorRule_Condition(), theTermsPackage.getTerm(), null, "condition", null, 0, 1, CollectionIteratorRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getCollectionIteratorRule_Gtrule(), theSimpleRulesPackage.getGTRuleInvocation(), theSimpleRulesPackage.getGTRuleInvocation_Invoker(), "gtrule", null, 0, 1, CollectionIteratorRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(compoundRuleEClass, CompoundRule.class, "CompoundRule", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getCompoundRule_Body(), theSimpleRulesPackage.getASMRuleInvocation(), null, "body", null, 1, 1, CompoundRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(forallRuleEClass, ForallRule.class, "ForallRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(iterateRuleEClass, IterateRule.class, "IterateRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(letRuleEClass, LetRule.class, "LetRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getLetRule_Definitions(), theDefinitionsPackage.getVariableDefinition(), null, "definitions", null, 0, -1, LetRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(blockRuleEClass, BlockRule.class, "BlockRule", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getBlockRule_LocalVariables(), theDefinitionsPackage.getVariable(), theDefinitionsPackage.getVariable_Scope(), "localVariables", null, 0, -1, BlockRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(whenRuleEClass, WhenRule.class, "WhenRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getWhenRule_Conditions(), theDefinitionsPackage.getChangeEvent(), null, "conditions", null, 0, 1, WhenRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    // Create resource
+    createResource(eNS_URI);
+  }
+
+} //CompoundRulesPackageImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/ForallRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/ForallRuleImpl.java
new file mode 100644
index 0000000..74f4766
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/ForallRuleImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ForallRule;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Forall Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class ForallRuleImpl extends CollectionIteratorRuleImpl implements ForallRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ForallRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CompoundRulesPackage.Literals.FORALL_RULE;
+  }
+
+} //ForallRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/IterateRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/IterateRuleImpl.java
new file mode 100644
index 0000000..467a42e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/IterateRuleImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.IterateRule;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Iterate Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class IterateRuleImpl extends CompoundRuleImpl implements IterateRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected IterateRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CompoundRulesPackage.Literals.ITERATE_RULE;
+  }
+
+} //IterateRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/LetRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/LetRuleImpl.java
new file mode 100644
index 0000000..7dc6003
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/LetRuleImpl.java
@@ -0,0 +1,182 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.LetRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Let Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.LetRuleImpl#getDefinitions <em>Definitions</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class LetRuleImpl extends BlockRuleImpl implements LetRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getDefinitions() <em>Definitions</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getDefinitions()
+   * @generated
+   * @ordered
+   */
+  protected EList<VariableDefinition> definitions;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected LetRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CompoundRulesPackage.Literals.LET_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<VariableDefinition> getDefinitions()
+  {
+    if (definitions == null)
+    {
+      definitions = new EObjectContainmentEList<VariableDefinition>(VariableDefinition.class, this, CompoundRulesPackage.LET_RULE__DEFINITIONS);
+    }
+    return definitions;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.LET_RULE__DEFINITIONS:
+        return ((InternalEList<?>)getDefinitions()).basicRemove(otherEnd, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.LET_RULE__DEFINITIONS:
+        return getDefinitions();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.LET_RULE__DEFINITIONS:
+        getDefinitions().clear();
+        getDefinitions().addAll((Collection<? extends VariableDefinition>)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.LET_RULE__DEFINITIONS:
+        getDefinitions().clear();
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.LET_RULE__DEFINITIONS:
+        return definitions != null && !definitions.isEmpty();
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //LetRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/NestedRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/NestedRuleImpl.java
new file mode 100644
index 0000000..ba03ad0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/NestedRuleImpl.java
@@ -0,0 +1,184 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.NestedRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ASMRuleInvocationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Nested Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.NestedRuleImpl#getSubrules <em>Subrules</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class NestedRuleImpl extends ASMRuleInvocationImpl implements NestedRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getSubrules() <em>Subrules</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSubrules()
+   * @generated
+   * @ordered
+   */
+  protected EList<ASMRuleInvocation> subrules;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected NestedRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CompoundRulesPackage.Literals.NESTED_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<ASMRuleInvocation> getSubrules()
+  {
+    if (subrules == null)
+    {
+      subrules = new EObjectContainmentEList<ASMRuleInvocation>(ASMRuleInvocation.class, this, CompoundRulesPackage.NESTED_RULE__SUBRULES);
+    }
+    return subrules;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.NESTED_RULE__SUBRULES:
+        return ((InternalEList<?>)getSubrules()).basicRemove(otherEnd, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.NESTED_RULE__SUBRULES:
+        return getSubrules();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.NESTED_RULE__SUBRULES:
+        getSubrules().clear();
+        getSubrules().addAll((Collection<? extends ASMRuleInvocation>)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.NESTED_RULE__SUBRULES:
+        getSubrules().clear();
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.NESTED_RULE__SUBRULES:
+        return subrules != null && !subrules.isEmpty();
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //NestedRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/ParallelRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/ParallelRuleImpl.java
new file mode 100644
index 0000000..b03198b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/ParallelRuleImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ParallelRule;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Parallel Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class ParallelRuleImpl extends NestedRuleImpl implements ParallelRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ParallelRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CompoundRulesPackage.Literals.PARALLEL_RULE;
+  }
+
+} //ParallelRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/RandomRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/RandomRuleImpl.java
new file mode 100644
index 0000000..78da4df
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/RandomRuleImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.RandomRule;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Random Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class RandomRuleImpl extends NestedRuleImpl implements RandomRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RandomRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CompoundRulesPackage.Literals.RANDOM_RULE;
+  }
+
+} //RandomRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/SequentialRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/SequentialRuleImpl.java
new file mode 100644
index 0000000..800e1d3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/SequentialRuleImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.SequentialRule;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Sequential Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class SequentialRuleImpl extends NestedRuleImpl implements SequentialRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SequentialRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CompoundRulesPackage.Literals.SEQUENTIAL_RULE;
+  }
+
+} //SequentialRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/WhenRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/WhenRuleImpl.java
new file mode 100644
index 0000000..d43f213
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/impl/WhenRuleImpl.java
@@ -0,0 +1,189 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.WhenRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>When Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.WhenRuleImpl#getConditions <em>Conditions</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class WhenRuleImpl extends CompoundRuleImpl implements WhenRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getConditions() <em>Conditions</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getConditions()
+   * @generated
+   * @ordered
+   */
+  protected ChangeEvent conditions;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected WhenRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CompoundRulesPackage.Literals.WHEN_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ChangeEvent getConditions()
+  {
+    if (conditions != null && conditions.eIsProxy())
+    {
+      InternalEObject oldConditions = (InternalEObject)conditions;
+      conditions = (ChangeEvent)eResolveProxy(oldConditions);
+      if (conditions != oldConditions)
+      {
+        if (eNotificationRequired())
+          eNotify(new ENotificationImpl(this, Notification.RESOLVE, CompoundRulesPackage.WHEN_RULE__CONDITIONS, oldConditions, conditions));
+      }
+    }
+    return conditions;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ChangeEvent basicGetConditions()
+  {
+    return conditions;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setConditions(ChangeEvent newConditions)
+  {
+    ChangeEvent oldConditions = conditions;
+    conditions = newConditions;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CompoundRulesPackage.WHEN_RULE__CONDITIONS, oldConditions, conditions));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.WHEN_RULE__CONDITIONS:
+        if (resolve) return getConditions();
+        return basicGetConditions();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.WHEN_RULE__CONDITIONS:
+        setConditions((ChangeEvent)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.WHEN_RULE__CONDITIONS:
+        setConditions((ChangeEvent)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case CompoundRulesPackage.WHEN_RULE__CONDITIONS:
+        return conditions != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //WhenRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/util/CompoundRulesAdapterFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/util/CompoundRulesAdapterFactory.java
new file mode 100644
index 0000000..6190b05
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/util/CompoundRulesAdapterFactory.java
@@ -0,0 +1,433 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.*;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage
+ * @generated
+ */
+public class CompoundRulesAdapterFactory extends AdapterFactoryImpl
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static CompoundRulesPackage modelPackage;
+
+  /**
+   * Creates an instance of the adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CompoundRulesAdapterFactory()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = CompoundRulesPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Returns whether this factory is applicable for the type of the object.
+   * <!-- begin-user-doc -->
+   * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+   * <!-- end-user-doc -->
+   * @return whether this factory is applicable for the type of the object.
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object object)
+  {
+    if (object == modelPackage)
+    {
+      return true;
+    }
+    if (object instanceof EObject)
+    {
+      return ((EObject)object).eClass().getEPackage() == modelPackage;
+    }
+    return false;
+  }
+
+  /**
+   * The switch that delegates to the <code>createXXX</code> methods.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected CompoundRulesSwitch<Adapter> modelSwitch =
+    new CompoundRulesSwitch<Adapter>()
+    {
+      @Override
+      public Adapter caseSequentialRule(SequentialRule object)
+      {
+        return createSequentialRuleAdapter();
+      }
+      @Override
+      public Adapter caseNestedRule(NestedRule object)
+      {
+        return createNestedRuleAdapter();
+      }
+      @Override
+      public Adapter caseRandomRule(RandomRule object)
+      {
+        return createRandomRuleAdapter();
+      }
+      @Override
+      public Adapter caseParallelRule(ParallelRule object)
+      {
+        return createParallelRuleAdapter();
+      }
+      @Override
+      public Adapter caseChooseRule(ChooseRule object)
+      {
+        return createChooseRuleAdapter();
+      }
+      @Override
+      public Adapter caseCollectionIteratorRule(CollectionIteratorRule object)
+      {
+        return createCollectionIteratorRuleAdapter();
+      }
+      @Override
+      public Adapter caseCompoundRule(CompoundRule object)
+      {
+        return createCompoundRuleAdapter();
+      }
+      @Override
+      public Adapter caseForallRule(ForallRule object)
+      {
+        return createForallRuleAdapter();
+      }
+      @Override
+      public Adapter caseIterateRule(IterateRule object)
+      {
+        return createIterateRuleAdapter();
+      }
+      @Override
+      public Adapter caseLetRule(LetRule object)
+      {
+        return createLetRuleAdapter();
+      }
+      @Override
+      public Adapter caseBlockRule(BlockRule object)
+      {
+        return createBlockRuleAdapter();
+      }
+      @Override
+      public Adapter caseWhenRule(WhenRule object)
+      {
+        return createWhenRuleAdapter();
+      }
+      @Override
+      public Adapter caseAnnotatedElement(AnnotatedElement object)
+      {
+        return createAnnotatedElementAdapter();
+      }
+      @Override
+      public Adapter caseGTASMElement(GTASMElement object)
+      {
+        return createGTASMElementAdapter();
+      }
+      @Override
+      public Adapter caseASMRuleInvocation(ASMRuleInvocation object)
+      {
+        return createASMRuleInvocationAdapter();
+      }
+      @Override
+      public Adapter defaultCase(EObject object)
+      {
+        return createEObjectAdapter();
+      }
+    };
+
+  /**
+   * Creates an adapter for the <code>target</code>.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param target the object to adapt.
+   * @return the adapter for the <code>target</code>.
+   * @generated
+   */
+  @Override
+  public Adapter createAdapter(Notifier target)
+  {
+    return modelSwitch.doSwitch((EObject)target);
+  }
+
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.SequentialRule <em>Sequential Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.SequentialRule
+   * @generated
+   */
+  public Adapter createSequentialRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.NestedRule <em>Nested Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.NestedRule
+   * @generated
+   */
+  public Adapter createNestedRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.RandomRule <em>Random Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.RandomRule
+   * @generated
+   */
+  public Adapter createRandomRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ParallelRule <em>Parallel Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ParallelRule
+   * @generated
+   */
+  public Adapter createParallelRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ChooseRule <em>Choose Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ChooseRule
+   * @generated
+   */
+  public Adapter createChooseRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule <em>Collection Iterator Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule
+   * @generated
+   */
+  public Adapter createCollectionIteratorRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRule <em>Compound Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRule
+   * @generated
+   */
+  public Adapter createCompoundRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ForallRule <em>Forall Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ForallRule
+   * @generated
+   */
+  public Adapter createForallRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.IterateRule <em>Iterate Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.IterateRule
+   * @generated
+   */
+  public Adapter createIterateRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.LetRule <em>Let Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.LetRule
+   * @generated
+   */
+  public Adapter createLetRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.BlockRule <em>Block Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.BlockRule
+   * @generated
+   */
+  public Adapter createBlockRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.WhenRule <em>When Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.WhenRule
+   * @generated
+   */
+  public Adapter createWhenRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement <em>Annotated Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement
+   * @generated
+   */
+  public Adapter createAnnotatedElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement <em>GTASM Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement
+   * @generated
+   */
+  public Adapter createGTASMElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation <em>ASM Rule Invocation</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation
+   * @generated
+   */
+  public Adapter createASMRuleInvocationAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for the default case.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @generated
+   */
+  public Adapter createEObjectAdapter()
+  {
+    return null;
+  }
+
+} //CompoundRulesAdapterFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/util/CompoundRulesSwitch.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/util/CompoundRulesSwitch.java
new file mode 100644
index 0000000..902f2e6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/compoundRules/util/CompoundRulesSwitch.java
@@ -0,0 +1,512 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.*;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage
+ * @generated
+ */
+public class CompoundRulesSwitch<T>
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static CompoundRulesPackage modelPackage;
+
+  /**
+   * Creates an instance of the switch.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CompoundRulesSwitch()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = CompoundRulesPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  public T doSwitch(EObject theEObject)
+  {
+    return doSwitch(theEObject.eClass(), theEObject);
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(EClass theEClass, EObject theEObject)
+  {
+    if (theEClass.eContainer() == modelPackage)
+    {
+      return doSwitch(theEClass.getClassifierID(), theEObject);
+    }
+    else
+    {
+      List<EClass> eSuperTypes = theEClass.getESuperTypes();
+      return
+        eSuperTypes.isEmpty() ?
+          defaultCase(theEObject) :
+          doSwitch(eSuperTypes.get(0), theEObject);
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(int classifierID, EObject theEObject)
+  {
+    switch (classifierID)
+    {
+      case CompoundRulesPackage.SEQUENTIAL_RULE:
+      {
+        SequentialRule sequentialRule = (SequentialRule)theEObject;
+        T result = caseSequentialRule(sequentialRule);
+        if (result == null) result = caseNestedRule(sequentialRule);
+        if (result == null) result = caseASMRuleInvocation(sequentialRule);
+        if (result == null) result = caseGTASMElement(sequentialRule);
+        if (result == null) result = caseAnnotatedElement(sequentialRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CompoundRulesPackage.NESTED_RULE:
+      {
+        NestedRule nestedRule = (NestedRule)theEObject;
+        T result = caseNestedRule(nestedRule);
+        if (result == null) result = caseASMRuleInvocation(nestedRule);
+        if (result == null) result = caseGTASMElement(nestedRule);
+        if (result == null) result = caseAnnotatedElement(nestedRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CompoundRulesPackage.RANDOM_RULE:
+      {
+        RandomRule randomRule = (RandomRule)theEObject;
+        T result = caseRandomRule(randomRule);
+        if (result == null) result = caseNestedRule(randomRule);
+        if (result == null) result = caseASMRuleInvocation(randomRule);
+        if (result == null) result = caseGTASMElement(randomRule);
+        if (result == null) result = caseAnnotatedElement(randomRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CompoundRulesPackage.PARALLEL_RULE:
+      {
+        ParallelRule parallelRule = (ParallelRule)theEObject;
+        T result = caseParallelRule(parallelRule);
+        if (result == null) result = caseNestedRule(parallelRule);
+        if (result == null) result = caseASMRuleInvocation(parallelRule);
+        if (result == null) result = caseGTASMElement(parallelRule);
+        if (result == null) result = caseAnnotatedElement(parallelRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CompoundRulesPackage.CHOOSE_RULE:
+      {
+        ChooseRule chooseRule = (ChooseRule)theEObject;
+        T result = caseChooseRule(chooseRule);
+        if (result == null) result = caseCollectionIteratorRule(chooseRule);
+        if (result == null) result = caseBlockRule(chooseRule);
+        if (result == null) result = caseCompoundRule(chooseRule);
+        if (result == null) result = caseASMRuleInvocation(chooseRule);
+        if (result == null) result = caseGTASMElement(chooseRule);
+        if (result == null) result = caseAnnotatedElement(chooseRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CompoundRulesPackage.COLLECTION_ITERATOR_RULE:
+      {
+        CollectionIteratorRule collectionIteratorRule = (CollectionIteratorRule)theEObject;
+        T result = caseCollectionIteratorRule(collectionIteratorRule);
+        if (result == null) result = caseBlockRule(collectionIteratorRule);
+        if (result == null) result = caseCompoundRule(collectionIteratorRule);
+        if (result == null) result = caseASMRuleInvocation(collectionIteratorRule);
+        if (result == null) result = caseGTASMElement(collectionIteratorRule);
+        if (result == null) result = caseAnnotatedElement(collectionIteratorRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CompoundRulesPackage.COMPOUND_RULE:
+      {
+        CompoundRule compoundRule = (CompoundRule)theEObject;
+        T result = caseCompoundRule(compoundRule);
+        if (result == null) result = caseASMRuleInvocation(compoundRule);
+        if (result == null) result = caseGTASMElement(compoundRule);
+        if (result == null) result = caseAnnotatedElement(compoundRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CompoundRulesPackage.FORALL_RULE:
+      {
+        ForallRule forallRule = (ForallRule)theEObject;
+        T result = caseForallRule(forallRule);
+        if (result == null) result = caseCollectionIteratorRule(forallRule);
+        if (result == null) result = caseBlockRule(forallRule);
+        if (result == null) result = caseCompoundRule(forallRule);
+        if (result == null) result = caseASMRuleInvocation(forallRule);
+        if (result == null) result = caseGTASMElement(forallRule);
+        if (result == null) result = caseAnnotatedElement(forallRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CompoundRulesPackage.ITERATE_RULE:
+      {
+        IterateRule iterateRule = (IterateRule)theEObject;
+        T result = caseIterateRule(iterateRule);
+        if (result == null) result = caseCompoundRule(iterateRule);
+        if (result == null) result = caseASMRuleInvocation(iterateRule);
+        if (result == null) result = caseGTASMElement(iterateRule);
+        if (result == null) result = caseAnnotatedElement(iterateRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CompoundRulesPackage.LET_RULE:
+      {
+        LetRule letRule = (LetRule)theEObject;
+        T result = caseLetRule(letRule);
+        if (result == null) result = caseBlockRule(letRule);
+        if (result == null) result = caseCompoundRule(letRule);
+        if (result == null) result = caseASMRuleInvocation(letRule);
+        if (result == null) result = caseGTASMElement(letRule);
+        if (result == null) result = caseAnnotatedElement(letRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CompoundRulesPackage.BLOCK_RULE:
+      {
+        BlockRule blockRule = (BlockRule)theEObject;
+        T result = caseBlockRule(blockRule);
+        if (result == null) result = caseCompoundRule(blockRule);
+        if (result == null) result = caseASMRuleInvocation(blockRule);
+        if (result == null) result = caseGTASMElement(blockRule);
+        if (result == null) result = caseAnnotatedElement(blockRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CompoundRulesPackage.WHEN_RULE:
+      {
+        WhenRule whenRule = (WhenRule)theEObject;
+        T result = caseWhenRule(whenRule);
+        if (result == null) result = caseCompoundRule(whenRule);
+        if (result == null) result = caseASMRuleInvocation(whenRule);
+        if (result == null) result = caseGTASMElement(whenRule);
+        if (result == null) result = caseAnnotatedElement(whenRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      default: return defaultCase(theEObject);
+    }
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Sequential Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Sequential Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseSequentialRule(SequentialRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Nested Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Nested Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseNestedRule(NestedRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Random Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Random Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseRandomRule(RandomRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Parallel Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Parallel Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseParallelRule(ParallelRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Choose Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Choose Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseChooseRule(ChooseRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Collection Iterator Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Collection Iterator Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseCollectionIteratorRule(CollectionIteratorRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Compound Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Compound Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseCompoundRule(CompoundRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Forall Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Forall Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseForallRule(ForallRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Iterate Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Iterate Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseIterateRule(IterateRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Let Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Let Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseLetRule(LetRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Block Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Block Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseBlockRule(BlockRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>When Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>When Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseWhenRule(WhenRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseAnnotatedElement(AnnotatedElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGTASMElement(GTASMElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>ASM Rule Invocation</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>ASM Rule Invocation</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseASMRuleInvocation(ASMRuleInvocation object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch, but this is the last case anyway.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+   * @generated
+   */
+  public T defaultCase(EObject object)
+  {
+    return null;
+  }
+
+} //CompoundRulesSwitch
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/AnnotatedElement.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/AnnotatedElement.java
new file mode 100644
index 0000000..ac7a487
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/AnnotatedElement.java
@@ -0,0 +1,59 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Annotated Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement#getAnnotations <em>Annotations</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage#getAnnotatedElement()
+ * @model abstract="true"
+ * @generated
+ */
+public interface AnnotatedElement extends EObject
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Annotations</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Annotations</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Annotations</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage#getAnnotatedElement_Annotations()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  EList<Annotation> getAnnotations();
+
+} // AnnotatedElement
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/Annotation.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/Annotation.java
new file mode 100644
index 0000000..e481ae4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/Annotation.java
@@ -0,0 +1,94 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Annotation</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation#getValue <em>Value</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation#getKey <em>Key</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage#getAnnotation()
+ * @model
+ * @generated
+ */
+public interface Annotation extends EObject
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Value</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Value</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Value</em>' attribute.
+   * @see #setValue(String)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage#getAnnotation_Value()
+   * @model unique="false" required="true" ordered="false"
+   * @generated
+   */
+  String getValue();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation#getValue <em>Value</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Value</em>' attribute.
+   * @see #getValue()
+   * @generated
+   */
+  void setValue(String value);
+
+  /**
+   * Returns the value of the '<em><b>Key</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Key</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Key</em>' attribute.
+   * @see #setKey(String)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage#getAnnotation_Key()
+   * @model unique="false" required="true" ordered="false"
+   * @generated
+   */
+  String getKey();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation#getKey <em>Key</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Key</em>' attribute.
+   * @see #getKey()
+   * @generated
+   */
+  void setKey(String value);
+
+} // Annotation
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/CoreFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/CoreFactory.java
new file mode 100644
index 0000000..6ee226c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/CoreFactory.java
@@ -0,0 +1,77 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage
+ * @generated
+ */
+public interface CoreFactory extends EFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The singleton instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  CoreFactory eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CoreFactoryImpl.init();
+
+  /**
+   * Returns a new object of class '<em>Annotation</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Annotation</em>'.
+   * @generated
+   */
+  Annotation createAnnotation();
+
+  /**
+   * Returns a new object of class '<em>Runtime Annotation</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Runtime Annotation</em>'.
+   * @generated
+   */
+  RuntimeAnnotation createRuntimeAnnotation();
+
+  /**
+   * Returns a new object of class '<em>Runtime Annotation Element</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Runtime Annotation Element</em>'.
+   * @generated
+   */
+  RuntimeAnnotationElement createRuntimeAnnotationElement();
+
+  /**
+   * Returns the package supported by this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the package supported by this factory.
+   * @generated
+   */
+  CorePackage getCorePackage();
+
+} //CoreFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/CorePackage.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/CorePackage.java
new file mode 100644
index 0000000..30ed5ff
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/CorePackage.java
@@ -0,0 +1,631 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ *   <li>each class,</li>
+ *   <li>each feature of each class,</li>
+ *   <li>each enum,</li>
+ *   <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CoreFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface CorePackage extends EPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The package name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNAME = "core";
+
+  /**
+   * The package namespace URI.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_URI = "http:///viatragtasmmodel/gtasm/metamodel/asm/core.ecore";
+
+  /**
+   * The package namespace name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_PREFIX = "viatragtasmmodel.gtasm.metamodel.asm.core";
+
+  /**
+   * The singleton instance of the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  CorePackage eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl.init();
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.AnnotationImpl <em>Annotation</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.AnnotationImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl#getAnnotation()
+   * @generated
+   */
+  int ANNOTATION = 0;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ANNOTATION__VALUE = 0;
+
+  /**
+   * The feature id for the '<em><b>Key</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ANNOTATION__KEY = 1;
+
+  /**
+   * The number of structural features of the '<em>Annotation</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ANNOTATION_FEATURE_COUNT = 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.AnnotatedElementImpl <em>Annotated Element</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.AnnotatedElementImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl#getAnnotatedElement()
+   * @generated
+   */
+  int ANNOTATED_ELEMENT = 4;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ANNOTATED_ELEMENT__ANNOTATIONS = 0;
+
+  /**
+   * The number of structural features of the '<em>Annotated Element</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ANNOTATED_ELEMENT_FEATURE_COUNT = 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl <em>GTASM Element</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl#getGTASMElement()
+   * @generated
+   */
+  int GTASM_ELEMENT = 1;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GTASM_ELEMENT__ANNOTATIONS = ANNOTATED_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GTASM_ELEMENT__NAME = ANNOTATED_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GTASM_ELEMENT__ID = ANNOTATED_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GTASM_ELEMENT__FQN = ANNOTATED_ELEMENT_FEATURE_COUNT + 2;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GTASM_ELEMENT__RUNTIME_ANNOTATIONS = ANNOTATED_ELEMENT_FEATURE_COUNT + 3;
+
+  /**
+   * The number of structural features of the '<em>GTASM Element</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GTASM_ELEMENT_FEATURE_COUNT = ANNOTATED_ELEMENT_FEATURE_COUNT + 4;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.RuntimeAnnotationImpl <em>Runtime Annotation</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.RuntimeAnnotationImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl#getRuntimeAnnotation()
+   * @generated
+   */
+  int RUNTIME_ANNOTATION = 2;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RUNTIME_ANNOTATION__ANNOTATIONS = ANNOTATED_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Elements</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RUNTIME_ANNOTATION__ELEMENTS = ANNOTATED_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Annotation Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RUNTIME_ANNOTATION__ANNOTATION_NAME = ANNOTATED_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Runtime Annotation</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RUNTIME_ANNOTATION_FEATURE_COUNT = ANNOTATED_ELEMENT_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.RuntimeAnnotationElementImpl <em>Runtime Annotation Element</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.RuntimeAnnotationElementImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl#getRuntimeAnnotationElement()
+   * @generated
+   */
+  int RUNTIME_ANNOTATION_ELEMENT = 3;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RUNTIME_ANNOTATION_ELEMENT__ANNOTATIONS = ANNOTATED_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RUNTIME_ANNOTATION_ELEMENT__VALUE = ANNOTATED_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Key</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RUNTIME_ANNOTATION_ELEMENT__KEY = ANNOTATED_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Runtime Annotation Element</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RUNTIME_ANNOTATION_ELEMENT_FEATURE_COUNT = ANNOTATED_ELEMENT_FEATURE_COUNT + 2;
+
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation <em>Annotation</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Annotation</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation
+   * @generated
+   */
+  EClass getAnnotation();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation#getValue <em>Value</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Value</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation#getValue()
+   * @see #getAnnotation()
+   * @generated
+   */
+  EAttribute getAnnotation_Value();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation#getKey <em>Key</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Key</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation#getKey()
+   * @see #getAnnotation()
+   * @generated
+   */
+  EAttribute getAnnotation_Key();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement <em>GTASM Element</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>GTASM Element</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement
+   * @generated
+   */
+  EClass getGTASMElement();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement#getName <em>Name</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Name</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement#getName()
+   * @see #getGTASMElement()
+   * @generated
+   */
+  EAttribute getGTASMElement_Name();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement#getId <em>Id</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Id</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement#getId()
+   * @see #getGTASMElement()
+   * @generated
+   */
+  EAttribute getGTASMElement_Id();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement#getFqn <em>Fqn</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Fqn</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement#getFqn()
+   * @see #getGTASMElement()
+   * @generated
+   */
+  EAttribute getGTASMElement_Fqn();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement#getRuntimeAnnotations <em>Runtime Annotations</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Runtime Annotations</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement#getRuntimeAnnotations()
+   * @see #getGTASMElement()
+   * @generated
+   */
+  EReference getGTASMElement_RuntimeAnnotations();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation <em>Runtime Annotation</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Runtime Annotation</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation
+   * @generated
+   */
+  EClass getRuntimeAnnotation();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation#getElements <em>Elements</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Elements</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation#getElements()
+   * @see #getRuntimeAnnotation()
+   * @generated
+   */
+  EReference getRuntimeAnnotation_Elements();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation#getAnnotationName <em>Annotation Name</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Annotation Name</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation#getAnnotationName()
+   * @see #getRuntimeAnnotation()
+   * @generated
+   */
+  EAttribute getRuntimeAnnotation_AnnotationName();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement <em>Runtime Annotation Element</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Runtime Annotation Element</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement
+   * @generated
+   */
+  EClass getRuntimeAnnotationElement();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement#getValue <em>Value</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Value</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement#getValue()
+   * @see #getRuntimeAnnotationElement()
+   * @generated
+   */
+  EAttribute getRuntimeAnnotationElement_Value();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement#getKey <em>Key</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Key</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement#getKey()
+   * @see #getRuntimeAnnotationElement()
+   * @generated
+   */
+  EAttribute getRuntimeAnnotationElement_Key();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement <em>Annotated Element</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Annotated Element</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement
+   * @generated
+   */
+  EClass getAnnotatedElement();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement#getAnnotations <em>Annotations</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Annotations</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement#getAnnotations()
+   * @see #getAnnotatedElement()
+   * @generated
+   */
+  EReference getAnnotatedElement_Annotations();
+
+  /**
+   * Returns the factory that creates the instances of the model.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the factory that creates the instances of the model.
+   * @generated
+   */
+  CoreFactory getCoreFactory();
+
+  /**
+   * <!-- begin-user-doc -->
+   * Defines literals for the meta objects that represent
+   * <ul>
+   *   <li>each class,</li>
+   *   <li>each feature of each class,</li>
+   *   <li>each enum,</li>
+   *   <li>and each data type</li>
+   * </ul>
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  interface Literals
+  {
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.AnnotationImpl <em>Annotation</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.AnnotationImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl#getAnnotation()
+     * @generated
+     */
+    EClass ANNOTATION = eINSTANCE.getAnnotation();
+
+    /**
+     * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute ANNOTATION__VALUE = eINSTANCE.getAnnotation_Value();
+
+    /**
+     * The meta object literal for the '<em><b>Key</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute ANNOTATION__KEY = eINSTANCE.getAnnotation_Key();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl <em>GTASM Element</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl#getGTASMElement()
+     * @generated
+     */
+    EClass GTASM_ELEMENT = eINSTANCE.getGTASMElement();
+
+    /**
+     * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute GTASM_ELEMENT__NAME = eINSTANCE.getGTASMElement_Name();
+
+    /**
+     * The meta object literal for the '<em><b>Id</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute GTASM_ELEMENT__ID = eINSTANCE.getGTASMElement_Id();
+
+    /**
+     * The meta object literal for the '<em><b>Fqn</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute GTASM_ELEMENT__FQN = eINSTANCE.getGTASMElement_Fqn();
+
+    /**
+     * The meta object literal for the '<em><b>Runtime Annotations</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GTASM_ELEMENT__RUNTIME_ANNOTATIONS = eINSTANCE.getGTASMElement_RuntimeAnnotations();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.RuntimeAnnotationImpl <em>Runtime Annotation</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.RuntimeAnnotationImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl#getRuntimeAnnotation()
+     * @generated
+     */
+    EClass RUNTIME_ANNOTATION = eINSTANCE.getRuntimeAnnotation();
+
+    /**
+     * The meta object literal for the '<em><b>Elements</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference RUNTIME_ANNOTATION__ELEMENTS = eINSTANCE.getRuntimeAnnotation_Elements();
+
+    /**
+     * The meta object literal for the '<em><b>Annotation Name</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute RUNTIME_ANNOTATION__ANNOTATION_NAME = eINSTANCE.getRuntimeAnnotation_AnnotationName();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.RuntimeAnnotationElementImpl <em>Runtime Annotation Element</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.RuntimeAnnotationElementImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl#getRuntimeAnnotationElement()
+     * @generated
+     */
+    EClass RUNTIME_ANNOTATION_ELEMENT = eINSTANCE.getRuntimeAnnotationElement();
+
+    /**
+     * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute RUNTIME_ANNOTATION_ELEMENT__VALUE = eINSTANCE.getRuntimeAnnotationElement_Value();
+
+    /**
+     * The meta object literal for the '<em><b>Key</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute RUNTIME_ANNOTATION_ELEMENT__KEY = eINSTANCE.getRuntimeAnnotationElement_Key();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.AnnotatedElementImpl <em>Annotated Element</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.AnnotatedElementImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl#getAnnotatedElement()
+     * @generated
+     */
+    EClass ANNOTATED_ELEMENT = eINSTANCE.getAnnotatedElement();
+
+    /**
+     * The meta object literal for the '<em><b>Annotations</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference ANNOTATED_ELEMENT__ANNOTATIONS = eINSTANCE.getAnnotatedElement_Annotations();
+
+  }
+
+} //CorePackage
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/GTASMElement.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/GTASMElement.java
new file mode 100644
index 0000000..33b110c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/GTASMElement.java
@@ -0,0 +1,138 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>GTASM Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement#getName <em>Name</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement#getId <em>Id</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement#getFqn <em>Fqn</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement#getRuntimeAnnotations <em>Runtime Annotations</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage#getGTASMElement()
+ * @model abstract="true"
+ * @generated
+ */
+public interface GTASMElement extends AnnotatedElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Name</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Name</em>' attribute.
+   * @see #setName(String)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage#getGTASMElement_Name()
+   * @model unique="false" required="true" ordered="false"
+   * @generated
+   */
+  String getName();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement#getName <em>Name</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Name</em>' attribute.
+   * @see #getName()
+   * @generated
+   */
+  void setName(String value);
+
+  /**
+   * Returns the value of the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Id</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Id</em>' attribute.
+   * @see #setId(long)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage#getGTASMElement_Id()
+   * @model required="true" ordered="false"
+   * @generated
+   */
+  long getId();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement#getId <em>Id</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Id</em>' attribute.
+   * @see #getId()
+   * @generated
+   */
+  void setId(long value);
+
+  /**
+   * Returns the value of the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Fqn</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Fqn</em>' attribute.
+   * @see #setFqn(String)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage#getGTASMElement_Fqn()
+   * @model
+   * @generated
+   */
+  String getFqn();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement#getFqn <em>Fqn</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Fqn</em>' attribute.
+   * @see #getFqn()
+   * @generated
+   */
+  void setFqn(String value);
+
+  /**
+   * Returns the value of the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Runtime Annotations</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Runtime Annotations</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage#getGTASMElement_RuntimeAnnotations()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  EList<RuntimeAnnotation> getRuntimeAnnotations();
+
+} // GTASMElement
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/RuntimeAnnotation.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/RuntimeAnnotation.java
new file mode 100644
index 0000000..02100a1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/RuntimeAnnotation.java
@@ -0,0 +1,84 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Runtime Annotation</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation#getElements <em>Elements</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation#getAnnotationName <em>Annotation Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage#getRuntimeAnnotation()
+ * @model
+ * @generated
+ */
+public interface RuntimeAnnotation extends AnnotatedElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Elements</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Elements</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Elements</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage#getRuntimeAnnotation_Elements()
+   * @model containment="true"
+   * @generated
+   */
+  EList<RuntimeAnnotationElement> getElements();
+
+  /**
+   * Returns the value of the '<em><b>Annotation Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Annotation Name</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Annotation Name</em>' attribute.
+   * @see #setAnnotationName(String)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage#getRuntimeAnnotation_AnnotationName()
+   * @model required="true"
+   * @generated
+   */
+  String getAnnotationName();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation#getAnnotationName <em>Annotation Name</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Annotation Name</em>' attribute.
+   * @see #getAnnotationName()
+   * @generated
+   */
+  void setAnnotationName(String value);
+
+} // RuntimeAnnotation
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/RuntimeAnnotationElement.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/RuntimeAnnotationElement.java
new file mode 100644
index 0000000..9470bf6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/RuntimeAnnotationElement.java
@@ -0,0 +1,93 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Runtime Annotation Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement#getValue <em>Value</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement#getKey <em>Key</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage#getRuntimeAnnotationElement()
+ * @model
+ * @generated
+ */
+public interface RuntimeAnnotationElement extends AnnotatedElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Value</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Value</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Value</em>' attribute.
+   * @see #setValue(String)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage#getRuntimeAnnotationElement_Value()
+   * @model unique="false" required="true" ordered="false"
+   * @generated
+   */
+  String getValue();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement#getValue <em>Value</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Value</em>' attribute.
+   * @see #getValue()
+   * @generated
+   */
+  void setValue(String value);
+
+  /**
+   * Returns the value of the '<em><b>Key</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Key</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Key</em>' attribute.
+   * @see #setKey(String)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage#getRuntimeAnnotationElement_Key()
+   * @model unique="false" required="true" ordered="false"
+   * @generated
+   */
+  String getKey();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement#getKey <em>Key</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Key</em>' attribute.
+   * @see #getKey()
+   * @generated
+   */
+  void setKey(String value);
+
+} // RuntimeAnnotationElement
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/AnnotatedElementImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/AnnotatedElementImpl.java
new file mode 100644
index 0000000..72352c7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/AnnotatedElementImpl.java
@@ -0,0 +1,183 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Annotated Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.AnnotatedElementImpl#getAnnotations <em>Annotations</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class AnnotatedElementImpl extends EObjectImpl implements AnnotatedElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getAnnotations() <em>Annotations</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getAnnotations()
+   * @generated
+   * @ordered
+   */
+  protected EList<Annotation> annotations;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected AnnotatedElementImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CorePackage.Literals.ANNOTATED_ELEMENT;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Annotation> getAnnotations()
+  {
+    if (annotations == null)
+    {
+      annotations = new EObjectContainmentEList<Annotation>(Annotation.class, this, CorePackage.ANNOTATED_ELEMENT__ANNOTATIONS);
+    }
+    return annotations;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case CorePackage.ANNOTATED_ELEMENT__ANNOTATIONS:
+        return ((InternalEList<?>)getAnnotations()).basicRemove(otherEnd, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case CorePackage.ANNOTATED_ELEMENT__ANNOTATIONS:
+        return getAnnotations();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case CorePackage.ANNOTATED_ELEMENT__ANNOTATIONS:
+        getAnnotations().clear();
+        getAnnotations().addAll((Collection<? extends Annotation>)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case CorePackage.ANNOTATED_ELEMENT__ANNOTATIONS:
+        getAnnotations().clear();
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case CorePackage.ANNOTATED_ELEMENT__ANNOTATIONS:
+        return annotations != null && !annotations.isEmpty();
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //AnnotatedElementImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/AnnotationImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/AnnotationImpl.java
new file mode 100644
index 0000000..62ef202
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/AnnotationImpl.java
@@ -0,0 +1,249 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Annotation</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.AnnotationImpl#getValue <em>Value</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.AnnotationImpl#getKey <em>Key</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class AnnotationImpl extends EObjectImpl implements Annotation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getValue()
+   * @generated
+   * @ordered
+   */
+  protected static final String VALUE_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getValue()
+   * @generated
+   * @ordered
+   */
+  protected String value = VALUE_EDEFAULT;
+
+  /**
+   * The default value of the '{@link #getKey() <em>Key</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getKey()
+   * @generated
+   * @ordered
+   */
+  protected static final String KEY_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getKey() <em>Key</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getKey()
+   * @generated
+   * @ordered
+   */
+  protected String key = KEY_EDEFAULT;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected AnnotationImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CorePackage.Literals.ANNOTATION;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getValue()
+  {
+    return value;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setValue(String newValue)
+  {
+    String oldValue = value;
+    value = newValue;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.ANNOTATION__VALUE, oldValue, value));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getKey()
+  {
+    return key;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setKey(String newKey)
+  {
+    String oldKey = key;
+    key = newKey;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.ANNOTATION__KEY, oldKey, key));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case CorePackage.ANNOTATION__VALUE:
+        return getValue();
+      case CorePackage.ANNOTATION__KEY:
+        return getKey();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case CorePackage.ANNOTATION__VALUE:
+        setValue((String)newValue);
+        return;
+      case CorePackage.ANNOTATION__KEY:
+        setKey((String)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case CorePackage.ANNOTATION__VALUE:
+        setValue(VALUE_EDEFAULT);
+        return;
+      case CorePackage.ANNOTATION__KEY:
+        setKey(KEY_EDEFAULT);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case CorePackage.ANNOTATION__VALUE:
+        return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+      case CorePackage.ANNOTATION__KEY:
+        return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key);
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (value: ");
+    result.append(value);
+    result.append(", key: ");
+    result.append(key);
+    result.append(')');
+    return result.toString();
+  }
+
+} //AnnotationImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/CoreFactoryImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/CoreFactoryImpl.java
new file mode 100644
index 0000000..f65520a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/CoreFactoryImpl.java
@@ -0,0 +1,146 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CoreFactoryImpl extends EFactoryImpl implements CoreFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Creates the default factory implementation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static CoreFactory init()
+  {
+    try
+    {
+      CoreFactory theCoreFactory = (CoreFactory)EPackage.Registry.INSTANCE.getEFactory("http:///viatragtasmmodel/gtasm/metamodel/asm/core.ecore"); 
+      if (theCoreFactory != null)
+      {
+        return theCoreFactory;
+      }
+    }
+    catch (Exception exception)
+    {
+      EcorePlugin.INSTANCE.log(exception);
+    }
+    return new CoreFactoryImpl();
+  }
+
+  /**
+   * Creates an instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CoreFactoryImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public EObject create(EClass eClass)
+  {
+    switch (eClass.getClassifierID())
+    {
+      case CorePackage.ANNOTATION: return createAnnotation();
+      case CorePackage.RUNTIME_ANNOTATION: return createRuntimeAnnotation();
+      case CorePackage.RUNTIME_ANNOTATION_ELEMENT: return createRuntimeAnnotationElement();
+      default:
+        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+    }
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Annotation createAnnotation()
+  {
+    AnnotationImpl annotation = new AnnotationImpl();
+    return annotation;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RuntimeAnnotation createRuntimeAnnotation()
+  {
+    RuntimeAnnotationImpl runtimeAnnotation = new RuntimeAnnotationImpl();
+    return runtimeAnnotation;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RuntimeAnnotationElement createRuntimeAnnotationElement()
+  {
+    RuntimeAnnotationElementImpl runtimeAnnotationElement = new RuntimeAnnotationElementImpl();
+    return runtimeAnnotationElement;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CorePackage getCorePackage()
+  {
+    return (CorePackage)getEPackage();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @deprecated
+   * @generated
+   */
+  @Deprecated
+  public static CorePackage getPackage()
+  {
+    return CorePackage.eINSTANCE;
+  }
+
+} //CoreFactoryImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/CorePackageImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/CorePackageImpl.java
new file mode 100644
index 0000000..50eb026
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/CorePackageImpl.java
@@ -0,0 +1,506 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CoreFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymovePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CorePackageImpl extends EPackageImpl implements CorePackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass annotationEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass gtasmElementEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass runtimeAnnotationEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass runtimeAnnotationElementEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass annotatedElementEClass = null;
+
+  /**
+   * Creates an instance of the model <b>Package</b>, registered with
+   * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+   * package URI value.
+   * <p>Note: the correct way to create the package is via the static
+   * factory method {@link #init init()}, which also performs
+   * initialization of the package, or returns the registered package,
+   * if one already exists.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.emf.ecore.EPackage.Registry
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage#eNS_URI
+   * @see #init()
+   * @generated
+   */
+  private CorePackageImpl()
+  {
+    super(eNS_URI, CoreFactory.eINSTANCE);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static boolean isInited = false;
+
+  /**
+   * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+   * 
+   * <p>This method is used to initialize {@link CorePackage#eINSTANCE} when that field is accessed.
+   * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #eNS_URI
+   * @see #createPackageContents()
+   * @see #initializePackageContents()
+   * @generated
+   */
+  public static CorePackage init()
+  {
+    if (isInited) return (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI);
+
+    // Obtain or create and register package
+    CorePackageImpl theCorePackage = (CorePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof CorePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new CorePackageImpl());
+
+    isInited = true;
+
+    // Obtain or create and register interdependencies
+    EditmodelPackageImpl theEditmodelPackage = (EditmodelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) instanceof EditmodelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) : EditmodelPackage.eINSTANCE);
+    QueryFunctionsPackageImpl theQueryFunctionsPackage = (QueryFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) instanceof QueryFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) : QueryFunctionsPackage.eINSTANCE);
+    DeletionPackageImpl theDeletionPackage = (DeletionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) instanceof DeletionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) : DeletionPackage.eINSTANCE);
+    CreationPackageImpl theCreationPackage = (CreationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) instanceof CreationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) : CreationPackage.eINSTANCE);
+    CopymovePackageImpl theCopymovePackage = (CopymovePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) instanceof CopymovePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) : CopymovePackage.eINSTANCE);
+    UpdatePackageImpl theUpdatePackage = (UpdatePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) instanceof UpdatePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) : UpdatePackage.eINSTANCE);
+    DefinitionsPackageImpl theDefinitionsPackage = (DefinitionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) instanceof DefinitionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) : DefinitionsPackage.eINSTANCE);
+    SimpleRulesPackageImpl theSimpleRulesPackage = (SimpleRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) instanceof SimpleRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) : SimpleRulesPackage.eINSTANCE);
+    CompoundRulesPackageImpl theCompoundRulesPackage = (CompoundRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) instanceof CompoundRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) : CompoundRulesPackage.eINSTANCE);
+    EnumsPackageImpl theEnumsPackage = (EnumsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) instanceof EnumsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) : EnumsPackage.eINSTANCE);
+    TermsPackageImpl theTermsPackage = (TermsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) instanceof TermsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) : TermsPackage.eINSTANCE);
+    BuiltInFunctionsPackageImpl theBuiltInFunctionsPackage = (BuiltInFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) instanceof BuiltInFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) : BuiltInFunctionsPackage.eINSTANCE);
+    GtPackageImpl theGtPackage = (GtPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) instanceof GtPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) : GtPackage.eINSTANCE);
+
+    // Create package meta-data objects
+    theCorePackage.createPackageContents();
+    theEditmodelPackage.createPackageContents();
+    theQueryFunctionsPackage.createPackageContents();
+    theDeletionPackage.createPackageContents();
+    theCreationPackage.createPackageContents();
+    theCopymovePackage.createPackageContents();
+    theUpdatePackage.createPackageContents();
+    theDefinitionsPackage.createPackageContents();
+    theSimpleRulesPackage.createPackageContents();
+    theCompoundRulesPackage.createPackageContents();
+    theEnumsPackage.createPackageContents();
+    theTermsPackage.createPackageContents();
+    theBuiltInFunctionsPackage.createPackageContents();
+    theGtPackage.createPackageContents();
+
+    // Initialize created meta-data
+    theCorePackage.initializePackageContents();
+    theEditmodelPackage.initializePackageContents();
+    theQueryFunctionsPackage.initializePackageContents();
+    theDeletionPackage.initializePackageContents();
+    theCreationPackage.initializePackageContents();
+    theCopymovePackage.initializePackageContents();
+    theUpdatePackage.initializePackageContents();
+    theDefinitionsPackage.initializePackageContents();
+    theSimpleRulesPackage.initializePackageContents();
+    theCompoundRulesPackage.initializePackageContents();
+    theEnumsPackage.initializePackageContents();
+    theTermsPackage.initializePackageContents();
+    theBuiltInFunctionsPackage.initializePackageContents();
+    theGtPackage.initializePackageContents();
+
+    // Mark meta-data to indicate it can't be changed
+    theCorePackage.freeze();
+
+  
+    // Update the registry and return the package
+    EPackage.Registry.INSTANCE.put(CorePackage.eNS_URI, theCorePackage);
+    return theCorePackage;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getAnnotation()
+  {
+    return annotationEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getAnnotation_Value()
+  {
+    return (EAttribute)annotationEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getAnnotation_Key()
+  {
+    return (EAttribute)annotationEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getGTASMElement()
+  {
+    return gtasmElementEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getGTASMElement_Name()
+  {
+    return (EAttribute)gtasmElementEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getGTASMElement_Id()
+  {
+    return (EAttribute)gtasmElementEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getGTASMElement_Fqn()
+  {
+    return (EAttribute)gtasmElementEClass.getEStructuralFeatures().get(2);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTASMElement_RuntimeAnnotations()
+  {
+    return (EReference)gtasmElementEClass.getEStructuralFeatures().get(3);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getRuntimeAnnotation()
+  {
+    return runtimeAnnotationEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getRuntimeAnnotation_Elements()
+  {
+    return (EReference)runtimeAnnotationEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getRuntimeAnnotation_AnnotationName()
+  {
+    return (EAttribute)runtimeAnnotationEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getRuntimeAnnotationElement()
+  {
+    return runtimeAnnotationElementEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getRuntimeAnnotationElement_Value()
+  {
+    return (EAttribute)runtimeAnnotationElementEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getRuntimeAnnotationElement_Key()
+  {
+    return (EAttribute)runtimeAnnotationElementEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getAnnotatedElement()
+  {
+    return annotatedElementEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getAnnotatedElement_Annotations()
+  {
+    return (EReference)annotatedElementEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CoreFactory getCoreFactory()
+  {
+    return (CoreFactory)getEFactoryInstance();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isCreated = false;
+
+  /**
+   * Creates the meta-model objects for the package.  This method is
+   * guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void createPackageContents()
+  {
+    if (isCreated) return;
+    isCreated = true;
+
+    // Create classes and their features
+    annotationEClass = createEClass(ANNOTATION);
+    createEAttribute(annotationEClass, ANNOTATION__VALUE);
+    createEAttribute(annotationEClass, ANNOTATION__KEY);
+
+    gtasmElementEClass = createEClass(GTASM_ELEMENT);
+    createEAttribute(gtasmElementEClass, GTASM_ELEMENT__NAME);
+    createEAttribute(gtasmElementEClass, GTASM_ELEMENT__ID);
+    createEAttribute(gtasmElementEClass, GTASM_ELEMENT__FQN);
+    createEReference(gtasmElementEClass, GTASM_ELEMENT__RUNTIME_ANNOTATIONS);
+
+    runtimeAnnotationEClass = createEClass(RUNTIME_ANNOTATION);
+    createEReference(runtimeAnnotationEClass, RUNTIME_ANNOTATION__ELEMENTS);
+    createEAttribute(runtimeAnnotationEClass, RUNTIME_ANNOTATION__ANNOTATION_NAME);
+
+    runtimeAnnotationElementEClass = createEClass(RUNTIME_ANNOTATION_ELEMENT);
+    createEAttribute(runtimeAnnotationElementEClass, RUNTIME_ANNOTATION_ELEMENT__VALUE);
+    createEAttribute(runtimeAnnotationElementEClass, RUNTIME_ANNOTATION_ELEMENT__KEY);
+
+    annotatedElementEClass = createEClass(ANNOTATED_ELEMENT);
+    createEReference(annotatedElementEClass, ANNOTATED_ELEMENT__ANNOTATIONS);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isInitialized = false;
+
+  /**
+   * Complete the initialization of the package and its meta-model.  This
+   * method is guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void initializePackageContents()
+  {
+    if (isInitialized) return;
+    isInitialized = true;
+
+    // Initialize package
+    setName(eNAME);
+    setNsPrefix(eNS_PREFIX);
+    setNsURI(eNS_URI);
+
+    // Create type parameters
+
+    // Set bounds for type parameters
+
+    // Add supertypes to classes
+    gtasmElementEClass.getESuperTypes().add(this.getAnnotatedElement());
+    runtimeAnnotationEClass.getESuperTypes().add(this.getAnnotatedElement());
+    runtimeAnnotationElementEClass.getESuperTypes().add(this.getAnnotatedElement());
+
+    // Initialize classes and features; add operations and parameters
+    initEClass(annotationEClass, Annotation.class, "Annotation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEAttribute(getAnnotation_Value(), ecorePackage.getEString(), "value", null, 1, 1, Annotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEAttribute(getAnnotation_Key(), ecorePackage.getEString(), "key", null, 1, 1, Annotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(gtasmElementEClass, GTASMElement.class, "GTASMElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEAttribute(getGTASMElement_Name(), ecorePackage.getEString(), "name", null, 1, 1, GTASMElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEAttribute(getGTASMElement_Id(), ecorePackage.getELong(), "id", null, 1, 1, GTASMElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEAttribute(getGTASMElement_Fqn(), ecorePackage.getEString(), "fqn", null, 0, 1, GTASMElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getGTASMElement_RuntimeAnnotations(), this.getRuntimeAnnotation(), null, "runtimeAnnotations", null, 0, -1, GTASMElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(runtimeAnnotationEClass, RuntimeAnnotation.class, "RuntimeAnnotation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getRuntimeAnnotation_Elements(), this.getRuntimeAnnotationElement(), null, "elements", null, 0, -1, RuntimeAnnotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEAttribute(getRuntimeAnnotation_AnnotationName(), ecorePackage.getEString(), "annotationName", null, 1, 1, RuntimeAnnotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(runtimeAnnotationElementEClass, RuntimeAnnotationElement.class, "RuntimeAnnotationElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEAttribute(getRuntimeAnnotationElement_Value(), ecorePackage.getEString(), "value", null, 1, 1, RuntimeAnnotationElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEAttribute(getRuntimeAnnotationElement_Key(), ecorePackage.getEString(), "key", null, 1, 1, RuntimeAnnotationElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(annotatedElementEClass, AnnotatedElement.class, "AnnotatedElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getAnnotatedElement_Annotations(), this.getAnnotation(), null, "annotations", null, 0, -1, AnnotatedElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    // Create resource
+    createResource(eNS_URI);
+  }
+
+} //CorePackageImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/GTASMElementImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/GTASMElementImpl.java
new file mode 100644
index 0000000..d533f94
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/GTASMElementImpl.java
@@ -0,0 +1,367 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>GTASM Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl#getName <em>Name</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl#getId <em>Id</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl#getFqn <em>Fqn</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl#getRuntimeAnnotations <em>Runtime Annotations</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class GTASMElementImpl extends AnnotatedElementImpl implements GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getName()
+   * @generated
+   * @ordered
+   */
+  protected static final String NAME_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getName()
+   * @generated
+   * @ordered
+   */
+  protected String name = NAME_EDEFAULT;
+
+  /**
+   * The default value of the '{@link #getId() <em>Id</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getId()
+   * @generated
+   * @ordered
+   */
+  protected static final long ID_EDEFAULT = 0L;
+
+  /**
+   * The cached value of the '{@link #getId() <em>Id</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getId()
+   * @generated
+   * @ordered
+   */
+  protected long id = ID_EDEFAULT;
+
+  /**
+   * The default value of the '{@link #getFqn() <em>Fqn</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getFqn()
+   * @generated
+   * @ordered
+   */
+  protected static final String FQN_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getFqn() <em>Fqn</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getFqn()
+   * @generated
+   * @ordered
+   */
+  protected String fqn = FQN_EDEFAULT;
+
+  /**
+   * The cached value of the '{@link #getRuntimeAnnotations() <em>Runtime Annotations</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getRuntimeAnnotations()
+   * @generated
+   * @ordered
+   */
+  protected EList<RuntimeAnnotation> runtimeAnnotations;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected GTASMElementImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CorePackage.Literals.GTASM_ELEMENT;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getName()
+  {
+    return name;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setName(String newName)
+  {
+    String oldName = name;
+    name = newName;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.GTASM_ELEMENT__NAME, oldName, name));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public long getId()
+  {
+    return id;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setId(long newId)
+  {
+    long oldId = id;
+    id = newId;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.GTASM_ELEMENT__ID, oldId, id));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getFqn()
+  {
+    return fqn;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setFqn(String newFqn)
+  {
+    String oldFqn = fqn;
+    fqn = newFqn;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.GTASM_ELEMENT__FQN, oldFqn, fqn));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<RuntimeAnnotation> getRuntimeAnnotations()
+  {
+    if (runtimeAnnotations == null)
+    {
+      runtimeAnnotations = new EObjectContainmentEList<RuntimeAnnotation>(RuntimeAnnotation.class, this, CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS);
+    }
+    return runtimeAnnotations;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS:
+        return ((InternalEList<?>)getRuntimeAnnotations()).basicRemove(otherEnd, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case CorePackage.GTASM_ELEMENT__NAME:
+        return getName();
+      case CorePackage.GTASM_ELEMENT__ID:
+        return getId();
+      case CorePackage.GTASM_ELEMENT__FQN:
+        return getFqn();
+      case CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS:
+        return getRuntimeAnnotations();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case CorePackage.GTASM_ELEMENT__NAME:
+        setName((String)newValue);
+        return;
+      case CorePackage.GTASM_ELEMENT__ID:
+        setId((Long)newValue);
+        return;
+      case CorePackage.GTASM_ELEMENT__FQN:
+        setFqn((String)newValue);
+        return;
+      case CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS:
+        getRuntimeAnnotations().clear();
+        getRuntimeAnnotations().addAll((Collection<? extends RuntimeAnnotation>)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case CorePackage.GTASM_ELEMENT__NAME:
+        setName(NAME_EDEFAULT);
+        return;
+      case CorePackage.GTASM_ELEMENT__ID:
+        setId(ID_EDEFAULT);
+        return;
+      case CorePackage.GTASM_ELEMENT__FQN:
+        setFqn(FQN_EDEFAULT);
+        return;
+      case CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS:
+        getRuntimeAnnotations().clear();
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case CorePackage.GTASM_ELEMENT__NAME:
+        return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+      case CorePackage.GTASM_ELEMENT__ID:
+        return id != ID_EDEFAULT;
+      case CorePackage.GTASM_ELEMENT__FQN:
+        return FQN_EDEFAULT == null ? fqn != null : !FQN_EDEFAULT.equals(fqn);
+      case CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS:
+        return runtimeAnnotations != null && !runtimeAnnotations.isEmpty();
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (name: ");
+    result.append(name);
+    result.append(", id: ");
+    result.append(id);
+    result.append(", fqn: ");
+    result.append(fqn);
+    result.append(')');
+    return result.toString();
+  }
+
+} //GTASMElementImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/RuntimeAnnotationElementImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/RuntimeAnnotationElementImpl.java
new file mode 100644
index 0000000..63a9231
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/RuntimeAnnotationElementImpl.java
@@ -0,0 +1,248 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Runtime Annotation Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.RuntimeAnnotationElementImpl#getValue <em>Value</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.RuntimeAnnotationElementImpl#getKey <em>Key</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RuntimeAnnotationElementImpl extends AnnotatedElementImpl implements RuntimeAnnotationElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getValue()
+   * @generated
+   * @ordered
+   */
+  protected static final String VALUE_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getValue()
+   * @generated
+   * @ordered
+   */
+  protected String value = VALUE_EDEFAULT;
+
+  /**
+   * The default value of the '{@link #getKey() <em>Key</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getKey()
+   * @generated
+   * @ordered
+   */
+  protected static final String KEY_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getKey() <em>Key</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getKey()
+   * @generated
+   * @ordered
+   */
+  protected String key = KEY_EDEFAULT;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RuntimeAnnotationElementImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CorePackage.Literals.RUNTIME_ANNOTATION_ELEMENT;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getValue()
+  {
+    return value;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setValue(String newValue)
+  {
+    String oldValue = value;
+    value = newValue;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.RUNTIME_ANNOTATION_ELEMENT__VALUE, oldValue, value));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getKey()
+  {
+    return key;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setKey(String newKey)
+  {
+    String oldKey = key;
+    key = newKey;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.RUNTIME_ANNOTATION_ELEMENT__KEY, oldKey, key));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case CorePackage.RUNTIME_ANNOTATION_ELEMENT__VALUE:
+        return getValue();
+      case CorePackage.RUNTIME_ANNOTATION_ELEMENT__KEY:
+        return getKey();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case CorePackage.RUNTIME_ANNOTATION_ELEMENT__VALUE:
+        setValue((String)newValue);
+        return;
+      case CorePackage.RUNTIME_ANNOTATION_ELEMENT__KEY:
+        setKey((String)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case CorePackage.RUNTIME_ANNOTATION_ELEMENT__VALUE:
+        setValue(VALUE_EDEFAULT);
+        return;
+      case CorePackage.RUNTIME_ANNOTATION_ELEMENT__KEY:
+        setKey(KEY_EDEFAULT);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case CorePackage.RUNTIME_ANNOTATION_ELEMENT__VALUE:
+        return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+      case CorePackage.RUNTIME_ANNOTATION_ELEMENT__KEY:
+        return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key);
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (value: ");
+    result.append(value);
+    result.append(", key: ");
+    result.append(key);
+    result.append(')');
+    return result.toString();
+  }
+
+} //RuntimeAnnotationElementImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/RuntimeAnnotationImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/RuntimeAnnotationImpl.java
new file mode 100644
index 0000000..33a6f13
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/impl/RuntimeAnnotationImpl.java
@@ -0,0 +1,255 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Runtime Annotation</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.RuntimeAnnotationImpl#getElements <em>Elements</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.RuntimeAnnotationImpl#getAnnotationName <em>Annotation Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RuntimeAnnotationImpl extends AnnotatedElementImpl implements RuntimeAnnotation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getElements() <em>Elements</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getElements()
+   * @generated
+   * @ordered
+   */
+  protected EList<RuntimeAnnotationElement> elements;
+
+  /**
+   * The default value of the '{@link #getAnnotationName() <em>Annotation Name</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getAnnotationName()
+   * @generated
+   * @ordered
+   */
+  protected static final String ANNOTATION_NAME_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getAnnotationName() <em>Annotation Name</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getAnnotationName()
+   * @generated
+   * @ordered
+   */
+  protected String annotationName = ANNOTATION_NAME_EDEFAULT;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RuntimeAnnotationImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CorePackage.Literals.RUNTIME_ANNOTATION;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<RuntimeAnnotationElement> getElements()
+  {
+    if (elements == null)
+    {
+      elements = new EObjectContainmentEList<RuntimeAnnotationElement>(RuntimeAnnotationElement.class, this, CorePackage.RUNTIME_ANNOTATION__ELEMENTS);
+    }
+    return elements;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getAnnotationName()
+  {
+    return annotationName;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setAnnotationName(String newAnnotationName)
+  {
+    String oldAnnotationName = annotationName;
+    annotationName = newAnnotationName;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.RUNTIME_ANNOTATION__ANNOTATION_NAME, oldAnnotationName, annotationName));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case CorePackage.RUNTIME_ANNOTATION__ELEMENTS:
+        return ((InternalEList<?>)getElements()).basicRemove(otherEnd, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case CorePackage.RUNTIME_ANNOTATION__ELEMENTS:
+        return getElements();
+      case CorePackage.RUNTIME_ANNOTATION__ANNOTATION_NAME:
+        return getAnnotationName();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case CorePackage.RUNTIME_ANNOTATION__ELEMENTS:
+        getElements().clear();
+        getElements().addAll((Collection<? extends RuntimeAnnotationElement>)newValue);
+        return;
+      case CorePackage.RUNTIME_ANNOTATION__ANNOTATION_NAME:
+        setAnnotationName((String)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case CorePackage.RUNTIME_ANNOTATION__ELEMENTS:
+        getElements().clear();
+        return;
+      case CorePackage.RUNTIME_ANNOTATION__ANNOTATION_NAME:
+        setAnnotationName(ANNOTATION_NAME_EDEFAULT);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case CorePackage.RUNTIME_ANNOTATION__ELEMENTS:
+        return elements != null && !elements.isEmpty();
+      case CorePackage.RUNTIME_ANNOTATION__ANNOTATION_NAME:
+        return ANNOTATION_NAME_EDEFAULT == null ? annotationName != null : !ANNOTATION_NAME_EDEFAULT.equals(annotationName);
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (annotationName: ");
+    result.append(annotationName);
+    result.append(')');
+    return result.toString();
+  }
+
+} //RuntimeAnnotationImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/util/CoreAdapterFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/util/CoreAdapterFactory.java
new file mode 100644
index 0000000..e055655
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/util/CoreAdapterFactory.java
@@ -0,0 +1,228 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage
+ * @generated
+ */
+public class CoreAdapterFactory extends AdapterFactoryImpl
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static CorePackage modelPackage;
+
+  /**
+   * Creates an instance of the adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CoreAdapterFactory()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = CorePackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Returns whether this factory is applicable for the type of the object.
+   * <!-- begin-user-doc -->
+   * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+   * <!-- end-user-doc -->
+   * @return whether this factory is applicable for the type of the object.
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object object)
+  {
+    if (object == modelPackage)
+    {
+      return true;
+    }
+    if (object instanceof EObject)
+    {
+      return ((EObject)object).eClass().getEPackage() == modelPackage;
+    }
+    return false;
+  }
+
+  /**
+   * The switch that delegates to the <code>createXXX</code> methods.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected CoreSwitch<Adapter> modelSwitch =
+    new CoreSwitch<Adapter>()
+    {
+      @Override
+      public Adapter caseAnnotation(Annotation object)
+      {
+        return createAnnotationAdapter();
+      }
+      @Override
+      public Adapter caseGTASMElement(GTASMElement object)
+      {
+        return createGTASMElementAdapter();
+      }
+      @Override
+      public Adapter caseRuntimeAnnotation(RuntimeAnnotation object)
+      {
+        return createRuntimeAnnotationAdapter();
+      }
+      @Override
+      public Adapter caseRuntimeAnnotationElement(RuntimeAnnotationElement object)
+      {
+        return createRuntimeAnnotationElementAdapter();
+      }
+      @Override
+      public Adapter caseAnnotatedElement(AnnotatedElement object)
+      {
+        return createAnnotatedElementAdapter();
+      }
+      @Override
+      public Adapter defaultCase(EObject object)
+      {
+        return createEObjectAdapter();
+      }
+    };
+
+  /**
+   * Creates an adapter for the <code>target</code>.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param target the object to adapt.
+   * @return the adapter for the <code>target</code>.
+   * @generated
+   */
+  @Override
+  public Adapter createAdapter(Notifier target)
+  {
+    return modelSwitch.doSwitch((EObject)target);
+  }
+
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation <em>Annotation</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation
+   * @generated
+   */
+  public Adapter createAnnotationAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement <em>GTASM Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement
+   * @generated
+   */
+  public Adapter createGTASMElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation <em>Runtime Annotation</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation
+   * @generated
+   */
+  public Adapter createRuntimeAnnotationAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement <em>Runtime Annotation Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement
+   * @generated
+   */
+  public Adapter createRuntimeAnnotationElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement <em>Annotated Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement
+   * @generated
+   */
+  public Adapter createAnnotatedElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for the default case.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @generated
+   */
+  public Adapter createEObjectAdapter()
+  {
+    return null;
+  }
+
+} //CoreAdapterFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/util/CoreSwitch.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/util/CoreSwitch.java
new file mode 100644
index 0000000..d3c61aa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/core/util/CoreSwitch.java
@@ -0,0 +1,249 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage
+ * @generated
+ */
+public class CoreSwitch<T>
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static CorePackage modelPackage;
+
+  /**
+   * Creates an instance of the switch.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CoreSwitch()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = CorePackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  public T doSwitch(EObject theEObject)
+  {
+    return doSwitch(theEObject.eClass(), theEObject);
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(EClass theEClass, EObject theEObject)
+  {
+    if (theEClass.eContainer() == modelPackage)
+    {
+      return doSwitch(theEClass.getClassifierID(), theEObject);
+    }
+    else
+    {
+      List<EClass> eSuperTypes = theEClass.getESuperTypes();
+      return
+        eSuperTypes.isEmpty() ?
+          defaultCase(theEObject) :
+          doSwitch(eSuperTypes.get(0), theEObject);
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(int classifierID, EObject theEObject)
+  {
+    switch (classifierID)
+    {
+      case CorePackage.ANNOTATION:
+      {
+        Annotation annotation = (Annotation)theEObject;
+        T result = caseAnnotation(annotation);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CorePackage.GTASM_ELEMENT:
+      {
+        GTASMElement gtasmElement = (GTASMElement)theEObject;
+        T result = caseGTASMElement(gtasmElement);
+        if (result == null) result = caseAnnotatedElement(gtasmElement);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CorePackage.RUNTIME_ANNOTATION:
+      {
+        RuntimeAnnotation runtimeAnnotation = (RuntimeAnnotation)theEObject;
+        T result = caseRuntimeAnnotation(runtimeAnnotation);
+        if (result == null) result = caseAnnotatedElement(runtimeAnnotation);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CorePackage.RUNTIME_ANNOTATION_ELEMENT:
+      {
+        RuntimeAnnotationElement runtimeAnnotationElement = (RuntimeAnnotationElement)theEObject;
+        T result = caseRuntimeAnnotationElement(runtimeAnnotationElement);
+        if (result == null) result = caseAnnotatedElement(runtimeAnnotationElement);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CorePackage.ANNOTATED_ELEMENT:
+      {
+        AnnotatedElement annotatedElement = (AnnotatedElement)theEObject;
+        T result = caseAnnotatedElement(annotatedElement);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      default: return defaultCase(theEObject);
+    }
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Annotation</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Annotation</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseAnnotation(Annotation object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGTASMElement(GTASMElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Runtime Annotation</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Runtime Annotation</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseRuntimeAnnotation(RuntimeAnnotation object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Runtime Annotation Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Runtime Annotation Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseRuntimeAnnotationElement(RuntimeAnnotationElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseAnnotatedElement(AnnotatedElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch, but this is the last case anyway.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+   * @generated
+   */
+  public T defaultCase(EObject object)
+  {
+    return null;
+  }
+
+} //CoreSwitch
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/ASMFunction.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/ASMFunction.java
new file mode 100644
index 0000000..db67adb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/ASMFunction.java
@@ -0,0 +1,157 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>ASM Function</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getInitialValues <em>Initial Values</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getArity <em>Arity</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getNamespace <em>Namespace</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getReturnType <em>Return Type</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getArgumentTypes <em>Argument Types</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getASMFunction()
+ * @model
+ * @generated
+ */
+public interface ASMFunction extends FunctionDefinition
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Initial Values</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Initial Values</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Initial Values</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getASMFunction_InitialValues()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  EList<InitialValue> getInitialValues();
+
+  /**
+   * Returns the value of the '<em><b>Arity</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Arity</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Arity</em>' attribute.
+   * @see #setArity(int)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getASMFunction_Arity()
+   * @model unique="false" required="true" ordered="false"
+   * @generated
+   */
+  int getArity();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getArity <em>Arity</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Arity</em>' attribute.
+   * @see #getArity()
+   * @generated
+   */
+  void setArity(int value);
+
+  /**
+   * Returns the value of the '<em><b>Namespace</b></em>' container reference.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getAsmFunctionDefinitions <em>Asm Function Definitions</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Namespace</em>' container reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Namespace</em>' container reference.
+   * @see #setNamespace(Machine)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getASMFunction_Namespace()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getAsmFunctionDefinitions
+   * @model opposite="asmFunctionDefinitions" required="true" transient="false"
+   * @generated
+   */
+  Machine getNamespace();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getNamespace <em>Namespace</em>}' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Namespace</em>' container reference.
+   * @see #getNamespace()
+   * @generated
+   */
+  void setNamespace(Machine value);
+
+  /**
+   * Returns the value of the '<em><b>Return Type</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Return Type</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Return Type</em>' containment reference.
+   * @see #setReturnType(TypeConstant)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getASMFunction_ReturnType()
+   * @model containment="true"
+   * @generated
+   */
+  TypeConstant getReturnType();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getReturnType <em>Return Type</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Return Type</em>' containment reference.
+   * @see #getReturnType()
+   * @generated
+   */
+  void setReturnType(TypeConstant value);
+
+  /**
+   * Returns the value of the '<em><b>Argument Types</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Argument Types</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Argument Types</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getASMFunction_ArgumentTypes()
+   * @model containment="true"
+   * @generated
+   */
+  EList<TypeConstant> getArgumentTypes();
+
+} // ASMFunction
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/ChangeEvent.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/ChangeEvent.java
new file mode 100644
index 0000000..4f1cd99
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/ChangeEvent.java
@@ -0,0 +1,102 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ChangeKind;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Change Event</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent#getChangeKind <em>Change Kind</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent#getVariableReference <em>Variable Reference</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getChangeEvent()
+ * @model
+ * @generated
+ */
+public interface ChangeEvent extends GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Change Kind</b></em>' attribute.
+   * The default value is <code>"new"</code>.
+   * The literals are from the enumeration {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ChangeKind}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Change Kind</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Change Kind</em>' attribute.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ChangeKind
+   * @see #setChangeKind(ChangeKind)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getChangeEvent_ChangeKind()
+   * @model default="new" required="true"
+   * @generated
+   */
+  ChangeKind getChangeKind();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent#getChangeKind <em>Change Kind</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Change Kind</em>' attribute.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ChangeKind
+   * @see #getChangeKind()
+   * @generated
+   */
+  void setChangeKind(ChangeKind value);
+
+  /**
+   * Returns the value of the '<em><b>Variable Reference</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Variable Reference</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Variable Reference</em>' containment reference.
+   * @see #setVariableReference(VariableReference)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getChangeEvent_VariableReference()
+   * @model containment="true" required="true"
+   * @generated
+   */
+  VariableReference getVariableReference();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent#getVariableReference <em>Variable Reference</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Variable Reference</em>' containment reference.
+   * @see #getVariableReference()
+   * @generated
+   */
+  void setVariableReference(VariableReference value);
+
+} // ChangeEvent
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/DefinitionsFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/DefinitionsFactory.java
new file mode 100644
index 0000000..e4ce841
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/DefinitionsFactory.java
@@ -0,0 +1,167 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage
+ * @generated
+ */
+public interface DefinitionsFactory extends EFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The singleton instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  DefinitionsFactory eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsFactoryImpl.init();
+
+  /**
+   * Returns a new object of class '<em>Machine</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Machine</em>'.
+   * @generated
+   */
+  Machine createMachine();
+
+  /**
+   * Returns a new object of class '<em>Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Rule</em>'.
+   * @generated
+   */
+  Rule createRule();
+
+  /**
+   * Returns a new object of class '<em>Variable</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Variable</em>'.
+   * @generated
+   */
+  Variable createVariable();
+
+  /**
+   * Returns a new object of class '<em>Variable Definition</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Variable Definition</em>'.
+   * @generated
+   */
+  VariableDefinition createVariableDefinition();
+
+  /**
+   * Returns a new object of class '<em>ASM Function</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>ASM Function</em>'.
+   * @generated
+   */
+  ASMFunction createASMFunction();
+
+  /**
+   * Returns a new object of class '<em>Initial Value</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Initial Value</em>'.
+   * @generated
+   */
+  InitialValue createInitialValue();
+
+  /**
+   * Returns a new object of class '<em>Symbolic Rule Parameter</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Symbolic Rule Parameter</em>'.
+   * @generated
+   */
+  SymbolicRuleParameter createSymbolicRuleParameter();
+
+  /**
+   * Returns a new object of class '<em>Module</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Module</em>'.
+   * @generated
+   */
+  Module createModule();
+
+  /**
+   * Returns a new object of class '<em>Import Declaration</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Import Declaration</em>'.
+   * @generated
+   */
+  ImportDeclaration createImportDeclaration();
+
+  /**
+   * Returns a new object of class '<em>Namespace Definition</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Namespace Definition</em>'.
+   * @generated
+   */
+  NamespaceDefinition createNamespaceDefinition();
+
+  /**
+   * Returns a new object of class '<em>Transformation</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Transformation</em>'.
+   * @generated
+   */
+  Transformation createTransformation();
+
+  /**
+   * Returns a new object of class '<em>Type Constant</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Type Constant</em>'.
+   * @generated
+   */
+  TypeConstant createTypeConstant();
+
+  /**
+   * Returns a new object of class '<em>Change Event</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Change Event</em>'.
+   * @generated
+   */
+  ChangeEvent createChangeEvent();
+
+  /**
+   * Returns the package supported by this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the package supported by this factory.
+   * @generated
+   */
+  DefinitionsPackage getDefinitionsPackage();
+
+} //DefinitionsFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/DefinitionsPackage.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/DefinitionsPackage.java
new file mode 100644
index 0000000..ddc2d76
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/DefinitionsPackage.java
@@ -0,0 +1,2214 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ *   <li>each class,</li>
+ *   <li>each feature of each class,</li>
+ *   <li>each enum,</li>
+ *   <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface DefinitionsPackage extends EPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The package name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNAME = "definitions";
+
+  /**
+   * The package namespace URI.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_URI = "http:///viatragtasmmodel/gtasm/metamodel/asm/definitions.ecore";
+
+  /**
+   * The package namespace name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_PREFIX = "viatragtasmmodel.gtasm.metamodel.asm.definitions";
+
+  /**
+   * The singleton instance of the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  DefinitionsPackage eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl.init();
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.MachineImpl <em>Machine</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.MachineImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getMachine()
+   * @generated
+   */
+  int MACHINE = 0;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MACHINE__ANNOTATIONS = GtPackage.PATTERN_CONTAINER__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MACHINE__NAME = GtPackage.PATTERN_CONTAINER__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MACHINE__ID = GtPackage.PATTERN_CONTAINER__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MACHINE__FQN = GtPackage.PATTERN_CONTAINER__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MACHINE__RUNTIME_ANNOTATIONS = GtPackage.PATTERN_CONTAINER__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Gt Pattern Definitions</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MACHINE__GT_PATTERN_DEFINITIONS = GtPackage.PATTERN_CONTAINER__GT_PATTERN_DEFINITIONS;
+
+  /**
+   * The feature id for the '<em><b>Main Rule</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MACHINE__MAIN_RULE = GtPackage.PATTERN_CONTAINER_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Gt Rule Definitions</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MACHINE__GT_RULE_DEFINITIONS = GtPackage.PATTERN_CONTAINER_FEATURE_COUNT + 1;
+
+  /**
+   * The feature id for the '<em><b>Asm Function Definitions</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MACHINE__ASM_FUNCTION_DEFINITIONS = GtPackage.PATTERN_CONTAINER_FEATURE_COUNT + 2;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule Definitions</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MACHINE__ASM_RULE_DEFINITIONS = GtPackage.PATTERN_CONTAINER_FEATURE_COUNT + 3;
+
+  /**
+   * The feature id for the '<em><b>Module</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MACHINE__MODULE = GtPackage.PATTERN_CONTAINER_FEATURE_COUNT + 4;
+
+  /**
+   * The number of structural features of the '<em>Machine</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MACHINE_FEATURE_COUNT = GtPackage.PATTERN_CONTAINER_FEATURE_COUNT + 5;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.RuleImpl <em>Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.RuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getRule()
+   * @generated
+   */
+  int RULE = 1;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE__ANNOTATIONS = CorePackage.GTASM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE__NAME = CorePackage.GTASM_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE__ID = CorePackage.GTASM_ELEMENT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE__FQN = CorePackage.GTASM_ELEMENT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE__RUNTIME_ANNOTATIONS = CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Body</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE__BODY = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Sym Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE__SYM_PARAMETERS = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The feature id for the '<em><b>Local Variables</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE__LOCAL_VARIABLES = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 2;
+
+  /**
+   * The feature id for the '<em><b>Namespace</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE__NAMESPACE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 3;
+
+  /**
+   * The number of structural features of the '<em>Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_FEATURE_COUNT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 4;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.VariableImpl <em>Variable</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.VariableImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getVariable()
+   * @generated
+   */
+  int VARIABLE = 2;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE__ANNOTATIONS = CorePackage.GTASM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE__NAME = CorePackage.GTASM_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE__ID = CorePackage.GTASM_ELEMENT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE__FQN = CorePackage.GTASM_ELEMENT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE__RUNTIME_ANNOTATIONS = CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>References</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE__REFERENCES = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Scope</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE__SCOPE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The feature id for the '<em><b>Variable Type</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE__VARIABLE_TYPE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 2;
+
+  /**
+   * The number of structural features of the '<em>Variable</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE_FEATURE_COUNT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 3;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.VariableDefinitionImpl <em>Variable Definition</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.VariableDefinitionImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getVariableDefinition()
+   * @generated
+   */
+  int VARIABLE_DEFINITION = 3;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE_DEFINITION__ANNOTATIONS = CorePackage.GTASM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE_DEFINITION__NAME = CorePackage.GTASM_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE_DEFINITION__ID = CorePackage.GTASM_ELEMENT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE_DEFINITION__FQN = CorePackage.GTASM_ELEMENT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE_DEFINITION__RUNTIME_ANNOTATIONS = CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Variable</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE_DEFINITION__VARIABLE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE_DEFINITION__VALUE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Variable Definition</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE_DEFINITION_FEATURE_COUNT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.FunctionDefinitionImpl <em>Function Definition</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.FunctionDefinitionImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getFunctionDefinition()
+   * @generated
+   */
+  int FUNCTION_DEFINITION = 5;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FUNCTION_DEFINITION__ANNOTATIONS = CorePackage.GTASM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FUNCTION_DEFINITION__NAME = CorePackage.GTASM_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FUNCTION_DEFINITION__ID = CorePackage.GTASM_ELEMENT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FUNCTION_DEFINITION__FQN = CorePackage.GTASM_ELEMENT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FUNCTION_DEFINITION__RUNTIME_ANNOTATIONS = CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The number of structural features of the '<em>Function Definition</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FUNCTION_DEFINITION_FEATURE_COUNT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ASMFunctionImpl <em>ASM Function</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ASMFunctionImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getASMFunction()
+   * @generated
+   */
+  int ASM_FUNCTION = 4;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION__ANNOTATIONS = FUNCTION_DEFINITION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION__NAME = FUNCTION_DEFINITION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION__ID = FUNCTION_DEFINITION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION__FQN = FUNCTION_DEFINITION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION__RUNTIME_ANNOTATIONS = FUNCTION_DEFINITION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Initial Values</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION__INITIAL_VALUES = FUNCTION_DEFINITION_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Arity</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION__ARITY = FUNCTION_DEFINITION_FEATURE_COUNT + 1;
+
+  /**
+   * The feature id for the '<em><b>Namespace</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION__NAMESPACE = FUNCTION_DEFINITION_FEATURE_COUNT + 2;
+
+  /**
+   * The feature id for the '<em><b>Return Type</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION__RETURN_TYPE = FUNCTION_DEFINITION_FEATURE_COUNT + 3;
+
+  /**
+   * The feature id for the '<em><b>Argument Types</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION__ARGUMENT_TYPES = FUNCTION_DEFINITION_FEATURE_COUNT + 4;
+
+  /**
+   * The number of structural features of the '<em>ASM Function</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION_FEATURE_COUNT = FUNCTION_DEFINITION_FEATURE_COUNT + 5;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.InitialValueImpl <em>Initial Value</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.InitialValueImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getInitialValue()
+   * @generated
+   */
+  int INITIAL_VALUE = 6;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int INITIAL_VALUE__ANNOTATIONS = CorePackage.GTASM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int INITIAL_VALUE__NAME = CorePackage.GTASM_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int INITIAL_VALUE__ID = CorePackage.GTASM_ELEMENT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int INITIAL_VALUE__FQN = CorePackage.GTASM_ELEMENT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int INITIAL_VALUE__RUNTIME_ANNOTATIONS = CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Locations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int INITIAL_VALUE__LOCATIONS = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int INITIAL_VALUE__VALUE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Initial Value</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int INITIAL_VALUE_FEATURE_COUNT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.SymbolicRuleParameterImpl <em>Symbolic Rule Parameter</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.SymbolicRuleParameterImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getSymbolicRuleParameter()
+   * @generated
+   */
+  int SYMBOLIC_RULE_PARAMETER = 7;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SYMBOLIC_RULE_PARAMETER__ANNOTATIONS = CorePackage.GTASM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SYMBOLIC_RULE_PARAMETER__NAME = CorePackage.GTASM_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SYMBOLIC_RULE_PARAMETER__ID = CorePackage.GTASM_ELEMENT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SYMBOLIC_RULE_PARAMETER__FQN = CorePackage.GTASM_ELEMENT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SYMBOLIC_RULE_PARAMETER__RUNTIME_ANNOTATIONS = CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Variable</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SYMBOLIC_RULE_PARAMETER__VARIABLE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Direction</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SYMBOLIC_RULE_PARAMETER__DIRECTION = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Symbolic Rule Parameter</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SYMBOLIC_RULE_PARAMETER_FEATURE_COUNT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ModuleImpl <em>Module</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ModuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getModule()
+   * @generated
+   */
+  int MODULE = 8;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODULE__ANNOTATIONS = CorePackage.GTASM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODULE__NAME = CorePackage.GTASM_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODULE__ID = CorePackage.GTASM_ELEMENT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODULE__FQN = CorePackage.GTASM_ELEMENT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODULE__RUNTIME_ANNOTATIONS = CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>File Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODULE__FILE_NAME = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Machine</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODULE__MACHINE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The feature id for the '<em><b>Import</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODULE__IMPORT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 2;
+
+  /**
+   * The feature id for the '<em><b>Namespace</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODULE__NAMESPACE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 3;
+
+  /**
+   * The number of structural features of the '<em>Module</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODULE_FEATURE_COUNT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 4;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ImportDeclarationImpl <em>Import Declaration</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ImportDeclarationImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getImportDeclaration()
+   * @generated
+   */
+  int IMPORT_DECLARATION = 9;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int IMPORT_DECLARATION__ANNOTATIONS = CorePackage.GTASM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int IMPORT_DECLARATION__NAME = CorePackage.GTASM_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int IMPORT_DECLARATION__ID = CorePackage.GTASM_ELEMENT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int IMPORT_DECLARATION__FQN = CorePackage.GTASM_ELEMENT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int IMPORT_DECLARATION__RUNTIME_ANNOTATIONS = CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Import Value</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int IMPORT_DECLARATION__IMPORT_VALUE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>Import Declaration</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int IMPORT_DECLARATION_FEATURE_COUNT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.NamespaceDefinitionImpl <em>Namespace Definition</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.NamespaceDefinitionImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getNamespaceDefinition()
+   * @generated
+   */
+  int NAMESPACE_DEFINITION = 10;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NAMESPACE_DEFINITION__ANNOTATIONS = CorePackage.GTASM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NAMESPACE_DEFINITION__NAME = CorePackage.GTASM_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NAMESPACE_DEFINITION__ID = CorePackage.GTASM_ELEMENT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NAMESPACE_DEFINITION__FQN = CorePackage.GTASM_ELEMENT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NAMESPACE_DEFINITION__RUNTIME_ANNOTATIONS = CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Namespace Value</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NAMESPACE_DEFINITION__NAMESPACE_VALUE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>Namespace Definition</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NAMESPACE_DEFINITION_FEATURE_COUNT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.TransformationImpl <em>Transformation</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.TransformationImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getTransformation()
+   * @generated
+   */
+  int TRANSFORMATION = 11;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TRANSFORMATION__ANNOTATIONS = CorePackage.GTASM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TRANSFORMATION__NAME = CorePackage.GTASM_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TRANSFORMATION__ID = CorePackage.GTASM_ELEMENT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TRANSFORMATION__FQN = CorePackage.GTASM_ELEMENT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TRANSFORMATION__RUNTIME_ANNOTATIONS = CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Modules</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TRANSFORMATION__MODULES = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>Transformation</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TRANSFORMATION_FEATURE_COUNT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.TypeConstantImpl <em>Type Constant</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.TypeConstantImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getTypeConstant()
+   * @generated
+   */
+  int TYPE_CONSTANT = 12;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TYPE_CONSTANT__ANNOTATIONS = CorePackage.GTASM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TYPE_CONSTANT__NAME = CorePackage.GTASM_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TYPE_CONSTANT__ID = CorePackage.GTASM_ELEMENT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TYPE_CONSTANT__FQN = CorePackage.GTASM_ELEMENT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TYPE_CONSTANT__RUNTIME_ANNOTATIONS = CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TYPE_CONSTANT__KIND = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>Type Constant</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TYPE_CONSTANT_FEATURE_COUNT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ChangeEventImpl <em>Change Event</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ChangeEventImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getChangeEvent()
+   * @generated
+   */
+  int CHANGE_EVENT = 13;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHANGE_EVENT__ANNOTATIONS = CorePackage.GTASM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHANGE_EVENT__NAME = CorePackage.GTASM_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHANGE_EVENT__ID = CorePackage.GTASM_ELEMENT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHANGE_EVENT__FQN = CorePackage.GTASM_ELEMENT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHANGE_EVENT__RUNTIME_ANNOTATIONS = CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Change Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHANGE_EVENT__CHANGE_KIND = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Variable Reference</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHANGE_EVENT__VARIABLE_REFERENCE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Change Event</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CHANGE_EVENT_FEATURE_COUNT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 2;
+
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine <em>Machine</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Machine</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine
+   * @generated
+   */
+  EClass getMachine();
+
+  /**
+   * Returns the meta object for the reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getMainRule <em>Main Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference '<em>Main Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getMainRule()
+   * @see #getMachine()
+   * @generated
+   */
+  EReference getMachine_MainRule();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getGtRuleDefinitions <em>Gt Rule Definitions</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Gt Rule Definitions</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getGtRuleDefinitions()
+   * @see #getMachine()
+   * @generated
+   */
+  EReference getMachine_GtRuleDefinitions();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getAsmFunctionDefinitions <em>Asm Function Definitions</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Asm Function Definitions</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getAsmFunctionDefinitions()
+   * @see #getMachine()
+   * @generated
+   */
+  EReference getMachine_AsmFunctionDefinitions();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getAsmRuleDefinitions <em>Asm Rule Definitions</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Asm Rule Definitions</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getAsmRuleDefinitions()
+   * @see #getMachine()
+   * @generated
+   */
+  EReference getMachine_AsmRuleDefinitions();
+
+  /**
+   * Returns the meta object for the container reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getModule <em>Module</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the container reference '<em>Module</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getModule()
+   * @see #getMachine()
+   * @generated
+   */
+  EReference getMachine_Module();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule <em>Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule
+   * @generated
+   */
+  EClass getRule();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule#getBody <em>Body</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Body</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule#getBody()
+   * @see #getRule()
+   * @generated
+   */
+  EReference getRule_Body();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule#getSymParameters <em>Sym Parameters</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Sym Parameters</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule#getSymParameters()
+   * @see #getRule()
+   * @generated
+   */
+  EReference getRule_SymParameters();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule#getLocalVariables <em>Local Variables</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Local Variables</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule#getLocalVariables()
+   * @see #getRule()
+   * @generated
+   */
+  EReference getRule_LocalVariables();
+
+  /**
+   * Returns the meta object for the container reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule#getNamespace <em>Namespace</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the container reference '<em>Namespace</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule#getNamespace()
+   * @see #getRule()
+   * @generated
+   */
+  EReference getRule_Namespace();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable <em>Variable</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Variable</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable
+   * @generated
+   */
+  EClass getVariable();
+
+  /**
+   * Returns the meta object for the reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable#getReferences <em>References</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference list '<em>References</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable#getReferences()
+   * @see #getVariable()
+   * @generated
+   */
+  EReference getVariable_References();
+
+  /**
+   * Returns the meta object for the container reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable#getScope <em>Scope</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the container reference '<em>Scope</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable#getScope()
+   * @see #getVariable()
+   * @generated
+   */
+  EReference getVariable_Scope();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable#getVariableType <em>Variable Type</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Variable Type</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable#getVariableType()
+   * @see #getVariable()
+   * @generated
+   */
+  EReference getVariable_VariableType();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition <em>Variable Definition</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Variable Definition</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition
+   * @generated
+   */
+  EClass getVariableDefinition();
+
+  /**
+   * Returns the meta object for the reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition#getVariable <em>Variable</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference '<em>Variable</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition#getVariable()
+   * @see #getVariableDefinition()
+   * @generated
+   */
+  EReference getVariableDefinition_Variable();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition#getValue <em>Value</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Value</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition#getValue()
+   * @see #getVariableDefinition()
+   * @generated
+   */
+  EReference getVariableDefinition_Value();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction <em>ASM Function</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>ASM Function</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction
+   * @generated
+   */
+  EClass getASMFunction();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getInitialValues <em>Initial Values</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Initial Values</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getInitialValues()
+   * @see #getASMFunction()
+   * @generated
+   */
+  EReference getASMFunction_InitialValues();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getArity <em>Arity</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Arity</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getArity()
+   * @see #getASMFunction()
+   * @generated
+   */
+  EAttribute getASMFunction_Arity();
+
+  /**
+   * Returns the meta object for the container reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getNamespace <em>Namespace</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the container reference '<em>Namespace</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getNamespace()
+   * @see #getASMFunction()
+   * @generated
+   */
+  EReference getASMFunction_Namespace();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getReturnType <em>Return Type</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Return Type</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getReturnType()
+   * @see #getASMFunction()
+   * @generated
+   */
+  EReference getASMFunction_ReturnType();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getArgumentTypes <em>Argument Types</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Argument Types</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getArgumentTypes()
+   * @see #getASMFunction()
+   * @generated
+   */
+  EReference getASMFunction_ArgumentTypes();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.FunctionDefinition <em>Function Definition</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Function Definition</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.FunctionDefinition
+   * @generated
+   */
+  EClass getFunctionDefinition();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue <em>Initial Value</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Initial Value</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue
+   * @generated
+   */
+  EClass getInitialValue();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue#getLocations <em>Locations</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Locations</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue#getLocations()
+   * @see #getInitialValue()
+   * @generated
+   */
+  EReference getInitialValue_Locations();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue#getValue <em>Value</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Value</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue#getValue()
+   * @see #getInitialValue()
+   * @generated
+   */
+  EReference getInitialValue_Value();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter <em>Symbolic Rule Parameter</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Symbolic Rule Parameter</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter
+   * @generated
+   */
+  EClass getSymbolicRuleParameter();
+
+  /**
+   * Returns the meta object for the reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter#getVariable <em>Variable</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference '<em>Variable</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter#getVariable()
+   * @see #getSymbolicRuleParameter()
+   * @generated
+   */
+  EReference getSymbolicRuleParameter_Variable();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter#getDirection <em>Direction</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Direction</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter#getDirection()
+   * @see #getSymbolicRuleParameter()
+   * @generated
+   */
+  EAttribute getSymbolicRuleParameter_Direction();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module <em>Module</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Module</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module
+   * @generated
+   */
+  EClass getModule();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module#getFileName <em>File Name</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>File Name</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module#getFileName()
+   * @see #getModule()
+   * @generated
+   */
+  EAttribute getModule_FileName();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module#getMachine <em>Machine</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Machine</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module#getMachine()
+   * @see #getModule()
+   * @generated
+   */
+  EReference getModule_Machine();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module#getImport <em>Import</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Import</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module#getImport()
+   * @see #getModule()
+   * @generated
+   */
+  EReference getModule_Import();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module#getNamespace <em>Namespace</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Namespace</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module#getNamespace()
+   * @see #getModule()
+   * @generated
+   */
+  EReference getModule_Namespace();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ImportDeclaration <em>Import Declaration</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Import Declaration</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ImportDeclaration
+   * @generated
+   */
+  EClass getImportDeclaration();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ImportDeclaration#getImportValue <em>Import Value</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Import Value</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ImportDeclaration#getImportValue()
+   * @see #getImportDeclaration()
+   * @generated
+   */
+  EAttribute getImportDeclaration_ImportValue();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.NamespaceDefinition <em>Namespace Definition</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Namespace Definition</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.NamespaceDefinition
+   * @generated
+   */
+  EClass getNamespaceDefinition();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.NamespaceDefinition#getNamespaceValue <em>Namespace Value</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Namespace Value</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.NamespaceDefinition#getNamespaceValue()
+   * @see #getNamespaceDefinition()
+   * @generated
+   */
+  EAttribute getNamespaceDefinition_NamespaceValue();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Transformation <em>Transformation</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Transformation</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Transformation
+   * @generated
+   */
+  EClass getTransformation();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Transformation#getModules <em>Modules</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Modules</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Transformation#getModules()
+   * @see #getTransformation()
+   * @generated
+   */
+  EReference getTransformation_Modules();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant <em>Type Constant</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Type Constant</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant
+   * @generated
+   */
+  EClass getTypeConstant();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant#getKind <em>Kind</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Kind</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant#getKind()
+   * @see #getTypeConstant()
+   * @generated
+   */
+  EAttribute getTypeConstant_Kind();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent <em>Change Event</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Change Event</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent
+   * @generated
+   */
+  EClass getChangeEvent();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent#getChangeKind <em>Change Kind</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Change Kind</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent#getChangeKind()
+   * @see #getChangeEvent()
+   * @generated
+   */
+  EAttribute getChangeEvent_ChangeKind();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent#getVariableReference <em>Variable Reference</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Variable Reference</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent#getVariableReference()
+   * @see #getChangeEvent()
+   * @generated
+   */
+  EReference getChangeEvent_VariableReference();
+
+  /**
+   * Returns the factory that creates the instances of the model.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the factory that creates the instances of the model.
+   * @generated
+   */
+  DefinitionsFactory getDefinitionsFactory();
+
+  /**
+   * <!-- begin-user-doc -->
+   * Defines literals for the meta objects that represent
+   * <ul>
+   *   <li>each class,</li>
+   *   <li>each feature of each class,</li>
+   *   <li>each enum,</li>
+   *   <li>and each data type</li>
+   * </ul>
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  interface Literals
+  {
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.MachineImpl <em>Machine</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.MachineImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getMachine()
+     * @generated
+     */
+    EClass MACHINE = eINSTANCE.getMachine();
+
+    /**
+     * The meta object literal for the '<em><b>Main Rule</b></em>' reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MACHINE__MAIN_RULE = eINSTANCE.getMachine_MainRule();
+
+    /**
+     * The meta object literal for the '<em><b>Gt Rule Definitions</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MACHINE__GT_RULE_DEFINITIONS = eINSTANCE.getMachine_GtRuleDefinitions();
+
+    /**
+     * The meta object literal for the '<em><b>Asm Function Definitions</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MACHINE__ASM_FUNCTION_DEFINITIONS = eINSTANCE.getMachine_AsmFunctionDefinitions();
+
+    /**
+     * The meta object literal for the '<em><b>Asm Rule Definitions</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MACHINE__ASM_RULE_DEFINITIONS = eINSTANCE.getMachine_AsmRuleDefinitions();
+
+    /**
+     * The meta object literal for the '<em><b>Module</b></em>' container reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MACHINE__MODULE = eINSTANCE.getMachine_Module();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.RuleImpl <em>Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.RuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getRule()
+     * @generated
+     */
+    EClass RULE = eINSTANCE.getRule();
+
+    /**
+     * The meta object literal for the '<em><b>Body</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference RULE__BODY = eINSTANCE.getRule_Body();
+
+    /**
+     * The meta object literal for the '<em><b>Sym Parameters</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference RULE__SYM_PARAMETERS = eINSTANCE.getRule_SymParameters();
+
+    /**
+     * The meta object literal for the '<em><b>Local Variables</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference RULE__LOCAL_VARIABLES = eINSTANCE.getRule_LocalVariables();
+
+    /**
+     * The meta object literal for the '<em><b>Namespace</b></em>' container reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference RULE__NAMESPACE = eINSTANCE.getRule_Namespace();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.VariableImpl <em>Variable</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.VariableImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getVariable()
+     * @generated
+     */
+    EClass VARIABLE = eINSTANCE.getVariable();
+
+    /**
+     * The meta object literal for the '<em><b>References</b></em>' reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference VARIABLE__REFERENCES = eINSTANCE.getVariable_References();
+
+    /**
+     * The meta object literal for the '<em><b>Scope</b></em>' container reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference VARIABLE__SCOPE = eINSTANCE.getVariable_Scope();
+
+    /**
+     * The meta object literal for the '<em><b>Variable Type</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference VARIABLE__VARIABLE_TYPE = eINSTANCE.getVariable_VariableType();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.VariableDefinitionImpl <em>Variable Definition</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.VariableDefinitionImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getVariableDefinition()
+     * @generated
+     */
+    EClass VARIABLE_DEFINITION = eINSTANCE.getVariableDefinition();
+
+    /**
+     * The meta object literal for the '<em><b>Variable</b></em>' reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference VARIABLE_DEFINITION__VARIABLE = eINSTANCE.getVariableDefinition_Variable();
+
+    /**
+     * The meta object literal for the '<em><b>Value</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference VARIABLE_DEFINITION__VALUE = eINSTANCE.getVariableDefinition_Value();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ASMFunctionImpl <em>ASM Function</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ASMFunctionImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getASMFunction()
+     * @generated
+     */
+    EClass ASM_FUNCTION = eINSTANCE.getASMFunction();
+
+    /**
+     * The meta object literal for the '<em><b>Initial Values</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference ASM_FUNCTION__INITIAL_VALUES = eINSTANCE.getASMFunction_InitialValues();
+
+    /**
+     * The meta object literal for the '<em><b>Arity</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute ASM_FUNCTION__ARITY = eINSTANCE.getASMFunction_Arity();
+
+    /**
+     * The meta object literal for the '<em><b>Namespace</b></em>' container reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference ASM_FUNCTION__NAMESPACE = eINSTANCE.getASMFunction_Namespace();
+
+    /**
+     * The meta object literal for the '<em><b>Return Type</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference ASM_FUNCTION__RETURN_TYPE = eINSTANCE.getASMFunction_ReturnType();
+
+    /**
+     * The meta object literal for the '<em><b>Argument Types</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference ASM_FUNCTION__ARGUMENT_TYPES = eINSTANCE.getASMFunction_ArgumentTypes();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.FunctionDefinitionImpl <em>Function Definition</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.FunctionDefinitionImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getFunctionDefinition()
+     * @generated
+     */
+    EClass FUNCTION_DEFINITION = eINSTANCE.getFunctionDefinition();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.InitialValueImpl <em>Initial Value</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.InitialValueImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getInitialValue()
+     * @generated
+     */
+    EClass INITIAL_VALUE = eINSTANCE.getInitialValue();
+
+    /**
+     * The meta object literal for the '<em><b>Locations</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference INITIAL_VALUE__LOCATIONS = eINSTANCE.getInitialValue_Locations();
+
+    /**
+     * The meta object literal for the '<em><b>Value</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference INITIAL_VALUE__VALUE = eINSTANCE.getInitialValue_Value();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.SymbolicRuleParameterImpl <em>Symbolic Rule Parameter</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.SymbolicRuleParameterImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getSymbolicRuleParameter()
+     * @generated
+     */
+    EClass SYMBOLIC_RULE_PARAMETER = eINSTANCE.getSymbolicRuleParameter();
+
+    /**
+     * The meta object literal for the '<em><b>Variable</b></em>' reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference SYMBOLIC_RULE_PARAMETER__VARIABLE = eINSTANCE.getSymbolicRuleParameter_Variable();
+
+    /**
+     * The meta object literal for the '<em><b>Direction</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute SYMBOLIC_RULE_PARAMETER__DIRECTION = eINSTANCE.getSymbolicRuleParameter_Direction();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ModuleImpl <em>Module</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ModuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getModule()
+     * @generated
+     */
+    EClass MODULE = eINSTANCE.getModule();
+
+    /**
+     * The meta object literal for the '<em><b>File Name</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute MODULE__FILE_NAME = eINSTANCE.getModule_FileName();
+
+    /**
+     * The meta object literal for the '<em><b>Machine</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MODULE__MACHINE = eINSTANCE.getModule_Machine();
+
+    /**
+     * The meta object literal for the '<em><b>Import</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MODULE__IMPORT = eINSTANCE.getModule_Import();
+
+    /**
+     * The meta object literal for the '<em><b>Namespace</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MODULE__NAMESPACE = eINSTANCE.getModule_Namespace();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ImportDeclarationImpl <em>Import Declaration</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ImportDeclarationImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getImportDeclaration()
+     * @generated
+     */
+    EClass IMPORT_DECLARATION = eINSTANCE.getImportDeclaration();
+
+    /**
+     * The meta object literal for the '<em><b>Import Value</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute IMPORT_DECLARATION__IMPORT_VALUE = eINSTANCE.getImportDeclaration_ImportValue();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.NamespaceDefinitionImpl <em>Namespace Definition</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.NamespaceDefinitionImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getNamespaceDefinition()
+     * @generated
+     */
+    EClass NAMESPACE_DEFINITION = eINSTANCE.getNamespaceDefinition();
+
+    /**
+     * The meta object literal for the '<em><b>Namespace Value</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute NAMESPACE_DEFINITION__NAMESPACE_VALUE = eINSTANCE.getNamespaceDefinition_NamespaceValue();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.TransformationImpl <em>Transformation</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.TransformationImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getTransformation()
+     * @generated
+     */
+    EClass TRANSFORMATION = eINSTANCE.getTransformation();
+
+    /**
+     * The meta object literal for the '<em><b>Modules</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference TRANSFORMATION__MODULES = eINSTANCE.getTransformation_Modules();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.TypeConstantImpl <em>Type Constant</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.TypeConstantImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getTypeConstant()
+     * @generated
+     */
+    EClass TYPE_CONSTANT = eINSTANCE.getTypeConstant();
+
+    /**
+     * The meta object literal for the '<em><b>Kind</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute TYPE_CONSTANT__KIND = eINSTANCE.getTypeConstant_Kind();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ChangeEventImpl <em>Change Event</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ChangeEventImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl#getChangeEvent()
+     * @generated
+     */
+    EClass CHANGE_EVENT = eINSTANCE.getChangeEvent();
+
+    /**
+     * The meta object literal for the '<em><b>Change Kind</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute CHANGE_EVENT__CHANGE_KIND = eINSTANCE.getChangeEvent_ChangeKind();
+
+    /**
+     * The meta object literal for the '<em><b>Variable Reference</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference CHANGE_EVENT__VARIABLE_REFERENCE = eINSTANCE.getChangeEvent_VariableReference();
+
+  }
+
+} //DefinitionsPackage
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/FunctionDefinition.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/FunctionDefinition.java
new file mode 100644
index 0000000..f23f158
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/FunctionDefinition.java
@@ -0,0 +1,35 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Function Definition</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getFunctionDefinition()
+ * @model abstract="true"
+ * @generated
+ */
+public interface FunctionDefinition extends GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // FunctionDefinition
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/ImportDeclaration.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/ImportDeclaration.java
new file mode 100644
index 0000000..60f862e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/ImportDeclaration.java
@@ -0,0 +1,67 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Import Declaration</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ImportDeclaration#getImportValue <em>Import Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getImportDeclaration()
+ * @model
+ * @generated
+ */
+public interface ImportDeclaration extends GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Import Value</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Import Value</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Import Value</em>' attribute.
+   * @see #setImportValue(String)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getImportDeclaration_ImportValue()
+   * @model required="true"
+   * @generated
+   */
+  String getImportValue();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ImportDeclaration#getImportValue <em>Import Value</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Import Value</em>' attribute.
+   * @see #getImportValue()
+   * @generated
+   */
+  void setImportValue(String value);
+
+} // ImportDeclaration
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/InitialValue.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/InitialValue.java
new file mode 100644
index 0000000..a53d90a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/InitialValue.java
@@ -0,0 +1,88 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Initial Value</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue#getLocations <em>Locations</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getInitialValue()
+ * @model
+ * @generated
+ */
+public interface InitialValue extends GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Locations</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Locations</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Locations</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getInitialValue_Locations()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  EList<Term> getLocations();
+
+  /**
+   * Returns the value of the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Value</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Value</em>' containment reference.
+   * @see #setValue(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getInitialValue_Value()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getValue();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue#getValue <em>Value</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Value</em>' containment reference.
+   * @see #getValue()
+   * @generated
+   */
+  void setValue(Term value);
+
+} // InitialValue
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/Machine.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/Machine.java
new file mode 100644
index 0000000..439c0d3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/Machine.java
@@ -0,0 +1,156 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternContainer;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Machine</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getMainRule <em>Main Rule</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getGtRuleDefinitions <em>Gt Rule Definitions</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getAsmFunctionDefinitions <em>Asm Function Definitions</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getAsmRuleDefinitions <em>Asm Rule Definitions</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getModule <em>Module</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getMachine()
+ * @model
+ * @generated
+ */
+public interface Machine extends PatternContainer
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Main Rule</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Main Rule</em>' reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Main Rule</em>' reference.
+   * @see #setMainRule(Rule)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getMachine_MainRule()
+   * @model ordered="false"
+   * @generated
+   */
+  Rule getMainRule();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getMainRule <em>Main Rule</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Main Rule</em>' reference.
+   * @see #getMainRule()
+   * @generated
+   */
+  void setMainRule(Rule value);
+
+  /**
+   * Returns the value of the '<em><b>Gt Rule Definitions</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule}.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getNamespace <em>Namespace</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Gt Rule Definitions</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Gt Rule Definitions</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getMachine_GtRuleDefinitions()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getNamespace
+   * @model opposite="namespace" containment="true" ordered="false"
+   * @generated
+   */
+  EList<GTRule> getGtRuleDefinitions();
+
+  /**
+   * Returns the value of the '<em><b>Asm Function Definitions</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction}.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getNamespace <em>Namespace</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Asm Function Definitions</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Asm Function Definitions</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getMachine_AsmFunctionDefinitions()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction#getNamespace
+   * @model opposite="namespace" containment="true" ordered="false"
+   * @generated
+   */
+  EList<ASMFunction> getAsmFunctionDefinitions();
+
+  /**
+   * Returns the value of the '<em><b>Asm Rule Definitions</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule}.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule#getNamespace <em>Namespace</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Asm Rule Definitions</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Asm Rule Definitions</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getMachine_AsmRuleDefinitions()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule#getNamespace
+   * @model opposite="namespace" containment="true" ordered="false"
+   * @generated
+   */
+  EList<Rule> getAsmRuleDefinitions();
+
+  /**
+   * Returns the value of the '<em><b>Module</b></em>' container reference.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module#getMachine <em>Machine</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Module</em>' container reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Module</em>' container reference.
+   * @see #setModule(Module)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getMachine_Module()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module#getMachine
+   * @model opposite="machine" transient="false"
+   * @generated
+   */
+  Module getModule();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getModule <em>Module</em>}' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Module</em>' container reference.
+   * @see #getModule()
+   * @generated
+   */
+  void setModule(Module value);
+
+} // Machine
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/Module.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/Module.java
new file mode 100644
index 0000000..a530c13
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/Module.java
@@ -0,0 +1,132 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Module</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module#getFileName <em>File Name</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module#getMachine <em>Machine</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module#getImport <em>Import</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module#getNamespace <em>Namespace</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getModule()
+ * @model
+ * @generated
+ */
+public interface Module extends GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>File Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>File Name</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>File Name</em>' attribute.
+   * @see #setFileName(String)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getModule_FileName()
+   * @model
+   * @generated
+   */
+  String getFileName();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module#getFileName <em>File Name</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>File Name</em>' attribute.
+   * @see #getFileName()
+   * @generated
+   */
+  void setFileName(String value);
+
+  /**
+   * Returns the value of the '<em><b>Machine</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine}.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getModule <em>Module</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Machine</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Machine</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getModule_Machine()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getModule
+   * @model opposite="module" containment="true"
+   * @generated
+   */
+  EList<Machine> getMachine();
+
+  /**
+   * Returns the value of the '<em><b>Import</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ImportDeclaration}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Import</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Import</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getModule_Import()
+   * @model containment="true"
+   * @generated
+   */
+  EList<ImportDeclaration> getImport();
+
+  /**
+   * Returns the value of the '<em><b>Namespace</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Namespace</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Namespace</em>' containment reference.
+   * @see #setNamespace(NamespaceDefinition)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getModule_Namespace()
+   * @model containment="true"
+   * @generated
+   */
+  NamespaceDefinition getNamespace();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module#getNamespace <em>Namespace</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Namespace</em>' containment reference.
+   * @see #getNamespace()
+   * @generated
+   */
+  void setNamespace(NamespaceDefinition value);
+
+} // Module
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/NamespaceDefinition.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/NamespaceDefinition.java
new file mode 100644
index 0000000..158d3f7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/NamespaceDefinition.java
@@ -0,0 +1,67 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Namespace Definition</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.NamespaceDefinition#getNamespaceValue <em>Namespace Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getNamespaceDefinition()
+ * @model
+ * @generated
+ */
+public interface NamespaceDefinition extends GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Namespace Value</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Namespace Value</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Namespace Value</em>' attribute.
+   * @see #setNamespaceValue(String)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getNamespaceDefinition_NamespaceValue()
+   * @model required="true"
+   * @generated
+   */
+  String getNamespaceValue();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.NamespaceDefinition#getNamespaceValue <em>Namespace Value</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Namespace Value</em>' attribute.
+   * @see #getNamespaceValue()
+   * @generated
+   */
+  void setNamespaceValue(String value);
+
+} // NamespaceDefinition
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/Rule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/Rule.java
new file mode 100644
index 0000000..5f7c365
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/Rule.java
@@ -0,0 +1,136 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule#getBody <em>Body</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule#getSymParameters <em>Sym Parameters</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule#getLocalVariables <em>Local Variables</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule#getNamespace <em>Namespace</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getRule()
+ * @model
+ * @generated
+ */
+public interface Rule extends GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Body</b></em>' containment reference.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation#getAsmRule <em>Asm Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Body</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Body</em>' containment reference.
+   * @see #setBody(ASMRuleInvocation)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getRule_Body()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation#getAsmRule
+   * @model opposite="asmRule" containment="true" ordered="false"
+   * @generated
+   */
+  ASMRuleInvocation getBody();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule#getBody <em>Body</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Body</em>' containment reference.
+   * @see #getBody()
+   * @generated
+   */
+  void setBody(ASMRuleInvocation value);
+
+  /**
+   * Returns the value of the '<em><b>Sym Parameters</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Sym Parameters</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Sym Parameters</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getRule_SymParameters()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  EList<SymbolicRuleParameter> getSymParameters();
+
+  /**
+   * Returns the value of the '<em><b>Local Variables</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Local Variables</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Local Variables</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getRule_LocalVariables()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  EList<Variable> getLocalVariables();
+
+  /**
+   * Returns the value of the '<em><b>Namespace</b></em>' container reference.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getAsmRuleDefinitions <em>Asm Rule Definitions</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Namespace</em>' container reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Namespace</em>' container reference.
+   * @see #setNamespace(Machine)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getRule_Namespace()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getAsmRuleDefinitions
+   * @model opposite="asmRuleDefinitions" required="true" transient="false"
+   * @generated
+   */
+  Machine getNamespace();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule#getNamespace <em>Namespace</em>}' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Namespace</em>' container reference.
+   * @see #getNamespace()
+   * @generated
+   */
+  void setNamespace(Machine value);
+
+} // Rule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/SymbolicRuleParameter.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/SymbolicRuleParameter.java
new file mode 100644
index 0000000..d8cc147
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/SymbolicRuleParameter.java
@@ -0,0 +1,100 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DirectionKind;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Symbolic Rule Parameter</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter#getVariable <em>Variable</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter#getDirection <em>Direction</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getSymbolicRuleParameter()
+ * @model
+ * @generated
+ */
+public interface SymbolicRuleParameter extends GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Variable</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Variable</em>' reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Variable</em>' reference.
+   * @see #setVariable(Variable)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getSymbolicRuleParameter_Variable()
+   * @model required="true" ordered="false"
+   * @generated
+   */
+  Variable getVariable();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter#getVariable <em>Variable</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Variable</em>' reference.
+   * @see #getVariable()
+   * @generated
+   */
+  void setVariable(Variable value);
+
+  /**
+   * Returns the value of the '<em><b>Direction</b></em>' attribute.
+   * The default value is <code>"in"</code>.
+   * The literals are from the enumeration {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DirectionKind}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Direction</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Direction</em>' attribute.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DirectionKind
+   * @see #setDirection(DirectionKind)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getSymbolicRuleParameter_Direction()
+   * @model default="in" required="true" ordered="false"
+   * @generated
+   */
+  DirectionKind getDirection();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter#getDirection <em>Direction</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Direction</em>' attribute.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DirectionKind
+   * @see #getDirection()
+   * @generated
+   */
+  void setDirection(DirectionKind value);
+
+} // SymbolicRuleParameter
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/Transformation.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/Transformation.java
new file mode 100644
index 0000000..ce9adaa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/Transformation.java
@@ -0,0 +1,59 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Transformation</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Transformation#getModules <em>Modules</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getTransformation()
+ * @model
+ * @generated
+ */
+public interface Transformation extends GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Modules</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Modules</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Modules</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getTransformation_Modules()
+   * @model containment="true"
+   * @generated
+   */
+  EList<Module> getModules();
+
+} // Transformation
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/TypeConstant.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/TypeConstant.java
new file mode 100644
index 0000000..90c8b50
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/TypeConstant.java
@@ -0,0 +1,72 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Constant</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant#getKind <em>Kind</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getTypeConstant()
+ * @model
+ * @generated
+ */
+public interface TypeConstant extends GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Kind</b></em>' attribute.
+   * The literals are from the enumeration {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Kind</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Kind</em>' attribute.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind
+   * @see #setKind(ValueKind)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getTypeConstant_Kind()
+   * @model required="true"
+   * @generated
+   */
+  ValueKind getKind();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant#getKind <em>Kind</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Kind</em>' attribute.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind
+   * @see #getKind()
+   * @generated
+   */
+  void setKind(ValueKind value);
+
+} // TypeConstant
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/Variable.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/Variable.java
new file mode 100644
index 0000000..d58bf17
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/Variable.java
@@ -0,0 +1,121 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.BlockRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Variable</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable#getReferences <em>References</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable#getScope <em>Scope</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable#getVariableType <em>Variable Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getVariable()
+ * @model
+ * @generated
+ */
+public interface Variable extends GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>References</b></em>' reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference}.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference#getVariable <em>Variable</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>References</em>' reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>References</em>' reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getVariable_References()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference#getVariable
+   * @model opposite="variable" ordered="false"
+   * @generated
+   */
+  EList<VariableReference> getReferences();
+
+  /**
+   * Returns the value of the '<em><b>Scope</b></em>' container reference.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.BlockRule#getLocalVariables <em>Local Variables</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Scope</em>' container reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Scope</em>' container reference.
+   * @see #setScope(BlockRule)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getVariable_Scope()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.BlockRule#getLocalVariables
+   * @model opposite="localVariables" ordered="false"
+   * @generated
+   */
+  BlockRule getScope();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable#getScope <em>Scope</em>}' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Scope</em>' container reference.
+   * @see #getScope()
+   * @generated
+   */
+  void setScope(BlockRule value);
+
+  /**
+   * Returns the value of the '<em><b>Variable Type</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Variable Type</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Variable Type</em>' containment reference.
+   * @see #setVariableType(TypeConstant)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getVariable_VariableType()
+   * @model containment="true"
+   * @generated
+   */
+  TypeConstant getVariableType();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable#getVariableType <em>Variable Type</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Variable Type</em>' containment reference.
+   * @see #getVariableType()
+   * @generated
+   */
+  void setVariableType(TypeConstant value);
+
+} // Variable
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/VariableDefinition.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/VariableDefinition.java
new file mode 100644
index 0000000..0920551
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/VariableDefinition.java
@@ -0,0 +1,96 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Variable Definition</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition#getVariable <em>Variable</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getVariableDefinition()
+ * @model
+ * @generated
+ */
+public interface VariableDefinition extends GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Variable</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Variable</em>' reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Variable</em>' reference.
+   * @see #setVariable(Variable)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getVariableDefinition_Variable()
+   * @model required="true" ordered="false"
+   * @generated
+   */
+  Variable getVariable();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition#getVariable <em>Variable</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Variable</em>' reference.
+   * @see #getVariable()
+   * @generated
+   */
+  void setVariable(Variable value);
+
+  /**
+   * Returns the value of the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Value</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Value</em>' containment reference.
+   * @see #setValue(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#getVariableDefinition_Value()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getValue();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition#getValue <em>Value</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Value</em>' containment reference.
+   * @see #getValue()
+   * @generated
+   */
+  void setValue(Term value);
+
+} // VariableDefinition
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/ASMFunctionImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/ASMFunctionImpl.java
new file mode 100644
index 0000000..c3d031b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/ASMFunctionImpl.java
@@ -0,0 +1,459 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>ASM Function</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ASMFunctionImpl#getInitialValues <em>Initial Values</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ASMFunctionImpl#getArity <em>Arity</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ASMFunctionImpl#getNamespace <em>Namespace</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ASMFunctionImpl#getReturnType <em>Return Type</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ASMFunctionImpl#getArgumentTypes <em>Argument Types</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ASMFunctionImpl extends FunctionDefinitionImpl implements ASMFunction
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getInitialValues() <em>Initial Values</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getInitialValues()
+   * @generated
+   * @ordered
+   */
+  protected EList<InitialValue> initialValues;
+
+  /**
+   * The default value of the '{@link #getArity() <em>Arity</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getArity()
+   * @generated
+   * @ordered
+   */
+  protected static final int ARITY_EDEFAULT = 0;
+
+  /**
+   * The cached value of the '{@link #getArity() <em>Arity</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getArity()
+   * @generated
+   * @ordered
+   */
+  protected int arity = ARITY_EDEFAULT;
+
+  /**
+   * The cached value of the '{@link #getReturnType() <em>Return Type</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getReturnType()
+   * @generated
+   * @ordered
+   */
+  protected TypeConstant returnType;
+
+  /**
+   * The cached value of the '{@link #getArgumentTypes() <em>Argument Types</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getArgumentTypes()
+   * @generated
+   * @ordered
+   */
+  protected EList<TypeConstant> argumentTypes;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ASMFunctionImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return DefinitionsPackage.Literals.ASM_FUNCTION;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<InitialValue> getInitialValues()
+  {
+    if (initialValues == null)
+    {
+      initialValues = new EObjectContainmentEList<InitialValue>(InitialValue.class, this, DefinitionsPackage.ASM_FUNCTION__INITIAL_VALUES);
+    }
+    return initialValues;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public int getArity()
+  {
+    return arity;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setArity(int newArity)
+  {
+    int oldArity = arity;
+    arity = newArity;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.ASM_FUNCTION__ARITY, oldArity, arity));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Machine getNamespace()
+  {
+    if (eContainerFeatureID() != DefinitionsPackage.ASM_FUNCTION__NAMESPACE) return null;
+    return (Machine)eContainer();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetNamespace(Machine newNamespace, NotificationChain msgs)
+  {
+    msgs = eBasicSetContainer((InternalEObject)newNamespace, DefinitionsPackage.ASM_FUNCTION__NAMESPACE, msgs);
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setNamespace(Machine newNamespace)
+  {
+    if (newNamespace != eInternalContainer() || (eContainerFeatureID() != DefinitionsPackage.ASM_FUNCTION__NAMESPACE && newNamespace != null))
+    {
+      if (EcoreUtil.isAncestor(this, newNamespace))
+        throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+      NotificationChain msgs = null;
+      if (eInternalContainer() != null)
+        msgs = eBasicRemoveFromContainer(msgs);
+      if (newNamespace != null)
+        msgs = ((InternalEObject)newNamespace).eInverseAdd(this, DefinitionsPackage.MACHINE__ASM_FUNCTION_DEFINITIONS, Machine.class, msgs);
+      msgs = basicSetNamespace(newNamespace, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.ASM_FUNCTION__NAMESPACE, newNamespace, newNamespace));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public TypeConstant getReturnType()
+  {
+    return returnType;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetReturnType(TypeConstant newReturnType, NotificationChain msgs)
+  {
+    TypeConstant oldReturnType = returnType;
+    returnType = newReturnType;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DefinitionsPackage.ASM_FUNCTION__RETURN_TYPE, oldReturnType, newReturnType);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setReturnType(TypeConstant newReturnType)
+  {
+    if (newReturnType != returnType)
+    {
+      NotificationChain msgs = null;
+      if (returnType != null)
+        msgs = ((InternalEObject)returnType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DefinitionsPackage.ASM_FUNCTION__RETURN_TYPE, null, msgs);
+      if (newReturnType != null)
+        msgs = ((InternalEObject)newReturnType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DefinitionsPackage.ASM_FUNCTION__RETURN_TYPE, null, msgs);
+      msgs = basicSetReturnType(newReturnType, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.ASM_FUNCTION__RETURN_TYPE, newReturnType, newReturnType));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<TypeConstant> getArgumentTypes()
+  {
+    if (argumentTypes == null)
+    {
+      argumentTypes = new EObjectContainmentEList<TypeConstant>(TypeConstant.class, this, DefinitionsPackage.ASM_FUNCTION__ARGUMENT_TYPES);
+    }
+    return argumentTypes;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.ASM_FUNCTION__NAMESPACE:
+        if (eInternalContainer() != null)
+          msgs = eBasicRemoveFromContainer(msgs);
+        return basicSetNamespace((Machine)otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.ASM_FUNCTION__INITIAL_VALUES:
+        return ((InternalEList<?>)getInitialValues()).basicRemove(otherEnd, msgs);
+      case DefinitionsPackage.ASM_FUNCTION__NAMESPACE:
+        return basicSetNamespace(null, msgs);
+      case DefinitionsPackage.ASM_FUNCTION__RETURN_TYPE:
+        return basicSetReturnType(null, msgs);
+      case DefinitionsPackage.ASM_FUNCTION__ARGUMENT_TYPES:
+        return ((InternalEList<?>)getArgumentTypes()).basicRemove(otherEnd, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
+  {
+    switch (eContainerFeatureID())
+    {
+      case DefinitionsPackage.ASM_FUNCTION__NAMESPACE:
+        return eInternalContainer().eInverseRemove(this, DefinitionsPackage.MACHINE__ASM_FUNCTION_DEFINITIONS, Machine.class, msgs);
+    }
+    return super.eBasicRemoveFromContainerFeature(msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.ASM_FUNCTION__INITIAL_VALUES:
+        return getInitialValues();
+      case DefinitionsPackage.ASM_FUNCTION__ARITY:
+        return getArity();
+      case DefinitionsPackage.ASM_FUNCTION__NAMESPACE:
+        return getNamespace();
+      case DefinitionsPackage.ASM_FUNCTION__RETURN_TYPE:
+        return getReturnType();
+      case DefinitionsPackage.ASM_FUNCTION__ARGUMENT_TYPES:
+        return getArgumentTypes();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.ASM_FUNCTION__INITIAL_VALUES:
+        getInitialValues().clear();
+        getInitialValues().addAll((Collection<? extends InitialValue>)newValue);
+        return;
+      case DefinitionsPackage.ASM_FUNCTION__ARITY:
+        setArity((Integer)newValue);
+        return;
+      case DefinitionsPackage.ASM_FUNCTION__NAMESPACE:
+        setNamespace((Machine)newValue);
+        return;
+      case DefinitionsPackage.ASM_FUNCTION__RETURN_TYPE:
+        setReturnType((TypeConstant)newValue);
+        return;
+      case DefinitionsPackage.ASM_FUNCTION__ARGUMENT_TYPES:
+        getArgumentTypes().clear();
+        getArgumentTypes().addAll((Collection<? extends TypeConstant>)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.ASM_FUNCTION__INITIAL_VALUES:
+        getInitialValues().clear();
+        return;
+      case DefinitionsPackage.ASM_FUNCTION__ARITY:
+        setArity(ARITY_EDEFAULT);
+        return;
+      case DefinitionsPackage.ASM_FUNCTION__NAMESPACE:
+        setNamespace((Machine)null);
+        return;
+      case DefinitionsPackage.ASM_FUNCTION__RETURN_TYPE:
+        setReturnType((TypeConstant)null);
+        return;
+      case DefinitionsPackage.ASM_FUNCTION__ARGUMENT_TYPES:
+        getArgumentTypes().clear();
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.ASM_FUNCTION__INITIAL_VALUES:
+        return initialValues != null && !initialValues.isEmpty();
+      case DefinitionsPackage.ASM_FUNCTION__ARITY:
+        return arity != ARITY_EDEFAULT;
+      case DefinitionsPackage.ASM_FUNCTION__NAMESPACE:
+        return getNamespace() != null;
+      case DefinitionsPackage.ASM_FUNCTION__RETURN_TYPE:
+        return returnType != null;
+      case DefinitionsPackage.ASM_FUNCTION__ARGUMENT_TYPES:
+        return argumentTypes != null && !argumentTypes.isEmpty();
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (arity: ");
+    result.append(arity);
+    result.append(')');
+    return result.toString();
+  }
+
+} //ASMFunctionImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/ChangeEventImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/ChangeEventImpl.java
new file mode 100644
index 0000000..064dea8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/ChangeEventImpl.java
@@ -0,0 +1,285 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ChangeKind;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Change Event</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ChangeEventImpl#getChangeKind <em>Change Kind</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ChangeEventImpl#getVariableReference <em>Variable Reference</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ChangeEventImpl extends GTASMElementImpl implements ChangeEvent
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The default value of the '{@link #getChangeKind() <em>Change Kind</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getChangeKind()
+   * @generated
+   * @ordered
+   */
+  protected static final ChangeKind CHANGE_KIND_EDEFAULT = ChangeKind.NEW;
+
+  /**
+   * The cached value of the '{@link #getChangeKind() <em>Change Kind</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getChangeKind()
+   * @generated
+   * @ordered
+   */
+  protected ChangeKind changeKind = CHANGE_KIND_EDEFAULT;
+
+  /**
+   * The cached value of the '{@link #getVariableReference() <em>Variable Reference</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getVariableReference()
+   * @generated
+   * @ordered
+   */
+  protected VariableReference variableReference;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ChangeEventImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return DefinitionsPackage.Literals.CHANGE_EVENT;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ChangeKind getChangeKind()
+  {
+    return changeKind;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setChangeKind(ChangeKind newChangeKind)
+  {
+    ChangeKind oldChangeKind = changeKind;
+    changeKind = newChangeKind == null ? CHANGE_KIND_EDEFAULT : newChangeKind;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.CHANGE_EVENT__CHANGE_KIND, oldChangeKind, changeKind));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public VariableReference getVariableReference()
+  {
+    return variableReference;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetVariableReference(VariableReference newVariableReference, NotificationChain msgs)
+  {
+    VariableReference oldVariableReference = variableReference;
+    variableReference = newVariableReference;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DefinitionsPackage.CHANGE_EVENT__VARIABLE_REFERENCE, oldVariableReference, newVariableReference);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setVariableReference(VariableReference newVariableReference)
+  {
+    if (newVariableReference != variableReference)
+    {
+      NotificationChain msgs = null;
+      if (variableReference != null)
+        msgs = ((InternalEObject)variableReference).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DefinitionsPackage.CHANGE_EVENT__VARIABLE_REFERENCE, null, msgs);
+      if (newVariableReference != null)
+        msgs = ((InternalEObject)newVariableReference).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DefinitionsPackage.CHANGE_EVENT__VARIABLE_REFERENCE, null, msgs);
+      msgs = basicSetVariableReference(newVariableReference, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.CHANGE_EVENT__VARIABLE_REFERENCE, newVariableReference, newVariableReference));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.CHANGE_EVENT__VARIABLE_REFERENCE:
+        return basicSetVariableReference(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.CHANGE_EVENT__CHANGE_KIND:
+        return getChangeKind();
+      case DefinitionsPackage.CHANGE_EVENT__VARIABLE_REFERENCE:
+        return getVariableReference();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.CHANGE_EVENT__CHANGE_KIND:
+        setChangeKind((ChangeKind)newValue);
+        return;
+      case DefinitionsPackage.CHANGE_EVENT__VARIABLE_REFERENCE:
+        setVariableReference((VariableReference)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.CHANGE_EVENT__CHANGE_KIND:
+        setChangeKind(CHANGE_KIND_EDEFAULT);
+        return;
+      case DefinitionsPackage.CHANGE_EVENT__VARIABLE_REFERENCE:
+        setVariableReference((VariableReference)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.CHANGE_EVENT__CHANGE_KIND:
+        return changeKind != CHANGE_KIND_EDEFAULT;
+      case DefinitionsPackage.CHANGE_EVENT__VARIABLE_REFERENCE:
+        return variableReference != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (changeKind: ");
+    result.append(changeKind);
+    result.append(')');
+    return result.toString();
+  }
+
+} //ChangeEventImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/DefinitionsFactoryImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/DefinitionsFactoryImpl.java
new file mode 100644
index 0000000..51dd074
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/DefinitionsFactoryImpl.java
@@ -0,0 +1,266 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DefinitionsFactoryImpl extends EFactoryImpl implements DefinitionsFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Creates the default factory implementation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static DefinitionsFactory init()
+  {
+    try
+    {
+      DefinitionsFactory theDefinitionsFactory = (DefinitionsFactory)EPackage.Registry.INSTANCE.getEFactory("http:///viatragtasmmodel/gtasm/metamodel/asm/definitions.ecore"); 
+      if (theDefinitionsFactory != null)
+      {
+        return theDefinitionsFactory;
+      }
+    }
+    catch (Exception exception)
+    {
+      EcorePlugin.INSTANCE.log(exception);
+    }
+    return new DefinitionsFactoryImpl();
+  }
+
+  /**
+   * Creates an instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DefinitionsFactoryImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public EObject create(EClass eClass)
+  {
+    switch (eClass.getClassifierID())
+    {
+      case DefinitionsPackage.MACHINE: return createMachine();
+      case DefinitionsPackage.RULE: return createRule();
+      case DefinitionsPackage.VARIABLE: return createVariable();
+      case DefinitionsPackage.VARIABLE_DEFINITION: return createVariableDefinition();
+      case DefinitionsPackage.ASM_FUNCTION: return createASMFunction();
+      case DefinitionsPackage.INITIAL_VALUE: return createInitialValue();
+      case DefinitionsPackage.SYMBOLIC_RULE_PARAMETER: return createSymbolicRuleParameter();
+      case DefinitionsPackage.MODULE: return createModule();
+      case DefinitionsPackage.IMPORT_DECLARATION: return createImportDeclaration();
+      case DefinitionsPackage.NAMESPACE_DEFINITION: return createNamespaceDefinition();
+      case DefinitionsPackage.TRANSFORMATION: return createTransformation();
+      case DefinitionsPackage.TYPE_CONSTANT: return createTypeConstant();
+      case DefinitionsPackage.CHANGE_EVENT: return createChangeEvent();
+      default:
+        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+    }
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Machine createMachine()
+  {
+    MachineImpl machine = new MachineImpl();
+    return machine;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Rule createRule()
+  {
+    RuleImpl rule = new RuleImpl();
+    return rule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Variable createVariable()
+  {
+    VariableImpl variable = new VariableImpl();
+    return variable;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public VariableDefinition createVariableDefinition()
+  {
+    VariableDefinitionImpl variableDefinition = new VariableDefinitionImpl();
+    return variableDefinition;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ASMFunction createASMFunction()
+  {
+    ASMFunctionImpl asmFunction = new ASMFunctionImpl();
+    return asmFunction;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public InitialValue createInitialValue()
+  {
+    InitialValueImpl initialValue = new InitialValueImpl();
+    return initialValue;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SymbolicRuleParameter createSymbolicRuleParameter()
+  {
+    SymbolicRuleParameterImpl symbolicRuleParameter = new SymbolicRuleParameterImpl();
+    return symbolicRuleParameter;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Module createModule()
+  {
+    ModuleImpl module = new ModuleImpl();
+    return module;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ImportDeclaration createImportDeclaration()
+  {
+    ImportDeclarationImpl importDeclaration = new ImportDeclarationImpl();
+    return importDeclaration;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NamespaceDefinition createNamespaceDefinition()
+  {
+    NamespaceDefinitionImpl namespaceDefinition = new NamespaceDefinitionImpl();
+    return namespaceDefinition;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Transformation createTransformation()
+  {
+    TransformationImpl transformation = new TransformationImpl();
+    return transformation;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public TypeConstant createTypeConstant()
+  {
+    TypeConstantImpl typeConstant = new TypeConstantImpl();
+    return typeConstant;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ChangeEvent createChangeEvent()
+  {
+    ChangeEventImpl changeEvent = new ChangeEventImpl();
+    return changeEvent;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DefinitionsPackage getDefinitionsPackage()
+  {
+    return (DefinitionsPackage)getEPackage();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @deprecated
+   * @generated
+   */
+  @Deprecated
+  public static DefinitionsPackage getPackage()
+  {
+    return DefinitionsPackage.eINSTANCE;
+  }
+
+} //DefinitionsFactoryImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/DefinitionsPackageImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/DefinitionsPackageImpl.java
new file mode 100644
index 0000000..fa41f75
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/DefinitionsPackageImpl.java
@@ -0,0 +1,987 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.FunctionDefinition;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ImportDeclaration;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.NamespaceDefinition;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Transformation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymovePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DefinitionsPackageImpl extends EPackageImpl implements DefinitionsPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass machineEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass ruleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass variableEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass variableDefinitionEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass asmFunctionEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass functionDefinitionEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass initialValueEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass symbolicRuleParameterEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass moduleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass importDeclarationEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass namespaceDefinitionEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass transformationEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass typeConstantEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass changeEventEClass = null;
+
+  /**
+   * Creates an instance of the model <b>Package</b>, registered with
+   * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+   * package URI value.
+   * <p>Note: the correct way to create the package is via the static
+   * factory method {@link #init init()}, which also performs
+   * initialization of the package, or returns the registered package,
+   * if one already exists.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.emf.ecore.EPackage.Registry
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage#eNS_URI
+   * @see #init()
+   * @generated
+   */
+  private DefinitionsPackageImpl()
+  {
+    super(eNS_URI, DefinitionsFactory.eINSTANCE);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static boolean isInited = false;
+
+  /**
+   * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+   * 
+   * <p>This method is used to initialize {@link DefinitionsPackage#eINSTANCE} when that field is accessed.
+   * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #eNS_URI
+   * @see #createPackageContents()
+   * @see #initializePackageContents()
+   * @generated
+   */
+  public static DefinitionsPackage init()
+  {
+    if (isInited) return (DefinitionsPackage)EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI);
+
+    // Obtain or create and register package
+    DefinitionsPackageImpl theDefinitionsPackage = (DefinitionsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof DefinitionsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new DefinitionsPackageImpl());
+
+    isInited = true;
+
+    // Obtain or create and register interdependencies
+    EditmodelPackageImpl theEditmodelPackage = (EditmodelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) instanceof EditmodelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) : EditmodelPackage.eINSTANCE);
+    QueryFunctionsPackageImpl theQueryFunctionsPackage = (QueryFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) instanceof QueryFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) : QueryFunctionsPackage.eINSTANCE);
+    DeletionPackageImpl theDeletionPackage = (DeletionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) instanceof DeletionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) : DeletionPackage.eINSTANCE);
+    CreationPackageImpl theCreationPackage = (CreationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) instanceof CreationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) : CreationPackage.eINSTANCE);
+    CopymovePackageImpl theCopymovePackage = (CopymovePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) instanceof CopymovePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) : CopymovePackage.eINSTANCE);
+    UpdatePackageImpl theUpdatePackage = (UpdatePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) instanceof UpdatePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) : UpdatePackage.eINSTANCE);
+    CorePackageImpl theCorePackage = (CorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) instanceof CorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) : CorePackage.eINSTANCE);
+    SimpleRulesPackageImpl theSimpleRulesPackage = (SimpleRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) instanceof SimpleRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) : SimpleRulesPackage.eINSTANCE);
+    CompoundRulesPackageImpl theCompoundRulesPackage = (CompoundRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) instanceof CompoundRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) : CompoundRulesPackage.eINSTANCE);
+    EnumsPackageImpl theEnumsPackage = (EnumsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) instanceof EnumsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) : EnumsPackage.eINSTANCE);
+    TermsPackageImpl theTermsPackage = (TermsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) instanceof TermsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) : TermsPackage.eINSTANCE);
+    BuiltInFunctionsPackageImpl theBuiltInFunctionsPackage = (BuiltInFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) instanceof BuiltInFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) : BuiltInFunctionsPackage.eINSTANCE);
+    GtPackageImpl theGtPackage = (GtPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) instanceof GtPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) : GtPackage.eINSTANCE);
+
+    // Create package meta-data objects
+    theDefinitionsPackage.createPackageContents();
+    theEditmodelPackage.createPackageContents();
+    theQueryFunctionsPackage.createPackageContents();
+    theDeletionPackage.createPackageContents();
+    theCreationPackage.createPackageContents();
+    theCopymovePackage.createPackageContents();
+    theUpdatePackage.createPackageContents();
+    theCorePackage.createPackageContents();
+    theSimpleRulesPackage.createPackageContents();
+    theCompoundRulesPackage.createPackageContents();
+    theEnumsPackage.createPackageContents();
+    theTermsPackage.createPackageContents();
+    theBuiltInFunctionsPackage.createPackageContents();
+    theGtPackage.createPackageContents();
+
+    // Initialize created meta-data
+    theDefinitionsPackage.initializePackageContents();
+    theEditmodelPackage.initializePackageContents();
+    theQueryFunctionsPackage.initializePackageContents();
+    theDeletionPackage.initializePackageContents();
+    theCreationPackage.initializePackageContents();
+    theCopymovePackage.initializePackageContents();
+    theUpdatePackage.initializePackageContents();
+    theCorePackage.initializePackageContents();
+    theSimpleRulesPackage.initializePackageContents();
+    theCompoundRulesPackage.initializePackageContents();
+    theEnumsPackage.initializePackageContents();
+    theTermsPackage.initializePackageContents();
+    theBuiltInFunctionsPackage.initializePackageContents();
+    theGtPackage.initializePackageContents();
+
+    // Mark meta-data to indicate it can't be changed
+    theDefinitionsPackage.freeze();
+
+  
+    // Update the registry and return the package
+    EPackage.Registry.INSTANCE.put(DefinitionsPackage.eNS_URI, theDefinitionsPackage);
+    return theDefinitionsPackage;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getMachine()
+  {
+    return machineEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getMachine_MainRule()
+  {
+    return (EReference)machineEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getMachine_GtRuleDefinitions()
+  {
+    return (EReference)machineEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getMachine_AsmFunctionDefinitions()
+  {
+    return (EReference)machineEClass.getEStructuralFeatures().get(2);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getMachine_AsmRuleDefinitions()
+  {
+    return (EReference)machineEClass.getEStructuralFeatures().get(3);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getMachine_Module()
+  {
+    return (EReference)machineEClass.getEStructuralFeatures().get(4);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getRule()
+  {
+    return ruleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getRule_Body()
+  {
+    return (EReference)ruleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getRule_SymParameters()
+  {
+    return (EReference)ruleEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getRule_LocalVariables()
+  {
+    return (EReference)ruleEClass.getEStructuralFeatures().get(2);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getRule_Namespace()
+  {
+    return (EReference)ruleEClass.getEStructuralFeatures().get(3);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getVariable()
+  {
+    return variableEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getVariable_References()
+  {
+    return (EReference)variableEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getVariable_Scope()
+  {
+    return (EReference)variableEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getVariable_VariableType()
+  {
+    return (EReference)variableEClass.getEStructuralFeatures().get(2);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getVariableDefinition()
+  {
+    return variableDefinitionEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getVariableDefinition_Variable()
+  {
+    return (EReference)variableDefinitionEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getVariableDefinition_Value()
+  {
+    return (EReference)variableDefinitionEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getASMFunction()
+  {
+    return asmFunctionEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getASMFunction_InitialValues()
+  {
+    return (EReference)asmFunctionEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getASMFunction_Arity()
+  {
+    return (EAttribute)asmFunctionEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getASMFunction_Namespace()
+  {
+    return (EReference)asmFunctionEClass.getEStructuralFeatures().get(2);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getASMFunction_ReturnType()
+  {
+    return (EReference)asmFunctionEClass.getEStructuralFeatures().get(3);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getASMFunction_ArgumentTypes()
+  {
+    return (EReference)asmFunctionEClass.getEStructuralFeatures().get(4);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getFunctionDefinition()
+  {
+    return functionDefinitionEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getInitialValue()
+  {
+    return initialValueEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getInitialValue_Locations()
+  {
+    return (EReference)initialValueEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getInitialValue_Value()
+  {
+    return (EReference)initialValueEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getSymbolicRuleParameter()
+  {
+    return symbolicRuleParameterEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getSymbolicRuleParameter_Variable()
+  {
+    return (EReference)symbolicRuleParameterEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getSymbolicRuleParameter_Direction()
+  {
+    return (EAttribute)symbolicRuleParameterEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getModule()
+  {
+    return moduleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getModule_FileName()
+  {
+    return (EAttribute)moduleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getModule_Machine()
+  {
+    return (EReference)moduleEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getModule_Import()
+  {
+    return (EReference)moduleEClass.getEStructuralFeatures().get(2);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getModule_Namespace()
+  {
+    return (EReference)moduleEClass.getEStructuralFeatures().get(3);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getImportDeclaration()
+  {
+    return importDeclarationEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getImportDeclaration_ImportValue()
+  {
+    return (EAttribute)importDeclarationEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getNamespaceDefinition()
+  {
+    return namespaceDefinitionEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getNamespaceDefinition_NamespaceValue()
+  {
+    return (EAttribute)namespaceDefinitionEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getTransformation()
+  {
+    return transformationEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getTransformation_Modules()
+  {
+    return (EReference)transformationEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getTypeConstant()
+  {
+    return typeConstantEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getTypeConstant_Kind()
+  {
+    return (EAttribute)typeConstantEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getChangeEvent()
+  {
+    return changeEventEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getChangeEvent_ChangeKind()
+  {
+    return (EAttribute)changeEventEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getChangeEvent_VariableReference()
+  {
+    return (EReference)changeEventEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DefinitionsFactory getDefinitionsFactory()
+  {
+    return (DefinitionsFactory)getEFactoryInstance();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isCreated = false;
+
+  /**
+   * Creates the meta-model objects for the package.  This method is
+   * guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void createPackageContents()
+  {
+    if (isCreated) return;
+    isCreated = true;
+
+    // Create classes and their features
+    machineEClass = createEClass(MACHINE);
+    createEReference(machineEClass, MACHINE__MAIN_RULE);
+    createEReference(machineEClass, MACHINE__GT_RULE_DEFINITIONS);
+    createEReference(machineEClass, MACHINE__ASM_FUNCTION_DEFINITIONS);
+    createEReference(machineEClass, MACHINE__ASM_RULE_DEFINITIONS);
+    createEReference(machineEClass, MACHINE__MODULE);
+
+    ruleEClass = createEClass(RULE);
+    createEReference(ruleEClass, RULE__BODY);
+    createEReference(ruleEClass, RULE__SYM_PARAMETERS);
+    createEReference(ruleEClass, RULE__LOCAL_VARIABLES);
+    createEReference(ruleEClass, RULE__NAMESPACE);
+
+    variableEClass = createEClass(VARIABLE);
+    createEReference(variableEClass, VARIABLE__REFERENCES);
+    createEReference(variableEClass, VARIABLE__SCOPE);
+    createEReference(variableEClass, VARIABLE__VARIABLE_TYPE);
+
+    variableDefinitionEClass = createEClass(VARIABLE_DEFINITION);
+    createEReference(variableDefinitionEClass, VARIABLE_DEFINITION__VARIABLE);
+    createEReference(variableDefinitionEClass, VARIABLE_DEFINITION__VALUE);
+
+    asmFunctionEClass = createEClass(ASM_FUNCTION);
+    createEReference(asmFunctionEClass, ASM_FUNCTION__INITIAL_VALUES);
+    createEAttribute(asmFunctionEClass, ASM_FUNCTION__ARITY);
+    createEReference(asmFunctionEClass, ASM_FUNCTION__NAMESPACE);
+    createEReference(asmFunctionEClass, ASM_FUNCTION__RETURN_TYPE);
+    createEReference(asmFunctionEClass, ASM_FUNCTION__ARGUMENT_TYPES);
+
+    functionDefinitionEClass = createEClass(FUNCTION_DEFINITION);
+
+    initialValueEClass = createEClass(INITIAL_VALUE);
+    createEReference(initialValueEClass, INITIAL_VALUE__LOCATIONS);
+    createEReference(initialValueEClass, INITIAL_VALUE__VALUE);
+
+    symbolicRuleParameterEClass = createEClass(SYMBOLIC_RULE_PARAMETER);
+    createEReference(symbolicRuleParameterEClass, SYMBOLIC_RULE_PARAMETER__VARIABLE);
+    createEAttribute(symbolicRuleParameterEClass, SYMBOLIC_RULE_PARAMETER__DIRECTION);
+
+    moduleEClass = createEClass(MODULE);
+    createEAttribute(moduleEClass, MODULE__FILE_NAME);
+    createEReference(moduleEClass, MODULE__MACHINE);
+    createEReference(moduleEClass, MODULE__IMPORT);
+    createEReference(moduleEClass, MODULE__NAMESPACE);
+
+    importDeclarationEClass = createEClass(IMPORT_DECLARATION);
+    createEAttribute(importDeclarationEClass, IMPORT_DECLARATION__IMPORT_VALUE);
+
+    namespaceDefinitionEClass = createEClass(NAMESPACE_DEFINITION);
+    createEAttribute(namespaceDefinitionEClass, NAMESPACE_DEFINITION__NAMESPACE_VALUE);
+
+    transformationEClass = createEClass(TRANSFORMATION);
+    createEReference(transformationEClass, TRANSFORMATION__MODULES);
+
+    typeConstantEClass = createEClass(TYPE_CONSTANT);
+    createEAttribute(typeConstantEClass, TYPE_CONSTANT__KIND);
+
+    changeEventEClass = createEClass(CHANGE_EVENT);
+    createEAttribute(changeEventEClass, CHANGE_EVENT__CHANGE_KIND);
+    createEReference(changeEventEClass, CHANGE_EVENT__VARIABLE_REFERENCE);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isInitialized = false;
+
+  /**
+   * Complete the initialization of the package and its meta-model.  This
+   * method is guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void initializePackageContents()
+  {
+    if (isInitialized) return;
+    isInitialized = true;
+
+    // Initialize package
+    setName(eNAME);
+    setNsPrefix(eNS_PREFIX);
+    setNsURI(eNS_URI);
+
+    // Obtain other dependent packages
+    GtPackage theGtPackage = (GtPackage)EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI);
+    CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI);
+    SimpleRulesPackage theSimpleRulesPackage = (SimpleRulesPackage)EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI);
+    TermsPackage theTermsPackage = (TermsPackage)EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI);
+    CompoundRulesPackage theCompoundRulesPackage = (CompoundRulesPackage)EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI);
+    EnumsPackage theEnumsPackage = (EnumsPackage)EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI);
+
+    // Create type parameters
+
+    // Set bounds for type parameters
+
+    // Add supertypes to classes
+    machineEClass.getESuperTypes().add(theGtPackage.getPatternContainer());
+    ruleEClass.getESuperTypes().add(theCorePackage.getGTASMElement());
+    variableEClass.getESuperTypes().add(theCorePackage.getGTASMElement());
+    variableDefinitionEClass.getESuperTypes().add(theCorePackage.getGTASMElement());
+    asmFunctionEClass.getESuperTypes().add(this.getFunctionDefinition());
+    functionDefinitionEClass.getESuperTypes().add(theCorePackage.getGTASMElement());
+    initialValueEClass.getESuperTypes().add(theCorePackage.getGTASMElement());
+    symbolicRuleParameterEClass.getESuperTypes().add(theCorePackage.getGTASMElement());
+    moduleEClass.getESuperTypes().add(theCorePackage.getGTASMElement());
+    importDeclarationEClass.getESuperTypes().add(theCorePackage.getGTASMElement());
+    namespaceDefinitionEClass.getESuperTypes().add(theCorePackage.getGTASMElement());
+    transformationEClass.getESuperTypes().add(theCorePackage.getGTASMElement());
+    typeConstantEClass.getESuperTypes().add(theCorePackage.getGTASMElement());
+    changeEventEClass.getESuperTypes().add(theCorePackage.getGTASMElement());
+
+    // Initialize classes and features; add operations and parameters
+    initEClass(machineEClass, Machine.class, "Machine", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getMachine_MainRule(), this.getRule(), null, "mainRule", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getMachine_GtRuleDefinitions(), theGtPackage.getGTRule(), theGtPackage.getGTRule_Namespace(), "gtRuleDefinitions", null, 0, -1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getMachine_AsmFunctionDefinitions(), this.getASMFunction(), this.getASMFunction_Namespace(), "asmFunctionDefinitions", null, 0, -1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getMachine_AsmRuleDefinitions(), this.getRule(), this.getRule_Namespace(), "asmRuleDefinitions", null, 0, -1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getMachine_Module(), this.getModule(), this.getModule_Machine(), "module", null, 0, 1, Machine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(ruleEClass, Rule.class, "Rule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getRule_Body(), theSimpleRulesPackage.getASMRuleInvocation(), theSimpleRulesPackage.getASMRuleInvocation_AsmRule(), "body", null, 0, 1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getRule_SymParameters(), this.getSymbolicRuleParameter(), null, "symParameters", null, 0, -1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getRule_LocalVariables(), this.getVariable(), null, "localVariables", null, 0, -1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getRule_Namespace(), this.getMachine(), this.getMachine_AsmRuleDefinitions(), "namespace", null, 1, 1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(variableEClass, Variable.class, "Variable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getVariable_References(), theTermsPackage.getVariableReference(), theTermsPackage.getVariableReference_Variable(), "references", null, 0, -1, Variable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getVariable_Scope(), theCompoundRulesPackage.getBlockRule(), theCompoundRulesPackage.getBlockRule_LocalVariables(), "scope", null, 0, 1, Variable.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getVariable_VariableType(), this.getTypeConstant(), null, "variableType", null, 0, 1, Variable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(variableDefinitionEClass, VariableDefinition.class, "VariableDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getVariableDefinition_Variable(), this.getVariable(), null, "variable", null, 1, 1, VariableDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getVariableDefinition_Value(), theTermsPackage.getTerm(), null, "value", null, 1, 1, VariableDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(asmFunctionEClass, ASMFunction.class, "ASMFunction", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getASMFunction_InitialValues(), this.getInitialValue(), null, "initialValues", null, 0, -1, ASMFunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEAttribute(getASMFunction_Arity(), ecorePackage.getEInt(), "arity", null, 1, 1, ASMFunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getASMFunction_Namespace(), this.getMachine(), this.getMachine_AsmFunctionDefinitions(), "namespace", null, 1, 1, ASMFunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getASMFunction_ReturnType(), this.getTypeConstant(), null, "returnType", null, 0, 1, ASMFunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getASMFunction_ArgumentTypes(), this.getTypeConstant(), null, "argumentTypes", null, 0, -1, ASMFunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(functionDefinitionEClass, FunctionDefinition.class, "FunctionDefinition", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(initialValueEClass, InitialValue.class, "InitialValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getInitialValue_Locations(), theTermsPackage.getTerm(), null, "locations", null, 0, -1, InitialValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getInitialValue_Value(), theTermsPackage.getTerm(), null, "value", null, 1, 1, InitialValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(symbolicRuleParameterEClass, SymbolicRuleParameter.class, "SymbolicRuleParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getSymbolicRuleParameter_Variable(), this.getVariable(), null, "variable", null, 1, 1, SymbolicRuleParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEAttribute(getSymbolicRuleParameter_Direction(), theEnumsPackage.getDirectionKind(), "direction", "in", 1, 1, SymbolicRuleParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(moduleEClass, Module.class, "Module", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEAttribute(getModule_FileName(), ecorePackage.getEString(), "fileName", null, 0, 1, Module.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getModule_Machine(), this.getMachine(), this.getMachine_Module(), "machine", null, 0, -1, Module.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getModule_Import(), this.getImportDeclaration(), null, "import", null, 0, -1, Module.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getModule_Namespace(), this.getNamespaceDefinition(), null, "namespace", null, 0, 1, Module.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(importDeclarationEClass, ImportDeclaration.class, "ImportDeclaration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEAttribute(getImportDeclaration_ImportValue(), ecorePackage.getEString(), "importValue", null, 1, 1, ImportDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(namespaceDefinitionEClass, NamespaceDefinition.class, "NamespaceDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEAttribute(getNamespaceDefinition_NamespaceValue(), ecorePackage.getEString(), "namespaceValue", null, 1, 1, NamespaceDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(transformationEClass, Transformation.class, "Transformation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getTransformation_Modules(), this.getModule(), null, "modules", null, 0, -1, Transformation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(typeConstantEClass, TypeConstant.class, "TypeConstant", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEAttribute(getTypeConstant_Kind(), theEnumsPackage.getValueKind(), "kind", null, 1, 1, TypeConstant.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(changeEventEClass, ChangeEvent.class, "ChangeEvent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEAttribute(getChangeEvent_ChangeKind(), theEnumsPackage.getChangeKind(), "changeKind", "new", 1, 1, ChangeEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getChangeEvent_VariableReference(), theTermsPackage.getVariableReference(), null, "variableReference", null, 1, 1, ChangeEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    // Create resource
+    createResource(eNS_URI);
+  }
+
+} //DefinitionsPackageImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/FunctionDefinitionImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/FunctionDefinitionImpl.java
new file mode 100644
index 0000000..81c4623
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/FunctionDefinitionImpl.java
@@ -0,0 +1,60 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.FunctionDefinition;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Function Definition</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class FunctionDefinitionImpl extends GTASMElementImpl implements FunctionDefinition
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected FunctionDefinitionImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return DefinitionsPackage.Literals.FUNCTION_DEFINITION;
+  }
+
+} //FunctionDefinitionImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/ImportDeclarationImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/ImportDeclarationImpl.java
new file mode 100644
index 0000000..09e64c0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/ImportDeclarationImpl.java
@@ -0,0 +1,194 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ImportDeclaration;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Import Declaration</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ImportDeclarationImpl#getImportValue <em>Import Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ImportDeclarationImpl extends GTASMElementImpl implements ImportDeclaration
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The default value of the '{@link #getImportValue() <em>Import Value</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getImportValue()
+   * @generated
+   * @ordered
+   */
+  protected static final String IMPORT_VALUE_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getImportValue() <em>Import Value</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getImportValue()
+   * @generated
+   * @ordered
+   */
+  protected String importValue = IMPORT_VALUE_EDEFAULT;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ImportDeclarationImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return DefinitionsPackage.Literals.IMPORT_DECLARATION;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getImportValue()
+  {
+    return importValue;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setImportValue(String newImportValue)
+  {
+    String oldImportValue = importValue;
+    importValue = newImportValue;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.IMPORT_DECLARATION__IMPORT_VALUE, oldImportValue, importValue));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.IMPORT_DECLARATION__IMPORT_VALUE:
+        return getImportValue();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.IMPORT_DECLARATION__IMPORT_VALUE:
+        setImportValue((String)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.IMPORT_DECLARATION__IMPORT_VALUE:
+        setImportValue(IMPORT_VALUE_EDEFAULT);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.IMPORT_DECLARATION__IMPORT_VALUE:
+        return IMPORT_VALUE_EDEFAULT == null ? importValue != null : !IMPORT_VALUE_EDEFAULT.equals(importValue);
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (importValue: ");
+    result.append(importValue);
+    result.append(')');
+    return result.toString();
+  }
+
+} //ImportDeclarationImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/InitialValueImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/InitialValueImpl.java
new file mode 100644
index 0000000..0109980
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/InitialValueImpl.java
@@ -0,0 +1,258 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Initial Value</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.InitialValueImpl#getLocations <em>Locations</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.InitialValueImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class InitialValueImpl extends GTASMElementImpl implements InitialValue
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getLocations() <em>Locations</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getLocations()
+   * @generated
+   * @ordered
+   */
+  protected EList<Term> locations;
+
+  /**
+   * The cached value of the '{@link #getValue() <em>Value</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getValue()
+   * @generated
+   * @ordered
+   */
+  protected Term value;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected InitialValueImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return DefinitionsPackage.Literals.INITIAL_VALUE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Term> getLocations()
+  {
+    if (locations == null)
+    {
+      locations = new EObjectContainmentEList<Term>(Term.class, this, DefinitionsPackage.INITIAL_VALUE__LOCATIONS);
+    }
+    return locations;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getValue()
+  {
+    return value;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetValue(Term newValue, NotificationChain msgs)
+  {
+    Term oldValue = value;
+    value = newValue;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DefinitionsPackage.INITIAL_VALUE__VALUE, oldValue, newValue);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setValue(Term newValue)
+  {
+    if (newValue != value)
+    {
+      NotificationChain msgs = null;
+      if (value != null)
+        msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DefinitionsPackage.INITIAL_VALUE__VALUE, null, msgs);
+      if (newValue != null)
+        msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DefinitionsPackage.INITIAL_VALUE__VALUE, null, msgs);
+      msgs = basicSetValue(newValue, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.INITIAL_VALUE__VALUE, newValue, newValue));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.INITIAL_VALUE__LOCATIONS:
+        return ((InternalEList<?>)getLocations()).basicRemove(otherEnd, msgs);
+      case DefinitionsPackage.INITIAL_VALUE__VALUE:
+        return basicSetValue(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.INITIAL_VALUE__LOCATIONS:
+        return getLocations();
+      case DefinitionsPackage.INITIAL_VALUE__VALUE:
+        return getValue();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.INITIAL_VALUE__LOCATIONS:
+        getLocations().clear();
+        getLocations().addAll((Collection<? extends Term>)newValue);
+        return;
+      case DefinitionsPackage.INITIAL_VALUE__VALUE:
+        setValue((Term)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.INITIAL_VALUE__LOCATIONS:
+        getLocations().clear();
+        return;
+      case DefinitionsPackage.INITIAL_VALUE__VALUE:
+        setValue((Term)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.INITIAL_VALUE__LOCATIONS:
+        return locations != null && !locations.isEmpty();
+      case DefinitionsPackage.INITIAL_VALUE__VALUE:
+        return value != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //InitialValueImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/MachineImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/MachineImpl.java
new file mode 100644
index 0000000..4117b82
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/MachineImpl.java
@@ -0,0 +1,432 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternContainerImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Machine</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.MachineImpl#getMainRule <em>Main Rule</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.MachineImpl#getGtRuleDefinitions <em>Gt Rule Definitions</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.MachineImpl#getAsmFunctionDefinitions <em>Asm Function Definitions</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.MachineImpl#getAsmRuleDefinitions <em>Asm Rule Definitions</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.MachineImpl#getModule <em>Module</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class MachineImpl extends PatternContainerImpl implements Machine
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getMainRule() <em>Main Rule</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getMainRule()
+   * @generated
+   * @ordered
+   */
+  protected Rule mainRule;
+
+  /**
+   * The cached value of the '{@link #getGtRuleDefinitions() <em>Gt Rule Definitions</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getGtRuleDefinitions()
+   * @generated
+   * @ordered
+   */
+  protected EList<GTRule> gtRuleDefinitions;
+
+  /**
+   * The cached value of the '{@link #getAsmFunctionDefinitions() <em>Asm Function Definitions</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getAsmFunctionDefinitions()
+   * @generated
+   * @ordered
+   */
+  protected EList<ASMFunction> asmFunctionDefinitions;
+
+  /**
+   * The cached value of the '{@link #getAsmRuleDefinitions() <em>Asm Rule Definitions</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getAsmRuleDefinitions()
+   * @generated
+   * @ordered
+   */
+  protected EList<Rule> asmRuleDefinitions;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected MachineImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return DefinitionsPackage.Literals.MACHINE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Rule getMainRule()
+  {
+    if (mainRule != null && mainRule.eIsProxy())
+    {
+      InternalEObject oldMainRule = (InternalEObject)mainRule;
+      mainRule = (Rule)eResolveProxy(oldMainRule);
+      if (mainRule != oldMainRule)
+      {
+        if (eNotificationRequired())
+          eNotify(new ENotificationImpl(this, Notification.RESOLVE, DefinitionsPackage.MACHINE__MAIN_RULE, oldMainRule, mainRule));
+      }
+    }
+    return mainRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Rule basicGetMainRule()
+  {
+    return mainRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setMainRule(Rule newMainRule)
+  {
+    Rule oldMainRule = mainRule;
+    mainRule = newMainRule;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.MACHINE__MAIN_RULE, oldMainRule, mainRule));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<GTRule> getGtRuleDefinitions()
+  {
+    if (gtRuleDefinitions == null)
+    {
+      gtRuleDefinitions = new EObjectContainmentWithInverseEList<GTRule>(GTRule.class, this, DefinitionsPackage.MACHINE__GT_RULE_DEFINITIONS, GtPackage.GT_RULE__NAMESPACE);
+    }
+    return gtRuleDefinitions;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<ASMFunction> getAsmFunctionDefinitions()
+  {
+    if (asmFunctionDefinitions == null)
+    {
+      asmFunctionDefinitions = new EObjectContainmentWithInverseEList<ASMFunction>(ASMFunction.class, this, DefinitionsPackage.MACHINE__ASM_FUNCTION_DEFINITIONS, DefinitionsPackage.ASM_FUNCTION__NAMESPACE);
+    }
+    return asmFunctionDefinitions;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Rule> getAsmRuleDefinitions()
+  {
+    if (asmRuleDefinitions == null)
+    {
+      asmRuleDefinitions = new EObjectContainmentWithInverseEList<Rule>(Rule.class, this, DefinitionsPackage.MACHINE__ASM_RULE_DEFINITIONS, DefinitionsPackage.RULE__NAMESPACE);
+    }
+    return asmRuleDefinitions;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Module getModule()
+  {
+    if (eContainerFeatureID() != DefinitionsPackage.MACHINE__MODULE) return null;
+    return (Module)eContainer();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetModule(Module newModule, NotificationChain msgs)
+  {
+    msgs = eBasicSetContainer((InternalEObject)newModule, DefinitionsPackage.MACHINE__MODULE, msgs);
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setModule(Module newModule)
+  {
+    if (newModule != eInternalContainer() || (eContainerFeatureID() != DefinitionsPackage.MACHINE__MODULE && newModule != null))
+    {
+      if (EcoreUtil.isAncestor(this, newModule))
+        throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+      NotificationChain msgs = null;
+      if (eInternalContainer() != null)
+        msgs = eBasicRemoveFromContainer(msgs);
+      if (newModule != null)
+        msgs = ((InternalEObject)newModule).eInverseAdd(this, DefinitionsPackage.MODULE__MACHINE, Module.class, msgs);
+      msgs = basicSetModule(newModule, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.MACHINE__MODULE, newModule, newModule));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.MACHINE__GT_RULE_DEFINITIONS:
+        return ((InternalEList<InternalEObject>)(InternalEList<?>)getGtRuleDefinitions()).basicAdd(otherEnd, msgs);
+      case DefinitionsPackage.MACHINE__ASM_FUNCTION_DEFINITIONS:
+        return ((InternalEList<InternalEObject>)(InternalEList<?>)getAsmFunctionDefinitions()).basicAdd(otherEnd, msgs);
+      case DefinitionsPackage.MACHINE__ASM_RULE_DEFINITIONS:
+        return ((InternalEList<InternalEObject>)(InternalEList<?>)getAsmRuleDefinitions()).basicAdd(otherEnd, msgs);
+      case DefinitionsPackage.MACHINE__MODULE:
+        if (eInternalContainer() != null)
+          msgs = eBasicRemoveFromContainer(msgs);
+        return basicSetModule((Module)otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.MACHINE__GT_RULE_DEFINITIONS:
+        return ((InternalEList<?>)getGtRuleDefinitions()).basicRemove(otherEnd, msgs);
+      case DefinitionsPackage.MACHINE__ASM_FUNCTION_DEFINITIONS:
+        return ((InternalEList<?>)getAsmFunctionDefinitions()).basicRemove(otherEnd, msgs);
+      case DefinitionsPackage.MACHINE__ASM_RULE_DEFINITIONS:
+        return ((InternalEList<?>)getAsmRuleDefinitions()).basicRemove(otherEnd, msgs);
+      case DefinitionsPackage.MACHINE__MODULE:
+        return basicSetModule(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
+  {
+    switch (eContainerFeatureID())
+    {
+      case DefinitionsPackage.MACHINE__MODULE:
+        return eInternalContainer().eInverseRemove(this, DefinitionsPackage.MODULE__MACHINE, Module.class, msgs);
+    }
+    return super.eBasicRemoveFromContainerFeature(msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.MACHINE__MAIN_RULE:
+        if (resolve) return getMainRule();
+        return basicGetMainRule();
+      case DefinitionsPackage.MACHINE__GT_RULE_DEFINITIONS:
+        return getGtRuleDefinitions();
+      case DefinitionsPackage.MACHINE__ASM_FUNCTION_DEFINITIONS:
+        return getAsmFunctionDefinitions();
+      case DefinitionsPackage.MACHINE__ASM_RULE_DEFINITIONS:
+        return getAsmRuleDefinitions();
+      case DefinitionsPackage.MACHINE__MODULE:
+        return getModule();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.MACHINE__MAIN_RULE:
+        setMainRule((Rule)newValue);
+        return;
+      case DefinitionsPackage.MACHINE__GT_RULE_DEFINITIONS:
+        getGtRuleDefinitions().clear();
+        getGtRuleDefinitions().addAll((Collection<? extends GTRule>)newValue);
+        return;
+      case DefinitionsPackage.MACHINE__ASM_FUNCTION_DEFINITIONS:
+        getAsmFunctionDefinitions().clear();
+        getAsmFunctionDefinitions().addAll((Collection<? extends ASMFunction>)newValue);
+        return;
+      case DefinitionsPackage.MACHINE__ASM_RULE_DEFINITIONS:
+        getAsmRuleDefinitions().clear();
+        getAsmRuleDefinitions().addAll((Collection<? extends Rule>)newValue);
+        return;
+      case DefinitionsPackage.MACHINE__MODULE:
+        setModule((Module)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.MACHINE__MAIN_RULE:
+        setMainRule((Rule)null);
+        return;
+      case DefinitionsPackage.MACHINE__GT_RULE_DEFINITIONS:
+        getGtRuleDefinitions().clear();
+        return;
+      case DefinitionsPackage.MACHINE__ASM_FUNCTION_DEFINITIONS:
+        getAsmFunctionDefinitions().clear();
+        return;
+      case DefinitionsPackage.MACHINE__ASM_RULE_DEFINITIONS:
+        getAsmRuleDefinitions().clear();
+        return;
+      case DefinitionsPackage.MACHINE__MODULE:
+        setModule((Module)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.MACHINE__MAIN_RULE:
+        return mainRule != null;
+      case DefinitionsPackage.MACHINE__GT_RULE_DEFINITIONS:
+        return gtRuleDefinitions != null && !gtRuleDefinitions.isEmpty();
+      case DefinitionsPackage.MACHINE__ASM_FUNCTION_DEFINITIONS:
+        return asmFunctionDefinitions != null && !asmFunctionDefinitions.isEmpty();
+      case DefinitionsPackage.MACHINE__ASM_RULE_DEFINITIONS:
+        return asmRuleDefinitions != null && !asmRuleDefinitions.isEmpty();
+      case DefinitionsPackage.MACHINE__MODULE:
+        return getModule() != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //MachineImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/ModuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/ModuleImpl.java
new file mode 100644
index 0000000..7160945
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/ModuleImpl.java
@@ -0,0 +1,386 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ImportDeclaration;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.NamespaceDefinition;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Module</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ModuleImpl#getFileName <em>File Name</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ModuleImpl#getMachine <em>Machine</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ModuleImpl#getImport <em>Import</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.ModuleImpl#getNamespace <em>Namespace</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ModuleImpl extends GTASMElementImpl implements Module
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The default value of the '{@link #getFileName() <em>File Name</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getFileName()
+   * @generated
+   * @ordered
+   */
+  protected static final String FILE_NAME_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getFileName() <em>File Name</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getFileName()
+   * @generated
+   * @ordered
+   */
+  protected String fileName = FILE_NAME_EDEFAULT;
+
+  /**
+   * The cached value of the '{@link #getMachine() <em>Machine</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getMachine()
+   * @generated
+   * @ordered
+   */
+  protected EList<Machine> machine;
+
+  /**
+   * The cached value of the '{@link #getImport() <em>Import</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getImport()
+   * @generated
+   * @ordered
+   */
+  protected EList<ImportDeclaration> import_;
+
+  /**
+   * The cached value of the '{@link #getNamespace() <em>Namespace</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getNamespace()
+   * @generated
+   * @ordered
+   */
+  protected NamespaceDefinition namespace;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ModuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return DefinitionsPackage.Literals.MODULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getFileName()
+  {
+    return fileName;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setFileName(String newFileName)
+  {
+    String oldFileName = fileName;
+    fileName = newFileName;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.MODULE__FILE_NAME, oldFileName, fileName));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Machine> getMachine()
+  {
+    if (machine == null)
+    {
+      machine = new EObjectContainmentWithInverseEList<Machine>(Machine.class, this, DefinitionsPackage.MODULE__MACHINE, DefinitionsPackage.MACHINE__MODULE);
+    }
+    return machine;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<ImportDeclaration> getImport()
+  {
+    if (import_ == null)
+    {
+      import_ = new EObjectContainmentEList<ImportDeclaration>(ImportDeclaration.class, this, DefinitionsPackage.MODULE__IMPORT);
+    }
+    return import_;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NamespaceDefinition getNamespace()
+  {
+    return namespace;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetNamespace(NamespaceDefinition newNamespace, NotificationChain msgs)
+  {
+    NamespaceDefinition oldNamespace = namespace;
+    namespace = newNamespace;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DefinitionsPackage.MODULE__NAMESPACE, oldNamespace, newNamespace);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setNamespace(NamespaceDefinition newNamespace)
+  {
+    if (newNamespace != namespace)
+    {
+      NotificationChain msgs = null;
+      if (namespace != null)
+        msgs = ((InternalEObject)namespace).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DefinitionsPackage.MODULE__NAMESPACE, null, msgs);
+      if (newNamespace != null)
+        msgs = ((InternalEObject)newNamespace).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DefinitionsPackage.MODULE__NAMESPACE, null, msgs);
+      msgs = basicSetNamespace(newNamespace, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.MODULE__NAMESPACE, newNamespace, newNamespace));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.MODULE__MACHINE:
+        return ((InternalEList<InternalEObject>)(InternalEList<?>)getMachine()).basicAdd(otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.MODULE__MACHINE:
+        return ((InternalEList<?>)getMachine()).basicRemove(otherEnd, msgs);
+      case DefinitionsPackage.MODULE__IMPORT:
+        return ((InternalEList<?>)getImport()).basicRemove(otherEnd, msgs);
+      case DefinitionsPackage.MODULE__NAMESPACE:
+        return basicSetNamespace(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.MODULE__FILE_NAME:
+        return getFileName();
+      case DefinitionsPackage.MODULE__MACHINE:
+        return getMachine();
+      case DefinitionsPackage.MODULE__IMPORT:
+        return getImport();
+      case DefinitionsPackage.MODULE__NAMESPACE:
+        return getNamespace();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.MODULE__FILE_NAME:
+        setFileName((String)newValue);
+        return;
+      case DefinitionsPackage.MODULE__MACHINE:
+        getMachine().clear();
+        getMachine().addAll((Collection<? extends Machine>)newValue);
+        return;
+      case DefinitionsPackage.MODULE__IMPORT:
+        getImport().clear();
+        getImport().addAll((Collection<? extends ImportDeclaration>)newValue);
+        return;
+      case DefinitionsPackage.MODULE__NAMESPACE:
+        setNamespace((NamespaceDefinition)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.MODULE__FILE_NAME:
+        setFileName(FILE_NAME_EDEFAULT);
+        return;
+      case DefinitionsPackage.MODULE__MACHINE:
+        getMachine().clear();
+        return;
+      case DefinitionsPackage.MODULE__IMPORT:
+        getImport().clear();
+        return;
+      case DefinitionsPackage.MODULE__NAMESPACE:
+        setNamespace((NamespaceDefinition)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.MODULE__FILE_NAME:
+        return FILE_NAME_EDEFAULT == null ? fileName != null : !FILE_NAME_EDEFAULT.equals(fileName);
+      case DefinitionsPackage.MODULE__MACHINE:
+        return machine != null && !machine.isEmpty();
+      case DefinitionsPackage.MODULE__IMPORT:
+        return import_ != null && !import_.isEmpty();
+      case DefinitionsPackage.MODULE__NAMESPACE:
+        return namespace != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (fileName: ");
+    result.append(fileName);
+    result.append(')');
+    return result.toString();
+  }
+
+} //ModuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/NamespaceDefinitionImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/NamespaceDefinitionImpl.java
new file mode 100644
index 0000000..d64fc74
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/NamespaceDefinitionImpl.java
@@ -0,0 +1,194 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.NamespaceDefinition;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Namespace Definition</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.NamespaceDefinitionImpl#getNamespaceValue <em>Namespace Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class NamespaceDefinitionImpl extends GTASMElementImpl implements NamespaceDefinition
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The default value of the '{@link #getNamespaceValue() <em>Namespace Value</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getNamespaceValue()
+   * @generated
+   * @ordered
+   */
+  protected static final String NAMESPACE_VALUE_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getNamespaceValue() <em>Namespace Value</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getNamespaceValue()
+   * @generated
+   * @ordered
+   */
+  protected String namespaceValue = NAMESPACE_VALUE_EDEFAULT;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected NamespaceDefinitionImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return DefinitionsPackage.Literals.NAMESPACE_DEFINITION;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getNamespaceValue()
+  {
+    return namespaceValue;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setNamespaceValue(String newNamespaceValue)
+  {
+    String oldNamespaceValue = namespaceValue;
+    namespaceValue = newNamespaceValue;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.NAMESPACE_DEFINITION__NAMESPACE_VALUE, oldNamespaceValue, namespaceValue));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.NAMESPACE_DEFINITION__NAMESPACE_VALUE:
+        return getNamespaceValue();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.NAMESPACE_DEFINITION__NAMESPACE_VALUE:
+        setNamespaceValue((String)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.NAMESPACE_DEFINITION__NAMESPACE_VALUE:
+        setNamespaceValue(NAMESPACE_VALUE_EDEFAULT);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.NAMESPACE_DEFINITION__NAMESPACE_VALUE:
+        return NAMESPACE_VALUE_EDEFAULT == null ? namespaceValue != null : !NAMESPACE_VALUE_EDEFAULT.equals(namespaceValue);
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (namespaceValue: ");
+    result.append(namespaceValue);
+    result.append(')');
+    return result.toString();
+  }
+
+} //NamespaceDefinitionImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/RuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/RuleImpl.java
new file mode 100644
index 0000000..342b129
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/RuleImpl.java
@@ -0,0 +1,397 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.RuleImpl#getBody <em>Body</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.RuleImpl#getSymParameters <em>Sym Parameters</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.RuleImpl#getLocalVariables <em>Local Variables</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.RuleImpl#getNamespace <em>Namespace</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RuleImpl extends GTASMElementImpl implements Rule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getBody() <em>Body</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getBody()
+   * @generated
+   * @ordered
+   */
+  protected ASMRuleInvocation body;
+
+  /**
+   * The cached value of the '{@link #getSymParameters() <em>Sym Parameters</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSymParameters()
+   * @generated
+   * @ordered
+   */
+  protected EList<SymbolicRuleParameter> symParameters;
+
+  /**
+   * The cached value of the '{@link #getLocalVariables() <em>Local Variables</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getLocalVariables()
+   * @generated
+   * @ordered
+   */
+  protected EList<Variable> localVariables;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return DefinitionsPackage.Literals.RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ASMRuleInvocation getBody()
+  {
+    return body;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetBody(ASMRuleInvocation newBody, NotificationChain msgs)
+  {
+    ASMRuleInvocation oldBody = body;
+    body = newBody;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DefinitionsPackage.RULE__BODY, oldBody, newBody);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setBody(ASMRuleInvocation newBody)
+  {
+    if (newBody != body)
+    {
+      NotificationChain msgs = null;
+      if (body != null)
+        msgs = ((InternalEObject)body).eInverseRemove(this, SimpleRulesPackage.ASM_RULE_INVOCATION__ASM_RULE, ASMRuleInvocation.class, msgs);
+      if (newBody != null)
+        msgs = ((InternalEObject)newBody).eInverseAdd(this, SimpleRulesPackage.ASM_RULE_INVOCATION__ASM_RULE, ASMRuleInvocation.class, msgs);
+      msgs = basicSetBody(newBody, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.RULE__BODY, newBody, newBody));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<SymbolicRuleParameter> getSymParameters()
+  {
+    if (symParameters == null)
+    {
+      symParameters = new EObjectContainmentEList<SymbolicRuleParameter>(SymbolicRuleParameter.class, this, DefinitionsPackage.RULE__SYM_PARAMETERS);
+    }
+    return symParameters;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Variable> getLocalVariables()
+  {
+    if (localVariables == null)
+    {
+      localVariables = new EObjectContainmentEList<Variable>(Variable.class, this, DefinitionsPackage.RULE__LOCAL_VARIABLES);
+    }
+    return localVariables;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Machine getNamespace()
+  {
+    if (eContainerFeatureID() != DefinitionsPackage.RULE__NAMESPACE) return null;
+    return (Machine)eContainer();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetNamespace(Machine newNamespace, NotificationChain msgs)
+  {
+    msgs = eBasicSetContainer((InternalEObject)newNamespace, DefinitionsPackage.RULE__NAMESPACE, msgs);
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setNamespace(Machine newNamespace)
+  {
+    if (newNamespace != eInternalContainer() || (eContainerFeatureID() != DefinitionsPackage.RULE__NAMESPACE && newNamespace != null))
+    {
+      if (EcoreUtil.isAncestor(this, newNamespace))
+        throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+      NotificationChain msgs = null;
+      if (eInternalContainer() != null)
+        msgs = eBasicRemoveFromContainer(msgs);
+      if (newNamespace != null)
+        msgs = ((InternalEObject)newNamespace).eInverseAdd(this, DefinitionsPackage.MACHINE__ASM_RULE_DEFINITIONS, Machine.class, msgs);
+      msgs = basicSetNamespace(newNamespace, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.RULE__NAMESPACE, newNamespace, newNamespace));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.RULE__BODY:
+        if (body != null)
+          msgs = ((InternalEObject)body).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DefinitionsPackage.RULE__BODY, null, msgs);
+        return basicSetBody((ASMRuleInvocation)otherEnd, msgs);
+      case DefinitionsPackage.RULE__NAMESPACE:
+        if (eInternalContainer() != null)
+          msgs = eBasicRemoveFromContainer(msgs);
+        return basicSetNamespace((Machine)otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.RULE__BODY:
+        return basicSetBody(null, msgs);
+      case DefinitionsPackage.RULE__SYM_PARAMETERS:
+        return ((InternalEList<?>)getSymParameters()).basicRemove(otherEnd, msgs);
+      case DefinitionsPackage.RULE__LOCAL_VARIABLES:
+        return ((InternalEList<?>)getLocalVariables()).basicRemove(otherEnd, msgs);
+      case DefinitionsPackage.RULE__NAMESPACE:
+        return basicSetNamespace(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
+  {
+    switch (eContainerFeatureID())
+    {
+      case DefinitionsPackage.RULE__NAMESPACE:
+        return eInternalContainer().eInverseRemove(this, DefinitionsPackage.MACHINE__ASM_RULE_DEFINITIONS, Machine.class, msgs);
+    }
+    return super.eBasicRemoveFromContainerFeature(msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.RULE__BODY:
+        return getBody();
+      case DefinitionsPackage.RULE__SYM_PARAMETERS:
+        return getSymParameters();
+      case DefinitionsPackage.RULE__LOCAL_VARIABLES:
+        return getLocalVariables();
+      case DefinitionsPackage.RULE__NAMESPACE:
+        return getNamespace();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.RULE__BODY:
+        setBody((ASMRuleInvocation)newValue);
+        return;
+      case DefinitionsPackage.RULE__SYM_PARAMETERS:
+        getSymParameters().clear();
+        getSymParameters().addAll((Collection<? extends SymbolicRuleParameter>)newValue);
+        return;
+      case DefinitionsPackage.RULE__LOCAL_VARIABLES:
+        getLocalVariables().clear();
+        getLocalVariables().addAll((Collection<? extends Variable>)newValue);
+        return;
+      case DefinitionsPackage.RULE__NAMESPACE:
+        setNamespace((Machine)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.RULE__BODY:
+        setBody((ASMRuleInvocation)null);
+        return;
+      case DefinitionsPackage.RULE__SYM_PARAMETERS:
+        getSymParameters().clear();
+        return;
+      case DefinitionsPackage.RULE__LOCAL_VARIABLES:
+        getLocalVariables().clear();
+        return;
+      case DefinitionsPackage.RULE__NAMESPACE:
+        setNamespace((Machine)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.RULE__BODY:
+        return body != null;
+      case DefinitionsPackage.RULE__SYM_PARAMETERS:
+        return symParameters != null && !symParameters.isEmpty();
+      case DefinitionsPackage.RULE__LOCAL_VARIABLES:
+        return localVariables != null && !localVariables.isEmpty();
+      case DefinitionsPackage.RULE__NAMESPACE:
+        return getNamespace() != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //RuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/SymbolicRuleParameterImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/SymbolicRuleParameterImpl.java
new file mode 100644
index 0000000..eb6348a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/SymbolicRuleParameterImpl.java
@@ -0,0 +1,263 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DirectionKind;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Symbolic Rule Parameter</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.SymbolicRuleParameterImpl#getVariable <em>Variable</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.SymbolicRuleParameterImpl#getDirection <em>Direction</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class SymbolicRuleParameterImpl extends GTASMElementImpl implements SymbolicRuleParameter
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getVariable() <em>Variable</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getVariable()
+   * @generated
+   * @ordered
+   */
+  protected Variable variable;
+
+  /**
+   * The default value of the '{@link #getDirection() <em>Direction</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getDirection()
+   * @generated
+   * @ordered
+   */
+  protected static final DirectionKind DIRECTION_EDEFAULT = DirectionKind.IN_LITERAL;
+
+  /**
+   * The cached value of the '{@link #getDirection() <em>Direction</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getDirection()
+   * @generated
+   * @ordered
+   */
+  protected DirectionKind direction = DIRECTION_EDEFAULT;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SymbolicRuleParameterImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return DefinitionsPackage.Literals.SYMBOLIC_RULE_PARAMETER;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Variable getVariable()
+  {
+    if (variable != null && variable.eIsProxy())
+    {
+      InternalEObject oldVariable = (InternalEObject)variable;
+      variable = (Variable)eResolveProxy(oldVariable);
+      if (variable != oldVariable)
+      {
+        if (eNotificationRequired())
+          eNotify(new ENotificationImpl(this, Notification.RESOLVE, DefinitionsPackage.SYMBOLIC_RULE_PARAMETER__VARIABLE, oldVariable, variable));
+      }
+    }
+    return variable;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Variable basicGetVariable()
+  {
+    return variable;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setVariable(Variable newVariable)
+  {
+    Variable oldVariable = variable;
+    variable = newVariable;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.SYMBOLIC_RULE_PARAMETER__VARIABLE, oldVariable, variable));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DirectionKind getDirection()
+  {
+    return direction;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setDirection(DirectionKind newDirection)
+  {
+    DirectionKind oldDirection = direction;
+    direction = newDirection == null ? DIRECTION_EDEFAULT : newDirection;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.SYMBOLIC_RULE_PARAMETER__DIRECTION, oldDirection, direction));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.SYMBOLIC_RULE_PARAMETER__VARIABLE:
+        if (resolve) return getVariable();
+        return basicGetVariable();
+      case DefinitionsPackage.SYMBOLIC_RULE_PARAMETER__DIRECTION:
+        return getDirection();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.SYMBOLIC_RULE_PARAMETER__VARIABLE:
+        setVariable((Variable)newValue);
+        return;
+      case DefinitionsPackage.SYMBOLIC_RULE_PARAMETER__DIRECTION:
+        setDirection((DirectionKind)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.SYMBOLIC_RULE_PARAMETER__VARIABLE:
+        setVariable((Variable)null);
+        return;
+      case DefinitionsPackage.SYMBOLIC_RULE_PARAMETER__DIRECTION:
+        setDirection(DIRECTION_EDEFAULT);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.SYMBOLIC_RULE_PARAMETER__VARIABLE:
+        return variable != null;
+      case DefinitionsPackage.SYMBOLIC_RULE_PARAMETER__DIRECTION:
+        return direction != DIRECTION_EDEFAULT;
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (direction: ");
+    result.append(direction);
+    result.append(')');
+    return result.toString();
+  }
+
+} //SymbolicRuleParameterImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/TransformationImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/TransformationImpl.java
new file mode 100644
index 0000000..afd04e1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/TransformationImpl.java
@@ -0,0 +1,183 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Transformation;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Transformation</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.TransformationImpl#getModules <em>Modules</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TransformationImpl extends GTASMElementImpl implements Transformation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getModules() <em>Modules</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getModules()
+   * @generated
+   * @ordered
+   */
+  protected EList<Module> modules;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected TransformationImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return DefinitionsPackage.Literals.TRANSFORMATION;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Module> getModules()
+  {
+    if (modules == null)
+    {
+      modules = new EObjectContainmentEList<Module>(Module.class, this, DefinitionsPackage.TRANSFORMATION__MODULES);
+    }
+    return modules;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.TRANSFORMATION__MODULES:
+        return ((InternalEList<?>)getModules()).basicRemove(otherEnd, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.TRANSFORMATION__MODULES:
+        return getModules();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.TRANSFORMATION__MODULES:
+        getModules().clear();
+        getModules().addAll((Collection<? extends Module>)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.TRANSFORMATION__MODULES:
+        getModules().clear();
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.TRANSFORMATION__MODULES:
+        return modules != null && !modules.isEmpty();
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //TransformationImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/TypeConstantImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/TypeConstantImpl.java
new file mode 100644
index 0000000..2c63244
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/TypeConstantImpl.java
@@ -0,0 +1,196 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Constant</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.TypeConstantImpl#getKind <em>Kind</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeConstantImpl extends GTASMElementImpl implements TypeConstant
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The default value of the '{@link #getKind() <em>Kind</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getKind()
+   * @generated
+   * @ordered
+   */
+  protected static final ValueKind KIND_EDEFAULT = ValueKind.UNDEF_LITERAL;
+
+  /**
+   * The cached value of the '{@link #getKind() <em>Kind</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getKind()
+   * @generated
+   * @ordered
+   */
+  protected ValueKind kind = KIND_EDEFAULT;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected TypeConstantImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return DefinitionsPackage.Literals.TYPE_CONSTANT;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ValueKind getKind()
+  {
+    return kind;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setKind(ValueKind newKind)
+  {
+    ValueKind oldKind = kind;
+    kind = newKind == null ? KIND_EDEFAULT : newKind;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.TYPE_CONSTANT__KIND, oldKind, kind));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.TYPE_CONSTANT__KIND:
+        return getKind();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.TYPE_CONSTANT__KIND:
+        setKind((ValueKind)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.TYPE_CONSTANT__KIND:
+        setKind(KIND_EDEFAULT);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.TYPE_CONSTANT__KIND:
+        return kind != KIND_EDEFAULT;
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (kind: ");
+    result.append(kind);
+    result.append(')');
+    return result.toString();
+  }
+
+} //TypeConstantImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/VariableDefinitionImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/VariableDefinitionImpl.java
new file mode 100644
index 0000000..4f95ed6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/VariableDefinitionImpl.java
@@ -0,0 +1,278 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Variable Definition</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.VariableDefinitionImpl#getVariable <em>Variable</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.VariableDefinitionImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class VariableDefinitionImpl extends GTASMElementImpl implements VariableDefinition
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getVariable() <em>Variable</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getVariable()
+   * @generated
+   * @ordered
+   */
+  protected Variable variable;
+
+  /**
+   * The cached value of the '{@link #getValue() <em>Value</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getValue()
+   * @generated
+   * @ordered
+   */
+  protected Term value;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected VariableDefinitionImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return DefinitionsPackage.Literals.VARIABLE_DEFINITION;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Variable getVariable()
+  {
+    if (variable != null && variable.eIsProxy())
+    {
+      InternalEObject oldVariable = (InternalEObject)variable;
+      variable = (Variable)eResolveProxy(oldVariable);
+      if (variable != oldVariable)
+      {
+        if (eNotificationRequired())
+          eNotify(new ENotificationImpl(this, Notification.RESOLVE, DefinitionsPackage.VARIABLE_DEFINITION__VARIABLE, oldVariable, variable));
+      }
+    }
+    return variable;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Variable basicGetVariable()
+  {
+    return variable;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setVariable(Variable newVariable)
+  {
+    Variable oldVariable = variable;
+    variable = newVariable;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.VARIABLE_DEFINITION__VARIABLE, oldVariable, variable));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getValue()
+  {
+    return value;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetValue(Term newValue, NotificationChain msgs)
+  {
+    Term oldValue = value;
+    value = newValue;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DefinitionsPackage.VARIABLE_DEFINITION__VALUE, oldValue, newValue);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setValue(Term newValue)
+  {
+    if (newValue != value)
+    {
+      NotificationChain msgs = null;
+      if (value != null)
+        msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DefinitionsPackage.VARIABLE_DEFINITION__VALUE, null, msgs);
+      if (newValue != null)
+        msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DefinitionsPackage.VARIABLE_DEFINITION__VALUE, null, msgs);
+      msgs = basicSetValue(newValue, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.VARIABLE_DEFINITION__VALUE, newValue, newValue));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.VARIABLE_DEFINITION__VALUE:
+        return basicSetValue(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.VARIABLE_DEFINITION__VARIABLE:
+        if (resolve) return getVariable();
+        return basicGetVariable();
+      case DefinitionsPackage.VARIABLE_DEFINITION__VALUE:
+        return getValue();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.VARIABLE_DEFINITION__VARIABLE:
+        setVariable((Variable)newValue);
+        return;
+      case DefinitionsPackage.VARIABLE_DEFINITION__VALUE:
+        setValue((Term)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.VARIABLE_DEFINITION__VARIABLE:
+        setVariable((Variable)null);
+        return;
+      case DefinitionsPackage.VARIABLE_DEFINITION__VALUE:
+        setValue((Term)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.VARIABLE_DEFINITION__VARIABLE:
+        return variable != null;
+      case DefinitionsPackage.VARIABLE_DEFINITION__VALUE:
+        return value != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //VariableDefinitionImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/VariableImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/VariableImpl.java
new file mode 100644
index 0000000..6015709
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/impl/VariableImpl.java
@@ -0,0 +1,359 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.BlockRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Variable</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.VariableImpl#getReferences <em>References</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.VariableImpl#getScope <em>Scope</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.VariableImpl#getVariableType <em>Variable Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class VariableImpl extends GTASMElementImpl implements Variable
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getReferences() <em>References</em>}' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getReferences()
+   * @generated
+   * @ordered
+   */
+  protected EList<VariableReference> references;
+
+  /**
+   * The cached value of the '{@link #getVariableType() <em>Variable Type</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getVariableType()
+   * @generated
+   * @ordered
+   */
+  protected TypeConstant variableType;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected VariableImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return DefinitionsPackage.Literals.VARIABLE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<VariableReference> getReferences()
+  {
+    if (references == null)
+    {
+      references = new EObjectWithInverseResolvingEList<VariableReference>(VariableReference.class, this, DefinitionsPackage.VARIABLE__REFERENCES, TermsPackage.VARIABLE_REFERENCE__VARIABLE);
+    }
+    return references;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public BlockRule getScope()
+  {
+    if (eContainerFeatureID() != DefinitionsPackage.VARIABLE__SCOPE) return null;
+    return (BlockRule)eContainer();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetScope(BlockRule newScope, NotificationChain msgs)
+  {
+    msgs = eBasicSetContainer((InternalEObject)newScope, DefinitionsPackage.VARIABLE__SCOPE, msgs);
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setScope(BlockRule newScope)
+  {
+    if (newScope != eInternalContainer() || (eContainerFeatureID() != DefinitionsPackage.VARIABLE__SCOPE && newScope != null))
+    {
+      if (EcoreUtil.isAncestor(this, newScope))
+        throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+      NotificationChain msgs = null;
+      if (eInternalContainer() != null)
+        msgs = eBasicRemoveFromContainer(msgs);
+      if (newScope != null)
+        msgs = ((InternalEObject)newScope).eInverseAdd(this, CompoundRulesPackage.BLOCK_RULE__LOCAL_VARIABLES, BlockRule.class, msgs);
+      msgs = basicSetScope(newScope, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.VARIABLE__SCOPE, newScope, newScope));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public TypeConstant getVariableType()
+  {
+    return variableType;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetVariableType(TypeConstant newVariableType, NotificationChain msgs)
+  {
+    TypeConstant oldVariableType = variableType;
+    variableType = newVariableType;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DefinitionsPackage.VARIABLE__VARIABLE_TYPE, oldVariableType, newVariableType);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setVariableType(TypeConstant newVariableType)
+  {
+    if (newVariableType != variableType)
+    {
+      NotificationChain msgs = null;
+      if (variableType != null)
+        msgs = ((InternalEObject)variableType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DefinitionsPackage.VARIABLE__VARIABLE_TYPE, null, msgs);
+      if (newVariableType != null)
+        msgs = ((InternalEObject)newVariableType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DefinitionsPackage.VARIABLE__VARIABLE_TYPE, null, msgs);
+      msgs = basicSetVariableType(newVariableType, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DefinitionsPackage.VARIABLE__VARIABLE_TYPE, newVariableType, newVariableType));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.VARIABLE__REFERENCES:
+        return ((InternalEList<InternalEObject>)(InternalEList<?>)getReferences()).basicAdd(otherEnd, msgs);
+      case DefinitionsPackage.VARIABLE__SCOPE:
+        if (eInternalContainer() != null)
+          msgs = eBasicRemoveFromContainer(msgs);
+        return basicSetScope((BlockRule)otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.VARIABLE__REFERENCES:
+        return ((InternalEList<?>)getReferences()).basicRemove(otherEnd, msgs);
+      case DefinitionsPackage.VARIABLE__SCOPE:
+        return basicSetScope(null, msgs);
+      case DefinitionsPackage.VARIABLE__VARIABLE_TYPE:
+        return basicSetVariableType(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
+  {
+    switch (eContainerFeatureID())
+    {
+      case DefinitionsPackage.VARIABLE__SCOPE:
+        return eInternalContainer().eInverseRemove(this, CompoundRulesPackage.BLOCK_RULE__LOCAL_VARIABLES, BlockRule.class, msgs);
+    }
+    return super.eBasicRemoveFromContainerFeature(msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.VARIABLE__REFERENCES:
+        return getReferences();
+      case DefinitionsPackage.VARIABLE__SCOPE:
+        return getScope();
+      case DefinitionsPackage.VARIABLE__VARIABLE_TYPE:
+        return getVariableType();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.VARIABLE__REFERENCES:
+        getReferences().clear();
+        getReferences().addAll((Collection<? extends VariableReference>)newValue);
+        return;
+      case DefinitionsPackage.VARIABLE__SCOPE:
+        setScope((BlockRule)newValue);
+        return;
+      case DefinitionsPackage.VARIABLE__VARIABLE_TYPE:
+        setVariableType((TypeConstant)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.VARIABLE__REFERENCES:
+        getReferences().clear();
+        return;
+      case DefinitionsPackage.VARIABLE__SCOPE:
+        setScope((BlockRule)null);
+        return;
+      case DefinitionsPackage.VARIABLE__VARIABLE_TYPE:
+        setVariableType((TypeConstant)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case DefinitionsPackage.VARIABLE__REFERENCES:
+        return references != null && !references.isEmpty();
+      case DefinitionsPackage.VARIABLE__SCOPE:
+        return getScope() != null;
+      case DefinitionsPackage.VARIABLE__VARIABLE_TYPE:
+        return variableType != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //VariableImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/util/DefinitionsAdapterFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/util/DefinitionsAdapterFactory.java
new file mode 100644
index 0000000..273400d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/util/DefinitionsAdapterFactory.java
@@ -0,0 +1,473 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.*;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternContainer;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage
+ * @generated
+ */
+public class DefinitionsAdapterFactory extends AdapterFactoryImpl
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static DefinitionsPackage modelPackage;
+
+  /**
+   * Creates an instance of the adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DefinitionsAdapterFactory()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = DefinitionsPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Returns whether this factory is applicable for the type of the object.
+   * <!-- begin-user-doc -->
+   * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+   * <!-- end-user-doc -->
+   * @return whether this factory is applicable for the type of the object.
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object object)
+  {
+    if (object == modelPackage)
+    {
+      return true;
+    }
+    if (object instanceof EObject)
+    {
+      return ((EObject)object).eClass().getEPackage() == modelPackage;
+    }
+    return false;
+  }
+
+  /**
+   * The switch that delegates to the <code>createXXX</code> methods.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected DefinitionsSwitch<Adapter> modelSwitch =
+    new DefinitionsSwitch<Adapter>()
+    {
+      @Override
+      public Adapter caseMachine(Machine object)
+      {
+        return createMachineAdapter();
+      }
+      @Override
+      public Adapter caseRule(Rule object)
+      {
+        return createRuleAdapter();
+      }
+      @Override
+      public Adapter caseVariable(Variable object)
+      {
+        return createVariableAdapter();
+      }
+      @Override
+      public Adapter caseVariableDefinition(VariableDefinition object)
+      {
+        return createVariableDefinitionAdapter();
+      }
+      @Override
+      public Adapter caseASMFunction(ASMFunction object)
+      {
+        return createASMFunctionAdapter();
+      }
+      @Override
+      public Adapter caseFunctionDefinition(FunctionDefinition object)
+      {
+        return createFunctionDefinitionAdapter();
+      }
+      @Override
+      public Adapter caseInitialValue(InitialValue object)
+      {
+        return createInitialValueAdapter();
+      }
+      @Override
+      public Adapter caseSymbolicRuleParameter(SymbolicRuleParameter object)
+      {
+        return createSymbolicRuleParameterAdapter();
+      }
+      @Override
+      public Adapter caseModule(Module object)
+      {
+        return createModuleAdapter();
+      }
+      @Override
+      public Adapter caseImportDeclaration(ImportDeclaration object)
+      {
+        return createImportDeclarationAdapter();
+      }
+      @Override
+      public Adapter caseNamespaceDefinition(NamespaceDefinition object)
+      {
+        return createNamespaceDefinitionAdapter();
+      }
+      @Override
+      public Adapter caseTransformation(Transformation object)
+      {
+        return createTransformationAdapter();
+      }
+      @Override
+      public Adapter caseTypeConstant(TypeConstant object)
+      {
+        return createTypeConstantAdapter();
+      }
+      @Override
+      public Adapter caseChangeEvent(ChangeEvent object)
+      {
+        return createChangeEventAdapter();
+      }
+      @Override
+      public Adapter caseAnnotatedElement(AnnotatedElement object)
+      {
+        return createAnnotatedElementAdapter();
+      }
+      @Override
+      public Adapter caseGTASMElement(GTASMElement object)
+      {
+        return createGTASMElementAdapter();
+      }
+      @Override
+      public Adapter casePatternContainer(PatternContainer object)
+      {
+        return createPatternContainerAdapter();
+      }
+      @Override
+      public Adapter defaultCase(EObject object)
+      {
+        return createEObjectAdapter();
+      }
+    };
+
+  /**
+   * Creates an adapter for the <code>target</code>.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param target the object to adapt.
+   * @return the adapter for the <code>target</code>.
+   * @generated
+   */
+  @Override
+  public Adapter createAdapter(Notifier target)
+  {
+    return modelSwitch.doSwitch((EObject)target);
+  }
+
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine <em>Machine</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine
+   * @generated
+   */
+  public Adapter createMachineAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule <em>Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule
+   * @generated
+   */
+  public Adapter createRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable <em>Variable</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable
+   * @generated
+   */
+  public Adapter createVariableAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition <em>Variable Definition</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition
+   * @generated
+   */
+  public Adapter createVariableDefinitionAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction <em>ASM Function</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction
+   * @generated
+   */
+  public Adapter createASMFunctionAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.FunctionDefinition <em>Function Definition</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.FunctionDefinition
+   * @generated
+   */
+  public Adapter createFunctionDefinitionAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue <em>Initial Value</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue
+   * @generated
+   */
+  public Adapter createInitialValueAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter <em>Symbolic Rule Parameter</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter
+   * @generated
+   */
+  public Adapter createSymbolicRuleParameterAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module <em>Module</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module
+   * @generated
+   */
+  public Adapter createModuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ImportDeclaration <em>Import Declaration</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ImportDeclaration
+   * @generated
+   */
+  public Adapter createImportDeclarationAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.NamespaceDefinition <em>Namespace Definition</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.NamespaceDefinition
+   * @generated
+   */
+  public Adapter createNamespaceDefinitionAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Transformation <em>Transformation</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Transformation
+   * @generated
+   */
+  public Adapter createTransformationAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant <em>Type Constant</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant
+   * @generated
+   */
+  public Adapter createTypeConstantAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent <em>Change Event</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent
+   * @generated
+   */
+  public Adapter createChangeEventAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement <em>Annotated Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement
+   * @generated
+   */
+  public Adapter createAnnotatedElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement <em>GTASM Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement
+   * @generated
+   */
+  public Adapter createGTASMElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternContainer <em>Pattern Container</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternContainer
+   * @generated
+   */
+  public Adapter createPatternContainerAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for the default case.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @generated
+   */
+  public Adapter createEObjectAdapter()
+  {
+    return null;
+  }
+
+} //DefinitionsAdapterFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/util/DefinitionsSwitch.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/util/DefinitionsSwitch.java
new file mode 100644
index 0000000..63cf125
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/definitions/util/DefinitionsSwitch.java
@@ -0,0 +1,536 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.*;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternContainer;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage
+ * @generated
+ */
+public class DefinitionsSwitch<T>
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static DefinitionsPackage modelPackage;
+
+  /**
+   * Creates an instance of the switch.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DefinitionsSwitch()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = DefinitionsPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  public T doSwitch(EObject theEObject)
+  {
+    return doSwitch(theEObject.eClass(), theEObject);
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(EClass theEClass, EObject theEObject)
+  {
+    if (theEClass.eContainer() == modelPackage)
+    {
+      return doSwitch(theEClass.getClassifierID(), theEObject);
+    }
+    else
+    {
+      List<EClass> eSuperTypes = theEClass.getESuperTypes();
+      return
+        eSuperTypes.isEmpty() ?
+          defaultCase(theEObject) :
+          doSwitch(eSuperTypes.get(0), theEObject);
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(int classifierID, EObject theEObject)
+  {
+    switch (classifierID)
+    {
+      case DefinitionsPackage.MACHINE:
+      {
+        Machine machine = (Machine)theEObject;
+        T result = caseMachine(machine);
+        if (result == null) result = casePatternContainer(machine);
+        if (result == null) result = caseGTASMElement(machine);
+        if (result == null) result = caseAnnotatedElement(machine);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case DefinitionsPackage.RULE:
+      {
+        Rule rule = (Rule)theEObject;
+        T result = caseRule(rule);
+        if (result == null) result = caseGTASMElement(rule);
+        if (result == null) result = caseAnnotatedElement(rule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case DefinitionsPackage.VARIABLE:
+      {
+        Variable variable = (Variable)theEObject;
+        T result = caseVariable(variable);
+        if (result == null) result = caseGTASMElement(variable);
+        if (result == null) result = caseAnnotatedElement(variable);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case DefinitionsPackage.VARIABLE_DEFINITION:
+      {
+        VariableDefinition variableDefinition = (VariableDefinition)theEObject;
+        T result = caseVariableDefinition(variableDefinition);
+        if (result == null) result = caseGTASMElement(variableDefinition);
+        if (result == null) result = caseAnnotatedElement(variableDefinition);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case DefinitionsPackage.ASM_FUNCTION:
+      {
+        ASMFunction asmFunction = (ASMFunction)theEObject;
+        T result = caseASMFunction(asmFunction);
+        if (result == null) result = caseFunctionDefinition(asmFunction);
+        if (result == null) result = caseGTASMElement(asmFunction);
+        if (result == null) result = caseAnnotatedElement(asmFunction);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case DefinitionsPackage.FUNCTION_DEFINITION:
+      {
+        FunctionDefinition functionDefinition = (FunctionDefinition)theEObject;
+        T result = caseFunctionDefinition(functionDefinition);
+        if (result == null) result = caseGTASMElement(functionDefinition);
+        if (result == null) result = caseAnnotatedElement(functionDefinition);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case DefinitionsPackage.INITIAL_VALUE:
+      {
+        InitialValue initialValue = (InitialValue)theEObject;
+        T result = caseInitialValue(initialValue);
+        if (result == null) result = caseGTASMElement(initialValue);
+        if (result == null) result = caseAnnotatedElement(initialValue);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case DefinitionsPackage.SYMBOLIC_RULE_PARAMETER:
+      {
+        SymbolicRuleParameter symbolicRuleParameter = (SymbolicRuleParameter)theEObject;
+        T result = caseSymbolicRuleParameter(symbolicRuleParameter);
+        if (result == null) result = caseGTASMElement(symbolicRuleParameter);
+        if (result == null) result = caseAnnotatedElement(symbolicRuleParameter);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case DefinitionsPackage.MODULE:
+      {
+        Module module = (Module)theEObject;
+        T result = caseModule(module);
+        if (result == null) result = caseGTASMElement(module);
+        if (result == null) result = caseAnnotatedElement(module);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case DefinitionsPackage.IMPORT_DECLARATION:
+      {
+        ImportDeclaration importDeclaration = (ImportDeclaration)theEObject;
+        T result = caseImportDeclaration(importDeclaration);
+        if (result == null) result = caseGTASMElement(importDeclaration);
+        if (result == null) result = caseAnnotatedElement(importDeclaration);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case DefinitionsPackage.NAMESPACE_DEFINITION:
+      {
+        NamespaceDefinition namespaceDefinition = (NamespaceDefinition)theEObject;
+        T result = caseNamespaceDefinition(namespaceDefinition);
+        if (result == null) result = caseGTASMElement(namespaceDefinition);
+        if (result == null) result = caseAnnotatedElement(namespaceDefinition);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case DefinitionsPackage.TRANSFORMATION:
+      {
+        Transformation transformation = (Transformation)theEObject;
+        T result = caseTransformation(transformation);
+        if (result == null) result = caseGTASMElement(transformation);
+        if (result == null) result = caseAnnotatedElement(transformation);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case DefinitionsPackage.TYPE_CONSTANT:
+      {
+        TypeConstant typeConstant = (TypeConstant)theEObject;
+        T result = caseTypeConstant(typeConstant);
+        if (result == null) result = caseGTASMElement(typeConstant);
+        if (result == null) result = caseAnnotatedElement(typeConstant);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case DefinitionsPackage.CHANGE_EVENT:
+      {
+        ChangeEvent changeEvent = (ChangeEvent)theEObject;
+        T result = caseChangeEvent(changeEvent);
+        if (result == null) result = caseGTASMElement(changeEvent);
+        if (result == null) result = caseAnnotatedElement(changeEvent);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      default: return defaultCase(theEObject);
+    }
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Machine</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Machine</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseMachine(Machine object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseRule(Rule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Variable</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Variable</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseVariable(Variable object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Variable Definition</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Variable Definition</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseVariableDefinition(VariableDefinition object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>ASM Function</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>ASM Function</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseASMFunction(ASMFunction object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Function Definition</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Function Definition</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseFunctionDefinition(FunctionDefinition object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Initial Value</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Initial Value</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseInitialValue(InitialValue object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Symbolic Rule Parameter</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Symbolic Rule Parameter</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseSymbolicRuleParameter(SymbolicRuleParameter object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Module</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Module</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseModule(Module object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Import Declaration</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Import Declaration</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseImportDeclaration(ImportDeclaration object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Namespace Definition</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Namespace Definition</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseNamespaceDefinition(NamespaceDefinition object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Transformation</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Transformation</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseTransformation(Transformation object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Type Constant</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Type Constant</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseTypeConstant(TypeConstant object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Change Event</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Change Event</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseChangeEvent(ChangeEvent object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseAnnotatedElement(AnnotatedElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGTASMElement(GTASMElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Pattern Container</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Pattern Container</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T casePatternContainer(PatternContainer object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch, but this is the last case anyway.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+   * @generated
+   */
+  public T defaultCase(EObject object)
+  {
+    return null;
+  }
+
+} //DefinitionsSwitch
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/ChangeKind.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/ChangeKind.java
new file mode 100644
index 0000000..8844f6f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/ChangeKind.java
@@ -0,0 +1,266 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Change Kind</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage#getChangeKind()
+ * @model
+ * @generated
+ */
+public enum ChangeKind implements Enumerator
+{
+  /**
+   * The '<em><b>New</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #NEW_VALUE
+   * @generated
+   * @ordered
+   */
+  NEW(0, "new", "new"),
+
+  /**
+   * The '<em><b>Delete</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #DELETE_VALUE
+   * @generated
+   * @ordered
+   */
+  DELETE(1, "delete", "delete"),
+
+  /**
+   * The '<em><b>Changed</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #CHANGED_VALUE
+   * @generated
+   * @ordered
+   */
+  CHANGED(2, "changed", "changed");
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The '<em><b>New</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>New</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #NEW
+   * @model name="new"
+   * @generated
+   * @ordered
+   */
+  public static final int NEW_VALUE = 0;
+
+  /**
+   * The '<em><b>Delete</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Delete</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #DELETE
+   * @model name="delete"
+   * @generated
+   * @ordered
+   */
+  public static final int DELETE_VALUE = 1;
+
+  /**
+   * The '<em><b>Changed</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Changed</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #CHANGED
+   * @model name="changed"
+   * @generated
+   * @ordered
+   */
+  public static final int CHANGED_VALUE = 2;
+
+  /**
+   * An array of all the '<em><b>Change Kind</b></em>' enumerators.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static final ChangeKind[] VALUES_ARRAY =
+    new ChangeKind[]
+    {
+      NEW,
+      DELETE,
+      CHANGED,
+    };
+
+  /**
+   * A public read-only list of all the '<em><b>Change Kind</b></em>' enumerators.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final List<ChangeKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+  /**
+   * Returns the '<em><b>Change Kind</b></em>' literal with the specified literal value.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static ChangeKind get(String literal)
+  {
+    for (int i = 0; i < VALUES_ARRAY.length; ++i)
+    {
+      ChangeKind result = VALUES_ARRAY[i];
+      if (result.toString().equals(literal))
+      {
+        return result;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Returns the '<em><b>Change Kind</b></em>' literal with the specified name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static ChangeKind getByName(String name)
+  {
+    for (int i = 0; i < VALUES_ARRAY.length; ++i)
+    {
+      ChangeKind result = VALUES_ARRAY[i];
+      if (result.getName().equals(name))
+      {
+        return result;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Returns the '<em><b>Change Kind</b></em>' literal with the specified integer value.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static ChangeKind get(int value)
+  {
+    switch (value)
+    {
+      case NEW_VALUE: return NEW;
+      case DELETE_VALUE: return DELETE;
+      case CHANGED_VALUE: return CHANGED;
+    }
+    return null;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final int value;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final String name;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final String literal;
+
+  /**
+   * Only this class can construct instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private ChangeKind(int value, String name, String literal)
+  {
+    this.value = value;
+    this.name = name;
+    this.literal = literal;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public int getValue()
+  {
+    return value;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getName()
+  {
+    return name;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getLiteral()
+  {
+    return literal;
+  }
+
+  /**
+   * Returns the literal value of the enumerator, which is its string representation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    return literal;
+  }
+  
+} //ChangeKind
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/ContainmentMode.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/ContainmentMode.java
new file mode 100644
index 0000000..db28463
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/ContainmentMode.java
@@ -0,0 +1,239 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Containment Mode</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage#getContainmentMode()
+ * @model
+ * @generated
+ */
+public enum ContainmentMode implements Enumerator
+{
+  /**
+   * The '<em><b>In</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #IN
+   * @generated
+   * @ordered
+   */
+  IN_LITERAL(0, "in", "in"),
+
+  /**
+   * The '<em><b>Below</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #BELOW
+   * @generated
+   * @ordered
+   */
+  BELOW_LITERAL(1, "below", "below");
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The '<em><b>In</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>In</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #IN_LITERAL
+   * @model name="in"
+   * @generated
+   * @ordered
+   */
+  public static final int IN = 0;
+
+  /**
+   * The '<em><b>Below</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Below</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #BELOW_LITERAL
+   * @model name="below"
+   * @generated
+   * @ordered
+   */
+  public static final int BELOW = 1;
+
+  /**
+   * An array of all the '<em><b>Containment Mode</b></em>' enumerators.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static final ContainmentMode[] VALUES_ARRAY =
+    new ContainmentMode[]
+    {
+      IN_LITERAL,
+      BELOW_LITERAL,
+    };
+
+  /**
+   * A public read-only list of all the '<em><b>Containment Mode</b></em>' enumerators.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final List<ContainmentMode> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+  /**
+   * Returns the '<em><b>Containment Mode</b></em>' literal with the specified literal value.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static ContainmentMode get(String literal)
+  {
+    for (int i = 0; i < VALUES_ARRAY.length; ++i)
+    {
+      ContainmentMode result = VALUES_ARRAY[i];
+      if (result.toString().equals(literal))
+      {
+        return result;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Returns the '<em><b>Containment Mode</b></em>' literal with the specified name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static ContainmentMode getByName(String name)
+  {
+    for (int i = 0; i < VALUES_ARRAY.length; ++i)
+    {
+      ContainmentMode result = VALUES_ARRAY[i];
+      if (result.getName().equals(name))
+      {
+        return result;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Returns the '<em><b>Containment Mode</b></em>' literal with the specified integer value.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static ContainmentMode get(int value)
+  {
+    switch (value)
+    {
+      case IN: return IN_LITERAL;
+      case BELOW: return BELOW_LITERAL;
+    }
+    return null;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final int value;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final String name;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final String literal;
+
+  /**
+   * Only this class can construct instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private ContainmentMode(int value, String name, String literal)
+  {
+    this.value = value;
+    this.name = name;
+    this.literal = literal;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public int getValue()
+  {
+    return value;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getName()
+  {
+    return name;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getLiteral()
+  {
+    return literal;
+  }
+
+  /**
+   * Returns the literal value of the enumerator, which is its string representation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    return literal;
+  }
+  
+} //ContainmentMode
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/CopySemantics.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/CopySemantics.java
new file mode 100644
index 0000000..2a43dc0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/CopySemantics.java
@@ -0,0 +1,239 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Copy Semantics</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage#getCopySemantics()
+ * @model
+ * @generated
+ */
+public enum CopySemantics implements Enumerator
+{
+  /**
+   * The '<em><b>Drop Outer Edges</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #DROP_OUTER_EDGES
+   * @generated
+   * @ordered
+   */
+  DROP_OUTER_EDGES_LITERAL(0, "dropOuterEdges", "dropOuterEdges"),
+
+  /**
+   * The '<em><b>Copy Outer Edges</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #COPY_OUTER_EDGES
+   * @generated
+   * @ordered
+   */
+  COPY_OUTER_EDGES_LITERAL(1, "copyOuterEdges", "copyOuterEdges");
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The '<em><b>Drop Outer Edges</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Drop Outer Edges</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #DROP_OUTER_EDGES_LITERAL
+   * @model name="dropOuterEdges"
+   * @generated
+   * @ordered
+   */
+  public static final int DROP_OUTER_EDGES = 0;
+
+  /**
+   * The '<em><b>Copy Outer Edges</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Copy Outer Edges</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #COPY_OUTER_EDGES_LITERAL
+   * @model name="copyOuterEdges"
+   * @generated
+   * @ordered
+   */
+  public static final int COPY_OUTER_EDGES = 1;
+
+  /**
+   * An array of all the '<em><b>Copy Semantics</b></em>' enumerators.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static final CopySemantics[] VALUES_ARRAY =
+    new CopySemantics[]
+    {
+      DROP_OUTER_EDGES_LITERAL,
+      COPY_OUTER_EDGES_LITERAL,
+    };
+
+  /**
+   * A public read-only list of all the '<em><b>Copy Semantics</b></em>' enumerators.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final List<CopySemantics> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+  /**
+   * Returns the '<em><b>Copy Semantics</b></em>' literal with the specified literal value.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static CopySemantics get(String literal)
+  {
+    for (int i = 0; i < VALUES_ARRAY.length; ++i)
+    {
+      CopySemantics result = VALUES_ARRAY[i];
+      if (result.toString().equals(literal))
+      {
+        return result;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Returns the '<em><b>Copy Semantics</b></em>' literal with the specified name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static CopySemantics getByName(String name)
+  {
+    for (int i = 0; i < VALUES_ARRAY.length; ++i)
+    {
+      CopySemantics result = VALUES_ARRAY[i];
+      if (result.getName().equals(name))
+      {
+        return result;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Returns the '<em><b>Copy Semantics</b></em>' literal with the specified integer value.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static CopySemantics get(int value)
+  {
+    switch (value)
+    {
+      case DROP_OUTER_EDGES: return DROP_OUTER_EDGES_LITERAL;
+      case COPY_OUTER_EDGES: return COPY_OUTER_EDGES_LITERAL;
+    }
+    return null;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final int value;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final String name;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final String literal;
+
+  /**
+   * Only this class can construct instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private CopySemantics(int value, String name, String literal)
+  {
+    this.value = value;
+    this.name = name;
+    this.literal = literal;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public int getValue()
+  {
+    return value;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getName()
+  {
+    return name;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getLiteral()
+  {
+    return literal;
+  }
+
+  /**
+   * Returns the literal value of the enumerator, which is its string representation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    return literal;
+  }
+  
+} //CopySemantics
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/DeleteSemantics.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/DeleteSemantics.java
new file mode 100644
index 0000000..9387c88
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/DeleteSemantics.java
@@ -0,0 +1,239 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Delete Semantics</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage#getDeleteSemantics()
+ * @model
+ * @generated
+ */
+public enum DeleteSemantics implements Enumerator
+{
+  /**
+   * The '<em><b>Drop Content</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #DROP_CONTENT
+   * @generated
+   * @ordered
+   */
+  DROP_CONTENT_LITERAL(0, "dropContent", "dropContent"),
+
+  /**
+   * The '<em><b>Move Content</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #MOVE_CONTENT
+   * @generated
+   * @ordered
+   */
+  MOVE_CONTENT_LITERAL(1, "moveContent", "moveContent");
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The '<em><b>Drop Content</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Drop Content</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #DROP_CONTENT_LITERAL
+   * @model name="dropContent"
+   * @generated
+   * @ordered
+   */
+  public static final int DROP_CONTENT = 0;
+
+  /**
+   * The '<em><b>Move Content</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Move Content</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #MOVE_CONTENT_LITERAL
+   * @model name="moveContent"
+   * @generated
+   * @ordered
+   */
+  public static final int MOVE_CONTENT = 1;
+
+  /**
+   * An array of all the '<em><b>Delete Semantics</b></em>' enumerators.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static final DeleteSemantics[] VALUES_ARRAY =
+    new DeleteSemantics[]
+    {
+      DROP_CONTENT_LITERAL,
+      MOVE_CONTENT_LITERAL,
+    };
+
+  /**
+   * A public read-only list of all the '<em><b>Delete Semantics</b></em>' enumerators.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final List<DeleteSemantics> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+  /**
+   * Returns the '<em><b>Delete Semantics</b></em>' literal with the specified literal value.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static DeleteSemantics get(String literal)
+  {
+    for (int i = 0; i < VALUES_ARRAY.length; ++i)
+    {
+      DeleteSemantics result = VALUES_ARRAY[i];
+      if (result.toString().equals(literal))
+      {
+        return result;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Returns the '<em><b>Delete Semantics</b></em>' literal with the specified name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static DeleteSemantics getByName(String name)
+  {
+    for (int i = 0; i < VALUES_ARRAY.length; ++i)
+    {
+      DeleteSemantics result = VALUES_ARRAY[i];
+      if (result.getName().equals(name))
+      {
+        return result;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Returns the '<em><b>Delete Semantics</b></em>' literal with the specified integer value.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static DeleteSemantics get(int value)
+  {
+    switch (value)
+    {
+      case DROP_CONTENT: return DROP_CONTENT_LITERAL;
+      case MOVE_CONTENT: return MOVE_CONTENT_LITERAL;
+    }
+    return null;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final int value;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final String name;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final String literal;
+
+  /**
+   * Only this class can construct instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private DeleteSemantics(int value, String name, String literal)
+  {
+    this.value = value;
+    this.name = name;
+    this.literal = literal;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public int getValue()
+  {
+    return value;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getName()
+  {
+    return name;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getLiteral()
+  {
+    return literal;
+  }
+
+  /**
+   * Returns the literal value of the enumerator, which is its string representation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    return literal;
+  }
+  
+} //DeleteSemantics
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/DirectionKind.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/DirectionKind.java
new file mode 100644
index 0000000..ef7f39d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/DirectionKind.java
@@ -0,0 +1,266 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Direction Kind</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage#getDirectionKind()
+ * @model
+ * @generated
+ */
+public enum DirectionKind implements Enumerator
+{
+  /**
+   * The '<em><b>In</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #IN
+   * @generated
+   * @ordered
+   */
+  IN_LITERAL(0, "in", "in"),
+
+  /**
+   * The '<em><b>Inout</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #INOUT
+   * @generated
+   * @ordered
+   */
+  INOUT_LITERAL(1, "inout", "inout"),
+
+  /**
+   * The '<em><b>Out</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #OUT
+   * @generated
+   * @ordered
+   */
+  OUT_LITERAL(2, "out", "out");
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The '<em><b>In</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>In</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #IN_LITERAL
+   * @model name="in"
+   * @generated
+   * @ordered
+   */
+  public static final int IN = 0;
+
+  /**
+   * The '<em><b>Inout</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Inout</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #INOUT_LITERAL
+   * @model name="inout"
+   * @generated
+   * @ordered
+   */
+  public static final int INOUT = 1;
+
+  /**
+   * The '<em><b>Out</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Out</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #OUT_LITERAL
+   * @model name="out"
+   * @generated
+   * @ordered
+   */
+  public static final int OUT = 2;
+
+  /**
+   * An array of all the '<em><b>Direction Kind</b></em>' enumerators.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static final DirectionKind[] VALUES_ARRAY =
+    new DirectionKind[]
+    {
+      IN_LITERAL,
+      INOUT_LITERAL,
+      OUT_LITERAL,
+    };
+
+  /**
+   * A public read-only list of all the '<em><b>Direction Kind</b></em>' enumerators.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final List<DirectionKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+  /**
+   * Returns the '<em><b>Direction Kind</b></em>' literal with the specified literal value.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static DirectionKind get(String literal)
+  {
+    for (int i = 0; i < VALUES_ARRAY.length; ++i)
+    {
+      DirectionKind result = VALUES_ARRAY[i];
+      if (result.toString().equals(literal))
+      {
+        return result;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Returns the '<em><b>Direction Kind</b></em>' literal with the specified name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static DirectionKind getByName(String name)
+  {
+    for (int i = 0; i < VALUES_ARRAY.length; ++i)
+    {
+      DirectionKind result = VALUES_ARRAY[i];
+      if (result.getName().equals(name))
+      {
+        return result;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Returns the '<em><b>Direction Kind</b></em>' literal with the specified integer value.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static DirectionKind get(int value)
+  {
+    switch (value)
+    {
+      case IN: return IN_LITERAL;
+      case INOUT: return INOUT_LITERAL;
+      case OUT: return OUT_LITERAL;
+    }
+    return null;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final int value;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final String name;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final String literal;
+
+  /**
+   * Only this class can construct instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private DirectionKind(int value, String name, String literal)
+  {
+    this.value = value;
+    this.name = name;
+    this.literal = literal;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public int getValue()
+  {
+    return value;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getName()
+  {
+    return name;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getLiteral()
+  {
+    return literal;
+  }
+
+  /**
+   * Returns the literal value of the enumerator, which is its string representation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    return literal;
+  }
+  
+} //DirectionKind
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/EnumsFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/EnumsFactory.java
new file mode 100644
index 0000000..b941263
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/EnumsFactory.java
@@ -0,0 +1,50 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage
+ * @generated
+ */
+public interface EnumsFactory extends EFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The singleton instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  EnumsFactory eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsFactoryImpl.init();
+
+  /**
+   * Returns the package supported by this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the package supported by this factory.
+   * @generated
+   */
+  EnumsPackage getEnumsPackage();
+
+} //EnumsFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/EnumsPackage.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/EnumsPackage.java
new file mode 100644
index 0000000..c77c7a2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/EnumsPackage.java
@@ -0,0 +1,339 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums;
+
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ *   <li>each class,</li>
+ *   <li>each feature of each class,</li>
+ *   <li>each enum,</li>
+ *   <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface EnumsPackage extends EPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The package name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNAME = "enums";
+
+  /**
+   * The package namespace URI.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_URI = "http:///viatragtasmmodel/gtasm/metamodel/asm/enums.ecore";
+
+  /**
+   * The package namespace name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_PREFIX = "viatragtasmmodel.gtasm.metamodel.asm.enums";
+
+  /**
+   * The singleton instance of the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  EnumsPackage eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl.init();
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.CopySemantics <em>Copy Semantics</em>}' enum.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.CopySemantics
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl#getCopySemantics()
+   * @generated
+   */
+  int COPY_SEMANTICS = 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DeleteSemantics <em>Delete Semantics</em>}' enum.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DeleteSemantics
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl#getDeleteSemantics()
+   * @generated
+   */
+  int DELETE_SEMANTICS = 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.LogLevel <em>Log Level</em>}' enum.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.LogLevel
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl#getLogLevel()
+   * @generated
+   */
+  int LOG_LEVEL = 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ContainmentMode <em>Containment Mode</em>}' enum.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ContainmentMode
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl#getContainmentMode()
+   * @generated
+   */
+  int CONTAINMENT_MODE = 3;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind <em>Value Kind</em>}' enum.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl#getValueKind()
+   * @generated
+   */
+  int VALUE_KIND = 4;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DirectionKind <em>Direction Kind</em>}' enum.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DirectionKind
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl#getDirectionKind()
+   * @generated
+   */
+  int DIRECTION_KIND = 5;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.MultiplicityKind <em>Multiplicity Kind</em>}' enum.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.MultiplicityKind
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl#getMultiplicityKind()
+   * @generated
+   */
+  int MULTIPLICITY_KIND = 6;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ChangeKind <em>Change Kind</em>}' enum.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ChangeKind
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl#getChangeKind()
+   * @generated
+   */
+  int CHANGE_KIND = 7;
+
+
+  /**
+   * Returns the meta object for enum '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.CopySemantics <em>Copy Semantics</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for enum '<em>Copy Semantics</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.CopySemantics
+   * @generated
+   */
+  EEnum getCopySemantics();
+
+  /**
+   * Returns the meta object for enum '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DeleteSemantics <em>Delete Semantics</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for enum '<em>Delete Semantics</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DeleteSemantics
+   * @generated
+   */
+  EEnum getDeleteSemantics();
+
+  /**
+   * Returns the meta object for enum '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.LogLevel <em>Log Level</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for enum '<em>Log Level</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.LogLevel
+   * @generated
+   */
+  EEnum getLogLevel();
+
+  /**
+   * Returns the meta object for enum '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ContainmentMode <em>Containment Mode</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for enum '<em>Containment Mode</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ContainmentMode
+   * @generated
+   */
+  EEnum getContainmentMode();
+
+  /**
+   * Returns the meta object for enum '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind <em>Value Kind</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for enum '<em>Value Kind</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind
+   * @generated
+   */
+  EEnum getValueKind();
+
+  /**
+   * Returns the meta object for enum '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DirectionKind <em>Direction Kind</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for enum '<em>Direction Kind</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DirectionKind
+   * @generated
+   */
+  EEnum getDirectionKind();
+
+  /**
+   * Returns the meta object for enum '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.MultiplicityKind <em>Multiplicity Kind</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for enum '<em>Multiplicity Kind</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.MultiplicityKind
+   * @generated
+   */
+  EEnum getMultiplicityKind();
+
+  /**
+   * Returns the meta object for enum '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ChangeKind <em>Change Kind</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for enum '<em>Change Kind</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ChangeKind
+   * @generated
+   */
+  EEnum getChangeKind();
+
+  /**
+   * Returns the factory that creates the instances of the model.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the factory that creates the instances of the model.
+   * @generated
+   */
+  EnumsFactory getEnumsFactory();
+
+  /**
+   * <!-- begin-user-doc -->
+   * Defines literals for the meta objects that represent
+   * <ul>
+   *   <li>each class,</li>
+   *   <li>each feature of each class,</li>
+   *   <li>each enum,</li>
+   *   <li>and each data type</li>
+   * </ul>
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  interface Literals
+  {
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.CopySemantics <em>Copy Semantics</em>}' enum.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.CopySemantics
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl#getCopySemantics()
+     * @generated
+     */
+    EEnum COPY_SEMANTICS = eINSTANCE.getCopySemantics();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DeleteSemantics <em>Delete Semantics</em>}' enum.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DeleteSemantics
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl#getDeleteSemantics()
+     * @generated
+     */
+    EEnum DELETE_SEMANTICS = eINSTANCE.getDeleteSemantics();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.LogLevel <em>Log Level</em>}' enum.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.LogLevel
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl#getLogLevel()
+     * @generated
+     */
+    EEnum LOG_LEVEL = eINSTANCE.getLogLevel();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ContainmentMode <em>Containment Mode</em>}' enum.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ContainmentMode
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl#getContainmentMode()
+     * @generated
+     */
+    EEnum CONTAINMENT_MODE = eINSTANCE.getContainmentMode();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind <em>Value Kind</em>}' enum.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl#getValueKind()
+     * @generated
+     */
+    EEnum VALUE_KIND = eINSTANCE.getValueKind();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DirectionKind <em>Direction Kind</em>}' enum.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DirectionKind
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl#getDirectionKind()
+     * @generated
+     */
+    EEnum DIRECTION_KIND = eINSTANCE.getDirectionKind();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.MultiplicityKind <em>Multiplicity Kind</em>}' enum.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.MultiplicityKind
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl#getMultiplicityKind()
+     * @generated
+     */
+    EEnum MULTIPLICITY_KIND = eINSTANCE.getMultiplicityKind();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ChangeKind <em>Change Kind</em>}' enum.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ChangeKind
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl#getChangeKind()
+     * @generated
+     */
+    EEnum CHANGE_KIND = eINSTANCE.getChangeKind();
+
+  }
+
+} //EnumsPackage
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/LogLevel.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/LogLevel.java
new file mode 100644
index 0000000..8fd3abc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/LogLevel.java
@@ -0,0 +1,320 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Log Level</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage#getLogLevel()
+ * @model
+ * @generated
+ */
+public enum LogLevel implements Enumerator
+{
+  /**
+   * The '<em><b>Debug</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #DEBUG
+   * @generated
+   * @ordered
+   */
+  DEBUG_LITERAL(0, "debug", "debug"),
+
+  /**
+   * The '<em><b>Warning</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #WARNING
+   * @generated
+   * @ordered
+   */
+  WARNING_LITERAL(1, "warning", "warning"),
+
+  /**
+   * The '<em><b>Error</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #ERROR
+   * @generated
+   * @ordered
+   */
+  ERROR_LITERAL(2, "error", "error"),
+
+  /**
+   * The '<em><b>Fatal</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #FATAL
+   * @generated
+   * @ordered
+   */
+  FATAL_LITERAL(3, "fatal", "fatal"),
+
+  /**
+   * The '<em><b>Info</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #INFO
+   * @generated
+   * @ordered
+   */
+  INFO_LITERAL(4, "info", "info");
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The '<em><b>Debug</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Debug</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #DEBUG_LITERAL
+   * @model name="debug"
+   * @generated
+   * @ordered
+   */
+  public static final int DEBUG = 0;
+
+  /**
+   * The '<em><b>Warning</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Warning</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #WARNING_LITERAL
+   * @model name="warning"
+   * @generated
+   * @ordered
+   */
+  public static final int WARNING = 1;
+
+  /**
+   * The '<em><b>Error</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Error</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #ERROR_LITERAL
+   * @model name="error"
+   * @generated
+   * @ordered
+   */
+  public static final int ERROR = 2;
+
+  /**
+   * The '<em><b>Fatal</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Fatal</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #FATAL_LITERAL
+   * @model name="fatal"
+   * @generated
+   * @ordered
+   */
+  public static final int FATAL = 3;
+
+  /**
+   * The '<em><b>Info</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Info</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #INFO_LITERAL
+   * @model name="info"
+   * @generated
+   * @ordered
+   */
+  public static final int INFO = 4;
+
+  /**
+   * An array of all the '<em><b>Log Level</b></em>' enumerators.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static final LogLevel[] VALUES_ARRAY =
+    new LogLevel[]
+    {
+      DEBUG_LITERAL,
+      WARNING_LITERAL,
+      ERROR_LITERAL,
+      FATAL_LITERAL,
+      INFO_LITERAL,
+    };
+
+  /**
+   * A public read-only list of all the '<em><b>Log Level</b></em>' enumerators.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final List<LogLevel> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+  /**
+   * Returns the '<em><b>Log Level</b></em>' literal with the specified literal value.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static LogLevel get(String literal)
+  {
+    for (int i = 0; i < VALUES_ARRAY.length; ++i)
+    {
+      LogLevel result = VALUES_ARRAY[i];
+      if (result.toString().equals(literal))
+      {
+        return result;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Returns the '<em><b>Log Level</b></em>' literal with the specified name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static LogLevel getByName(String name)
+  {
+    for (int i = 0; i < VALUES_ARRAY.length; ++i)
+    {
+      LogLevel result = VALUES_ARRAY[i];
+      if (result.getName().equals(name))
+      {
+        return result;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Returns the '<em><b>Log Level</b></em>' literal with the specified integer value.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static LogLevel get(int value)
+  {
+    switch (value)
+    {
+      case DEBUG: return DEBUG_LITERAL;
+      case WARNING: return WARNING_LITERAL;
+      case ERROR: return ERROR_LITERAL;
+      case FATAL: return FATAL_LITERAL;
+      case INFO: return INFO_LITERAL;
+    }
+    return null;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final int value;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final String name;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final String literal;
+
+  /**
+   * Only this class can construct instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private LogLevel(int value, String name, String literal)
+  {
+    this.value = value;
+    this.name = name;
+    this.literal = literal;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public int getValue()
+  {
+    return value;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getName()
+  {
+    return name;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getLiteral()
+  {
+    return literal;
+  }
+
+  /**
+   * Returns the literal value of the enumerator, which is its string representation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    return literal;
+  }
+  
+} //LogLevel
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/MultiplicityKind.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/MultiplicityKind.java
new file mode 100644
index 0000000..eea2fb7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/MultiplicityKind.java
@@ -0,0 +1,293 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Multiplicity Kind</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage#getMultiplicityKind()
+ * @model
+ * @generated
+ */
+public enum MultiplicityKind implements Enumerator
+{
+  /**
+   * The '<em><b>One to one</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #ONE_TO_ONE
+   * @generated
+   * @ordered
+   */
+  ONE_TO_ONE_LITERAL(0, "one_to_one", "one_to_one"),
+
+  /**
+   * The '<em><b>One to many</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #ONE_TO_MANY
+   * @generated
+   * @ordered
+   */
+  ONE_TO_MANY_LITERAL(1, "one_to_many", "one_to_many"),
+
+  /**
+   * The '<em><b>Many to one</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #MANY_TO_ONE
+   * @generated
+   * @ordered
+   */
+  MANY_TO_ONE_LITERAL(2, "many_to_one", "many_to_one"),
+
+  /**
+   * The '<em><b>Many to many</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #MANY_TO_MANY
+   * @generated
+   * @ordered
+   */
+  MANY_TO_MANY_LITERAL(3, "many_to_many", "many_to_many");
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The '<em><b>One to one</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>One to one</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #ONE_TO_ONE_LITERAL
+   * @model name="one_to_one"
+   * @generated
+   * @ordered
+   */
+  public static final int ONE_TO_ONE = 0;
+
+  /**
+   * The '<em><b>One to many</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>One to many</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #ONE_TO_MANY_LITERAL
+   * @model name="one_to_many"
+   * @generated
+   * @ordered
+   */
+  public static final int ONE_TO_MANY = 1;
+
+  /**
+   * The '<em><b>Many to one</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Many to one</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #MANY_TO_ONE_LITERAL
+   * @model name="many_to_one"
+   * @generated
+   * @ordered
+   */
+  public static final int MANY_TO_ONE = 2;
+
+  /**
+   * The '<em><b>Many to many</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Many to many</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #MANY_TO_MANY_LITERAL
+   * @model name="many_to_many"
+   * @generated
+   * @ordered
+   */
+  public static final int MANY_TO_MANY = 3;
+
+  /**
+   * An array of all the '<em><b>Multiplicity Kind</b></em>' enumerators.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static final MultiplicityKind[] VALUES_ARRAY =
+    new MultiplicityKind[]
+    {
+      ONE_TO_ONE_LITERAL,
+      ONE_TO_MANY_LITERAL,
+      MANY_TO_ONE_LITERAL,
+      MANY_TO_MANY_LITERAL,
+    };
+
+  /**
+   * A public read-only list of all the '<em><b>Multiplicity Kind</b></em>' enumerators.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final List<MultiplicityKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+  /**
+   * Returns the '<em><b>Multiplicity Kind</b></em>' literal with the specified literal value.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static MultiplicityKind get(String literal)
+  {
+    for (int i = 0; i < VALUES_ARRAY.length; ++i)
+    {
+      MultiplicityKind result = VALUES_ARRAY[i];
+      if (result.toString().equals(literal))
+      {
+        return result;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Returns the '<em><b>Multiplicity Kind</b></em>' literal with the specified name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static MultiplicityKind getByName(String name)
+  {
+    for (int i = 0; i < VALUES_ARRAY.length; ++i)
+    {
+      MultiplicityKind result = VALUES_ARRAY[i];
+      if (result.getName().equals(name))
+      {
+        return result;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Returns the '<em><b>Multiplicity Kind</b></em>' literal with the specified integer value.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static MultiplicityKind get(int value)
+  {
+    switch (value)
+    {
+      case ONE_TO_ONE: return ONE_TO_ONE_LITERAL;
+      case ONE_TO_MANY: return ONE_TO_MANY_LITERAL;
+      case MANY_TO_ONE: return MANY_TO_ONE_LITERAL;
+      case MANY_TO_MANY: return MANY_TO_MANY_LITERAL;
+    }
+    return null;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final int value;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final String name;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final String literal;
+
+  /**
+   * Only this class can construct instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private MultiplicityKind(int value, String name, String literal)
+  {
+    this.value = value;
+    this.name = name;
+    this.literal = literal;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public int getValue()
+  {
+    return value;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getName()
+  {
+    return name;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getLiteral()
+  {
+    return literal;
+  }
+
+  /**
+   * Returns the literal value of the enumerator, which is its string representation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    return literal;
+  }
+  
+} //MultiplicityKind
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/ValueKind.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/ValueKind.java
new file mode 100644
index 0000000..909c0b9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/ValueKind.java
@@ -0,0 +1,401 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Value Kind</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage#getValueKind()
+ * @model
+ * @generated
+ */
+public enum ValueKind implements Enumerator
+{
+  /**
+   * The '<em><b>Undef</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #UNDEF
+   * @generated
+   * @ordered
+   */
+  UNDEF_LITERAL(0, "undef", "undef"),
+
+  /**
+   * The '<em><b>Boolean</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #BOOLEAN
+   * @generated
+   * @ordered
+   */
+  BOOLEAN_LITERAL(1, "boolean", "boolean"),
+
+  /**
+   * The '<em><b>String</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #STRING
+   * @generated
+   * @ordered
+   */
+  STRING_LITERAL(2, "string", "string"),
+
+  /**
+   * The '<em><b>Integer</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #INTEGER
+   * @generated
+   * @ordered
+   */
+  INTEGER_LITERAL(3, "integer", "integer"),
+
+  /**
+   * The '<em><b>Double</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #DOUBLE
+   * @generated
+   * @ordered
+   */
+  DOUBLE_LITERAL(4, "double", "double"),
+
+  /**
+   * The '<em><b>Modelelement</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #MODELELEMENT
+   * @generated
+   * @ordered
+   */
+  MODELELEMENT_LITERAL(5, "modelelement", "modelelement"),
+
+  /**
+   * The '<em><b>Multiplicity</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #MULTIPLICITY
+   * @generated
+   * @ordered
+   */
+  MULTIPLICITY_LITERAL(6, "multiplicity", "multiplicity"),
+
+  /**
+   * The '<em><b>Error</b></em>' literal object.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #ERROR
+   * @generated
+   * @ordered
+   */
+  ERROR_LITERAL(7, "error", "error");
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The '<em><b>Undef</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Undef</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #UNDEF_LITERAL
+   * @model name="undef"
+   * @generated
+   * @ordered
+   */
+  public static final int UNDEF = 0;
+
+  /**
+   * The '<em><b>Boolean</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Boolean</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #BOOLEAN_LITERAL
+   * @model name="boolean"
+   * @generated
+   * @ordered
+   */
+  public static final int BOOLEAN = 1;
+
+  /**
+   * The '<em><b>String</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>String</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #STRING_LITERAL
+   * @model name="string"
+   * @generated
+   * @ordered
+   */
+  public static final int STRING = 2;
+
+  /**
+   * The '<em><b>Integer</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Integer</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #INTEGER_LITERAL
+   * @model name="integer"
+   * @generated
+   * @ordered
+   */
+  public static final int INTEGER = 3;
+
+  /**
+   * The '<em><b>Double</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Double</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #DOUBLE_LITERAL
+   * @model name="double"
+   * @generated
+   * @ordered
+   */
+  public static final int DOUBLE = 4;
+
+  /**
+   * The '<em><b>Modelelement</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Modelelement</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #MODELELEMENT_LITERAL
+   * @model name="modelelement"
+   * @generated
+   * @ordered
+   */
+  public static final int MODELELEMENT = 5;
+
+  /**
+   * The '<em><b>Multiplicity</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Multiplicity</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #MULTIPLICITY_LITERAL
+   * @model name="multiplicity"
+   * @generated
+   * @ordered
+   */
+  public static final int MULTIPLICITY = 6;
+
+  /**
+   * The '<em><b>Error</b></em>' literal value.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of '<em><b>Error</b></em>' literal object isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @see #ERROR_LITERAL
+   * @model name="error"
+   * @generated
+   * @ordered
+   */
+  public static final int ERROR = 7;
+
+  /**
+   * An array of all the '<em><b>Value Kind</b></em>' enumerators.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static final ValueKind[] VALUES_ARRAY =
+    new ValueKind[]
+    {
+      UNDEF_LITERAL,
+      BOOLEAN_LITERAL,
+      STRING_LITERAL,
+      INTEGER_LITERAL,
+      DOUBLE_LITERAL,
+      MODELELEMENT_LITERAL,
+      MULTIPLICITY_LITERAL,
+      ERROR_LITERAL,
+    };
+
+  /**
+   * A public read-only list of all the '<em><b>Value Kind</b></em>' enumerators.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final List<ValueKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+  /**
+   * Returns the '<em><b>Value Kind</b></em>' literal with the specified literal value.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static ValueKind get(String literal)
+  {
+    for (int i = 0; i < VALUES_ARRAY.length; ++i)
+    {
+      ValueKind result = VALUES_ARRAY[i];
+      if (result.toString().equals(literal))
+      {
+        return result;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Returns the '<em><b>Value Kind</b></em>' literal with the specified name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static ValueKind getByName(String name)
+  {
+    for (int i = 0; i < VALUES_ARRAY.length; ++i)
+    {
+      ValueKind result = VALUES_ARRAY[i];
+      if (result.getName().equals(name))
+      {
+        return result;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Returns the '<em><b>Value Kind</b></em>' literal with the specified integer value.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static ValueKind get(int value)
+  {
+    switch (value)
+    {
+      case UNDEF: return UNDEF_LITERAL;
+      case BOOLEAN: return BOOLEAN_LITERAL;
+      case STRING: return STRING_LITERAL;
+      case INTEGER: return INTEGER_LITERAL;
+      case DOUBLE: return DOUBLE_LITERAL;
+      case MODELELEMENT: return MODELELEMENT_LITERAL;
+      case MULTIPLICITY: return MULTIPLICITY_LITERAL;
+      case ERROR: return ERROR_LITERAL;
+    }
+    return null;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final int value;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final String name;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private final String literal;
+
+  /**
+   * Only this class can construct instances.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private ValueKind(int value, String name, String literal)
+  {
+    this.value = value;
+    this.name = name;
+    this.literal = literal;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public int getValue()
+  {
+    return value;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getName()
+  {
+    return name;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getLiteral()
+  {
+    return literal;
+  }
+
+  /**
+   * Returns the literal value of the enumerator, which is its string representation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    return literal;
+  }
+  
+} //ValueKind
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/impl/EnumsFactoryImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/impl/EnumsFactoryImpl.java
new file mode 100644
index 0000000..5425d96
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/impl/EnumsFactoryImpl.java
@@ -0,0 +1,349 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class EnumsFactoryImpl extends EFactoryImpl implements EnumsFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Creates the default factory implementation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static EnumsFactory init()
+  {
+    try
+    {
+      EnumsFactory theEnumsFactory = (EnumsFactory)EPackage.Registry.INSTANCE.getEFactory("http:///viatragtasmmodel/gtasm/metamodel/asm/enums.ecore"); 
+      if (theEnumsFactory != null)
+      {
+        return theEnumsFactory;
+      }
+    }
+    catch (Exception exception)
+    {
+      EcorePlugin.INSTANCE.log(exception);
+    }
+    return new EnumsFactoryImpl();
+  }
+
+  /**
+   * Creates an instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EnumsFactoryImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public EObject create(EClass eClass)
+  {
+    switch (eClass.getClassifierID())
+    {
+      default:
+        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+    }
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object createFromString(EDataType eDataType, String initialValue)
+  {
+    switch (eDataType.getClassifierID())
+    {
+      case EnumsPackage.COPY_SEMANTICS:
+        return createCopySemanticsFromString(eDataType, initialValue);
+      case EnumsPackage.DELETE_SEMANTICS:
+        return createDeleteSemanticsFromString(eDataType, initialValue);
+      case EnumsPackage.LOG_LEVEL:
+        return createLogLevelFromString(eDataType, initialValue);
+      case EnumsPackage.CONTAINMENT_MODE:
+        return createContainmentModeFromString(eDataType, initialValue);
+      case EnumsPackage.VALUE_KIND:
+        return createValueKindFromString(eDataType, initialValue);
+      case EnumsPackage.DIRECTION_KIND:
+        return createDirectionKindFromString(eDataType, initialValue);
+      case EnumsPackage.MULTIPLICITY_KIND:
+        return createMultiplicityKindFromString(eDataType, initialValue);
+      case EnumsPackage.CHANGE_KIND:
+        return createChangeKindFromString(eDataType, initialValue);
+      default:
+        throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+    }
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String convertToString(EDataType eDataType, Object instanceValue)
+  {
+    switch (eDataType.getClassifierID())
+    {
+      case EnumsPackage.COPY_SEMANTICS:
+        return convertCopySemanticsToString(eDataType, instanceValue);
+      case EnumsPackage.DELETE_SEMANTICS:
+        return convertDeleteSemanticsToString(eDataType, instanceValue);
+      case EnumsPackage.LOG_LEVEL:
+        return convertLogLevelToString(eDataType, instanceValue);
+      case EnumsPackage.CONTAINMENT_MODE:
+        return convertContainmentModeToString(eDataType, instanceValue);
+      case EnumsPackage.VALUE_KIND:
+        return convertValueKindToString(eDataType, instanceValue);
+      case EnumsPackage.DIRECTION_KIND:
+        return convertDirectionKindToString(eDataType, instanceValue);
+      case EnumsPackage.MULTIPLICITY_KIND:
+        return convertMultiplicityKindToString(eDataType, instanceValue);
+      case EnumsPackage.CHANGE_KIND:
+        return convertChangeKindToString(eDataType, instanceValue);
+      default:
+        throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+    }
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CopySemantics createCopySemanticsFromString(EDataType eDataType, String initialValue)
+  {
+    CopySemantics result = CopySemantics.get(initialValue);
+    if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+    return result;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String convertCopySemanticsToString(EDataType eDataType, Object instanceValue)
+  {
+    return instanceValue == null ? null : instanceValue.toString();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DeleteSemantics createDeleteSemanticsFromString(EDataType eDataType, String initialValue)
+  {
+    DeleteSemantics result = DeleteSemantics.get(initialValue);
+    if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+    return result;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String convertDeleteSemanticsToString(EDataType eDataType, Object instanceValue)
+  {
+    return instanceValue == null ? null : instanceValue.toString();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public LogLevel createLogLevelFromString(EDataType eDataType, String initialValue)
+  {
+    LogLevel result = LogLevel.get(initialValue);
+    if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+    return result;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String convertLogLevelToString(EDataType eDataType, Object instanceValue)
+  {
+    return instanceValue == null ? null : instanceValue.toString();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ContainmentMode createContainmentModeFromString(EDataType eDataType, String initialValue)
+  {
+    ContainmentMode result = ContainmentMode.get(initialValue);
+    if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+    return result;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String convertContainmentModeToString(EDataType eDataType, Object instanceValue)
+  {
+    return instanceValue == null ? null : instanceValue.toString();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ValueKind createValueKindFromString(EDataType eDataType, String initialValue)
+  {
+    ValueKind result = ValueKind.get(initialValue);
+    if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+    return result;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String convertValueKindToString(EDataType eDataType, Object instanceValue)
+  {
+    return instanceValue == null ? null : instanceValue.toString();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DirectionKind createDirectionKindFromString(EDataType eDataType, String initialValue)
+  {
+    DirectionKind result = DirectionKind.get(initialValue);
+    if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+    return result;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String convertDirectionKindToString(EDataType eDataType, Object instanceValue)
+  {
+    return instanceValue == null ? null : instanceValue.toString();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public MultiplicityKind createMultiplicityKindFromString(EDataType eDataType, String initialValue)
+  {
+    MultiplicityKind result = MultiplicityKind.get(initialValue);
+    if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+    return result;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String convertMultiplicityKindToString(EDataType eDataType, Object instanceValue)
+  {
+    return instanceValue == null ? null : instanceValue.toString();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ChangeKind createChangeKindFromString(EDataType eDataType, String initialValue)
+  {
+    ChangeKind result = ChangeKind.get(initialValue);
+    if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+    return result;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String convertChangeKindToString(EDataType eDataType, Object instanceValue)
+  {
+    return instanceValue == null ? null : instanceValue.toString();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EnumsPackage getEnumsPackage()
+  {
+    return (EnumsPackage)getEPackage();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @deprecated
+   * @generated
+   */
+  @Deprecated
+  public static EnumsPackage getPackage()
+  {
+    return EnumsPackage.eINSTANCE;
+  }
+
+} //EnumsFactoryImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/impl/EnumsPackageImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/impl/EnumsPackageImpl.java
new file mode 100644
index 0000000..2823e47
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/enums/impl/EnumsPackageImpl.java
@@ -0,0 +1,451 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl;
+
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ChangeKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ContainmentMode;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.CopySemantics;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DeleteSemantics;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DirectionKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.LogLevel;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.MultiplicityKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymovePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class EnumsPackageImpl extends EPackageImpl implements EnumsPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EEnum copySemanticsEEnum = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EEnum deleteSemanticsEEnum = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EEnum logLevelEEnum = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EEnum containmentModeEEnum = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EEnum valueKindEEnum = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EEnum directionKindEEnum = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EEnum multiplicityKindEEnum = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EEnum changeKindEEnum = null;
+
+  /**
+   * Creates an instance of the model <b>Package</b>, registered with
+   * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+   * package URI value.
+   * <p>Note: the correct way to create the package is via the static
+   * factory method {@link #init init()}, which also performs
+   * initialization of the package, or returns the registered package,
+   * if one already exists.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.emf.ecore.EPackage.Registry
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage#eNS_URI
+   * @see #init()
+   * @generated
+   */
+  private EnumsPackageImpl()
+  {
+    super(eNS_URI, EnumsFactory.eINSTANCE);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static boolean isInited = false;
+
+  /**
+   * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+   * 
+   * <p>This method is used to initialize {@link EnumsPackage#eINSTANCE} when that field is accessed.
+   * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #eNS_URI
+   * @see #createPackageContents()
+   * @see #initializePackageContents()
+   * @generated
+   */
+  public static EnumsPackage init()
+  {
+    if (isInited) return (EnumsPackage)EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI);
+
+    // Obtain or create and register package
+    EnumsPackageImpl theEnumsPackage = (EnumsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof EnumsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new EnumsPackageImpl());
+
+    isInited = true;
+
+    // Obtain or create and register interdependencies
+    EditmodelPackageImpl theEditmodelPackage = (EditmodelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) instanceof EditmodelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) : EditmodelPackage.eINSTANCE);
+    QueryFunctionsPackageImpl theQueryFunctionsPackage = (QueryFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) instanceof QueryFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) : QueryFunctionsPackage.eINSTANCE);
+    DeletionPackageImpl theDeletionPackage = (DeletionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) instanceof DeletionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) : DeletionPackage.eINSTANCE);
+    CreationPackageImpl theCreationPackage = (CreationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) instanceof CreationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) : CreationPackage.eINSTANCE);
+    CopymovePackageImpl theCopymovePackage = (CopymovePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) instanceof CopymovePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) : CopymovePackage.eINSTANCE);
+    UpdatePackageImpl theUpdatePackage = (UpdatePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) instanceof UpdatePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) : UpdatePackage.eINSTANCE);
+    DefinitionsPackageImpl theDefinitionsPackage = (DefinitionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) instanceof DefinitionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) : DefinitionsPackage.eINSTANCE);
+    CorePackageImpl theCorePackage = (CorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) instanceof CorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) : CorePackage.eINSTANCE);
+    SimpleRulesPackageImpl theSimpleRulesPackage = (SimpleRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) instanceof SimpleRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) : SimpleRulesPackage.eINSTANCE);
+    CompoundRulesPackageImpl theCompoundRulesPackage = (CompoundRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) instanceof CompoundRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) : CompoundRulesPackage.eINSTANCE);
+    TermsPackageImpl theTermsPackage = (TermsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) instanceof TermsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) : TermsPackage.eINSTANCE);
+    BuiltInFunctionsPackageImpl theBuiltInFunctionsPackage = (BuiltInFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) instanceof BuiltInFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) : BuiltInFunctionsPackage.eINSTANCE);
+    GtPackageImpl theGtPackage = (GtPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) instanceof GtPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) : GtPackage.eINSTANCE);
+
+    // Create package meta-data objects
+    theEnumsPackage.createPackageContents();
+    theEditmodelPackage.createPackageContents();
+    theQueryFunctionsPackage.createPackageContents();
+    theDeletionPackage.createPackageContents();
+    theCreationPackage.createPackageContents();
+    theCopymovePackage.createPackageContents();
+    theUpdatePackage.createPackageContents();
+    theDefinitionsPackage.createPackageContents();
+    theCorePackage.createPackageContents();
+    theSimpleRulesPackage.createPackageContents();
+    theCompoundRulesPackage.createPackageContents();
+    theTermsPackage.createPackageContents();
+    theBuiltInFunctionsPackage.createPackageContents();
+    theGtPackage.createPackageContents();
+
+    // Initialize created meta-data
+    theEnumsPackage.initializePackageContents();
+    theEditmodelPackage.initializePackageContents();
+    theQueryFunctionsPackage.initializePackageContents();
+    theDeletionPackage.initializePackageContents();
+    theCreationPackage.initializePackageContents();
+    theCopymovePackage.initializePackageContents();
+    theUpdatePackage.initializePackageContents();
+    theDefinitionsPackage.initializePackageContents();
+    theCorePackage.initializePackageContents();
+    theSimpleRulesPackage.initializePackageContents();
+    theCompoundRulesPackage.initializePackageContents();
+    theTermsPackage.initializePackageContents();
+    theBuiltInFunctionsPackage.initializePackageContents();
+    theGtPackage.initializePackageContents();
+
+    // Mark meta-data to indicate it can't be changed
+    theEnumsPackage.freeze();
+
+  
+    // Update the registry and return the package
+    EPackage.Registry.INSTANCE.put(EnumsPackage.eNS_URI, theEnumsPackage);
+    return theEnumsPackage;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EEnum getCopySemantics()
+  {
+    return copySemanticsEEnum;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EEnum getDeleteSemantics()
+  {
+    return deleteSemanticsEEnum;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EEnum getLogLevel()
+  {
+    return logLevelEEnum;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EEnum getContainmentMode()
+  {
+    return containmentModeEEnum;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EEnum getValueKind()
+  {
+    return valueKindEEnum;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EEnum getDirectionKind()
+  {
+    return directionKindEEnum;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EEnum getMultiplicityKind()
+  {
+    return multiplicityKindEEnum;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EEnum getChangeKind()
+  {
+    return changeKindEEnum;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EnumsFactory getEnumsFactory()
+  {
+    return (EnumsFactory)getEFactoryInstance();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isCreated = false;
+
+  /**
+   * Creates the meta-model objects for the package.  This method is
+   * guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void createPackageContents()
+  {
+    if (isCreated) return;
+    isCreated = true;
+
+    // Create enums
+    copySemanticsEEnum = createEEnum(COPY_SEMANTICS);
+    deleteSemanticsEEnum = createEEnum(DELETE_SEMANTICS);
+    logLevelEEnum = createEEnum(LOG_LEVEL);
+    containmentModeEEnum = createEEnum(CONTAINMENT_MODE);
+    valueKindEEnum = createEEnum(VALUE_KIND);
+    directionKindEEnum = createEEnum(DIRECTION_KIND);
+    multiplicityKindEEnum = createEEnum(MULTIPLICITY_KIND);
+    changeKindEEnum = createEEnum(CHANGE_KIND);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isInitialized = false;
+
+  /**
+   * Complete the initialization of the package and its meta-model.  This
+   * method is guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void initializePackageContents()
+  {
+    if (isInitialized) return;
+    isInitialized = true;
+
+    // Initialize package
+    setName(eNAME);
+    setNsPrefix(eNS_PREFIX);
+    setNsURI(eNS_URI);
+
+    // Initialize enums and add enum literals
+    initEEnum(copySemanticsEEnum, CopySemantics.class, "CopySemantics");
+    addEEnumLiteral(copySemanticsEEnum, CopySemantics.DROP_OUTER_EDGES_LITERAL);
+    addEEnumLiteral(copySemanticsEEnum, CopySemantics.COPY_OUTER_EDGES_LITERAL);
+
+    initEEnum(deleteSemanticsEEnum, DeleteSemantics.class, "DeleteSemantics");
+    addEEnumLiteral(deleteSemanticsEEnum, DeleteSemantics.DROP_CONTENT_LITERAL);
+    addEEnumLiteral(deleteSemanticsEEnum, DeleteSemantics.MOVE_CONTENT_LITERAL);
+
+    initEEnum(logLevelEEnum, LogLevel.class, "LogLevel");
+    addEEnumLiteral(logLevelEEnum, LogLevel.DEBUG_LITERAL);
+    addEEnumLiteral(logLevelEEnum, LogLevel.WARNING_LITERAL);
+    addEEnumLiteral(logLevelEEnum, LogLevel.ERROR_LITERAL);
+    addEEnumLiteral(logLevelEEnum, LogLevel.FATAL_LITERAL);
+    addEEnumLiteral(logLevelEEnum, LogLevel.INFO_LITERAL);
+
+    initEEnum(containmentModeEEnum, ContainmentMode.class, "ContainmentMode");
+    addEEnumLiteral(containmentModeEEnum, ContainmentMode.IN_LITERAL);
+    addEEnumLiteral(containmentModeEEnum, ContainmentMode.BELOW_LITERAL);
+
+    initEEnum(valueKindEEnum, ValueKind.class, "ValueKind");
+    addEEnumLiteral(valueKindEEnum, ValueKind.UNDEF_LITERAL);
+    addEEnumLiteral(valueKindEEnum, ValueKind.BOOLEAN_LITERAL);
+    addEEnumLiteral(valueKindEEnum, ValueKind.STRING_LITERAL);
+    addEEnumLiteral(valueKindEEnum, ValueKind.INTEGER_LITERAL);
+    addEEnumLiteral(valueKindEEnum, ValueKind.DOUBLE_LITERAL);
+    addEEnumLiteral(valueKindEEnum, ValueKind.MODELELEMENT_LITERAL);
+    addEEnumLiteral(valueKindEEnum, ValueKind.MULTIPLICITY_LITERAL);
+    addEEnumLiteral(valueKindEEnum, ValueKind.ERROR_LITERAL);
+
+    initEEnum(directionKindEEnum, DirectionKind.class, "DirectionKind");
+    addEEnumLiteral(directionKindEEnum, DirectionKind.IN_LITERAL);
+    addEEnumLiteral(directionKindEEnum, DirectionKind.INOUT_LITERAL);
+    addEEnumLiteral(directionKindEEnum, DirectionKind.OUT_LITERAL);
+
+    initEEnum(multiplicityKindEEnum, MultiplicityKind.class, "MultiplicityKind");
+    addEEnumLiteral(multiplicityKindEEnum, MultiplicityKind.ONE_TO_ONE_LITERAL);
+    addEEnumLiteral(multiplicityKindEEnum, MultiplicityKind.ONE_TO_MANY_LITERAL);
+    addEEnumLiteral(multiplicityKindEEnum, MultiplicityKind.MANY_TO_ONE_LITERAL);
+    addEEnumLiteral(multiplicityKindEEnum, MultiplicityKind.MANY_TO_MANY_LITERAL);
+
+    initEEnum(changeKindEEnum, ChangeKind.class, "ChangeKind");
+    addEEnumLiteral(changeKindEEnum, ChangeKind.NEW);
+    addEEnumLiteral(changeKindEEnum, ChangeKind.DELETE);
+    addEEnumLiteral(changeKindEEnum, ChangeKind.CHANGED);
+
+    // Create resource
+    createResource(eNS_URI);
+  }
+
+} //EnumsPackageImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/ASMRuleInvocation.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/ASMRuleInvocation.java
new file mode 100644
index 0000000..bd75070
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/ASMRuleInvocation.java
@@ -0,0 +1,98 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>ASM Rule Invocation</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation#getCaller <em>Caller</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation#getAsmRule <em>Asm Rule</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getASMRuleInvocation()
+ * @model abstract="true"
+ * @generated
+ */
+public interface ASMRuleInvocation extends GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Caller</em>' reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Caller</em>' reference.
+   * @see #setCaller(ASMRuleInvocation)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getASMRuleInvocation_Caller()
+   * @model transient="true" ordered="false"
+   * @generated
+   */
+  ASMRuleInvocation getCaller();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation#getCaller <em>Caller</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Caller</em>' reference.
+   * @see #getCaller()
+   * @generated
+   */
+  void setCaller(ASMRuleInvocation value);
+
+  /**
+   * Returns the value of the '<em><b>Asm Rule</b></em>' container reference.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule#getBody <em>Body</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Asm Rule</em>' container reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Asm Rule</em>' container reference.
+   * @see #setAsmRule(Rule)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getASMRuleInvocation_AsmRule()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule#getBody
+   * @model opposite="body" transient="false"
+   * @generated
+   */
+  Rule getAsmRule();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation#getAsmRule <em>Asm Rule</em>}' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Asm Rule</em>' container reference.
+   * @see #getAsmRule()
+   * @generated
+   */
+  void setAsmRule(Rule value);
+
+} // ASMRuleInvocation
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/CallRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/CallRule.java
new file mode 100644
index 0000000..61a5172
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/CallRule.java
@@ -0,0 +1,88 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Call Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule#getRule <em>Rule</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule#getActualParameters <em>Actual Parameters</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getCallRule()
+ * @model
+ * @generated
+ */
+public interface CallRule extends ASMRuleInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Rule</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Rule</em>' reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Rule</em>' reference.
+   * @see #setRule(Rule)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getCallRule_Rule()
+   * @model required="true" ordered="false"
+   * @generated
+   */
+  Rule getRule();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule#getRule <em>Rule</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Rule</em>' reference.
+   * @see #getRule()
+   * @generated
+   */
+  void setRule(Rule value);
+
+  /**
+   * Returns the value of the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Actual Parameters</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Actual Parameters</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getCallRule_ActualParameters()
+   * @model containment="true"
+   * @generated
+   */
+  EList<Term> getActualParameters();
+
+} // CallRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/ConditionalRuleIf.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/ConditionalRuleIf.java
new file mode 100644
index 0000000..06911c5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/ConditionalRuleIf.java
@@ -0,0 +1,121 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Conditional Rule If</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf#getExpressionToTest <em>Expression To Test</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf#getRuleTrue <em>Rule True</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf#getRuleFalse <em>Rule False</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getConditionalRuleIf()
+ * @model
+ * @generated
+ */
+public interface ConditionalRuleIf extends ASMRuleInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Expression To Test</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Expression To Test</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Expression To Test</em>' containment reference.
+   * @see #setExpressionToTest(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getConditionalRuleIf_ExpressionToTest()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getExpressionToTest();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf#getExpressionToTest <em>Expression To Test</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Expression To Test</em>' containment reference.
+   * @see #getExpressionToTest()
+   * @generated
+   */
+  void setExpressionToTest(Term value);
+
+  /**
+   * Returns the value of the '<em><b>Rule True</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Rule True</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Rule True</em>' containment reference.
+   * @see #setRuleTrue(ASMRuleInvocation)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getConditionalRuleIf_RuleTrue()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  ASMRuleInvocation getRuleTrue();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf#getRuleTrue <em>Rule True</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Rule True</em>' containment reference.
+   * @see #getRuleTrue()
+   * @generated
+   */
+  void setRuleTrue(ASMRuleInvocation value);
+
+  /**
+   * Returns the value of the '<em><b>Rule False</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Rule False</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Rule False</em>' containment reference.
+   * @see #setRuleFalse(ASMRuleInvocation)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getConditionalRuleIf_RuleFalse()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  ASMRuleInvocation getRuleFalse();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf#getRuleFalse <em>Rule False</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Rule False</em>' containment reference.
+   * @see #getRuleFalse()
+   * @generated
+   */
+  void setRuleFalse(ASMRuleInvocation value);
+
+} // ConditionalRuleIf
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/ConditionalRuleTry.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/ConditionalRuleTry.java
new file mode 100644
index 0000000..a373f89
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/ConditionalRuleTry.java
@@ -0,0 +1,93 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Conditional Rule Try</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry#getRuleToTry <em>Rule To Try</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry#getRuleElse <em>Rule Else</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getConditionalRuleTry()
+ * @model
+ * @generated
+ */
+public interface ConditionalRuleTry extends ASMRuleInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Rule To Try</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Rule To Try</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Rule To Try</em>' containment reference.
+   * @see #setRuleToTry(ASMRuleInvocation)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getConditionalRuleTry_RuleToTry()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  ASMRuleInvocation getRuleToTry();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry#getRuleToTry <em>Rule To Try</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Rule To Try</em>' containment reference.
+   * @see #getRuleToTry()
+   * @generated
+   */
+  void setRuleToTry(ASMRuleInvocation value);
+
+  /**
+   * Returns the value of the '<em><b>Rule Else</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Rule Else</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Rule Else</em>' containment reference.
+   * @see #setRuleElse(ASMRuleInvocation)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getConditionalRuleTry_RuleElse()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  ASMRuleInvocation getRuleElse();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry#getRuleElse <em>Rule Else</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Rule Else</em>' containment reference.
+   * @see #getRuleElse()
+   * @generated
+   */
+  void setRuleElse(ASMRuleInvocation value);
+
+} // ConditionalRuleTry
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/FailRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/FailRule.java
new file mode 100644
index 0000000..e3b5349
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/FailRule.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Fail Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getFailRule()
+ * @model
+ * @generated
+ */
+public interface FailRule extends ASMRuleInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // FailRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/GTRuleInvocation.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/GTRuleInvocation.java
new file mode 100644
index 0000000..5041cbb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/GTRuleInvocation.java
@@ -0,0 +1,119 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>GT Rule Invocation</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation#getRule <em>Rule</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation#getInvoker <em>Invoker</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation#getActualParameters <em>Actual Parameters</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getGTRuleInvocation()
+ * @model
+ * @generated
+ */
+public interface GTRuleInvocation extends ASMRuleInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Rule</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Rule</em>' reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Rule</em>' reference.
+   * @see #setRule(GTRule)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getGTRuleInvocation_Rule()
+   * @model required="true" ordered="false"
+   * @generated
+   */
+  GTRule getRule();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation#getRule <em>Rule</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Rule</em>' reference.
+   * @see #getRule()
+   * @generated
+   */
+  void setRule(GTRule value);
+
+  /**
+   * Returns the value of the '<em><b>Invoker</b></em>' container reference.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule#getGtrule <em>Gtrule</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Invoker</em>' container reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Invoker</em>' container reference.
+   * @see #setInvoker(CollectionIteratorRule)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getGTRuleInvocation_Invoker()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule#getGtrule
+   * @model opposite="gtrule" required="true" ordered="false"
+   * @generated
+   */
+  CollectionIteratorRule getInvoker();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation#getInvoker <em>Invoker</em>}' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Invoker</em>' container reference.
+   * @see #getInvoker()
+   * @generated
+   */
+  void setInvoker(CollectionIteratorRule value);
+
+  /**
+   * Returns the value of the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Actual Parameters</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Actual Parameters</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getGTRuleInvocation_ActualParameters()
+   * @model containment="true"
+   * @generated
+   */
+  EList<Term> getActualParameters();
+
+} // GTRuleInvocation
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/LogRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/LogRule.java
new file mode 100644
index 0000000..8876a61
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/LogRule.java
@@ -0,0 +1,100 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.LogLevel;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Log Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule#getOut <em>Out</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule#getLevel <em>Level</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getLogRule()
+ * @model
+ * @generated
+ */
+public interface LogRule extends ASMRuleInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Out</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Out</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Out</em>' containment reference.
+   * @see #setOut(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getLogRule_Out()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getOut();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule#getOut <em>Out</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Out</em>' containment reference.
+   * @see #getOut()
+   * @generated
+   */
+  void setOut(Term value);
+
+  /**
+   * Returns the value of the '<em><b>Level</b></em>' attribute.
+   * The default value is <code>"debug"</code>.
+   * The literals are from the enumeration {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.LogLevel}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Level</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Level</em>' attribute.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.LogLevel
+   * @see #setLevel(LogLevel)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getLogRule_Level()
+   * @model default="debug" required="true" ordered="false"
+   * @generated
+   */
+  LogLevel getLevel();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule#getLevel <em>Level</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Level</em>' attribute.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.LogLevel
+   * @see #getLevel()
+   * @generated
+   */
+  void setLevel(LogLevel value);
+
+} // LogRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/ModelManipulationRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/ModelManipulationRule.java
new file mode 100644
index 0000000..c7bea5a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/ModelManipulationRule.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Model Manipulation Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getModelManipulationRule()
+ * @model abstract="true"
+ * @generated
+ */
+public interface ModelManipulationRule extends ASMRuleInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // ModelManipulationRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/PrintLnRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/PrintLnRule.java
new file mode 100644
index 0000000..ed5f06c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/PrintLnRule.java
@@ -0,0 +1,94 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Print Ln Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule#getOut <em>Out</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule#getBuffer <em>Buffer</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getPrintLnRule()
+ * @model
+ * @generated
+ */
+public interface PrintLnRule extends ASMRuleInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Out</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Out</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Out</em>' containment reference.
+   * @see #setOut(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getPrintLnRule_Out()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getOut();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule#getOut <em>Out</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Out</em>' containment reference.
+   * @see #getOut()
+   * @generated
+   */
+  void setOut(Term value);
+
+  /**
+   * Returns the value of the '<em><b>Buffer</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Buffer</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Buffer</em>' containment reference.
+   * @see #setBuffer(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getPrintLnRule_Buffer()
+   * @model containment="true"
+   * @generated
+   */
+  Term getBuffer();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule#getBuffer <em>Buffer</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Buffer</em>' containment reference.
+   * @see #getBuffer()
+   * @generated
+   */
+  void setBuffer(Term value);
+
+} // PrintLnRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/PrintRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/PrintRule.java
new file mode 100644
index 0000000..f1baa99
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/PrintRule.java
@@ -0,0 +1,94 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Print Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule#getOut <em>Out</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule#getBuffer <em>Buffer</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getPrintRule()
+ * @model
+ * @generated
+ */
+public interface PrintRule extends ASMRuleInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Out</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Out</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Out</em>' containment reference.
+   * @see #setOut(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getPrintRule_Out()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getOut();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule#getOut <em>Out</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Out</em>' containment reference.
+   * @see #getOut()
+   * @generated
+   */
+  void setOut(Term value);
+
+  /**
+   * Returns the value of the '<em><b>Buffer</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Buffer</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Buffer</em>' containment reference.
+   * @see #setBuffer(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getPrintRule_Buffer()
+   * @model containment="true"
+   * @generated
+   */
+  Term getBuffer();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule#getBuffer <em>Buffer</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Buffer</em>' containment reference.
+   * @see #getBuffer()
+   * @generated
+   */
+  void setBuffer(Term value);
+
+} // PrintRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/RuleUpdate.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/RuleUpdate.java
new file mode 100644
index 0000000..3e564a8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/RuleUpdate.java
@@ -0,0 +1,67 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Rule Update</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdate#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getRuleUpdate()
+ * @model abstract="true"
+ * @generated
+ */
+public interface RuleUpdate extends ASMRuleInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Value</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Value</em>' containment reference.
+   * @see #setValue(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getRuleUpdate_Value()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getValue();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdate#getValue <em>Value</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Value</em>' containment reference.
+   * @see #getValue()
+   * @generated
+   */
+  void setValue(Term value);
+
+} // RuleUpdate
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/RuleUpdateASMFunction.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/RuleUpdateASMFunction.java
new file mode 100644
index 0000000..c9a5491
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/RuleUpdateASMFunction.java
@@ -0,0 +1,88 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Rule Update ASM Function</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction#getLocations <em>Locations</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction#getFunction <em>Function</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getRuleUpdateASMFunction()
+ * @model
+ * @generated
+ */
+public interface RuleUpdateASMFunction extends RuleUpdate
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Locations</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Locations</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Locations</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getRuleUpdateASMFunction_Locations()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  EList<Term> getLocations();
+
+  /**
+   * Returns the value of the '<em><b>Function</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Function</em>' reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Function</em>' reference.
+   * @see #setFunction(ASMFunction)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getRuleUpdateASMFunction_Function()
+   * @model ordered="false"
+   * @generated
+   */
+  ASMFunction getFunction();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction#getFunction <em>Function</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Function</em>' reference.
+   * @see #getFunction()
+   * @generated
+   */
+  void setFunction(ASMFunction value);
+
+} // RuleUpdateASMFunction
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/RuleUpdateVariable.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/RuleUpdateVariable.java
new file mode 100644
index 0000000..7adac18
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/RuleUpdateVariable.java
@@ -0,0 +1,67 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Rule Update Variable</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateVariable#getVariable <em>Variable</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getRuleUpdateVariable()
+ * @model
+ * @generated
+ */
+public interface RuleUpdateVariable extends RuleUpdate
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Variable</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Variable</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Variable</em>' containment reference.
+   * @see #setVariable(VariableReference)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getRuleUpdateVariable_Variable()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  VariableReference getVariable();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateVariable#getVariable <em>Variable</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Variable</em>' containment reference.
+   * @see #getVariable()
+   * @generated
+   */
+  void setVariable(VariableReference value);
+
+} // RuleUpdateVariable
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/SimpleRulesFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/SimpleRulesFactory.java
new file mode 100644
index 0000000..f6cca43
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/SimpleRulesFactory.java
@@ -0,0 +1,149 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage
+ * @generated
+ */
+public interface SimpleRulesFactory extends EFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The singleton instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  SimpleRulesFactory eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesFactoryImpl.init();
+
+  /**
+   * Returns a new object of class '<em>Conditional Rule Try</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Conditional Rule Try</em>'.
+   * @generated
+   */
+  ConditionalRuleTry createConditionalRuleTry();
+
+  /**
+   * Returns a new object of class '<em>Conditional Rule If</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Conditional Rule If</em>'.
+   * @generated
+   */
+  ConditionalRuleIf createConditionalRuleIf();
+
+  /**
+   * Returns a new object of class '<em>Call Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Call Rule</em>'.
+   * @generated
+   */
+  CallRule createCallRule();
+
+  /**
+   * Returns a new object of class '<em>Rule Update Variable</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Rule Update Variable</em>'.
+   * @generated
+   */
+  RuleUpdateVariable createRuleUpdateVariable();
+
+  /**
+   * Returns a new object of class '<em>GT Rule Invocation</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>GT Rule Invocation</em>'.
+   * @generated
+   */
+  GTRuleInvocation createGTRuleInvocation();
+
+  /**
+   * Returns a new object of class '<em>Rule Update ASM Function</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Rule Update ASM Function</em>'.
+   * @generated
+   */
+  RuleUpdateASMFunction createRuleUpdateASMFunction();
+
+  /**
+   * Returns a new object of class '<em>Fail Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Fail Rule</em>'.
+   * @generated
+   */
+  FailRule createFailRule();
+
+  /**
+   * Returns a new object of class '<em>Log Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Log Rule</em>'.
+   * @generated
+   */
+  LogRule createLogRule();
+
+  /**
+   * Returns a new object of class '<em>Print Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Print Rule</em>'.
+   * @generated
+   */
+  PrintRule createPrintRule();
+
+  /**
+   * Returns a new object of class '<em>Skip Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Skip Rule</em>'.
+   * @generated
+   */
+  SkipRule createSkipRule();
+
+  /**
+   * Returns a new object of class '<em>Print Ln Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Print Ln Rule</em>'.
+   * @generated
+   */
+  PrintLnRule createPrintLnRule();
+
+  /**
+   * Returns the package supported by this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the package supported by this factory.
+   * @generated
+   */
+  SimpleRulesPackage getSimpleRulesPackage();
+
+} //SimpleRulesFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/SimpleRulesPackage.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/SimpleRulesPackage.java
new file mode 100644
index 0000000..491a8dd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/SimpleRulesPackage.java
@@ -0,0 +1,2147 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ *   <li>each class,</li>
+ *   <li>each feature of each class,</li>
+ *   <li>each enum,</li>
+ *   <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface SimpleRulesPackage extends EPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The package name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNAME = "simpleRules";
+
+  /**
+   * The package namespace URI.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_URI = "http:///viatragtasmmodel/gtasm/metamodel/asm/simpleRules.ecore";
+
+  /**
+   * The package namespace name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_PREFIX = "viatragtasmmodel.gtasm.metamodel.asm.simpleRules";
+
+  /**
+   * The singleton instance of the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  SimpleRulesPackage eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl.init();
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ASMRuleInvocationImpl <em>ASM Rule Invocation</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ASMRuleInvocationImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getASMRuleInvocation()
+   * @generated
+   */
+  int ASM_RULE_INVOCATION = 12;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_RULE_INVOCATION__ANNOTATIONS = CorePackage.GTASM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_RULE_INVOCATION__NAME = CorePackage.GTASM_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_RULE_INVOCATION__ID = CorePackage.GTASM_ELEMENT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_RULE_INVOCATION__FQN = CorePackage.GTASM_ELEMENT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_RULE_INVOCATION__RUNTIME_ANNOTATIONS = CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_RULE_INVOCATION__CALLER = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_RULE_INVOCATION__ASM_RULE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>ASM Rule Invocation</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_RULE_INVOCATION_FEATURE_COUNT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ConditionalRuleTryImpl <em>Conditional Rule Try</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ConditionalRuleTryImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getConditionalRuleTry()
+   * @generated
+   */
+  int CONDITIONAL_RULE_TRY = 0;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_TRY__ANNOTATIONS = ASM_RULE_INVOCATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_TRY__NAME = ASM_RULE_INVOCATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_TRY__ID = ASM_RULE_INVOCATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_TRY__FQN = ASM_RULE_INVOCATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_TRY__RUNTIME_ANNOTATIONS = ASM_RULE_INVOCATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_TRY__CALLER = ASM_RULE_INVOCATION__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_TRY__ASM_RULE = ASM_RULE_INVOCATION__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Rule To Try</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_TRY__RULE_TO_TRY = ASM_RULE_INVOCATION_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Rule Else</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_TRY__RULE_ELSE = ASM_RULE_INVOCATION_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Conditional Rule Try</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_TRY_FEATURE_COUNT = ASM_RULE_INVOCATION_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ConditionalRuleIfImpl <em>Conditional Rule If</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ConditionalRuleIfImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getConditionalRuleIf()
+   * @generated
+   */
+  int CONDITIONAL_RULE_IF = 1;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_IF__ANNOTATIONS = ASM_RULE_INVOCATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_IF__NAME = ASM_RULE_INVOCATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_IF__ID = ASM_RULE_INVOCATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_IF__FQN = ASM_RULE_INVOCATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_IF__RUNTIME_ANNOTATIONS = ASM_RULE_INVOCATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_IF__CALLER = ASM_RULE_INVOCATION__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_IF__ASM_RULE = ASM_RULE_INVOCATION__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Expression To Test</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST = ASM_RULE_INVOCATION_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Rule True</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_IF__RULE_TRUE = ASM_RULE_INVOCATION_FEATURE_COUNT + 1;
+
+  /**
+   * The feature id for the '<em><b>Rule False</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_IF__RULE_FALSE = ASM_RULE_INVOCATION_FEATURE_COUNT + 2;
+
+  /**
+   * The number of structural features of the '<em>Conditional Rule If</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONDITIONAL_RULE_IF_FEATURE_COUNT = ASM_RULE_INVOCATION_FEATURE_COUNT + 3;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.CallRuleImpl <em>Call Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.CallRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getCallRule()
+   * @generated
+   */
+  int CALL_RULE = 2;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CALL_RULE__ANNOTATIONS = ASM_RULE_INVOCATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CALL_RULE__NAME = ASM_RULE_INVOCATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CALL_RULE__ID = ASM_RULE_INVOCATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CALL_RULE__FQN = ASM_RULE_INVOCATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CALL_RULE__RUNTIME_ANNOTATIONS = ASM_RULE_INVOCATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CALL_RULE__CALLER = ASM_RULE_INVOCATION__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CALL_RULE__ASM_RULE = ASM_RULE_INVOCATION__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Rule</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CALL_RULE__RULE = ASM_RULE_INVOCATION_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CALL_RULE__ACTUAL_PARAMETERS = ASM_RULE_INVOCATION_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Call Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CALL_RULE_FEATURE_COUNT = ASM_RULE_INVOCATION_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.RuleUpdateImpl <em>Rule Update</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.RuleUpdateImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getRuleUpdate()
+   * @generated
+   */
+  int RULE_UPDATE = 4;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE__ANNOTATIONS = ASM_RULE_INVOCATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE__NAME = ASM_RULE_INVOCATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE__ID = ASM_RULE_INVOCATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE__FQN = ASM_RULE_INVOCATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE__RUNTIME_ANNOTATIONS = ASM_RULE_INVOCATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE__CALLER = ASM_RULE_INVOCATION__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE__ASM_RULE = ASM_RULE_INVOCATION__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE__VALUE = ASM_RULE_INVOCATION_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>Rule Update</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_FEATURE_COUNT = ASM_RULE_INVOCATION_FEATURE_COUNT + 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.RuleUpdateVariableImpl <em>Rule Update Variable</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.RuleUpdateVariableImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getRuleUpdateVariable()
+   * @generated
+   */
+  int RULE_UPDATE_VARIABLE = 3;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_VARIABLE__ANNOTATIONS = RULE_UPDATE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_VARIABLE__NAME = RULE_UPDATE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_VARIABLE__ID = RULE_UPDATE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_VARIABLE__FQN = RULE_UPDATE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_VARIABLE__RUNTIME_ANNOTATIONS = RULE_UPDATE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_VARIABLE__CALLER = RULE_UPDATE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_VARIABLE__ASM_RULE = RULE_UPDATE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_VARIABLE__VALUE = RULE_UPDATE__VALUE;
+
+  /**
+   * The feature id for the '<em><b>Variable</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_VARIABLE__VARIABLE = RULE_UPDATE_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>Rule Update Variable</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_VARIABLE_FEATURE_COUNT = RULE_UPDATE_FEATURE_COUNT + 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.GTRuleInvocationImpl <em>GT Rule Invocation</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.GTRuleInvocationImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getGTRuleInvocation()
+   * @generated
+   */
+  int GT_RULE_INVOCATION = 5;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE_INVOCATION__ANNOTATIONS = ASM_RULE_INVOCATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE_INVOCATION__NAME = ASM_RULE_INVOCATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE_INVOCATION__ID = ASM_RULE_INVOCATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE_INVOCATION__FQN = ASM_RULE_INVOCATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE_INVOCATION__RUNTIME_ANNOTATIONS = ASM_RULE_INVOCATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE_INVOCATION__CALLER = ASM_RULE_INVOCATION__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE_INVOCATION__ASM_RULE = ASM_RULE_INVOCATION__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Rule</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE_INVOCATION__RULE = ASM_RULE_INVOCATION_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Invoker</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE_INVOCATION__INVOKER = ASM_RULE_INVOCATION_FEATURE_COUNT + 1;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE_INVOCATION__ACTUAL_PARAMETERS = ASM_RULE_INVOCATION_FEATURE_COUNT + 2;
+
+  /**
+   * The number of structural features of the '<em>GT Rule Invocation</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE_INVOCATION_FEATURE_COUNT = ASM_RULE_INVOCATION_FEATURE_COUNT + 3;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.RuleUpdateASMFunctionImpl <em>Rule Update ASM Function</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.RuleUpdateASMFunctionImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getRuleUpdateASMFunction()
+   * @generated
+   */
+  int RULE_UPDATE_ASM_FUNCTION = 6;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_ASM_FUNCTION__ANNOTATIONS = RULE_UPDATE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_ASM_FUNCTION__NAME = RULE_UPDATE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_ASM_FUNCTION__ID = RULE_UPDATE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_ASM_FUNCTION__FQN = RULE_UPDATE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_ASM_FUNCTION__RUNTIME_ANNOTATIONS = RULE_UPDATE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_ASM_FUNCTION__CALLER = RULE_UPDATE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_ASM_FUNCTION__ASM_RULE = RULE_UPDATE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_ASM_FUNCTION__VALUE = RULE_UPDATE__VALUE;
+
+  /**
+   * The feature id for the '<em><b>Locations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_ASM_FUNCTION__LOCATIONS = RULE_UPDATE_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Function</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_ASM_FUNCTION__FUNCTION = RULE_UPDATE_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Rule Update ASM Function</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RULE_UPDATE_ASM_FUNCTION_FEATURE_COUNT = RULE_UPDATE_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.FailRuleImpl <em>Fail Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.FailRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getFailRule()
+   * @generated
+   */
+  int FAIL_RULE = 7;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FAIL_RULE__ANNOTATIONS = ASM_RULE_INVOCATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FAIL_RULE__NAME = ASM_RULE_INVOCATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FAIL_RULE__ID = ASM_RULE_INVOCATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FAIL_RULE__FQN = ASM_RULE_INVOCATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FAIL_RULE__RUNTIME_ANNOTATIONS = ASM_RULE_INVOCATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FAIL_RULE__CALLER = ASM_RULE_INVOCATION__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FAIL_RULE__ASM_RULE = ASM_RULE_INVOCATION__ASM_RULE;
+
+  /**
+   * The number of structural features of the '<em>Fail Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FAIL_RULE_FEATURE_COUNT = ASM_RULE_INVOCATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.LogRuleImpl <em>Log Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.LogRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getLogRule()
+   * @generated
+   */
+  int LOG_RULE = 8;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LOG_RULE__ANNOTATIONS = ASM_RULE_INVOCATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LOG_RULE__NAME = ASM_RULE_INVOCATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LOG_RULE__ID = ASM_RULE_INVOCATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LOG_RULE__FQN = ASM_RULE_INVOCATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LOG_RULE__RUNTIME_ANNOTATIONS = ASM_RULE_INVOCATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LOG_RULE__CALLER = ASM_RULE_INVOCATION__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LOG_RULE__ASM_RULE = ASM_RULE_INVOCATION__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Out</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LOG_RULE__OUT = ASM_RULE_INVOCATION_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Level</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LOG_RULE__LEVEL = ASM_RULE_INVOCATION_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Log Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LOG_RULE_FEATURE_COUNT = ASM_RULE_INVOCATION_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.PrintRuleImpl <em>Print Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.PrintRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getPrintRule()
+   * @generated
+   */
+  int PRINT_RULE = 9;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_RULE__ANNOTATIONS = ASM_RULE_INVOCATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_RULE__NAME = ASM_RULE_INVOCATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_RULE__ID = ASM_RULE_INVOCATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_RULE__FQN = ASM_RULE_INVOCATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_RULE__RUNTIME_ANNOTATIONS = ASM_RULE_INVOCATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_RULE__CALLER = ASM_RULE_INVOCATION__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_RULE__ASM_RULE = ASM_RULE_INVOCATION__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Out</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_RULE__OUT = ASM_RULE_INVOCATION_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Buffer</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_RULE__BUFFER = ASM_RULE_INVOCATION_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Print Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_RULE_FEATURE_COUNT = ASM_RULE_INVOCATION_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SkipRuleImpl <em>Skip Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SkipRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getSkipRule()
+   * @generated
+   */
+  int SKIP_RULE = 10;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SKIP_RULE__ANNOTATIONS = ASM_RULE_INVOCATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SKIP_RULE__NAME = ASM_RULE_INVOCATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SKIP_RULE__ID = ASM_RULE_INVOCATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SKIP_RULE__FQN = ASM_RULE_INVOCATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SKIP_RULE__RUNTIME_ANNOTATIONS = ASM_RULE_INVOCATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SKIP_RULE__CALLER = ASM_RULE_INVOCATION__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SKIP_RULE__ASM_RULE = ASM_RULE_INVOCATION__ASM_RULE;
+
+  /**
+   * The number of structural features of the '<em>Skip Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SKIP_RULE_FEATURE_COUNT = ASM_RULE_INVOCATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ModelManipulationRuleImpl <em>Model Manipulation Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ModelManipulationRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getModelManipulationRule()
+   * @generated
+   */
+  int MODEL_MANIPULATION_RULE = 11;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_MANIPULATION_RULE__ANNOTATIONS = ASM_RULE_INVOCATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_MANIPULATION_RULE__NAME = ASM_RULE_INVOCATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_MANIPULATION_RULE__ID = ASM_RULE_INVOCATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_MANIPULATION_RULE__FQN = ASM_RULE_INVOCATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_MANIPULATION_RULE__RUNTIME_ANNOTATIONS = ASM_RULE_INVOCATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_MANIPULATION_RULE__CALLER = ASM_RULE_INVOCATION__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_MANIPULATION_RULE__ASM_RULE = ASM_RULE_INVOCATION__ASM_RULE;
+
+  /**
+   * The number of structural features of the '<em>Model Manipulation Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_MANIPULATION_RULE_FEATURE_COUNT = ASM_RULE_INVOCATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.PrintLnRuleImpl <em>Print Ln Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.PrintLnRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getPrintLnRule()
+   * @generated
+   */
+  int PRINT_LN_RULE = 13;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_LN_RULE__ANNOTATIONS = ASM_RULE_INVOCATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_LN_RULE__NAME = ASM_RULE_INVOCATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_LN_RULE__ID = ASM_RULE_INVOCATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_LN_RULE__FQN = ASM_RULE_INVOCATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_LN_RULE__RUNTIME_ANNOTATIONS = ASM_RULE_INVOCATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_LN_RULE__CALLER = ASM_RULE_INVOCATION__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_LN_RULE__ASM_RULE = ASM_RULE_INVOCATION__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Out</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_LN_RULE__OUT = ASM_RULE_INVOCATION_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Buffer</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_LN_RULE__BUFFER = ASM_RULE_INVOCATION_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Print Ln Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PRINT_LN_RULE_FEATURE_COUNT = ASM_RULE_INVOCATION_FEATURE_COUNT + 2;
+
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry <em>Conditional Rule Try</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Conditional Rule Try</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry
+   * @generated
+   */
+  EClass getConditionalRuleTry();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry#getRuleToTry <em>Rule To Try</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Rule To Try</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry#getRuleToTry()
+   * @see #getConditionalRuleTry()
+   * @generated
+   */
+  EReference getConditionalRuleTry_RuleToTry();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry#getRuleElse <em>Rule Else</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Rule Else</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry#getRuleElse()
+   * @see #getConditionalRuleTry()
+   * @generated
+   */
+  EReference getConditionalRuleTry_RuleElse();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf <em>Conditional Rule If</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Conditional Rule If</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf
+   * @generated
+   */
+  EClass getConditionalRuleIf();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf#getExpressionToTest <em>Expression To Test</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Expression To Test</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf#getExpressionToTest()
+   * @see #getConditionalRuleIf()
+   * @generated
+   */
+  EReference getConditionalRuleIf_ExpressionToTest();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf#getRuleTrue <em>Rule True</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Rule True</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf#getRuleTrue()
+   * @see #getConditionalRuleIf()
+   * @generated
+   */
+  EReference getConditionalRuleIf_RuleTrue();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf#getRuleFalse <em>Rule False</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Rule False</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf#getRuleFalse()
+   * @see #getConditionalRuleIf()
+   * @generated
+   */
+  EReference getConditionalRuleIf_RuleFalse();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule <em>Call Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Call Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule
+   * @generated
+   */
+  EClass getCallRule();
+
+  /**
+   * Returns the meta object for the reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule#getRule <em>Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference '<em>Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule#getRule()
+   * @see #getCallRule()
+   * @generated
+   */
+  EReference getCallRule_Rule();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule#getActualParameters <em>Actual Parameters</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Actual Parameters</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule#getActualParameters()
+   * @see #getCallRule()
+   * @generated
+   */
+  EReference getCallRule_ActualParameters();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateVariable <em>Rule Update Variable</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Rule Update Variable</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateVariable
+   * @generated
+   */
+  EClass getRuleUpdateVariable();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateVariable#getVariable <em>Variable</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Variable</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateVariable#getVariable()
+   * @see #getRuleUpdateVariable()
+   * @generated
+   */
+  EReference getRuleUpdateVariable_Variable();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdate <em>Rule Update</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Rule Update</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdate
+   * @generated
+   */
+  EClass getRuleUpdate();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdate#getValue <em>Value</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Value</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdate#getValue()
+   * @see #getRuleUpdate()
+   * @generated
+   */
+  EReference getRuleUpdate_Value();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation <em>GT Rule Invocation</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>GT Rule Invocation</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation
+   * @generated
+   */
+  EClass getGTRuleInvocation();
+
+  /**
+   * Returns the meta object for the reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation#getRule <em>Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference '<em>Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation#getRule()
+   * @see #getGTRuleInvocation()
+   * @generated
+   */
+  EReference getGTRuleInvocation_Rule();
+
+  /**
+   * Returns the meta object for the container reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation#getInvoker <em>Invoker</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the container reference '<em>Invoker</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation#getInvoker()
+   * @see #getGTRuleInvocation()
+   * @generated
+   */
+  EReference getGTRuleInvocation_Invoker();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation#getActualParameters <em>Actual Parameters</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Actual Parameters</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation#getActualParameters()
+   * @see #getGTRuleInvocation()
+   * @generated
+   */
+  EReference getGTRuleInvocation_ActualParameters();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction <em>Rule Update ASM Function</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Rule Update ASM Function</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction
+   * @generated
+   */
+  EClass getRuleUpdateASMFunction();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction#getLocations <em>Locations</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Locations</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction#getLocations()
+   * @see #getRuleUpdateASMFunction()
+   * @generated
+   */
+  EReference getRuleUpdateASMFunction_Locations();
+
+  /**
+   * Returns the meta object for the reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction#getFunction <em>Function</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference '<em>Function</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction#getFunction()
+   * @see #getRuleUpdateASMFunction()
+   * @generated
+   */
+  EReference getRuleUpdateASMFunction_Function();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.FailRule <em>Fail Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Fail Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.FailRule
+   * @generated
+   */
+  EClass getFailRule();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule <em>Log Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Log Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule
+   * @generated
+   */
+  EClass getLogRule();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule#getOut <em>Out</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Out</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule#getOut()
+   * @see #getLogRule()
+   * @generated
+   */
+  EReference getLogRule_Out();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule#getLevel <em>Level</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Level</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule#getLevel()
+   * @see #getLogRule()
+   * @generated
+   */
+  EAttribute getLogRule_Level();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule <em>Print Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Print Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule
+   * @generated
+   */
+  EClass getPrintRule();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule#getOut <em>Out</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Out</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule#getOut()
+   * @see #getPrintRule()
+   * @generated
+   */
+  EReference getPrintRule_Out();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule#getBuffer <em>Buffer</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Buffer</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule#getBuffer()
+   * @see #getPrintRule()
+   * @generated
+   */
+  EReference getPrintRule_Buffer();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SkipRule <em>Skip Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Skip Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SkipRule
+   * @generated
+   */
+  EClass getSkipRule();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule <em>Model Manipulation Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Model Manipulation Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule
+   * @generated
+   */
+  EClass getModelManipulationRule();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation <em>ASM Rule Invocation</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>ASM Rule Invocation</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation
+   * @generated
+   */
+  EClass getASMRuleInvocation();
+
+  /**
+   * Returns the meta object for the reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation#getCaller <em>Caller</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference '<em>Caller</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation#getCaller()
+   * @see #getASMRuleInvocation()
+   * @generated
+   */
+  EReference getASMRuleInvocation_Caller();
+
+  /**
+   * Returns the meta object for the container reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation#getAsmRule <em>Asm Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the container reference '<em>Asm Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation#getAsmRule()
+   * @see #getASMRuleInvocation()
+   * @generated
+   */
+  EReference getASMRuleInvocation_AsmRule();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule <em>Print Ln Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Print Ln Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule
+   * @generated
+   */
+  EClass getPrintLnRule();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule#getOut <em>Out</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Out</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule#getOut()
+   * @see #getPrintLnRule()
+   * @generated
+   */
+  EReference getPrintLnRule_Out();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule#getBuffer <em>Buffer</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Buffer</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule#getBuffer()
+   * @see #getPrintLnRule()
+   * @generated
+   */
+  EReference getPrintLnRule_Buffer();
+
+  /**
+   * Returns the factory that creates the instances of the model.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the factory that creates the instances of the model.
+   * @generated
+   */
+  SimpleRulesFactory getSimpleRulesFactory();
+
+  /**
+   * <!-- begin-user-doc -->
+   * Defines literals for the meta objects that represent
+   * <ul>
+   *   <li>each class,</li>
+   *   <li>each feature of each class,</li>
+   *   <li>each enum,</li>
+   *   <li>and each data type</li>
+   * </ul>
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  interface Literals
+  {
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ConditionalRuleTryImpl <em>Conditional Rule Try</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ConditionalRuleTryImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getConditionalRuleTry()
+     * @generated
+     */
+    EClass CONDITIONAL_RULE_TRY = eINSTANCE.getConditionalRuleTry();
+
+    /**
+     * The meta object literal for the '<em><b>Rule To Try</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference CONDITIONAL_RULE_TRY__RULE_TO_TRY = eINSTANCE.getConditionalRuleTry_RuleToTry();
+
+    /**
+     * The meta object literal for the '<em><b>Rule Else</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference CONDITIONAL_RULE_TRY__RULE_ELSE = eINSTANCE.getConditionalRuleTry_RuleElse();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ConditionalRuleIfImpl <em>Conditional Rule If</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ConditionalRuleIfImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getConditionalRuleIf()
+     * @generated
+     */
+    EClass CONDITIONAL_RULE_IF = eINSTANCE.getConditionalRuleIf();
+
+    /**
+     * The meta object literal for the '<em><b>Expression To Test</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST = eINSTANCE.getConditionalRuleIf_ExpressionToTest();
+
+    /**
+     * The meta object literal for the '<em><b>Rule True</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference CONDITIONAL_RULE_IF__RULE_TRUE = eINSTANCE.getConditionalRuleIf_RuleTrue();
+
+    /**
+     * The meta object literal for the '<em><b>Rule False</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference CONDITIONAL_RULE_IF__RULE_FALSE = eINSTANCE.getConditionalRuleIf_RuleFalse();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.CallRuleImpl <em>Call Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.CallRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getCallRule()
+     * @generated
+     */
+    EClass CALL_RULE = eINSTANCE.getCallRule();
+
+    /**
+     * The meta object literal for the '<em><b>Rule</b></em>' reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference CALL_RULE__RULE = eINSTANCE.getCallRule_Rule();
+
+    /**
+     * The meta object literal for the '<em><b>Actual Parameters</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference CALL_RULE__ACTUAL_PARAMETERS = eINSTANCE.getCallRule_ActualParameters();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.RuleUpdateVariableImpl <em>Rule Update Variable</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.RuleUpdateVariableImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getRuleUpdateVariable()
+     * @generated
+     */
+    EClass RULE_UPDATE_VARIABLE = eINSTANCE.getRuleUpdateVariable();
+
+    /**
+     * The meta object literal for the '<em><b>Variable</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference RULE_UPDATE_VARIABLE__VARIABLE = eINSTANCE.getRuleUpdateVariable_Variable();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.RuleUpdateImpl <em>Rule Update</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.RuleUpdateImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getRuleUpdate()
+     * @generated
+     */
+    EClass RULE_UPDATE = eINSTANCE.getRuleUpdate();
+
+    /**
+     * The meta object literal for the '<em><b>Value</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference RULE_UPDATE__VALUE = eINSTANCE.getRuleUpdate_Value();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.GTRuleInvocationImpl <em>GT Rule Invocation</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.GTRuleInvocationImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getGTRuleInvocation()
+     * @generated
+     */
+    EClass GT_RULE_INVOCATION = eINSTANCE.getGTRuleInvocation();
+
+    /**
+     * The meta object literal for the '<em><b>Rule</b></em>' reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_RULE_INVOCATION__RULE = eINSTANCE.getGTRuleInvocation_Rule();
+
+    /**
+     * The meta object literal for the '<em><b>Invoker</b></em>' container reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_RULE_INVOCATION__INVOKER = eINSTANCE.getGTRuleInvocation_Invoker();
+
+    /**
+     * The meta object literal for the '<em><b>Actual Parameters</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_RULE_INVOCATION__ACTUAL_PARAMETERS = eINSTANCE.getGTRuleInvocation_ActualParameters();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.RuleUpdateASMFunctionImpl <em>Rule Update ASM Function</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.RuleUpdateASMFunctionImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getRuleUpdateASMFunction()
+     * @generated
+     */
+    EClass RULE_UPDATE_ASM_FUNCTION = eINSTANCE.getRuleUpdateASMFunction();
+
+    /**
+     * The meta object literal for the '<em><b>Locations</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference RULE_UPDATE_ASM_FUNCTION__LOCATIONS = eINSTANCE.getRuleUpdateASMFunction_Locations();
+
+    /**
+     * The meta object literal for the '<em><b>Function</b></em>' reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference RULE_UPDATE_ASM_FUNCTION__FUNCTION = eINSTANCE.getRuleUpdateASMFunction_Function();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.FailRuleImpl <em>Fail Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.FailRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getFailRule()
+     * @generated
+     */
+    EClass FAIL_RULE = eINSTANCE.getFailRule();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.LogRuleImpl <em>Log Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.LogRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getLogRule()
+     * @generated
+     */
+    EClass LOG_RULE = eINSTANCE.getLogRule();
+
+    /**
+     * The meta object literal for the '<em><b>Out</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference LOG_RULE__OUT = eINSTANCE.getLogRule_Out();
+
+    /**
+     * The meta object literal for the '<em><b>Level</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute LOG_RULE__LEVEL = eINSTANCE.getLogRule_Level();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.PrintRuleImpl <em>Print Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.PrintRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getPrintRule()
+     * @generated
+     */
+    EClass PRINT_RULE = eINSTANCE.getPrintRule();
+
+    /**
+     * The meta object literal for the '<em><b>Out</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference PRINT_RULE__OUT = eINSTANCE.getPrintRule_Out();
+
+    /**
+     * The meta object literal for the '<em><b>Buffer</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference PRINT_RULE__BUFFER = eINSTANCE.getPrintRule_Buffer();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SkipRuleImpl <em>Skip Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SkipRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getSkipRule()
+     * @generated
+     */
+    EClass SKIP_RULE = eINSTANCE.getSkipRule();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ModelManipulationRuleImpl <em>Model Manipulation Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ModelManipulationRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getModelManipulationRule()
+     * @generated
+     */
+    EClass MODEL_MANIPULATION_RULE = eINSTANCE.getModelManipulationRule();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ASMRuleInvocationImpl <em>ASM Rule Invocation</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ASMRuleInvocationImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getASMRuleInvocation()
+     * @generated
+     */
+    EClass ASM_RULE_INVOCATION = eINSTANCE.getASMRuleInvocation();
+
+    /**
+     * The meta object literal for the '<em><b>Caller</b></em>' reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference ASM_RULE_INVOCATION__CALLER = eINSTANCE.getASMRuleInvocation_Caller();
+
+    /**
+     * The meta object literal for the '<em><b>Asm Rule</b></em>' container reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference ASM_RULE_INVOCATION__ASM_RULE = eINSTANCE.getASMRuleInvocation_AsmRule();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.PrintLnRuleImpl <em>Print Ln Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.PrintLnRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl#getPrintLnRule()
+     * @generated
+     */
+    EClass PRINT_LN_RULE = eINSTANCE.getPrintLnRule();
+
+    /**
+     * The meta object literal for the '<em><b>Out</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference PRINT_LN_RULE__OUT = eINSTANCE.getPrintLnRule_Out();
+
+    /**
+     * The meta object literal for the '<em><b>Buffer</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference PRINT_LN_RULE__BUFFER = eINSTANCE.getPrintLnRule_Buffer();
+
+  }
+
+} //SimpleRulesPackage
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/SkipRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/SkipRule.java
new file mode 100644
index 0000000..d506834
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/SkipRule.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Skip Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#getSkipRule()
+ * @model
+ * @generated
+ */
+public interface SkipRule extends ASMRuleInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // SkipRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/ASMRuleInvocationImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/ASMRuleInvocationImpl.java
new file mode 100644
index 0000000..c98d2ab
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/ASMRuleInvocationImpl.java
@@ -0,0 +1,301 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>ASM Rule Invocation</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ASMRuleInvocationImpl#getCaller <em>Caller</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ASMRuleInvocationImpl#getAsmRule <em>Asm Rule</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class ASMRuleInvocationImpl extends GTASMElementImpl implements ASMRuleInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getCaller() <em>Caller</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getCaller()
+   * @generated
+   * @ordered
+   */
+  protected ASMRuleInvocation caller;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ASMRuleInvocationImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return SimpleRulesPackage.Literals.ASM_RULE_INVOCATION;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ASMRuleInvocation getCaller()
+  {
+    if (caller != null && caller.eIsProxy())
+    {
+      InternalEObject oldCaller = (InternalEObject)caller;
+      caller = (ASMRuleInvocation)eResolveProxy(oldCaller);
+      if (caller != oldCaller)
+      {
+        if (eNotificationRequired())
+          eNotify(new ENotificationImpl(this, Notification.RESOLVE, SimpleRulesPackage.ASM_RULE_INVOCATION__CALLER, oldCaller, caller));
+      }
+    }
+    return caller;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ASMRuleInvocation basicGetCaller()
+  {
+    return caller;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setCaller(ASMRuleInvocation newCaller)
+  {
+    ASMRuleInvocation oldCaller = caller;
+    caller = newCaller;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.ASM_RULE_INVOCATION__CALLER, oldCaller, caller));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Rule getAsmRule()
+  {
+    if (eContainerFeatureID() != SimpleRulesPackage.ASM_RULE_INVOCATION__ASM_RULE) return null;
+    return (Rule)eContainer();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetAsmRule(Rule newAsmRule, NotificationChain msgs)
+  {
+    msgs = eBasicSetContainer((InternalEObject)newAsmRule, SimpleRulesPackage.ASM_RULE_INVOCATION__ASM_RULE, msgs);
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setAsmRule(Rule newAsmRule)
+  {
+    if (newAsmRule != eInternalContainer() || (eContainerFeatureID() != SimpleRulesPackage.ASM_RULE_INVOCATION__ASM_RULE && newAsmRule != null))
+    {
+      if (EcoreUtil.isAncestor(this, newAsmRule))
+        throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+      NotificationChain msgs = null;
+      if (eInternalContainer() != null)
+        msgs = eBasicRemoveFromContainer(msgs);
+      if (newAsmRule != null)
+        msgs = ((InternalEObject)newAsmRule).eInverseAdd(this, DefinitionsPackage.RULE__BODY, Rule.class, msgs);
+      msgs = basicSetAsmRule(newAsmRule, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.ASM_RULE_INVOCATION__ASM_RULE, newAsmRule, newAsmRule));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.ASM_RULE_INVOCATION__ASM_RULE:
+        if (eInternalContainer() != null)
+          msgs = eBasicRemoveFromContainer(msgs);
+        return basicSetAsmRule((Rule)otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.ASM_RULE_INVOCATION__ASM_RULE:
+        return basicSetAsmRule(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
+  {
+    switch (eContainerFeatureID())
+    {
+      case SimpleRulesPackage.ASM_RULE_INVOCATION__ASM_RULE:
+        return eInternalContainer().eInverseRemove(this, DefinitionsPackage.RULE__BODY, Rule.class, msgs);
+    }
+    return super.eBasicRemoveFromContainerFeature(msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.ASM_RULE_INVOCATION__CALLER:
+        if (resolve) return getCaller();
+        return basicGetCaller();
+      case SimpleRulesPackage.ASM_RULE_INVOCATION__ASM_RULE:
+        return getAsmRule();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.ASM_RULE_INVOCATION__CALLER:
+        setCaller((ASMRuleInvocation)newValue);
+        return;
+      case SimpleRulesPackage.ASM_RULE_INVOCATION__ASM_RULE:
+        setAsmRule((Rule)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.ASM_RULE_INVOCATION__CALLER:
+        setCaller((ASMRuleInvocation)null);
+        return;
+      case SimpleRulesPackage.ASM_RULE_INVOCATION__ASM_RULE:
+        setAsmRule((Rule)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.ASM_RULE_INVOCATION__CALLER:
+        return caller != null;
+      case SimpleRulesPackage.ASM_RULE_INVOCATION__ASM_RULE:
+        return getAsmRule() != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //ASMRuleInvocationImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/CallRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/CallRuleImpl.java
new file mode 100644
index 0000000..e556612
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/CallRuleImpl.java
@@ -0,0 +1,252 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Call Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.CallRuleImpl#getRule <em>Rule</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.CallRuleImpl#getActualParameters <em>Actual Parameters</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class CallRuleImpl extends ASMRuleInvocationImpl implements CallRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getRule() <em>Rule</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getRule()
+   * @generated
+   * @ordered
+   */
+  protected Rule rule;
+
+  /**
+   * The cached value of the '{@link #getActualParameters() <em>Actual Parameters</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getActualParameters()
+   * @generated
+   * @ordered
+   */
+  protected EList<Term> actualParameters;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected CallRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return SimpleRulesPackage.Literals.CALL_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Rule getRule()
+  {
+    if (rule != null && rule.eIsProxy())
+    {
+      InternalEObject oldRule = (InternalEObject)rule;
+      rule = (Rule)eResolveProxy(oldRule);
+      if (rule != oldRule)
+      {
+        if (eNotificationRequired())
+          eNotify(new ENotificationImpl(this, Notification.RESOLVE, SimpleRulesPackage.CALL_RULE__RULE, oldRule, rule));
+      }
+    }
+    return rule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Rule basicGetRule()
+  {
+    return rule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setRule(Rule newRule)
+  {
+    Rule oldRule = rule;
+    rule = newRule;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.CALL_RULE__RULE, oldRule, rule));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Term> getActualParameters()
+  {
+    if (actualParameters == null)
+    {
+      actualParameters = new EObjectContainmentEList<Term>(Term.class, this, SimpleRulesPackage.CALL_RULE__ACTUAL_PARAMETERS);
+    }
+    return actualParameters;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.CALL_RULE__ACTUAL_PARAMETERS:
+        return ((InternalEList<?>)getActualParameters()).basicRemove(otherEnd, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.CALL_RULE__RULE:
+        if (resolve) return getRule();
+        return basicGetRule();
+      case SimpleRulesPackage.CALL_RULE__ACTUAL_PARAMETERS:
+        return getActualParameters();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.CALL_RULE__RULE:
+        setRule((Rule)newValue);
+        return;
+      case SimpleRulesPackage.CALL_RULE__ACTUAL_PARAMETERS:
+        getActualParameters().clear();
+        getActualParameters().addAll((Collection<? extends Term>)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.CALL_RULE__RULE:
+        setRule((Rule)null);
+        return;
+      case SimpleRulesPackage.CALL_RULE__ACTUAL_PARAMETERS:
+        getActualParameters().clear();
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.CALL_RULE__RULE:
+        return rule != null;
+      case SimpleRulesPackage.CALL_RULE__ACTUAL_PARAMETERS:
+        return actualParameters != null && !actualParameters.isEmpty();
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //CallRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/ConditionalRuleIfImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/ConditionalRuleIfImpl.java
new file mode 100644
index 0000000..42ac254
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/ConditionalRuleIfImpl.java
@@ -0,0 +1,353 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Conditional Rule If</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ConditionalRuleIfImpl#getExpressionToTest <em>Expression To Test</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ConditionalRuleIfImpl#getRuleTrue <em>Rule True</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ConditionalRuleIfImpl#getRuleFalse <em>Rule False</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ConditionalRuleIfImpl extends ASMRuleInvocationImpl implements ConditionalRuleIf
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getExpressionToTest() <em>Expression To Test</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getExpressionToTest()
+   * @generated
+   * @ordered
+   */
+  protected Term expressionToTest;
+
+  /**
+   * The cached value of the '{@link #getRuleTrue() <em>Rule True</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getRuleTrue()
+   * @generated
+   * @ordered
+   */
+  protected ASMRuleInvocation ruleTrue;
+
+  /**
+   * The cached value of the '{@link #getRuleFalse() <em>Rule False</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getRuleFalse()
+   * @generated
+   * @ordered
+   */
+  protected ASMRuleInvocation ruleFalse;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ConditionalRuleIfImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return SimpleRulesPackage.Literals.CONDITIONAL_RULE_IF;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getExpressionToTest()
+  {
+    return expressionToTest;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetExpressionToTest(Term newExpressionToTest, NotificationChain msgs)
+  {
+    Term oldExpressionToTest = expressionToTest;
+    expressionToTest = newExpressionToTest;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST, oldExpressionToTest, newExpressionToTest);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setExpressionToTest(Term newExpressionToTest)
+  {
+    if (newExpressionToTest != expressionToTest)
+    {
+      NotificationChain msgs = null;
+      if (expressionToTest != null)
+        msgs = ((InternalEObject)expressionToTest).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST, null, msgs);
+      if (newExpressionToTest != null)
+        msgs = ((InternalEObject)newExpressionToTest).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST, null, msgs);
+      msgs = basicSetExpressionToTest(newExpressionToTest, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST, newExpressionToTest, newExpressionToTest));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ASMRuleInvocation getRuleTrue()
+  {
+    return ruleTrue;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetRuleTrue(ASMRuleInvocation newRuleTrue, NotificationChain msgs)
+  {
+    ASMRuleInvocation oldRuleTrue = ruleTrue;
+    ruleTrue = newRuleTrue;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_TRUE, oldRuleTrue, newRuleTrue);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setRuleTrue(ASMRuleInvocation newRuleTrue)
+  {
+    if (newRuleTrue != ruleTrue)
+    {
+      NotificationChain msgs = null;
+      if (ruleTrue != null)
+        msgs = ((InternalEObject)ruleTrue).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_TRUE, null, msgs);
+      if (newRuleTrue != null)
+        msgs = ((InternalEObject)newRuleTrue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_TRUE, null, msgs);
+      msgs = basicSetRuleTrue(newRuleTrue, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_TRUE, newRuleTrue, newRuleTrue));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ASMRuleInvocation getRuleFalse()
+  {
+    return ruleFalse;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetRuleFalse(ASMRuleInvocation newRuleFalse, NotificationChain msgs)
+  {
+    ASMRuleInvocation oldRuleFalse = ruleFalse;
+    ruleFalse = newRuleFalse;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_FALSE, oldRuleFalse, newRuleFalse);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setRuleFalse(ASMRuleInvocation newRuleFalse)
+  {
+    if (newRuleFalse != ruleFalse)
+    {
+      NotificationChain msgs = null;
+      if (ruleFalse != null)
+        msgs = ((InternalEObject)ruleFalse).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_FALSE, null, msgs);
+      if (newRuleFalse != null)
+        msgs = ((InternalEObject)newRuleFalse).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_FALSE, null, msgs);
+      msgs = basicSetRuleFalse(newRuleFalse, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_FALSE, newRuleFalse, newRuleFalse));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST:
+        return basicSetExpressionToTest(null, msgs);
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_TRUE:
+        return basicSetRuleTrue(null, msgs);
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_FALSE:
+        return basicSetRuleFalse(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST:
+        return getExpressionToTest();
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_TRUE:
+        return getRuleTrue();
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_FALSE:
+        return getRuleFalse();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST:
+        setExpressionToTest((Term)newValue);
+        return;
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_TRUE:
+        setRuleTrue((ASMRuleInvocation)newValue);
+        return;
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_FALSE:
+        setRuleFalse((ASMRuleInvocation)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST:
+        setExpressionToTest((Term)null);
+        return;
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_TRUE:
+        setRuleTrue((ASMRuleInvocation)null);
+        return;
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_FALSE:
+        setRuleFalse((ASMRuleInvocation)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST:
+        return expressionToTest != null;
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_TRUE:
+        return ruleTrue != null;
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF__RULE_FALSE:
+        return ruleFalse != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //ConditionalRuleIfImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/ConditionalRuleTryImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/ConditionalRuleTryImpl.java
new file mode 100644
index 0000000..324f00d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/ConditionalRuleTryImpl.java
@@ -0,0 +1,280 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Conditional Rule Try</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ConditionalRuleTryImpl#getRuleToTry <em>Rule To Try</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ConditionalRuleTryImpl#getRuleElse <em>Rule Else</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ConditionalRuleTryImpl extends ASMRuleInvocationImpl implements ConditionalRuleTry
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getRuleToTry() <em>Rule To Try</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getRuleToTry()
+   * @generated
+   * @ordered
+   */
+  protected ASMRuleInvocation ruleToTry;
+
+  /**
+   * The cached value of the '{@link #getRuleElse() <em>Rule Else</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getRuleElse()
+   * @generated
+   * @ordered
+   */
+  protected ASMRuleInvocation ruleElse;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ConditionalRuleTryImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return SimpleRulesPackage.Literals.CONDITIONAL_RULE_TRY;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ASMRuleInvocation getRuleToTry()
+  {
+    return ruleToTry;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetRuleToTry(ASMRuleInvocation newRuleToTry, NotificationChain msgs)
+  {
+    ASMRuleInvocation oldRuleToTry = ruleToTry;
+    ruleToTry = newRuleToTry;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_TO_TRY, oldRuleToTry, newRuleToTry);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setRuleToTry(ASMRuleInvocation newRuleToTry)
+  {
+    if (newRuleToTry != ruleToTry)
+    {
+      NotificationChain msgs = null;
+      if (ruleToTry != null)
+        msgs = ((InternalEObject)ruleToTry).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_TO_TRY, null, msgs);
+      if (newRuleToTry != null)
+        msgs = ((InternalEObject)newRuleToTry).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_TO_TRY, null, msgs);
+      msgs = basicSetRuleToTry(newRuleToTry, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_TO_TRY, newRuleToTry, newRuleToTry));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ASMRuleInvocation getRuleElse()
+  {
+    return ruleElse;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetRuleElse(ASMRuleInvocation newRuleElse, NotificationChain msgs)
+  {
+    ASMRuleInvocation oldRuleElse = ruleElse;
+    ruleElse = newRuleElse;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_ELSE, oldRuleElse, newRuleElse);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setRuleElse(ASMRuleInvocation newRuleElse)
+  {
+    if (newRuleElse != ruleElse)
+    {
+      NotificationChain msgs = null;
+      if (ruleElse != null)
+        msgs = ((InternalEObject)ruleElse).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_ELSE, null, msgs);
+      if (newRuleElse != null)
+        msgs = ((InternalEObject)newRuleElse).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_ELSE, null, msgs);
+      msgs = basicSetRuleElse(newRuleElse, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_ELSE, newRuleElse, newRuleElse));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_TO_TRY:
+        return basicSetRuleToTry(null, msgs);
+      case SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_ELSE:
+        return basicSetRuleElse(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_TO_TRY:
+        return getRuleToTry();
+      case SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_ELSE:
+        return getRuleElse();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_TO_TRY:
+        setRuleToTry((ASMRuleInvocation)newValue);
+        return;
+      case SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_ELSE:
+        setRuleElse((ASMRuleInvocation)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_TO_TRY:
+        setRuleToTry((ASMRuleInvocation)null);
+        return;
+      case SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_ELSE:
+        setRuleElse((ASMRuleInvocation)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_TO_TRY:
+        return ruleToTry != null;
+      case SimpleRulesPackage.CONDITIONAL_RULE_TRY__RULE_ELSE:
+        return ruleElse != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //ConditionalRuleTryImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/FailRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/FailRuleImpl.java
new file mode 100644
index 0000000..d0da41a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/FailRuleImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.FailRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Fail Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class FailRuleImpl extends ASMRuleInvocationImpl implements FailRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected FailRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return SimpleRulesPackage.Literals.FAIL_RULE;
+  }
+
+} //FailRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/GTRuleInvocationImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/GTRuleInvocationImpl.java
new file mode 100644
index 0000000..753058f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/GTRuleInvocationImpl.java
@@ -0,0 +1,348 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>GT Rule Invocation</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.GTRuleInvocationImpl#getRule <em>Rule</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.GTRuleInvocationImpl#getInvoker <em>Invoker</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.GTRuleInvocationImpl#getActualParameters <em>Actual Parameters</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class GTRuleInvocationImpl extends ASMRuleInvocationImpl implements GTRuleInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getRule() <em>Rule</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getRule()
+   * @generated
+   * @ordered
+   */
+  protected GTRule rule;
+
+  /**
+   * The cached value of the '{@link #getActualParameters() <em>Actual Parameters</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getActualParameters()
+   * @generated
+   * @ordered
+   */
+  protected EList<Term> actualParameters;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected GTRuleInvocationImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return SimpleRulesPackage.Literals.GT_RULE_INVOCATION;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTRule getRule()
+  {
+    if (rule != null && rule.eIsProxy())
+    {
+      InternalEObject oldRule = (InternalEObject)rule;
+      rule = (GTRule)eResolveProxy(oldRule);
+      if (rule != oldRule)
+      {
+        if (eNotificationRequired())
+          eNotify(new ENotificationImpl(this, Notification.RESOLVE, SimpleRulesPackage.GT_RULE_INVOCATION__RULE, oldRule, rule));
+      }
+    }
+    return rule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTRule basicGetRule()
+  {
+    return rule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setRule(GTRule newRule)
+  {
+    GTRule oldRule = rule;
+    rule = newRule;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.GT_RULE_INVOCATION__RULE, oldRule, rule));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CollectionIteratorRule getInvoker()
+  {
+    if (eContainerFeatureID() != SimpleRulesPackage.GT_RULE_INVOCATION__INVOKER) return null;
+    return (CollectionIteratorRule)eContainer();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetInvoker(CollectionIteratorRule newInvoker, NotificationChain msgs)
+  {
+    msgs = eBasicSetContainer((InternalEObject)newInvoker, SimpleRulesPackage.GT_RULE_INVOCATION__INVOKER, msgs);
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setInvoker(CollectionIteratorRule newInvoker)
+  {
+    if (newInvoker != eInternalContainer() || (eContainerFeatureID() != SimpleRulesPackage.GT_RULE_INVOCATION__INVOKER && newInvoker != null))
+    {
+      if (EcoreUtil.isAncestor(this, newInvoker))
+        throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+      NotificationChain msgs = null;
+      if (eInternalContainer() != null)
+        msgs = eBasicRemoveFromContainer(msgs);
+      if (newInvoker != null)
+        msgs = ((InternalEObject)newInvoker).eInverseAdd(this, CompoundRulesPackage.COLLECTION_ITERATOR_RULE__GTRULE, CollectionIteratorRule.class, msgs);
+      msgs = basicSetInvoker(newInvoker, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.GT_RULE_INVOCATION__INVOKER, newInvoker, newInvoker));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Term> getActualParameters()
+  {
+    if (actualParameters == null)
+    {
+      actualParameters = new EObjectContainmentEList<Term>(Term.class, this, SimpleRulesPackage.GT_RULE_INVOCATION__ACTUAL_PARAMETERS);
+    }
+    return actualParameters;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.GT_RULE_INVOCATION__INVOKER:
+        if (eInternalContainer() != null)
+          msgs = eBasicRemoveFromContainer(msgs);
+        return basicSetInvoker((CollectionIteratorRule)otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.GT_RULE_INVOCATION__INVOKER:
+        return basicSetInvoker(null, msgs);
+      case SimpleRulesPackage.GT_RULE_INVOCATION__ACTUAL_PARAMETERS:
+        return ((InternalEList<?>)getActualParameters()).basicRemove(otherEnd, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
+  {
+    switch (eContainerFeatureID())
+    {
+      case SimpleRulesPackage.GT_RULE_INVOCATION__INVOKER:
+        return eInternalContainer().eInverseRemove(this, CompoundRulesPackage.COLLECTION_ITERATOR_RULE__GTRULE, CollectionIteratorRule.class, msgs);
+    }
+    return super.eBasicRemoveFromContainerFeature(msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.GT_RULE_INVOCATION__RULE:
+        if (resolve) return getRule();
+        return basicGetRule();
+      case SimpleRulesPackage.GT_RULE_INVOCATION__INVOKER:
+        return getInvoker();
+      case SimpleRulesPackage.GT_RULE_INVOCATION__ACTUAL_PARAMETERS:
+        return getActualParameters();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.GT_RULE_INVOCATION__RULE:
+        setRule((GTRule)newValue);
+        return;
+      case SimpleRulesPackage.GT_RULE_INVOCATION__INVOKER:
+        setInvoker((CollectionIteratorRule)newValue);
+        return;
+      case SimpleRulesPackage.GT_RULE_INVOCATION__ACTUAL_PARAMETERS:
+        getActualParameters().clear();
+        getActualParameters().addAll((Collection<? extends Term>)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.GT_RULE_INVOCATION__RULE:
+        setRule((GTRule)null);
+        return;
+      case SimpleRulesPackage.GT_RULE_INVOCATION__INVOKER:
+        setInvoker((CollectionIteratorRule)null);
+        return;
+      case SimpleRulesPackage.GT_RULE_INVOCATION__ACTUAL_PARAMETERS:
+        getActualParameters().clear();
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.GT_RULE_INVOCATION__RULE:
+        return rule != null;
+      case SimpleRulesPackage.GT_RULE_INVOCATION__INVOKER:
+        return getInvoker() != null;
+      case SimpleRulesPackage.GT_RULE_INVOCATION__ACTUAL_PARAMETERS:
+        return actualParameters != null && !actualParameters.isEmpty();
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //GTRuleInvocationImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/LogRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/LogRuleImpl.java
new file mode 100644
index 0000000..bf84219
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/LogRuleImpl.java
@@ -0,0 +1,283 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.LogLevel;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Log Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.LogRuleImpl#getOut <em>Out</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.LogRuleImpl#getLevel <em>Level</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class LogRuleImpl extends ASMRuleInvocationImpl implements LogRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getOut() <em>Out</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getOut()
+   * @generated
+   * @ordered
+   */
+  protected Term out;
+
+  /**
+   * The default value of the '{@link #getLevel() <em>Level</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getLevel()
+   * @generated
+   * @ordered
+   */
+  protected static final LogLevel LEVEL_EDEFAULT = LogLevel.DEBUG_LITERAL;
+
+  /**
+   * The cached value of the '{@link #getLevel() <em>Level</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getLevel()
+   * @generated
+   * @ordered
+   */
+  protected LogLevel level = LEVEL_EDEFAULT;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected LogRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return SimpleRulesPackage.Literals.LOG_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getOut()
+  {
+    return out;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetOut(Term newOut, NotificationChain msgs)
+  {
+    Term oldOut = out;
+    out = newOut;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.LOG_RULE__OUT, oldOut, newOut);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setOut(Term newOut)
+  {
+    if (newOut != out)
+    {
+      NotificationChain msgs = null;
+      if (out != null)
+        msgs = ((InternalEObject)out).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.LOG_RULE__OUT, null, msgs);
+      if (newOut != null)
+        msgs = ((InternalEObject)newOut).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.LOG_RULE__OUT, null, msgs);
+      msgs = basicSetOut(newOut, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.LOG_RULE__OUT, newOut, newOut));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public LogLevel getLevel()
+  {
+    return level;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setLevel(LogLevel newLevel)
+  {
+    LogLevel oldLevel = level;
+    level = newLevel == null ? LEVEL_EDEFAULT : newLevel;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.LOG_RULE__LEVEL, oldLevel, level));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.LOG_RULE__OUT:
+        return basicSetOut(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.LOG_RULE__OUT:
+        return getOut();
+      case SimpleRulesPackage.LOG_RULE__LEVEL:
+        return getLevel();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.LOG_RULE__OUT:
+        setOut((Term)newValue);
+        return;
+      case SimpleRulesPackage.LOG_RULE__LEVEL:
+        setLevel((LogLevel)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.LOG_RULE__OUT:
+        setOut((Term)null);
+        return;
+      case SimpleRulesPackage.LOG_RULE__LEVEL:
+        setLevel(LEVEL_EDEFAULT);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.LOG_RULE__OUT:
+        return out != null;
+      case SimpleRulesPackage.LOG_RULE__LEVEL:
+        return level != LEVEL_EDEFAULT;
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (level: ");
+    result.append(level);
+    result.append(')');
+    return result.toString();
+  }
+
+} //LogRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/ModelManipulationRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/ModelManipulationRuleImpl.java
new file mode 100644
index 0000000..3eb41ca
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/ModelManipulationRuleImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Model Manipulation Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class ModelManipulationRuleImpl extends ASMRuleInvocationImpl implements ModelManipulationRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ModelManipulationRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return SimpleRulesPackage.Literals.MODEL_MANIPULATION_RULE;
+  }
+
+} //ModelManipulationRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/PrintLnRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/PrintLnRuleImpl.java
new file mode 100644
index 0000000..d24f37a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/PrintLnRuleImpl.java
@@ -0,0 +1,281 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Print Ln Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.PrintLnRuleImpl#getOut <em>Out</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.PrintLnRuleImpl#getBuffer <em>Buffer</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PrintLnRuleImpl extends ASMRuleInvocationImpl implements PrintLnRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getOut() <em>Out</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getOut()
+   * @generated
+   * @ordered
+   */
+  protected Term out;
+
+  /**
+   * The cached value of the '{@link #getBuffer() <em>Buffer</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getBuffer()
+   * @generated
+   * @ordered
+   */
+  protected Term buffer;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected PrintLnRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return SimpleRulesPackage.Literals.PRINT_LN_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getOut()
+  {
+    return out;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetOut(Term newOut, NotificationChain msgs)
+  {
+    Term oldOut = out;
+    out = newOut;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.PRINT_LN_RULE__OUT, oldOut, newOut);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setOut(Term newOut)
+  {
+    if (newOut != out)
+    {
+      NotificationChain msgs = null;
+      if (out != null)
+        msgs = ((InternalEObject)out).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.PRINT_LN_RULE__OUT, null, msgs);
+      if (newOut != null)
+        msgs = ((InternalEObject)newOut).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.PRINT_LN_RULE__OUT, null, msgs);
+      msgs = basicSetOut(newOut, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.PRINT_LN_RULE__OUT, newOut, newOut));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getBuffer()
+  {
+    return buffer;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetBuffer(Term newBuffer, NotificationChain msgs)
+  {
+    Term oldBuffer = buffer;
+    buffer = newBuffer;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.PRINT_LN_RULE__BUFFER, oldBuffer, newBuffer);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setBuffer(Term newBuffer)
+  {
+    if (newBuffer != buffer)
+    {
+      NotificationChain msgs = null;
+      if (buffer != null)
+        msgs = ((InternalEObject)buffer).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.PRINT_LN_RULE__BUFFER, null, msgs);
+      if (newBuffer != null)
+        msgs = ((InternalEObject)newBuffer).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.PRINT_LN_RULE__BUFFER, null, msgs);
+      msgs = basicSetBuffer(newBuffer, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.PRINT_LN_RULE__BUFFER, newBuffer, newBuffer));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.PRINT_LN_RULE__OUT:
+        return basicSetOut(null, msgs);
+      case SimpleRulesPackage.PRINT_LN_RULE__BUFFER:
+        return basicSetBuffer(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.PRINT_LN_RULE__OUT:
+        return getOut();
+      case SimpleRulesPackage.PRINT_LN_RULE__BUFFER:
+        return getBuffer();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.PRINT_LN_RULE__OUT:
+        setOut((Term)newValue);
+        return;
+      case SimpleRulesPackage.PRINT_LN_RULE__BUFFER:
+        setBuffer((Term)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.PRINT_LN_RULE__OUT:
+        setOut((Term)null);
+        return;
+      case SimpleRulesPackage.PRINT_LN_RULE__BUFFER:
+        setBuffer((Term)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.PRINT_LN_RULE__OUT:
+        return out != null;
+      case SimpleRulesPackage.PRINT_LN_RULE__BUFFER:
+        return buffer != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //PrintLnRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/PrintRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/PrintRuleImpl.java
new file mode 100644
index 0000000..d07ce6c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/PrintRuleImpl.java
@@ -0,0 +1,281 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Print Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.PrintRuleImpl#getOut <em>Out</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.PrintRuleImpl#getBuffer <em>Buffer</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PrintRuleImpl extends ASMRuleInvocationImpl implements PrintRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getOut() <em>Out</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getOut()
+   * @generated
+   * @ordered
+   */
+  protected Term out;
+
+  /**
+   * The cached value of the '{@link #getBuffer() <em>Buffer</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getBuffer()
+   * @generated
+   * @ordered
+   */
+  protected Term buffer;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected PrintRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return SimpleRulesPackage.Literals.PRINT_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getOut()
+  {
+    return out;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetOut(Term newOut, NotificationChain msgs)
+  {
+    Term oldOut = out;
+    out = newOut;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.PRINT_RULE__OUT, oldOut, newOut);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setOut(Term newOut)
+  {
+    if (newOut != out)
+    {
+      NotificationChain msgs = null;
+      if (out != null)
+        msgs = ((InternalEObject)out).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.PRINT_RULE__OUT, null, msgs);
+      if (newOut != null)
+        msgs = ((InternalEObject)newOut).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.PRINT_RULE__OUT, null, msgs);
+      msgs = basicSetOut(newOut, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.PRINT_RULE__OUT, newOut, newOut));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getBuffer()
+  {
+    return buffer;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetBuffer(Term newBuffer, NotificationChain msgs)
+  {
+    Term oldBuffer = buffer;
+    buffer = newBuffer;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.PRINT_RULE__BUFFER, oldBuffer, newBuffer);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setBuffer(Term newBuffer)
+  {
+    if (newBuffer != buffer)
+    {
+      NotificationChain msgs = null;
+      if (buffer != null)
+        msgs = ((InternalEObject)buffer).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.PRINT_RULE__BUFFER, null, msgs);
+      if (newBuffer != null)
+        msgs = ((InternalEObject)newBuffer).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.PRINT_RULE__BUFFER, null, msgs);
+      msgs = basicSetBuffer(newBuffer, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.PRINT_RULE__BUFFER, newBuffer, newBuffer));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.PRINT_RULE__OUT:
+        return basicSetOut(null, msgs);
+      case SimpleRulesPackage.PRINT_RULE__BUFFER:
+        return basicSetBuffer(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.PRINT_RULE__OUT:
+        return getOut();
+      case SimpleRulesPackage.PRINT_RULE__BUFFER:
+        return getBuffer();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.PRINT_RULE__OUT:
+        setOut((Term)newValue);
+        return;
+      case SimpleRulesPackage.PRINT_RULE__BUFFER:
+        setBuffer((Term)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.PRINT_RULE__OUT:
+        setOut((Term)null);
+        return;
+      case SimpleRulesPackage.PRINT_RULE__BUFFER:
+        setBuffer((Term)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.PRINT_RULE__OUT:
+        return out != null;
+      case SimpleRulesPackage.PRINT_RULE__BUFFER:
+        return buffer != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //PrintRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/RuleUpdateASMFunctionImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/RuleUpdateASMFunctionImpl.java
new file mode 100644
index 0000000..17d78eb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/RuleUpdateASMFunctionImpl.java
@@ -0,0 +1,252 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Rule Update ASM Function</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.RuleUpdateASMFunctionImpl#getLocations <em>Locations</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.RuleUpdateASMFunctionImpl#getFunction <em>Function</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RuleUpdateASMFunctionImpl extends RuleUpdateImpl implements RuleUpdateASMFunction
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getLocations() <em>Locations</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getLocations()
+   * @generated
+   * @ordered
+   */
+  protected EList<Term> locations;
+
+  /**
+   * The cached value of the '{@link #getFunction() <em>Function</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getFunction()
+   * @generated
+   * @ordered
+   */
+  protected ASMFunction function;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RuleUpdateASMFunctionImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return SimpleRulesPackage.Literals.RULE_UPDATE_ASM_FUNCTION;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Term> getLocations()
+  {
+    if (locations == null)
+    {
+      locations = new EObjectContainmentEList<Term>(Term.class, this, SimpleRulesPackage.RULE_UPDATE_ASM_FUNCTION__LOCATIONS);
+    }
+    return locations;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ASMFunction getFunction()
+  {
+    if (function != null && function.eIsProxy())
+    {
+      InternalEObject oldFunction = (InternalEObject)function;
+      function = (ASMFunction)eResolveProxy(oldFunction);
+      if (function != oldFunction)
+      {
+        if (eNotificationRequired())
+          eNotify(new ENotificationImpl(this, Notification.RESOLVE, SimpleRulesPackage.RULE_UPDATE_ASM_FUNCTION__FUNCTION, oldFunction, function));
+      }
+    }
+    return function;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ASMFunction basicGetFunction()
+  {
+    return function;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setFunction(ASMFunction newFunction)
+  {
+    ASMFunction oldFunction = function;
+    function = newFunction;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.RULE_UPDATE_ASM_FUNCTION__FUNCTION, oldFunction, function));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.RULE_UPDATE_ASM_FUNCTION__LOCATIONS:
+        return ((InternalEList<?>)getLocations()).basicRemove(otherEnd, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.RULE_UPDATE_ASM_FUNCTION__LOCATIONS:
+        return getLocations();
+      case SimpleRulesPackage.RULE_UPDATE_ASM_FUNCTION__FUNCTION:
+        if (resolve) return getFunction();
+        return basicGetFunction();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.RULE_UPDATE_ASM_FUNCTION__LOCATIONS:
+        getLocations().clear();
+        getLocations().addAll((Collection<? extends Term>)newValue);
+        return;
+      case SimpleRulesPackage.RULE_UPDATE_ASM_FUNCTION__FUNCTION:
+        setFunction((ASMFunction)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.RULE_UPDATE_ASM_FUNCTION__LOCATIONS:
+        getLocations().clear();
+        return;
+      case SimpleRulesPackage.RULE_UPDATE_ASM_FUNCTION__FUNCTION:
+        setFunction((ASMFunction)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.RULE_UPDATE_ASM_FUNCTION__LOCATIONS:
+        return locations != null && !locations.isEmpty();
+      case SimpleRulesPackage.RULE_UPDATE_ASM_FUNCTION__FUNCTION:
+        return function != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //RuleUpdateASMFunctionImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/RuleUpdateImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/RuleUpdateImpl.java
new file mode 100644
index 0000000..3da7b09
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/RuleUpdateImpl.java
@@ -0,0 +1,210 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdate;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Rule Update</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.RuleUpdateImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class RuleUpdateImpl extends ASMRuleInvocationImpl implements RuleUpdate
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getValue() <em>Value</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getValue()
+   * @generated
+   * @ordered
+   */
+  protected Term value;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RuleUpdateImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return SimpleRulesPackage.Literals.RULE_UPDATE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getValue()
+  {
+    return value;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetValue(Term newValue, NotificationChain msgs)
+  {
+    Term oldValue = value;
+    value = newValue;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.RULE_UPDATE__VALUE, oldValue, newValue);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setValue(Term newValue)
+  {
+    if (newValue != value)
+    {
+      NotificationChain msgs = null;
+      if (value != null)
+        msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.RULE_UPDATE__VALUE, null, msgs);
+      if (newValue != null)
+        msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.RULE_UPDATE__VALUE, null, msgs);
+      msgs = basicSetValue(newValue, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.RULE_UPDATE__VALUE, newValue, newValue));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.RULE_UPDATE__VALUE:
+        return basicSetValue(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.RULE_UPDATE__VALUE:
+        return getValue();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.RULE_UPDATE__VALUE:
+        setValue((Term)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.RULE_UPDATE__VALUE:
+        setValue((Term)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.RULE_UPDATE__VALUE:
+        return value != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //RuleUpdateImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/RuleUpdateVariableImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/RuleUpdateVariableImpl.java
new file mode 100644
index 0000000..06b9029
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/RuleUpdateVariableImpl.java
@@ -0,0 +1,210 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateVariable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Rule Update Variable</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.RuleUpdateVariableImpl#getVariable <em>Variable</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RuleUpdateVariableImpl extends RuleUpdateImpl implements RuleUpdateVariable
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getVariable() <em>Variable</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getVariable()
+   * @generated
+   * @ordered
+   */
+  protected VariableReference variable;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RuleUpdateVariableImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return SimpleRulesPackage.Literals.RULE_UPDATE_VARIABLE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public VariableReference getVariable()
+  {
+    return variable;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetVariable(VariableReference newVariable, NotificationChain msgs)
+  {
+    VariableReference oldVariable = variable;
+    variable = newVariable;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.RULE_UPDATE_VARIABLE__VARIABLE, oldVariable, newVariable);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setVariable(VariableReference newVariable)
+  {
+    if (newVariable != variable)
+    {
+      NotificationChain msgs = null;
+      if (variable != null)
+        msgs = ((InternalEObject)variable).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.RULE_UPDATE_VARIABLE__VARIABLE, null, msgs);
+      if (newVariable != null)
+        msgs = ((InternalEObject)newVariable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SimpleRulesPackage.RULE_UPDATE_VARIABLE__VARIABLE, null, msgs);
+      msgs = basicSetVariable(newVariable, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, SimpleRulesPackage.RULE_UPDATE_VARIABLE__VARIABLE, newVariable, newVariable));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.RULE_UPDATE_VARIABLE__VARIABLE:
+        return basicSetVariable(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.RULE_UPDATE_VARIABLE__VARIABLE:
+        return getVariable();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.RULE_UPDATE_VARIABLE__VARIABLE:
+        setVariable((VariableReference)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.RULE_UPDATE_VARIABLE__VARIABLE:
+        setVariable((VariableReference)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case SimpleRulesPackage.RULE_UPDATE_VARIABLE__VARIABLE:
+        return variable != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //RuleUpdateVariableImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/SimpleRulesFactoryImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/SimpleRulesFactoryImpl.java
new file mode 100644
index 0000000..1e19893
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/SimpleRulesFactoryImpl.java
@@ -0,0 +1,242 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SimpleRulesFactoryImpl extends EFactoryImpl implements SimpleRulesFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Creates the default factory implementation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static SimpleRulesFactory init()
+  {
+    try
+    {
+      SimpleRulesFactory theSimpleRulesFactory = (SimpleRulesFactory)EPackage.Registry.INSTANCE.getEFactory("http:///viatragtasmmodel/gtasm/metamodel/asm/simpleRules.ecore"); 
+      if (theSimpleRulesFactory != null)
+      {
+        return theSimpleRulesFactory;
+      }
+    }
+    catch (Exception exception)
+    {
+      EcorePlugin.INSTANCE.log(exception);
+    }
+    return new SimpleRulesFactoryImpl();
+  }
+
+  /**
+   * Creates an instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SimpleRulesFactoryImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public EObject create(EClass eClass)
+  {
+    switch (eClass.getClassifierID())
+    {
+      case SimpleRulesPackage.CONDITIONAL_RULE_TRY: return createConditionalRuleTry();
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF: return createConditionalRuleIf();
+      case SimpleRulesPackage.CALL_RULE: return createCallRule();
+      case SimpleRulesPackage.RULE_UPDATE_VARIABLE: return createRuleUpdateVariable();
+      case SimpleRulesPackage.GT_RULE_INVOCATION: return createGTRuleInvocation();
+      case SimpleRulesPackage.RULE_UPDATE_ASM_FUNCTION: return createRuleUpdateASMFunction();
+      case SimpleRulesPackage.FAIL_RULE: return createFailRule();
+      case SimpleRulesPackage.LOG_RULE: return createLogRule();
+      case SimpleRulesPackage.PRINT_RULE: return createPrintRule();
+      case SimpleRulesPackage.SKIP_RULE: return createSkipRule();
+      case SimpleRulesPackage.PRINT_LN_RULE: return createPrintLnRule();
+      default:
+        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+    }
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ConditionalRuleTry createConditionalRuleTry()
+  {
+    ConditionalRuleTryImpl conditionalRuleTry = new ConditionalRuleTryImpl();
+    return conditionalRuleTry;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ConditionalRuleIf createConditionalRuleIf()
+  {
+    ConditionalRuleIfImpl conditionalRuleIf = new ConditionalRuleIfImpl();
+    return conditionalRuleIf;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CallRule createCallRule()
+  {
+    CallRuleImpl callRule = new CallRuleImpl();
+    return callRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RuleUpdateVariable createRuleUpdateVariable()
+  {
+    RuleUpdateVariableImpl ruleUpdateVariable = new RuleUpdateVariableImpl();
+    return ruleUpdateVariable;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTRuleInvocation createGTRuleInvocation()
+  {
+    GTRuleInvocationImpl gtRuleInvocation = new GTRuleInvocationImpl();
+    return gtRuleInvocation;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RuleUpdateASMFunction createRuleUpdateASMFunction()
+  {
+    RuleUpdateASMFunctionImpl ruleUpdateASMFunction = new RuleUpdateASMFunctionImpl();
+    return ruleUpdateASMFunction;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public FailRule createFailRule()
+  {
+    FailRuleImpl failRule = new FailRuleImpl();
+    return failRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public LogRule createLogRule()
+  {
+    LogRuleImpl logRule = new LogRuleImpl();
+    return logRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public PrintRule createPrintRule()
+  {
+    PrintRuleImpl printRule = new PrintRuleImpl();
+    return printRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SkipRule createSkipRule()
+  {
+    SkipRuleImpl skipRule = new SkipRuleImpl();
+    return skipRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public PrintLnRule createPrintLnRule()
+  {
+    PrintLnRuleImpl printLnRule = new PrintLnRuleImpl();
+    return printLnRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SimpleRulesPackage getSimpleRulesPackage()
+  {
+    return (SimpleRulesPackage)getEPackage();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @deprecated
+   * @generated
+   */
+  @Deprecated
+  public static SimpleRulesPackage getPackage()
+  {
+    return SimpleRulesPackage.eINSTANCE;
+  }
+
+} //SimpleRulesFactoryImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/SimpleRulesPackageImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/SimpleRulesPackageImpl.java
new file mode 100644
index 0000000..0d06546
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/SimpleRulesPackageImpl.java
@@ -0,0 +1,855 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.FailRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdate;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateVariable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SkipRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymovePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SimpleRulesPackageImpl extends EPackageImpl implements SimpleRulesPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass conditionalRuleTryEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass conditionalRuleIfEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass callRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass ruleUpdateVariableEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass ruleUpdateEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass gtRuleInvocationEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass ruleUpdateASMFunctionEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass failRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass logRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass printRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass skipRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass modelManipulationRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass asmRuleInvocationEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass printLnRuleEClass = null;
+
+  /**
+   * Creates an instance of the model <b>Package</b>, registered with
+   * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+   * package URI value.
+   * <p>Note: the correct way to create the package is via the static
+   * factory method {@link #init init()}, which also performs
+   * initialization of the package, or returns the registered package,
+   * if one already exists.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.emf.ecore.EPackage.Registry
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage#eNS_URI
+   * @see #init()
+   * @generated
+   */
+  private SimpleRulesPackageImpl()
+  {
+    super(eNS_URI, SimpleRulesFactory.eINSTANCE);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static boolean isInited = false;
+
+  /**
+   * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+   * 
+   * <p>This method is used to initialize {@link SimpleRulesPackage#eINSTANCE} when that field is accessed.
+   * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #eNS_URI
+   * @see #createPackageContents()
+   * @see #initializePackageContents()
+   * @generated
+   */
+  public static SimpleRulesPackage init()
+  {
+    if (isInited) return (SimpleRulesPackage)EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI);
+
+    // Obtain or create and register package
+    SimpleRulesPackageImpl theSimpleRulesPackage = (SimpleRulesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SimpleRulesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new SimpleRulesPackageImpl());
+
+    isInited = true;
+
+    // Obtain or create and register interdependencies
+    EditmodelPackageImpl theEditmodelPackage = (EditmodelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) instanceof EditmodelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) : EditmodelPackage.eINSTANCE);
+    QueryFunctionsPackageImpl theQueryFunctionsPackage = (QueryFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) instanceof QueryFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) : QueryFunctionsPackage.eINSTANCE);
+    DeletionPackageImpl theDeletionPackage = (DeletionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) instanceof DeletionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) : DeletionPackage.eINSTANCE);
+    CreationPackageImpl theCreationPackage = (CreationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) instanceof CreationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) : CreationPackage.eINSTANCE);
+    CopymovePackageImpl theCopymovePackage = (CopymovePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) instanceof CopymovePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) : CopymovePackage.eINSTANCE);
+    UpdatePackageImpl theUpdatePackage = (UpdatePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) instanceof UpdatePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) : UpdatePackage.eINSTANCE);
+    DefinitionsPackageImpl theDefinitionsPackage = (DefinitionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) instanceof DefinitionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) : DefinitionsPackage.eINSTANCE);
+    CorePackageImpl theCorePackage = (CorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) instanceof CorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) : CorePackage.eINSTANCE);
+    CompoundRulesPackageImpl theCompoundRulesPackage = (CompoundRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) instanceof CompoundRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) : CompoundRulesPackage.eINSTANCE);
+    EnumsPackageImpl theEnumsPackage = (EnumsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) instanceof EnumsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) : EnumsPackage.eINSTANCE);
+    TermsPackageImpl theTermsPackage = (TermsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) instanceof TermsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) : TermsPackage.eINSTANCE);
+    BuiltInFunctionsPackageImpl theBuiltInFunctionsPackage = (BuiltInFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) instanceof BuiltInFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) : BuiltInFunctionsPackage.eINSTANCE);
+    GtPackageImpl theGtPackage = (GtPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) instanceof GtPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) : GtPackage.eINSTANCE);
+
+    // Create package meta-data objects
+    theSimpleRulesPackage.createPackageContents();
+    theEditmodelPackage.createPackageContents();
+    theQueryFunctionsPackage.createPackageContents();
+    theDeletionPackage.createPackageContents();
+    theCreationPackage.createPackageContents();
+    theCopymovePackage.createPackageContents();
+    theUpdatePackage.createPackageContents();
+    theDefinitionsPackage.createPackageContents();
+    theCorePackage.createPackageContents();
+    theCompoundRulesPackage.createPackageContents();
+    theEnumsPackage.createPackageContents();
+    theTermsPackage.createPackageContents();
+    theBuiltInFunctionsPackage.createPackageContents();
+    theGtPackage.createPackageContents();
+
+    // Initialize created meta-data
+    theSimpleRulesPackage.initializePackageContents();
+    theEditmodelPackage.initializePackageContents();
+    theQueryFunctionsPackage.initializePackageContents();
+    theDeletionPackage.initializePackageContents();
+    theCreationPackage.initializePackageContents();
+    theCopymovePackage.initializePackageContents();
+    theUpdatePackage.initializePackageContents();
+    theDefinitionsPackage.initializePackageContents();
+    theCorePackage.initializePackageContents();
+    theCompoundRulesPackage.initializePackageContents();
+    theEnumsPackage.initializePackageContents();
+    theTermsPackage.initializePackageContents();
+    theBuiltInFunctionsPackage.initializePackageContents();
+    theGtPackage.initializePackageContents();
+
+    // Mark meta-data to indicate it can't be changed
+    theSimpleRulesPackage.freeze();
+
+  
+    // Update the registry and return the package
+    EPackage.Registry.INSTANCE.put(SimpleRulesPackage.eNS_URI, theSimpleRulesPackage);
+    return theSimpleRulesPackage;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getConditionalRuleTry()
+  {
+    return conditionalRuleTryEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getConditionalRuleTry_RuleToTry()
+  {
+    return (EReference)conditionalRuleTryEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getConditionalRuleTry_RuleElse()
+  {
+    return (EReference)conditionalRuleTryEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getConditionalRuleIf()
+  {
+    return conditionalRuleIfEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getConditionalRuleIf_ExpressionToTest()
+  {
+    return (EReference)conditionalRuleIfEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getConditionalRuleIf_RuleTrue()
+  {
+    return (EReference)conditionalRuleIfEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getConditionalRuleIf_RuleFalse()
+  {
+    return (EReference)conditionalRuleIfEClass.getEStructuralFeatures().get(2);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getCallRule()
+  {
+    return callRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getCallRule_Rule()
+  {
+    return (EReference)callRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getCallRule_ActualParameters()
+  {
+    return (EReference)callRuleEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getRuleUpdateVariable()
+  {
+    return ruleUpdateVariableEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getRuleUpdateVariable_Variable()
+  {
+    return (EReference)ruleUpdateVariableEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getRuleUpdate()
+  {
+    return ruleUpdateEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getRuleUpdate_Value()
+  {
+    return (EReference)ruleUpdateEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getGTRuleInvocation()
+  {
+    return gtRuleInvocationEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTRuleInvocation_Rule()
+  {
+    return (EReference)gtRuleInvocationEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTRuleInvocation_Invoker()
+  {
+    return (EReference)gtRuleInvocationEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTRuleInvocation_ActualParameters()
+  {
+    return (EReference)gtRuleInvocationEClass.getEStructuralFeatures().get(2);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getRuleUpdateASMFunction()
+  {
+    return ruleUpdateASMFunctionEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getRuleUpdateASMFunction_Locations()
+  {
+    return (EReference)ruleUpdateASMFunctionEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getRuleUpdateASMFunction_Function()
+  {
+    return (EReference)ruleUpdateASMFunctionEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getFailRule()
+  {
+    return failRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getLogRule()
+  {
+    return logRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getLogRule_Out()
+  {
+    return (EReference)logRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getLogRule_Level()
+  {
+    return (EAttribute)logRuleEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getPrintRule()
+  {
+    return printRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getPrintRule_Out()
+  {
+    return (EReference)printRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getPrintRule_Buffer()
+  {
+    return (EReference)printRuleEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getSkipRule()
+  {
+    return skipRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getModelManipulationRule()
+  {
+    return modelManipulationRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getASMRuleInvocation()
+  {
+    return asmRuleInvocationEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getASMRuleInvocation_Caller()
+  {
+    return (EReference)asmRuleInvocationEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getASMRuleInvocation_AsmRule()
+  {
+    return (EReference)asmRuleInvocationEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getPrintLnRule()
+  {
+    return printLnRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getPrintLnRule_Out()
+  {
+    return (EReference)printLnRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getPrintLnRule_Buffer()
+  {
+    return (EReference)printLnRuleEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SimpleRulesFactory getSimpleRulesFactory()
+  {
+    return (SimpleRulesFactory)getEFactoryInstance();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isCreated = false;
+
+  /**
+   * Creates the meta-model objects for the package.  This method is
+   * guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void createPackageContents()
+  {
+    if (isCreated) return;
+    isCreated = true;
+
+    // Create classes and their features
+    conditionalRuleTryEClass = createEClass(CONDITIONAL_RULE_TRY);
+    createEReference(conditionalRuleTryEClass, CONDITIONAL_RULE_TRY__RULE_TO_TRY);
+    createEReference(conditionalRuleTryEClass, CONDITIONAL_RULE_TRY__RULE_ELSE);
+
+    conditionalRuleIfEClass = createEClass(CONDITIONAL_RULE_IF);
+    createEReference(conditionalRuleIfEClass, CONDITIONAL_RULE_IF__EXPRESSION_TO_TEST);
+    createEReference(conditionalRuleIfEClass, CONDITIONAL_RULE_IF__RULE_TRUE);
+    createEReference(conditionalRuleIfEClass, CONDITIONAL_RULE_IF__RULE_FALSE);
+
+    callRuleEClass = createEClass(CALL_RULE);
+    createEReference(callRuleEClass, CALL_RULE__RULE);
+    createEReference(callRuleEClass, CALL_RULE__ACTUAL_PARAMETERS);
+
+    ruleUpdateVariableEClass = createEClass(RULE_UPDATE_VARIABLE);
+    createEReference(ruleUpdateVariableEClass, RULE_UPDATE_VARIABLE__VARIABLE);
+
+    ruleUpdateEClass = createEClass(RULE_UPDATE);
+    createEReference(ruleUpdateEClass, RULE_UPDATE__VALUE);
+
+    gtRuleInvocationEClass = createEClass(GT_RULE_INVOCATION);
+    createEReference(gtRuleInvocationEClass, GT_RULE_INVOCATION__RULE);
+    createEReference(gtRuleInvocationEClass, GT_RULE_INVOCATION__INVOKER);
+    createEReference(gtRuleInvocationEClass, GT_RULE_INVOCATION__ACTUAL_PARAMETERS);
+
+    ruleUpdateASMFunctionEClass = createEClass(RULE_UPDATE_ASM_FUNCTION);
+    createEReference(ruleUpdateASMFunctionEClass, RULE_UPDATE_ASM_FUNCTION__LOCATIONS);
+    createEReference(ruleUpdateASMFunctionEClass, RULE_UPDATE_ASM_FUNCTION__FUNCTION);
+
+    failRuleEClass = createEClass(FAIL_RULE);
+
+    logRuleEClass = createEClass(LOG_RULE);
+    createEReference(logRuleEClass, LOG_RULE__OUT);
+    createEAttribute(logRuleEClass, LOG_RULE__LEVEL);
+
+    printRuleEClass = createEClass(PRINT_RULE);
+    createEReference(printRuleEClass, PRINT_RULE__OUT);
+    createEReference(printRuleEClass, PRINT_RULE__BUFFER);
+
+    skipRuleEClass = createEClass(SKIP_RULE);
+
+    modelManipulationRuleEClass = createEClass(MODEL_MANIPULATION_RULE);
+
+    asmRuleInvocationEClass = createEClass(ASM_RULE_INVOCATION);
+    createEReference(asmRuleInvocationEClass, ASM_RULE_INVOCATION__CALLER);
+    createEReference(asmRuleInvocationEClass, ASM_RULE_INVOCATION__ASM_RULE);
+
+    printLnRuleEClass = createEClass(PRINT_LN_RULE);
+    createEReference(printLnRuleEClass, PRINT_LN_RULE__OUT);
+    createEReference(printLnRuleEClass, PRINT_LN_RULE__BUFFER);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isInitialized = false;
+
+  /**
+   * Complete the initialization of the package and its meta-model.  This
+   * method is guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void initializePackageContents()
+  {
+    if (isInitialized) return;
+    isInitialized = true;
+
+    // Initialize package
+    setName(eNAME);
+    setNsPrefix(eNS_PREFIX);
+    setNsURI(eNS_URI);
+
+    // Obtain other dependent packages
+    TermsPackage theTermsPackage = (TermsPackage)EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI);
+    DefinitionsPackage theDefinitionsPackage = (DefinitionsPackage)EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI);
+    GtPackage theGtPackage = (GtPackage)EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI);
+    CompoundRulesPackage theCompoundRulesPackage = (CompoundRulesPackage)EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI);
+    EnumsPackage theEnumsPackage = (EnumsPackage)EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI);
+    CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI);
+
+    // Create type parameters
+
+    // Set bounds for type parameters
+
+    // Add supertypes to classes
+    conditionalRuleTryEClass.getESuperTypes().add(this.getASMRuleInvocation());
+    conditionalRuleIfEClass.getESuperTypes().add(this.getASMRuleInvocation());
+    callRuleEClass.getESuperTypes().add(this.getASMRuleInvocation());
+    ruleUpdateVariableEClass.getESuperTypes().add(this.getRuleUpdate());
+    ruleUpdateEClass.getESuperTypes().add(this.getASMRuleInvocation());
+    gtRuleInvocationEClass.getESuperTypes().add(this.getASMRuleInvocation());
+    ruleUpdateASMFunctionEClass.getESuperTypes().add(this.getRuleUpdate());
+    failRuleEClass.getESuperTypes().add(this.getASMRuleInvocation());
+    logRuleEClass.getESuperTypes().add(this.getASMRuleInvocation());
+    printRuleEClass.getESuperTypes().add(this.getASMRuleInvocation());
+    skipRuleEClass.getESuperTypes().add(this.getASMRuleInvocation());
+    modelManipulationRuleEClass.getESuperTypes().add(this.getASMRuleInvocation());
+    asmRuleInvocationEClass.getESuperTypes().add(theCorePackage.getGTASMElement());
+    printLnRuleEClass.getESuperTypes().add(this.getASMRuleInvocation());
+
+    // Initialize classes and features; add operations and parameters
+    initEClass(conditionalRuleTryEClass, ConditionalRuleTry.class, "ConditionalRuleTry", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getConditionalRuleTry_RuleToTry(), this.getASMRuleInvocation(), null, "ruleToTry", null, 1, 1, ConditionalRuleTry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getConditionalRuleTry_RuleElse(), this.getASMRuleInvocation(), null, "ruleElse", null, 0, 1, ConditionalRuleTry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(conditionalRuleIfEClass, ConditionalRuleIf.class, "ConditionalRuleIf", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getConditionalRuleIf_ExpressionToTest(), theTermsPackage.getTerm(), null, "expressionToTest", null, 1, 1, ConditionalRuleIf.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getConditionalRuleIf_RuleTrue(), this.getASMRuleInvocation(), null, "ruleTrue", null, 1, 1, ConditionalRuleIf.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getConditionalRuleIf_RuleFalse(), this.getASMRuleInvocation(), null, "ruleFalse", null, 0, 1, ConditionalRuleIf.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(callRuleEClass, CallRule.class, "CallRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getCallRule_Rule(), theDefinitionsPackage.getRule(), null, "rule", null, 1, 1, CallRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getCallRule_ActualParameters(), theTermsPackage.getTerm(), null, "actualParameters", null, 0, -1, CallRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(ruleUpdateVariableEClass, RuleUpdateVariable.class, "RuleUpdateVariable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getRuleUpdateVariable_Variable(), theTermsPackage.getVariableReference(), null, "variable", null, 1, 1, RuleUpdateVariable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(ruleUpdateEClass, RuleUpdate.class, "RuleUpdate", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getRuleUpdate_Value(), theTermsPackage.getTerm(), null, "value", null, 1, 1, RuleUpdate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(gtRuleInvocationEClass, GTRuleInvocation.class, "GTRuleInvocation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getGTRuleInvocation_Rule(), theGtPackage.getGTRule(), null, "rule", null, 1, 1, GTRuleInvocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getGTRuleInvocation_Invoker(), theCompoundRulesPackage.getCollectionIteratorRule(), theCompoundRulesPackage.getCollectionIteratorRule_Gtrule(), "invoker", null, 1, 1, GTRuleInvocation.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getGTRuleInvocation_ActualParameters(), theTermsPackage.getTerm(), null, "actualParameters", null, 0, -1, GTRuleInvocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(ruleUpdateASMFunctionEClass, RuleUpdateASMFunction.class, "RuleUpdateASMFunction", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getRuleUpdateASMFunction_Locations(), theTermsPackage.getTerm(), null, "locations", null, 0, -1, RuleUpdateASMFunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getRuleUpdateASMFunction_Function(), theDefinitionsPackage.getASMFunction(), null, "function", null, 0, 1, RuleUpdateASMFunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(failRuleEClass, FailRule.class, "FailRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(logRuleEClass, LogRule.class, "LogRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getLogRule_Out(), theTermsPackage.getTerm(), null, "out", null, 1, 1, LogRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEAttribute(getLogRule_Level(), theEnumsPackage.getLogLevel(), "level", "debug", 1, 1, LogRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(printRuleEClass, PrintRule.class, "PrintRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getPrintRule_Out(), theTermsPackage.getTerm(), null, "out", null, 1, 1, PrintRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getPrintRule_Buffer(), theTermsPackage.getTerm(), null, "buffer", null, 0, 1, PrintRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(skipRuleEClass, SkipRule.class, "SkipRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(modelManipulationRuleEClass, ModelManipulationRule.class, "ModelManipulationRule", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(asmRuleInvocationEClass, ASMRuleInvocation.class, "ASMRuleInvocation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getASMRuleInvocation_Caller(), this.getASMRuleInvocation(), null, "caller", null, 0, 1, ASMRuleInvocation.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getASMRuleInvocation_AsmRule(), theDefinitionsPackage.getRule(), theDefinitionsPackage.getRule_Body(), "asmRule", null, 0, 1, ASMRuleInvocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(printLnRuleEClass, PrintLnRule.class, "PrintLnRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getPrintLnRule_Out(), theTermsPackage.getTerm(), null, "out", null, 1, 1, PrintLnRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getPrintLnRule_Buffer(), theTermsPackage.getTerm(), null, "buffer", null, 0, 1, PrintLnRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    // Create resource
+    createResource(eNS_URI);
+  }
+
+} //SimpleRulesPackageImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/SkipRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/SkipRuleImpl.java
new file mode 100644
index 0000000..868d79a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/impl/SkipRuleImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SkipRule;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Skip Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class SkipRuleImpl extends ASMRuleInvocationImpl implements SkipRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SkipRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return SimpleRulesPackage.Literals.SKIP_RULE;
+  }
+
+} //SkipRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/util/SimpleRulesAdapterFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/util/SimpleRulesAdapterFactory.java
new file mode 100644
index 0000000..532752a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/util/SimpleRulesAdapterFactory.java
@@ -0,0 +1,451 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage
+ * @generated
+ */
+public class SimpleRulesAdapterFactory extends AdapterFactoryImpl
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static SimpleRulesPackage modelPackage;
+
+  /**
+   * Creates an instance of the adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SimpleRulesAdapterFactory()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = SimpleRulesPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Returns whether this factory is applicable for the type of the object.
+   * <!-- begin-user-doc -->
+   * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+   * <!-- end-user-doc -->
+   * @return whether this factory is applicable for the type of the object.
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object object)
+  {
+    if (object == modelPackage)
+    {
+      return true;
+    }
+    if (object instanceof EObject)
+    {
+      return ((EObject)object).eClass().getEPackage() == modelPackage;
+    }
+    return false;
+  }
+
+  /**
+   * The switch that delegates to the <code>createXXX</code> methods.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SimpleRulesSwitch<Adapter> modelSwitch =
+    new SimpleRulesSwitch<Adapter>()
+    {
+      @Override
+      public Adapter caseConditionalRuleTry(ConditionalRuleTry object)
+      {
+        return createConditionalRuleTryAdapter();
+      }
+      @Override
+      public Adapter caseConditionalRuleIf(ConditionalRuleIf object)
+      {
+        return createConditionalRuleIfAdapter();
+      }
+      @Override
+      public Adapter caseCallRule(CallRule object)
+      {
+        return createCallRuleAdapter();
+      }
+      @Override
+      public Adapter caseRuleUpdateVariable(RuleUpdateVariable object)
+      {
+        return createRuleUpdateVariableAdapter();
+      }
+      @Override
+      public Adapter caseRuleUpdate(RuleUpdate object)
+      {
+        return createRuleUpdateAdapter();
+      }
+      @Override
+      public Adapter caseGTRuleInvocation(GTRuleInvocation object)
+      {
+        return createGTRuleInvocationAdapter();
+      }
+      @Override
+      public Adapter caseRuleUpdateASMFunction(RuleUpdateASMFunction object)
+      {
+        return createRuleUpdateASMFunctionAdapter();
+      }
+      @Override
+      public Adapter caseFailRule(FailRule object)
+      {
+        return createFailRuleAdapter();
+      }
+      @Override
+      public Adapter caseLogRule(LogRule object)
+      {
+        return createLogRuleAdapter();
+      }
+      @Override
+      public Adapter casePrintRule(PrintRule object)
+      {
+        return createPrintRuleAdapter();
+      }
+      @Override
+      public Adapter caseSkipRule(SkipRule object)
+      {
+        return createSkipRuleAdapter();
+      }
+      @Override
+      public Adapter caseModelManipulationRule(ModelManipulationRule object)
+      {
+        return createModelManipulationRuleAdapter();
+      }
+      @Override
+      public Adapter caseASMRuleInvocation(ASMRuleInvocation object)
+      {
+        return createASMRuleInvocationAdapter();
+      }
+      @Override
+      public Adapter casePrintLnRule(PrintLnRule object)
+      {
+        return createPrintLnRuleAdapter();
+      }
+      @Override
+      public Adapter caseAnnotatedElement(AnnotatedElement object)
+      {
+        return createAnnotatedElementAdapter();
+      }
+      @Override
+      public Adapter caseGTASMElement(GTASMElement object)
+      {
+        return createGTASMElementAdapter();
+      }
+      @Override
+      public Adapter defaultCase(EObject object)
+      {
+        return createEObjectAdapter();
+      }
+    };
+
+  /**
+   * Creates an adapter for the <code>target</code>.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param target the object to adapt.
+   * @return the adapter for the <code>target</code>.
+   * @generated
+   */
+  @Override
+  public Adapter createAdapter(Notifier target)
+  {
+    return modelSwitch.doSwitch((EObject)target);
+  }
+
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry <em>Conditional Rule Try</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry
+   * @generated
+   */
+  public Adapter createConditionalRuleTryAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf <em>Conditional Rule If</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf
+   * @generated
+   */
+  public Adapter createConditionalRuleIfAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule <em>Call Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule
+   * @generated
+   */
+  public Adapter createCallRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateVariable <em>Rule Update Variable</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateVariable
+   * @generated
+   */
+  public Adapter createRuleUpdateVariableAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdate <em>Rule Update</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdate
+   * @generated
+   */
+  public Adapter createRuleUpdateAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation <em>GT Rule Invocation</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation
+   * @generated
+   */
+  public Adapter createGTRuleInvocationAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction <em>Rule Update ASM Function</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction
+   * @generated
+   */
+  public Adapter createRuleUpdateASMFunctionAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.FailRule <em>Fail Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.FailRule
+   * @generated
+   */
+  public Adapter createFailRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule <em>Log Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule
+   * @generated
+   */
+  public Adapter createLogRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule <em>Print Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule
+   * @generated
+   */
+  public Adapter createPrintRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SkipRule <em>Skip Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SkipRule
+   * @generated
+   */
+  public Adapter createSkipRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule <em>Model Manipulation Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule
+   * @generated
+   */
+  public Adapter createModelManipulationRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation <em>ASM Rule Invocation</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation
+   * @generated
+   */
+  public Adapter createASMRuleInvocationAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule <em>Print Ln Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule
+   * @generated
+   */
+  public Adapter createPrintLnRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement <em>Annotated Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement
+   * @generated
+   */
+  public Adapter createAnnotatedElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement <em>GTASM Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement
+   * @generated
+   */
+  public Adapter createGTASMElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for the default case.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @generated
+   */
+  public Adapter createEObjectAdapter()
+  {
+    return null;
+  }
+
+} //SimpleRulesAdapterFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/util/SimpleRulesSwitch.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/util/SimpleRulesSwitch.java
new file mode 100644
index 0000000..2237b07
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/simpleRules/util/SimpleRulesSwitch.java
@@ -0,0 +1,531 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage
+ * @generated
+ */
+public class SimpleRulesSwitch<T>
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static SimpleRulesPackage modelPackage;
+
+  /**
+   * Creates an instance of the switch.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SimpleRulesSwitch()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = SimpleRulesPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  public T doSwitch(EObject theEObject)
+  {
+    return doSwitch(theEObject.eClass(), theEObject);
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(EClass theEClass, EObject theEObject)
+  {
+    if (theEClass.eContainer() == modelPackage)
+    {
+      return doSwitch(theEClass.getClassifierID(), theEObject);
+    }
+    else
+    {
+      List<EClass> eSuperTypes = theEClass.getESuperTypes();
+      return
+        eSuperTypes.isEmpty() ?
+          defaultCase(theEObject) :
+          doSwitch(eSuperTypes.get(0), theEObject);
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(int classifierID, EObject theEObject)
+  {
+    switch (classifierID)
+    {
+      case SimpleRulesPackage.CONDITIONAL_RULE_TRY:
+      {
+        ConditionalRuleTry conditionalRuleTry = (ConditionalRuleTry)theEObject;
+        T result = caseConditionalRuleTry(conditionalRuleTry);
+        if (result == null) result = caseASMRuleInvocation(conditionalRuleTry);
+        if (result == null) result = caseGTASMElement(conditionalRuleTry);
+        if (result == null) result = caseAnnotatedElement(conditionalRuleTry);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case SimpleRulesPackage.CONDITIONAL_RULE_IF:
+      {
+        ConditionalRuleIf conditionalRuleIf = (ConditionalRuleIf)theEObject;
+        T result = caseConditionalRuleIf(conditionalRuleIf);
+        if (result == null) result = caseASMRuleInvocation(conditionalRuleIf);
+        if (result == null) result = caseGTASMElement(conditionalRuleIf);
+        if (result == null) result = caseAnnotatedElement(conditionalRuleIf);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case SimpleRulesPackage.CALL_RULE:
+      {
+        CallRule callRule = (CallRule)theEObject;
+        T result = caseCallRule(callRule);
+        if (result == null) result = caseASMRuleInvocation(callRule);
+        if (result == null) result = caseGTASMElement(callRule);
+        if (result == null) result = caseAnnotatedElement(callRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case SimpleRulesPackage.RULE_UPDATE_VARIABLE:
+      {
+        RuleUpdateVariable ruleUpdateVariable = (RuleUpdateVariable)theEObject;
+        T result = caseRuleUpdateVariable(ruleUpdateVariable);
+        if (result == null) result = caseRuleUpdate(ruleUpdateVariable);
+        if (result == null) result = caseASMRuleInvocation(ruleUpdateVariable);
+        if (result == null) result = caseGTASMElement(ruleUpdateVariable);
+        if (result == null) result = caseAnnotatedElement(ruleUpdateVariable);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case SimpleRulesPackage.RULE_UPDATE:
+      {
+        RuleUpdate ruleUpdate = (RuleUpdate)theEObject;
+        T result = caseRuleUpdate(ruleUpdate);
+        if (result == null) result = caseASMRuleInvocation(ruleUpdate);
+        if (result == null) result = caseGTASMElement(ruleUpdate);
+        if (result == null) result = caseAnnotatedElement(ruleUpdate);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case SimpleRulesPackage.GT_RULE_INVOCATION:
+      {
+        GTRuleInvocation gtRuleInvocation = (GTRuleInvocation)theEObject;
+        T result = caseGTRuleInvocation(gtRuleInvocation);
+        if (result == null) result = caseASMRuleInvocation(gtRuleInvocation);
+        if (result == null) result = caseGTASMElement(gtRuleInvocation);
+        if (result == null) result = caseAnnotatedElement(gtRuleInvocation);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case SimpleRulesPackage.RULE_UPDATE_ASM_FUNCTION:
+      {
+        RuleUpdateASMFunction ruleUpdateASMFunction = (RuleUpdateASMFunction)theEObject;
+        T result = caseRuleUpdateASMFunction(ruleUpdateASMFunction);
+        if (result == null) result = caseRuleUpdate(ruleUpdateASMFunction);
+        if (result == null) result = caseASMRuleInvocation(ruleUpdateASMFunction);
+        if (result == null) result = caseGTASMElement(ruleUpdateASMFunction);
+        if (result == null) result = caseAnnotatedElement(ruleUpdateASMFunction);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case SimpleRulesPackage.FAIL_RULE:
+      {
+        FailRule failRule = (FailRule)theEObject;
+        T result = caseFailRule(failRule);
+        if (result == null) result = caseASMRuleInvocation(failRule);
+        if (result == null) result = caseGTASMElement(failRule);
+        if (result == null) result = caseAnnotatedElement(failRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case SimpleRulesPackage.LOG_RULE:
+      {
+        LogRule logRule = (LogRule)theEObject;
+        T result = caseLogRule(logRule);
+        if (result == null) result = caseASMRuleInvocation(logRule);
+        if (result == null) result = caseGTASMElement(logRule);
+        if (result == null) result = caseAnnotatedElement(logRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case SimpleRulesPackage.PRINT_RULE:
+      {
+        PrintRule printRule = (PrintRule)theEObject;
+        T result = casePrintRule(printRule);
+        if (result == null) result = caseASMRuleInvocation(printRule);
+        if (result == null) result = caseGTASMElement(printRule);
+        if (result == null) result = caseAnnotatedElement(printRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case SimpleRulesPackage.SKIP_RULE:
+      {
+        SkipRule skipRule = (SkipRule)theEObject;
+        T result = caseSkipRule(skipRule);
+        if (result == null) result = caseASMRuleInvocation(skipRule);
+        if (result == null) result = caseGTASMElement(skipRule);
+        if (result == null) result = caseAnnotatedElement(skipRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case SimpleRulesPackage.MODEL_MANIPULATION_RULE:
+      {
+        ModelManipulationRule modelManipulationRule = (ModelManipulationRule)theEObject;
+        T result = caseModelManipulationRule(modelManipulationRule);
+        if (result == null) result = caseASMRuleInvocation(modelManipulationRule);
+        if (result == null) result = caseGTASMElement(modelManipulationRule);
+        if (result == null) result = caseAnnotatedElement(modelManipulationRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case SimpleRulesPackage.ASM_RULE_INVOCATION:
+      {
+        ASMRuleInvocation asmRuleInvocation = (ASMRuleInvocation)theEObject;
+        T result = caseASMRuleInvocation(asmRuleInvocation);
+        if (result == null) result = caseGTASMElement(asmRuleInvocation);
+        if (result == null) result = caseAnnotatedElement(asmRuleInvocation);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case SimpleRulesPackage.PRINT_LN_RULE:
+      {
+        PrintLnRule printLnRule = (PrintLnRule)theEObject;
+        T result = casePrintLnRule(printLnRule);
+        if (result == null) result = caseASMRuleInvocation(printLnRule);
+        if (result == null) result = caseGTASMElement(printLnRule);
+        if (result == null) result = caseAnnotatedElement(printLnRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      default: return defaultCase(theEObject);
+    }
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Conditional Rule Try</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Conditional Rule Try</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseConditionalRuleTry(ConditionalRuleTry object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Conditional Rule If</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Conditional Rule If</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseConditionalRuleIf(ConditionalRuleIf object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Call Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Call Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseCallRule(CallRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Rule Update Variable</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Rule Update Variable</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseRuleUpdateVariable(RuleUpdateVariable object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Rule Update</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Rule Update</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseRuleUpdate(RuleUpdate object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>GT Rule Invocation</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>GT Rule Invocation</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGTRuleInvocation(GTRuleInvocation object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Rule Update ASM Function</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Rule Update ASM Function</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseRuleUpdateASMFunction(RuleUpdateASMFunction object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Fail Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Fail Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseFailRule(FailRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Log Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Log Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseLogRule(LogRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Print Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Print Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T casePrintRule(PrintRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Skip Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Skip Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseSkipRule(SkipRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Model Manipulation Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Model Manipulation Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseModelManipulationRule(ModelManipulationRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>ASM Rule Invocation</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>ASM Rule Invocation</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseASMRuleInvocation(ASMRuleInvocation object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Print Ln Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Print Ln Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T casePrintLnRule(PrintLnRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseAnnotatedElement(AnnotatedElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGTASMElement(GTASMElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch, but this is the last case anyway.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+   * @generated
+   */
+  public T defaultCase(EObject object)
+  {
+    return null;
+  }
+
+} //SimpleRulesSwitch
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/ASMFunctionInvocation.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/ASMFunctionInvocation.java
new file mode 100644
index 0000000..44cb490
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/ASMFunctionInvocation.java
@@ -0,0 +1,67 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>ASM Function Invocation</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation#getCalledFunction <em>Called Function</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#getASMFunctionInvocation()
+ * @model
+ * @generated
+ */
+public interface ASMFunctionInvocation extends FunctionInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Called Function</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Called Function</em>' reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Called Function</em>' reference.
+   * @see #setCalledFunction(ASMFunction)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#getASMFunctionInvocation_CalledFunction()
+   * @model ordered="false"
+   * @generated
+   */
+  ASMFunction getCalledFunction();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation#getCalledFunction <em>Called Function</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Called Function</em>' reference.
+   * @see #getCalledFunction()
+   * @generated
+   */
+  void setCalledFunction(ASMFunction value);
+
+} // ASMFunctionInvocation
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/Constant.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/Constant.java
new file mode 100644
index 0000000..65167a6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/Constant.java
@@ -0,0 +1,66 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Constant</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#getConstant()
+ * @model
+ * @generated
+ */
+public interface Constant extends Term
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Value</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Value</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Value</em>' attribute.
+   * @see #setValue(String)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#getConstant_Value()
+   * @model unique="false" required="true" ordered="false"
+   * @generated
+   */
+  String getValue();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant#getValue <em>Value</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Value</em>' attribute.
+   * @see #getValue()
+   * @generated
+   */
+  void setValue(String value);
+
+} // Constant
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/FunctionInvocation.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/FunctionInvocation.java
new file mode 100644
index 0000000..6116e1c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/FunctionInvocation.java
@@ -0,0 +1,57 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Function Invocation</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation#getActualParameters <em>Actual Parameters</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#getFunctionInvocation()
+ * @model abstract="true"
+ * @generated
+ */
+public interface FunctionInvocation extends Term
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Actual Parameters</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Actual Parameters</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#getFunctionInvocation_ActualParameters()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  EList<Term> getActualParameters();
+
+} // FunctionInvocation
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/GTPatternCall.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/GTPatternCall.java
new file mode 100644
index 0000000..8215efe
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/GTPatternCall.java
@@ -0,0 +1,116 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>GT Pattern Call</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall#getActualParameters <em>Actual Parameters</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall#getCalledPattern <em>Called Pattern</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall#getMatchCounter <em>Match Counter</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#getGTPatternCall()
+ * @model
+ * @generated
+ */
+public interface GTPatternCall extends Term
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Actual Parameters</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Actual Parameters</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#getGTPatternCall_ActualParameters()
+   * @model containment="true"
+   * @generated
+   */
+  EList<Term> getActualParameters();
+
+  /**
+   * Returns the value of the '<em><b>Called Pattern</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Called Pattern</em>' reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Called Pattern</em>' reference.
+   * @see #setCalledPattern(GTPattern)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#getGTPatternCall_CalledPattern()
+   * @model ordered="false"
+   * @generated
+   */
+  GTPattern getCalledPattern();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall#getCalledPattern <em>Called Pattern</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Called Pattern</em>' reference.
+   * @see #getCalledPattern()
+   * @generated
+   */
+  void setCalledPattern(GTPattern value);
+
+  /**
+   * Returns the value of the '<em><b>Match Counter</b></em>' containment reference.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter#getPatternCall <em>Pattern Call</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Match Counter</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Match Counter</em>' containment reference.
+   * @see #setMatchCounter(GTMatchCounter)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#getGTPatternCall_MatchCounter()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter#getPatternCall
+   * @model opposite="patternCall" containment="true"
+   * @generated
+   */
+  GTMatchCounter getMatchCounter();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall#getMatchCounter <em>Match Counter</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Match Counter</em>' containment reference.
+   * @see #getMatchCounter()
+   * @generated
+   */
+  void setMatchCounter(GTMatchCounter value);
+
+} // GTPatternCall
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/ModelElementQuery.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/ModelElementQuery.java
new file mode 100644
index 0000000..0c21cdf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/ModelElementQuery.java
@@ -0,0 +1,66 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Model Element Query</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery#getArgument <em>Argument</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#getModelElementQuery()
+ * @model
+ * @generated
+ */
+public interface ModelElementQuery extends Term
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Argument</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Argument</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Argument</em>' containment reference.
+   * @see #setArgument(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#getModelElementQuery_Argument()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getArgument();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery#getArgument <em>Argument</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Argument</em>' containment reference.
+   * @see #getArgument()
+   * @generated
+   */
+  void setArgument(Term value);
+
+} // ModelElementQuery
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/NativeFunctionInvocation.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/NativeFunctionInvocation.java
new file mode 100644
index 0000000..7117519
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/NativeFunctionInvocation.java
@@ -0,0 +1,66 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Native Function Invocation</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.NativeFunctionInvocation#getFunctionName <em>Function Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#getNativeFunctionInvocation()
+ * @model
+ * @generated
+ */
+public interface NativeFunctionInvocation extends FunctionInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Function Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Function Name</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Function Name</em>' attribute.
+   * @see #setFunctionName(String)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#getNativeFunctionInvocation_FunctionName()
+   * @model unique="false" required="true" ordered="false"
+   * @generated
+   */
+  String getFunctionName();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.NativeFunctionInvocation#getFunctionName <em>Function Name</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Function Name</em>' attribute.
+   * @see #getFunctionName()
+   * @generated
+   */
+  void setFunctionName(String value);
+
+} // NativeFunctionInvocation
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/Term.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/Term.java
new file mode 100644
index 0000000..c4a287d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/Term.java
@@ -0,0 +1,100 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Term</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term#getKind <em>Kind</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#getTerm()
+ * @model abstract="true"
+ * @generated
+ */
+public interface Term extends GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Kind</b></em>' attribute.
+   * The default value is <code>"undef"</code>.
+   * The literals are from the enumeration {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Kind</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Kind</em>' attribute.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind
+   * @see #setKind(ValueKind)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#getTerm_Kind()
+   * @model default="undef" required="true" ordered="false"
+   * @generated
+   */
+  ValueKind getKind();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term#getKind <em>Kind</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Kind</em>' attribute.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind
+   * @see #getKind()
+   * @generated
+   */
+  void setKind(ValueKind value);
+
+  /**
+   * Returns the value of the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Type</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Type</em>' attribute.
+   * @see #setType(String)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#getTerm_Type()
+   * @model
+   * @generated
+   */
+  String getType();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term#getType <em>Type</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Type</em>' attribute.
+   * @see #getType()
+   * @generated
+   */
+  void setType(String value);
+
+} // Term
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/TermsFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/TermsFactory.java
new file mode 100644
index 0000000..e491840
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/TermsFactory.java
@@ -0,0 +1,104 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage
+ * @generated
+ */
+public interface TermsFactory extends EFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The singleton instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  TermsFactory eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsFactoryImpl.init();
+
+  /**
+   * Returns a new object of class '<em>Variable Reference</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Variable Reference</em>'.
+   * @generated
+   */
+  VariableReference createVariableReference();
+
+  /**
+   * Returns a new object of class '<em>GT Pattern Call</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>GT Pattern Call</em>'.
+   * @generated
+   */
+  GTPatternCall createGTPatternCall();
+
+  /**
+   * Returns a new object of class '<em>ASM Function Invocation</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>ASM Function Invocation</em>'.
+   * @generated
+   */
+  ASMFunctionInvocation createASMFunctionInvocation();
+
+  /**
+   * Returns a new object of class '<em>Constant</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Constant</em>'.
+   * @generated
+   */
+  Constant createConstant();
+
+  /**
+   * Returns a new object of class '<em>Native Function Invocation</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Native Function Invocation</em>'.
+   * @generated
+   */
+  NativeFunctionInvocation createNativeFunctionInvocation();
+
+  /**
+   * Returns a new object of class '<em>Model Element Query</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Model Element Query</em>'.
+   * @generated
+   */
+  ModelElementQuery createModelElementQuery();
+
+  /**
+   * Returns the package supported by this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the package supported by this factory.
+   * @generated
+   */
+  TermsPackage getTermsPackage();
+
+} //TermsFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/TermsPackage.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/TermsPackage.java
new file mode 100644
index 0000000..f85e75b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/TermsPackage.java
@@ -0,0 +1,1227 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ *   <li>each class,</li>
+ *   <li>each feature of each class,</li>
+ *   <li>each enum,</li>
+ *   <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface TermsPackage extends EPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The package name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNAME = "terms";
+
+  /**
+   * The package namespace URI.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_URI = "http:///viatragtasmmodel/gtasm/metamodel/asm/terms.ecore";
+
+  /**
+   * The package namespace name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_PREFIX = "viatragtasmmodel.gtasm.metamodel.asm.terms";
+
+  /**
+   * The singleton instance of the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  TermsPackage eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl.init();
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermImpl <em>Term</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl#getTerm()
+   * @generated
+   */
+  int TERM = 0;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TERM__ANNOTATIONS = CorePackage.GTASM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TERM__NAME = CorePackage.GTASM_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TERM__ID = CorePackage.GTASM_ELEMENT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TERM__FQN = CorePackage.GTASM_ELEMENT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TERM__RUNTIME_ANNOTATIONS = CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TERM__KIND = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TERM__TYPE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Term</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TERM_FEATURE_COUNT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.VariableReferenceImpl <em>Variable Reference</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.VariableReferenceImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl#getVariableReference()
+   * @generated
+   */
+  int VARIABLE_REFERENCE = 1;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE_REFERENCE__ANNOTATIONS = TERM__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE_REFERENCE__NAME = TERM__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE_REFERENCE__ID = TERM__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE_REFERENCE__FQN = TERM__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE_REFERENCE__RUNTIME_ANNOTATIONS = TERM__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE_REFERENCE__KIND = TERM__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE_REFERENCE__TYPE = TERM__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Variable</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE_REFERENCE__VARIABLE = TERM_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>Variable Reference</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VARIABLE_REFERENCE_FEATURE_COUNT = TERM_FEATURE_COUNT + 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.GTPatternCallImpl <em>GT Pattern Call</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.GTPatternCallImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl#getGTPatternCall()
+   * @generated
+   */
+  int GT_PATTERN_CALL = 2;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_CALL__ANNOTATIONS = TERM__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_CALL__NAME = TERM__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_CALL__ID = TERM__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_CALL__FQN = TERM__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_CALL__RUNTIME_ANNOTATIONS = TERM__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_CALL__KIND = TERM__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_CALL__TYPE = TERM__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_CALL__ACTUAL_PARAMETERS = TERM_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Called Pattern</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_CALL__CALLED_PATTERN = TERM_FEATURE_COUNT + 1;
+
+  /**
+   * The feature id for the '<em><b>Match Counter</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_CALL__MATCH_COUNTER = TERM_FEATURE_COUNT + 2;
+
+  /**
+   * The number of structural features of the '<em>GT Pattern Call</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_CALL_FEATURE_COUNT = TERM_FEATURE_COUNT + 3;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.FunctionInvocationImpl <em>Function Invocation</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.FunctionInvocationImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl#getFunctionInvocation()
+   * @generated
+   */
+  int FUNCTION_INVOCATION = 4;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FUNCTION_INVOCATION__ANNOTATIONS = TERM__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FUNCTION_INVOCATION__NAME = TERM__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FUNCTION_INVOCATION__ID = TERM__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FUNCTION_INVOCATION__FQN = TERM__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FUNCTION_INVOCATION__RUNTIME_ANNOTATIONS = TERM__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FUNCTION_INVOCATION__KIND = TERM__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FUNCTION_INVOCATION__TYPE = TERM__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FUNCTION_INVOCATION__ACTUAL_PARAMETERS = TERM_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>Function Invocation</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FUNCTION_INVOCATION_FEATURE_COUNT = TERM_FEATURE_COUNT + 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ASMFunctionInvocationImpl <em>ASM Function Invocation</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ASMFunctionInvocationImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl#getASMFunctionInvocation()
+   * @generated
+   */
+  int ASM_FUNCTION_INVOCATION = 3;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION_INVOCATION__ANNOTATIONS = FUNCTION_INVOCATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION_INVOCATION__NAME = FUNCTION_INVOCATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION_INVOCATION__ID = FUNCTION_INVOCATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION_INVOCATION__FQN = FUNCTION_INVOCATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION_INVOCATION__RUNTIME_ANNOTATIONS = FUNCTION_INVOCATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION_INVOCATION__KIND = FUNCTION_INVOCATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION_INVOCATION__TYPE = FUNCTION_INVOCATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION_INVOCATION__ACTUAL_PARAMETERS = FUNCTION_INVOCATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The feature id for the '<em><b>Called Function</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION_INVOCATION__CALLED_FUNCTION = FUNCTION_INVOCATION_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>ASM Function Invocation</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ASM_FUNCTION_INVOCATION_FEATURE_COUNT = FUNCTION_INVOCATION_FEATURE_COUNT + 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ConstantImpl <em>Constant</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ConstantImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl#getConstant()
+   * @generated
+   */
+  int CONSTANT = 5;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONSTANT__ANNOTATIONS = TERM__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONSTANT__NAME = TERM__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONSTANT__ID = TERM__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONSTANT__FQN = TERM__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONSTANT__RUNTIME_ANNOTATIONS = TERM__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONSTANT__KIND = TERM__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONSTANT__TYPE = TERM__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONSTANT__VALUE = TERM_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>Constant</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONSTANT_FEATURE_COUNT = TERM_FEATURE_COUNT + 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.NativeFunctionInvocationImpl <em>Native Function Invocation</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.NativeFunctionInvocationImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl#getNativeFunctionInvocation()
+   * @generated
+   */
+  int NATIVE_FUNCTION_INVOCATION = 6;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NATIVE_FUNCTION_INVOCATION__ANNOTATIONS = FUNCTION_INVOCATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NATIVE_FUNCTION_INVOCATION__NAME = FUNCTION_INVOCATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NATIVE_FUNCTION_INVOCATION__ID = FUNCTION_INVOCATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NATIVE_FUNCTION_INVOCATION__FQN = FUNCTION_INVOCATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NATIVE_FUNCTION_INVOCATION__RUNTIME_ANNOTATIONS = FUNCTION_INVOCATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NATIVE_FUNCTION_INVOCATION__KIND = FUNCTION_INVOCATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NATIVE_FUNCTION_INVOCATION__TYPE = FUNCTION_INVOCATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NATIVE_FUNCTION_INVOCATION__ACTUAL_PARAMETERS = FUNCTION_INVOCATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The feature id for the '<em><b>Function Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NATIVE_FUNCTION_INVOCATION__FUNCTION_NAME = FUNCTION_INVOCATION_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>Native Function Invocation</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NATIVE_FUNCTION_INVOCATION_FEATURE_COUNT = FUNCTION_INVOCATION_FEATURE_COUNT + 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ModelElementQueryImpl <em>Model Element Query</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ModelElementQueryImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl#getModelElementQuery()
+   * @generated
+   */
+  int MODEL_ELEMENT_QUERY = 7;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT_QUERY__ANNOTATIONS = TERM__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT_QUERY__NAME = TERM__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT_QUERY__ID = TERM__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT_QUERY__FQN = TERM__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT_QUERY__RUNTIME_ANNOTATIONS = TERM__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT_QUERY__KIND = TERM__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT_QUERY__TYPE = TERM__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Argument</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT_QUERY__ARGUMENT = TERM_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>Model Element Query</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT_QUERY_FEATURE_COUNT = TERM_FEATURE_COUNT + 1;
+
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term <em>Term</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Term</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term
+   * @generated
+   */
+  EClass getTerm();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term#getKind <em>Kind</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Kind</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term#getKind()
+   * @see #getTerm()
+   * @generated
+   */
+  EAttribute getTerm_Kind();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term#getType <em>Type</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Type</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term#getType()
+   * @see #getTerm()
+   * @generated
+   */
+  EAttribute getTerm_Type();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference <em>Variable Reference</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Variable Reference</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference
+   * @generated
+   */
+  EClass getVariableReference();
+
+  /**
+   * Returns the meta object for the reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference#getVariable <em>Variable</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference '<em>Variable</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference#getVariable()
+   * @see #getVariableReference()
+   * @generated
+   */
+  EReference getVariableReference_Variable();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall <em>GT Pattern Call</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>GT Pattern Call</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall
+   * @generated
+   */
+  EClass getGTPatternCall();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall#getActualParameters <em>Actual Parameters</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Actual Parameters</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall#getActualParameters()
+   * @see #getGTPatternCall()
+   * @generated
+   */
+  EReference getGTPatternCall_ActualParameters();
+
+  /**
+   * Returns the meta object for the reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall#getCalledPattern <em>Called Pattern</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference '<em>Called Pattern</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall#getCalledPattern()
+   * @see #getGTPatternCall()
+   * @generated
+   */
+  EReference getGTPatternCall_CalledPattern();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall#getMatchCounter <em>Match Counter</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Match Counter</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall#getMatchCounter()
+   * @see #getGTPatternCall()
+   * @generated
+   */
+  EReference getGTPatternCall_MatchCounter();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation <em>ASM Function Invocation</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>ASM Function Invocation</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation
+   * @generated
+   */
+  EClass getASMFunctionInvocation();
+
+  /**
+   * Returns the meta object for the reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation#getCalledFunction <em>Called Function</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference '<em>Called Function</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation#getCalledFunction()
+   * @see #getASMFunctionInvocation()
+   * @generated
+   */
+  EReference getASMFunctionInvocation_CalledFunction();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation <em>Function Invocation</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Function Invocation</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation
+   * @generated
+   */
+  EClass getFunctionInvocation();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation#getActualParameters <em>Actual Parameters</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Actual Parameters</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation#getActualParameters()
+   * @see #getFunctionInvocation()
+   * @generated
+   */
+  EReference getFunctionInvocation_ActualParameters();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant <em>Constant</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Constant</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant
+   * @generated
+   */
+  EClass getConstant();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant#getValue <em>Value</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Value</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant#getValue()
+   * @see #getConstant()
+   * @generated
+   */
+  EAttribute getConstant_Value();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.NativeFunctionInvocation <em>Native Function Invocation</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Native Function Invocation</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.NativeFunctionInvocation
+   * @generated
+   */
+  EClass getNativeFunctionInvocation();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.NativeFunctionInvocation#getFunctionName <em>Function Name</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Function Name</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.NativeFunctionInvocation#getFunctionName()
+   * @see #getNativeFunctionInvocation()
+   * @generated
+   */
+  EAttribute getNativeFunctionInvocation_FunctionName();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery <em>Model Element Query</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Model Element Query</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery
+   * @generated
+   */
+  EClass getModelElementQuery();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery#getArgument <em>Argument</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Argument</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery#getArgument()
+   * @see #getModelElementQuery()
+   * @generated
+   */
+  EReference getModelElementQuery_Argument();
+
+  /**
+   * Returns the factory that creates the instances of the model.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the factory that creates the instances of the model.
+   * @generated
+   */
+  TermsFactory getTermsFactory();
+
+  /**
+   * <!-- begin-user-doc -->
+   * Defines literals for the meta objects that represent
+   * <ul>
+   *   <li>each class,</li>
+   *   <li>each feature of each class,</li>
+   *   <li>each enum,</li>
+   *   <li>and each data type</li>
+   * </ul>
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  interface Literals
+  {
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermImpl <em>Term</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl#getTerm()
+     * @generated
+     */
+    EClass TERM = eINSTANCE.getTerm();
+
+    /**
+     * The meta object literal for the '<em><b>Kind</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute TERM__KIND = eINSTANCE.getTerm_Kind();
+
+    /**
+     * The meta object literal for the '<em><b>Type</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute TERM__TYPE = eINSTANCE.getTerm_Type();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.VariableReferenceImpl <em>Variable Reference</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.VariableReferenceImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl#getVariableReference()
+     * @generated
+     */
+    EClass VARIABLE_REFERENCE = eINSTANCE.getVariableReference();
+
+    /**
+     * The meta object literal for the '<em><b>Variable</b></em>' reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference VARIABLE_REFERENCE__VARIABLE = eINSTANCE.getVariableReference_Variable();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.GTPatternCallImpl <em>GT Pattern Call</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.GTPatternCallImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl#getGTPatternCall()
+     * @generated
+     */
+    EClass GT_PATTERN_CALL = eINSTANCE.getGTPatternCall();
+
+    /**
+     * The meta object literal for the '<em><b>Actual Parameters</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_PATTERN_CALL__ACTUAL_PARAMETERS = eINSTANCE.getGTPatternCall_ActualParameters();
+
+    /**
+     * The meta object literal for the '<em><b>Called Pattern</b></em>' reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_PATTERN_CALL__CALLED_PATTERN = eINSTANCE.getGTPatternCall_CalledPattern();
+
+    /**
+     * The meta object literal for the '<em><b>Match Counter</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_PATTERN_CALL__MATCH_COUNTER = eINSTANCE.getGTPatternCall_MatchCounter();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ASMFunctionInvocationImpl <em>ASM Function Invocation</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ASMFunctionInvocationImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl#getASMFunctionInvocation()
+     * @generated
+     */
+    EClass ASM_FUNCTION_INVOCATION = eINSTANCE.getASMFunctionInvocation();
+
+    /**
+     * The meta object literal for the '<em><b>Called Function</b></em>' reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference ASM_FUNCTION_INVOCATION__CALLED_FUNCTION = eINSTANCE.getASMFunctionInvocation_CalledFunction();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.FunctionInvocationImpl <em>Function Invocation</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.FunctionInvocationImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl#getFunctionInvocation()
+     * @generated
+     */
+    EClass FUNCTION_INVOCATION = eINSTANCE.getFunctionInvocation();
+
+    /**
+     * The meta object literal for the '<em><b>Actual Parameters</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference FUNCTION_INVOCATION__ACTUAL_PARAMETERS = eINSTANCE.getFunctionInvocation_ActualParameters();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ConstantImpl <em>Constant</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ConstantImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl#getConstant()
+     * @generated
+     */
+    EClass CONSTANT = eINSTANCE.getConstant();
+
+    /**
+     * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute CONSTANT__VALUE = eINSTANCE.getConstant_Value();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.NativeFunctionInvocationImpl <em>Native Function Invocation</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.NativeFunctionInvocationImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl#getNativeFunctionInvocation()
+     * @generated
+     */
+    EClass NATIVE_FUNCTION_INVOCATION = eINSTANCE.getNativeFunctionInvocation();
+
+    /**
+     * The meta object literal for the '<em><b>Function Name</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute NATIVE_FUNCTION_INVOCATION__FUNCTION_NAME = eINSTANCE.getNativeFunctionInvocation_FunctionName();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ModelElementQueryImpl <em>Model Element Query</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ModelElementQueryImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl#getModelElementQuery()
+     * @generated
+     */
+    EClass MODEL_ELEMENT_QUERY = eINSTANCE.getModelElementQuery();
+
+    /**
+     * The meta object literal for the '<em><b>Argument</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MODEL_ELEMENT_QUERY__ARGUMENT = eINSTANCE.getModelElementQuery_Argument();
+
+  }
+
+} //TermsPackage
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/VariableReference.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/VariableReference.java
new file mode 100644
index 0000000..3cf276e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/VariableReference.java
@@ -0,0 +1,69 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Variable Reference</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference#getVariable <em>Variable</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#getVariableReference()
+ * @model
+ * @generated
+ */
+public interface VariableReference extends Term
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Variable</b></em>' reference.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable#getReferences <em>References</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Variable</em>' reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Variable</em>' reference.
+   * @see #setVariable(Variable)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#getVariableReference_Variable()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable#getReferences
+   * @model opposite="references" required="true" ordered="false"
+   * @generated
+   */
+  Variable getVariable();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference#getVariable <em>Variable</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Variable</em>' reference.
+   * @see #getVariable()
+   * @generated
+   */
+  void setVariable(Variable value);
+
+} // VariableReference
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/And.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/And.java
new file mode 100644
index 0000000..9bf363b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/And.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>And</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getAnd()
+ * @model
+ * @generated
+ */
+public interface And extends RelationalOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // And
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ArithmeticOperation.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ArithmeticOperation.java
new file mode 100644
index 0000000..4507aef
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ArithmeticOperation.java
@@ -0,0 +1,35 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Arithmetic Operation</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getArithmeticOperation()
+ * @model abstract="true"
+ * @generated
+ */
+public interface ArithmeticOperation extends FunctionInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // ArithmeticOperation
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/BuiltInFunctionsFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/BuiltInFunctionsFactory.java
new file mode 100644
index 0000000..b82d52c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/BuiltInFunctionsFactory.java
@@ -0,0 +1,239 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage
+ * @generated
+ */
+public interface BuiltInFunctionsFactory extends EFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The singleton instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  BuiltInFunctionsFactory eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsFactoryImpl.init();
+
+  /**
+   * Returns a new object of class '<em>Remainder</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Remainder</em>'.
+   * @generated
+   */
+  Remainder createRemainder();
+
+  /**
+   * Returns a new object of class '<em>Multiply</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Multiply</em>'.
+   * @generated
+   */
+  Multiply createMultiply();
+
+  /**
+   * Returns a new object of class '<em>Plus</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Plus</em>'.
+   * @generated
+   */
+  Plus createPlus();
+
+  /**
+   * Returns a new object of class '<em>Minus</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Minus</em>'.
+   * @generated
+   */
+  Minus createMinus();
+
+  /**
+   * Returns a new object of class '<em>Division</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Division</em>'.
+   * @generated
+   */
+  Division createDivision();
+
+  /**
+   * Returns a new object of class '<em>And</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>And</em>'.
+   * @generated
+   */
+  And createAnd();
+
+  /**
+   * Returns a new object of class '<em>Equals</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Equals</em>'.
+   * @generated
+   */
+  Equals createEquals();
+
+  /**
+   * Returns a new object of class '<em>Greater Than</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Greater Than</em>'.
+   * @generated
+   */
+  GreaterThan createGreaterThan();
+
+  /**
+   * Returns a new object of class '<em>Greater Than Or Equal To</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Greater Than Or Equal To</em>'.
+   * @generated
+   */
+  GreaterThanOrEqualTo createGreaterThanOrEqualTo();
+
+  /**
+   * Returns a new object of class '<em>Less Than</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Less Than</em>'.
+   * @generated
+   */
+  LessThan createLessThan();
+
+  /**
+   * Returns a new object of class '<em>Less Than Or Equal To</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Less Than Or Equal To</em>'.
+   * @generated
+   */
+  LessThanOrEqualTo createLessThanOrEqualTo();
+
+  /**
+   * Returns a new object of class '<em>Not</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Not</em>'.
+   * @generated
+   */
+  Not createNot();
+
+  /**
+   * Returns a new object of class '<em>Not Equals</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Not Equals</em>'.
+   * @generated
+   */
+  NotEquals createNotEquals();
+
+  /**
+   * Returns a new object of class '<em>Or</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Or</em>'.
+   * @generated
+   */
+  Or createOr();
+
+  /**
+   * Returns a new object of class '<em>XOr</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>XOr</em>'.
+   * @generated
+   */
+  XOr createXOr();
+
+  /**
+   * Returns a new object of class '<em>To String</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>To String</em>'.
+   * @generated
+   */
+  ToString createToString();
+
+  /**
+   * Returns a new object of class '<em>To Int</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>To Int</em>'.
+   * @generated
+   */
+  ToInt createToInt();
+
+  /**
+   * Returns a new object of class '<em>To Boolean</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>To Boolean</em>'.
+   * @generated
+   */
+  ToBoolean createToBoolean();
+
+  /**
+   * Returns a new object of class '<em>To Double</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>To Double</em>'.
+   * @generated
+   */
+  ToDouble createToDouble();
+
+  /**
+   * Returns a new object of class '<em>To Model Element</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>To Model Element</em>'.
+   * @generated
+   */
+  ToModelElement createToModelElement();
+
+  /**
+   * Returns a new object of class '<em>To Multiplicity</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>To Multiplicity</em>'.
+   * @generated
+   */
+  ToMultiplicity createToMultiplicity();
+
+  /**
+   * Returns the package supported by this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the package supported by this factory.
+   * @generated
+   */
+  BuiltInFunctionsPackage getBuiltInFunctionsPackage();
+
+} //BuiltInFunctionsFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/BuiltInFunctionsPackage.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/BuiltInFunctionsPackage.java
new file mode 100644
index 0000000..de79726
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/BuiltInFunctionsPackage.java
@@ -0,0 +1,2765 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ *   <li>each class,</li>
+ *   <li>each feature of each class,</li>
+ *   <li>each enum,</li>
+ *   <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface BuiltInFunctionsPackage extends EPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The package name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNAME = "builtInFunctions";
+
+  /**
+   * The package namespace URI.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_URI = "http:///viatragtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions.ecore";
+
+  /**
+   * The package namespace name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_PREFIX = "viatragtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions";
+
+  /**
+   * The singleton instance of the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  BuiltInFunctionsPackage eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl.init();
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ArithmeticOperationImpl <em>Arithmetic Operation</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ArithmeticOperationImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getArithmeticOperation()
+   * @generated
+   */
+  int ARITHMETIC_OPERATION = 0;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ARITHMETIC_OPERATION__ANNOTATIONS = TermsPackage.FUNCTION_INVOCATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ARITHMETIC_OPERATION__NAME = TermsPackage.FUNCTION_INVOCATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ARITHMETIC_OPERATION__ID = TermsPackage.FUNCTION_INVOCATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ARITHMETIC_OPERATION__FQN = TermsPackage.FUNCTION_INVOCATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ARITHMETIC_OPERATION__RUNTIME_ANNOTATIONS = TermsPackage.FUNCTION_INVOCATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ARITHMETIC_OPERATION__KIND = TermsPackage.FUNCTION_INVOCATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ARITHMETIC_OPERATION__TYPE = TermsPackage.FUNCTION_INVOCATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ARITHMETIC_OPERATION__ACTUAL_PARAMETERS = TermsPackage.FUNCTION_INVOCATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>Arithmetic Operation</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ARITHMETIC_OPERATION_FEATURE_COUNT = TermsPackage.FUNCTION_INVOCATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.RemainderImpl <em>Remainder</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.RemainderImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getRemainder()
+   * @generated
+   */
+  int REMAINDER = 1;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int REMAINDER__ANNOTATIONS = ARITHMETIC_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int REMAINDER__NAME = ARITHMETIC_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int REMAINDER__ID = ARITHMETIC_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int REMAINDER__FQN = ARITHMETIC_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int REMAINDER__RUNTIME_ANNOTATIONS = ARITHMETIC_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int REMAINDER__KIND = ARITHMETIC_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int REMAINDER__TYPE = ARITHMETIC_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int REMAINDER__ACTUAL_PARAMETERS = ARITHMETIC_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>Remainder</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int REMAINDER_FEATURE_COUNT = ARITHMETIC_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.MultiplyImpl <em>Multiply</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.MultiplyImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getMultiply()
+   * @generated
+   */
+  int MULTIPLY = 2;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MULTIPLY__ANNOTATIONS = ARITHMETIC_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MULTIPLY__NAME = ARITHMETIC_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MULTIPLY__ID = ARITHMETIC_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MULTIPLY__FQN = ARITHMETIC_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MULTIPLY__RUNTIME_ANNOTATIONS = ARITHMETIC_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MULTIPLY__KIND = ARITHMETIC_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MULTIPLY__TYPE = ARITHMETIC_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MULTIPLY__ACTUAL_PARAMETERS = ARITHMETIC_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>Multiply</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MULTIPLY_FEATURE_COUNT = ARITHMETIC_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.PlusImpl <em>Plus</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.PlusImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getPlus()
+   * @generated
+   */
+  int PLUS = 3;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PLUS__ANNOTATIONS = ARITHMETIC_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PLUS__NAME = ARITHMETIC_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PLUS__ID = ARITHMETIC_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PLUS__FQN = ARITHMETIC_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PLUS__RUNTIME_ANNOTATIONS = ARITHMETIC_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PLUS__KIND = ARITHMETIC_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PLUS__TYPE = ARITHMETIC_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PLUS__ACTUAL_PARAMETERS = ARITHMETIC_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>Plus</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PLUS_FEATURE_COUNT = ARITHMETIC_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.MinusImpl <em>Minus</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.MinusImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getMinus()
+   * @generated
+   */
+  int MINUS = 4;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MINUS__ANNOTATIONS = ARITHMETIC_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MINUS__NAME = ARITHMETIC_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MINUS__ID = ARITHMETIC_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MINUS__FQN = ARITHMETIC_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MINUS__RUNTIME_ANNOTATIONS = ARITHMETIC_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MINUS__KIND = ARITHMETIC_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MINUS__TYPE = ARITHMETIC_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MINUS__ACTUAL_PARAMETERS = ARITHMETIC_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>Minus</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MINUS_FEATURE_COUNT = ARITHMETIC_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.DivisionImpl <em>Division</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.DivisionImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getDivision()
+   * @generated
+   */
+  int DIVISION = 5;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DIVISION__ANNOTATIONS = ARITHMETIC_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DIVISION__NAME = ARITHMETIC_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DIVISION__ID = ARITHMETIC_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DIVISION__FQN = ARITHMETIC_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DIVISION__RUNTIME_ANNOTATIONS = ARITHMETIC_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DIVISION__KIND = ARITHMETIC_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DIVISION__TYPE = ARITHMETIC_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DIVISION__ACTUAL_PARAMETERS = ARITHMETIC_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>Division</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DIVISION_FEATURE_COUNT = ARITHMETIC_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.RelationalOperationImpl <em>Relational Operation</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.RelationalOperationImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getRelationalOperation()
+   * @generated
+   */
+  int RELATIONAL_OPERATION = 6;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONAL_OPERATION__ANNOTATIONS = TermsPackage.FUNCTION_INVOCATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONAL_OPERATION__NAME = TermsPackage.FUNCTION_INVOCATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONAL_OPERATION__ID = TermsPackage.FUNCTION_INVOCATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONAL_OPERATION__FQN = TermsPackage.FUNCTION_INVOCATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONAL_OPERATION__RUNTIME_ANNOTATIONS = TermsPackage.FUNCTION_INVOCATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONAL_OPERATION__KIND = TermsPackage.FUNCTION_INVOCATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONAL_OPERATION__TYPE = TermsPackage.FUNCTION_INVOCATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONAL_OPERATION__ACTUAL_PARAMETERS = TermsPackage.FUNCTION_INVOCATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>Relational Operation</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONAL_OPERATION_FEATURE_COUNT = TermsPackage.FUNCTION_INVOCATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.AndImpl <em>And</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.AndImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getAnd()
+   * @generated
+   */
+  int AND = 7;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int AND__ANNOTATIONS = RELATIONAL_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int AND__NAME = RELATIONAL_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int AND__ID = RELATIONAL_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int AND__FQN = RELATIONAL_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int AND__RUNTIME_ANNOTATIONS = RELATIONAL_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int AND__KIND = RELATIONAL_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int AND__TYPE = RELATIONAL_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int AND__ACTUAL_PARAMETERS = RELATIONAL_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>And</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int AND_FEATURE_COUNT = RELATIONAL_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.EqualsImpl <em>Equals</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.EqualsImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getEquals()
+   * @generated
+   */
+  int EQUALS = 8;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int EQUALS__ANNOTATIONS = RELATIONAL_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int EQUALS__NAME = RELATIONAL_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int EQUALS__ID = RELATIONAL_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int EQUALS__FQN = RELATIONAL_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int EQUALS__RUNTIME_ANNOTATIONS = RELATIONAL_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int EQUALS__KIND = RELATIONAL_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int EQUALS__TYPE = RELATIONAL_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int EQUALS__ACTUAL_PARAMETERS = RELATIONAL_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>Equals</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int EQUALS_FEATURE_COUNT = RELATIONAL_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.GreaterThanImpl <em>Greater Than</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.GreaterThanImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getGreaterThan()
+   * @generated
+   */
+  int GREATER_THAN = 9;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GREATER_THAN__ANNOTATIONS = RELATIONAL_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GREATER_THAN__NAME = RELATIONAL_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GREATER_THAN__ID = RELATIONAL_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GREATER_THAN__FQN = RELATIONAL_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GREATER_THAN__RUNTIME_ANNOTATIONS = RELATIONAL_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GREATER_THAN__KIND = RELATIONAL_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GREATER_THAN__TYPE = RELATIONAL_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GREATER_THAN__ACTUAL_PARAMETERS = RELATIONAL_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>Greater Than</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GREATER_THAN_FEATURE_COUNT = RELATIONAL_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.GreaterThanOrEqualToImpl <em>Greater Than Or Equal To</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.GreaterThanOrEqualToImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getGreaterThanOrEqualTo()
+   * @generated
+   */
+  int GREATER_THAN_OR_EQUAL_TO = 10;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GREATER_THAN_OR_EQUAL_TO__ANNOTATIONS = RELATIONAL_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GREATER_THAN_OR_EQUAL_TO__NAME = RELATIONAL_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GREATER_THAN_OR_EQUAL_TO__ID = RELATIONAL_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GREATER_THAN_OR_EQUAL_TO__FQN = RELATIONAL_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GREATER_THAN_OR_EQUAL_TO__RUNTIME_ANNOTATIONS = RELATIONAL_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GREATER_THAN_OR_EQUAL_TO__KIND = RELATIONAL_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GREATER_THAN_OR_EQUAL_TO__TYPE = RELATIONAL_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GREATER_THAN_OR_EQUAL_TO__ACTUAL_PARAMETERS = RELATIONAL_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>Greater Than Or Equal To</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GREATER_THAN_OR_EQUAL_TO_FEATURE_COUNT = RELATIONAL_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.LessThanImpl <em>Less Than</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.LessThanImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getLessThan()
+   * @generated
+   */
+  int LESS_THAN = 11;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LESS_THAN__ANNOTATIONS = RELATIONAL_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LESS_THAN__NAME = RELATIONAL_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LESS_THAN__ID = RELATIONAL_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LESS_THAN__FQN = RELATIONAL_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LESS_THAN__RUNTIME_ANNOTATIONS = RELATIONAL_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LESS_THAN__KIND = RELATIONAL_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LESS_THAN__TYPE = RELATIONAL_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LESS_THAN__ACTUAL_PARAMETERS = RELATIONAL_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>Less Than</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LESS_THAN_FEATURE_COUNT = RELATIONAL_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.LessThanOrEqualToImpl <em>Less Than Or Equal To</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.LessThanOrEqualToImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getLessThanOrEqualTo()
+   * @generated
+   */
+  int LESS_THAN_OR_EQUAL_TO = 12;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LESS_THAN_OR_EQUAL_TO__ANNOTATIONS = RELATIONAL_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LESS_THAN_OR_EQUAL_TO__NAME = RELATIONAL_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LESS_THAN_OR_EQUAL_TO__ID = RELATIONAL_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LESS_THAN_OR_EQUAL_TO__FQN = RELATIONAL_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LESS_THAN_OR_EQUAL_TO__RUNTIME_ANNOTATIONS = RELATIONAL_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LESS_THAN_OR_EQUAL_TO__KIND = RELATIONAL_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LESS_THAN_OR_EQUAL_TO__TYPE = RELATIONAL_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LESS_THAN_OR_EQUAL_TO__ACTUAL_PARAMETERS = RELATIONAL_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>Less Than Or Equal To</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int LESS_THAN_OR_EQUAL_TO_FEATURE_COUNT = RELATIONAL_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.NotImpl <em>Not</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.NotImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getNot()
+   * @generated
+   */
+  int NOT = 13;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NOT__ANNOTATIONS = RELATIONAL_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NOT__NAME = RELATIONAL_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NOT__ID = RELATIONAL_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NOT__FQN = RELATIONAL_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NOT__RUNTIME_ANNOTATIONS = RELATIONAL_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NOT__KIND = RELATIONAL_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NOT__TYPE = RELATIONAL_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NOT__ACTUAL_PARAMETERS = RELATIONAL_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>Not</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NOT_FEATURE_COUNT = RELATIONAL_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.NotEqualsImpl <em>Not Equals</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.NotEqualsImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getNotEquals()
+   * @generated
+   */
+  int NOT_EQUALS = 14;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NOT_EQUALS__ANNOTATIONS = RELATIONAL_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NOT_EQUALS__NAME = RELATIONAL_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NOT_EQUALS__ID = RELATIONAL_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NOT_EQUALS__FQN = RELATIONAL_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NOT_EQUALS__RUNTIME_ANNOTATIONS = RELATIONAL_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NOT_EQUALS__KIND = RELATIONAL_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NOT_EQUALS__TYPE = RELATIONAL_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NOT_EQUALS__ACTUAL_PARAMETERS = RELATIONAL_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>Not Equals</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NOT_EQUALS_FEATURE_COUNT = RELATIONAL_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.OrImpl <em>Or</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.OrImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getOr()
+   * @generated
+   */
+  int OR = 15;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int OR__ANNOTATIONS = RELATIONAL_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int OR__NAME = RELATIONAL_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int OR__ID = RELATIONAL_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int OR__FQN = RELATIONAL_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int OR__RUNTIME_ANNOTATIONS = RELATIONAL_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int OR__KIND = RELATIONAL_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int OR__TYPE = RELATIONAL_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int OR__ACTUAL_PARAMETERS = RELATIONAL_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>Or</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int OR_FEATURE_COUNT = RELATIONAL_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.XOrImpl <em>XOr</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.XOrImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getXOr()
+   * @generated
+   */
+  int XOR = 16;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int XOR__ANNOTATIONS = RELATIONAL_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int XOR__NAME = RELATIONAL_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int XOR__ID = RELATIONAL_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int XOR__FQN = RELATIONAL_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int XOR__RUNTIME_ANNOTATIONS = RELATIONAL_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int XOR__KIND = RELATIONAL_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int XOR__TYPE = RELATIONAL_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int XOR__ACTUAL_PARAMETERS = RELATIONAL_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>XOr</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int XOR_FEATURE_COUNT = RELATIONAL_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ConversionOperationImpl <em>Conversion Operation</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ConversionOperationImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getConversionOperation()
+   * @generated
+   */
+  int CONVERSION_OPERATION = 23;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONVERSION_OPERATION__ANNOTATIONS = TermsPackage.FUNCTION_INVOCATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONVERSION_OPERATION__NAME = TermsPackage.FUNCTION_INVOCATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONVERSION_OPERATION__ID = TermsPackage.FUNCTION_INVOCATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONVERSION_OPERATION__FQN = TermsPackage.FUNCTION_INVOCATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONVERSION_OPERATION__RUNTIME_ANNOTATIONS = TermsPackage.FUNCTION_INVOCATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONVERSION_OPERATION__KIND = TermsPackage.FUNCTION_INVOCATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONVERSION_OPERATION__TYPE = TermsPackage.FUNCTION_INVOCATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONVERSION_OPERATION__ACTUAL_PARAMETERS = TermsPackage.FUNCTION_INVOCATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>Conversion Operation</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONVERSION_OPERATION_FEATURE_COUNT = TermsPackage.FUNCTION_INVOCATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToStringImpl <em>To String</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToStringImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getToString()
+   * @generated
+   */
+  int TO_STRING = 17;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_STRING__ANNOTATIONS = CONVERSION_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_STRING__NAME = CONVERSION_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_STRING__ID = CONVERSION_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_STRING__FQN = CONVERSION_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_STRING__RUNTIME_ANNOTATIONS = CONVERSION_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_STRING__KIND = CONVERSION_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_STRING__TYPE = CONVERSION_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_STRING__ACTUAL_PARAMETERS = CONVERSION_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>To String</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_STRING_FEATURE_COUNT = CONVERSION_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToIntImpl <em>To Int</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToIntImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getToInt()
+   * @generated
+   */
+  int TO_INT = 18;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_INT__ANNOTATIONS = CONVERSION_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_INT__NAME = CONVERSION_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_INT__ID = CONVERSION_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_INT__FQN = CONVERSION_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_INT__RUNTIME_ANNOTATIONS = CONVERSION_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_INT__KIND = CONVERSION_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_INT__TYPE = CONVERSION_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_INT__ACTUAL_PARAMETERS = CONVERSION_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>To Int</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_INT_FEATURE_COUNT = CONVERSION_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToBooleanImpl <em>To Boolean</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToBooleanImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getToBoolean()
+   * @generated
+   */
+  int TO_BOOLEAN = 19;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_BOOLEAN__ANNOTATIONS = CONVERSION_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_BOOLEAN__NAME = CONVERSION_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_BOOLEAN__ID = CONVERSION_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_BOOLEAN__FQN = CONVERSION_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_BOOLEAN__RUNTIME_ANNOTATIONS = CONVERSION_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_BOOLEAN__KIND = CONVERSION_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_BOOLEAN__TYPE = CONVERSION_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_BOOLEAN__ACTUAL_PARAMETERS = CONVERSION_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>To Boolean</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_BOOLEAN_FEATURE_COUNT = CONVERSION_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToDoubleImpl <em>To Double</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToDoubleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getToDouble()
+   * @generated
+   */
+  int TO_DOUBLE = 20;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_DOUBLE__ANNOTATIONS = CONVERSION_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_DOUBLE__NAME = CONVERSION_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_DOUBLE__ID = CONVERSION_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_DOUBLE__FQN = CONVERSION_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_DOUBLE__RUNTIME_ANNOTATIONS = CONVERSION_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_DOUBLE__KIND = CONVERSION_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_DOUBLE__TYPE = CONVERSION_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_DOUBLE__ACTUAL_PARAMETERS = CONVERSION_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>To Double</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_DOUBLE_FEATURE_COUNT = CONVERSION_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToModelElementImpl <em>To Model Element</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToModelElementImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getToModelElement()
+   * @generated
+   */
+  int TO_MODEL_ELEMENT = 21;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_MODEL_ELEMENT__ANNOTATIONS = CONVERSION_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_MODEL_ELEMENT__NAME = CONVERSION_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_MODEL_ELEMENT__ID = CONVERSION_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_MODEL_ELEMENT__FQN = CONVERSION_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_MODEL_ELEMENT__RUNTIME_ANNOTATIONS = CONVERSION_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_MODEL_ELEMENT__KIND = CONVERSION_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_MODEL_ELEMENT__TYPE = CONVERSION_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_MODEL_ELEMENT__ACTUAL_PARAMETERS = CONVERSION_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>To Model Element</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_MODEL_ELEMENT_FEATURE_COUNT = CONVERSION_OPERATION_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToMultiplicityImpl <em>To Multiplicity</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToMultiplicityImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getToMultiplicity()
+   * @generated
+   */
+  int TO_MULTIPLICITY = 22;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_MULTIPLICITY__ANNOTATIONS = CONVERSION_OPERATION__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_MULTIPLICITY__NAME = CONVERSION_OPERATION__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_MULTIPLICITY__ID = CONVERSION_OPERATION__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_MULTIPLICITY__FQN = CONVERSION_OPERATION__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_MULTIPLICITY__RUNTIME_ANNOTATIONS = CONVERSION_OPERATION__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_MULTIPLICITY__KIND = CONVERSION_OPERATION__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_MULTIPLICITY__TYPE = CONVERSION_OPERATION__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Actual Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_MULTIPLICITY__ACTUAL_PARAMETERS = CONVERSION_OPERATION__ACTUAL_PARAMETERS;
+
+  /**
+   * The number of structural features of the '<em>To Multiplicity</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TO_MULTIPLICITY_FEATURE_COUNT = CONVERSION_OPERATION_FEATURE_COUNT + 0;
+
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ArithmeticOperation <em>Arithmetic Operation</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Arithmetic Operation</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ArithmeticOperation
+   * @generated
+   */
+  EClass getArithmeticOperation();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Remainder <em>Remainder</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Remainder</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Remainder
+   * @generated
+   */
+  EClass getRemainder();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Multiply <em>Multiply</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Multiply</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Multiply
+   * @generated
+   */
+  EClass getMultiply();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Plus <em>Plus</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Plus</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Plus
+   * @generated
+   */
+  EClass getPlus();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Minus <em>Minus</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Minus</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Minus
+   * @generated
+   */
+  EClass getMinus();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Division <em>Division</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Division</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Division
+   * @generated
+   */
+  EClass getDivision();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.RelationalOperation <em>Relational Operation</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Relational Operation</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.RelationalOperation
+   * @generated
+   */
+  EClass getRelationalOperation();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.And <em>And</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>And</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.And
+   * @generated
+   */
+  EClass getAnd();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Equals <em>Equals</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Equals</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Equals
+   * @generated
+   */
+  EClass getEquals();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThan <em>Greater Than</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Greater Than</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThan
+   * @generated
+   */
+  EClass getGreaterThan();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThanOrEqualTo <em>Greater Than Or Equal To</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Greater Than Or Equal To</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThanOrEqualTo
+   * @generated
+   */
+  EClass getGreaterThanOrEqualTo();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThan <em>Less Than</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Less Than</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThan
+   * @generated
+   */
+  EClass getLessThan();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThanOrEqualTo <em>Less Than Or Equal To</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Less Than Or Equal To</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThanOrEqualTo
+   * @generated
+   */
+  EClass getLessThanOrEqualTo();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Not <em>Not</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Not</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Not
+   * @generated
+   */
+  EClass getNot();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.NotEquals <em>Not Equals</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Not Equals</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.NotEquals
+   * @generated
+   */
+  EClass getNotEquals();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Or <em>Or</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Or</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Or
+   * @generated
+   */
+  EClass getOr();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.XOr <em>XOr</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>XOr</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.XOr
+   * @generated
+   */
+  EClass getXOr();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToString <em>To String</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>To String</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToString
+   * @generated
+   */
+  EClass getToString();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToInt <em>To Int</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>To Int</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToInt
+   * @generated
+   */
+  EClass getToInt();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToBoolean <em>To Boolean</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>To Boolean</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToBoolean
+   * @generated
+   */
+  EClass getToBoolean();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToDouble <em>To Double</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>To Double</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToDouble
+   * @generated
+   */
+  EClass getToDouble();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToModelElement <em>To Model Element</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>To Model Element</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToModelElement
+   * @generated
+   */
+  EClass getToModelElement();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToMultiplicity <em>To Multiplicity</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>To Multiplicity</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToMultiplicity
+   * @generated
+   */
+  EClass getToMultiplicity();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ConversionOperation <em>Conversion Operation</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Conversion Operation</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ConversionOperation
+   * @generated
+   */
+  EClass getConversionOperation();
+
+  /**
+   * Returns the factory that creates the instances of the model.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the factory that creates the instances of the model.
+   * @generated
+   */
+  BuiltInFunctionsFactory getBuiltInFunctionsFactory();
+
+  /**
+   * <!-- begin-user-doc -->
+   * Defines literals for the meta objects that represent
+   * <ul>
+   *   <li>each class,</li>
+   *   <li>each feature of each class,</li>
+   *   <li>each enum,</li>
+   *   <li>and each data type</li>
+   * </ul>
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  interface Literals
+  {
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ArithmeticOperationImpl <em>Arithmetic Operation</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ArithmeticOperationImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getArithmeticOperation()
+     * @generated
+     */
+    EClass ARITHMETIC_OPERATION = eINSTANCE.getArithmeticOperation();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.RemainderImpl <em>Remainder</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.RemainderImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getRemainder()
+     * @generated
+     */
+    EClass REMAINDER = eINSTANCE.getRemainder();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.MultiplyImpl <em>Multiply</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.MultiplyImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getMultiply()
+     * @generated
+     */
+    EClass MULTIPLY = eINSTANCE.getMultiply();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.PlusImpl <em>Plus</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.PlusImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getPlus()
+     * @generated
+     */
+    EClass PLUS = eINSTANCE.getPlus();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.MinusImpl <em>Minus</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.MinusImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getMinus()
+     * @generated
+     */
+    EClass MINUS = eINSTANCE.getMinus();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.DivisionImpl <em>Division</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.DivisionImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getDivision()
+     * @generated
+     */
+    EClass DIVISION = eINSTANCE.getDivision();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.RelationalOperationImpl <em>Relational Operation</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.RelationalOperationImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getRelationalOperation()
+     * @generated
+     */
+    EClass RELATIONAL_OPERATION = eINSTANCE.getRelationalOperation();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.AndImpl <em>And</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.AndImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getAnd()
+     * @generated
+     */
+    EClass AND = eINSTANCE.getAnd();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.EqualsImpl <em>Equals</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.EqualsImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getEquals()
+     * @generated
+     */
+    EClass EQUALS = eINSTANCE.getEquals();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.GreaterThanImpl <em>Greater Than</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.GreaterThanImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getGreaterThan()
+     * @generated
+     */
+    EClass GREATER_THAN = eINSTANCE.getGreaterThan();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.GreaterThanOrEqualToImpl <em>Greater Than Or Equal To</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.GreaterThanOrEqualToImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getGreaterThanOrEqualTo()
+     * @generated
+     */
+    EClass GREATER_THAN_OR_EQUAL_TO = eINSTANCE.getGreaterThanOrEqualTo();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.LessThanImpl <em>Less Than</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.LessThanImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getLessThan()
+     * @generated
+     */
+    EClass LESS_THAN = eINSTANCE.getLessThan();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.LessThanOrEqualToImpl <em>Less Than Or Equal To</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.LessThanOrEqualToImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getLessThanOrEqualTo()
+     * @generated
+     */
+    EClass LESS_THAN_OR_EQUAL_TO = eINSTANCE.getLessThanOrEqualTo();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.NotImpl <em>Not</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.NotImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getNot()
+     * @generated
+     */
+    EClass NOT = eINSTANCE.getNot();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.NotEqualsImpl <em>Not Equals</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.NotEqualsImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getNotEquals()
+     * @generated
+     */
+    EClass NOT_EQUALS = eINSTANCE.getNotEquals();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.OrImpl <em>Or</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.OrImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getOr()
+     * @generated
+     */
+    EClass OR = eINSTANCE.getOr();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.XOrImpl <em>XOr</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.XOrImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getXOr()
+     * @generated
+     */
+    EClass XOR = eINSTANCE.getXOr();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToStringImpl <em>To String</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToStringImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getToString()
+     * @generated
+     */
+    EClass TO_STRING = eINSTANCE.getToString();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToIntImpl <em>To Int</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToIntImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getToInt()
+     * @generated
+     */
+    EClass TO_INT = eINSTANCE.getToInt();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToBooleanImpl <em>To Boolean</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToBooleanImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getToBoolean()
+     * @generated
+     */
+    EClass TO_BOOLEAN = eINSTANCE.getToBoolean();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToDoubleImpl <em>To Double</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToDoubleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getToDouble()
+     * @generated
+     */
+    EClass TO_DOUBLE = eINSTANCE.getToDouble();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToModelElementImpl <em>To Model Element</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToModelElementImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getToModelElement()
+     * @generated
+     */
+    EClass TO_MODEL_ELEMENT = eINSTANCE.getToModelElement();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToMultiplicityImpl <em>To Multiplicity</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ToMultiplicityImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getToMultiplicity()
+     * @generated
+     */
+    EClass TO_MULTIPLICITY = eINSTANCE.getToMultiplicity();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ConversionOperationImpl <em>Conversion Operation</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.ConversionOperationImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl#getConversionOperation()
+     * @generated
+     */
+    EClass CONVERSION_OPERATION = eINSTANCE.getConversionOperation();
+
+  }
+
+} //BuiltInFunctionsPackage
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ConversionOperation.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ConversionOperation.java
new file mode 100644
index 0000000..6d0a3fe
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ConversionOperation.java
@@ -0,0 +1,35 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Conversion Operation</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getConversionOperation()
+ * @model abstract="true"
+ * @generated
+ */
+public interface ConversionOperation extends FunctionInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // ConversionOperation
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Division.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Division.java
new file mode 100644
index 0000000..05160be
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Division.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Division</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getDivision()
+ * @model
+ * @generated
+ */
+public interface Division extends ArithmeticOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // Division
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Equals.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Equals.java
new file mode 100644
index 0000000..e6ef106
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Equals.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Equals</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getEquals()
+ * @model
+ * @generated
+ */
+public interface Equals extends RelationalOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // Equals
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/GreaterThan.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/GreaterThan.java
new file mode 100644
index 0000000..bb2bb0b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/GreaterThan.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Greater Than</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getGreaterThan()
+ * @model
+ * @generated
+ */
+public interface GreaterThan extends RelationalOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // GreaterThan
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/GreaterThanOrEqualTo.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/GreaterThanOrEqualTo.java
new file mode 100644
index 0000000..9d24657
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/GreaterThanOrEqualTo.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Greater Than Or Equal To</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getGreaterThanOrEqualTo()
+ * @model
+ * @generated
+ */
+public interface GreaterThanOrEqualTo extends RelationalOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // GreaterThanOrEqualTo
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/LessThan.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/LessThan.java
new file mode 100644
index 0000000..bb3234a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/LessThan.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Less Than</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getLessThan()
+ * @model
+ * @generated
+ */
+public interface LessThan extends RelationalOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // LessThan
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/LessThanOrEqualTo.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/LessThanOrEqualTo.java
new file mode 100644
index 0000000..8edeaca
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/LessThanOrEqualTo.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Less Than Or Equal To</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getLessThanOrEqualTo()
+ * @model
+ * @generated
+ */
+public interface LessThanOrEqualTo extends RelationalOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // LessThanOrEqualTo
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Minus.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Minus.java
new file mode 100644
index 0000000..72f9a88
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Minus.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Minus</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getMinus()
+ * @model
+ * @generated
+ */
+public interface Minus extends ArithmeticOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // Minus
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Multiply.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Multiply.java
new file mode 100644
index 0000000..ebc2e83
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Multiply.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Multiply</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getMultiply()
+ * @model
+ * @generated
+ */
+public interface Multiply extends ArithmeticOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // Multiply
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Not.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Not.java
new file mode 100644
index 0000000..a804a12
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Not.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Not</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getNot()
+ * @model
+ * @generated
+ */
+public interface Not extends RelationalOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // Not
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/NotEquals.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/NotEquals.java
new file mode 100644
index 0000000..420f323
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/NotEquals.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Not Equals</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getNotEquals()
+ * @model
+ * @generated
+ */
+public interface NotEquals extends RelationalOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // NotEquals
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Or.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Or.java
new file mode 100644
index 0000000..bc7939a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Or.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Or</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getOr()
+ * @model
+ * @generated
+ */
+public interface Or extends RelationalOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // Or
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Plus.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Plus.java
new file mode 100644
index 0000000..cbcce35
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Plus.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Plus</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getPlus()
+ * @model
+ * @generated
+ */
+public interface Plus extends ArithmeticOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // Plus
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/RelationalOperation.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/RelationalOperation.java
new file mode 100644
index 0000000..1746ef7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/RelationalOperation.java
@@ -0,0 +1,35 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Relational Operation</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getRelationalOperation()
+ * @model abstract="true"
+ * @generated
+ */
+public interface RelationalOperation extends FunctionInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // RelationalOperation
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Remainder.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Remainder.java
new file mode 100644
index 0000000..e88ce5a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/Remainder.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Remainder</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getRemainder()
+ * @model
+ * @generated
+ */
+public interface Remainder extends ArithmeticOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // Remainder
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ToBoolean.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ToBoolean.java
new file mode 100644
index 0000000..6776b74
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ToBoolean.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>To Boolean</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getToBoolean()
+ * @model
+ * @generated
+ */
+public interface ToBoolean extends ConversionOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // ToBoolean
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ToDouble.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ToDouble.java
new file mode 100644
index 0000000..79c284d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ToDouble.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>To Double</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getToDouble()
+ * @model
+ * @generated
+ */
+public interface ToDouble extends ConversionOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // ToDouble
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ToInt.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ToInt.java
new file mode 100644
index 0000000..09466bc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ToInt.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>To Int</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getToInt()
+ * @model
+ * @generated
+ */
+public interface ToInt extends ConversionOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // ToInt
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ToModelElement.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ToModelElement.java
new file mode 100644
index 0000000..602c57c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ToModelElement.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>To Model Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getToModelElement()
+ * @model
+ * @generated
+ */
+public interface ToModelElement extends ConversionOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // ToModelElement
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ToMultiplicity.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ToMultiplicity.java
new file mode 100644
index 0000000..d16c354
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ToMultiplicity.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>To Multiplicity</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getToMultiplicity()
+ * @model
+ * @generated
+ */
+public interface ToMultiplicity extends ConversionOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // ToMultiplicity
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ToString.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ToString.java
new file mode 100644
index 0000000..2f27b42
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/ToString.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>To String</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getToString()
+ * @model
+ * @generated
+ */
+public interface ToString extends ConversionOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // ToString
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/XOr.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/XOr.java
new file mode 100644
index 0000000..92e2781
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/XOr.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>XOr</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#getXOr()
+ * @model
+ * @generated
+ */
+public interface XOr extends RelationalOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // XOr
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/AndImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/AndImpl.java
new file mode 100644
index 0000000..3702b38
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/AndImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.And;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>And</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class AndImpl extends RelationalOperationImpl implements And
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected AndImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.AND;
+  }
+
+} //AndImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ArithmeticOperationImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ArithmeticOperationImpl.java
new file mode 100644
index 0000000..e4558af
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ArithmeticOperationImpl.java
@@ -0,0 +1,60 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ArithmeticOperation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.FunctionInvocationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Arithmetic Operation</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class ArithmeticOperationImpl extends FunctionInvocationImpl implements ArithmeticOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ArithmeticOperationImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.ARITHMETIC_OPERATION;
+  }
+
+} //ArithmeticOperationImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/BuiltInFunctionsFactoryImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/BuiltInFunctionsFactoryImpl.java
new file mode 100644
index 0000000..3714950
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/BuiltInFunctionsFactoryImpl.java
@@ -0,0 +1,362 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class BuiltInFunctionsFactoryImpl extends EFactoryImpl implements BuiltInFunctionsFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Creates the default factory implementation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static BuiltInFunctionsFactory init()
+  {
+    try
+    {
+      BuiltInFunctionsFactory theBuiltInFunctionsFactory = (BuiltInFunctionsFactory)EPackage.Registry.INSTANCE.getEFactory("http:///viatragtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions.ecore"); 
+      if (theBuiltInFunctionsFactory != null)
+      {
+        return theBuiltInFunctionsFactory;
+      }
+    }
+    catch (Exception exception)
+    {
+      EcorePlugin.INSTANCE.log(exception);
+    }
+    return new BuiltInFunctionsFactoryImpl();
+  }
+
+  /**
+   * Creates an instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public BuiltInFunctionsFactoryImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public EObject create(EClass eClass)
+  {
+    switch (eClass.getClassifierID())
+    {
+      case BuiltInFunctionsPackage.REMAINDER: return createRemainder();
+      case BuiltInFunctionsPackage.MULTIPLY: return createMultiply();
+      case BuiltInFunctionsPackage.PLUS: return createPlus();
+      case BuiltInFunctionsPackage.MINUS: return createMinus();
+      case BuiltInFunctionsPackage.DIVISION: return createDivision();
+      case BuiltInFunctionsPackage.AND: return createAnd();
+      case BuiltInFunctionsPackage.EQUALS: return createEquals();
+      case BuiltInFunctionsPackage.GREATER_THAN: return createGreaterThan();
+      case BuiltInFunctionsPackage.GREATER_THAN_OR_EQUAL_TO: return createGreaterThanOrEqualTo();
+      case BuiltInFunctionsPackage.LESS_THAN: return createLessThan();
+      case BuiltInFunctionsPackage.LESS_THAN_OR_EQUAL_TO: return createLessThanOrEqualTo();
+      case BuiltInFunctionsPackage.NOT: return createNot();
+      case BuiltInFunctionsPackage.NOT_EQUALS: return createNotEquals();
+      case BuiltInFunctionsPackage.OR: return createOr();
+      case BuiltInFunctionsPackage.XOR: return createXOr();
+      case BuiltInFunctionsPackage.TO_STRING: return createToString();
+      case BuiltInFunctionsPackage.TO_INT: return createToInt();
+      case BuiltInFunctionsPackage.TO_BOOLEAN: return createToBoolean();
+      case BuiltInFunctionsPackage.TO_DOUBLE: return createToDouble();
+      case BuiltInFunctionsPackage.TO_MODEL_ELEMENT: return createToModelElement();
+      case BuiltInFunctionsPackage.TO_MULTIPLICITY: return createToMultiplicity();
+      default:
+        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+    }
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Remainder createRemainder()
+  {
+    RemainderImpl remainder = new RemainderImpl();
+    return remainder;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Multiply createMultiply()
+  {
+    MultiplyImpl multiply = new MultiplyImpl();
+    return multiply;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Plus createPlus()
+  {
+    PlusImpl plus = new PlusImpl();
+    return plus;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Minus createMinus()
+  {
+    MinusImpl minus = new MinusImpl();
+    return minus;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Division createDivision()
+  {
+    DivisionImpl division = new DivisionImpl();
+    return division;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public And createAnd()
+  {
+    AndImpl and = new AndImpl();
+    return and;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Equals createEquals()
+  {
+    EqualsImpl equals = new EqualsImpl();
+    return equals;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GreaterThan createGreaterThan()
+  {
+    GreaterThanImpl greaterThan = new GreaterThanImpl();
+    return greaterThan;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GreaterThanOrEqualTo createGreaterThanOrEqualTo()
+  {
+    GreaterThanOrEqualToImpl greaterThanOrEqualTo = new GreaterThanOrEqualToImpl();
+    return greaterThanOrEqualTo;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public LessThan createLessThan()
+  {
+    LessThanImpl lessThan = new LessThanImpl();
+    return lessThan;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public LessThanOrEqualTo createLessThanOrEqualTo()
+  {
+    LessThanOrEqualToImpl lessThanOrEqualTo = new LessThanOrEqualToImpl();
+    return lessThanOrEqualTo;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Not createNot()
+  {
+    NotImpl not = new NotImpl();
+    return not;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotEquals createNotEquals()
+  {
+    NotEqualsImpl notEquals = new NotEqualsImpl();
+    return notEquals;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Or createOr()
+  {
+    OrImpl or = new OrImpl();
+    return or;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public XOr createXOr()
+  {
+    XOrImpl xOr = new XOrImpl();
+    return xOr;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ToString createToString()
+  {
+    ToStringImpl toString = new ToStringImpl();
+    return toString;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ToInt createToInt()
+  {
+    ToIntImpl toInt = new ToIntImpl();
+    return toInt;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ToBoolean createToBoolean()
+  {
+    ToBooleanImpl toBoolean = new ToBooleanImpl();
+    return toBoolean;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ToDouble createToDouble()
+  {
+    ToDoubleImpl toDouble = new ToDoubleImpl();
+    return toDouble;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ToModelElement createToModelElement()
+  {
+    ToModelElementImpl toModelElement = new ToModelElementImpl();
+    return toModelElement;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ToMultiplicity createToMultiplicity()
+  {
+    ToMultiplicityImpl toMultiplicity = new ToMultiplicityImpl();
+    return toMultiplicity;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public BuiltInFunctionsPackage getBuiltInFunctionsPackage()
+  {
+    return (BuiltInFunctionsPackage)getEPackage();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @deprecated
+   * @generated
+   */
+  @Deprecated
+  public static BuiltInFunctionsPackage getPackage()
+  {
+    return BuiltInFunctionsPackage.eINSTANCE;
+  }
+
+} //BuiltInFunctionsFactoryImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/BuiltInFunctionsPackageImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/BuiltInFunctionsPackageImpl.java
new file mode 100644
index 0000000..69b567f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/BuiltInFunctionsPackageImpl.java
@@ -0,0 +1,811 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.And;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ArithmeticOperation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ConversionOperation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Division;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Equals;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThan;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThanOrEqualTo;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThan;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThanOrEqualTo;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Minus;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Multiply;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Not;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.NotEquals;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Or;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Plus;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.RelationalOperation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Remainder;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToBoolean;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToDouble;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToInt;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToModelElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToMultiplicity;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToString;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.XOr;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymovePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class BuiltInFunctionsPackageImpl extends EPackageImpl implements BuiltInFunctionsPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass arithmeticOperationEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass remainderEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass multiplyEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass plusEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass minusEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass divisionEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass relationalOperationEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass andEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass equalsEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass greaterThanEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass greaterThanOrEqualToEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass lessThanEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass lessThanOrEqualToEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass notEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass notEqualsEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass orEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass xOrEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass toStringEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass toIntEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass toBooleanEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass toDoubleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass toModelElementEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass toMultiplicityEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass conversionOperationEClass = null;
+
+  /**
+   * Creates an instance of the model <b>Package</b>, registered with
+   * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+   * package URI value.
+   * <p>Note: the correct way to create the package is via the static
+   * factory method {@link #init init()}, which also performs
+   * initialization of the package, or returns the registered package,
+   * if one already exists.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.emf.ecore.EPackage.Registry
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage#eNS_URI
+   * @see #init()
+   * @generated
+   */
+  private BuiltInFunctionsPackageImpl()
+  {
+    super(eNS_URI, BuiltInFunctionsFactory.eINSTANCE);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static boolean isInited = false;
+
+  /**
+   * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+   * 
+   * <p>This method is used to initialize {@link BuiltInFunctionsPackage#eINSTANCE} when that field is accessed.
+   * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #eNS_URI
+   * @see #createPackageContents()
+   * @see #initializePackageContents()
+   * @generated
+   */
+  public static BuiltInFunctionsPackage init()
+  {
+    if (isInited) return (BuiltInFunctionsPackage)EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI);
+
+    // Obtain or create and register package
+    BuiltInFunctionsPackageImpl theBuiltInFunctionsPackage = (BuiltInFunctionsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof BuiltInFunctionsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new BuiltInFunctionsPackageImpl());
+
+    isInited = true;
+
+    // Obtain or create and register interdependencies
+    EditmodelPackageImpl theEditmodelPackage = (EditmodelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) instanceof EditmodelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) : EditmodelPackage.eINSTANCE);
+    QueryFunctionsPackageImpl theQueryFunctionsPackage = (QueryFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) instanceof QueryFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) : QueryFunctionsPackage.eINSTANCE);
+    DeletionPackageImpl theDeletionPackage = (DeletionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) instanceof DeletionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) : DeletionPackage.eINSTANCE);
+    CreationPackageImpl theCreationPackage = (CreationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) instanceof CreationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) : CreationPackage.eINSTANCE);
+    CopymovePackageImpl theCopymovePackage = (CopymovePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) instanceof CopymovePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) : CopymovePackage.eINSTANCE);
+    UpdatePackageImpl theUpdatePackage = (UpdatePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) instanceof UpdatePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) : UpdatePackage.eINSTANCE);
+    DefinitionsPackageImpl theDefinitionsPackage = (DefinitionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) instanceof DefinitionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) : DefinitionsPackage.eINSTANCE);
+    CorePackageImpl theCorePackage = (CorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) instanceof CorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) : CorePackage.eINSTANCE);
+    SimpleRulesPackageImpl theSimpleRulesPackage = (SimpleRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) instanceof SimpleRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) : SimpleRulesPackage.eINSTANCE);
+    CompoundRulesPackageImpl theCompoundRulesPackage = (CompoundRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) instanceof CompoundRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) : CompoundRulesPackage.eINSTANCE);
+    EnumsPackageImpl theEnumsPackage = (EnumsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) instanceof EnumsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) : EnumsPackage.eINSTANCE);
+    TermsPackageImpl theTermsPackage = (TermsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) instanceof TermsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) : TermsPackage.eINSTANCE);
+    GtPackageImpl theGtPackage = (GtPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) instanceof GtPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) : GtPackage.eINSTANCE);
+
+    // Create package meta-data objects
+    theBuiltInFunctionsPackage.createPackageContents();
+    theEditmodelPackage.createPackageContents();
+    theQueryFunctionsPackage.createPackageContents();
+    theDeletionPackage.createPackageContents();
+    theCreationPackage.createPackageContents();
+    theCopymovePackage.createPackageContents();
+    theUpdatePackage.createPackageContents();
+    theDefinitionsPackage.createPackageContents();
+    theCorePackage.createPackageContents();
+    theSimpleRulesPackage.createPackageContents();
+    theCompoundRulesPackage.createPackageContents();
+    theEnumsPackage.createPackageContents();
+    theTermsPackage.createPackageContents();
+    theGtPackage.createPackageContents();
+
+    // Initialize created meta-data
+    theBuiltInFunctionsPackage.initializePackageContents();
+    theEditmodelPackage.initializePackageContents();
+    theQueryFunctionsPackage.initializePackageContents();
+    theDeletionPackage.initializePackageContents();
+    theCreationPackage.initializePackageContents();
+    theCopymovePackage.initializePackageContents();
+    theUpdatePackage.initializePackageContents();
+    theDefinitionsPackage.initializePackageContents();
+    theCorePackage.initializePackageContents();
+    theSimpleRulesPackage.initializePackageContents();
+    theCompoundRulesPackage.initializePackageContents();
+    theEnumsPackage.initializePackageContents();
+    theTermsPackage.initializePackageContents();
+    theGtPackage.initializePackageContents();
+
+    // Mark meta-data to indicate it can't be changed
+    theBuiltInFunctionsPackage.freeze();
+
+  
+    // Update the registry and return the package
+    EPackage.Registry.INSTANCE.put(BuiltInFunctionsPackage.eNS_URI, theBuiltInFunctionsPackage);
+    return theBuiltInFunctionsPackage;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getArithmeticOperation()
+  {
+    return arithmeticOperationEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getRemainder()
+  {
+    return remainderEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getMultiply()
+  {
+    return multiplyEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getPlus()
+  {
+    return plusEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getMinus()
+  {
+    return minusEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getDivision()
+  {
+    return divisionEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getRelationalOperation()
+  {
+    return relationalOperationEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getAnd()
+  {
+    return andEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getEquals()
+  {
+    return equalsEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getGreaterThan()
+  {
+    return greaterThanEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getGreaterThanOrEqualTo()
+  {
+    return greaterThanOrEqualToEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getLessThan()
+  {
+    return lessThanEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getLessThanOrEqualTo()
+  {
+    return lessThanOrEqualToEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getNot()
+  {
+    return notEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getNotEquals()
+  {
+    return notEqualsEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getOr()
+  {
+    return orEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getXOr()
+  {
+    return xOrEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getToString()
+  {
+    return toStringEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getToInt()
+  {
+    return toIntEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getToBoolean()
+  {
+    return toBooleanEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getToDouble()
+  {
+    return toDoubleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getToModelElement()
+  {
+    return toModelElementEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getToMultiplicity()
+  {
+    return toMultiplicityEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getConversionOperation()
+  {
+    return conversionOperationEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public BuiltInFunctionsFactory getBuiltInFunctionsFactory()
+  {
+    return (BuiltInFunctionsFactory)getEFactoryInstance();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isCreated = false;
+
+  /**
+   * Creates the meta-model objects for the package.  This method is
+   * guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void createPackageContents()
+  {
+    if (isCreated) return;
+    isCreated = true;
+
+    // Create classes and their features
+    arithmeticOperationEClass = createEClass(ARITHMETIC_OPERATION);
+
+    remainderEClass = createEClass(REMAINDER);
+
+    multiplyEClass = createEClass(MULTIPLY);
+
+    plusEClass = createEClass(PLUS);
+
+    minusEClass = createEClass(MINUS);
+
+    divisionEClass = createEClass(DIVISION);
+
+    relationalOperationEClass = createEClass(RELATIONAL_OPERATION);
+
+    andEClass = createEClass(AND);
+
+    equalsEClass = createEClass(EQUALS);
+
+    greaterThanEClass = createEClass(GREATER_THAN);
+
+    greaterThanOrEqualToEClass = createEClass(GREATER_THAN_OR_EQUAL_TO);
+
+    lessThanEClass = createEClass(LESS_THAN);
+
+    lessThanOrEqualToEClass = createEClass(LESS_THAN_OR_EQUAL_TO);
+
+    notEClass = createEClass(NOT);
+
+    notEqualsEClass = createEClass(NOT_EQUALS);
+
+    orEClass = createEClass(OR);
+
+    xOrEClass = createEClass(XOR);
+
+    toStringEClass = createEClass(TO_STRING);
+
+    toIntEClass = createEClass(TO_INT);
+
+    toBooleanEClass = createEClass(TO_BOOLEAN);
+
+    toDoubleEClass = createEClass(TO_DOUBLE);
+
+    toModelElementEClass = createEClass(TO_MODEL_ELEMENT);
+
+    toMultiplicityEClass = createEClass(TO_MULTIPLICITY);
+
+    conversionOperationEClass = createEClass(CONVERSION_OPERATION);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isInitialized = false;
+
+  /**
+   * Complete the initialization of the package and its meta-model.  This
+   * method is guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void initializePackageContents()
+  {
+    if (isInitialized) return;
+    isInitialized = true;
+
+    // Initialize package
+    setName(eNAME);
+    setNsPrefix(eNS_PREFIX);
+    setNsURI(eNS_URI);
+
+    // Obtain other dependent packages
+    TermsPackage theTermsPackage = (TermsPackage)EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI);
+
+    // Create type parameters
+
+    // Set bounds for type parameters
+
+    // Add supertypes to classes
+    arithmeticOperationEClass.getESuperTypes().add(theTermsPackage.getFunctionInvocation());
+    remainderEClass.getESuperTypes().add(this.getArithmeticOperation());
+    multiplyEClass.getESuperTypes().add(this.getArithmeticOperation());
+    plusEClass.getESuperTypes().add(this.getArithmeticOperation());
+    minusEClass.getESuperTypes().add(this.getArithmeticOperation());
+    divisionEClass.getESuperTypes().add(this.getArithmeticOperation());
+    relationalOperationEClass.getESuperTypes().add(theTermsPackage.getFunctionInvocation());
+    andEClass.getESuperTypes().add(this.getRelationalOperation());
+    equalsEClass.getESuperTypes().add(this.getRelationalOperation());
+    greaterThanEClass.getESuperTypes().add(this.getRelationalOperation());
+    greaterThanOrEqualToEClass.getESuperTypes().add(this.getRelationalOperation());
+    lessThanEClass.getESuperTypes().add(this.getRelationalOperation());
+    lessThanOrEqualToEClass.getESuperTypes().add(this.getRelationalOperation());
+    notEClass.getESuperTypes().add(this.getRelationalOperation());
+    notEqualsEClass.getESuperTypes().add(this.getRelationalOperation());
+    orEClass.getESuperTypes().add(this.getRelationalOperation());
+    xOrEClass.getESuperTypes().add(this.getRelationalOperation());
+    toStringEClass.getESuperTypes().add(this.getConversionOperation());
+    toIntEClass.getESuperTypes().add(this.getConversionOperation());
+    toBooleanEClass.getESuperTypes().add(this.getConversionOperation());
+    toDoubleEClass.getESuperTypes().add(this.getConversionOperation());
+    toModelElementEClass.getESuperTypes().add(this.getConversionOperation());
+    toMultiplicityEClass.getESuperTypes().add(this.getConversionOperation());
+    conversionOperationEClass.getESuperTypes().add(theTermsPackage.getFunctionInvocation());
+
+    // Initialize classes and features; add operations and parameters
+    initEClass(arithmeticOperationEClass, ArithmeticOperation.class, "ArithmeticOperation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(remainderEClass, Remainder.class, "Remainder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(multiplyEClass, Multiply.class, "Multiply", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(plusEClass, Plus.class, "Plus", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(minusEClass, Minus.class, "Minus", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(divisionEClass, Division.class, "Division", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(relationalOperationEClass, RelationalOperation.class, "RelationalOperation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(andEClass, And.class, "And", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(equalsEClass, Equals.class, "Equals", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(greaterThanEClass, GreaterThan.class, "GreaterThan", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(greaterThanOrEqualToEClass, GreaterThanOrEqualTo.class, "GreaterThanOrEqualTo", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(lessThanEClass, LessThan.class, "LessThan", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(lessThanOrEqualToEClass, LessThanOrEqualTo.class, "LessThanOrEqualTo", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(notEClass, Not.class, "Not", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(notEqualsEClass, NotEquals.class, "NotEquals", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(orEClass, Or.class, "Or", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(xOrEClass, XOr.class, "XOr", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(toStringEClass, ToString.class, "ToString", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(toIntEClass, ToInt.class, "ToInt", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(toBooleanEClass, ToBoolean.class, "ToBoolean", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(toDoubleEClass, ToDouble.class, "ToDouble", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(toModelElementEClass, ToModelElement.class, "ToModelElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(toMultiplicityEClass, ToMultiplicity.class, "ToMultiplicity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(conversionOperationEClass, ConversionOperation.class, "ConversionOperation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+  }
+
+} //BuiltInFunctionsPackageImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ConversionOperationImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ConversionOperationImpl.java
new file mode 100644
index 0000000..82eb8fe
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ConversionOperationImpl.java
@@ -0,0 +1,60 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ConversionOperation;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.FunctionInvocationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Conversion Operation</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class ConversionOperationImpl extends FunctionInvocationImpl implements ConversionOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ConversionOperationImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.CONVERSION_OPERATION;
+  }
+
+} //ConversionOperationImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/DivisionImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/DivisionImpl.java
new file mode 100644
index 0000000..8adcf32
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/DivisionImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Division;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Division</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class DivisionImpl extends ArithmeticOperationImpl implements Division
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected DivisionImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.DIVISION;
+  }
+
+} //DivisionImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/EqualsImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/EqualsImpl.java
new file mode 100644
index 0000000..b59db6b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/EqualsImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Equals;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Equals</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class EqualsImpl extends RelationalOperationImpl implements Equals
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected EqualsImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.EQUALS;
+  }
+
+} //EqualsImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/GreaterThanImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/GreaterThanImpl.java
new file mode 100644
index 0000000..1de58a7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/GreaterThanImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThan;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Greater Than</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class GreaterThanImpl extends RelationalOperationImpl implements GreaterThan
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected GreaterThanImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.GREATER_THAN;
+  }
+
+} //GreaterThanImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/GreaterThanOrEqualToImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/GreaterThanOrEqualToImpl.java
new file mode 100644
index 0000000..3eb1e26
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/GreaterThanOrEqualToImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThanOrEqualTo;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Greater Than Or Equal To</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class GreaterThanOrEqualToImpl extends RelationalOperationImpl implements GreaterThanOrEqualTo
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected GreaterThanOrEqualToImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.GREATER_THAN_OR_EQUAL_TO;
+  }
+
+} //GreaterThanOrEqualToImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/LessThanImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/LessThanImpl.java
new file mode 100644
index 0000000..056078f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/LessThanImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThan;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Less Than</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class LessThanImpl extends RelationalOperationImpl implements LessThan
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected LessThanImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.LESS_THAN;
+  }
+
+} //LessThanImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/LessThanOrEqualToImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/LessThanOrEqualToImpl.java
new file mode 100644
index 0000000..e13fb20
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/LessThanOrEqualToImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThanOrEqualTo;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Less Than Or Equal To</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class LessThanOrEqualToImpl extends RelationalOperationImpl implements LessThanOrEqualTo
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected LessThanOrEqualToImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.LESS_THAN_OR_EQUAL_TO;
+  }
+
+} //LessThanOrEqualToImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/MinusImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/MinusImpl.java
new file mode 100644
index 0000000..139a78b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/MinusImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Minus;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Minus</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class MinusImpl extends ArithmeticOperationImpl implements Minus
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected MinusImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.MINUS;
+  }
+
+} //MinusImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/MultiplyImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/MultiplyImpl.java
new file mode 100644
index 0000000..008b0c3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/MultiplyImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Multiply;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Multiply</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class MultiplyImpl extends ArithmeticOperationImpl implements Multiply
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected MultiplyImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.MULTIPLY;
+  }
+
+} //MultiplyImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/NotEqualsImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/NotEqualsImpl.java
new file mode 100644
index 0000000..9250261
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/NotEqualsImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.NotEquals;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Not Equals</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class NotEqualsImpl extends RelationalOperationImpl implements NotEquals
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected NotEqualsImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.NOT_EQUALS;
+  }
+
+} //NotEqualsImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/NotImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/NotImpl.java
new file mode 100644
index 0000000..71a5575
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/NotImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Not;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Not</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class NotImpl extends RelationalOperationImpl implements Not
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected NotImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.NOT;
+  }
+
+} //NotImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/OrImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/OrImpl.java
new file mode 100644
index 0000000..eca8fa1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/OrImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Or;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Or</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class OrImpl extends RelationalOperationImpl implements Or
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected OrImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.OR;
+  }
+
+} //OrImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/PlusImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/PlusImpl.java
new file mode 100644
index 0000000..bae89a8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/PlusImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Plus;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Plus</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class PlusImpl extends ArithmeticOperationImpl implements Plus
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected PlusImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.PLUS;
+  }
+
+} //PlusImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/RelationalOperationImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/RelationalOperationImpl.java
new file mode 100644
index 0000000..df64c07
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/RelationalOperationImpl.java
@@ -0,0 +1,60 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.RelationalOperation;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.FunctionInvocationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Relational Operation</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class RelationalOperationImpl extends FunctionInvocationImpl implements RelationalOperation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RelationalOperationImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.RELATIONAL_OPERATION;
+  }
+
+} //RelationalOperationImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/RemainderImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/RemainderImpl.java
new file mode 100644
index 0000000..1719f04
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/RemainderImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Remainder;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Remainder</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class RemainderImpl extends ArithmeticOperationImpl implements Remainder
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RemainderImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.REMAINDER;
+  }
+
+} //RemainderImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ToBooleanImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ToBooleanImpl.java
new file mode 100644
index 0000000..b701810
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ToBooleanImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToBoolean;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>To Boolean</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class ToBooleanImpl extends ConversionOperationImpl implements ToBoolean
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ToBooleanImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.TO_BOOLEAN;
+  }
+
+} //ToBooleanImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ToDoubleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ToDoubleImpl.java
new file mode 100644
index 0000000..5bd46f5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ToDoubleImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToDouble;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>To Double</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class ToDoubleImpl extends ConversionOperationImpl implements ToDouble
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ToDoubleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.TO_DOUBLE;
+  }
+
+} //ToDoubleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ToIntImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ToIntImpl.java
new file mode 100644
index 0000000..ef3f95b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ToIntImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToInt;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>To Int</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class ToIntImpl extends ConversionOperationImpl implements ToInt
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ToIntImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.TO_INT;
+  }
+
+} //ToIntImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ToModelElementImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ToModelElementImpl.java
new file mode 100644
index 0000000..0c58915
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ToModelElementImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToModelElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>To Model Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class ToModelElementImpl extends ConversionOperationImpl implements ToModelElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ToModelElementImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.TO_MODEL_ELEMENT;
+  }
+
+} //ToModelElementImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ToMultiplicityImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ToMultiplicityImpl.java
new file mode 100644
index 0000000..2c14ce7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ToMultiplicityImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToMultiplicity;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>To Multiplicity</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class ToMultiplicityImpl extends ConversionOperationImpl implements ToMultiplicity
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ToMultiplicityImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.TO_MULTIPLICITY;
+  }
+
+} //ToMultiplicityImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ToStringImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ToStringImpl.java
new file mode 100644
index 0000000..99e4eee
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/ToStringImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToString;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>To String</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class ToStringImpl extends ConversionOperationImpl implements ToString
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ToStringImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.TO_STRING;
+  }
+
+} //ToStringImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/XOrImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/XOrImpl.java
new file mode 100644
index 0000000..45c2985
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/impl/XOrImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.XOr;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>XOr</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class XOrImpl extends RelationalOperationImpl implements XOr
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected XOrImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return BuiltInFunctionsPackage.Literals.XOR;
+  }
+
+} //XOrImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/util/BuiltInFunctionsAdapterFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/util/BuiltInFunctionsAdapterFactory.java
new file mode 100644
index 0000000..5ef96b6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/util/BuiltInFunctionsAdapterFactory.java
@@ -0,0 +1,694 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage
+ * @generated
+ */
+public class BuiltInFunctionsAdapterFactory extends AdapterFactoryImpl
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static BuiltInFunctionsPackage modelPackage;
+
+  /**
+   * Creates an instance of the adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public BuiltInFunctionsAdapterFactory()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = BuiltInFunctionsPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Returns whether this factory is applicable for the type of the object.
+   * <!-- begin-user-doc -->
+   * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+   * <!-- end-user-doc -->
+   * @return whether this factory is applicable for the type of the object.
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object object)
+  {
+    if (object == modelPackage)
+    {
+      return true;
+    }
+    if (object instanceof EObject)
+    {
+      return ((EObject)object).eClass().getEPackage() == modelPackage;
+    }
+    return false;
+  }
+
+  /**
+   * The switch that delegates to the <code>createXXX</code> methods.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected BuiltInFunctionsSwitch<Adapter> modelSwitch =
+    new BuiltInFunctionsSwitch<Adapter>()
+    {
+      @Override
+      public Adapter caseArithmeticOperation(ArithmeticOperation object)
+      {
+        return createArithmeticOperationAdapter();
+      }
+      @Override
+      public Adapter caseRemainder(Remainder object)
+      {
+        return createRemainderAdapter();
+      }
+      @Override
+      public Adapter caseMultiply(Multiply object)
+      {
+        return createMultiplyAdapter();
+      }
+      @Override
+      public Adapter casePlus(Plus object)
+      {
+        return createPlusAdapter();
+      }
+      @Override
+      public Adapter caseMinus(Minus object)
+      {
+        return createMinusAdapter();
+      }
+      @Override
+      public Adapter caseDivision(Division object)
+      {
+        return createDivisionAdapter();
+      }
+      @Override
+      public Adapter caseRelationalOperation(RelationalOperation object)
+      {
+        return createRelationalOperationAdapter();
+      }
+      @Override
+      public Adapter caseAnd(And object)
+      {
+        return createAndAdapter();
+      }
+      @Override
+      public Adapter caseEquals(Equals object)
+      {
+        return createEqualsAdapter();
+      }
+      @Override
+      public Adapter caseGreaterThan(GreaterThan object)
+      {
+        return createGreaterThanAdapter();
+      }
+      @Override
+      public Adapter caseGreaterThanOrEqualTo(GreaterThanOrEqualTo object)
+      {
+        return createGreaterThanOrEqualToAdapter();
+      }
+      @Override
+      public Adapter caseLessThan(LessThan object)
+      {
+        return createLessThanAdapter();
+      }
+      @Override
+      public Adapter caseLessThanOrEqualTo(LessThanOrEqualTo object)
+      {
+        return createLessThanOrEqualToAdapter();
+      }
+      @Override
+      public Adapter caseNot(Not object)
+      {
+        return createNotAdapter();
+      }
+      @Override
+      public Adapter caseNotEquals(NotEquals object)
+      {
+        return createNotEqualsAdapter();
+      }
+      @Override
+      public Adapter caseOr(Or object)
+      {
+        return createOrAdapter();
+      }
+      @Override
+      public Adapter caseXOr(XOr object)
+      {
+        return createXOrAdapter();
+      }
+      @Override
+      public Adapter caseToString(ToString object)
+      {
+        return createToStringAdapter();
+      }
+      @Override
+      public Adapter caseToInt(ToInt object)
+      {
+        return createToIntAdapter();
+      }
+      @Override
+      public Adapter caseToBoolean(ToBoolean object)
+      {
+        return createToBooleanAdapter();
+      }
+      @Override
+      public Adapter caseToDouble(ToDouble object)
+      {
+        return createToDoubleAdapter();
+      }
+      @Override
+      public Adapter caseToModelElement(ToModelElement object)
+      {
+        return createToModelElementAdapter();
+      }
+      @Override
+      public Adapter caseToMultiplicity(ToMultiplicity object)
+      {
+        return createToMultiplicityAdapter();
+      }
+      @Override
+      public Adapter caseConversionOperation(ConversionOperation object)
+      {
+        return createConversionOperationAdapter();
+      }
+      @Override
+      public Adapter caseAnnotatedElement(AnnotatedElement object)
+      {
+        return createAnnotatedElementAdapter();
+      }
+      @Override
+      public Adapter caseGTASMElement(GTASMElement object)
+      {
+        return createGTASMElementAdapter();
+      }
+      @Override
+      public Adapter caseTerm(Term object)
+      {
+        return createTermAdapter();
+      }
+      @Override
+      public Adapter caseFunctionInvocation(FunctionInvocation object)
+      {
+        return createFunctionInvocationAdapter();
+      }
+      @Override
+      public Adapter defaultCase(EObject object)
+      {
+        return createEObjectAdapter();
+      }
+    };
+
+  /**
+   * Creates an adapter for the <code>target</code>.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param target the object to adapt.
+   * @return the adapter for the <code>target</code>.
+   * @generated
+   */
+  @Override
+  public Adapter createAdapter(Notifier target)
+  {
+    return modelSwitch.doSwitch((EObject)target);
+  }
+
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ArithmeticOperation <em>Arithmetic Operation</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ArithmeticOperation
+   * @generated
+   */
+  public Adapter createArithmeticOperationAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Remainder <em>Remainder</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Remainder
+   * @generated
+   */
+  public Adapter createRemainderAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Multiply <em>Multiply</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Multiply
+   * @generated
+   */
+  public Adapter createMultiplyAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Plus <em>Plus</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Plus
+   * @generated
+   */
+  public Adapter createPlusAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Minus <em>Minus</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Minus
+   * @generated
+   */
+  public Adapter createMinusAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Division <em>Division</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Division
+   * @generated
+   */
+  public Adapter createDivisionAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.RelationalOperation <em>Relational Operation</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.RelationalOperation
+   * @generated
+   */
+  public Adapter createRelationalOperationAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.And <em>And</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.And
+   * @generated
+   */
+  public Adapter createAndAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Equals <em>Equals</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Equals
+   * @generated
+   */
+  public Adapter createEqualsAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThan <em>Greater Than</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThan
+   * @generated
+   */
+  public Adapter createGreaterThanAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThanOrEqualTo <em>Greater Than Or Equal To</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThanOrEqualTo
+   * @generated
+   */
+  public Adapter createGreaterThanOrEqualToAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThan <em>Less Than</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThan
+   * @generated
+   */
+  public Adapter createLessThanAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThanOrEqualTo <em>Less Than Or Equal To</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThanOrEqualTo
+   * @generated
+   */
+  public Adapter createLessThanOrEqualToAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Not <em>Not</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Not
+   * @generated
+   */
+  public Adapter createNotAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.NotEquals <em>Not Equals</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.NotEquals
+   * @generated
+   */
+  public Adapter createNotEqualsAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Or <em>Or</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Or
+   * @generated
+   */
+  public Adapter createOrAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.XOr <em>XOr</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.XOr
+   * @generated
+   */
+  public Adapter createXOrAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToString <em>To String</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToString
+   * @generated
+   */
+  public Adapter createToStringAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToInt <em>To Int</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToInt
+   * @generated
+   */
+  public Adapter createToIntAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToBoolean <em>To Boolean</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToBoolean
+   * @generated
+   */
+  public Adapter createToBooleanAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToDouble <em>To Double</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToDouble
+   * @generated
+   */
+  public Adapter createToDoubleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToModelElement <em>To Model Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToModelElement
+   * @generated
+   */
+  public Adapter createToModelElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToMultiplicity <em>To Multiplicity</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToMultiplicity
+   * @generated
+   */
+  public Adapter createToMultiplicityAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ConversionOperation <em>Conversion Operation</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ConversionOperation
+   * @generated
+   */
+  public Adapter createConversionOperationAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement <em>Annotated Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement
+   * @generated
+   */
+  public Adapter createAnnotatedElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement <em>GTASM Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement
+   * @generated
+   */
+  public Adapter createGTASMElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term <em>Term</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term
+   * @generated
+   */
+  public Adapter createTermAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation <em>Function Invocation</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation
+   * @generated
+   */
+  public Adapter createFunctionInvocationAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for the default case.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @generated
+   */
+  public Adapter createEObjectAdapter()
+  {
+    return null;
+  }
+
+} //BuiltInFunctionsAdapterFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/util/BuiltInFunctionsSwitch.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/util/BuiltInFunctionsSwitch.java
new file mode 100644
index 0000000..9d9547e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/builtInFunctions/util/BuiltInFunctionsSwitch.java
@@ -0,0 +1,870 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage
+ * @generated
+ */
+public class BuiltInFunctionsSwitch<T>
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static BuiltInFunctionsPackage modelPackage;
+
+  /**
+   * Creates an instance of the switch.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public BuiltInFunctionsSwitch()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = BuiltInFunctionsPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  public T doSwitch(EObject theEObject)
+  {
+    return doSwitch(theEObject.eClass(), theEObject);
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(EClass theEClass, EObject theEObject)
+  {
+    if (theEClass.eContainer() == modelPackage)
+    {
+      return doSwitch(theEClass.getClassifierID(), theEObject);
+    }
+    else
+    {
+      List<EClass> eSuperTypes = theEClass.getESuperTypes();
+      return
+        eSuperTypes.isEmpty() ?
+          defaultCase(theEObject) :
+          doSwitch(eSuperTypes.get(0), theEObject);
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(int classifierID, EObject theEObject)
+  {
+    switch (classifierID)
+    {
+      case BuiltInFunctionsPackage.ARITHMETIC_OPERATION:
+      {
+        ArithmeticOperation arithmeticOperation = (ArithmeticOperation)theEObject;
+        T result = caseArithmeticOperation(arithmeticOperation);
+        if (result == null) result = caseFunctionInvocation(arithmeticOperation);
+        if (result == null) result = caseTerm(arithmeticOperation);
+        if (result == null) result = caseGTASMElement(arithmeticOperation);
+        if (result == null) result = caseAnnotatedElement(arithmeticOperation);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.REMAINDER:
+      {
+        Remainder remainder = (Remainder)theEObject;
+        T result = caseRemainder(remainder);
+        if (result == null) result = caseArithmeticOperation(remainder);
+        if (result == null) result = caseFunctionInvocation(remainder);
+        if (result == null) result = caseTerm(remainder);
+        if (result == null) result = caseGTASMElement(remainder);
+        if (result == null) result = caseAnnotatedElement(remainder);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.MULTIPLY:
+      {
+        Multiply multiply = (Multiply)theEObject;
+        T result = caseMultiply(multiply);
+        if (result == null) result = caseArithmeticOperation(multiply);
+        if (result == null) result = caseFunctionInvocation(multiply);
+        if (result == null) result = caseTerm(multiply);
+        if (result == null) result = caseGTASMElement(multiply);
+        if (result == null) result = caseAnnotatedElement(multiply);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.PLUS:
+      {
+        Plus plus = (Plus)theEObject;
+        T result = casePlus(plus);
+        if (result == null) result = caseArithmeticOperation(plus);
+        if (result == null) result = caseFunctionInvocation(plus);
+        if (result == null) result = caseTerm(plus);
+        if (result == null) result = caseGTASMElement(plus);
+        if (result == null) result = caseAnnotatedElement(plus);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.MINUS:
+      {
+        Minus minus = (Minus)theEObject;
+        T result = caseMinus(minus);
+        if (result == null) result = caseArithmeticOperation(minus);
+        if (result == null) result = caseFunctionInvocation(minus);
+        if (result == null) result = caseTerm(minus);
+        if (result == null) result = caseGTASMElement(minus);
+        if (result == null) result = caseAnnotatedElement(minus);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.DIVISION:
+      {
+        Division division = (Division)theEObject;
+        T result = caseDivision(division);
+        if (result == null) result = caseArithmeticOperation(division);
+        if (result == null) result = caseFunctionInvocation(division);
+        if (result == null) result = caseTerm(division);
+        if (result == null) result = caseGTASMElement(division);
+        if (result == null) result = caseAnnotatedElement(division);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.RELATIONAL_OPERATION:
+      {
+        RelationalOperation relationalOperation = (RelationalOperation)theEObject;
+        T result = caseRelationalOperation(relationalOperation);
+        if (result == null) result = caseFunctionInvocation(relationalOperation);
+        if (result == null) result = caseTerm(relationalOperation);
+        if (result == null) result = caseGTASMElement(relationalOperation);
+        if (result == null) result = caseAnnotatedElement(relationalOperation);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.AND:
+      {
+        And and = (And)theEObject;
+        T result = caseAnd(and);
+        if (result == null) result = caseRelationalOperation(and);
+        if (result == null) result = caseFunctionInvocation(and);
+        if (result == null) result = caseTerm(and);
+        if (result == null) result = caseGTASMElement(and);
+        if (result == null) result = caseAnnotatedElement(and);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.EQUALS:
+      {
+        Equals equals = (Equals)theEObject;
+        T result = caseEquals(equals);
+        if (result == null) result = caseRelationalOperation(equals);
+        if (result == null) result = caseFunctionInvocation(equals);
+        if (result == null) result = caseTerm(equals);
+        if (result == null) result = caseGTASMElement(equals);
+        if (result == null) result = caseAnnotatedElement(equals);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.GREATER_THAN:
+      {
+        GreaterThan greaterThan = (GreaterThan)theEObject;
+        T result = caseGreaterThan(greaterThan);
+        if (result == null) result = caseRelationalOperation(greaterThan);
+        if (result == null) result = caseFunctionInvocation(greaterThan);
+        if (result == null) result = caseTerm(greaterThan);
+        if (result == null) result = caseGTASMElement(greaterThan);
+        if (result == null) result = caseAnnotatedElement(greaterThan);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.GREATER_THAN_OR_EQUAL_TO:
+      {
+        GreaterThanOrEqualTo greaterThanOrEqualTo = (GreaterThanOrEqualTo)theEObject;
+        T result = caseGreaterThanOrEqualTo(greaterThanOrEqualTo);
+        if (result == null) result = caseRelationalOperation(greaterThanOrEqualTo);
+        if (result == null) result = caseFunctionInvocation(greaterThanOrEqualTo);
+        if (result == null) result = caseTerm(greaterThanOrEqualTo);
+        if (result == null) result = caseGTASMElement(greaterThanOrEqualTo);
+        if (result == null) result = caseAnnotatedElement(greaterThanOrEqualTo);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.LESS_THAN:
+      {
+        LessThan lessThan = (LessThan)theEObject;
+        T result = caseLessThan(lessThan);
+        if (result == null) result = caseRelationalOperation(lessThan);
+        if (result == null) result = caseFunctionInvocation(lessThan);
+        if (result == null) result = caseTerm(lessThan);
+        if (result == null) result = caseGTASMElement(lessThan);
+        if (result == null) result = caseAnnotatedElement(lessThan);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.LESS_THAN_OR_EQUAL_TO:
+      {
+        LessThanOrEqualTo lessThanOrEqualTo = (LessThanOrEqualTo)theEObject;
+        T result = caseLessThanOrEqualTo(lessThanOrEqualTo);
+        if (result == null) result = caseRelationalOperation(lessThanOrEqualTo);
+        if (result == null) result = caseFunctionInvocation(lessThanOrEqualTo);
+        if (result == null) result = caseTerm(lessThanOrEqualTo);
+        if (result == null) result = caseGTASMElement(lessThanOrEqualTo);
+        if (result == null) result = caseAnnotatedElement(lessThanOrEqualTo);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.NOT:
+      {
+        Not not = (Not)theEObject;
+        T result = caseNot(not);
+        if (result == null) result = caseRelationalOperation(not);
+        if (result == null) result = caseFunctionInvocation(not);
+        if (result == null) result = caseTerm(not);
+        if (result == null) result = caseGTASMElement(not);
+        if (result == null) result = caseAnnotatedElement(not);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.NOT_EQUALS:
+      {
+        NotEquals notEquals = (NotEquals)theEObject;
+        T result = caseNotEquals(notEquals);
+        if (result == null) result = caseRelationalOperation(notEquals);
+        if (result == null) result = caseFunctionInvocation(notEquals);
+        if (result == null) result = caseTerm(notEquals);
+        if (result == null) result = caseGTASMElement(notEquals);
+        if (result == null) result = caseAnnotatedElement(notEquals);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.OR:
+      {
+        Or or = (Or)theEObject;
+        T result = caseOr(or);
+        if (result == null) result = caseRelationalOperation(or);
+        if (result == null) result = caseFunctionInvocation(or);
+        if (result == null) result = caseTerm(or);
+        if (result == null) result = caseGTASMElement(or);
+        if (result == null) result = caseAnnotatedElement(or);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.XOR:
+      {
+        XOr xOr = (XOr)theEObject;
+        T result = caseXOr(xOr);
+        if (result == null) result = caseRelationalOperation(xOr);
+        if (result == null) result = caseFunctionInvocation(xOr);
+        if (result == null) result = caseTerm(xOr);
+        if (result == null) result = caseGTASMElement(xOr);
+        if (result == null) result = caseAnnotatedElement(xOr);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.TO_STRING:
+      {
+        ToString toString = (ToString)theEObject;
+        T result = caseToString(toString);
+        if (result == null) result = caseConversionOperation(toString);
+        if (result == null) result = caseFunctionInvocation(toString);
+        if (result == null) result = caseTerm(toString);
+        if (result == null) result = caseGTASMElement(toString);
+        if (result == null) result = caseAnnotatedElement(toString);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.TO_INT:
+      {
+        ToInt toInt = (ToInt)theEObject;
+        T result = caseToInt(toInt);
+        if (result == null) result = caseConversionOperation(toInt);
+        if (result == null) result = caseFunctionInvocation(toInt);
+        if (result == null) result = caseTerm(toInt);
+        if (result == null) result = caseGTASMElement(toInt);
+        if (result == null) result = caseAnnotatedElement(toInt);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.TO_BOOLEAN:
+      {
+        ToBoolean toBoolean = (ToBoolean)theEObject;
+        T result = caseToBoolean(toBoolean);
+        if (result == null) result = caseConversionOperation(toBoolean);
+        if (result == null) result = caseFunctionInvocation(toBoolean);
+        if (result == null) result = caseTerm(toBoolean);
+        if (result == null) result = caseGTASMElement(toBoolean);
+        if (result == null) result = caseAnnotatedElement(toBoolean);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.TO_DOUBLE:
+      {
+        ToDouble toDouble = (ToDouble)theEObject;
+        T result = caseToDouble(toDouble);
+        if (result == null) result = caseConversionOperation(toDouble);
+        if (result == null) result = caseFunctionInvocation(toDouble);
+        if (result == null) result = caseTerm(toDouble);
+        if (result == null) result = caseGTASMElement(toDouble);
+        if (result == null) result = caseAnnotatedElement(toDouble);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.TO_MODEL_ELEMENT:
+      {
+        ToModelElement toModelElement = (ToModelElement)theEObject;
+        T result = caseToModelElement(toModelElement);
+        if (result == null) result = caseConversionOperation(toModelElement);
+        if (result == null) result = caseFunctionInvocation(toModelElement);
+        if (result == null) result = caseTerm(toModelElement);
+        if (result == null) result = caseGTASMElement(toModelElement);
+        if (result == null) result = caseAnnotatedElement(toModelElement);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.TO_MULTIPLICITY:
+      {
+        ToMultiplicity toMultiplicity = (ToMultiplicity)theEObject;
+        T result = caseToMultiplicity(toMultiplicity);
+        if (result == null) result = caseConversionOperation(toMultiplicity);
+        if (result == null) result = caseFunctionInvocation(toMultiplicity);
+        if (result == null) result = caseTerm(toMultiplicity);
+        if (result == null) result = caseGTASMElement(toMultiplicity);
+        if (result == null) result = caseAnnotatedElement(toMultiplicity);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case BuiltInFunctionsPackage.CONVERSION_OPERATION:
+      {
+        ConversionOperation conversionOperation = (ConversionOperation)theEObject;
+        T result = caseConversionOperation(conversionOperation);
+        if (result == null) result = caseFunctionInvocation(conversionOperation);
+        if (result == null) result = caseTerm(conversionOperation);
+        if (result == null) result = caseGTASMElement(conversionOperation);
+        if (result == null) result = caseAnnotatedElement(conversionOperation);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      default: return defaultCase(theEObject);
+    }
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Arithmetic Operation</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Arithmetic Operation</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseArithmeticOperation(ArithmeticOperation object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Remainder</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Remainder</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseRemainder(Remainder object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Multiply</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Multiply</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseMultiply(Multiply object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Plus</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Plus</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T casePlus(Plus object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Minus</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Minus</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseMinus(Minus object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Division</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Division</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseDivision(Division object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Relational Operation</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Relational Operation</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseRelationalOperation(RelationalOperation object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>And</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>And</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseAnd(And object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Equals</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Equals</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseEquals(Equals object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Greater Than</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Greater Than</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGreaterThan(GreaterThan object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Greater Than Or Equal To</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Greater Than Or Equal To</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGreaterThanOrEqualTo(GreaterThanOrEqualTo object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Less Than</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Less Than</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseLessThan(LessThan object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Less Than Or Equal To</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Less Than Or Equal To</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseLessThanOrEqualTo(LessThanOrEqualTo object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Not</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Not</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseNot(Not object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Not Equals</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Not Equals</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseNotEquals(NotEquals object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Or</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Or</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseOr(Or object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>XOr</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>XOr</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseXOr(XOr object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>To String</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>To String</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseToString(ToString object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>To Int</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>To Int</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseToInt(ToInt object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>To Boolean</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>To Boolean</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseToBoolean(ToBoolean object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>To Double</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>To Double</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseToDouble(ToDouble object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>To Model Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>To Model Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseToModelElement(ToModelElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>To Multiplicity</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>To Multiplicity</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseToMultiplicity(ToMultiplicity object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Conversion Operation</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Conversion Operation</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseConversionOperation(ConversionOperation object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseAnnotatedElement(AnnotatedElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGTASMElement(GTASMElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Term</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Term</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseTerm(Term object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Function Invocation</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Function Invocation</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseFunctionInvocation(FunctionInvocation object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch, but this is the last case anyway.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+   * @generated
+   */
+  public T defaultCase(EObject object)
+  {
+    return null;
+  }
+
+} //BuiltInFunctionsSwitch
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/ASMFunctionInvocationImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/ASMFunctionInvocationImpl.java
new file mode 100644
index 0000000..cbc1094
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/ASMFunctionInvocationImpl.java
@@ -0,0 +1,189 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>ASM Function Invocation</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ASMFunctionInvocationImpl#getCalledFunction <em>Called Function</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ASMFunctionInvocationImpl extends FunctionInvocationImpl implements ASMFunctionInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getCalledFunction() <em>Called Function</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getCalledFunction()
+   * @generated
+   * @ordered
+   */
+  protected ASMFunction calledFunction;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ASMFunctionInvocationImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return TermsPackage.Literals.ASM_FUNCTION_INVOCATION;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ASMFunction getCalledFunction()
+  {
+    if (calledFunction != null && calledFunction.eIsProxy())
+    {
+      InternalEObject oldCalledFunction = (InternalEObject)calledFunction;
+      calledFunction = (ASMFunction)eResolveProxy(oldCalledFunction);
+      if (calledFunction != oldCalledFunction)
+      {
+        if (eNotificationRequired())
+          eNotify(new ENotificationImpl(this, Notification.RESOLVE, TermsPackage.ASM_FUNCTION_INVOCATION__CALLED_FUNCTION, oldCalledFunction, calledFunction));
+      }
+    }
+    return calledFunction;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ASMFunction basicGetCalledFunction()
+  {
+    return calledFunction;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setCalledFunction(ASMFunction newCalledFunction)
+  {
+    ASMFunction oldCalledFunction = calledFunction;
+    calledFunction = newCalledFunction;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, TermsPackage.ASM_FUNCTION_INVOCATION__CALLED_FUNCTION, oldCalledFunction, calledFunction));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.ASM_FUNCTION_INVOCATION__CALLED_FUNCTION:
+        if (resolve) return getCalledFunction();
+        return basicGetCalledFunction();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.ASM_FUNCTION_INVOCATION__CALLED_FUNCTION:
+        setCalledFunction((ASMFunction)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.ASM_FUNCTION_INVOCATION__CALLED_FUNCTION:
+        setCalledFunction((ASMFunction)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.ASM_FUNCTION_INVOCATION__CALLED_FUNCTION:
+        return calledFunction != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //ASMFunctionInvocationImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/ConstantImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/ConstantImpl.java
new file mode 100644
index 0000000..04e2045
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/ConstantImpl.java
@@ -0,0 +1,192 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Constant</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ConstantImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ConstantImpl extends TermImpl implements Constant
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getValue()
+   * @generated
+   * @ordered
+   */
+  protected static final String VALUE_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getValue()
+   * @generated
+   * @ordered
+   */
+  protected String value = VALUE_EDEFAULT;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ConstantImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return TermsPackage.Literals.CONSTANT;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getValue()
+  {
+    return value;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setValue(String newValue)
+  {
+    String oldValue = value;
+    value = newValue;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, TermsPackage.CONSTANT__VALUE, oldValue, value));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.CONSTANT__VALUE:
+        return getValue();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.CONSTANT__VALUE:
+        setValue((String)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.CONSTANT__VALUE:
+        setValue(VALUE_EDEFAULT);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.CONSTANT__VALUE:
+        return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (value: ");
+    result.append(value);
+    result.append(')');
+    return result.toString();
+  }
+
+} //ConstantImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/FunctionInvocationImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/FunctionInvocationImpl.java
new file mode 100644
index 0000000..f8c37dd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/FunctionInvocationImpl.java
@@ -0,0 +1,181 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Function Invocation</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.FunctionInvocationImpl#getActualParameters <em>Actual Parameters</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class FunctionInvocationImpl extends TermImpl implements FunctionInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getActualParameters() <em>Actual Parameters</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getActualParameters()
+   * @generated
+   * @ordered
+   */
+  protected EList<Term> actualParameters;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected FunctionInvocationImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return TermsPackage.Literals.FUNCTION_INVOCATION;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Term> getActualParameters()
+  {
+    if (actualParameters == null)
+    {
+      actualParameters = new EObjectContainmentEList<Term>(Term.class, this, TermsPackage.FUNCTION_INVOCATION__ACTUAL_PARAMETERS);
+    }
+    return actualParameters;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.FUNCTION_INVOCATION__ACTUAL_PARAMETERS:
+        return ((InternalEList<?>)getActualParameters()).basicRemove(otherEnd, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.FUNCTION_INVOCATION__ACTUAL_PARAMETERS:
+        return getActualParameters();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.FUNCTION_INVOCATION__ACTUAL_PARAMETERS:
+        getActualParameters().clear();
+        getActualParameters().addAll((Collection<? extends Term>)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.FUNCTION_INVOCATION__ACTUAL_PARAMETERS:
+        getActualParameters().clear();
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.FUNCTION_INVOCATION__ACTUAL_PARAMETERS:
+        return actualParameters != null && !actualParameters.isEmpty();
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //FunctionInvocationImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/GTPatternCallImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/GTPatternCallImpl.java
new file mode 100644
index 0000000..11af2ec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/GTPatternCallImpl.java
@@ -0,0 +1,342 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>GT Pattern Call</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.GTPatternCallImpl#getActualParameters <em>Actual Parameters</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.GTPatternCallImpl#getCalledPattern <em>Called Pattern</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.GTPatternCallImpl#getMatchCounter <em>Match Counter</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class GTPatternCallImpl extends TermImpl implements GTPatternCall
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getActualParameters() <em>Actual Parameters</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getActualParameters()
+   * @generated
+   * @ordered
+   */
+  protected EList<Term> actualParameters;
+
+  /**
+   * The cached value of the '{@link #getCalledPattern() <em>Called Pattern</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getCalledPattern()
+   * @generated
+   * @ordered
+   */
+  protected GTPattern calledPattern;
+
+  /**
+   * The cached value of the '{@link #getMatchCounter() <em>Match Counter</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getMatchCounter()
+   * @generated
+   * @ordered
+   */
+  protected GTMatchCounter matchCounter;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected GTPatternCallImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return TermsPackage.Literals.GT_PATTERN_CALL;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Term> getActualParameters()
+  {
+    if (actualParameters == null)
+    {
+      actualParameters = new EObjectContainmentEList<Term>(Term.class, this, TermsPackage.GT_PATTERN_CALL__ACTUAL_PARAMETERS);
+    }
+    return actualParameters;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTPattern getCalledPattern()
+  {
+    if (calledPattern != null && calledPattern.eIsProxy())
+    {
+      InternalEObject oldCalledPattern = (InternalEObject)calledPattern;
+      calledPattern = (GTPattern)eResolveProxy(oldCalledPattern);
+      if (calledPattern != oldCalledPattern)
+      {
+        if (eNotificationRequired())
+          eNotify(new ENotificationImpl(this, Notification.RESOLVE, TermsPackage.GT_PATTERN_CALL__CALLED_PATTERN, oldCalledPattern, calledPattern));
+      }
+    }
+    return calledPattern;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTPattern basicGetCalledPattern()
+  {
+    return calledPattern;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setCalledPattern(GTPattern newCalledPattern)
+  {
+    GTPattern oldCalledPattern = calledPattern;
+    calledPattern = newCalledPattern;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, TermsPackage.GT_PATTERN_CALL__CALLED_PATTERN, oldCalledPattern, calledPattern));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTMatchCounter getMatchCounter()
+  {
+    return matchCounter;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetMatchCounter(GTMatchCounter newMatchCounter, NotificationChain msgs)
+  {
+    GTMatchCounter oldMatchCounter = matchCounter;
+    matchCounter = newMatchCounter;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TermsPackage.GT_PATTERN_CALL__MATCH_COUNTER, oldMatchCounter, newMatchCounter);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setMatchCounter(GTMatchCounter newMatchCounter)
+  {
+    if (newMatchCounter != matchCounter)
+    {
+      NotificationChain msgs = null;
+      if (matchCounter != null)
+        msgs = ((InternalEObject)matchCounter).eInverseRemove(this, GtPackage.GT_MATCH_COUNTER__PATTERN_CALL, GTMatchCounter.class, msgs);
+      if (newMatchCounter != null)
+        msgs = ((InternalEObject)newMatchCounter).eInverseAdd(this, GtPackage.GT_MATCH_COUNTER__PATTERN_CALL, GTMatchCounter.class, msgs);
+      msgs = basicSetMatchCounter(newMatchCounter, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, TermsPackage.GT_PATTERN_CALL__MATCH_COUNTER, newMatchCounter, newMatchCounter));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.GT_PATTERN_CALL__MATCH_COUNTER:
+        if (matchCounter != null)
+          msgs = ((InternalEObject)matchCounter).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TermsPackage.GT_PATTERN_CALL__MATCH_COUNTER, null, msgs);
+        return basicSetMatchCounter((GTMatchCounter)otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.GT_PATTERN_CALL__ACTUAL_PARAMETERS:
+        return ((InternalEList<?>)getActualParameters()).basicRemove(otherEnd, msgs);
+      case TermsPackage.GT_PATTERN_CALL__MATCH_COUNTER:
+        return basicSetMatchCounter(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.GT_PATTERN_CALL__ACTUAL_PARAMETERS:
+        return getActualParameters();
+      case TermsPackage.GT_PATTERN_CALL__CALLED_PATTERN:
+        if (resolve) return getCalledPattern();
+        return basicGetCalledPattern();
+      case TermsPackage.GT_PATTERN_CALL__MATCH_COUNTER:
+        return getMatchCounter();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.GT_PATTERN_CALL__ACTUAL_PARAMETERS:
+        getActualParameters().clear();
+        getActualParameters().addAll((Collection<? extends Term>)newValue);
+        return;
+      case TermsPackage.GT_PATTERN_CALL__CALLED_PATTERN:
+        setCalledPattern((GTPattern)newValue);
+        return;
+      case TermsPackage.GT_PATTERN_CALL__MATCH_COUNTER:
+        setMatchCounter((GTMatchCounter)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.GT_PATTERN_CALL__ACTUAL_PARAMETERS:
+        getActualParameters().clear();
+        return;
+      case TermsPackage.GT_PATTERN_CALL__CALLED_PATTERN:
+        setCalledPattern((GTPattern)null);
+        return;
+      case TermsPackage.GT_PATTERN_CALL__MATCH_COUNTER:
+        setMatchCounter((GTMatchCounter)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.GT_PATTERN_CALL__ACTUAL_PARAMETERS:
+        return actualParameters != null && !actualParameters.isEmpty();
+      case TermsPackage.GT_PATTERN_CALL__CALLED_PATTERN:
+        return calledPattern != null;
+      case TermsPackage.GT_PATTERN_CALL__MATCH_COUNTER:
+        return matchCounter != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //GTPatternCallImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/ModelElementQueryImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/ModelElementQueryImpl.java
new file mode 100644
index 0000000..909d8a7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/ModelElementQueryImpl.java
@@ -0,0 +1,209 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Model Element Query</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ModelElementQueryImpl#getArgument <em>Argument</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ModelElementQueryImpl extends TermImpl implements ModelElementQuery
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getArgument() <em>Argument</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getArgument()
+   * @generated
+   * @ordered
+   */
+  protected Term argument;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ModelElementQueryImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return TermsPackage.Literals.MODEL_ELEMENT_QUERY;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getArgument()
+  {
+    return argument;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetArgument(Term newArgument, NotificationChain msgs)
+  {
+    Term oldArgument = argument;
+    argument = newArgument;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TermsPackage.MODEL_ELEMENT_QUERY__ARGUMENT, oldArgument, newArgument);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setArgument(Term newArgument)
+  {
+    if (newArgument != argument)
+    {
+      NotificationChain msgs = null;
+      if (argument != null)
+        msgs = ((InternalEObject)argument).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TermsPackage.MODEL_ELEMENT_QUERY__ARGUMENT, null, msgs);
+      if (newArgument != null)
+        msgs = ((InternalEObject)newArgument).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TermsPackage.MODEL_ELEMENT_QUERY__ARGUMENT, null, msgs);
+      msgs = basicSetArgument(newArgument, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, TermsPackage.MODEL_ELEMENT_QUERY__ARGUMENT, newArgument, newArgument));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.MODEL_ELEMENT_QUERY__ARGUMENT:
+        return basicSetArgument(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.MODEL_ELEMENT_QUERY__ARGUMENT:
+        return getArgument();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.MODEL_ELEMENT_QUERY__ARGUMENT:
+        setArgument((Term)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.MODEL_ELEMENT_QUERY__ARGUMENT:
+        setArgument((Term)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.MODEL_ELEMENT_QUERY__ARGUMENT:
+        return argument != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //ModelElementQueryImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/NativeFunctionInvocationImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/NativeFunctionInvocationImpl.java
new file mode 100644
index 0000000..b6e474c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/NativeFunctionInvocationImpl.java
@@ -0,0 +1,192 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.NativeFunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Native Function Invocation</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.NativeFunctionInvocationImpl#getFunctionName <em>Function Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class NativeFunctionInvocationImpl extends FunctionInvocationImpl implements NativeFunctionInvocation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The default value of the '{@link #getFunctionName() <em>Function Name</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getFunctionName()
+   * @generated
+   * @ordered
+   */
+  protected static final String FUNCTION_NAME_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getFunctionName() <em>Function Name</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getFunctionName()
+   * @generated
+   * @ordered
+   */
+  protected String functionName = FUNCTION_NAME_EDEFAULT;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected NativeFunctionInvocationImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return TermsPackage.Literals.NATIVE_FUNCTION_INVOCATION;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getFunctionName()
+  {
+    return functionName;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setFunctionName(String newFunctionName)
+  {
+    String oldFunctionName = functionName;
+    functionName = newFunctionName;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, TermsPackage.NATIVE_FUNCTION_INVOCATION__FUNCTION_NAME, oldFunctionName, functionName));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.NATIVE_FUNCTION_INVOCATION__FUNCTION_NAME:
+        return getFunctionName();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.NATIVE_FUNCTION_INVOCATION__FUNCTION_NAME:
+        setFunctionName((String)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.NATIVE_FUNCTION_INVOCATION__FUNCTION_NAME:
+        setFunctionName(FUNCTION_NAME_EDEFAULT);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.NATIVE_FUNCTION_INVOCATION__FUNCTION_NAME:
+        return FUNCTION_NAME_EDEFAULT == null ? functionName != null : !FUNCTION_NAME_EDEFAULT.equals(functionName);
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (functionName: ");
+    result.append(functionName);
+    result.append(')');
+    return result.toString();
+  }
+
+} //NativeFunctionInvocationImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/TermImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/TermImpl.java
new file mode 100644
index 0000000..f15b072
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/TermImpl.java
@@ -0,0 +1,252 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Term</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermImpl#getKind <em>Kind</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermImpl#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class TermImpl extends GTASMElementImpl implements Term
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The default value of the '{@link #getKind() <em>Kind</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getKind()
+   * @generated
+   * @ordered
+   */
+  protected static final ValueKind KIND_EDEFAULT = ValueKind.UNDEF_LITERAL;
+
+  /**
+   * The cached value of the '{@link #getKind() <em>Kind</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getKind()
+   * @generated
+   * @ordered
+   */
+  protected ValueKind kind = KIND_EDEFAULT;
+
+  /**
+   * The default value of the '{@link #getType() <em>Type</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getType()
+   * @generated
+   * @ordered
+   */
+  protected static final String TYPE_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getType()
+   * @generated
+   * @ordered
+   */
+  protected String type = TYPE_EDEFAULT;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected TermImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return TermsPackage.Literals.TERM;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ValueKind getKind()
+  {
+    return kind;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setKind(ValueKind newKind)
+  {
+    ValueKind oldKind = kind;
+    kind = newKind == null ? KIND_EDEFAULT : newKind;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, TermsPackage.TERM__KIND, oldKind, kind));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getType()
+  {
+    return type;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setType(String newType)
+  {
+    String oldType = type;
+    type = newType;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, TermsPackage.TERM__TYPE, oldType, type));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.TERM__KIND:
+        return getKind();
+      case TermsPackage.TERM__TYPE:
+        return getType();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.TERM__KIND:
+        setKind((ValueKind)newValue);
+        return;
+      case TermsPackage.TERM__TYPE:
+        setType((String)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.TERM__KIND:
+        setKind(KIND_EDEFAULT);
+        return;
+      case TermsPackage.TERM__TYPE:
+        setType(TYPE_EDEFAULT);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.TERM__KIND:
+        return kind != KIND_EDEFAULT;
+      case TermsPackage.TERM__TYPE:
+        return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (kind: ");
+    result.append(kind);
+    result.append(", type: ");
+    result.append(type);
+    result.append(')');
+    return result.toString();
+  }
+
+} //TermImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/TermsFactoryImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/TermsFactoryImpl.java
new file mode 100644
index 0000000..e285b86
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/TermsFactoryImpl.java
@@ -0,0 +1,182 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TermsFactoryImpl extends EFactoryImpl implements TermsFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Creates the default factory implementation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static TermsFactory init()
+  {
+    try
+    {
+      TermsFactory theTermsFactory = (TermsFactory)EPackage.Registry.INSTANCE.getEFactory("http:///viatragtasmmodel/gtasm/metamodel/asm/terms.ecore"); 
+      if (theTermsFactory != null)
+      {
+        return theTermsFactory;
+      }
+    }
+    catch (Exception exception)
+    {
+      EcorePlugin.INSTANCE.log(exception);
+    }
+    return new TermsFactoryImpl();
+  }
+
+  /**
+   * Creates an instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public TermsFactoryImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public EObject create(EClass eClass)
+  {
+    switch (eClass.getClassifierID())
+    {
+      case TermsPackage.VARIABLE_REFERENCE: return createVariableReference();
+      case TermsPackage.GT_PATTERN_CALL: return createGTPatternCall();
+      case TermsPackage.ASM_FUNCTION_INVOCATION: return createASMFunctionInvocation();
+      case TermsPackage.CONSTANT: return createConstant();
+      case TermsPackage.NATIVE_FUNCTION_INVOCATION: return createNativeFunctionInvocation();
+      case TermsPackage.MODEL_ELEMENT_QUERY: return createModelElementQuery();
+      default:
+        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+    }
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public VariableReference createVariableReference()
+  {
+    VariableReferenceImpl variableReference = new VariableReferenceImpl();
+    return variableReference;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTPatternCall createGTPatternCall()
+  {
+    GTPatternCallImpl gtPatternCall = new GTPatternCallImpl();
+    return gtPatternCall;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ASMFunctionInvocation createASMFunctionInvocation()
+  {
+    ASMFunctionInvocationImpl asmFunctionInvocation = new ASMFunctionInvocationImpl();
+    return asmFunctionInvocation;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Constant createConstant()
+  {
+    ConstantImpl constant = new ConstantImpl();
+    return constant;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NativeFunctionInvocation createNativeFunctionInvocation()
+  {
+    NativeFunctionInvocationImpl nativeFunctionInvocation = new NativeFunctionInvocationImpl();
+    return nativeFunctionInvocation;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ModelElementQuery createModelElementQuery()
+  {
+    ModelElementQueryImpl modelElementQuery = new ModelElementQueryImpl();
+    return modelElementQuery;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public TermsPackage getTermsPackage()
+  {
+    return (TermsPackage)getEPackage();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @deprecated
+   * @generated
+   */
+  @Deprecated
+  public static TermsPackage getPackage()
+  {
+    return TermsPackage.eINSTANCE;
+  }
+
+} //TermsFactoryImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/TermsPackageImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/TermsPackageImpl.java
new file mode 100644
index 0000000..9419f15
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/TermsPackageImpl.java
@@ -0,0 +1,587 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.NativeFunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymovePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TermsPackageImpl extends EPackageImpl implements TermsPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass termEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass variableReferenceEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass gtPatternCallEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass asmFunctionInvocationEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass functionInvocationEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass constantEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass nativeFunctionInvocationEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass modelElementQueryEClass = null;
+
+  /**
+   * Creates an instance of the model <b>Package</b>, registered with
+   * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+   * package URI value.
+   * <p>Note: the correct way to create the package is via the static
+   * factory method {@link #init init()}, which also performs
+   * initialization of the package, or returns the registered package,
+   * if one already exists.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.emf.ecore.EPackage.Registry
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage#eNS_URI
+   * @see #init()
+   * @generated
+   */
+  private TermsPackageImpl()
+  {
+    super(eNS_URI, TermsFactory.eINSTANCE);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static boolean isInited = false;
+
+  /**
+   * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+   * 
+   * <p>This method is used to initialize {@link TermsPackage#eINSTANCE} when that field is accessed.
+   * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #eNS_URI
+   * @see #createPackageContents()
+   * @see #initializePackageContents()
+   * @generated
+   */
+  public static TermsPackage init()
+  {
+    if (isInited) return (TermsPackage)EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI);
+
+    // Obtain or create and register package
+    TermsPackageImpl theTermsPackage = (TermsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof TermsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new TermsPackageImpl());
+
+    isInited = true;
+
+    // Obtain or create and register interdependencies
+    EditmodelPackageImpl theEditmodelPackage = (EditmodelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) instanceof EditmodelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) : EditmodelPackage.eINSTANCE);
+    QueryFunctionsPackageImpl theQueryFunctionsPackage = (QueryFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) instanceof QueryFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) : QueryFunctionsPackage.eINSTANCE);
+    DeletionPackageImpl theDeletionPackage = (DeletionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) instanceof DeletionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) : DeletionPackage.eINSTANCE);
+    CreationPackageImpl theCreationPackage = (CreationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) instanceof CreationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) : CreationPackage.eINSTANCE);
+    CopymovePackageImpl theCopymovePackage = (CopymovePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) instanceof CopymovePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) : CopymovePackage.eINSTANCE);
+    UpdatePackageImpl theUpdatePackage = (UpdatePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) instanceof UpdatePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) : UpdatePackage.eINSTANCE);
+    DefinitionsPackageImpl theDefinitionsPackage = (DefinitionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) instanceof DefinitionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) : DefinitionsPackage.eINSTANCE);
+    CorePackageImpl theCorePackage = (CorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) instanceof CorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) : CorePackage.eINSTANCE);
+    SimpleRulesPackageImpl theSimpleRulesPackage = (SimpleRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) instanceof SimpleRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) : SimpleRulesPackage.eINSTANCE);
+    CompoundRulesPackageImpl theCompoundRulesPackage = (CompoundRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) instanceof CompoundRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) : CompoundRulesPackage.eINSTANCE);
+    EnumsPackageImpl theEnumsPackage = (EnumsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) instanceof EnumsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) : EnumsPackage.eINSTANCE);
+    BuiltInFunctionsPackageImpl theBuiltInFunctionsPackage = (BuiltInFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) instanceof BuiltInFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) : BuiltInFunctionsPackage.eINSTANCE);
+    GtPackageImpl theGtPackage = (GtPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) instanceof GtPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) : GtPackage.eINSTANCE);
+
+    // Create package meta-data objects
+    theTermsPackage.createPackageContents();
+    theEditmodelPackage.createPackageContents();
+    theQueryFunctionsPackage.createPackageContents();
+    theDeletionPackage.createPackageContents();
+    theCreationPackage.createPackageContents();
+    theCopymovePackage.createPackageContents();
+    theUpdatePackage.createPackageContents();
+    theDefinitionsPackage.createPackageContents();
+    theCorePackage.createPackageContents();
+    theSimpleRulesPackage.createPackageContents();
+    theCompoundRulesPackage.createPackageContents();
+    theEnumsPackage.createPackageContents();
+    theBuiltInFunctionsPackage.createPackageContents();
+    theGtPackage.createPackageContents();
+
+    // Initialize created meta-data
+    theTermsPackage.initializePackageContents();
+    theEditmodelPackage.initializePackageContents();
+    theQueryFunctionsPackage.initializePackageContents();
+    theDeletionPackage.initializePackageContents();
+    theCreationPackage.initializePackageContents();
+    theCopymovePackage.initializePackageContents();
+    theUpdatePackage.initializePackageContents();
+    theDefinitionsPackage.initializePackageContents();
+    theCorePackage.initializePackageContents();
+    theSimpleRulesPackage.initializePackageContents();
+    theCompoundRulesPackage.initializePackageContents();
+    theEnumsPackage.initializePackageContents();
+    theBuiltInFunctionsPackage.initializePackageContents();
+    theGtPackage.initializePackageContents();
+
+    // Mark meta-data to indicate it can't be changed
+    theTermsPackage.freeze();
+
+  
+    // Update the registry and return the package
+    EPackage.Registry.INSTANCE.put(TermsPackage.eNS_URI, theTermsPackage);
+    return theTermsPackage;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getTerm()
+  {
+    return termEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getTerm_Kind()
+  {
+    return (EAttribute)termEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getTerm_Type()
+  {
+    return (EAttribute)termEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getVariableReference()
+  {
+    return variableReferenceEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getVariableReference_Variable()
+  {
+    return (EReference)variableReferenceEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getGTPatternCall()
+  {
+    return gtPatternCallEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTPatternCall_ActualParameters()
+  {
+    return (EReference)gtPatternCallEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTPatternCall_CalledPattern()
+  {
+    return (EReference)gtPatternCallEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTPatternCall_MatchCounter()
+  {
+    return (EReference)gtPatternCallEClass.getEStructuralFeatures().get(2);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getASMFunctionInvocation()
+  {
+    return asmFunctionInvocationEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getASMFunctionInvocation_CalledFunction()
+  {
+    return (EReference)asmFunctionInvocationEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getFunctionInvocation()
+  {
+    return functionInvocationEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getFunctionInvocation_ActualParameters()
+  {
+    return (EReference)functionInvocationEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getConstant()
+  {
+    return constantEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getConstant_Value()
+  {
+    return (EAttribute)constantEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getNativeFunctionInvocation()
+  {
+    return nativeFunctionInvocationEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getNativeFunctionInvocation_FunctionName()
+  {
+    return (EAttribute)nativeFunctionInvocationEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getModelElementQuery()
+  {
+    return modelElementQueryEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getModelElementQuery_Argument()
+  {
+    return (EReference)modelElementQueryEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public TermsFactory getTermsFactory()
+  {
+    return (TermsFactory)getEFactoryInstance();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isCreated = false;
+
+  /**
+   * Creates the meta-model objects for the package.  This method is
+   * guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void createPackageContents()
+  {
+    if (isCreated) return;
+    isCreated = true;
+
+    // Create classes and their features
+    termEClass = createEClass(TERM);
+    createEAttribute(termEClass, TERM__KIND);
+    createEAttribute(termEClass, TERM__TYPE);
+
+    variableReferenceEClass = createEClass(VARIABLE_REFERENCE);
+    createEReference(variableReferenceEClass, VARIABLE_REFERENCE__VARIABLE);
+
+    gtPatternCallEClass = createEClass(GT_PATTERN_CALL);
+    createEReference(gtPatternCallEClass, GT_PATTERN_CALL__ACTUAL_PARAMETERS);
+    createEReference(gtPatternCallEClass, GT_PATTERN_CALL__CALLED_PATTERN);
+    createEReference(gtPatternCallEClass, GT_PATTERN_CALL__MATCH_COUNTER);
+
+    asmFunctionInvocationEClass = createEClass(ASM_FUNCTION_INVOCATION);
+    createEReference(asmFunctionInvocationEClass, ASM_FUNCTION_INVOCATION__CALLED_FUNCTION);
+
+    functionInvocationEClass = createEClass(FUNCTION_INVOCATION);
+    createEReference(functionInvocationEClass, FUNCTION_INVOCATION__ACTUAL_PARAMETERS);
+
+    constantEClass = createEClass(CONSTANT);
+    createEAttribute(constantEClass, CONSTANT__VALUE);
+
+    nativeFunctionInvocationEClass = createEClass(NATIVE_FUNCTION_INVOCATION);
+    createEAttribute(nativeFunctionInvocationEClass, NATIVE_FUNCTION_INVOCATION__FUNCTION_NAME);
+
+    modelElementQueryEClass = createEClass(MODEL_ELEMENT_QUERY);
+    createEReference(modelElementQueryEClass, MODEL_ELEMENT_QUERY__ARGUMENT);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isInitialized = false;
+
+  /**
+   * Complete the initialization of the package and its meta-model.  This
+   * method is guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void initializePackageContents()
+  {
+    if (isInitialized) return;
+    isInitialized = true;
+
+    // Initialize package
+    setName(eNAME);
+    setNsPrefix(eNS_PREFIX);
+    setNsURI(eNS_URI);
+
+    // Obtain other dependent packages
+    BuiltInFunctionsPackage theBuiltInFunctionsPackage = (BuiltInFunctionsPackage)EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI);
+    CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI);
+    EnumsPackage theEnumsPackage = (EnumsPackage)EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI);
+    DefinitionsPackage theDefinitionsPackage = (DefinitionsPackage)EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI);
+    GtPackage theGtPackage = (GtPackage)EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI);
+
+    // Add subpackages
+    getESubpackages().add(theBuiltInFunctionsPackage);
+
+    // Create type parameters
+
+    // Set bounds for type parameters
+
+    // Add supertypes to classes
+    termEClass.getESuperTypes().add(theCorePackage.getGTASMElement());
+    variableReferenceEClass.getESuperTypes().add(this.getTerm());
+    gtPatternCallEClass.getESuperTypes().add(this.getTerm());
+    asmFunctionInvocationEClass.getESuperTypes().add(this.getFunctionInvocation());
+    functionInvocationEClass.getESuperTypes().add(this.getTerm());
+    constantEClass.getESuperTypes().add(this.getTerm());
+    nativeFunctionInvocationEClass.getESuperTypes().add(this.getFunctionInvocation());
+    modelElementQueryEClass.getESuperTypes().add(this.getTerm());
+
+    // Initialize classes and features; add operations and parameters
+    initEClass(termEClass, Term.class, "Term", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEAttribute(getTerm_Kind(), theEnumsPackage.getValueKind(), "kind", "undef", 1, 1, Term.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEAttribute(getTerm_Type(), ecorePackage.getEString(), "type", null, 0, 1, Term.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(variableReferenceEClass, VariableReference.class, "VariableReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getVariableReference_Variable(), theDefinitionsPackage.getVariable(), theDefinitionsPackage.getVariable_References(), "variable", null, 1, 1, VariableReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(gtPatternCallEClass, GTPatternCall.class, "GTPatternCall", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getGTPatternCall_ActualParameters(), this.getTerm(), null, "actualParameters", null, 0, -1, GTPatternCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getGTPatternCall_CalledPattern(), theGtPackage.getGTPattern(), null, "calledPattern", null, 0, 1, GTPatternCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getGTPatternCall_MatchCounter(), theGtPackage.getGTMatchCounter(), theGtPackage.getGTMatchCounter_PatternCall(), "matchCounter", null, 0, 1, GTPatternCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(asmFunctionInvocationEClass, ASMFunctionInvocation.class, "ASMFunctionInvocation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getASMFunctionInvocation_CalledFunction(), theDefinitionsPackage.getASMFunction(), null, "calledFunction", null, 0, 1, ASMFunctionInvocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(functionInvocationEClass, FunctionInvocation.class, "FunctionInvocation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getFunctionInvocation_ActualParameters(), this.getTerm(), null, "actualParameters", null, 0, -1, FunctionInvocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(constantEClass, Constant.class, "Constant", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEAttribute(getConstant_Value(), ecorePackage.getEString(), "value", null, 1, 1, Constant.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(nativeFunctionInvocationEClass, NativeFunctionInvocation.class, "NativeFunctionInvocation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEAttribute(getNativeFunctionInvocation_FunctionName(), ecorePackage.getEString(), "functionName", null, 1, 1, NativeFunctionInvocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(modelElementQueryEClass, ModelElementQuery.class, "ModelElementQuery", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getModelElementQuery_Argument(), this.getTerm(), null, "argument", null, 1, 1, ModelElementQuery.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    // Create resource
+    createResource(eNS_URI);
+  }
+
+} //TermsPackageImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/VariableReferenceImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/VariableReferenceImpl.java
new file mode 100644
index 0000000..93c672d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/impl/VariableReferenceImpl.java
@@ -0,0 +1,250 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Variable Reference</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.VariableReferenceImpl#getVariable <em>Variable</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class VariableReferenceImpl extends TermImpl implements VariableReference
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getVariable() <em>Variable</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getVariable()
+   * @generated
+   * @ordered
+   */
+  protected Variable variable;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected VariableReferenceImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return TermsPackage.Literals.VARIABLE_REFERENCE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Variable getVariable()
+  {
+    if (variable != null && variable.eIsProxy())
+    {
+      InternalEObject oldVariable = (InternalEObject)variable;
+      variable = (Variable)eResolveProxy(oldVariable);
+      if (variable != oldVariable)
+      {
+        if (eNotificationRequired())
+          eNotify(new ENotificationImpl(this, Notification.RESOLVE, TermsPackage.VARIABLE_REFERENCE__VARIABLE, oldVariable, variable));
+      }
+    }
+    return variable;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Variable basicGetVariable()
+  {
+    return variable;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetVariable(Variable newVariable, NotificationChain msgs)
+  {
+    Variable oldVariable = variable;
+    variable = newVariable;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TermsPackage.VARIABLE_REFERENCE__VARIABLE, oldVariable, newVariable);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setVariable(Variable newVariable)
+  {
+    if (newVariable != variable)
+    {
+      NotificationChain msgs = null;
+      if (variable != null)
+        msgs = ((InternalEObject)variable).eInverseRemove(this, DefinitionsPackage.VARIABLE__REFERENCES, Variable.class, msgs);
+      if (newVariable != null)
+        msgs = ((InternalEObject)newVariable).eInverseAdd(this, DefinitionsPackage.VARIABLE__REFERENCES, Variable.class, msgs);
+      msgs = basicSetVariable(newVariable, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, TermsPackage.VARIABLE_REFERENCE__VARIABLE, newVariable, newVariable));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.VARIABLE_REFERENCE__VARIABLE:
+        if (variable != null)
+          msgs = ((InternalEObject)variable).eInverseRemove(this, DefinitionsPackage.VARIABLE__REFERENCES, Variable.class, msgs);
+        return basicSetVariable((Variable)otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.VARIABLE_REFERENCE__VARIABLE:
+        return basicSetVariable(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.VARIABLE_REFERENCE__VARIABLE:
+        if (resolve) return getVariable();
+        return basicGetVariable();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.VARIABLE_REFERENCE__VARIABLE:
+        setVariable((Variable)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.VARIABLE_REFERENCE__VARIABLE:
+        setVariable((Variable)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case TermsPackage.VARIABLE_REFERENCE__VARIABLE:
+        return variable != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //VariableReferenceImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/util/TermsAdapterFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/util/TermsAdapterFactory.java
new file mode 100644
index 0000000..6b01d27
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/util/TermsAdapterFactory.java
@@ -0,0 +1,331 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage
+ * @generated
+ */
+public class TermsAdapterFactory extends AdapterFactoryImpl
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static TermsPackage modelPackage;
+
+  /**
+   * Creates an instance of the adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public TermsAdapterFactory()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = TermsPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Returns whether this factory is applicable for the type of the object.
+   * <!-- begin-user-doc -->
+   * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+   * <!-- end-user-doc -->
+   * @return whether this factory is applicable for the type of the object.
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object object)
+  {
+    if (object == modelPackage)
+    {
+      return true;
+    }
+    if (object instanceof EObject)
+    {
+      return ((EObject)object).eClass().getEPackage() == modelPackage;
+    }
+    return false;
+  }
+
+  /**
+   * The switch that delegates to the <code>createXXX</code> methods.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected TermsSwitch<Adapter> modelSwitch =
+    new TermsSwitch<Adapter>()
+    {
+      @Override
+      public Adapter caseTerm(Term object)
+      {
+        return createTermAdapter();
+      }
+      @Override
+      public Adapter caseVariableReference(VariableReference object)
+      {
+        return createVariableReferenceAdapter();
+      }
+      @Override
+      public Adapter caseGTPatternCall(GTPatternCall object)
+      {
+        return createGTPatternCallAdapter();
+      }
+      @Override
+      public Adapter caseASMFunctionInvocation(ASMFunctionInvocation object)
+      {
+        return createASMFunctionInvocationAdapter();
+      }
+      @Override
+      public Adapter caseFunctionInvocation(FunctionInvocation object)
+      {
+        return createFunctionInvocationAdapter();
+      }
+      @Override
+      public Adapter caseConstant(Constant object)
+      {
+        return createConstantAdapter();
+      }
+      @Override
+      public Adapter caseNativeFunctionInvocation(NativeFunctionInvocation object)
+      {
+        return createNativeFunctionInvocationAdapter();
+      }
+      @Override
+      public Adapter caseModelElementQuery(ModelElementQuery object)
+      {
+        return createModelElementQueryAdapter();
+      }
+      @Override
+      public Adapter caseAnnotatedElement(AnnotatedElement object)
+      {
+        return createAnnotatedElementAdapter();
+      }
+      @Override
+      public Adapter caseGTASMElement(GTASMElement object)
+      {
+        return createGTASMElementAdapter();
+      }
+      @Override
+      public Adapter defaultCase(EObject object)
+      {
+        return createEObjectAdapter();
+      }
+    };
+
+  /**
+   * Creates an adapter for the <code>target</code>.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param target the object to adapt.
+   * @return the adapter for the <code>target</code>.
+   * @generated
+   */
+  @Override
+  public Adapter createAdapter(Notifier target)
+  {
+    return modelSwitch.doSwitch((EObject)target);
+  }
+
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term <em>Term</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term
+   * @generated
+   */
+  public Adapter createTermAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference <em>Variable Reference</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference
+   * @generated
+   */
+  public Adapter createVariableReferenceAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall <em>GT Pattern Call</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall
+   * @generated
+   */
+  public Adapter createGTPatternCallAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation <em>ASM Function Invocation</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation
+   * @generated
+   */
+  public Adapter createASMFunctionInvocationAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation <em>Function Invocation</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation
+   * @generated
+   */
+  public Adapter createFunctionInvocationAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant <em>Constant</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant
+   * @generated
+   */
+  public Adapter createConstantAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.NativeFunctionInvocation <em>Native Function Invocation</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.NativeFunctionInvocation
+   * @generated
+   */
+  public Adapter createNativeFunctionInvocationAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery <em>Model Element Query</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery
+   * @generated
+   */
+  public Adapter createModelElementQueryAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement <em>Annotated Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement
+   * @generated
+   */
+  public Adapter createAnnotatedElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement <em>GTASM Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement
+   * @generated
+   */
+  public Adapter createGTASMElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for the default case.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @generated
+   */
+  public Adapter createEObjectAdapter()
+  {
+    return null;
+  }
+
+} //TermsAdapterFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/util/TermsSwitch.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/util/TermsSwitch.java
new file mode 100644
index 0000000..8d38a57
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/asm/terms/util/TermsSwitch.java
@@ -0,0 +1,375 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage
+ * @generated
+ */
+public class TermsSwitch<T>
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static TermsPackage modelPackage;
+
+  /**
+   * Creates an instance of the switch.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public TermsSwitch()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = TermsPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  public T doSwitch(EObject theEObject)
+  {
+    return doSwitch(theEObject.eClass(), theEObject);
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(EClass theEClass, EObject theEObject)
+  {
+    if (theEClass.eContainer() == modelPackage)
+    {
+      return doSwitch(theEClass.getClassifierID(), theEObject);
+    }
+    else
+    {
+      List<EClass> eSuperTypes = theEClass.getESuperTypes();
+      return
+        eSuperTypes.isEmpty() ?
+          defaultCase(theEObject) :
+          doSwitch(eSuperTypes.get(0), theEObject);
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(int classifierID, EObject theEObject)
+  {
+    switch (classifierID)
+    {
+      case TermsPackage.TERM:
+      {
+        Term term = (Term)theEObject;
+        T result = caseTerm(term);
+        if (result == null) result = caseGTASMElement(term);
+        if (result == null) result = caseAnnotatedElement(term);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case TermsPackage.VARIABLE_REFERENCE:
+      {
+        VariableReference variableReference = (VariableReference)theEObject;
+        T result = caseVariableReference(variableReference);
+        if (result == null) result = caseTerm(variableReference);
+        if (result == null) result = caseGTASMElement(variableReference);
+        if (result == null) result = caseAnnotatedElement(variableReference);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case TermsPackage.GT_PATTERN_CALL:
+      {
+        GTPatternCall gtPatternCall = (GTPatternCall)theEObject;
+        T result = caseGTPatternCall(gtPatternCall);
+        if (result == null) result = caseTerm(gtPatternCall);
+        if (result == null) result = caseGTASMElement(gtPatternCall);
+        if (result == null) result = caseAnnotatedElement(gtPatternCall);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case TermsPackage.ASM_FUNCTION_INVOCATION:
+      {
+        ASMFunctionInvocation asmFunctionInvocation = (ASMFunctionInvocation)theEObject;
+        T result = caseASMFunctionInvocation(asmFunctionInvocation);
+        if (result == null) result = caseFunctionInvocation(asmFunctionInvocation);
+        if (result == null) result = caseTerm(asmFunctionInvocation);
+        if (result == null) result = caseGTASMElement(asmFunctionInvocation);
+        if (result == null) result = caseAnnotatedElement(asmFunctionInvocation);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case TermsPackage.FUNCTION_INVOCATION:
+      {
+        FunctionInvocation functionInvocation = (FunctionInvocation)theEObject;
+        T result = caseFunctionInvocation(functionInvocation);
+        if (result == null) result = caseTerm(functionInvocation);
+        if (result == null) result = caseGTASMElement(functionInvocation);
+        if (result == null) result = caseAnnotatedElement(functionInvocation);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case TermsPackage.CONSTANT:
+      {
+        Constant constant = (Constant)theEObject;
+        T result = caseConstant(constant);
+        if (result == null) result = caseTerm(constant);
+        if (result == null) result = caseGTASMElement(constant);
+        if (result == null) result = caseAnnotatedElement(constant);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case TermsPackage.NATIVE_FUNCTION_INVOCATION:
+      {
+        NativeFunctionInvocation nativeFunctionInvocation = (NativeFunctionInvocation)theEObject;
+        T result = caseNativeFunctionInvocation(nativeFunctionInvocation);
+        if (result == null) result = caseFunctionInvocation(nativeFunctionInvocation);
+        if (result == null) result = caseTerm(nativeFunctionInvocation);
+        if (result == null) result = caseGTASMElement(nativeFunctionInvocation);
+        if (result == null) result = caseAnnotatedElement(nativeFunctionInvocation);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case TermsPackage.MODEL_ELEMENT_QUERY:
+      {
+        ModelElementQuery modelElementQuery = (ModelElementQuery)theEObject;
+        T result = caseModelElementQuery(modelElementQuery);
+        if (result == null) result = caseTerm(modelElementQuery);
+        if (result == null) result = caseGTASMElement(modelElementQuery);
+        if (result == null) result = caseAnnotatedElement(modelElementQuery);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      default: return defaultCase(theEObject);
+    }
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Term</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Term</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseTerm(Term object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Variable Reference</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Variable Reference</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseVariableReference(VariableReference object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>GT Pattern Call</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>GT Pattern Call</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGTPatternCall(GTPatternCall object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>ASM Function Invocation</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>ASM Function Invocation</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseASMFunctionInvocation(ASMFunctionInvocation object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Function Invocation</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Function Invocation</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseFunctionInvocation(FunctionInvocation object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Constant</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Constant</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseConstant(Constant object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Native Function Invocation</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Native Function Invocation</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseNativeFunctionInvocation(NativeFunctionInvocation object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Model Element Query</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Model Element Query</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseModelElementQuery(ModelElementQuery object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseAnnotatedElement(AnnotatedElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGTASMElement(GTASMElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch, but this is the last case anyway.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+   * @generated
+   */
+  public T defaultCase(EObject object)
+  {
+    return null;
+  }
+
+} //TermsSwitch
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/ContainmentConstraint.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/ContainmentConstraint.java
new file mode 100644
index 0000000..88b9e31
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/ContainmentConstraint.java
@@ -0,0 +1,131 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ContainmentMode;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Containment Constraint</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint#getVariable <em>Variable</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint#getMode <em>Mode</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint#getParent <em>Parent</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getContainmentConstraint()
+ * @model
+ * @generated
+ */
+public interface ContainmentConstraint extends GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Variable</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Variable</em>' reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Variable</em>' reference.
+   * @see #setVariable(Variable)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getContainmentConstraint_Variable()
+   * @model required="true" ordered="false"
+   * @generated
+   */
+  Variable getVariable();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint#getVariable <em>Variable</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Variable</em>' reference.
+   * @see #getVariable()
+   * @generated
+   */
+  void setVariable(Variable value);
+
+  /**
+   * Returns the value of the '<em><b>Mode</b></em>' attribute.
+   * The default value is <code>"in"</code>.
+   * The literals are from the enumeration {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ContainmentMode}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Mode</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Mode</em>' attribute.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ContainmentMode
+   * @see #setMode(ContainmentMode)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getContainmentConstraint_Mode()
+   * @model default="in" required="true" ordered="false"
+   * @generated
+   */
+  ContainmentMode getMode();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint#getMode <em>Mode</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Mode</em>' attribute.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ContainmentMode
+   * @see #getMode()
+   * @generated
+   */
+  void setMode(ContainmentMode value);
+
+  /**
+   * Returns the value of the '<em><b>Parent</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Parent</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Parent</em>' containment reference.
+   * @see #setParent(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getContainmentConstraint_Parent()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getParent();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint#getParent <em>Parent</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Parent</em>' containment reference.
+   * @see #getParent()
+   * @generated
+   */
+  void setParent(Term value);
+
+} // ContainmentConstraint
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/GTMatchCounter.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/GTMatchCounter.java
new file mode 100644
index 0000000..2539387
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/GTMatchCounter.java
@@ -0,0 +1,99 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>GT Match Counter</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter#getPatternCall <em>Pattern Call</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter#getVariableReference <em>Variable Reference</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTMatchCounter()
+ * @model
+ * @generated
+ */
+public interface GTMatchCounter extends GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Pattern Call</b></em>' container reference.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall#getMatchCounter <em>Match Counter</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Pattern Call</em>' container reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Pattern Call</em>' container reference.
+   * @see #setPatternCall(GTPatternCall)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTMatchCounter_PatternCall()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall#getMatchCounter
+   * @model opposite="matchCounter" transient="false"
+   * @generated
+   */
+  GTPatternCall getPatternCall();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter#getPatternCall <em>Pattern Call</em>}' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Pattern Call</em>' container reference.
+   * @see #getPatternCall()
+   * @generated
+   */
+  void setPatternCall(GTPatternCall value);
+
+  /**
+   * Returns the value of the '<em><b>Variable Reference</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Variable Reference</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Variable Reference</em>' containment reference.
+   * @see #setVariableReference(VariableReference)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTMatchCounter_VariableReference()
+   * @model containment="true"
+   * @generated
+   */
+  VariableReference getVariableReference();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter#getVariableReference <em>Variable Reference</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Variable Reference</em>' containment reference.
+   * @see #getVariableReference()
+   * @generated
+   */
+  void setVariableReference(VariableReference value);
+
+} // GTMatchCounter
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/GTPattern.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/GTPattern.java
new file mode 100644
index 0000000..35e8edc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/GTPattern.java
@@ -0,0 +1,164 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>GT Pattern</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#getSymParameters <em>Sym Parameters</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#getPatternBodies <em>Pattern Bodies</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#getNamespace <em>Namespace</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#isDistinctMatching <em>Distinct Matching</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#getContainer <em>Container</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTPattern()
+ * @model
+ * @generated
+ */
+public interface GTPattern extends GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Sym Parameters</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Sym Parameters</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Sym Parameters</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTPattern_SymParameters()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  EList<PatternVariable> getSymParameters();
+
+  /**
+   * Returns the value of the '<em><b>Pattern Bodies</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody}.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getHeader <em>Header</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Pattern Bodies</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Pattern Bodies</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTPattern_PatternBodies()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getHeader
+   * @model opposite="header" containment="true" ordered="false"
+   * @generated
+   */
+  EList<GTPatternBody> getPatternBodies();
+
+  /**
+   * Returns the value of the '<em><b>Namespace</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Namespace</em>' reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Namespace</em>' reference.
+   * @see #setNamespace(Machine)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTPattern_Namespace()
+   * @model required="true"
+   * @generated
+   */
+  Machine getNamespace();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#getNamespace <em>Namespace</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Namespace</em>' reference.
+   * @see #getNamespace()
+   * @generated
+   */
+  void setNamespace(Machine value);
+
+  /**
+   * Returns the value of the '<em><b>Distinct Matching</b></em>' attribute.
+   * The default value is <code>"true"</code>.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Distinct Matching</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Distinct Matching</em>' attribute.
+   * @see #setDistinctMatching(boolean)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTPattern_DistinctMatching()
+   * @model default="true"
+   * @generated
+   */
+  boolean isDistinctMatching();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#isDistinctMatching <em>Distinct Matching</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Distinct Matching</em>' attribute.
+   * @see #isDistinctMatching()
+   * @generated
+   */
+  void setDistinctMatching(boolean value);
+
+  /**
+   * Returns the value of the '<em><b>Container</b></em>' container reference.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternContainer#getGtPatternDefinitions <em>Gt Pattern Definitions</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Container</em>' container reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Container</em>' container reference.
+   * @see #setContainer(PatternContainer)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTPattern_Container()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternContainer#getGtPatternDefinitions
+   * @model opposite="gtPatternDefinitions" required="true" transient="false"
+   * @generated
+   */
+  PatternContainer getContainer();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#getContainer <em>Container</em>}' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Container</em>' container reference.
+   * @see #getContainer()
+   * @generated
+   */
+  void setContainer(PatternContainer value);
+
+} // GTPattern
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/GTPatternBody.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/GTPatternBody.java
new file mode 100644
index 0000000..75907cc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/GTPatternBody.java
@@ -0,0 +1,274 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>GT Pattern Body</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getNegativePatterns <em>Negative Patterns</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getLocalVariables <em>Local Variables</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getCalledPatterns <em>Called Patterns</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getCheckExpressions <em>Check Expressions</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getPatternGraph <em>Pattern Graph</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getContainmentConstraints <em>Containment Constraints</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getVariableAssignments <em>Variable Assignments</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getHeader <em>Header</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getElementWrappers <em>Element Wrappers</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getDanglingRelationships <em>Dangling Relationships</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getDanglingRelations <em>Dangling Relations</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getNonInjectivityConstraints <em>Non Injectivity Constraints</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTPatternBody()
+ * @model
+ * @generated
+ */
+public interface GTPatternBody extends PatternContainer
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Negative Patterns</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Negative Patterns</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Negative Patterns</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTPatternBody_NegativePatterns()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  EList<GTPatternCall> getNegativePatterns();
+
+  /**
+   * Returns the value of the '<em><b>Local Variables</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Local Variables</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Local Variables</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTPatternBody_LocalVariables()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  EList<PatternVariable> getLocalVariables();
+
+  /**
+   * Returns the value of the '<em><b>Called Patterns</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Called Patterns</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Called Patterns</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTPatternBody_CalledPatterns()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  EList<GTPatternCall> getCalledPatterns();
+
+  /**
+   * Returns the value of the '<em><b>Check Expressions</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Check Expressions</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Check Expressions</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTPatternBody_CheckExpressions()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  EList<Term> getCheckExpressions();
+
+  /**
+   * Returns the value of the '<em><b>Pattern Graph</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Pattern Graph</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Pattern Graph</em>' containment reference.
+   * @see #setPatternGraph(Entity)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTPatternBody_PatternGraph()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Entity getPatternGraph();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getPatternGraph <em>Pattern Graph</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Pattern Graph</em>' containment reference.
+   * @see #getPatternGraph()
+   * @generated
+   */
+  void setPatternGraph(Entity value);
+
+  /**
+   * Returns the value of the '<em><b>Containment Constraints</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Containment Constraints</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Containment Constraints</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTPatternBody_ContainmentConstraints()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  EList<ContainmentConstraint> getContainmentConstraints();
+
+  /**
+   * Returns the value of the '<em><b>Variable Assignments</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableAssignment}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Variable Assignments</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Variable Assignments</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTPatternBody_VariableAssignments()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  EList<PatternVariableAssignment> getVariableAssignments();
+
+  /**
+   * Returns the value of the '<em><b>Header</b></em>' container reference.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#getPatternBodies <em>Pattern Bodies</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Header</em>' container reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Header</em>' container reference.
+   * @see #setHeader(GTPattern)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTPatternBody_Header()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#getPatternBodies
+   * @model opposite="patternBodies" required="true" transient="false"
+   * @generated
+   */
+  GTPattern getHeader();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getHeader <em>Header</em>}' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Header</em>' container reference.
+   * @see #getHeader()
+   * @generated
+   */
+  void setHeader(GTPattern value);
+
+  /**
+   * Returns the value of the '<em><b>Element Wrappers</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Element Wrappers</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Element Wrappers</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTPatternBody_ElementWrappers()
+   * @model containment="true"
+   * @generated
+   */
+  EList<ModelElement> getElementWrappers();
+
+  /**
+   * Returns the value of the '<em><b>Dangling Relationships</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Dangling Relationships</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Dangling Relationships</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTPatternBody_DanglingRelationships()
+   * @model containment="true"
+   * @generated
+   */
+  EList<Relationship> getDanglingRelationships();
+
+  /**
+   * Returns the value of the '<em><b>Dangling Relations</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Dangling Relations</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Dangling Relations</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTPatternBody_DanglingRelations()
+   * @model containment="true"
+   * @generated
+   */
+  EList<Relation> getDanglingRelations();
+
+  /**
+   * Returns the value of the '<em><b>Non Injectivity Constraints</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.NonInjectivityConstraint}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Non Injectivity Constraints</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Non Injectivity Constraints</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTPatternBody_NonInjectivityConstraints()
+   * @model containment="true"
+   * @generated
+   */
+  EList<NonInjectivityConstraint> getNonInjectivityConstraints();
+
+} // GTPatternBody
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/GTRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/GTRule.java
new file mode 100644
index 0000000..a2ff58b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/GTRule.java
@@ -0,0 +1,192 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>GT Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getSymParameters <em>Sym Parameters</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getPrecondition <em>Precondition</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getLocalVariables <em>Local Variables</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getAction <em>Action</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getPostcondition <em>Postcondition</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getNamespace <em>Namespace</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTRule()
+ * @model
+ * @generated
+ */
+public interface GTRule extends PatternContainer
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Sym Parameters</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Sym Parameters</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Sym Parameters</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTRule_SymParameters()
+   * @model containment="true"
+   * @generated
+   */
+  EList<SymbolicRuleParameter> getSymParameters();
+
+  /**
+   * Returns the value of the '<em><b>Precondition</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Precondition</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Precondition</em>' containment reference.
+   * @see #setPrecondition(GTPatternCall)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTRule_Precondition()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  GTPatternCall getPrecondition();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getPrecondition <em>Precondition</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Precondition</em>' containment reference.
+   * @see #getPrecondition()
+   * @generated
+   */
+  void setPrecondition(GTPatternCall value);
+
+  /**
+   * Returns the value of the '<em><b>Local Variables</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Local Variables</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Local Variables</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTRule_LocalVariables()
+   * @model containment="true"
+   * @generated
+   */
+  EList<Variable> getLocalVariables();
+
+  /**
+   * Returns the value of the '<em><b>Action</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Action</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Action</em>' containment reference.
+   * @see #setAction(ASMRuleInvocation)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTRule_Action()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  ASMRuleInvocation getAction();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getAction <em>Action</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Action</em>' containment reference.
+   * @see #getAction()
+   * @generated
+   */
+  void setAction(ASMRuleInvocation value);
+
+  /**
+   * Returns the value of the '<em><b>Postcondition</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Postcondition</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Postcondition</em>' containment reference.
+   * @see #setPostcondition(GTPatternCall)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTRule_Postcondition()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  GTPatternCall getPostcondition();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getPostcondition <em>Postcondition</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Postcondition</em>' containment reference.
+   * @see #getPostcondition()
+   * @generated
+   */
+  void setPostcondition(GTPatternCall value);
+
+  /**
+   * Returns the value of the '<em><b>Namespace</b></em>' container reference.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getGtRuleDefinitions <em>Gt Rule Definitions</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Namespace</em>' container reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Namespace</em>' container reference.
+   * @see #setNamespace(Machine)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getGTRule_Namespace()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine#getGtRuleDefinitions
+   * @model opposite="gtRuleDefinitions" transient="false"
+   * @generated
+   */
+  Machine getNamespace();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getNamespace <em>Namespace</em>}' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Namespace</em>' container reference.
+   * @see #getNamespace()
+   * @generated
+   */
+  void setNamespace(Machine value);
+
+} // GTRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/GtFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/GtFactory.java
new file mode 100644
index 0000000..dd3ef17
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/GtFactory.java
@@ -0,0 +1,122 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage
+ * @generated
+ */
+public interface GtFactory extends EFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The singleton instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  GtFactory eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtFactoryImpl.init();
+
+  /**
+   * Returns a new object of class '<em>GT Pattern Body</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>GT Pattern Body</em>'.
+   * @generated
+   */
+  GTPatternBody createGTPatternBody();
+
+  /**
+   * Returns a new object of class '<em>GT Pattern</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>GT Pattern</em>'.
+   * @generated
+   */
+  GTPattern createGTPattern();
+
+  /**
+   * Returns a new object of class '<em>Pattern Variable</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Pattern Variable</em>'.
+   * @generated
+   */
+  PatternVariable createPatternVariable();
+
+  /**
+   * Returns a new object of class '<em>Pattern Variable Assignment</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Pattern Variable Assignment</em>'.
+   * @generated
+   */
+  PatternVariableAssignment createPatternVariableAssignment();
+
+  /**
+   * Returns a new object of class '<em>GT Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>GT Rule</em>'.
+   * @generated
+   */
+  GTRule createGTRule();
+
+  /**
+   * Returns a new object of class '<em>Containment Constraint</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Containment Constraint</em>'.
+   * @generated
+   */
+  ContainmentConstraint createContainmentConstraint();
+
+  /**
+   * Returns a new object of class '<em>GT Match Counter</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>GT Match Counter</em>'.
+   * @generated
+   */
+  GTMatchCounter createGTMatchCounter();
+
+  /**
+   * Returns a new object of class '<em>Non Injectivity Constraint</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Non Injectivity Constraint</em>'.
+   * @generated
+   */
+  NonInjectivityConstraint createNonInjectivityConstraint();
+
+  /**
+   * Returns the package supported by this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the package supported by this factory.
+   * @generated
+   */
+  GtPackage getGtPackage();
+
+} //GtFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/GtPackage.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/GtPackage.java
new file mode 100644
index 0000000..e8d6b8b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/GtPackage.java
@@ -0,0 +1,1922 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ *   <li>each class,</li>
+ *   <li>each feature of each class,</li>
+ *   <li>each enum,</li>
+ *   <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface GtPackage extends EPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The package name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNAME = "gt";
+
+  /**
+   * The package namespace URI.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_URI = "http:///viatragtasmmodel/gtasm/metamodel/gt.ecore";
+
+  /**
+   * The package namespace name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_PREFIX = "viatragtasmmodel.gtasm.metamodel.gt";
+
+  /**
+   * The singleton instance of the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  GtPackage eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl.init();
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternContainerImpl <em>Pattern Container</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternContainerImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getPatternContainer()
+   * @generated
+   */
+  int PATTERN_CONTAINER = 9;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_CONTAINER__ANNOTATIONS = CorePackage.GTASM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_CONTAINER__NAME = CorePackage.GTASM_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_CONTAINER__ID = CorePackage.GTASM_ELEMENT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_CONTAINER__FQN = CorePackage.GTASM_ELEMENT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_CONTAINER__RUNTIME_ANNOTATIONS = CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Gt Pattern Definitions</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_CONTAINER__GT_PATTERN_DEFINITIONS = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>Pattern Container</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_CONTAINER_FEATURE_COUNT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternBodyImpl <em>GT Pattern Body</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternBodyImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getGTPatternBody()
+   * @generated
+   */
+  int GT_PATTERN_BODY = 0;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_BODY__ANNOTATIONS = PATTERN_CONTAINER__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_BODY__NAME = PATTERN_CONTAINER__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_BODY__ID = PATTERN_CONTAINER__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_BODY__FQN = PATTERN_CONTAINER__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_BODY__RUNTIME_ANNOTATIONS = PATTERN_CONTAINER__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Gt Pattern Definitions</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_BODY__GT_PATTERN_DEFINITIONS = PATTERN_CONTAINER__GT_PATTERN_DEFINITIONS;
+
+  /**
+   * The feature id for the '<em><b>Negative Patterns</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_BODY__NEGATIVE_PATTERNS = PATTERN_CONTAINER_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Local Variables</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_BODY__LOCAL_VARIABLES = PATTERN_CONTAINER_FEATURE_COUNT + 1;
+
+  /**
+   * The feature id for the '<em><b>Called Patterns</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_BODY__CALLED_PATTERNS = PATTERN_CONTAINER_FEATURE_COUNT + 2;
+
+  /**
+   * The feature id for the '<em><b>Check Expressions</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_BODY__CHECK_EXPRESSIONS = PATTERN_CONTAINER_FEATURE_COUNT + 3;
+
+  /**
+   * The feature id for the '<em><b>Pattern Graph</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_BODY__PATTERN_GRAPH = PATTERN_CONTAINER_FEATURE_COUNT + 4;
+
+  /**
+   * The feature id for the '<em><b>Containment Constraints</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_BODY__CONTAINMENT_CONSTRAINTS = PATTERN_CONTAINER_FEATURE_COUNT + 5;
+
+  /**
+   * The feature id for the '<em><b>Variable Assignments</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_BODY__VARIABLE_ASSIGNMENTS = PATTERN_CONTAINER_FEATURE_COUNT + 6;
+
+  /**
+   * The feature id for the '<em><b>Header</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_BODY__HEADER = PATTERN_CONTAINER_FEATURE_COUNT + 7;
+
+  /**
+   * The feature id for the '<em><b>Element Wrappers</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_BODY__ELEMENT_WRAPPERS = PATTERN_CONTAINER_FEATURE_COUNT + 8;
+
+  /**
+   * The feature id for the '<em><b>Dangling Relationships</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_BODY__DANGLING_RELATIONSHIPS = PATTERN_CONTAINER_FEATURE_COUNT + 9;
+
+  /**
+   * The feature id for the '<em><b>Dangling Relations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_BODY__DANGLING_RELATIONS = PATTERN_CONTAINER_FEATURE_COUNT + 10;
+
+  /**
+   * The feature id for the '<em><b>Non Injectivity Constraints</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_BODY__NON_INJECTIVITY_CONSTRAINTS = PATTERN_CONTAINER_FEATURE_COUNT + 11;
+
+  /**
+   * The number of structural features of the '<em>GT Pattern Body</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_BODY_FEATURE_COUNT = PATTERN_CONTAINER_FEATURE_COUNT + 12;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternImpl <em>GT Pattern</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getGTPattern()
+   * @generated
+   */
+  int GT_PATTERN = 1;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN__ANNOTATIONS = CorePackage.GTASM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN__NAME = CorePackage.GTASM_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN__ID = CorePackage.GTASM_ELEMENT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN__FQN = CorePackage.GTASM_ELEMENT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN__RUNTIME_ANNOTATIONS = CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Sym Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN__SYM_PARAMETERS = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Pattern Bodies</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN__PATTERN_BODIES = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The feature id for the '<em><b>Namespace</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN__NAMESPACE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 2;
+
+  /**
+   * The feature id for the '<em><b>Distinct Matching</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN__DISTINCT_MATCHING = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 3;
+
+  /**
+   * The feature id for the '<em><b>Container</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN__CONTAINER = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 4;
+
+  /**
+   * The number of structural features of the '<em>GT Pattern</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_PATTERN_FEATURE_COUNT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 5;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternVariableImpl <em>Pattern Variable</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternVariableImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getPatternVariable()
+   * @generated
+   */
+  int PATTERN_VARIABLE = 2;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE__ANNOTATIONS = DefinitionsPackage.VARIABLE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE__NAME = DefinitionsPackage.VARIABLE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE__ID = DefinitionsPackage.VARIABLE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE__FQN = DefinitionsPackage.VARIABLE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE__RUNTIME_ANNOTATIONS = DefinitionsPackage.VARIABLE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>References</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE__REFERENCES = DefinitionsPackage.VARIABLE__REFERENCES;
+
+  /**
+   * The feature id for the '<em><b>Scope</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE__SCOPE = DefinitionsPackage.VARIABLE__SCOPE;
+
+  /**
+   * The feature id for the '<em><b>Variable Type</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE__VARIABLE_TYPE = DefinitionsPackage.VARIABLE__VARIABLE_TYPE;
+
+  /**
+   * The feature id for the '<em><b>Element In Pattern</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE__ELEMENT_IN_PATTERN = DefinitionsPackage.VARIABLE_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>Pattern Variable</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE_FEATURE_COUNT = DefinitionsPackage.VARIABLE_FEATURE_COUNT + 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternVariableConstraintImpl <em>Pattern Variable Constraint</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternVariableConstraintImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getPatternVariableConstraint()
+   * @generated
+   */
+  int PATTERN_VARIABLE_CONSTRAINT = 8;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE_CONSTRAINT__ANNOTATIONS = CorePackage.GTASM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE_CONSTRAINT__NAME = CorePackage.GTASM_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE_CONSTRAINT__ID = CorePackage.GTASM_ELEMENT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE_CONSTRAINT__FQN = CorePackage.GTASM_ELEMENT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE_CONSTRAINT__RUNTIME_ANNOTATIONS = CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Left Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Right Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Pattern Variable Constraint</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE_CONSTRAINT_FEATURE_COUNT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternVariableAssignmentImpl <em>Pattern Variable Assignment</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternVariableAssignmentImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getPatternVariableAssignment()
+   * @generated
+   */
+  int PATTERN_VARIABLE_ASSIGNMENT = 3;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE_ASSIGNMENT__ANNOTATIONS = PATTERN_VARIABLE_CONSTRAINT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE_ASSIGNMENT__NAME = PATTERN_VARIABLE_CONSTRAINT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE_ASSIGNMENT__ID = PATTERN_VARIABLE_CONSTRAINT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE_ASSIGNMENT__FQN = PATTERN_VARIABLE_CONSTRAINT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE_ASSIGNMENT__RUNTIME_ANNOTATIONS = PATTERN_VARIABLE_CONSTRAINT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Left Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE_ASSIGNMENT__LEFT_VALUE = PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE;
+
+  /**
+   * The feature id for the '<em><b>Right Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE_ASSIGNMENT__RIGHT_VALUE = PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE;
+
+  /**
+   * The number of structural features of the '<em>Pattern Variable Assignment</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int PATTERN_VARIABLE_ASSIGNMENT_FEATURE_COUNT = PATTERN_VARIABLE_CONSTRAINT_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTRuleImpl <em>GT Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getGTRule()
+   * @generated
+   */
+  int GT_RULE = 4;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE__ANNOTATIONS = PATTERN_CONTAINER__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE__NAME = PATTERN_CONTAINER__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE__ID = PATTERN_CONTAINER__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE__FQN = PATTERN_CONTAINER__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE__RUNTIME_ANNOTATIONS = PATTERN_CONTAINER__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Gt Pattern Definitions</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE__GT_PATTERN_DEFINITIONS = PATTERN_CONTAINER__GT_PATTERN_DEFINITIONS;
+
+  /**
+   * The feature id for the '<em><b>Sym Parameters</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE__SYM_PARAMETERS = PATTERN_CONTAINER_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Precondition</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE__PRECONDITION = PATTERN_CONTAINER_FEATURE_COUNT + 1;
+
+  /**
+   * The feature id for the '<em><b>Local Variables</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE__LOCAL_VARIABLES = PATTERN_CONTAINER_FEATURE_COUNT + 2;
+
+  /**
+   * The feature id for the '<em><b>Action</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE__ACTION = PATTERN_CONTAINER_FEATURE_COUNT + 3;
+
+  /**
+   * The feature id for the '<em><b>Postcondition</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE__POSTCONDITION = PATTERN_CONTAINER_FEATURE_COUNT + 4;
+
+  /**
+   * The feature id for the '<em><b>Namespace</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE__NAMESPACE = PATTERN_CONTAINER_FEATURE_COUNT + 5;
+
+  /**
+   * The number of structural features of the '<em>GT Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_RULE_FEATURE_COUNT = PATTERN_CONTAINER_FEATURE_COUNT + 6;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.ContainmentConstraintImpl <em>Containment Constraint</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.ContainmentConstraintImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getContainmentConstraint()
+   * @generated
+   */
+  int CONTAINMENT_CONSTRAINT = 5;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONTAINMENT_CONSTRAINT__ANNOTATIONS = CorePackage.GTASM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONTAINMENT_CONSTRAINT__NAME = CorePackage.GTASM_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONTAINMENT_CONSTRAINT__ID = CorePackage.GTASM_ELEMENT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONTAINMENT_CONSTRAINT__FQN = CorePackage.GTASM_ELEMENT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONTAINMENT_CONSTRAINT__RUNTIME_ANNOTATIONS = CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Variable</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONTAINMENT_CONSTRAINT__VARIABLE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Mode</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONTAINMENT_CONSTRAINT__MODE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The feature id for the '<em><b>Parent</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONTAINMENT_CONSTRAINT__PARENT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 2;
+
+  /**
+   * The number of structural features of the '<em>Containment Constraint</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CONTAINMENT_CONSTRAINT_FEATURE_COUNT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 3;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTMatchCounterImpl <em>GT Match Counter</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTMatchCounterImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getGTMatchCounter()
+   * @generated
+   */
+  int GT_MATCH_COUNTER = 6;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_MATCH_COUNTER__ANNOTATIONS = CorePackage.GTASM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_MATCH_COUNTER__NAME = CorePackage.GTASM_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_MATCH_COUNTER__ID = CorePackage.GTASM_ELEMENT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_MATCH_COUNTER__FQN = CorePackage.GTASM_ELEMENT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_MATCH_COUNTER__RUNTIME_ANNOTATIONS = CorePackage.GTASM_ELEMENT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Pattern Call</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_MATCH_COUNTER__PATTERN_CALL = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Variable Reference</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_MATCH_COUNTER__VARIABLE_REFERENCE = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>GT Match Counter</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int GT_MATCH_COUNTER_FEATURE_COUNT = CorePackage.GTASM_ELEMENT_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.NonInjectivityConstraintImpl <em>Non Injectivity Constraint</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.NonInjectivityConstraintImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getNonInjectivityConstraint()
+   * @generated
+   */
+  int NON_INJECTIVITY_CONSTRAINT = 7;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NON_INJECTIVITY_CONSTRAINT__ANNOTATIONS = PATTERN_VARIABLE_CONSTRAINT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NON_INJECTIVITY_CONSTRAINT__NAME = PATTERN_VARIABLE_CONSTRAINT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NON_INJECTIVITY_CONSTRAINT__ID = PATTERN_VARIABLE_CONSTRAINT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NON_INJECTIVITY_CONSTRAINT__FQN = PATTERN_VARIABLE_CONSTRAINT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NON_INJECTIVITY_CONSTRAINT__RUNTIME_ANNOTATIONS = PATTERN_VARIABLE_CONSTRAINT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Left Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NON_INJECTIVITY_CONSTRAINT__LEFT_VALUE = PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE;
+
+  /**
+   * The feature id for the '<em><b>Right Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NON_INJECTIVITY_CONSTRAINT__RIGHT_VALUE = PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE;
+
+  /**
+   * The number of structural features of the '<em>Non Injectivity Constraint</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NON_INJECTIVITY_CONSTRAINT_FEATURE_COUNT = PATTERN_VARIABLE_CONSTRAINT_FEATURE_COUNT + 0;
+
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody <em>GT Pattern Body</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>GT Pattern Body</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody
+   * @generated
+   */
+  EClass getGTPatternBody();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getNegativePatterns <em>Negative Patterns</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Negative Patterns</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getNegativePatterns()
+   * @see #getGTPatternBody()
+   * @generated
+   */
+  EReference getGTPatternBody_NegativePatterns();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getLocalVariables <em>Local Variables</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Local Variables</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getLocalVariables()
+   * @see #getGTPatternBody()
+   * @generated
+   */
+  EReference getGTPatternBody_LocalVariables();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getCalledPatterns <em>Called Patterns</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Called Patterns</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getCalledPatterns()
+   * @see #getGTPatternBody()
+   * @generated
+   */
+  EReference getGTPatternBody_CalledPatterns();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getCheckExpressions <em>Check Expressions</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Check Expressions</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getCheckExpressions()
+   * @see #getGTPatternBody()
+   * @generated
+   */
+  EReference getGTPatternBody_CheckExpressions();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getPatternGraph <em>Pattern Graph</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Pattern Graph</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getPatternGraph()
+   * @see #getGTPatternBody()
+   * @generated
+   */
+  EReference getGTPatternBody_PatternGraph();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getContainmentConstraints <em>Containment Constraints</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Containment Constraints</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getContainmentConstraints()
+   * @see #getGTPatternBody()
+   * @generated
+   */
+  EReference getGTPatternBody_ContainmentConstraints();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getVariableAssignments <em>Variable Assignments</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Variable Assignments</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getVariableAssignments()
+   * @see #getGTPatternBody()
+   * @generated
+   */
+  EReference getGTPatternBody_VariableAssignments();
+
+  /**
+   * Returns the meta object for the container reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getHeader <em>Header</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the container reference '<em>Header</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getHeader()
+   * @see #getGTPatternBody()
+   * @generated
+   */
+  EReference getGTPatternBody_Header();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getElementWrappers <em>Element Wrappers</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Element Wrappers</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getElementWrappers()
+   * @see #getGTPatternBody()
+   * @generated
+   */
+  EReference getGTPatternBody_ElementWrappers();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getDanglingRelationships <em>Dangling Relationships</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Dangling Relationships</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getDanglingRelationships()
+   * @see #getGTPatternBody()
+   * @generated
+   */
+  EReference getGTPatternBody_DanglingRelationships();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getDanglingRelations <em>Dangling Relations</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Dangling Relations</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getDanglingRelations()
+   * @see #getGTPatternBody()
+   * @generated
+   */
+  EReference getGTPatternBody_DanglingRelations();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getNonInjectivityConstraints <em>Non Injectivity Constraints</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Non Injectivity Constraints</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody#getNonInjectivityConstraints()
+   * @see #getGTPatternBody()
+   * @generated
+   */
+  EReference getGTPatternBody_NonInjectivityConstraints();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern <em>GT Pattern</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>GT Pattern</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern
+   * @generated
+   */
+  EClass getGTPattern();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#getSymParameters <em>Sym Parameters</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Sym Parameters</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#getSymParameters()
+   * @see #getGTPattern()
+   * @generated
+   */
+  EReference getGTPattern_SymParameters();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#getPatternBodies <em>Pattern Bodies</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Pattern Bodies</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#getPatternBodies()
+   * @see #getGTPattern()
+   * @generated
+   */
+  EReference getGTPattern_PatternBodies();
+
+  /**
+   * Returns the meta object for the reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#getNamespace <em>Namespace</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference '<em>Namespace</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#getNamespace()
+   * @see #getGTPattern()
+   * @generated
+   */
+  EReference getGTPattern_Namespace();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#isDistinctMatching <em>Distinct Matching</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Distinct Matching</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#isDistinctMatching()
+   * @see #getGTPattern()
+   * @generated
+   */
+  EAttribute getGTPattern_DistinctMatching();
+
+  /**
+   * Returns the meta object for the container reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#getContainer <em>Container</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the container reference '<em>Container</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#getContainer()
+   * @see #getGTPattern()
+   * @generated
+   */
+  EReference getGTPattern_Container();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable <em>Pattern Variable</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Pattern Variable</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable
+   * @generated
+   */
+  EClass getPatternVariable();
+
+  /**
+   * Returns the meta object for the reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable#getElementInPattern <em>Element In Pattern</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference list '<em>Element In Pattern</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable#getElementInPattern()
+   * @see #getPatternVariable()
+   * @generated
+   */
+  EReference getPatternVariable_ElementInPattern();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableAssignment <em>Pattern Variable Assignment</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Pattern Variable Assignment</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableAssignment
+   * @generated
+   */
+  EClass getPatternVariableAssignment();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule <em>GT Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>GT Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule
+   * @generated
+   */
+  EClass getGTRule();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getSymParameters <em>Sym Parameters</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Sym Parameters</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getSymParameters()
+   * @see #getGTRule()
+   * @generated
+   */
+  EReference getGTRule_SymParameters();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getPrecondition <em>Precondition</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Precondition</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getPrecondition()
+   * @see #getGTRule()
+   * @generated
+   */
+  EReference getGTRule_Precondition();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getLocalVariables <em>Local Variables</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Local Variables</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getLocalVariables()
+   * @see #getGTRule()
+   * @generated
+   */
+  EReference getGTRule_LocalVariables();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getAction <em>Action</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Action</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getAction()
+   * @see #getGTRule()
+   * @generated
+   */
+  EReference getGTRule_Action();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getPostcondition <em>Postcondition</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Postcondition</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getPostcondition()
+   * @see #getGTRule()
+   * @generated
+   */
+  EReference getGTRule_Postcondition();
+
+  /**
+   * Returns the meta object for the container reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getNamespace <em>Namespace</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the container reference '<em>Namespace</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule#getNamespace()
+   * @see #getGTRule()
+   * @generated
+   */
+  EReference getGTRule_Namespace();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint <em>Containment Constraint</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Containment Constraint</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint
+   * @generated
+   */
+  EClass getContainmentConstraint();
+
+  /**
+   * Returns the meta object for the reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint#getVariable <em>Variable</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference '<em>Variable</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint#getVariable()
+   * @see #getContainmentConstraint()
+   * @generated
+   */
+  EReference getContainmentConstraint_Variable();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint#getMode <em>Mode</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Mode</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint#getMode()
+   * @see #getContainmentConstraint()
+   * @generated
+   */
+  EAttribute getContainmentConstraint_Mode();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint#getParent <em>Parent</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Parent</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint#getParent()
+   * @see #getContainmentConstraint()
+   * @generated
+   */
+  EReference getContainmentConstraint_Parent();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter <em>GT Match Counter</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>GT Match Counter</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter
+   * @generated
+   */
+  EClass getGTMatchCounter();
+
+  /**
+   * Returns the meta object for the container reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter#getPatternCall <em>Pattern Call</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the container reference '<em>Pattern Call</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter#getPatternCall()
+   * @see #getGTMatchCounter()
+   * @generated
+   */
+  EReference getGTMatchCounter_PatternCall();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter#getVariableReference <em>Variable Reference</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Variable Reference</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter#getVariableReference()
+   * @see #getGTMatchCounter()
+   * @generated
+   */
+  EReference getGTMatchCounter_VariableReference();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.NonInjectivityConstraint <em>Non Injectivity Constraint</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Non Injectivity Constraint</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.NonInjectivityConstraint
+   * @generated
+   */
+  EClass getNonInjectivityConstraint();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableConstraint <em>Pattern Variable Constraint</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Pattern Variable Constraint</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableConstraint
+   * @generated
+   */
+  EClass getPatternVariableConstraint();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableConstraint#getLeftValue <em>Left Value</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Left Value</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableConstraint#getLeftValue()
+   * @see #getPatternVariableConstraint()
+   * @generated
+   */
+  EReference getPatternVariableConstraint_LeftValue();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableConstraint#getRightValue <em>Right Value</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Right Value</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableConstraint#getRightValue()
+   * @see #getPatternVariableConstraint()
+   * @generated
+   */
+  EReference getPatternVariableConstraint_RightValue();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternContainer <em>Pattern Container</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Pattern Container</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternContainer
+   * @generated
+   */
+  EClass getPatternContainer();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternContainer#getGtPatternDefinitions <em>Gt Pattern Definitions</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Gt Pattern Definitions</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternContainer#getGtPatternDefinitions()
+   * @see #getPatternContainer()
+   * @generated
+   */
+  EReference getPatternContainer_GtPatternDefinitions();
+
+  /**
+   * Returns the factory that creates the instances of the model.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the factory that creates the instances of the model.
+   * @generated
+   */
+  GtFactory getGtFactory();
+
+  /**
+   * <!-- begin-user-doc -->
+   * Defines literals for the meta objects that represent
+   * <ul>
+   *   <li>each class,</li>
+   *   <li>each feature of each class,</li>
+   *   <li>each enum,</li>
+   *   <li>and each data type</li>
+   * </ul>
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  interface Literals
+  {
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternBodyImpl <em>GT Pattern Body</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternBodyImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getGTPatternBody()
+     * @generated
+     */
+    EClass GT_PATTERN_BODY = eINSTANCE.getGTPatternBody();
+
+    /**
+     * The meta object literal for the '<em><b>Negative Patterns</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_PATTERN_BODY__NEGATIVE_PATTERNS = eINSTANCE.getGTPatternBody_NegativePatterns();
+
+    /**
+     * The meta object literal for the '<em><b>Local Variables</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_PATTERN_BODY__LOCAL_VARIABLES = eINSTANCE.getGTPatternBody_LocalVariables();
+
+    /**
+     * The meta object literal for the '<em><b>Called Patterns</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_PATTERN_BODY__CALLED_PATTERNS = eINSTANCE.getGTPatternBody_CalledPatterns();
+
+    /**
+     * The meta object literal for the '<em><b>Check Expressions</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_PATTERN_BODY__CHECK_EXPRESSIONS = eINSTANCE.getGTPatternBody_CheckExpressions();
+
+    /**
+     * The meta object literal for the '<em><b>Pattern Graph</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_PATTERN_BODY__PATTERN_GRAPH = eINSTANCE.getGTPatternBody_PatternGraph();
+
+    /**
+     * The meta object literal for the '<em><b>Containment Constraints</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_PATTERN_BODY__CONTAINMENT_CONSTRAINTS = eINSTANCE.getGTPatternBody_ContainmentConstraints();
+
+    /**
+     * The meta object literal for the '<em><b>Variable Assignments</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_PATTERN_BODY__VARIABLE_ASSIGNMENTS = eINSTANCE.getGTPatternBody_VariableAssignments();
+
+    /**
+     * The meta object literal for the '<em><b>Header</b></em>' container reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_PATTERN_BODY__HEADER = eINSTANCE.getGTPatternBody_Header();
+
+    /**
+     * The meta object literal for the '<em><b>Element Wrappers</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_PATTERN_BODY__ELEMENT_WRAPPERS = eINSTANCE.getGTPatternBody_ElementWrappers();
+
+    /**
+     * The meta object literal for the '<em><b>Dangling Relationships</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_PATTERN_BODY__DANGLING_RELATIONSHIPS = eINSTANCE.getGTPatternBody_DanglingRelationships();
+
+    /**
+     * The meta object literal for the '<em><b>Dangling Relations</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_PATTERN_BODY__DANGLING_RELATIONS = eINSTANCE.getGTPatternBody_DanglingRelations();
+
+    /**
+     * The meta object literal for the '<em><b>Non Injectivity Constraints</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_PATTERN_BODY__NON_INJECTIVITY_CONSTRAINTS = eINSTANCE.getGTPatternBody_NonInjectivityConstraints();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternImpl <em>GT Pattern</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getGTPattern()
+     * @generated
+     */
+    EClass GT_PATTERN = eINSTANCE.getGTPattern();
+
+    /**
+     * The meta object literal for the '<em><b>Sym Parameters</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_PATTERN__SYM_PARAMETERS = eINSTANCE.getGTPattern_SymParameters();
+
+    /**
+     * The meta object literal for the '<em><b>Pattern Bodies</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_PATTERN__PATTERN_BODIES = eINSTANCE.getGTPattern_PatternBodies();
+
+    /**
+     * The meta object literal for the '<em><b>Namespace</b></em>' reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_PATTERN__NAMESPACE = eINSTANCE.getGTPattern_Namespace();
+
+    /**
+     * The meta object literal for the '<em><b>Distinct Matching</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute GT_PATTERN__DISTINCT_MATCHING = eINSTANCE.getGTPattern_DistinctMatching();
+
+    /**
+     * The meta object literal for the '<em><b>Container</b></em>' container reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_PATTERN__CONTAINER = eINSTANCE.getGTPattern_Container();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternVariableImpl <em>Pattern Variable</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternVariableImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getPatternVariable()
+     * @generated
+     */
+    EClass PATTERN_VARIABLE = eINSTANCE.getPatternVariable();
+
+    /**
+     * The meta object literal for the '<em><b>Element In Pattern</b></em>' reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference PATTERN_VARIABLE__ELEMENT_IN_PATTERN = eINSTANCE.getPatternVariable_ElementInPattern();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternVariableAssignmentImpl <em>Pattern Variable Assignment</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternVariableAssignmentImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getPatternVariableAssignment()
+     * @generated
+     */
+    EClass PATTERN_VARIABLE_ASSIGNMENT = eINSTANCE.getPatternVariableAssignment();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTRuleImpl <em>GT Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getGTRule()
+     * @generated
+     */
+    EClass GT_RULE = eINSTANCE.getGTRule();
+
+    /**
+     * The meta object literal for the '<em><b>Sym Parameters</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_RULE__SYM_PARAMETERS = eINSTANCE.getGTRule_SymParameters();
+
+    /**
+     * The meta object literal for the '<em><b>Precondition</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_RULE__PRECONDITION = eINSTANCE.getGTRule_Precondition();
+
+    /**
+     * The meta object literal for the '<em><b>Local Variables</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_RULE__LOCAL_VARIABLES = eINSTANCE.getGTRule_LocalVariables();
+
+    /**
+     * The meta object literal for the '<em><b>Action</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_RULE__ACTION = eINSTANCE.getGTRule_Action();
+
+    /**
+     * The meta object literal for the '<em><b>Postcondition</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_RULE__POSTCONDITION = eINSTANCE.getGTRule_Postcondition();
+
+    /**
+     * The meta object literal for the '<em><b>Namespace</b></em>' container reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_RULE__NAMESPACE = eINSTANCE.getGTRule_Namespace();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.ContainmentConstraintImpl <em>Containment Constraint</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.ContainmentConstraintImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getContainmentConstraint()
+     * @generated
+     */
+    EClass CONTAINMENT_CONSTRAINT = eINSTANCE.getContainmentConstraint();
+
+    /**
+     * The meta object literal for the '<em><b>Variable</b></em>' reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference CONTAINMENT_CONSTRAINT__VARIABLE = eINSTANCE.getContainmentConstraint_Variable();
+
+    /**
+     * The meta object literal for the '<em><b>Mode</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute CONTAINMENT_CONSTRAINT__MODE = eINSTANCE.getContainmentConstraint_Mode();
+
+    /**
+     * The meta object literal for the '<em><b>Parent</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference CONTAINMENT_CONSTRAINT__PARENT = eINSTANCE.getContainmentConstraint_Parent();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTMatchCounterImpl <em>GT Match Counter</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTMatchCounterImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getGTMatchCounter()
+     * @generated
+     */
+    EClass GT_MATCH_COUNTER = eINSTANCE.getGTMatchCounter();
+
+    /**
+     * The meta object literal for the '<em><b>Pattern Call</b></em>' container reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_MATCH_COUNTER__PATTERN_CALL = eINSTANCE.getGTMatchCounter_PatternCall();
+
+    /**
+     * The meta object literal for the '<em><b>Variable Reference</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference GT_MATCH_COUNTER__VARIABLE_REFERENCE = eINSTANCE.getGTMatchCounter_VariableReference();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.NonInjectivityConstraintImpl <em>Non Injectivity Constraint</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.NonInjectivityConstraintImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getNonInjectivityConstraint()
+     * @generated
+     */
+    EClass NON_INJECTIVITY_CONSTRAINT = eINSTANCE.getNonInjectivityConstraint();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternVariableConstraintImpl <em>Pattern Variable Constraint</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternVariableConstraintImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getPatternVariableConstraint()
+     * @generated
+     */
+    EClass PATTERN_VARIABLE_CONSTRAINT = eINSTANCE.getPatternVariableConstraint();
+
+    /**
+     * The meta object literal for the '<em><b>Left Value</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE = eINSTANCE.getPatternVariableConstraint_LeftValue();
+
+    /**
+     * The meta object literal for the '<em><b>Right Value</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE = eINSTANCE.getPatternVariableConstraint_RightValue();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternContainerImpl <em>Pattern Container</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternContainerImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl#getPatternContainer()
+     * @generated
+     */
+    EClass PATTERN_CONTAINER = eINSTANCE.getPatternContainer();
+
+    /**
+     * The meta object literal for the '<em><b>Gt Pattern Definitions</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference PATTERN_CONTAINER__GT_PATTERN_DEFINITIONS = eINSTANCE.getPatternContainer_GtPatternDefinitions();
+
+  }
+
+} //GtPackage
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/NonInjectivityConstraint.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/NonInjectivityConstraint.java
new file mode 100644
index 0000000..b3de9db
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/NonInjectivityConstraint.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Non Injectivity Constraint</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getNonInjectivityConstraint()
+ * @model
+ * @generated
+ */
+public interface NonInjectivityConstraint extends PatternVariableConstraint
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // NonInjectivityConstraint
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/PatternContainer.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/PatternContainer.java
new file mode 100644
index 0000000..677e761
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/PatternContainer.java
@@ -0,0 +1,61 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Pattern Container</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternContainer#getGtPatternDefinitions <em>Gt Pattern Definitions</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getPatternContainer()
+ * @model abstract="true"
+ * @generated
+ */
+public interface PatternContainer extends GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Gt Pattern Definitions</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern}.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#getContainer <em>Container</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Gt Pattern Definitions</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Gt Pattern Definitions</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getPatternContainer_GtPatternDefinitions()
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern#getContainer
+   * @model opposite="container" containment="true"
+   * @generated
+   */
+  EList<GTPattern> getGtPatternDefinitions();
+
+} // PatternContainer
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/PatternVariable.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/PatternVariable.java
new file mode 100644
index 0000000..7811700
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/PatternVariable.java
@@ -0,0 +1,61 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Pattern Variable</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable#getElementInPattern <em>Element In Pattern</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getPatternVariable()
+ * @model
+ * @generated
+ */
+public interface PatternVariable extends Variable
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Element In Pattern</b></em>' reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Element In Pattern</em>' reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Element In Pattern</em>' reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getPatternVariable_ElementInPattern()
+   * @model ordered="false"
+   * @generated
+   */
+  EList<ModelElement> getElementInPattern();
+
+} // PatternVariable
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/PatternVariableAssignment.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/PatternVariableAssignment.java
new file mode 100644
index 0000000..040a8fc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/PatternVariableAssignment.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Pattern Variable Assignment</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getPatternVariableAssignment()
+ * @model
+ * @generated
+ */
+public interface PatternVariableAssignment extends PatternVariableConstraint
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // PatternVariableAssignment
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/PatternVariableConstraint.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/PatternVariableConstraint.java
new file mode 100644
index 0000000..986efee
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/PatternVariableConstraint.java
@@ -0,0 +1,96 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Pattern Variable Constraint</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableConstraint#getLeftValue <em>Left Value</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableConstraint#getRightValue <em>Right Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getPatternVariableConstraint()
+ * @model abstract="true"
+ * @generated
+ */
+public interface PatternVariableConstraint extends GTASMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Left Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Left Value</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Left Value</em>' containment reference.
+   * @see #setLeftValue(VariableReference)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getPatternVariableConstraint_LeftValue()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  VariableReference getLeftValue();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableConstraint#getLeftValue <em>Left Value</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Left Value</em>' containment reference.
+   * @see #getLeftValue()
+   * @generated
+   */
+  void setLeftValue(VariableReference value);
+
+  /**
+   * Returns the value of the '<em><b>Right Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Right Value</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Right Value</em>' containment reference.
+   * @see #setRightValue(VariableReference)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#getPatternVariableConstraint_RightValue()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  VariableReference getRightValue();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableConstraint#getRightValue <em>Right Value</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Right Value</em>' containment reference.
+   * @see #getRightValue()
+   * @generated
+   */
+  void setRightValue(VariableReference value);
+
+} // PatternVariableConstraint
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/ContainmentConstraintImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/ContainmentConstraintImpl.java
new file mode 100644
index 0000000..9cb3595
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/ContainmentConstraintImpl.java
@@ -0,0 +1,352 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ContainmentMode;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Containment Constraint</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.ContainmentConstraintImpl#getVariable <em>Variable</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.ContainmentConstraintImpl#getMode <em>Mode</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.ContainmentConstraintImpl#getParent <em>Parent</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ContainmentConstraintImpl extends GTASMElementImpl implements ContainmentConstraint
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getVariable() <em>Variable</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getVariable()
+   * @generated
+   * @ordered
+   */
+  protected Variable variable;
+
+  /**
+   * The default value of the '{@link #getMode() <em>Mode</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getMode()
+   * @generated
+   * @ordered
+   */
+  protected static final ContainmentMode MODE_EDEFAULT = ContainmentMode.IN_LITERAL;
+
+  /**
+   * The cached value of the '{@link #getMode() <em>Mode</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getMode()
+   * @generated
+   * @ordered
+   */
+  protected ContainmentMode mode = MODE_EDEFAULT;
+
+  /**
+   * The cached value of the '{@link #getParent() <em>Parent</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getParent()
+   * @generated
+   * @ordered
+   */
+  protected Term parent;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ContainmentConstraintImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return GtPackage.Literals.CONTAINMENT_CONSTRAINT;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Variable getVariable()
+  {
+    if (variable != null && variable.eIsProxy())
+    {
+      InternalEObject oldVariable = (InternalEObject)variable;
+      variable = (Variable)eResolveProxy(oldVariable);
+      if (variable != oldVariable)
+      {
+        if (eNotificationRequired())
+          eNotify(new ENotificationImpl(this, Notification.RESOLVE, GtPackage.CONTAINMENT_CONSTRAINT__VARIABLE, oldVariable, variable));
+      }
+    }
+    return variable;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Variable basicGetVariable()
+  {
+    return variable;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setVariable(Variable newVariable)
+  {
+    Variable oldVariable = variable;
+    variable = newVariable;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, GtPackage.CONTAINMENT_CONSTRAINT__VARIABLE, oldVariable, variable));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ContainmentMode getMode()
+  {
+    return mode;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setMode(ContainmentMode newMode)
+  {
+    ContainmentMode oldMode = mode;
+    mode = newMode == null ? MODE_EDEFAULT : newMode;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, GtPackage.CONTAINMENT_CONSTRAINT__MODE, oldMode, mode));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getParent()
+  {
+    return parent;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetParent(Term newParent, NotificationChain msgs)
+  {
+    Term oldParent = parent;
+    parent = newParent;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GtPackage.CONTAINMENT_CONSTRAINT__PARENT, oldParent, newParent);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setParent(Term newParent)
+  {
+    if (newParent != parent)
+    {
+      NotificationChain msgs = null;
+      if (parent != null)
+        msgs = ((InternalEObject)parent).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GtPackage.CONTAINMENT_CONSTRAINT__PARENT, null, msgs);
+      if (newParent != null)
+        msgs = ((InternalEObject)newParent).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GtPackage.CONTAINMENT_CONSTRAINT__PARENT, null, msgs);
+      msgs = basicSetParent(newParent, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, GtPackage.CONTAINMENT_CONSTRAINT__PARENT, newParent, newParent));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case GtPackage.CONTAINMENT_CONSTRAINT__PARENT:
+        return basicSetParent(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case GtPackage.CONTAINMENT_CONSTRAINT__VARIABLE:
+        if (resolve) return getVariable();
+        return basicGetVariable();
+      case GtPackage.CONTAINMENT_CONSTRAINT__MODE:
+        return getMode();
+      case GtPackage.CONTAINMENT_CONSTRAINT__PARENT:
+        return getParent();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case GtPackage.CONTAINMENT_CONSTRAINT__VARIABLE:
+        setVariable((Variable)newValue);
+        return;
+      case GtPackage.CONTAINMENT_CONSTRAINT__MODE:
+        setMode((ContainmentMode)newValue);
+        return;
+      case GtPackage.CONTAINMENT_CONSTRAINT__PARENT:
+        setParent((Term)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case GtPackage.CONTAINMENT_CONSTRAINT__VARIABLE:
+        setVariable((Variable)null);
+        return;
+      case GtPackage.CONTAINMENT_CONSTRAINT__MODE:
+        setMode(MODE_EDEFAULT);
+        return;
+      case GtPackage.CONTAINMENT_CONSTRAINT__PARENT:
+        setParent((Term)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case GtPackage.CONTAINMENT_CONSTRAINT__VARIABLE:
+        return variable != null;
+      case GtPackage.CONTAINMENT_CONSTRAINT__MODE:
+        return mode != MODE_EDEFAULT;
+      case GtPackage.CONTAINMENT_CONSTRAINT__PARENT:
+        return parent != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (mode: ");
+    result.append(mode);
+    result.append(')');
+    return result.toString();
+  }
+
+} //ContainmentConstraintImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/GTMatchCounterImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/GTMatchCounterImpl.java
new file mode 100644
index 0000000..389b62b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/GTMatchCounterImpl.java
@@ -0,0 +1,308 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>GT Match Counter</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTMatchCounterImpl#getPatternCall <em>Pattern Call</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTMatchCounterImpl#getVariableReference <em>Variable Reference</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class GTMatchCounterImpl extends GTASMElementImpl implements GTMatchCounter
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getVariableReference() <em>Variable Reference</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getVariableReference()
+   * @generated
+   * @ordered
+   */
+  protected VariableReference variableReference;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected GTMatchCounterImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return GtPackage.Literals.GT_MATCH_COUNTER;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTPatternCall getPatternCall()
+  {
+    if (eContainerFeatureID() != GtPackage.GT_MATCH_COUNTER__PATTERN_CALL) return null;
+    return (GTPatternCall)eContainer();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetPatternCall(GTPatternCall newPatternCall, NotificationChain msgs)
+  {
+    msgs = eBasicSetContainer((InternalEObject)newPatternCall, GtPackage.GT_MATCH_COUNTER__PATTERN_CALL, msgs);
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setPatternCall(GTPatternCall newPatternCall)
+  {
+    if (newPatternCall != eInternalContainer() || (eContainerFeatureID() != GtPackage.GT_MATCH_COUNTER__PATTERN_CALL && newPatternCall != null))
+    {
+      if (EcoreUtil.isAncestor(this, newPatternCall))
+        throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+      NotificationChain msgs = null;
+      if (eInternalContainer() != null)
+        msgs = eBasicRemoveFromContainer(msgs);
+      if (newPatternCall != null)
+        msgs = ((InternalEObject)newPatternCall).eInverseAdd(this, TermsPackage.GT_PATTERN_CALL__MATCH_COUNTER, GTPatternCall.class, msgs);
+      msgs = basicSetPatternCall(newPatternCall, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, GtPackage.GT_MATCH_COUNTER__PATTERN_CALL, newPatternCall, newPatternCall));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public VariableReference getVariableReference()
+  {
+    return variableReference;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetVariableReference(VariableReference newVariableReference, NotificationChain msgs)
+  {
+    VariableReference oldVariableReference = variableReference;
+    variableReference = newVariableReference;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GtPackage.GT_MATCH_COUNTER__VARIABLE_REFERENCE, oldVariableReference, newVariableReference);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setVariableReference(VariableReference newVariableReference)
+  {
+    if (newVariableReference != variableReference)
+    {
+      NotificationChain msgs = null;
+      if (variableReference != null)
+        msgs = ((InternalEObject)variableReference).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GtPackage.GT_MATCH_COUNTER__VARIABLE_REFERENCE, null, msgs);
+      if (newVariableReference != null)
+        msgs = ((InternalEObject)newVariableReference).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GtPackage.GT_MATCH_COUNTER__VARIABLE_REFERENCE, null, msgs);
+      msgs = basicSetVariableReference(newVariableReference, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, GtPackage.GT_MATCH_COUNTER__VARIABLE_REFERENCE, newVariableReference, newVariableReference));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_MATCH_COUNTER__PATTERN_CALL:
+        if (eInternalContainer() != null)
+          msgs = eBasicRemoveFromContainer(msgs);
+        return basicSetPatternCall((GTPatternCall)otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_MATCH_COUNTER__PATTERN_CALL:
+        return basicSetPatternCall(null, msgs);
+      case GtPackage.GT_MATCH_COUNTER__VARIABLE_REFERENCE:
+        return basicSetVariableReference(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
+  {
+    switch (eContainerFeatureID())
+    {
+      case GtPackage.GT_MATCH_COUNTER__PATTERN_CALL:
+        return eInternalContainer().eInverseRemove(this, TermsPackage.GT_PATTERN_CALL__MATCH_COUNTER, GTPatternCall.class, msgs);
+    }
+    return super.eBasicRemoveFromContainerFeature(msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_MATCH_COUNTER__PATTERN_CALL:
+        return getPatternCall();
+      case GtPackage.GT_MATCH_COUNTER__VARIABLE_REFERENCE:
+        return getVariableReference();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_MATCH_COUNTER__PATTERN_CALL:
+        setPatternCall((GTPatternCall)newValue);
+        return;
+      case GtPackage.GT_MATCH_COUNTER__VARIABLE_REFERENCE:
+        setVariableReference((VariableReference)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_MATCH_COUNTER__PATTERN_CALL:
+        setPatternCall((GTPatternCall)null);
+        return;
+      case GtPackage.GT_MATCH_COUNTER__VARIABLE_REFERENCE:
+        setVariableReference((VariableReference)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_MATCH_COUNTER__PATTERN_CALL:
+        return getPatternCall() != null;
+      case GtPackage.GT_MATCH_COUNTER__VARIABLE_REFERENCE:
+        return variableReference != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //GTMatchCounterImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/GTPatternBodyImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/GTPatternBodyImpl.java
new file mode 100644
index 0000000..fba0b23
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/GTPatternBodyImpl.java
@@ -0,0 +1,702 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.NonInjectivityConstraint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableAssignment;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>GT Pattern Body</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternBodyImpl#getNegativePatterns <em>Negative Patterns</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternBodyImpl#getLocalVariables <em>Local Variables</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternBodyImpl#getCalledPatterns <em>Called Patterns</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternBodyImpl#getCheckExpressions <em>Check Expressions</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternBodyImpl#getPatternGraph <em>Pattern Graph</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternBodyImpl#getContainmentConstraints <em>Containment Constraints</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternBodyImpl#getVariableAssignments <em>Variable Assignments</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternBodyImpl#getHeader <em>Header</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternBodyImpl#getElementWrappers <em>Element Wrappers</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternBodyImpl#getDanglingRelationships <em>Dangling Relationships</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternBodyImpl#getDanglingRelations <em>Dangling Relations</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternBodyImpl#getNonInjectivityConstraints <em>Non Injectivity Constraints</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class GTPatternBodyImpl extends PatternContainerImpl implements GTPatternBody
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getNegativePatterns() <em>Negative Patterns</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getNegativePatterns()
+   * @generated
+   * @ordered
+   */
+  protected EList<GTPatternCall> negativePatterns;
+
+  /**
+   * The cached value of the '{@link #getLocalVariables() <em>Local Variables</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getLocalVariables()
+   * @generated
+   * @ordered
+   */
+  protected EList<PatternVariable> localVariables;
+
+  /**
+   * The cached value of the '{@link #getCalledPatterns() <em>Called Patterns</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getCalledPatterns()
+   * @generated
+   * @ordered
+   */
+  protected EList<GTPatternCall> calledPatterns;
+
+  /**
+   * The cached value of the '{@link #getCheckExpressions() <em>Check Expressions</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getCheckExpressions()
+   * @generated
+   * @ordered
+   */
+  protected EList<Term> checkExpressions;
+
+  /**
+   * The cached value of the '{@link #getPatternGraph() <em>Pattern Graph</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getPatternGraph()
+   * @generated
+   * @ordered
+   */
+  protected Entity patternGraph;
+
+  /**
+   * The cached value of the '{@link #getContainmentConstraints() <em>Containment Constraints</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getContainmentConstraints()
+   * @generated
+   * @ordered
+   */
+  protected EList<ContainmentConstraint> containmentConstraints;
+
+  /**
+   * The cached value of the '{@link #getVariableAssignments() <em>Variable Assignments</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getVariableAssignments()
+   * @generated
+   * @ordered
+   */
+  protected EList<PatternVariableAssignment> variableAssignments;
+
+  /**
+   * The cached value of the '{@link #getElementWrappers() <em>Element Wrappers</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getElementWrappers()
+   * @generated
+   * @ordered
+   */
+  protected EList<ModelElement> elementWrappers;
+
+  /**
+   * The cached value of the '{@link #getDanglingRelationships() <em>Dangling Relationships</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getDanglingRelationships()
+   * @generated
+   * @ordered
+   */
+  protected EList<Relationship> danglingRelationships;
+
+  /**
+   * The cached value of the '{@link #getDanglingRelations() <em>Dangling Relations</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getDanglingRelations()
+   * @generated
+   * @ordered
+   */
+  protected EList<Relation> danglingRelations;
+
+  /**
+   * The cached value of the '{@link #getNonInjectivityConstraints() <em>Non Injectivity Constraints</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getNonInjectivityConstraints()
+   * @generated
+   * @ordered
+   */
+  protected EList<NonInjectivityConstraint> nonInjectivityConstraints;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected GTPatternBodyImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return GtPackage.Literals.GT_PATTERN_BODY;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<GTPatternCall> getNegativePatterns()
+  {
+    if (negativePatterns == null)
+    {
+      negativePatterns = new EObjectContainmentEList<GTPatternCall>(GTPatternCall.class, this, GtPackage.GT_PATTERN_BODY__NEGATIVE_PATTERNS);
+    }
+    return negativePatterns;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<PatternVariable> getLocalVariables()
+  {
+    if (localVariables == null)
+    {
+      localVariables = new EObjectContainmentEList<PatternVariable>(PatternVariable.class, this, GtPackage.GT_PATTERN_BODY__LOCAL_VARIABLES);
+    }
+    return localVariables;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<GTPatternCall> getCalledPatterns()
+  {
+    if (calledPatterns == null)
+    {
+      calledPatterns = new EObjectContainmentEList<GTPatternCall>(GTPatternCall.class, this, GtPackage.GT_PATTERN_BODY__CALLED_PATTERNS);
+    }
+    return calledPatterns;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Term> getCheckExpressions()
+  {
+    if (checkExpressions == null)
+    {
+      checkExpressions = new EObjectContainmentEList<Term>(Term.class, this, GtPackage.GT_PATTERN_BODY__CHECK_EXPRESSIONS);
+    }
+    return checkExpressions;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Entity getPatternGraph()
+  {
+    return patternGraph;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetPatternGraph(Entity newPatternGraph, NotificationChain msgs)
+  {
+    Entity oldPatternGraph = patternGraph;
+    patternGraph = newPatternGraph;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GtPackage.GT_PATTERN_BODY__PATTERN_GRAPH, oldPatternGraph, newPatternGraph);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setPatternGraph(Entity newPatternGraph)
+  {
+    if (newPatternGraph != patternGraph)
+    {
+      NotificationChain msgs = null;
+      if (patternGraph != null)
+        msgs = ((InternalEObject)patternGraph).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GtPackage.GT_PATTERN_BODY__PATTERN_GRAPH, null, msgs);
+      if (newPatternGraph != null)
+        msgs = ((InternalEObject)newPatternGraph).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GtPackage.GT_PATTERN_BODY__PATTERN_GRAPH, null, msgs);
+      msgs = basicSetPatternGraph(newPatternGraph, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, GtPackage.GT_PATTERN_BODY__PATTERN_GRAPH, newPatternGraph, newPatternGraph));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<ContainmentConstraint> getContainmentConstraints()
+  {
+    if (containmentConstraints == null)
+    {
+      containmentConstraints = new EObjectContainmentEList<ContainmentConstraint>(ContainmentConstraint.class, this, GtPackage.GT_PATTERN_BODY__CONTAINMENT_CONSTRAINTS);
+    }
+    return containmentConstraints;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<PatternVariableAssignment> getVariableAssignments()
+  {
+    if (variableAssignments == null)
+    {
+      variableAssignments = new EObjectContainmentEList<PatternVariableAssignment>(PatternVariableAssignment.class, this, GtPackage.GT_PATTERN_BODY__VARIABLE_ASSIGNMENTS);
+    }
+    return variableAssignments;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTPattern getHeader()
+  {
+    if (eContainerFeatureID() != GtPackage.GT_PATTERN_BODY__HEADER) return null;
+    return (GTPattern)eContainer();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetHeader(GTPattern newHeader, NotificationChain msgs)
+  {
+    msgs = eBasicSetContainer((InternalEObject)newHeader, GtPackage.GT_PATTERN_BODY__HEADER, msgs);
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setHeader(GTPattern newHeader)
+  {
+    if (newHeader != eInternalContainer() || (eContainerFeatureID() != GtPackage.GT_PATTERN_BODY__HEADER && newHeader != null))
+    {
+      if (EcoreUtil.isAncestor(this, newHeader))
+        throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+      NotificationChain msgs = null;
+      if (eInternalContainer() != null)
+        msgs = eBasicRemoveFromContainer(msgs);
+      if (newHeader != null)
+        msgs = ((InternalEObject)newHeader).eInverseAdd(this, GtPackage.GT_PATTERN__PATTERN_BODIES, GTPattern.class, msgs);
+      msgs = basicSetHeader(newHeader, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, GtPackage.GT_PATTERN_BODY__HEADER, newHeader, newHeader));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<ModelElement> getElementWrappers()
+  {
+    if (elementWrappers == null)
+    {
+      elementWrappers = new EObjectContainmentEList<ModelElement>(ModelElement.class, this, GtPackage.GT_PATTERN_BODY__ELEMENT_WRAPPERS);
+    }
+    return elementWrappers;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Relationship> getDanglingRelationships()
+  {
+    if (danglingRelationships == null)
+    {
+      danglingRelationships = new EObjectContainmentEList<Relationship>(Relationship.class, this, GtPackage.GT_PATTERN_BODY__DANGLING_RELATIONSHIPS);
+    }
+    return danglingRelationships;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Relation> getDanglingRelations()
+  {
+    if (danglingRelations == null)
+    {
+      danglingRelations = new EObjectContainmentEList<Relation>(Relation.class, this, GtPackage.GT_PATTERN_BODY__DANGLING_RELATIONS);
+    }
+    return danglingRelations;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<NonInjectivityConstraint> getNonInjectivityConstraints()
+  {
+    if (nonInjectivityConstraints == null)
+    {
+      nonInjectivityConstraints = new EObjectContainmentEList<NonInjectivityConstraint>(NonInjectivityConstraint.class, this, GtPackage.GT_PATTERN_BODY__NON_INJECTIVITY_CONSTRAINTS);
+    }
+    return nonInjectivityConstraints;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_PATTERN_BODY__HEADER:
+        if (eInternalContainer() != null)
+          msgs = eBasicRemoveFromContainer(msgs);
+        return basicSetHeader((GTPattern)otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_PATTERN_BODY__NEGATIVE_PATTERNS:
+        return ((InternalEList<?>)getNegativePatterns()).basicRemove(otherEnd, msgs);
+      case GtPackage.GT_PATTERN_BODY__LOCAL_VARIABLES:
+        return ((InternalEList<?>)getLocalVariables()).basicRemove(otherEnd, msgs);
+      case GtPackage.GT_PATTERN_BODY__CALLED_PATTERNS:
+        return ((InternalEList<?>)getCalledPatterns()).basicRemove(otherEnd, msgs);
+      case GtPackage.GT_PATTERN_BODY__CHECK_EXPRESSIONS:
+        return ((InternalEList<?>)getCheckExpressions()).basicRemove(otherEnd, msgs);
+      case GtPackage.GT_PATTERN_BODY__PATTERN_GRAPH:
+        return basicSetPatternGraph(null, msgs);
+      case GtPackage.GT_PATTERN_BODY__CONTAINMENT_CONSTRAINTS:
+        return ((InternalEList<?>)getContainmentConstraints()).basicRemove(otherEnd, msgs);
+      case GtPackage.GT_PATTERN_BODY__VARIABLE_ASSIGNMENTS:
+        return ((InternalEList<?>)getVariableAssignments()).basicRemove(otherEnd, msgs);
+      case GtPackage.GT_PATTERN_BODY__HEADER:
+        return basicSetHeader(null, msgs);
+      case GtPackage.GT_PATTERN_BODY__ELEMENT_WRAPPERS:
+        return ((InternalEList<?>)getElementWrappers()).basicRemove(otherEnd, msgs);
+      case GtPackage.GT_PATTERN_BODY__DANGLING_RELATIONSHIPS:
+        return ((InternalEList<?>)getDanglingRelationships()).basicRemove(otherEnd, msgs);
+      case GtPackage.GT_PATTERN_BODY__DANGLING_RELATIONS:
+        return ((InternalEList<?>)getDanglingRelations()).basicRemove(otherEnd, msgs);
+      case GtPackage.GT_PATTERN_BODY__NON_INJECTIVITY_CONSTRAINTS:
+        return ((InternalEList<?>)getNonInjectivityConstraints()).basicRemove(otherEnd, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
+  {
+    switch (eContainerFeatureID())
+    {
+      case GtPackage.GT_PATTERN_BODY__HEADER:
+        return eInternalContainer().eInverseRemove(this, GtPackage.GT_PATTERN__PATTERN_BODIES, GTPattern.class, msgs);
+    }
+    return super.eBasicRemoveFromContainerFeature(msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_PATTERN_BODY__NEGATIVE_PATTERNS:
+        return getNegativePatterns();
+      case GtPackage.GT_PATTERN_BODY__LOCAL_VARIABLES:
+        return getLocalVariables();
+      case GtPackage.GT_PATTERN_BODY__CALLED_PATTERNS:
+        return getCalledPatterns();
+      case GtPackage.GT_PATTERN_BODY__CHECK_EXPRESSIONS:
+        return getCheckExpressions();
+      case GtPackage.GT_PATTERN_BODY__PATTERN_GRAPH:
+        return getPatternGraph();
+      case GtPackage.GT_PATTERN_BODY__CONTAINMENT_CONSTRAINTS:
+        return getContainmentConstraints();
+      case GtPackage.GT_PATTERN_BODY__VARIABLE_ASSIGNMENTS:
+        return getVariableAssignments();
+      case GtPackage.GT_PATTERN_BODY__HEADER:
+        return getHeader();
+      case GtPackage.GT_PATTERN_BODY__ELEMENT_WRAPPERS:
+        return getElementWrappers();
+      case GtPackage.GT_PATTERN_BODY__DANGLING_RELATIONSHIPS:
+        return getDanglingRelationships();
+      case GtPackage.GT_PATTERN_BODY__DANGLING_RELATIONS:
+        return getDanglingRelations();
+      case GtPackage.GT_PATTERN_BODY__NON_INJECTIVITY_CONSTRAINTS:
+        return getNonInjectivityConstraints();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_PATTERN_BODY__NEGATIVE_PATTERNS:
+        getNegativePatterns().clear();
+        getNegativePatterns().addAll((Collection<? extends GTPatternCall>)newValue);
+        return;
+      case GtPackage.GT_PATTERN_BODY__LOCAL_VARIABLES:
+        getLocalVariables().clear();
+        getLocalVariables().addAll((Collection<? extends PatternVariable>)newValue);
+        return;
+      case GtPackage.GT_PATTERN_BODY__CALLED_PATTERNS:
+        getCalledPatterns().clear();
+        getCalledPatterns().addAll((Collection<? extends GTPatternCall>)newValue);
+        return;
+      case GtPackage.GT_PATTERN_BODY__CHECK_EXPRESSIONS:
+        getCheckExpressions().clear();
+        getCheckExpressions().addAll((Collection<? extends Term>)newValue);
+        return;
+      case GtPackage.GT_PATTERN_BODY__PATTERN_GRAPH:
+        setPatternGraph((Entity)newValue);
+        return;
+      case GtPackage.GT_PATTERN_BODY__CONTAINMENT_CONSTRAINTS:
+        getContainmentConstraints().clear();
+        getContainmentConstraints().addAll((Collection<? extends ContainmentConstraint>)newValue);
+        return;
+      case GtPackage.GT_PATTERN_BODY__VARIABLE_ASSIGNMENTS:
+        getVariableAssignments().clear();
+        getVariableAssignments().addAll((Collection<? extends PatternVariableAssignment>)newValue);
+        return;
+      case GtPackage.GT_PATTERN_BODY__HEADER:
+        setHeader((GTPattern)newValue);
+        return;
+      case GtPackage.GT_PATTERN_BODY__ELEMENT_WRAPPERS:
+        getElementWrappers().clear();
+        getElementWrappers().addAll((Collection<? extends ModelElement>)newValue);
+        return;
+      case GtPackage.GT_PATTERN_BODY__DANGLING_RELATIONSHIPS:
+        getDanglingRelationships().clear();
+        getDanglingRelationships().addAll((Collection<? extends Relationship>)newValue);
+        return;
+      case GtPackage.GT_PATTERN_BODY__DANGLING_RELATIONS:
+        getDanglingRelations().clear();
+        getDanglingRelations().addAll((Collection<? extends Relation>)newValue);
+        return;
+      case GtPackage.GT_PATTERN_BODY__NON_INJECTIVITY_CONSTRAINTS:
+        getNonInjectivityConstraints().clear();
+        getNonInjectivityConstraints().addAll((Collection<? extends NonInjectivityConstraint>)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_PATTERN_BODY__NEGATIVE_PATTERNS:
+        getNegativePatterns().clear();
+        return;
+      case GtPackage.GT_PATTERN_BODY__LOCAL_VARIABLES:
+        getLocalVariables().clear();
+        return;
+      case GtPackage.GT_PATTERN_BODY__CALLED_PATTERNS:
+        getCalledPatterns().clear();
+        return;
+      case GtPackage.GT_PATTERN_BODY__CHECK_EXPRESSIONS:
+        getCheckExpressions().clear();
+        return;
+      case GtPackage.GT_PATTERN_BODY__PATTERN_GRAPH:
+        setPatternGraph((Entity)null);
+        return;
+      case GtPackage.GT_PATTERN_BODY__CONTAINMENT_CONSTRAINTS:
+        getContainmentConstraints().clear();
+        return;
+      case GtPackage.GT_PATTERN_BODY__VARIABLE_ASSIGNMENTS:
+        getVariableAssignments().clear();
+        return;
+      case GtPackage.GT_PATTERN_BODY__HEADER:
+        setHeader((GTPattern)null);
+        return;
+      case GtPackage.GT_PATTERN_BODY__ELEMENT_WRAPPERS:
+        getElementWrappers().clear();
+        return;
+      case GtPackage.GT_PATTERN_BODY__DANGLING_RELATIONSHIPS:
+        getDanglingRelationships().clear();
+        return;
+      case GtPackage.GT_PATTERN_BODY__DANGLING_RELATIONS:
+        getDanglingRelations().clear();
+        return;
+      case GtPackage.GT_PATTERN_BODY__NON_INJECTIVITY_CONSTRAINTS:
+        getNonInjectivityConstraints().clear();
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_PATTERN_BODY__NEGATIVE_PATTERNS:
+        return negativePatterns != null && !negativePatterns.isEmpty();
+      case GtPackage.GT_PATTERN_BODY__LOCAL_VARIABLES:
+        return localVariables != null && !localVariables.isEmpty();
+      case GtPackage.GT_PATTERN_BODY__CALLED_PATTERNS:
+        return calledPatterns != null && !calledPatterns.isEmpty();
+      case GtPackage.GT_PATTERN_BODY__CHECK_EXPRESSIONS:
+        return checkExpressions != null && !checkExpressions.isEmpty();
+      case GtPackage.GT_PATTERN_BODY__PATTERN_GRAPH:
+        return patternGraph != null;
+      case GtPackage.GT_PATTERN_BODY__CONTAINMENT_CONSTRAINTS:
+        return containmentConstraints != null && !containmentConstraints.isEmpty();
+      case GtPackage.GT_PATTERN_BODY__VARIABLE_ASSIGNMENTS:
+        return variableAssignments != null && !variableAssignments.isEmpty();
+      case GtPackage.GT_PATTERN_BODY__HEADER:
+        return getHeader() != null;
+      case GtPackage.GT_PATTERN_BODY__ELEMENT_WRAPPERS:
+        return elementWrappers != null && !elementWrappers.isEmpty();
+      case GtPackage.GT_PATTERN_BODY__DANGLING_RELATIONSHIPS:
+        return danglingRelationships != null && !danglingRelationships.isEmpty();
+      case GtPackage.GT_PATTERN_BODY__DANGLING_RELATIONS:
+        return danglingRelations != null && !danglingRelations.isEmpty();
+      case GtPackage.GT_PATTERN_BODY__NON_INJECTIVITY_CONSTRAINTS:
+        return nonInjectivityConstraints != null && !nonInjectivityConstraints.isEmpty();
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //GTPatternBodyImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/GTPatternImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/GTPatternImpl.java
new file mode 100644
index 0000000..ac18330
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/GTPatternImpl.java
@@ -0,0 +1,461 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternContainer;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>GT Pattern</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternImpl#getSymParameters <em>Sym Parameters</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternImpl#getPatternBodies <em>Pattern Bodies</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternImpl#getNamespace <em>Namespace</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternImpl#isDistinctMatching <em>Distinct Matching</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTPatternImpl#getContainer <em>Container</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class GTPatternImpl extends GTASMElementImpl implements GTPattern
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getSymParameters() <em>Sym Parameters</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSymParameters()
+   * @generated
+   * @ordered
+   */
+  protected EList<PatternVariable> symParameters;
+
+  /**
+   * The cached value of the '{@link #getPatternBodies() <em>Pattern Bodies</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getPatternBodies()
+   * @generated
+   * @ordered
+   */
+  protected EList<GTPatternBody> patternBodies;
+
+  /**
+   * The cached value of the '{@link #getNamespace() <em>Namespace</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getNamespace()
+   * @generated
+   * @ordered
+   */
+  protected Machine namespace;
+
+  /**
+   * The default value of the '{@link #isDistinctMatching() <em>Distinct Matching</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #isDistinctMatching()
+   * @generated
+   * @ordered
+   */
+  protected static final boolean DISTINCT_MATCHING_EDEFAULT = true;
+
+  /**
+   * The cached value of the '{@link #isDistinctMatching() <em>Distinct Matching</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #isDistinctMatching()
+   * @generated
+   * @ordered
+   */
+  protected boolean distinctMatching = DISTINCT_MATCHING_EDEFAULT;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected GTPatternImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return GtPackage.Literals.GT_PATTERN;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<PatternVariable> getSymParameters()
+  {
+    if (symParameters == null)
+    {
+      symParameters = new EObjectContainmentEList<PatternVariable>(PatternVariable.class, this, GtPackage.GT_PATTERN__SYM_PARAMETERS);
+    }
+    return symParameters;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<GTPatternBody> getPatternBodies()
+  {
+    if (patternBodies == null)
+    {
+      patternBodies = new EObjectContainmentWithInverseEList<GTPatternBody>(GTPatternBody.class, this, GtPackage.GT_PATTERN__PATTERN_BODIES, GtPackage.GT_PATTERN_BODY__HEADER);
+    }
+    return patternBodies;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Machine getNamespace()
+  {
+    if (namespace != null && namespace.eIsProxy())
+    {
+      InternalEObject oldNamespace = (InternalEObject)namespace;
+      namespace = (Machine)eResolveProxy(oldNamespace);
+      if (namespace != oldNamespace)
+      {
+        if (eNotificationRequired())
+          eNotify(new ENotificationImpl(this, Notification.RESOLVE, GtPackage.GT_PATTERN__NAMESPACE, oldNamespace, namespace));
+      }
+    }
+    return namespace;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Machine basicGetNamespace()
+  {
+    return namespace;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setNamespace(Machine newNamespace)
+  {
+    Machine oldNamespace = namespace;
+    namespace = newNamespace;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, GtPackage.GT_PATTERN__NAMESPACE, oldNamespace, namespace));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public boolean isDistinctMatching()
+  {
+    return distinctMatching;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setDistinctMatching(boolean newDistinctMatching)
+  {
+    boolean oldDistinctMatching = distinctMatching;
+    distinctMatching = newDistinctMatching;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, GtPackage.GT_PATTERN__DISTINCT_MATCHING, oldDistinctMatching, distinctMatching));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public PatternContainer getContainer()
+  {
+    if (eContainerFeatureID() != GtPackage.GT_PATTERN__CONTAINER) return null;
+    return (PatternContainer)eContainer();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetContainer(PatternContainer newContainer, NotificationChain msgs)
+  {
+    msgs = eBasicSetContainer((InternalEObject)newContainer, GtPackage.GT_PATTERN__CONTAINER, msgs);
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setContainer(PatternContainer newContainer)
+  {
+    if (newContainer != eInternalContainer() || (eContainerFeatureID() != GtPackage.GT_PATTERN__CONTAINER && newContainer != null))
+    {
+      if (EcoreUtil.isAncestor(this, newContainer))
+        throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+      NotificationChain msgs = null;
+      if (eInternalContainer() != null)
+        msgs = eBasicRemoveFromContainer(msgs);
+      if (newContainer != null)
+        msgs = ((InternalEObject)newContainer).eInverseAdd(this, GtPackage.PATTERN_CONTAINER__GT_PATTERN_DEFINITIONS, PatternContainer.class, msgs);
+      msgs = basicSetContainer(newContainer, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, GtPackage.GT_PATTERN__CONTAINER, newContainer, newContainer));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_PATTERN__PATTERN_BODIES:
+        return ((InternalEList<InternalEObject>)(InternalEList<?>)getPatternBodies()).basicAdd(otherEnd, msgs);
+      case GtPackage.GT_PATTERN__CONTAINER:
+        if (eInternalContainer() != null)
+          msgs = eBasicRemoveFromContainer(msgs);
+        return basicSetContainer((PatternContainer)otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_PATTERN__SYM_PARAMETERS:
+        return ((InternalEList<?>)getSymParameters()).basicRemove(otherEnd, msgs);
+      case GtPackage.GT_PATTERN__PATTERN_BODIES:
+        return ((InternalEList<?>)getPatternBodies()).basicRemove(otherEnd, msgs);
+      case GtPackage.GT_PATTERN__CONTAINER:
+        return basicSetContainer(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
+  {
+    switch (eContainerFeatureID())
+    {
+      case GtPackage.GT_PATTERN__CONTAINER:
+        return eInternalContainer().eInverseRemove(this, GtPackage.PATTERN_CONTAINER__GT_PATTERN_DEFINITIONS, PatternContainer.class, msgs);
+    }
+    return super.eBasicRemoveFromContainerFeature(msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_PATTERN__SYM_PARAMETERS:
+        return getSymParameters();
+      case GtPackage.GT_PATTERN__PATTERN_BODIES:
+        return getPatternBodies();
+      case GtPackage.GT_PATTERN__NAMESPACE:
+        if (resolve) return getNamespace();
+        return basicGetNamespace();
+      case GtPackage.GT_PATTERN__DISTINCT_MATCHING:
+        return isDistinctMatching();
+      case GtPackage.GT_PATTERN__CONTAINER:
+        return getContainer();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_PATTERN__SYM_PARAMETERS:
+        getSymParameters().clear();
+        getSymParameters().addAll((Collection<? extends PatternVariable>)newValue);
+        return;
+      case GtPackage.GT_PATTERN__PATTERN_BODIES:
+        getPatternBodies().clear();
+        getPatternBodies().addAll((Collection<? extends GTPatternBody>)newValue);
+        return;
+      case GtPackage.GT_PATTERN__NAMESPACE:
+        setNamespace((Machine)newValue);
+        return;
+      case GtPackage.GT_PATTERN__DISTINCT_MATCHING:
+        setDistinctMatching((Boolean)newValue);
+        return;
+      case GtPackage.GT_PATTERN__CONTAINER:
+        setContainer((PatternContainer)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_PATTERN__SYM_PARAMETERS:
+        getSymParameters().clear();
+        return;
+      case GtPackage.GT_PATTERN__PATTERN_BODIES:
+        getPatternBodies().clear();
+        return;
+      case GtPackage.GT_PATTERN__NAMESPACE:
+        setNamespace((Machine)null);
+        return;
+      case GtPackage.GT_PATTERN__DISTINCT_MATCHING:
+        setDistinctMatching(DISTINCT_MATCHING_EDEFAULT);
+        return;
+      case GtPackage.GT_PATTERN__CONTAINER:
+        setContainer((PatternContainer)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_PATTERN__SYM_PARAMETERS:
+        return symParameters != null && !symParameters.isEmpty();
+      case GtPackage.GT_PATTERN__PATTERN_BODIES:
+        return patternBodies != null && !patternBodies.isEmpty();
+      case GtPackage.GT_PATTERN__NAMESPACE:
+        return namespace != null;
+      case GtPackage.GT_PATTERN__DISTINCT_MATCHING:
+        return distinctMatching != DISTINCT_MATCHING_EDEFAULT;
+      case GtPackage.GT_PATTERN__CONTAINER:
+        return getContainer() != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (distinctMatching: ");
+    result.append(distinctMatching);
+    result.append(')');
+    return result.toString();
+  }
+
+} //GTPatternImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/GTRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/GTRuleImpl.java
new file mode 100644
index 0000000..ee19140
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/GTRuleImpl.java
@@ -0,0 +1,536 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>GT Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTRuleImpl#getSymParameters <em>Sym Parameters</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTRuleImpl#getPrecondition <em>Precondition</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTRuleImpl#getLocalVariables <em>Local Variables</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTRuleImpl#getAction <em>Action</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTRuleImpl#getPostcondition <em>Postcondition</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GTRuleImpl#getNamespace <em>Namespace</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class GTRuleImpl extends PatternContainerImpl implements GTRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getSymParameters() <em>Sym Parameters</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSymParameters()
+   * @generated
+   * @ordered
+   */
+  protected EList<SymbolicRuleParameter> symParameters;
+
+  /**
+   * The cached value of the '{@link #getPrecondition() <em>Precondition</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getPrecondition()
+   * @generated
+   * @ordered
+   */
+  protected GTPatternCall precondition;
+
+  /**
+   * The cached value of the '{@link #getLocalVariables() <em>Local Variables</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getLocalVariables()
+   * @generated
+   * @ordered
+   */
+  protected EList<Variable> localVariables;
+
+  /**
+   * The cached value of the '{@link #getAction() <em>Action</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getAction()
+   * @generated
+   * @ordered
+   */
+  protected ASMRuleInvocation action;
+
+  /**
+   * The cached value of the '{@link #getPostcondition() <em>Postcondition</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getPostcondition()
+   * @generated
+   * @ordered
+   */
+  protected GTPatternCall postcondition;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected GTRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return GtPackage.Literals.GT_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<SymbolicRuleParameter> getSymParameters()
+  {
+    if (symParameters == null)
+    {
+      symParameters = new EObjectContainmentEList<SymbolicRuleParameter>(SymbolicRuleParameter.class, this, GtPackage.GT_RULE__SYM_PARAMETERS);
+    }
+    return symParameters;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTPatternCall getPrecondition()
+  {
+    return precondition;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetPrecondition(GTPatternCall newPrecondition, NotificationChain msgs)
+  {
+    GTPatternCall oldPrecondition = precondition;
+    precondition = newPrecondition;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GtPackage.GT_RULE__PRECONDITION, oldPrecondition, newPrecondition);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setPrecondition(GTPatternCall newPrecondition)
+  {
+    if (newPrecondition != precondition)
+    {
+      NotificationChain msgs = null;
+      if (precondition != null)
+        msgs = ((InternalEObject)precondition).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GtPackage.GT_RULE__PRECONDITION, null, msgs);
+      if (newPrecondition != null)
+        msgs = ((InternalEObject)newPrecondition).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GtPackage.GT_RULE__PRECONDITION, null, msgs);
+      msgs = basicSetPrecondition(newPrecondition, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, GtPackage.GT_RULE__PRECONDITION, newPrecondition, newPrecondition));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Variable> getLocalVariables()
+  {
+    if (localVariables == null)
+    {
+      localVariables = new EObjectContainmentEList<Variable>(Variable.class, this, GtPackage.GT_RULE__LOCAL_VARIABLES);
+    }
+    return localVariables;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ASMRuleInvocation getAction()
+  {
+    return action;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetAction(ASMRuleInvocation newAction, NotificationChain msgs)
+  {
+    ASMRuleInvocation oldAction = action;
+    action = newAction;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GtPackage.GT_RULE__ACTION, oldAction, newAction);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setAction(ASMRuleInvocation newAction)
+  {
+    if (newAction != action)
+    {
+      NotificationChain msgs = null;
+      if (action != null)
+        msgs = ((InternalEObject)action).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GtPackage.GT_RULE__ACTION, null, msgs);
+      if (newAction != null)
+        msgs = ((InternalEObject)newAction).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GtPackage.GT_RULE__ACTION, null, msgs);
+      msgs = basicSetAction(newAction, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, GtPackage.GT_RULE__ACTION, newAction, newAction));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTPatternCall getPostcondition()
+  {
+    return postcondition;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetPostcondition(GTPatternCall newPostcondition, NotificationChain msgs)
+  {
+    GTPatternCall oldPostcondition = postcondition;
+    postcondition = newPostcondition;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GtPackage.GT_RULE__POSTCONDITION, oldPostcondition, newPostcondition);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setPostcondition(GTPatternCall newPostcondition)
+  {
+    if (newPostcondition != postcondition)
+    {
+      NotificationChain msgs = null;
+      if (postcondition != null)
+        msgs = ((InternalEObject)postcondition).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GtPackage.GT_RULE__POSTCONDITION, null, msgs);
+      if (newPostcondition != null)
+        msgs = ((InternalEObject)newPostcondition).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GtPackage.GT_RULE__POSTCONDITION, null, msgs);
+      msgs = basicSetPostcondition(newPostcondition, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, GtPackage.GT_RULE__POSTCONDITION, newPostcondition, newPostcondition));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Machine getNamespace()
+  {
+    if (eContainerFeatureID() != GtPackage.GT_RULE__NAMESPACE) return null;
+    return (Machine)eContainer();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetNamespace(Machine newNamespace, NotificationChain msgs)
+  {
+    msgs = eBasicSetContainer((InternalEObject)newNamespace, GtPackage.GT_RULE__NAMESPACE, msgs);
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setNamespace(Machine newNamespace)
+  {
+    if (newNamespace != eInternalContainer() || (eContainerFeatureID() != GtPackage.GT_RULE__NAMESPACE && newNamespace != null))
+    {
+      if (EcoreUtil.isAncestor(this, newNamespace))
+        throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+      NotificationChain msgs = null;
+      if (eInternalContainer() != null)
+        msgs = eBasicRemoveFromContainer(msgs);
+      if (newNamespace != null)
+        msgs = ((InternalEObject)newNamespace).eInverseAdd(this, DefinitionsPackage.MACHINE__GT_RULE_DEFINITIONS, Machine.class, msgs);
+      msgs = basicSetNamespace(newNamespace, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, GtPackage.GT_RULE__NAMESPACE, newNamespace, newNamespace));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_RULE__NAMESPACE:
+        if (eInternalContainer() != null)
+          msgs = eBasicRemoveFromContainer(msgs);
+        return basicSetNamespace((Machine)otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_RULE__SYM_PARAMETERS:
+        return ((InternalEList<?>)getSymParameters()).basicRemove(otherEnd, msgs);
+      case GtPackage.GT_RULE__PRECONDITION:
+        return basicSetPrecondition(null, msgs);
+      case GtPackage.GT_RULE__LOCAL_VARIABLES:
+        return ((InternalEList<?>)getLocalVariables()).basicRemove(otherEnd, msgs);
+      case GtPackage.GT_RULE__ACTION:
+        return basicSetAction(null, msgs);
+      case GtPackage.GT_RULE__POSTCONDITION:
+        return basicSetPostcondition(null, msgs);
+      case GtPackage.GT_RULE__NAMESPACE:
+        return basicSetNamespace(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
+  {
+    switch (eContainerFeatureID())
+    {
+      case GtPackage.GT_RULE__NAMESPACE:
+        return eInternalContainer().eInverseRemove(this, DefinitionsPackage.MACHINE__GT_RULE_DEFINITIONS, Machine.class, msgs);
+    }
+    return super.eBasicRemoveFromContainerFeature(msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_RULE__SYM_PARAMETERS:
+        return getSymParameters();
+      case GtPackage.GT_RULE__PRECONDITION:
+        return getPrecondition();
+      case GtPackage.GT_RULE__LOCAL_VARIABLES:
+        return getLocalVariables();
+      case GtPackage.GT_RULE__ACTION:
+        return getAction();
+      case GtPackage.GT_RULE__POSTCONDITION:
+        return getPostcondition();
+      case GtPackage.GT_RULE__NAMESPACE:
+        return getNamespace();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_RULE__SYM_PARAMETERS:
+        getSymParameters().clear();
+        getSymParameters().addAll((Collection<? extends SymbolicRuleParameter>)newValue);
+        return;
+      case GtPackage.GT_RULE__PRECONDITION:
+        setPrecondition((GTPatternCall)newValue);
+        return;
+      case GtPackage.GT_RULE__LOCAL_VARIABLES:
+        getLocalVariables().clear();
+        getLocalVariables().addAll((Collection<? extends Variable>)newValue);
+        return;
+      case GtPackage.GT_RULE__ACTION:
+        setAction((ASMRuleInvocation)newValue);
+        return;
+      case GtPackage.GT_RULE__POSTCONDITION:
+        setPostcondition((GTPatternCall)newValue);
+        return;
+      case GtPackage.GT_RULE__NAMESPACE:
+        setNamespace((Machine)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_RULE__SYM_PARAMETERS:
+        getSymParameters().clear();
+        return;
+      case GtPackage.GT_RULE__PRECONDITION:
+        setPrecondition((GTPatternCall)null);
+        return;
+      case GtPackage.GT_RULE__LOCAL_VARIABLES:
+        getLocalVariables().clear();
+        return;
+      case GtPackage.GT_RULE__ACTION:
+        setAction((ASMRuleInvocation)null);
+        return;
+      case GtPackage.GT_RULE__POSTCONDITION:
+        setPostcondition((GTPatternCall)null);
+        return;
+      case GtPackage.GT_RULE__NAMESPACE:
+        setNamespace((Machine)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case GtPackage.GT_RULE__SYM_PARAMETERS:
+        return symParameters != null && !symParameters.isEmpty();
+      case GtPackage.GT_RULE__PRECONDITION:
+        return precondition != null;
+      case GtPackage.GT_RULE__LOCAL_VARIABLES:
+        return localVariables != null && !localVariables.isEmpty();
+      case GtPackage.GT_RULE__ACTION:
+        return action != null;
+      case GtPackage.GT_RULE__POSTCONDITION:
+        return postcondition != null;
+      case GtPackage.GT_RULE__NAMESPACE:
+        return getNamespace() != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //GTRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/GtFactoryImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/GtFactoryImpl.java
new file mode 100644
index 0000000..920eccd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/GtFactoryImpl.java
@@ -0,0 +1,206 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GtFactoryImpl extends EFactoryImpl implements GtFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Creates the default factory implementation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static GtFactory init()
+  {
+    try
+    {
+      GtFactory theGtFactory = (GtFactory)EPackage.Registry.INSTANCE.getEFactory("http:///viatragtasmmodel/gtasm/metamodel/gt.ecore"); 
+      if (theGtFactory != null)
+      {
+        return theGtFactory;
+      }
+    }
+    catch (Exception exception)
+    {
+      EcorePlugin.INSTANCE.log(exception);
+    }
+    return new GtFactoryImpl();
+  }
+
+  /**
+   * Creates an instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GtFactoryImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public EObject create(EClass eClass)
+  {
+    switch (eClass.getClassifierID())
+    {
+      case GtPackage.GT_PATTERN_BODY: return createGTPatternBody();
+      case GtPackage.GT_PATTERN: return createGTPattern();
+      case GtPackage.PATTERN_VARIABLE: return createPatternVariable();
+      case GtPackage.PATTERN_VARIABLE_ASSIGNMENT: return createPatternVariableAssignment();
+      case GtPackage.GT_RULE: return createGTRule();
+      case GtPackage.CONTAINMENT_CONSTRAINT: return createContainmentConstraint();
+      case GtPackage.GT_MATCH_COUNTER: return createGTMatchCounter();
+      case GtPackage.NON_INJECTIVITY_CONSTRAINT: return createNonInjectivityConstraint();
+      default:
+        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+    }
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTPatternBody createGTPatternBody()
+  {
+    GTPatternBodyImpl gtPatternBody = new GTPatternBodyImpl();
+    return gtPatternBody;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTPattern createGTPattern()
+  {
+    GTPatternImpl gtPattern = new GTPatternImpl();
+    return gtPattern;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public PatternVariable createPatternVariable()
+  {
+    PatternVariableImpl patternVariable = new PatternVariableImpl();
+    return patternVariable;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public PatternVariableAssignment createPatternVariableAssignment()
+  {
+    PatternVariableAssignmentImpl patternVariableAssignment = new PatternVariableAssignmentImpl();
+    return patternVariableAssignment;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTRule createGTRule()
+  {
+    GTRuleImpl gtRule = new GTRuleImpl();
+    return gtRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ContainmentConstraint createContainmentConstraint()
+  {
+    ContainmentConstraintImpl containmentConstraint = new ContainmentConstraintImpl();
+    return containmentConstraint;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GTMatchCounter createGTMatchCounter()
+  {
+    GTMatchCounterImpl gtMatchCounter = new GTMatchCounterImpl();
+    return gtMatchCounter;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NonInjectivityConstraint createNonInjectivityConstraint()
+  {
+    NonInjectivityConstraintImpl nonInjectivityConstraint = new NonInjectivityConstraintImpl();
+    return nonInjectivityConstraint;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GtPackage getGtPackage()
+  {
+    return (GtPackage)getEPackage();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @deprecated
+   * @generated
+   */
+  @Deprecated
+  public static GtPackage getPackage()
+  {
+    return GtPackage.eINSTANCE;
+  }
+
+} //GtFactoryImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/GtPackageImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/GtPackageImpl.java
new file mode 100644
index 0000000..accaaae
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/GtPackageImpl.java
@@ -0,0 +1,883 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.NonInjectivityConstraint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternContainer;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableAssignment;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableConstraint;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymovePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GtPackageImpl extends EPackageImpl implements GtPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass gtPatternBodyEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass gtPatternEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass patternVariableEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass patternVariableAssignmentEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass gtRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass containmentConstraintEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass gtMatchCounterEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass nonInjectivityConstraintEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass patternVariableConstraintEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass patternContainerEClass = null;
+
+  /**
+   * Creates an instance of the model <b>Package</b>, registered with
+   * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+   * package URI value.
+   * <p>Note: the correct way to create the package is via the static
+   * factory method {@link #init init()}, which also performs
+   * initialization of the package, or returns the registered package,
+   * if one already exists.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.emf.ecore.EPackage.Registry
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage#eNS_URI
+   * @see #init()
+   * @generated
+   */
+  private GtPackageImpl()
+  {
+    super(eNS_URI, GtFactory.eINSTANCE);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static boolean isInited = false;
+
+  /**
+   * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+   * 
+   * <p>This method is used to initialize {@link GtPackage#eINSTANCE} when that field is accessed.
+   * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #eNS_URI
+   * @see #createPackageContents()
+   * @see #initializePackageContents()
+   * @generated
+   */
+  public static GtPackage init()
+  {
+    if (isInited) return (GtPackage)EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI);
+
+    // Obtain or create and register package
+    GtPackageImpl theGtPackage = (GtPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof GtPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new GtPackageImpl());
+
+    isInited = true;
+
+    // Obtain or create and register interdependencies
+    EditmodelPackageImpl theEditmodelPackage = (EditmodelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) instanceof EditmodelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) : EditmodelPackage.eINSTANCE);
+    QueryFunctionsPackageImpl theQueryFunctionsPackage = (QueryFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) instanceof QueryFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) : QueryFunctionsPackage.eINSTANCE);
+    DeletionPackageImpl theDeletionPackage = (DeletionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) instanceof DeletionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) : DeletionPackage.eINSTANCE);
+    CreationPackageImpl theCreationPackage = (CreationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) instanceof CreationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) : CreationPackage.eINSTANCE);
+    CopymovePackageImpl theCopymovePackage = (CopymovePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) instanceof CopymovePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) : CopymovePackage.eINSTANCE);
+    UpdatePackageImpl theUpdatePackage = (UpdatePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) instanceof UpdatePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) : UpdatePackage.eINSTANCE);
+    DefinitionsPackageImpl theDefinitionsPackage = (DefinitionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) instanceof DefinitionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) : DefinitionsPackage.eINSTANCE);
+    CorePackageImpl theCorePackage = (CorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) instanceof CorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) : CorePackage.eINSTANCE);
+    SimpleRulesPackageImpl theSimpleRulesPackage = (SimpleRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) instanceof SimpleRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) : SimpleRulesPackage.eINSTANCE);
+    CompoundRulesPackageImpl theCompoundRulesPackage = (CompoundRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) instanceof CompoundRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) : CompoundRulesPackage.eINSTANCE);
+    EnumsPackageImpl theEnumsPackage = (EnumsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) instanceof EnumsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) : EnumsPackage.eINSTANCE);
+    TermsPackageImpl theTermsPackage = (TermsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) instanceof TermsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) : TermsPackage.eINSTANCE);
+    BuiltInFunctionsPackageImpl theBuiltInFunctionsPackage = (BuiltInFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) instanceof BuiltInFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) : BuiltInFunctionsPackage.eINSTANCE);
+
+    // Create package meta-data objects
+    theGtPackage.createPackageContents();
+    theEditmodelPackage.createPackageContents();
+    theQueryFunctionsPackage.createPackageContents();
+    theDeletionPackage.createPackageContents();
+    theCreationPackage.createPackageContents();
+    theCopymovePackage.createPackageContents();
+    theUpdatePackage.createPackageContents();
+    theDefinitionsPackage.createPackageContents();
+    theCorePackage.createPackageContents();
+    theSimpleRulesPackage.createPackageContents();
+    theCompoundRulesPackage.createPackageContents();
+    theEnumsPackage.createPackageContents();
+    theTermsPackage.createPackageContents();
+    theBuiltInFunctionsPackage.createPackageContents();
+
+    // Initialize created meta-data
+    theGtPackage.initializePackageContents();
+    theEditmodelPackage.initializePackageContents();
+    theQueryFunctionsPackage.initializePackageContents();
+    theDeletionPackage.initializePackageContents();
+    theCreationPackage.initializePackageContents();
+    theCopymovePackage.initializePackageContents();
+    theUpdatePackage.initializePackageContents();
+    theDefinitionsPackage.initializePackageContents();
+    theCorePackage.initializePackageContents();
+    theSimpleRulesPackage.initializePackageContents();
+    theCompoundRulesPackage.initializePackageContents();
+    theEnumsPackage.initializePackageContents();
+    theTermsPackage.initializePackageContents();
+    theBuiltInFunctionsPackage.initializePackageContents();
+
+    // Mark meta-data to indicate it can't be changed
+    theGtPackage.freeze();
+
+  
+    // Update the registry and return the package
+    EPackage.Registry.INSTANCE.put(GtPackage.eNS_URI, theGtPackage);
+    return theGtPackage;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getGTPatternBody()
+  {
+    return gtPatternBodyEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTPatternBody_NegativePatterns()
+  {
+    return (EReference)gtPatternBodyEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTPatternBody_LocalVariables()
+  {
+    return (EReference)gtPatternBodyEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTPatternBody_CalledPatterns()
+  {
+    return (EReference)gtPatternBodyEClass.getEStructuralFeatures().get(2);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTPatternBody_CheckExpressions()
+  {
+    return (EReference)gtPatternBodyEClass.getEStructuralFeatures().get(3);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTPatternBody_PatternGraph()
+  {
+    return (EReference)gtPatternBodyEClass.getEStructuralFeatures().get(4);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTPatternBody_ContainmentConstraints()
+  {
+    return (EReference)gtPatternBodyEClass.getEStructuralFeatures().get(5);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTPatternBody_VariableAssignments()
+  {
+    return (EReference)gtPatternBodyEClass.getEStructuralFeatures().get(6);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTPatternBody_Header()
+  {
+    return (EReference)gtPatternBodyEClass.getEStructuralFeatures().get(7);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTPatternBody_ElementWrappers()
+  {
+    return (EReference)gtPatternBodyEClass.getEStructuralFeatures().get(8);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTPatternBody_DanglingRelationships()
+  {
+    return (EReference)gtPatternBodyEClass.getEStructuralFeatures().get(9);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTPatternBody_DanglingRelations()
+  {
+    return (EReference)gtPatternBodyEClass.getEStructuralFeatures().get(10);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTPatternBody_NonInjectivityConstraints()
+  {
+    return (EReference)gtPatternBodyEClass.getEStructuralFeatures().get(11);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getGTPattern()
+  {
+    return gtPatternEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTPattern_SymParameters()
+  {
+    return (EReference)gtPatternEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTPattern_PatternBodies()
+  {
+    return (EReference)gtPatternEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTPattern_Namespace()
+  {
+    return (EReference)gtPatternEClass.getEStructuralFeatures().get(2);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getGTPattern_DistinctMatching()
+  {
+    return (EAttribute)gtPatternEClass.getEStructuralFeatures().get(3);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTPattern_Container()
+  {
+    return (EReference)gtPatternEClass.getEStructuralFeatures().get(4);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getPatternVariable()
+  {
+    return patternVariableEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getPatternVariable_ElementInPattern()
+  {
+    return (EReference)patternVariableEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getPatternVariableAssignment()
+  {
+    return patternVariableAssignmentEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getGTRule()
+  {
+    return gtRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTRule_SymParameters()
+  {
+    return (EReference)gtRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTRule_Precondition()
+  {
+    return (EReference)gtRuleEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTRule_LocalVariables()
+  {
+    return (EReference)gtRuleEClass.getEStructuralFeatures().get(2);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTRule_Action()
+  {
+    return (EReference)gtRuleEClass.getEStructuralFeatures().get(3);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTRule_Postcondition()
+  {
+    return (EReference)gtRuleEClass.getEStructuralFeatures().get(4);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTRule_Namespace()
+  {
+    return (EReference)gtRuleEClass.getEStructuralFeatures().get(5);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getContainmentConstraint()
+  {
+    return containmentConstraintEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getContainmentConstraint_Variable()
+  {
+    return (EReference)containmentConstraintEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getContainmentConstraint_Mode()
+  {
+    return (EAttribute)containmentConstraintEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getContainmentConstraint_Parent()
+  {
+    return (EReference)containmentConstraintEClass.getEStructuralFeatures().get(2);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getGTMatchCounter()
+  {
+    return gtMatchCounterEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTMatchCounter_PatternCall()
+  {
+    return (EReference)gtMatchCounterEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getGTMatchCounter_VariableReference()
+  {
+    return (EReference)gtMatchCounterEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getNonInjectivityConstraint()
+  {
+    return nonInjectivityConstraintEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getPatternVariableConstraint()
+  {
+    return patternVariableConstraintEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getPatternVariableConstraint_LeftValue()
+  {
+    return (EReference)patternVariableConstraintEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getPatternVariableConstraint_RightValue()
+  {
+    return (EReference)patternVariableConstraintEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getPatternContainer()
+  {
+    return patternContainerEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getPatternContainer_GtPatternDefinitions()
+  {
+    return (EReference)patternContainerEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GtFactory getGtFactory()
+  {
+    return (GtFactory)getEFactoryInstance();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isCreated = false;
+
+  /**
+   * Creates the meta-model objects for the package.  This method is
+   * guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void createPackageContents()
+  {
+    if (isCreated) return;
+    isCreated = true;
+
+    // Create classes and their features
+    gtPatternBodyEClass = createEClass(GT_PATTERN_BODY);
+    createEReference(gtPatternBodyEClass, GT_PATTERN_BODY__NEGATIVE_PATTERNS);
+    createEReference(gtPatternBodyEClass, GT_PATTERN_BODY__LOCAL_VARIABLES);
+    createEReference(gtPatternBodyEClass, GT_PATTERN_BODY__CALLED_PATTERNS);
+    createEReference(gtPatternBodyEClass, GT_PATTERN_BODY__CHECK_EXPRESSIONS);
+    createEReference(gtPatternBodyEClass, GT_PATTERN_BODY__PATTERN_GRAPH);
+    createEReference(gtPatternBodyEClass, GT_PATTERN_BODY__CONTAINMENT_CONSTRAINTS);
+    createEReference(gtPatternBodyEClass, GT_PATTERN_BODY__VARIABLE_ASSIGNMENTS);
+    createEReference(gtPatternBodyEClass, GT_PATTERN_BODY__HEADER);
+    createEReference(gtPatternBodyEClass, GT_PATTERN_BODY__ELEMENT_WRAPPERS);
+    createEReference(gtPatternBodyEClass, GT_PATTERN_BODY__DANGLING_RELATIONSHIPS);
+    createEReference(gtPatternBodyEClass, GT_PATTERN_BODY__DANGLING_RELATIONS);
+    createEReference(gtPatternBodyEClass, GT_PATTERN_BODY__NON_INJECTIVITY_CONSTRAINTS);
+
+    gtPatternEClass = createEClass(GT_PATTERN);
+    createEReference(gtPatternEClass, GT_PATTERN__SYM_PARAMETERS);
+    createEReference(gtPatternEClass, GT_PATTERN__PATTERN_BODIES);
+    createEReference(gtPatternEClass, GT_PATTERN__NAMESPACE);
+    createEAttribute(gtPatternEClass, GT_PATTERN__DISTINCT_MATCHING);
+    createEReference(gtPatternEClass, GT_PATTERN__CONTAINER);
+
+    patternVariableEClass = createEClass(PATTERN_VARIABLE);
+    createEReference(patternVariableEClass, PATTERN_VARIABLE__ELEMENT_IN_PATTERN);
+
+    patternVariableAssignmentEClass = createEClass(PATTERN_VARIABLE_ASSIGNMENT);
+
+    gtRuleEClass = createEClass(GT_RULE);
+    createEReference(gtRuleEClass, GT_RULE__SYM_PARAMETERS);
+    createEReference(gtRuleEClass, GT_RULE__PRECONDITION);
+    createEReference(gtRuleEClass, GT_RULE__LOCAL_VARIABLES);
+    createEReference(gtRuleEClass, GT_RULE__ACTION);
+    createEReference(gtRuleEClass, GT_RULE__POSTCONDITION);
+    createEReference(gtRuleEClass, GT_RULE__NAMESPACE);
+
+    containmentConstraintEClass = createEClass(CONTAINMENT_CONSTRAINT);
+    createEReference(containmentConstraintEClass, CONTAINMENT_CONSTRAINT__VARIABLE);
+    createEAttribute(containmentConstraintEClass, CONTAINMENT_CONSTRAINT__MODE);
+    createEReference(containmentConstraintEClass, CONTAINMENT_CONSTRAINT__PARENT);
+
+    gtMatchCounterEClass = createEClass(GT_MATCH_COUNTER);
+    createEReference(gtMatchCounterEClass, GT_MATCH_COUNTER__PATTERN_CALL);
+    createEReference(gtMatchCounterEClass, GT_MATCH_COUNTER__VARIABLE_REFERENCE);
+
+    nonInjectivityConstraintEClass = createEClass(NON_INJECTIVITY_CONSTRAINT);
+
+    patternVariableConstraintEClass = createEClass(PATTERN_VARIABLE_CONSTRAINT);
+    createEReference(patternVariableConstraintEClass, PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE);
+    createEReference(patternVariableConstraintEClass, PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE);
+
+    patternContainerEClass = createEClass(PATTERN_CONTAINER);
+    createEReference(patternContainerEClass, PATTERN_CONTAINER__GT_PATTERN_DEFINITIONS);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isInitialized = false;
+
+  /**
+   * Complete the initialization of the package and its meta-model.  This
+   * method is guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void initializePackageContents()
+  {
+    if (isInitialized) return;
+    isInitialized = true;
+
+    // Initialize package
+    setName(eNAME);
+    setNsPrefix(eNS_PREFIX);
+    setNsURI(eNS_URI);
+
+    // Obtain other dependent packages
+    TermsPackage theTermsPackage = (TermsPackage)EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI);
+    EditmodelPackage theEditmodelPackage = (EditmodelPackage)EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI);
+    CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI);
+    DefinitionsPackage theDefinitionsPackage = (DefinitionsPackage)EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI);
+    SimpleRulesPackage theSimpleRulesPackage = (SimpleRulesPackage)EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI);
+    EnumsPackage theEnumsPackage = (EnumsPackage)EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI);
+
+    // Create type parameters
+
+    // Set bounds for type parameters
+
+    // Add supertypes to classes
+    gtPatternBodyEClass.getESuperTypes().add(this.getPatternContainer());
+    gtPatternEClass.getESuperTypes().add(theCorePackage.getGTASMElement());
+    patternVariableEClass.getESuperTypes().add(theDefinitionsPackage.getVariable());
+    patternVariableAssignmentEClass.getESuperTypes().add(this.getPatternVariableConstraint());
+    gtRuleEClass.getESuperTypes().add(this.getPatternContainer());
+    containmentConstraintEClass.getESuperTypes().add(theCorePackage.getGTASMElement());
+    gtMatchCounterEClass.getESuperTypes().add(theCorePackage.getGTASMElement());
+    nonInjectivityConstraintEClass.getESuperTypes().add(this.getPatternVariableConstraint());
+    patternVariableConstraintEClass.getESuperTypes().add(theCorePackage.getGTASMElement());
+    patternContainerEClass.getESuperTypes().add(theCorePackage.getGTASMElement());
+
+    // Initialize classes and features; add operations and parameters
+    initEClass(gtPatternBodyEClass, GTPatternBody.class, "GTPatternBody", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getGTPatternBody_NegativePatterns(), theTermsPackage.getGTPatternCall(), null, "negativePatterns", null, 0, -1, GTPatternBody.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getGTPatternBody_LocalVariables(), this.getPatternVariable(), null, "localVariables", null, 0, -1, GTPatternBody.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getGTPatternBody_CalledPatterns(), theTermsPackage.getGTPatternCall(), null, "calledPatterns", null, 0, -1, GTPatternBody.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getGTPatternBody_CheckExpressions(), theTermsPackage.getTerm(), null, "checkExpressions", null, 0, -1, GTPatternBody.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getGTPatternBody_PatternGraph(), theEditmodelPackage.getEntity(), null, "patternGraph", null, 1, 1, GTPatternBody.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getGTPatternBody_ContainmentConstraints(), this.getContainmentConstraint(), null, "containmentConstraints", null, 0, -1, GTPatternBody.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getGTPatternBody_VariableAssignments(), this.getPatternVariableAssignment(), null, "variableAssignments", null, 0, -1, GTPatternBody.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getGTPatternBody_Header(), this.getGTPattern(), this.getGTPattern_PatternBodies(), "header", null, 1, 1, GTPatternBody.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getGTPatternBody_ElementWrappers(), theEditmodelPackage.getModelElement(), null, "elementWrappers", null, 0, -1, GTPatternBody.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getGTPatternBody_DanglingRelationships(), theEditmodelPackage.getRelationship(), null, "danglingRelationships", null, 0, -1, GTPatternBody.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getGTPatternBody_DanglingRelations(), theEditmodelPackage.getRelation(), null, "danglingRelations", null, 0, -1, GTPatternBody.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getGTPatternBody_NonInjectivityConstraints(), this.getNonInjectivityConstraint(), null, "nonInjectivityConstraints", null, 0, -1, GTPatternBody.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(gtPatternEClass, GTPattern.class, "GTPattern", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getGTPattern_SymParameters(), this.getPatternVariable(), null, "symParameters", null, 0, -1, GTPattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getGTPattern_PatternBodies(), this.getGTPatternBody(), this.getGTPatternBody_Header(), "patternBodies", null, 0, -1, GTPattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getGTPattern_Namespace(), theDefinitionsPackage.getMachine(), null, "namespace", null, 1, 1, GTPattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEAttribute(getGTPattern_DistinctMatching(), ecorePackage.getEBoolean(), "distinctMatching", "true", 0, 1, GTPattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getGTPattern_Container(), this.getPatternContainer(), this.getPatternContainer_GtPatternDefinitions(), "container", null, 1, 1, GTPattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(patternVariableEClass, PatternVariable.class, "PatternVariable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getPatternVariable_ElementInPattern(), theEditmodelPackage.getModelElement(), null, "elementInPattern", null, 0, -1, PatternVariable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(patternVariableAssignmentEClass, PatternVariableAssignment.class, "PatternVariableAssignment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(gtRuleEClass, GTRule.class, "GTRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getGTRule_SymParameters(), theDefinitionsPackage.getSymbolicRuleParameter(), null, "symParameters", null, 0, -1, GTRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getGTRule_Precondition(), theTermsPackage.getGTPatternCall(), null, "precondition", null, 0, 1, GTRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getGTRule_LocalVariables(), theDefinitionsPackage.getVariable(), null, "localVariables", null, 0, -1, GTRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getGTRule_Action(), theSimpleRulesPackage.getASMRuleInvocation(), null, "action", null, 0, 1, GTRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getGTRule_Postcondition(), theTermsPackage.getGTPatternCall(), null, "postcondition", null, 0, 1, GTRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getGTRule_Namespace(), theDefinitionsPackage.getMachine(), theDefinitionsPackage.getMachine_GtRuleDefinitions(), "namespace", null, 0, 1, GTRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(containmentConstraintEClass, ContainmentConstraint.class, "ContainmentConstraint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getContainmentConstraint_Variable(), theDefinitionsPackage.getVariable(), null, "variable", null, 1, 1, ContainmentConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEAttribute(getContainmentConstraint_Mode(), theEnumsPackage.getContainmentMode(), "mode", "in", 1, 1, ContainmentConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getContainmentConstraint_Parent(), theTermsPackage.getTerm(), null, "parent", null, 1, 1, ContainmentConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(gtMatchCounterEClass, GTMatchCounter.class, "GTMatchCounter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getGTMatchCounter_PatternCall(), theTermsPackage.getGTPatternCall(), theTermsPackage.getGTPatternCall_MatchCounter(), "patternCall", null, 0, 1, GTMatchCounter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getGTMatchCounter_VariableReference(), theTermsPackage.getVariableReference(), null, "variableReference", null, 0, 1, GTMatchCounter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(nonInjectivityConstraintEClass, NonInjectivityConstraint.class, "NonInjectivityConstraint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(patternVariableConstraintEClass, PatternVariableConstraint.class, "PatternVariableConstraint", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getPatternVariableConstraint_LeftValue(), theTermsPackage.getVariableReference(), null, "leftValue", null, 0, 1, PatternVariableConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getPatternVariableConstraint_RightValue(), theTermsPackage.getVariableReference(), null, "rightValue", null, 0, 1, PatternVariableConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(patternContainerEClass, PatternContainer.class, "PatternContainer", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getPatternContainer_GtPatternDefinitions(), this.getGTPattern(), this.getGTPattern_Container(), "gtPatternDefinitions", null, 0, -1, PatternContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    // Create resource
+    createResource(eNS_URI);
+  }
+
+} //GtPackageImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/NonInjectivityConstraintImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/NonInjectivityConstraintImpl.java
new file mode 100644
index 0000000..be7d0e8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/NonInjectivityConstraintImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.NonInjectivityConstraint;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Non Injectivity Constraint</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class NonInjectivityConstraintImpl extends PatternVariableConstraintImpl implements NonInjectivityConstraint
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected NonInjectivityConstraintImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return GtPackage.Literals.NON_INJECTIVITY_CONSTRAINT;
+  }
+
+} //NonInjectivityConstraintImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/PatternContainerImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/PatternContainerImpl.java
new file mode 100644
index 0000000..c332e75
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/PatternContainerImpl.java
@@ -0,0 +1,200 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternContainer;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Pattern Container</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternContainerImpl#getGtPatternDefinitions <em>Gt Pattern Definitions</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class PatternContainerImpl extends GTASMElementImpl implements PatternContainer
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getGtPatternDefinitions() <em>Gt Pattern Definitions</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getGtPatternDefinitions()
+   * @generated
+   * @ordered
+   */
+  protected EList<GTPattern> gtPatternDefinitions;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected PatternContainerImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return GtPackage.Literals.PATTERN_CONTAINER;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<GTPattern> getGtPatternDefinitions()
+  {
+    if (gtPatternDefinitions == null)
+    {
+      gtPatternDefinitions = new EObjectContainmentWithInverseEList<GTPattern>(GTPattern.class, this, GtPackage.PATTERN_CONTAINER__GT_PATTERN_DEFINITIONS, GtPackage.GT_PATTERN__CONTAINER);
+    }
+    return gtPatternDefinitions;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case GtPackage.PATTERN_CONTAINER__GT_PATTERN_DEFINITIONS:
+        return ((InternalEList<InternalEObject>)(InternalEList<?>)getGtPatternDefinitions()).basicAdd(otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case GtPackage.PATTERN_CONTAINER__GT_PATTERN_DEFINITIONS:
+        return ((InternalEList<?>)getGtPatternDefinitions()).basicRemove(otherEnd, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case GtPackage.PATTERN_CONTAINER__GT_PATTERN_DEFINITIONS:
+        return getGtPatternDefinitions();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case GtPackage.PATTERN_CONTAINER__GT_PATTERN_DEFINITIONS:
+        getGtPatternDefinitions().clear();
+        getGtPatternDefinitions().addAll((Collection<? extends GTPattern>)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case GtPackage.PATTERN_CONTAINER__GT_PATTERN_DEFINITIONS:
+        getGtPatternDefinitions().clear();
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case GtPackage.PATTERN_CONTAINER__GT_PATTERN_DEFINITIONS:
+        return gtPatternDefinitions != null && !gtPatternDefinitions.isEmpty();
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //PatternContainerImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/PatternVariableAssignmentImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/PatternVariableAssignmentImpl.java
new file mode 100644
index 0000000..1cac296
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/PatternVariableAssignmentImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableAssignment;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Pattern Variable Assignment</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class PatternVariableAssignmentImpl extends PatternVariableConstraintImpl implements PatternVariableAssignment
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected PatternVariableAssignmentImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return GtPackage.Literals.PATTERN_VARIABLE_ASSIGNMENT;
+  }
+
+} //PatternVariableAssignmentImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/PatternVariableConstraintImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/PatternVariableConstraintImpl.java
new file mode 100644
index 0000000..a8c833d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/PatternVariableConstraintImpl.java
@@ -0,0 +1,283 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.GTASMElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableConstraint;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Pattern Variable Constraint</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternVariableConstraintImpl#getLeftValue <em>Left Value</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternVariableConstraintImpl#getRightValue <em>Right Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class PatternVariableConstraintImpl extends GTASMElementImpl implements PatternVariableConstraint
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getLeftValue() <em>Left Value</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getLeftValue()
+   * @generated
+   * @ordered
+   */
+  protected VariableReference leftValue;
+
+  /**
+   * The cached value of the '{@link #getRightValue() <em>Right Value</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getRightValue()
+   * @generated
+   * @ordered
+   */
+  protected VariableReference rightValue;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected PatternVariableConstraintImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return GtPackage.Literals.PATTERN_VARIABLE_CONSTRAINT;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public VariableReference getLeftValue()
+  {
+    return leftValue;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetLeftValue(VariableReference newLeftValue, NotificationChain msgs)
+  {
+    VariableReference oldLeftValue = leftValue;
+    leftValue = newLeftValue;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GtPackage.PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE, oldLeftValue, newLeftValue);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setLeftValue(VariableReference newLeftValue)
+  {
+    if (newLeftValue != leftValue)
+    {
+      NotificationChain msgs = null;
+      if (leftValue != null)
+        msgs = ((InternalEObject)leftValue).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GtPackage.PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE, null, msgs);
+      if (newLeftValue != null)
+        msgs = ((InternalEObject)newLeftValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GtPackage.PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE, null, msgs);
+      msgs = basicSetLeftValue(newLeftValue, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, GtPackage.PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE, newLeftValue, newLeftValue));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public VariableReference getRightValue()
+  {
+    return rightValue;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetRightValue(VariableReference newRightValue, NotificationChain msgs)
+  {
+    VariableReference oldRightValue = rightValue;
+    rightValue = newRightValue;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GtPackage.PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE, oldRightValue, newRightValue);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setRightValue(VariableReference newRightValue)
+  {
+    if (newRightValue != rightValue)
+    {
+      NotificationChain msgs = null;
+      if (rightValue != null)
+        msgs = ((InternalEObject)rightValue).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GtPackage.PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE, null, msgs);
+      if (newRightValue != null)
+        msgs = ((InternalEObject)newRightValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GtPackage.PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE, null, msgs);
+      msgs = basicSetRightValue(newRightValue, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, GtPackage.PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE, newRightValue, newRightValue));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case GtPackage.PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE:
+        return basicSetLeftValue(null, msgs);
+      case GtPackage.PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE:
+        return basicSetRightValue(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case GtPackage.PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE:
+        return getLeftValue();
+      case GtPackage.PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE:
+        return getRightValue();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case GtPackage.PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE:
+        setLeftValue((VariableReference)newValue);
+        return;
+      case GtPackage.PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE:
+        setRightValue((VariableReference)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case GtPackage.PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE:
+        setLeftValue((VariableReference)null);
+        return;
+      case GtPackage.PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE:
+        setRightValue((VariableReference)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case GtPackage.PATTERN_VARIABLE_CONSTRAINT__LEFT_VALUE:
+        return leftValue != null;
+      case GtPackage.PATTERN_VARIABLE_CONSTRAINT__RIGHT_VALUE:
+        return rightValue != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //PatternVariableConstraintImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/PatternVariableImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/PatternVariableImpl.java
new file mode 100644
index 0000000..284aa17
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/impl/PatternVariableImpl.java
@@ -0,0 +1,164 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.VariableImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Pattern Variable</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.PatternVariableImpl#getElementInPattern <em>Element In Pattern</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PatternVariableImpl extends VariableImpl implements PatternVariable
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getElementInPattern() <em>Element In Pattern</em>}' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getElementInPattern()
+   * @generated
+   * @ordered
+   */
+  protected EList<ModelElement> elementInPattern;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected PatternVariableImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return GtPackage.Literals.PATTERN_VARIABLE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<ModelElement> getElementInPattern()
+  {
+    if (elementInPattern == null)
+    {
+      elementInPattern = new EObjectResolvingEList<ModelElement>(ModelElement.class, this, GtPackage.PATTERN_VARIABLE__ELEMENT_IN_PATTERN);
+    }
+    return elementInPattern;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case GtPackage.PATTERN_VARIABLE__ELEMENT_IN_PATTERN:
+        return getElementInPattern();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case GtPackage.PATTERN_VARIABLE__ELEMENT_IN_PATTERN:
+        getElementInPattern().clear();
+        getElementInPattern().addAll((Collection<? extends ModelElement>)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case GtPackage.PATTERN_VARIABLE__ELEMENT_IN_PATTERN:
+        getElementInPattern().clear();
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case GtPackage.PATTERN_VARIABLE__ELEMENT_IN_PATTERN:
+        return elementInPattern != null && !elementInPattern.isEmpty();
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //PatternVariableImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/util/GtAdapterFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/util/GtAdapterFactory.java
new file mode 100644
index 0000000..51a9156
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/util/GtAdapterFactory.java
@@ -0,0 +1,393 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage
+ * @generated
+ */
+public class GtAdapterFactory extends AdapterFactoryImpl
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static GtPackage modelPackage;
+
+  /**
+   * Creates an instance of the adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GtAdapterFactory()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = GtPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Returns whether this factory is applicable for the type of the object.
+   * <!-- begin-user-doc -->
+   * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+   * <!-- end-user-doc -->
+   * @return whether this factory is applicable for the type of the object.
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object object)
+  {
+    if (object == modelPackage)
+    {
+      return true;
+    }
+    if (object instanceof EObject)
+    {
+      return ((EObject)object).eClass().getEPackage() == modelPackage;
+    }
+    return false;
+  }
+
+  /**
+   * The switch that delegates to the <code>createXXX</code> methods.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected GtSwitch<Adapter> modelSwitch =
+    new GtSwitch<Adapter>()
+    {
+      @Override
+      public Adapter caseGTPatternBody(GTPatternBody object)
+      {
+        return createGTPatternBodyAdapter();
+      }
+      @Override
+      public Adapter caseGTPattern(GTPattern object)
+      {
+        return createGTPatternAdapter();
+      }
+      @Override
+      public Adapter casePatternVariable(PatternVariable object)
+      {
+        return createPatternVariableAdapter();
+      }
+      @Override
+      public Adapter casePatternVariableAssignment(PatternVariableAssignment object)
+      {
+        return createPatternVariableAssignmentAdapter();
+      }
+      @Override
+      public Adapter caseGTRule(GTRule object)
+      {
+        return createGTRuleAdapter();
+      }
+      @Override
+      public Adapter caseContainmentConstraint(ContainmentConstraint object)
+      {
+        return createContainmentConstraintAdapter();
+      }
+      @Override
+      public Adapter caseGTMatchCounter(GTMatchCounter object)
+      {
+        return createGTMatchCounterAdapter();
+      }
+      @Override
+      public Adapter caseNonInjectivityConstraint(NonInjectivityConstraint object)
+      {
+        return createNonInjectivityConstraintAdapter();
+      }
+      @Override
+      public Adapter casePatternVariableConstraint(PatternVariableConstraint object)
+      {
+        return createPatternVariableConstraintAdapter();
+      }
+      @Override
+      public Adapter casePatternContainer(PatternContainer object)
+      {
+        return createPatternContainerAdapter();
+      }
+      @Override
+      public Adapter caseAnnotatedElement(AnnotatedElement object)
+      {
+        return createAnnotatedElementAdapter();
+      }
+      @Override
+      public Adapter caseGTASMElement(GTASMElement object)
+      {
+        return createGTASMElementAdapter();
+      }
+      @Override
+      public Adapter caseVariable(Variable object)
+      {
+        return createVariableAdapter();
+      }
+      @Override
+      public Adapter defaultCase(EObject object)
+      {
+        return createEObjectAdapter();
+      }
+    };
+
+  /**
+   * Creates an adapter for the <code>target</code>.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param target the object to adapt.
+   * @return the adapter for the <code>target</code>.
+   * @generated
+   */
+  @Override
+  public Adapter createAdapter(Notifier target)
+  {
+    return modelSwitch.doSwitch((EObject)target);
+  }
+
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody <em>GT Pattern Body</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody
+   * @generated
+   */
+  public Adapter createGTPatternBodyAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern <em>GT Pattern</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern
+   * @generated
+   */
+  public Adapter createGTPatternAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable <em>Pattern Variable</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable
+   * @generated
+   */
+  public Adapter createPatternVariableAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableAssignment <em>Pattern Variable Assignment</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableAssignment
+   * @generated
+   */
+  public Adapter createPatternVariableAssignmentAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule <em>GT Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule
+   * @generated
+   */
+  public Adapter createGTRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint <em>Containment Constraint</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint
+   * @generated
+   */
+  public Adapter createContainmentConstraintAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter <em>GT Match Counter</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter
+   * @generated
+   */
+  public Adapter createGTMatchCounterAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.NonInjectivityConstraint <em>Non Injectivity Constraint</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.NonInjectivityConstraint
+   * @generated
+   */
+  public Adapter createNonInjectivityConstraintAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableConstraint <em>Pattern Variable Constraint</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableConstraint
+   * @generated
+   */
+  public Adapter createPatternVariableConstraintAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternContainer <em>Pattern Container</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternContainer
+   * @generated
+   */
+  public Adapter createPatternContainerAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement <em>Annotated Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement
+   * @generated
+   */
+  public Adapter createAnnotatedElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement <em>GTASM Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement
+   * @generated
+   */
+  public Adapter createGTASMElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable <em>Variable</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable
+   * @generated
+   */
+  public Adapter createVariableAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for the default case.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @generated
+   */
+  public Adapter createEObjectAdapter()
+  {
+    return null;
+  }
+
+} //GtAdapterFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/util/GtSwitch.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/util/GtSwitch.java
new file mode 100644
index 0000000..715eb21
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/gt/util/GtSwitch.java
@@ -0,0 +1,439 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage
+ * @generated
+ */
+public class GtSwitch<T>
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static GtPackage modelPackage;
+
+  /**
+   * Creates an instance of the switch.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public GtSwitch()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = GtPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  public T doSwitch(EObject theEObject)
+  {
+    return doSwitch(theEObject.eClass(), theEObject);
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(EClass theEClass, EObject theEObject)
+  {
+    if (theEClass.eContainer() == modelPackage)
+    {
+      return doSwitch(theEClass.getClassifierID(), theEObject);
+    }
+    else
+    {
+      List<EClass> eSuperTypes = theEClass.getESuperTypes();
+      return
+        eSuperTypes.isEmpty() ?
+          defaultCase(theEObject) :
+          doSwitch(eSuperTypes.get(0), theEObject);
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(int classifierID, EObject theEObject)
+  {
+    switch (classifierID)
+    {
+      case GtPackage.GT_PATTERN_BODY:
+      {
+        GTPatternBody gtPatternBody = (GTPatternBody)theEObject;
+        T result = caseGTPatternBody(gtPatternBody);
+        if (result == null) result = casePatternContainer(gtPatternBody);
+        if (result == null) result = caseGTASMElement(gtPatternBody);
+        if (result == null) result = caseAnnotatedElement(gtPatternBody);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case GtPackage.GT_PATTERN:
+      {
+        GTPattern gtPattern = (GTPattern)theEObject;
+        T result = caseGTPattern(gtPattern);
+        if (result == null) result = caseGTASMElement(gtPattern);
+        if (result == null) result = caseAnnotatedElement(gtPattern);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case GtPackage.PATTERN_VARIABLE:
+      {
+        PatternVariable patternVariable = (PatternVariable)theEObject;
+        T result = casePatternVariable(patternVariable);
+        if (result == null) result = caseVariable(patternVariable);
+        if (result == null) result = caseGTASMElement(patternVariable);
+        if (result == null) result = caseAnnotatedElement(patternVariable);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case GtPackage.PATTERN_VARIABLE_ASSIGNMENT:
+      {
+        PatternVariableAssignment patternVariableAssignment = (PatternVariableAssignment)theEObject;
+        T result = casePatternVariableAssignment(patternVariableAssignment);
+        if (result == null) result = casePatternVariableConstraint(patternVariableAssignment);
+        if (result == null) result = caseGTASMElement(patternVariableAssignment);
+        if (result == null) result = caseAnnotatedElement(patternVariableAssignment);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case GtPackage.GT_RULE:
+      {
+        GTRule gtRule = (GTRule)theEObject;
+        T result = caseGTRule(gtRule);
+        if (result == null) result = casePatternContainer(gtRule);
+        if (result == null) result = caseGTASMElement(gtRule);
+        if (result == null) result = caseAnnotatedElement(gtRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case GtPackage.CONTAINMENT_CONSTRAINT:
+      {
+        ContainmentConstraint containmentConstraint = (ContainmentConstraint)theEObject;
+        T result = caseContainmentConstraint(containmentConstraint);
+        if (result == null) result = caseGTASMElement(containmentConstraint);
+        if (result == null) result = caseAnnotatedElement(containmentConstraint);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case GtPackage.GT_MATCH_COUNTER:
+      {
+        GTMatchCounter gtMatchCounter = (GTMatchCounter)theEObject;
+        T result = caseGTMatchCounter(gtMatchCounter);
+        if (result == null) result = caseGTASMElement(gtMatchCounter);
+        if (result == null) result = caseAnnotatedElement(gtMatchCounter);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case GtPackage.NON_INJECTIVITY_CONSTRAINT:
+      {
+        NonInjectivityConstraint nonInjectivityConstraint = (NonInjectivityConstraint)theEObject;
+        T result = caseNonInjectivityConstraint(nonInjectivityConstraint);
+        if (result == null) result = casePatternVariableConstraint(nonInjectivityConstraint);
+        if (result == null) result = caseGTASMElement(nonInjectivityConstraint);
+        if (result == null) result = caseAnnotatedElement(nonInjectivityConstraint);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case GtPackage.PATTERN_VARIABLE_CONSTRAINT:
+      {
+        PatternVariableConstraint patternVariableConstraint = (PatternVariableConstraint)theEObject;
+        T result = casePatternVariableConstraint(patternVariableConstraint);
+        if (result == null) result = caseGTASMElement(patternVariableConstraint);
+        if (result == null) result = caseAnnotatedElement(patternVariableConstraint);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case GtPackage.PATTERN_CONTAINER:
+      {
+        PatternContainer patternContainer = (PatternContainer)theEObject;
+        T result = casePatternContainer(patternContainer);
+        if (result == null) result = caseGTASMElement(patternContainer);
+        if (result == null) result = caseAnnotatedElement(patternContainer);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      default: return defaultCase(theEObject);
+    }
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>GT Pattern Body</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>GT Pattern Body</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGTPatternBody(GTPatternBody object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>GT Pattern</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>GT Pattern</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGTPattern(GTPattern object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Pattern Variable</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Pattern Variable</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T casePatternVariable(PatternVariable object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Pattern Variable Assignment</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Pattern Variable Assignment</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T casePatternVariableAssignment(PatternVariableAssignment object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>GT Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>GT Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGTRule(GTRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Containment Constraint</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Containment Constraint</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseContainmentConstraint(ContainmentConstraint object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>GT Match Counter</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>GT Match Counter</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGTMatchCounter(GTMatchCounter object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Non Injectivity Constraint</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Non Injectivity Constraint</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseNonInjectivityConstraint(NonInjectivityConstraint object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Pattern Variable Constraint</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Pattern Variable Constraint</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T casePatternVariableConstraint(PatternVariableConstraint object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Pattern Container</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Pattern Container</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T casePatternContainer(PatternContainer object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseAnnotatedElement(AnnotatedElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGTASMElement(GTASMElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Variable</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Variable</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseVariable(Variable object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch, but this is the last case anyway.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+   * @generated
+   */
+  public T defaultCase(EObject object)
+  {
+    return null;
+  }
+
+} //GtSwitch
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/CopymoveFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/CopymoveFactory.java
new file mode 100644
index 0000000..5398a49
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/CopymoveFactory.java
@@ -0,0 +1,68 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage
+ * @generated
+ */
+public interface CopymoveFactory extends EFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The singleton instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  CopymoveFactory eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymoveFactoryImpl.init();
+
+  /**
+   * Returns a new object of class '<em>Move Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Move Rule</em>'.
+   * @generated
+   */
+  MoveRule createMoveRule();
+
+  /**
+   * Returns a new object of class '<em>Model Copy Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Model Copy Rule</em>'.
+   * @generated
+   */
+  ModelCopyRule createModelCopyRule();
+
+  /**
+   * Returns the package supported by this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the package supported by this factory.
+   * @generated
+   */
+  CopymovePackage getCopymovePackage();
+
+} //CopymoveFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/CopymovePackage.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/CopymovePackage.java
new file mode 100644
index 0000000..4a301aa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/CopymovePackage.java
@@ -0,0 +1,475 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ *   <li>each class,</li>
+ *   <li>each feature of each class,</li>
+ *   <li>each enum,</li>
+ *   <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymoveFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface CopymovePackage extends EPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The package name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNAME = "copymove";
+
+  /**
+   * The package namespace URI.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_URI = "http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove.ecore";
+
+  /**
+   * The package namespace name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_PREFIX = "viatragtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove";
+
+  /**
+   * The singleton instance of the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  CopymovePackage eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymovePackageImpl.init();
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.MoveRuleImpl <em>Move Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.MoveRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymovePackageImpl#getMoveRule()
+   * @generated
+   */
+  int MOVE_RULE = 0;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MOVE_RULE__ANNOTATIONS = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MOVE_RULE__NAME = SimpleRulesPackage.MODEL_MANIPULATION_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MOVE_RULE__ID = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MOVE_RULE__FQN = SimpleRulesPackage.MODEL_MANIPULATION_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MOVE_RULE__RUNTIME_ANNOTATIONS = SimpleRulesPackage.MODEL_MANIPULATION_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MOVE_RULE__CALLER = SimpleRulesPackage.MODEL_MANIPULATION_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MOVE_RULE__ASM_RULE = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Trg Container</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MOVE_RULE__TRG_CONTAINER = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Src Root</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MOVE_RULE__SRC_ROOT = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Move Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MOVE_RULE_FEATURE_COUNT = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.ModelCopyRuleImpl <em>Model Copy Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.ModelCopyRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymovePackageImpl#getModelCopyRule()
+   * @generated
+   */
+  int MODEL_COPY_RULE = 1;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_COPY_RULE__ANNOTATIONS = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_COPY_RULE__NAME = SimpleRulesPackage.MODEL_MANIPULATION_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_COPY_RULE__ID = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_COPY_RULE__FQN = SimpleRulesPackage.MODEL_MANIPULATION_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_COPY_RULE__RUNTIME_ANNOTATIONS = SimpleRulesPackage.MODEL_MANIPULATION_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_COPY_RULE__CALLER = SimpleRulesPackage.MODEL_MANIPULATION_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_COPY_RULE__ASM_RULE = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Target Variable</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_COPY_RULE__TARGET_VARIABLE = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Trg Container</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_COPY_RULE__TRG_CONTAINER = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 1;
+
+  /**
+   * The feature id for the '<em><b>Src Root</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_COPY_RULE__SRC_ROOT = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 2;
+
+  /**
+   * The feature id for the '<em><b>Semantics</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_COPY_RULE__SEMANTICS = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 3;
+
+  /**
+   * The number of structural features of the '<em>Model Copy Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_COPY_RULE_FEATURE_COUNT = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 4;
+
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule <em>Move Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Move Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule
+   * @generated
+   */
+  EClass getMoveRule();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule#getTrgContainer <em>Trg Container</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Trg Container</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule#getTrgContainer()
+   * @see #getMoveRule()
+   * @generated
+   */
+  EReference getMoveRule_TrgContainer();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule#getSrcRoot <em>Src Root</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Src Root</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule#getSrcRoot()
+   * @see #getMoveRule()
+   * @generated
+   */
+  EReference getMoveRule_SrcRoot();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule <em>Model Copy Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Model Copy Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule
+   * @generated
+   */
+  EClass getModelCopyRule();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule#getTargetVariable <em>Target Variable</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Target Variable</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule#getTargetVariable()
+   * @see #getModelCopyRule()
+   * @generated
+   */
+  EReference getModelCopyRule_TargetVariable();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule#getTrgContainer <em>Trg Container</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Trg Container</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule#getTrgContainer()
+   * @see #getModelCopyRule()
+   * @generated
+   */
+  EReference getModelCopyRule_TrgContainer();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule#getSrcRoot <em>Src Root</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Src Root</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule#getSrcRoot()
+   * @see #getModelCopyRule()
+   * @generated
+   */
+  EReference getModelCopyRule_SrcRoot();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule#getSemantics <em>Semantics</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Semantics</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule#getSemantics()
+   * @see #getModelCopyRule()
+   * @generated
+   */
+  EAttribute getModelCopyRule_Semantics();
+
+  /**
+   * Returns the factory that creates the instances of the model.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the factory that creates the instances of the model.
+   * @generated
+   */
+  CopymoveFactory getCopymoveFactory();
+
+  /**
+   * <!-- begin-user-doc -->
+   * Defines literals for the meta objects that represent
+   * <ul>
+   *   <li>each class,</li>
+   *   <li>each feature of each class,</li>
+   *   <li>each enum,</li>
+   *   <li>and each data type</li>
+   * </ul>
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  interface Literals
+  {
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.MoveRuleImpl <em>Move Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.MoveRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymovePackageImpl#getMoveRule()
+     * @generated
+     */
+    EClass MOVE_RULE = eINSTANCE.getMoveRule();
+
+    /**
+     * The meta object literal for the '<em><b>Trg Container</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MOVE_RULE__TRG_CONTAINER = eINSTANCE.getMoveRule_TrgContainer();
+
+    /**
+     * The meta object literal for the '<em><b>Src Root</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MOVE_RULE__SRC_ROOT = eINSTANCE.getMoveRule_SrcRoot();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.ModelCopyRuleImpl <em>Model Copy Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.ModelCopyRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymovePackageImpl#getModelCopyRule()
+     * @generated
+     */
+    EClass MODEL_COPY_RULE = eINSTANCE.getModelCopyRule();
+
+    /**
+     * The meta object literal for the '<em><b>Target Variable</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MODEL_COPY_RULE__TARGET_VARIABLE = eINSTANCE.getModelCopyRule_TargetVariable();
+
+    /**
+     * The meta object literal for the '<em><b>Trg Container</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MODEL_COPY_RULE__TRG_CONTAINER = eINSTANCE.getModelCopyRule_TrgContainer();
+
+    /**
+     * The meta object literal for the '<em><b>Src Root</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MODEL_COPY_RULE__SRC_ROOT = eINSTANCE.getModelCopyRule_SrcRoot();
+
+    /**
+     * The meta object literal for the '<em><b>Semantics</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute MODEL_COPY_RULE__SEMANTICS = eINSTANCE.getModelCopyRule_Semantics();
+
+  }
+
+} //CopymovePackage
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/ModelCopyRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/ModelCopyRule.java
new file mode 100644
index 0000000..0b0f362
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/ModelCopyRule.java
@@ -0,0 +1,157 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.CopySemantics;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Model Copy Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule#getTargetVariable <em>Target Variable</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule#getTrgContainer <em>Trg Container</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule#getSrcRoot <em>Src Root</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule#getSemantics <em>Semantics</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage#getModelCopyRule()
+ * @model
+ * @generated
+ */
+public interface ModelCopyRule extends ModelManipulationRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Target Variable</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Target Variable</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Target Variable</em>' containment reference.
+   * @see #setTargetVariable(VariableReference)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage#getModelCopyRule_TargetVariable()
+   * @model containment="true" ordered="false"
+   * @generated
+   */
+  VariableReference getTargetVariable();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule#getTargetVariable <em>Target Variable</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Target Variable</em>' containment reference.
+   * @see #getTargetVariable()
+   * @generated
+   */
+  void setTargetVariable(VariableReference value);
+
+  /**
+   * Returns the value of the '<em><b>Trg Container</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Trg Container</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Trg Container</em>' containment reference.
+   * @see #setTrgContainer(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage#getModelCopyRule_TrgContainer()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getTrgContainer();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule#getTrgContainer <em>Trg Container</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Trg Container</em>' containment reference.
+   * @see #getTrgContainer()
+   * @generated
+   */
+  void setTrgContainer(Term value);
+
+  /**
+   * Returns the value of the '<em><b>Src Root</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Src Root</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Src Root</em>' containment reference.
+   * @see #setSrcRoot(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage#getModelCopyRule_SrcRoot()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getSrcRoot();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule#getSrcRoot <em>Src Root</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Src Root</em>' containment reference.
+   * @see #getSrcRoot()
+   * @generated
+   */
+  void setSrcRoot(Term value);
+
+  /**
+   * Returns the value of the '<em><b>Semantics</b></em>' attribute.
+   * The default value is <code>"dropOuterEdges"</code>.
+   * The literals are from the enumeration {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.CopySemantics}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Semantics</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Semantics</em>' attribute.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.CopySemantics
+   * @see #setSemantics(CopySemantics)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage#getModelCopyRule_Semantics()
+   * @model default="dropOuterEdges" required="true" ordered="false"
+   * @generated
+   */
+  CopySemantics getSemantics();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule#getSemantics <em>Semantics</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Semantics</em>' attribute.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.CopySemantics
+   * @see #getSemantics()
+   * @generated
+   */
+  void setSemantics(CopySemantics value);
+
+} // ModelCopyRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/MoveRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/MoveRule.java
new file mode 100644
index 0000000..7ff83e1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/MoveRule.java
@@ -0,0 +1,96 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Move Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule#getTrgContainer <em>Trg Container</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule#getSrcRoot <em>Src Root</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage#getMoveRule()
+ * @model
+ * @generated
+ */
+public interface MoveRule extends ModelManipulationRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Trg Container</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Trg Container</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Trg Container</em>' containment reference.
+   * @see #setTrgContainer(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage#getMoveRule_TrgContainer()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getTrgContainer();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule#getTrgContainer <em>Trg Container</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Trg Container</em>' containment reference.
+   * @see #getTrgContainer()
+   * @generated
+   */
+  void setTrgContainer(Term value);
+
+  /**
+   * Returns the value of the '<em><b>Src Root</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Src Root</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Src Root</em>' containment reference.
+   * @see #setSrcRoot(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage#getMoveRule_SrcRoot()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getSrcRoot();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule#getSrcRoot <em>Src Root</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Src Root</em>' containment reference.
+   * @see #getSrcRoot()
+   * @generated
+   */
+  void setSrcRoot(Term value);
+
+} // MoveRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/impl/CopymoveFactoryImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/impl/CopymoveFactoryImpl.java
new file mode 100644
index 0000000..285130c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/impl/CopymoveFactoryImpl.java
@@ -0,0 +1,134 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CopymoveFactoryImpl extends EFactoryImpl implements CopymoveFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Creates the default factory implementation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static CopymoveFactory init()
+  {
+    try
+    {
+      CopymoveFactory theCopymoveFactory = (CopymoveFactory)EPackage.Registry.INSTANCE.getEFactory("http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove.ecore"); 
+      if (theCopymoveFactory != null)
+      {
+        return theCopymoveFactory;
+      }
+    }
+    catch (Exception exception)
+    {
+      EcorePlugin.INSTANCE.log(exception);
+    }
+    return new CopymoveFactoryImpl();
+  }
+
+  /**
+   * Creates an instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CopymoveFactoryImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public EObject create(EClass eClass)
+  {
+    switch (eClass.getClassifierID())
+    {
+      case CopymovePackage.MOVE_RULE: return createMoveRule();
+      case CopymovePackage.MODEL_COPY_RULE: return createModelCopyRule();
+      default:
+        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+    }
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public MoveRule createMoveRule()
+  {
+    MoveRuleImpl moveRule = new MoveRuleImpl();
+    return moveRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ModelCopyRule createModelCopyRule()
+  {
+    ModelCopyRuleImpl modelCopyRule = new ModelCopyRuleImpl();
+    return modelCopyRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CopymovePackage getCopymovePackage()
+  {
+    return (CopymovePackage)getEPackage();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @deprecated
+   * @generated
+   */
+  @Deprecated
+  public static CopymovePackage getPackage()
+  {
+    return CopymovePackage.eINSTANCE;
+  }
+
+} //CopymoveFactoryImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/impl/CopymovePackageImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/impl/CopymovePackageImpl.java
new file mode 100644
index 0000000..bcbe302
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/impl/CopymovePackageImpl.java
@@ -0,0 +1,384 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymoveFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CopymovePackageImpl extends EPackageImpl implements CopymovePackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass moveRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass modelCopyRuleEClass = null;
+
+  /**
+   * Creates an instance of the model <b>Package</b>, registered with
+   * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+   * package URI value.
+   * <p>Note: the correct way to create the package is via the static
+   * factory method {@link #init init()}, which also performs
+   * initialization of the package, or returns the registered package,
+   * if one already exists.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.emf.ecore.EPackage.Registry
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage#eNS_URI
+   * @see #init()
+   * @generated
+   */
+  private CopymovePackageImpl()
+  {
+    super(eNS_URI, CopymoveFactory.eINSTANCE);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static boolean isInited = false;
+
+  /**
+   * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+   * 
+   * <p>This method is used to initialize {@link CopymovePackage#eINSTANCE} when that field is accessed.
+   * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #eNS_URI
+   * @see #createPackageContents()
+   * @see #initializePackageContents()
+   * @generated
+   */
+  public static CopymovePackage init()
+  {
+    if (isInited) return (CopymovePackage)EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI);
+
+    // Obtain or create and register package
+    CopymovePackageImpl theCopymovePackage = (CopymovePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof CopymovePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new CopymovePackageImpl());
+
+    isInited = true;
+
+    // Obtain or create and register interdependencies
+    EditmodelPackageImpl theEditmodelPackage = (EditmodelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) instanceof EditmodelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) : EditmodelPackage.eINSTANCE);
+    QueryFunctionsPackageImpl theQueryFunctionsPackage = (QueryFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) instanceof QueryFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) : QueryFunctionsPackage.eINSTANCE);
+    DeletionPackageImpl theDeletionPackage = (DeletionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) instanceof DeletionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) : DeletionPackage.eINSTANCE);
+    CreationPackageImpl theCreationPackage = (CreationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) instanceof CreationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) : CreationPackage.eINSTANCE);
+    UpdatePackageImpl theUpdatePackage = (UpdatePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) instanceof UpdatePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) : UpdatePackage.eINSTANCE);
+    DefinitionsPackageImpl theDefinitionsPackage = (DefinitionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) instanceof DefinitionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) : DefinitionsPackage.eINSTANCE);
+    CorePackageImpl theCorePackage = (CorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) instanceof CorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) : CorePackage.eINSTANCE);
+    SimpleRulesPackageImpl theSimpleRulesPackage = (SimpleRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) instanceof SimpleRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) : SimpleRulesPackage.eINSTANCE);
+    CompoundRulesPackageImpl theCompoundRulesPackage = (CompoundRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) instanceof CompoundRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) : CompoundRulesPackage.eINSTANCE);
+    EnumsPackageImpl theEnumsPackage = (EnumsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) instanceof EnumsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) : EnumsPackage.eINSTANCE);
+    TermsPackageImpl theTermsPackage = (TermsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) instanceof TermsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) : TermsPackage.eINSTANCE);
+    BuiltInFunctionsPackageImpl theBuiltInFunctionsPackage = (BuiltInFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) instanceof BuiltInFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) : BuiltInFunctionsPackage.eINSTANCE);
+    GtPackageImpl theGtPackage = (GtPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) instanceof GtPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) : GtPackage.eINSTANCE);
+
+    // Create package meta-data objects
+    theCopymovePackage.createPackageContents();
+    theEditmodelPackage.createPackageContents();
+    theQueryFunctionsPackage.createPackageContents();
+    theDeletionPackage.createPackageContents();
+    theCreationPackage.createPackageContents();
+    theUpdatePackage.createPackageContents();
+    theDefinitionsPackage.createPackageContents();
+    theCorePackage.createPackageContents();
+    theSimpleRulesPackage.createPackageContents();
+    theCompoundRulesPackage.createPackageContents();
+    theEnumsPackage.createPackageContents();
+    theTermsPackage.createPackageContents();
+    theBuiltInFunctionsPackage.createPackageContents();
+    theGtPackage.createPackageContents();
+
+    // Initialize created meta-data
+    theCopymovePackage.initializePackageContents();
+    theEditmodelPackage.initializePackageContents();
+    theQueryFunctionsPackage.initializePackageContents();
+    theDeletionPackage.initializePackageContents();
+    theCreationPackage.initializePackageContents();
+    theUpdatePackage.initializePackageContents();
+    theDefinitionsPackage.initializePackageContents();
+    theCorePackage.initializePackageContents();
+    theSimpleRulesPackage.initializePackageContents();
+    theCompoundRulesPackage.initializePackageContents();
+    theEnumsPackage.initializePackageContents();
+    theTermsPackage.initializePackageContents();
+    theBuiltInFunctionsPackage.initializePackageContents();
+    theGtPackage.initializePackageContents();
+
+    // Mark meta-data to indicate it can't be changed
+    theCopymovePackage.freeze();
+
+  
+    // Update the registry and return the package
+    EPackage.Registry.INSTANCE.put(CopymovePackage.eNS_URI, theCopymovePackage);
+    return theCopymovePackage;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getMoveRule()
+  {
+    return moveRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getMoveRule_TrgContainer()
+  {
+    return (EReference)moveRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getMoveRule_SrcRoot()
+  {
+    return (EReference)moveRuleEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getModelCopyRule()
+  {
+    return modelCopyRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getModelCopyRule_TargetVariable()
+  {
+    return (EReference)modelCopyRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getModelCopyRule_TrgContainer()
+  {
+    return (EReference)modelCopyRuleEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getModelCopyRule_SrcRoot()
+  {
+    return (EReference)modelCopyRuleEClass.getEStructuralFeatures().get(2);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getModelCopyRule_Semantics()
+  {
+    return (EAttribute)modelCopyRuleEClass.getEStructuralFeatures().get(3);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CopymoveFactory getCopymoveFactory()
+  {
+    return (CopymoveFactory)getEFactoryInstance();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isCreated = false;
+
+  /**
+   * Creates the meta-model objects for the package.  This method is
+   * guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void createPackageContents()
+  {
+    if (isCreated) return;
+    isCreated = true;
+
+    // Create classes and their features
+    moveRuleEClass = createEClass(MOVE_RULE);
+    createEReference(moveRuleEClass, MOVE_RULE__TRG_CONTAINER);
+    createEReference(moveRuleEClass, MOVE_RULE__SRC_ROOT);
+
+    modelCopyRuleEClass = createEClass(MODEL_COPY_RULE);
+    createEReference(modelCopyRuleEClass, MODEL_COPY_RULE__TARGET_VARIABLE);
+    createEReference(modelCopyRuleEClass, MODEL_COPY_RULE__TRG_CONTAINER);
+    createEReference(modelCopyRuleEClass, MODEL_COPY_RULE__SRC_ROOT);
+    createEAttribute(modelCopyRuleEClass, MODEL_COPY_RULE__SEMANTICS);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isInitialized = false;
+
+  /**
+   * Complete the initialization of the package and its meta-model.  This
+   * method is guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void initializePackageContents()
+  {
+    if (isInitialized) return;
+    isInitialized = true;
+
+    // Initialize package
+    setName(eNAME);
+    setNsPrefix(eNS_PREFIX);
+    setNsURI(eNS_URI);
+
+    // Obtain other dependent packages
+    SimpleRulesPackage theSimpleRulesPackage = (SimpleRulesPackage)EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI);
+    TermsPackage theTermsPackage = (TermsPackage)EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI);
+    EnumsPackage theEnumsPackage = (EnumsPackage)EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI);
+
+    // Create type parameters
+
+    // Set bounds for type parameters
+
+    // Add supertypes to classes
+    moveRuleEClass.getESuperTypes().add(theSimpleRulesPackage.getModelManipulationRule());
+    modelCopyRuleEClass.getESuperTypes().add(theSimpleRulesPackage.getModelManipulationRule());
+
+    // Initialize classes and features; add operations and parameters
+    initEClass(moveRuleEClass, MoveRule.class, "MoveRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getMoveRule_TrgContainer(), theTermsPackage.getTerm(), null, "trgContainer", null, 1, 1, MoveRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getMoveRule_SrcRoot(), theTermsPackage.getTerm(), null, "srcRoot", null, 1, 1, MoveRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(modelCopyRuleEClass, ModelCopyRule.class, "ModelCopyRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getModelCopyRule_TargetVariable(), theTermsPackage.getVariableReference(), null, "targetVariable", null, 0, 1, ModelCopyRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getModelCopyRule_TrgContainer(), theTermsPackage.getTerm(), null, "trgContainer", null, 1, 1, ModelCopyRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getModelCopyRule_SrcRoot(), theTermsPackage.getTerm(), null, "srcRoot", null, 1, 1, ModelCopyRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEAttribute(getModelCopyRule_Semantics(), theEnumsPackage.getCopySemantics(), "semantics", "dropOuterEdges", 1, 1, ModelCopyRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    // Create resource
+    createResource(eNS_URI);
+  }
+
+} //CopymovePackageImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/impl/ModelCopyRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/impl/ModelCopyRuleImpl.java
new file mode 100644
index 0000000..98bc57d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/impl/ModelCopyRuleImpl.java
@@ -0,0 +1,428 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.CopySemantics;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ModelManipulationRuleImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Model Copy Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.ModelCopyRuleImpl#getTargetVariable <em>Target Variable</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.ModelCopyRuleImpl#getTrgContainer <em>Trg Container</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.ModelCopyRuleImpl#getSrcRoot <em>Src Root</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.ModelCopyRuleImpl#getSemantics <em>Semantics</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ModelCopyRuleImpl extends ModelManipulationRuleImpl implements ModelCopyRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getTargetVariable() <em>Target Variable</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getTargetVariable()
+   * @generated
+   * @ordered
+   */
+  protected VariableReference targetVariable;
+
+  /**
+   * The cached value of the '{@link #getTrgContainer() <em>Trg Container</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getTrgContainer()
+   * @generated
+   * @ordered
+   */
+  protected Term trgContainer;
+
+  /**
+   * The cached value of the '{@link #getSrcRoot() <em>Src Root</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSrcRoot()
+   * @generated
+   * @ordered
+   */
+  protected Term srcRoot;
+
+  /**
+   * The default value of the '{@link #getSemantics() <em>Semantics</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSemantics()
+   * @generated
+   * @ordered
+   */
+  protected static final CopySemantics SEMANTICS_EDEFAULT = CopySemantics.DROP_OUTER_EDGES_LITERAL;
+
+  /**
+   * The cached value of the '{@link #getSemantics() <em>Semantics</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSemantics()
+   * @generated
+   * @ordered
+   */
+  protected CopySemantics semantics = SEMANTICS_EDEFAULT;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ModelCopyRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CopymovePackage.Literals.MODEL_COPY_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public VariableReference getTargetVariable()
+  {
+    return targetVariable;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetTargetVariable(VariableReference newTargetVariable, NotificationChain msgs)
+  {
+    VariableReference oldTargetVariable = targetVariable;
+    targetVariable = newTargetVariable;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CopymovePackage.MODEL_COPY_RULE__TARGET_VARIABLE, oldTargetVariable, newTargetVariable);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setTargetVariable(VariableReference newTargetVariable)
+  {
+    if (newTargetVariable != targetVariable)
+    {
+      NotificationChain msgs = null;
+      if (targetVariable != null)
+        msgs = ((InternalEObject)targetVariable).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CopymovePackage.MODEL_COPY_RULE__TARGET_VARIABLE, null, msgs);
+      if (newTargetVariable != null)
+        msgs = ((InternalEObject)newTargetVariable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CopymovePackage.MODEL_COPY_RULE__TARGET_VARIABLE, null, msgs);
+      msgs = basicSetTargetVariable(newTargetVariable, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CopymovePackage.MODEL_COPY_RULE__TARGET_VARIABLE, newTargetVariable, newTargetVariable));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getTrgContainer()
+  {
+    return trgContainer;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetTrgContainer(Term newTrgContainer, NotificationChain msgs)
+  {
+    Term oldTrgContainer = trgContainer;
+    trgContainer = newTrgContainer;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CopymovePackage.MODEL_COPY_RULE__TRG_CONTAINER, oldTrgContainer, newTrgContainer);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setTrgContainer(Term newTrgContainer)
+  {
+    if (newTrgContainer != trgContainer)
+    {
+      NotificationChain msgs = null;
+      if (trgContainer != null)
+        msgs = ((InternalEObject)trgContainer).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CopymovePackage.MODEL_COPY_RULE__TRG_CONTAINER, null, msgs);
+      if (newTrgContainer != null)
+        msgs = ((InternalEObject)newTrgContainer).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CopymovePackage.MODEL_COPY_RULE__TRG_CONTAINER, null, msgs);
+      msgs = basicSetTrgContainer(newTrgContainer, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CopymovePackage.MODEL_COPY_RULE__TRG_CONTAINER, newTrgContainer, newTrgContainer));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getSrcRoot()
+  {
+    return srcRoot;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetSrcRoot(Term newSrcRoot, NotificationChain msgs)
+  {
+    Term oldSrcRoot = srcRoot;
+    srcRoot = newSrcRoot;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CopymovePackage.MODEL_COPY_RULE__SRC_ROOT, oldSrcRoot, newSrcRoot);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setSrcRoot(Term newSrcRoot)
+  {
+    if (newSrcRoot != srcRoot)
+    {
+      NotificationChain msgs = null;
+      if (srcRoot != null)
+        msgs = ((InternalEObject)srcRoot).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CopymovePackage.MODEL_COPY_RULE__SRC_ROOT, null, msgs);
+      if (newSrcRoot != null)
+        msgs = ((InternalEObject)newSrcRoot).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CopymovePackage.MODEL_COPY_RULE__SRC_ROOT, null, msgs);
+      msgs = basicSetSrcRoot(newSrcRoot, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CopymovePackage.MODEL_COPY_RULE__SRC_ROOT, newSrcRoot, newSrcRoot));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CopySemantics getSemantics()
+  {
+    return semantics;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setSemantics(CopySemantics newSemantics)
+  {
+    CopySemantics oldSemantics = semantics;
+    semantics = newSemantics == null ? SEMANTICS_EDEFAULT : newSemantics;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CopymovePackage.MODEL_COPY_RULE__SEMANTICS, oldSemantics, semantics));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case CopymovePackage.MODEL_COPY_RULE__TARGET_VARIABLE:
+        return basicSetTargetVariable(null, msgs);
+      case CopymovePackage.MODEL_COPY_RULE__TRG_CONTAINER:
+        return basicSetTrgContainer(null, msgs);
+      case CopymovePackage.MODEL_COPY_RULE__SRC_ROOT:
+        return basicSetSrcRoot(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case CopymovePackage.MODEL_COPY_RULE__TARGET_VARIABLE:
+        return getTargetVariable();
+      case CopymovePackage.MODEL_COPY_RULE__TRG_CONTAINER:
+        return getTrgContainer();
+      case CopymovePackage.MODEL_COPY_RULE__SRC_ROOT:
+        return getSrcRoot();
+      case CopymovePackage.MODEL_COPY_RULE__SEMANTICS:
+        return getSemantics();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case CopymovePackage.MODEL_COPY_RULE__TARGET_VARIABLE:
+        setTargetVariable((VariableReference)newValue);
+        return;
+      case CopymovePackage.MODEL_COPY_RULE__TRG_CONTAINER:
+        setTrgContainer((Term)newValue);
+        return;
+      case CopymovePackage.MODEL_COPY_RULE__SRC_ROOT:
+        setSrcRoot((Term)newValue);
+        return;
+      case CopymovePackage.MODEL_COPY_RULE__SEMANTICS:
+        setSemantics((CopySemantics)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case CopymovePackage.MODEL_COPY_RULE__TARGET_VARIABLE:
+        setTargetVariable((VariableReference)null);
+        return;
+      case CopymovePackage.MODEL_COPY_RULE__TRG_CONTAINER:
+        setTrgContainer((Term)null);
+        return;
+      case CopymovePackage.MODEL_COPY_RULE__SRC_ROOT:
+        setSrcRoot((Term)null);
+        return;
+      case CopymovePackage.MODEL_COPY_RULE__SEMANTICS:
+        setSemantics(SEMANTICS_EDEFAULT);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case CopymovePackage.MODEL_COPY_RULE__TARGET_VARIABLE:
+        return targetVariable != null;
+      case CopymovePackage.MODEL_COPY_RULE__TRG_CONTAINER:
+        return trgContainer != null;
+      case CopymovePackage.MODEL_COPY_RULE__SRC_ROOT:
+        return srcRoot != null;
+      case CopymovePackage.MODEL_COPY_RULE__SEMANTICS:
+        return semantics != SEMANTICS_EDEFAULT;
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (semantics: ");
+    result.append(semantics);
+    result.append(')');
+    return result.toString();
+  }
+
+} //ModelCopyRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/impl/MoveRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/impl/MoveRuleImpl.java
new file mode 100644
index 0000000..de6d6f0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/impl/MoveRuleImpl.java
@@ -0,0 +1,283 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ModelManipulationRuleImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Move Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.MoveRuleImpl#getTrgContainer <em>Trg Container</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.MoveRuleImpl#getSrcRoot <em>Src Root</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class MoveRuleImpl extends ModelManipulationRuleImpl implements MoveRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getTrgContainer() <em>Trg Container</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getTrgContainer()
+   * @generated
+   * @ordered
+   */
+  protected Term trgContainer;
+
+  /**
+   * The cached value of the '{@link #getSrcRoot() <em>Src Root</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSrcRoot()
+   * @generated
+   * @ordered
+   */
+  protected Term srcRoot;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected MoveRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CopymovePackage.Literals.MOVE_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getTrgContainer()
+  {
+    return trgContainer;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetTrgContainer(Term newTrgContainer, NotificationChain msgs)
+  {
+    Term oldTrgContainer = trgContainer;
+    trgContainer = newTrgContainer;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CopymovePackage.MOVE_RULE__TRG_CONTAINER, oldTrgContainer, newTrgContainer);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setTrgContainer(Term newTrgContainer)
+  {
+    if (newTrgContainer != trgContainer)
+    {
+      NotificationChain msgs = null;
+      if (trgContainer != null)
+        msgs = ((InternalEObject)trgContainer).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CopymovePackage.MOVE_RULE__TRG_CONTAINER, null, msgs);
+      if (newTrgContainer != null)
+        msgs = ((InternalEObject)newTrgContainer).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CopymovePackage.MOVE_RULE__TRG_CONTAINER, null, msgs);
+      msgs = basicSetTrgContainer(newTrgContainer, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CopymovePackage.MOVE_RULE__TRG_CONTAINER, newTrgContainer, newTrgContainer));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getSrcRoot()
+  {
+    return srcRoot;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetSrcRoot(Term newSrcRoot, NotificationChain msgs)
+  {
+    Term oldSrcRoot = srcRoot;
+    srcRoot = newSrcRoot;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CopymovePackage.MOVE_RULE__SRC_ROOT, oldSrcRoot, newSrcRoot);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setSrcRoot(Term newSrcRoot)
+  {
+    if (newSrcRoot != srcRoot)
+    {
+      NotificationChain msgs = null;
+      if (srcRoot != null)
+        msgs = ((InternalEObject)srcRoot).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CopymovePackage.MOVE_RULE__SRC_ROOT, null, msgs);
+      if (newSrcRoot != null)
+        msgs = ((InternalEObject)newSrcRoot).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CopymovePackage.MOVE_RULE__SRC_ROOT, null, msgs);
+      msgs = basicSetSrcRoot(newSrcRoot, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CopymovePackage.MOVE_RULE__SRC_ROOT, newSrcRoot, newSrcRoot));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case CopymovePackage.MOVE_RULE__TRG_CONTAINER:
+        return basicSetTrgContainer(null, msgs);
+      case CopymovePackage.MOVE_RULE__SRC_ROOT:
+        return basicSetSrcRoot(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case CopymovePackage.MOVE_RULE__TRG_CONTAINER:
+        return getTrgContainer();
+      case CopymovePackage.MOVE_RULE__SRC_ROOT:
+        return getSrcRoot();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case CopymovePackage.MOVE_RULE__TRG_CONTAINER:
+        setTrgContainer((Term)newValue);
+        return;
+      case CopymovePackage.MOVE_RULE__SRC_ROOT:
+        setSrcRoot((Term)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case CopymovePackage.MOVE_RULE__TRG_CONTAINER:
+        setTrgContainer((Term)null);
+        return;
+      case CopymovePackage.MOVE_RULE__SRC_ROOT:
+        setSrcRoot((Term)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case CopymovePackage.MOVE_RULE__TRG_CONTAINER:
+        return trgContainer != null;
+      case CopymovePackage.MOVE_RULE__SRC_ROOT:
+        return srcRoot != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //MoveRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/util/CopymoveAdapterFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/util/CopymoveAdapterFactory.java
new file mode 100644
index 0000000..3fc70ec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/util/CopymoveAdapterFactory.java
@@ -0,0 +1,254 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage
+ * @generated
+ */
+public class CopymoveAdapterFactory extends AdapterFactoryImpl
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static CopymovePackage modelPackage;
+
+  /**
+   * Creates an instance of the adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CopymoveAdapterFactory()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = CopymovePackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Returns whether this factory is applicable for the type of the object.
+   * <!-- begin-user-doc -->
+   * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+   * <!-- end-user-doc -->
+   * @return whether this factory is applicable for the type of the object.
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object object)
+  {
+    if (object == modelPackage)
+    {
+      return true;
+    }
+    if (object instanceof EObject)
+    {
+      return ((EObject)object).eClass().getEPackage() == modelPackage;
+    }
+    return false;
+  }
+
+  /**
+   * The switch that delegates to the <code>createXXX</code> methods.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected CopymoveSwitch<Adapter> modelSwitch =
+    new CopymoveSwitch<Adapter>()
+    {
+      @Override
+      public Adapter caseMoveRule(MoveRule object)
+      {
+        return createMoveRuleAdapter();
+      }
+      @Override
+      public Adapter caseModelCopyRule(ModelCopyRule object)
+      {
+        return createModelCopyRuleAdapter();
+      }
+      @Override
+      public Adapter caseAnnotatedElement(AnnotatedElement object)
+      {
+        return createAnnotatedElementAdapter();
+      }
+      @Override
+      public Adapter caseGTASMElement(GTASMElement object)
+      {
+        return createGTASMElementAdapter();
+      }
+      @Override
+      public Adapter caseASMRuleInvocation(ASMRuleInvocation object)
+      {
+        return createASMRuleInvocationAdapter();
+      }
+      @Override
+      public Adapter caseModelManipulationRule(ModelManipulationRule object)
+      {
+        return createModelManipulationRuleAdapter();
+      }
+      @Override
+      public Adapter defaultCase(EObject object)
+      {
+        return createEObjectAdapter();
+      }
+    };
+
+  /**
+   * Creates an adapter for the <code>target</code>.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param target the object to adapt.
+   * @return the adapter for the <code>target</code>.
+   * @generated
+   */
+  @Override
+  public Adapter createAdapter(Notifier target)
+  {
+    return modelSwitch.doSwitch((EObject)target);
+  }
+
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule <em>Move Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule
+   * @generated
+   */
+  public Adapter createMoveRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule <em>Model Copy Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule
+   * @generated
+   */
+  public Adapter createModelCopyRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement <em>Annotated Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement
+   * @generated
+   */
+  public Adapter createAnnotatedElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement <em>GTASM Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement
+   * @generated
+   */
+  public Adapter createGTASMElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation <em>ASM Rule Invocation</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation
+   * @generated
+   */
+  public Adapter createASMRuleInvocationAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule <em>Model Manipulation Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule
+   * @generated
+   */
+  public Adapter createModelManipulationRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for the default case.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @generated
+   */
+  public Adapter createEObjectAdapter()
+  {
+    return null;
+  }
+
+} //CopymoveAdapterFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/util/CopymoveSwitch.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/util/CopymoveSwitch.java
new file mode 100644
index 0000000..457cc5b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/copymove/util/CopymoveSwitch.java
@@ -0,0 +1,255 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage
+ * @generated
+ */
+public class CopymoveSwitch<T>
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static CopymovePackage modelPackage;
+
+  /**
+   * Creates an instance of the switch.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CopymoveSwitch()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = CopymovePackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  public T doSwitch(EObject theEObject)
+  {
+    return doSwitch(theEObject.eClass(), theEObject);
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(EClass theEClass, EObject theEObject)
+  {
+    if (theEClass.eContainer() == modelPackage)
+    {
+      return doSwitch(theEClass.getClassifierID(), theEObject);
+    }
+    else
+    {
+      List<EClass> eSuperTypes = theEClass.getESuperTypes();
+      return
+        eSuperTypes.isEmpty() ?
+          defaultCase(theEObject) :
+          doSwitch(eSuperTypes.get(0), theEObject);
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(int classifierID, EObject theEObject)
+  {
+    switch (classifierID)
+    {
+      case CopymovePackage.MOVE_RULE:
+      {
+        MoveRule moveRule = (MoveRule)theEObject;
+        T result = caseMoveRule(moveRule);
+        if (result == null) result = caseModelManipulationRule(moveRule);
+        if (result == null) result = caseASMRuleInvocation(moveRule);
+        if (result == null) result = caseGTASMElement(moveRule);
+        if (result == null) result = caseAnnotatedElement(moveRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CopymovePackage.MODEL_COPY_RULE:
+      {
+        ModelCopyRule modelCopyRule = (ModelCopyRule)theEObject;
+        T result = caseModelCopyRule(modelCopyRule);
+        if (result == null) result = caseModelManipulationRule(modelCopyRule);
+        if (result == null) result = caseASMRuleInvocation(modelCopyRule);
+        if (result == null) result = caseGTASMElement(modelCopyRule);
+        if (result == null) result = caseAnnotatedElement(modelCopyRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      default: return defaultCase(theEObject);
+    }
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Move Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Move Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseMoveRule(MoveRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Model Copy Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Model Copy Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseModelCopyRule(ModelCopyRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseAnnotatedElement(AnnotatedElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGTASMElement(GTASMElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>ASM Rule Invocation</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>ASM Rule Invocation</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseASMRuleInvocation(ASMRuleInvocation object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Model Manipulation Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Model Manipulation Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseModelManipulationRule(ModelManipulationRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch, but this is the last case anyway.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+   * @generated
+   */
+  public T defaultCase(EObject object)
+  {
+    return null;
+  }
+
+} //CopymoveSwitch
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/CreateInstanceOf.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/CreateInstanceOf.java
new file mode 100644
index 0000000..9ad5096
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/CreateInstanceOf.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Create Instance Of</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage#getCreateInstanceOf()
+ * @model
+ * @generated
+ */
+public interface CreateInstanceOf extends RelationshipCreateRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // CreateInstanceOf
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/CreateSupertypeOf.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/CreateSupertypeOf.java
new file mode 100644
index 0000000..94cf8eb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/CreateSupertypeOf.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Create Supertype Of</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage#getCreateSupertypeOf()
+ * @model
+ * @generated
+ */
+public interface CreateSupertypeOf extends RelationshipCreateRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // CreateSupertypeOf
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/CreationFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/CreationFactory.java
new file mode 100644
index 0000000..4b2ef31
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/CreationFactory.java
@@ -0,0 +1,86 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage
+ * @generated
+ */
+public interface CreationFactory extends EFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The singleton instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  CreationFactory eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationFactoryImpl.init();
+
+  /**
+   * Returns a new object of class '<em>Relation Create Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Relation Create Rule</em>'.
+   * @generated
+   */
+  RelationCreateRule createRelationCreateRule();
+
+  /**
+   * Returns a new object of class '<em>Entity Create Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Entity Create Rule</em>'.
+   * @generated
+   */
+  EntityCreateRule createEntityCreateRule();
+
+  /**
+   * Returns a new object of class '<em>Create Supertype Of</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Create Supertype Of</em>'.
+   * @generated
+   */
+  CreateSupertypeOf createCreateSupertypeOf();
+
+  /**
+   * Returns a new object of class '<em>Create Instance Of</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Create Instance Of</em>'.
+   * @generated
+   */
+  CreateInstanceOf createCreateInstanceOf();
+
+  /**
+   * Returns the package supported by this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the package supported by this factory.
+   * @generated
+   */
+  CreationPackage getCreationPackage();
+
+} //CreationFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/CreationPackage.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/CreationPackage.java
new file mode 100644
index 0000000..967256e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/CreationPackage.java
@@ -0,0 +1,982 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ *   <li>each class,</li>
+ *   <li>each feature of each class,</li>
+ *   <li>each enum,</li>
+ *   <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface CreationPackage extends EPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The package name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNAME = "creation";
+
+  /**
+   * The package namespace URI.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_URI = "http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation.ecore";
+
+  /**
+   * The package namespace name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_PREFIX = "viatragtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation";
+
+  /**
+   * The singleton instance of the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  CreationPackage eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl.init();
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.RelationshipCreateRuleImpl <em>Relationship Create Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.RelationshipCreateRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl#getRelationshipCreateRule()
+   * @generated
+   */
+  int RELATIONSHIP_CREATE_RULE = 0;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_CREATE_RULE__ANNOTATIONS = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_CREATE_RULE__NAME = SimpleRulesPackage.MODEL_MANIPULATION_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_CREATE_RULE__ID = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_CREATE_RULE__FQN = SimpleRulesPackage.MODEL_MANIPULATION_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_CREATE_RULE__RUNTIME_ANNOTATIONS = SimpleRulesPackage.MODEL_MANIPULATION_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_CREATE_RULE__CALLER = SimpleRulesPackage.MODEL_MANIPULATION_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_CREATE_RULE__ASM_RULE = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Super</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_CREATE_RULE__SUPER = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Sub</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_CREATE_RULE__SUB = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Relationship Create Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_CREATE_RULE_FEATURE_COUNT = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.ElementCreateRuleImpl <em>Element Create Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.ElementCreateRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl#getElementCreateRule()
+   * @generated
+   */
+  int ELEMENT_CREATE_RULE = 2;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_CREATE_RULE__ANNOTATIONS = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_CREATE_RULE__NAME = SimpleRulesPackage.MODEL_MANIPULATION_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_CREATE_RULE__ID = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_CREATE_RULE__FQN = SimpleRulesPackage.MODEL_MANIPULATION_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_CREATE_RULE__RUNTIME_ANNOTATIONS = SimpleRulesPackage.MODEL_MANIPULATION_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_CREATE_RULE__CALLER = SimpleRulesPackage.MODEL_MANIPULATION_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_CREATE_RULE__ASM_RULE = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_CREATE_RULE__TYPE = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Target Variable</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_CREATE_RULE__TARGET_VARIABLE = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Element Create Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_CREATE_RULE_FEATURE_COUNT = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.RelationCreateRuleImpl <em>Relation Create Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.RelationCreateRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl#getRelationCreateRule()
+   * @generated
+   */
+  int RELATION_CREATE_RULE = 1;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION_CREATE_RULE__ANNOTATIONS = ELEMENT_CREATE_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION_CREATE_RULE__NAME = ELEMENT_CREATE_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION_CREATE_RULE__ID = ELEMENT_CREATE_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION_CREATE_RULE__FQN = ELEMENT_CREATE_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION_CREATE_RULE__RUNTIME_ANNOTATIONS = ELEMENT_CREATE_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION_CREATE_RULE__CALLER = ELEMENT_CREATE_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION_CREATE_RULE__ASM_RULE = ELEMENT_CREATE_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION_CREATE_RULE__TYPE = ELEMENT_CREATE_RULE__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Target Variable</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION_CREATE_RULE__TARGET_VARIABLE = ELEMENT_CREATE_RULE__TARGET_VARIABLE;
+
+  /**
+   * The feature id for the '<em><b>Target</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION_CREATE_RULE__TARGET = ELEMENT_CREATE_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Source</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION_CREATE_RULE__SOURCE = ELEMENT_CREATE_RULE_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Relation Create Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION_CREATE_RULE_FEATURE_COUNT = ELEMENT_CREATE_RULE_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.EntityCreateRuleImpl <em>Entity Create Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.EntityCreateRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl#getEntityCreateRule()
+   * @generated
+   */
+  int ENTITY_CREATE_RULE = 3;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY_CREATE_RULE__ANNOTATIONS = ELEMENT_CREATE_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY_CREATE_RULE__NAME = ELEMENT_CREATE_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY_CREATE_RULE__ID = ELEMENT_CREATE_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY_CREATE_RULE__FQN = ELEMENT_CREATE_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY_CREATE_RULE__RUNTIME_ANNOTATIONS = ELEMENT_CREATE_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY_CREATE_RULE__CALLER = ELEMENT_CREATE_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY_CREATE_RULE__ASM_RULE = ELEMENT_CREATE_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY_CREATE_RULE__TYPE = ELEMENT_CREATE_RULE__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Target Variable</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY_CREATE_RULE__TARGET_VARIABLE = ELEMENT_CREATE_RULE__TARGET_VARIABLE;
+
+  /**
+   * The feature id for the '<em><b>Parent</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY_CREATE_RULE__PARENT = ELEMENT_CREATE_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>Entity Create Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY_CREATE_RULE_FEATURE_COUNT = ELEMENT_CREATE_RULE_FEATURE_COUNT + 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreateSupertypeOfImpl <em>Create Supertype Of</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreateSupertypeOfImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl#getCreateSupertypeOf()
+   * @generated
+   */
+  int CREATE_SUPERTYPE_OF = 4;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_SUPERTYPE_OF__ANNOTATIONS = RELATIONSHIP_CREATE_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_SUPERTYPE_OF__NAME = RELATIONSHIP_CREATE_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_SUPERTYPE_OF__ID = RELATIONSHIP_CREATE_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_SUPERTYPE_OF__FQN = RELATIONSHIP_CREATE_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_SUPERTYPE_OF__RUNTIME_ANNOTATIONS = RELATIONSHIP_CREATE_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_SUPERTYPE_OF__CALLER = RELATIONSHIP_CREATE_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_SUPERTYPE_OF__ASM_RULE = RELATIONSHIP_CREATE_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Super</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_SUPERTYPE_OF__SUPER = RELATIONSHIP_CREATE_RULE__SUPER;
+
+  /**
+   * The feature id for the '<em><b>Sub</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_SUPERTYPE_OF__SUB = RELATIONSHIP_CREATE_RULE__SUB;
+
+  /**
+   * The number of structural features of the '<em>Create Supertype Of</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_SUPERTYPE_OF_FEATURE_COUNT = RELATIONSHIP_CREATE_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreateInstanceOfImpl <em>Create Instance Of</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreateInstanceOfImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl#getCreateInstanceOf()
+   * @generated
+   */
+  int CREATE_INSTANCE_OF = 5;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_INSTANCE_OF__ANNOTATIONS = RELATIONSHIP_CREATE_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_INSTANCE_OF__NAME = RELATIONSHIP_CREATE_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_INSTANCE_OF__ID = RELATIONSHIP_CREATE_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_INSTANCE_OF__FQN = RELATIONSHIP_CREATE_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_INSTANCE_OF__RUNTIME_ANNOTATIONS = RELATIONSHIP_CREATE_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_INSTANCE_OF__CALLER = RELATIONSHIP_CREATE_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_INSTANCE_OF__ASM_RULE = RELATIONSHIP_CREATE_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Super</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_INSTANCE_OF__SUPER = RELATIONSHIP_CREATE_RULE__SUPER;
+
+  /**
+   * The feature id for the '<em><b>Sub</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_INSTANCE_OF__SUB = RELATIONSHIP_CREATE_RULE__SUB;
+
+  /**
+   * The number of structural features of the '<em>Create Instance Of</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int CREATE_INSTANCE_OF_FEATURE_COUNT = RELATIONSHIP_CREATE_RULE_FEATURE_COUNT + 0;
+
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationshipCreateRule <em>Relationship Create Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Relationship Create Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationshipCreateRule
+   * @generated
+   */
+  EClass getRelationshipCreateRule();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationshipCreateRule#getSuper <em>Super</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Super</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationshipCreateRule#getSuper()
+   * @see #getRelationshipCreateRule()
+   * @generated
+   */
+  EReference getRelationshipCreateRule_Super();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationshipCreateRule#getSub <em>Sub</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Sub</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationshipCreateRule#getSub()
+   * @see #getRelationshipCreateRule()
+   * @generated
+   */
+  EReference getRelationshipCreateRule_Sub();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule <em>Relation Create Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Relation Create Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule
+   * @generated
+   */
+  EClass getRelationCreateRule();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule#getTarget <em>Target</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Target</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule#getTarget()
+   * @see #getRelationCreateRule()
+   * @generated
+   */
+  EReference getRelationCreateRule_Target();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule#getSource <em>Source</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Source</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule#getSource()
+   * @see #getRelationCreateRule()
+   * @generated
+   */
+  EReference getRelationCreateRule_Source();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.ElementCreateRule <em>Element Create Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Element Create Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.ElementCreateRule
+   * @generated
+   */
+  EClass getElementCreateRule();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.ElementCreateRule#getType <em>Type</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Type</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.ElementCreateRule#getType()
+   * @see #getElementCreateRule()
+   * @generated
+   */
+  EReference getElementCreateRule_Type();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.ElementCreateRule#getTargetVariable <em>Target Variable</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Target Variable</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.ElementCreateRule#getTargetVariable()
+   * @see #getElementCreateRule()
+   * @generated
+   */
+  EReference getElementCreateRule_TargetVariable();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.EntityCreateRule <em>Entity Create Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Entity Create Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.EntityCreateRule
+   * @generated
+   */
+  EClass getEntityCreateRule();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.EntityCreateRule#getParent <em>Parent</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Parent</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.EntityCreateRule#getParent()
+   * @see #getEntityCreateRule()
+   * @generated
+   */
+  EReference getEntityCreateRule_Parent();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateSupertypeOf <em>Create Supertype Of</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Create Supertype Of</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateSupertypeOf
+   * @generated
+   */
+  EClass getCreateSupertypeOf();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateInstanceOf <em>Create Instance Of</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Create Instance Of</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateInstanceOf
+   * @generated
+   */
+  EClass getCreateInstanceOf();
+
+  /**
+   * Returns the factory that creates the instances of the model.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the factory that creates the instances of the model.
+   * @generated
+   */
+  CreationFactory getCreationFactory();
+
+  /**
+   * <!-- begin-user-doc -->
+   * Defines literals for the meta objects that represent
+   * <ul>
+   *   <li>each class,</li>
+   *   <li>each feature of each class,</li>
+   *   <li>each enum,</li>
+   *   <li>and each data type</li>
+   * </ul>
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  interface Literals
+  {
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.RelationshipCreateRuleImpl <em>Relationship Create Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.RelationshipCreateRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl#getRelationshipCreateRule()
+     * @generated
+     */
+    EClass RELATIONSHIP_CREATE_RULE = eINSTANCE.getRelationshipCreateRule();
+
+    /**
+     * The meta object literal for the '<em><b>Super</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference RELATIONSHIP_CREATE_RULE__SUPER = eINSTANCE.getRelationshipCreateRule_Super();
+
+    /**
+     * The meta object literal for the '<em><b>Sub</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference RELATIONSHIP_CREATE_RULE__SUB = eINSTANCE.getRelationshipCreateRule_Sub();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.RelationCreateRuleImpl <em>Relation Create Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.RelationCreateRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl#getRelationCreateRule()
+     * @generated
+     */
+    EClass RELATION_CREATE_RULE = eINSTANCE.getRelationCreateRule();
+
+    /**
+     * The meta object literal for the '<em><b>Target</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference RELATION_CREATE_RULE__TARGET = eINSTANCE.getRelationCreateRule_Target();
+
+    /**
+     * The meta object literal for the '<em><b>Source</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference RELATION_CREATE_RULE__SOURCE = eINSTANCE.getRelationCreateRule_Source();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.ElementCreateRuleImpl <em>Element Create Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.ElementCreateRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl#getElementCreateRule()
+     * @generated
+     */
+    EClass ELEMENT_CREATE_RULE = eINSTANCE.getElementCreateRule();
+
+    /**
+     * The meta object literal for the '<em><b>Type</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference ELEMENT_CREATE_RULE__TYPE = eINSTANCE.getElementCreateRule_Type();
+
+    /**
+     * The meta object literal for the '<em><b>Target Variable</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference ELEMENT_CREATE_RULE__TARGET_VARIABLE = eINSTANCE.getElementCreateRule_TargetVariable();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.EntityCreateRuleImpl <em>Entity Create Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.EntityCreateRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl#getEntityCreateRule()
+     * @generated
+     */
+    EClass ENTITY_CREATE_RULE = eINSTANCE.getEntityCreateRule();
+
+    /**
+     * The meta object literal for the '<em><b>Parent</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference ENTITY_CREATE_RULE__PARENT = eINSTANCE.getEntityCreateRule_Parent();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreateSupertypeOfImpl <em>Create Supertype Of</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreateSupertypeOfImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl#getCreateSupertypeOf()
+     * @generated
+     */
+    EClass CREATE_SUPERTYPE_OF = eINSTANCE.getCreateSupertypeOf();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreateInstanceOfImpl <em>Create Instance Of</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreateInstanceOfImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl#getCreateInstanceOf()
+     * @generated
+     */
+    EClass CREATE_INSTANCE_OF = eINSTANCE.getCreateInstanceOf();
+
+  }
+
+} //CreationPackage
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/ElementCreateRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/ElementCreateRule.java
new file mode 100644
index 0000000..2227cf6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/ElementCreateRule.java
@@ -0,0 +1,97 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Element Create Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.ElementCreateRule#getType <em>Type</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.ElementCreateRule#getTargetVariable <em>Target Variable</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage#getElementCreateRule()
+ * @model abstract="true"
+ * @generated
+ */
+public interface ElementCreateRule extends ModelManipulationRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Type</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Type</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Type</em>' containment reference.
+   * @see #setType(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage#getElementCreateRule_Type()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getType();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.ElementCreateRule#getType <em>Type</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Type</em>' containment reference.
+   * @see #getType()
+   * @generated
+   */
+  void setType(Term value);
+
+  /**
+   * Returns the value of the '<em><b>Target Variable</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Target Variable</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Target Variable</em>' containment reference.
+   * @see #setTargetVariable(VariableReference)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage#getElementCreateRule_TargetVariable()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  VariableReference getTargetVariable();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.ElementCreateRule#getTargetVariable <em>Target Variable</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Target Variable</em>' containment reference.
+   * @see #getTargetVariable()
+   * @generated
+   */
+  void setTargetVariable(VariableReference value);
+
+} // ElementCreateRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/EntityCreateRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/EntityCreateRule.java
new file mode 100644
index 0000000..eaa4128
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/EntityCreateRule.java
@@ -0,0 +1,67 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Entity Create Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.EntityCreateRule#getParent <em>Parent</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage#getEntityCreateRule()
+ * @model
+ * @generated
+ */
+public interface EntityCreateRule extends ElementCreateRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Parent</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Parent</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Parent</em>' containment reference.
+   * @see #setParent(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage#getEntityCreateRule_Parent()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getParent();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.EntityCreateRule#getParent <em>Parent</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Parent</em>' containment reference.
+   * @see #getParent()
+   * @generated
+   */
+  void setParent(Term value);
+
+} // EntityCreateRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/RelationCreateRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/RelationCreateRule.java
new file mode 100644
index 0000000..629b303
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/RelationCreateRule.java
@@ -0,0 +1,94 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Relation Create Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule#getTarget <em>Target</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule#getSource <em>Source</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage#getRelationCreateRule()
+ * @model
+ * @generated
+ */
+public interface RelationCreateRule extends ElementCreateRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Target</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Target</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Target</em>' containment reference.
+   * @see #setTarget(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage#getRelationCreateRule_Target()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getTarget();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule#getTarget <em>Target</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Target</em>' containment reference.
+   * @see #getTarget()
+   * @generated
+   */
+  void setTarget(Term value);
+
+  /**
+   * Returns the value of the '<em><b>Source</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Source</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Source</em>' containment reference.
+   * @see #setSource(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage#getRelationCreateRule_Source()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getSource();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule#getSource <em>Source</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Source</em>' containment reference.
+   * @see #getSource()
+   * @generated
+   */
+  void setSource(Term value);
+
+} // RelationCreateRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/RelationshipCreateRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/RelationshipCreateRule.java
new file mode 100644
index 0000000..d90ed81
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/RelationshipCreateRule.java
@@ -0,0 +1,96 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Relationship Create Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationshipCreateRule#getSuper <em>Super</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationshipCreateRule#getSub <em>Sub</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage#getRelationshipCreateRule()
+ * @model abstract="true"
+ * @generated
+ */
+public interface RelationshipCreateRule extends ModelManipulationRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Super</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Super</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Super</em>' containment reference.
+   * @see #setSuper(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage#getRelationshipCreateRule_Super()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getSuper();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationshipCreateRule#getSuper <em>Super</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Super</em>' containment reference.
+   * @see #getSuper()
+   * @generated
+   */
+  void setSuper(Term value);
+
+  /**
+   * Returns the value of the '<em><b>Sub</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Sub</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Sub</em>' containment reference.
+   * @see #setSub(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage#getRelationshipCreateRule_Sub()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getSub();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationshipCreateRule#getSub <em>Sub</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Sub</em>' containment reference.
+   * @see #getSub()
+   * @generated
+   */
+  void setSub(Term value);
+
+} // RelationshipCreateRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/CreateInstanceOfImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/CreateInstanceOfImpl.java
new file mode 100644
index 0000000..fb987cc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/CreateInstanceOfImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateInstanceOf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Create Instance Of</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class CreateInstanceOfImpl extends RelationshipCreateRuleImpl implements CreateInstanceOf
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected CreateInstanceOfImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CreationPackage.Literals.CREATE_INSTANCE_OF;
+  }
+
+} //CreateInstanceOfImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/CreateSupertypeOfImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/CreateSupertypeOfImpl.java
new file mode 100644
index 0000000..ec84ad9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/CreateSupertypeOfImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateSupertypeOf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Create Supertype Of</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class CreateSupertypeOfImpl extends RelationshipCreateRuleImpl implements CreateSupertypeOf
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected CreateSupertypeOfImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CreationPackage.Literals.CREATE_SUPERTYPE_OF;
+  }
+
+} //CreateSupertypeOfImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/CreationFactoryImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/CreationFactoryImpl.java
new file mode 100644
index 0000000..fc151d9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/CreationFactoryImpl.java
@@ -0,0 +1,158 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CreationFactoryImpl extends EFactoryImpl implements CreationFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Creates the default factory implementation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static CreationFactory init()
+  {
+    try
+    {
+      CreationFactory theCreationFactory = (CreationFactory)EPackage.Registry.INSTANCE.getEFactory("http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation.ecore"); 
+      if (theCreationFactory != null)
+      {
+        return theCreationFactory;
+      }
+    }
+    catch (Exception exception)
+    {
+      EcorePlugin.INSTANCE.log(exception);
+    }
+    return new CreationFactoryImpl();
+  }
+
+  /**
+   * Creates an instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CreationFactoryImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public EObject create(EClass eClass)
+  {
+    switch (eClass.getClassifierID())
+    {
+      case CreationPackage.RELATION_CREATE_RULE: return createRelationCreateRule();
+      case CreationPackage.ENTITY_CREATE_RULE: return createEntityCreateRule();
+      case CreationPackage.CREATE_SUPERTYPE_OF: return createCreateSupertypeOf();
+      case CreationPackage.CREATE_INSTANCE_OF: return createCreateInstanceOf();
+      default:
+        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+    }
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RelationCreateRule createRelationCreateRule()
+  {
+    RelationCreateRuleImpl relationCreateRule = new RelationCreateRuleImpl();
+    return relationCreateRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EntityCreateRule createEntityCreateRule()
+  {
+    EntityCreateRuleImpl entityCreateRule = new EntityCreateRuleImpl();
+    return entityCreateRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CreateSupertypeOf createCreateSupertypeOf()
+  {
+    CreateSupertypeOfImpl createSupertypeOf = new CreateSupertypeOfImpl();
+    return createSupertypeOf;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CreateInstanceOf createCreateInstanceOf()
+  {
+    CreateInstanceOfImpl createInstanceOf = new CreateInstanceOfImpl();
+    return createInstanceOf;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CreationPackage getCreationPackage()
+  {
+    return (CreationPackage)getEPackage();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @deprecated
+   * @generated
+   */
+  @Deprecated
+  public static CreationPackage getPackage()
+  {
+    return CreationPackage.eINSTANCE;
+  }
+
+} //CreationFactoryImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/CreationPackageImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/CreationPackageImpl.java
new file mode 100644
index 0000000..a81f0a4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/CreationPackageImpl.java
@@ -0,0 +1,486 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymovePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateInstanceOf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateSupertypeOf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.ElementCreateRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.EntityCreateRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationshipCreateRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CreationPackageImpl extends EPackageImpl implements CreationPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass relationshipCreateRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass relationCreateRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass elementCreateRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass entityCreateRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass createSupertypeOfEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass createInstanceOfEClass = null;
+
+  /**
+   * Creates an instance of the model <b>Package</b>, registered with
+   * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+   * package URI value.
+   * <p>Note: the correct way to create the package is via the static
+   * factory method {@link #init init()}, which also performs
+   * initialization of the package, or returns the registered package,
+   * if one already exists.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.emf.ecore.EPackage.Registry
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage#eNS_URI
+   * @see #init()
+   * @generated
+   */
+  private CreationPackageImpl()
+  {
+    super(eNS_URI, CreationFactory.eINSTANCE);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static boolean isInited = false;
+
+  /**
+   * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+   * 
+   * <p>This method is used to initialize {@link CreationPackage#eINSTANCE} when that field is accessed.
+   * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #eNS_URI
+   * @see #createPackageContents()
+   * @see #initializePackageContents()
+   * @generated
+   */
+  public static CreationPackage init()
+  {
+    if (isInited) return (CreationPackage)EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI);
+
+    // Obtain or create and register package
+    CreationPackageImpl theCreationPackage = (CreationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof CreationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new CreationPackageImpl());
+
+    isInited = true;
+
+    // Obtain or create and register interdependencies
+    EditmodelPackageImpl theEditmodelPackage = (EditmodelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) instanceof EditmodelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) : EditmodelPackage.eINSTANCE);
+    QueryFunctionsPackageImpl theQueryFunctionsPackage = (QueryFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) instanceof QueryFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) : QueryFunctionsPackage.eINSTANCE);
+    DeletionPackageImpl theDeletionPackage = (DeletionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) instanceof DeletionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) : DeletionPackage.eINSTANCE);
+    CopymovePackageImpl theCopymovePackage = (CopymovePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) instanceof CopymovePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) : CopymovePackage.eINSTANCE);
+    UpdatePackageImpl theUpdatePackage = (UpdatePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) instanceof UpdatePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) : UpdatePackage.eINSTANCE);
+    DefinitionsPackageImpl theDefinitionsPackage = (DefinitionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) instanceof DefinitionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) : DefinitionsPackage.eINSTANCE);
+    CorePackageImpl theCorePackage = (CorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) instanceof CorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) : CorePackage.eINSTANCE);
+    SimpleRulesPackageImpl theSimpleRulesPackage = (SimpleRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) instanceof SimpleRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) : SimpleRulesPackage.eINSTANCE);
+    CompoundRulesPackageImpl theCompoundRulesPackage = (CompoundRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) instanceof CompoundRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) : CompoundRulesPackage.eINSTANCE);
+    EnumsPackageImpl theEnumsPackage = (EnumsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) instanceof EnumsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) : EnumsPackage.eINSTANCE);
+    TermsPackageImpl theTermsPackage = (TermsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) instanceof TermsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) : TermsPackage.eINSTANCE);
+    BuiltInFunctionsPackageImpl theBuiltInFunctionsPackage = (BuiltInFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) instanceof BuiltInFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) : BuiltInFunctionsPackage.eINSTANCE);
+    GtPackageImpl theGtPackage = (GtPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) instanceof GtPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) : GtPackage.eINSTANCE);
+
+    // Create package meta-data objects
+    theCreationPackage.createPackageContents();
+    theEditmodelPackage.createPackageContents();
+    theQueryFunctionsPackage.createPackageContents();
+    theDeletionPackage.createPackageContents();
+    theCopymovePackage.createPackageContents();
+    theUpdatePackage.createPackageContents();
+    theDefinitionsPackage.createPackageContents();
+    theCorePackage.createPackageContents();
+    theSimpleRulesPackage.createPackageContents();
+    theCompoundRulesPackage.createPackageContents();
+    theEnumsPackage.createPackageContents();
+    theTermsPackage.createPackageContents();
+    theBuiltInFunctionsPackage.createPackageContents();
+    theGtPackage.createPackageContents();
+
+    // Initialize created meta-data
+    theCreationPackage.initializePackageContents();
+    theEditmodelPackage.initializePackageContents();
+    theQueryFunctionsPackage.initializePackageContents();
+    theDeletionPackage.initializePackageContents();
+    theCopymovePackage.initializePackageContents();
+    theUpdatePackage.initializePackageContents();
+    theDefinitionsPackage.initializePackageContents();
+    theCorePackage.initializePackageContents();
+    theSimpleRulesPackage.initializePackageContents();
+    theCompoundRulesPackage.initializePackageContents();
+    theEnumsPackage.initializePackageContents();
+    theTermsPackage.initializePackageContents();
+    theBuiltInFunctionsPackage.initializePackageContents();
+    theGtPackage.initializePackageContents();
+
+    // Mark meta-data to indicate it can't be changed
+    theCreationPackage.freeze();
+
+  
+    // Update the registry and return the package
+    EPackage.Registry.INSTANCE.put(CreationPackage.eNS_URI, theCreationPackage);
+    return theCreationPackage;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getRelationshipCreateRule()
+  {
+    return relationshipCreateRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getRelationshipCreateRule_Super()
+  {
+    return (EReference)relationshipCreateRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getRelationshipCreateRule_Sub()
+  {
+    return (EReference)relationshipCreateRuleEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getRelationCreateRule()
+  {
+    return relationCreateRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getRelationCreateRule_Target()
+  {
+    return (EReference)relationCreateRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getRelationCreateRule_Source()
+  {
+    return (EReference)relationCreateRuleEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getElementCreateRule()
+  {
+    return elementCreateRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getElementCreateRule_Type()
+  {
+    return (EReference)elementCreateRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getElementCreateRule_TargetVariable()
+  {
+    return (EReference)elementCreateRuleEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getEntityCreateRule()
+  {
+    return entityCreateRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getEntityCreateRule_Parent()
+  {
+    return (EReference)entityCreateRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getCreateSupertypeOf()
+  {
+    return createSupertypeOfEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getCreateInstanceOf()
+  {
+    return createInstanceOfEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CreationFactory getCreationFactory()
+  {
+    return (CreationFactory)getEFactoryInstance();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isCreated = false;
+
+  /**
+   * Creates the meta-model objects for the package.  This method is
+   * guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void createPackageContents()
+  {
+    if (isCreated) return;
+    isCreated = true;
+
+    // Create classes and their features
+    relationshipCreateRuleEClass = createEClass(RELATIONSHIP_CREATE_RULE);
+    createEReference(relationshipCreateRuleEClass, RELATIONSHIP_CREATE_RULE__SUPER);
+    createEReference(relationshipCreateRuleEClass, RELATIONSHIP_CREATE_RULE__SUB);
+
+    relationCreateRuleEClass = createEClass(RELATION_CREATE_RULE);
+    createEReference(relationCreateRuleEClass, RELATION_CREATE_RULE__TARGET);
+    createEReference(relationCreateRuleEClass, RELATION_CREATE_RULE__SOURCE);
+
+    elementCreateRuleEClass = createEClass(ELEMENT_CREATE_RULE);
+    createEReference(elementCreateRuleEClass, ELEMENT_CREATE_RULE__TYPE);
+    createEReference(elementCreateRuleEClass, ELEMENT_CREATE_RULE__TARGET_VARIABLE);
+
+    entityCreateRuleEClass = createEClass(ENTITY_CREATE_RULE);
+    createEReference(entityCreateRuleEClass, ENTITY_CREATE_RULE__PARENT);
+
+    createSupertypeOfEClass = createEClass(CREATE_SUPERTYPE_OF);
+
+    createInstanceOfEClass = createEClass(CREATE_INSTANCE_OF);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isInitialized = false;
+
+  /**
+   * Complete the initialization of the package and its meta-model.  This
+   * method is guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void initializePackageContents()
+  {
+    if (isInitialized) return;
+    isInitialized = true;
+
+    // Initialize package
+    setName(eNAME);
+    setNsPrefix(eNS_PREFIX);
+    setNsURI(eNS_URI);
+
+    // Obtain other dependent packages
+    SimpleRulesPackage theSimpleRulesPackage = (SimpleRulesPackage)EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI);
+    TermsPackage theTermsPackage = (TermsPackage)EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI);
+
+    // Create type parameters
+
+    // Set bounds for type parameters
+
+    // Add supertypes to classes
+    relationshipCreateRuleEClass.getESuperTypes().add(theSimpleRulesPackage.getModelManipulationRule());
+    relationCreateRuleEClass.getESuperTypes().add(this.getElementCreateRule());
+    elementCreateRuleEClass.getESuperTypes().add(theSimpleRulesPackage.getModelManipulationRule());
+    entityCreateRuleEClass.getESuperTypes().add(this.getElementCreateRule());
+    createSupertypeOfEClass.getESuperTypes().add(this.getRelationshipCreateRule());
+    createInstanceOfEClass.getESuperTypes().add(this.getRelationshipCreateRule());
+
+    // Initialize classes and features; add operations and parameters
+    initEClass(relationshipCreateRuleEClass, RelationshipCreateRule.class, "RelationshipCreateRule", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getRelationshipCreateRule_Super(), theTermsPackage.getTerm(), null, "super", null, 1, 1, RelationshipCreateRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getRelationshipCreateRule_Sub(), theTermsPackage.getTerm(), null, "sub", null, 1, 1, RelationshipCreateRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(relationCreateRuleEClass, RelationCreateRule.class, "RelationCreateRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getRelationCreateRule_Target(), theTermsPackage.getTerm(), null, "target", null, 1, 1, RelationCreateRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getRelationCreateRule_Source(), theTermsPackage.getTerm(), null, "source", null, 1, 1, RelationCreateRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(elementCreateRuleEClass, ElementCreateRule.class, "ElementCreateRule", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getElementCreateRule_Type(), theTermsPackage.getTerm(), null, "type", null, 1, 1, ElementCreateRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getElementCreateRule_TargetVariable(), theTermsPackage.getVariableReference(), null, "targetVariable", null, 1, 1, ElementCreateRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(entityCreateRuleEClass, EntityCreateRule.class, "EntityCreateRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getEntityCreateRule_Parent(), theTermsPackage.getTerm(), null, "parent", null, 1, 1, EntityCreateRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(createSupertypeOfEClass, CreateSupertypeOf.class, "CreateSupertypeOf", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(createInstanceOfEClass, CreateInstanceOf.class, "CreateInstanceOf", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    // Create resource
+    createResource(eNS_URI);
+  }
+
+} //CreationPackageImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/ElementCreateRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/ElementCreateRuleImpl.java
new file mode 100644
index 0000000..83eaa01
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/ElementCreateRuleImpl.java
@@ -0,0 +1,284 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ModelManipulationRuleImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.ElementCreateRule;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Element Create Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.ElementCreateRuleImpl#getType <em>Type</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.ElementCreateRuleImpl#getTargetVariable <em>Target Variable</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class ElementCreateRuleImpl extends ModelManipulationRuleImpl implements ElementCreateRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getType() <em>Type</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getType()
+   * @generated
+   * @ordered
+   */
+  protected Term type;
+
+  /**
+   * The cached value of the '{@link #getTargetVariable() <em>Target Variable</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getTargetVariable()
+   * @generated
+   * @ordered
+   */
+  protected VariableReference targetVariable;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ElementCreateRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CreationPackage.Literals.ELEMENT_CREATE_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getType()
+  {
+    return type;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetType(Term newType, NotificationChain msgs)
+  {
+    Term oldType = type;
+    type = newType;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CreationPackage.ELEMENT_CREATE_RULE__TYPE, oldType, newType);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setType(Term newType)
+  {
+    if (newType != type)
+    {
+      NotificationChain msgs = null;
+      if (type != null)
+        msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CreationPackage.ELEMENT_CREATE_RULE__TYPE, null, msgs);
+      if (newType != null)
+        msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CreationPackage.ELEMENT_CREATE_RULE__TYPE, null, msgs);
+      msgs = basicSetType(newType, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CreationPackage.ELEMENT_CREATE_RULE__TYPE, newType, newType));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public VariableReference getTargetVariable()
+  {
+    return targetVariable;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetTargetVariable(VariableReference newTargetVariable, NotificationChain msgs)
+  {
+    VariableReference oldTargetVariable = targetVariable;
+    targetVariable = newTargetVariable;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CreationPackage.ELEMENT_CREATE_RULE__TARGET_VARIABLE, oldTargetVariable, newTargetVariable);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setTargetVariable(VariableReference newTargetVariable)
+  {
+    if (newTargetVariable != targetVariable)
+    {
+      NotificationChain msgs = null;
+      if (targetVariable != null)
+        msgs = ((InternalEObject)targetVariable).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CreationPackage.ELEMENT_CREATE_RULE__TARGET_VARIABLE, null, msgs);
+      if (newTargetVariable != null)
+        msgs = ((InternalEObject)newTargetVariable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CreationPackage.ELEMENT_CREATE_RULE__TARGET_VARIABLE, null, msgs);
+      msgs = basicSetTargetVariable(newTargetVariable, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CreationPackage.ELEMENT_CREATE_RULE__TARGET_VARIABLE, newTargetVariable, newTargetVariable));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.ELEMENT_CREATE_RULE__TYPE:
+        return basicSetType(null, msgs);
+      case CreationPackage.ELEMENT_CREATE_RULE__TARGET_VARIABLE:
+        return basicSetTargetVariable(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.ELEMENT_CREATE_RULE__TYPE:
+        return getType();
+      case CreationPackage.ELEMENT_CREATE_RULE__TARGET_VARIABLE:
+        return getTargetVariable();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.ELEMENT_CREATE_RULE__TYPE:
+        setType((Term)newValue);
+        return;
+      case CreationPackage.ELEMENT_CREATE_RULE__TARGET_VARIABLE:
+        setTargetVariable((VariableReference)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.ELEMENT_CREATE_RULE__TYPE:
+        setType((Term)null);
+        return;
+      case CreationPackage.ELEMENT_CREATE_RULE__TARGET_VARIABLE:
+        setTargetVariable((VariableReference)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.ELEMENT_CREATE_RULE__TYPE:
+        return type != null;
+      case CreationPackage.ELEMENT_CREATE_RULE__TARGET_VARIABLE:
+        return targetVariable != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //ElementCreateRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/EntityCreateRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/EntityCreateRuleImpl.java
new file mode 100644
index 0000000..7646037
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/EntityCreateRuleImpl.java
@@ -0,0 +1,210 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.EntityCreateRule;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Entity Create Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.EntityCreateRuleImpl#getParent <em>Parent</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class EntityCreateRuleImpl extends ElementCreateRuleImpl implements EntityCreateRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getParent() <em>Parent</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getParent()
+   * @generated
+   * @ordered
+   */
+  protected Term parent;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected EntityCreateRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CreationPackage.Literals.ENTITY_CREATE_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getParent()
+  {
+    return parent;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetParent(Term newParent, NotificationChain msgs)
+  {
+    Term oldParent = parent;
+    parent = newParent;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CreationPackage.ENTITY_CREATE_RULE__PARENT, oldParent, newParent);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setParent(Term newParent)
+  {
+    if (newParent != parent)
+    {
+      NotificationChain msgs = null;
+      if (parent != null)
+        msgs = ((InternalEObject)parent).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CreationPackage.ENTITY_CREATE_RULE__PARENT, null, msgs);
+      if (newParent != null)
+        msgs = ((InternalEObject)newParent).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CreationPackage.ENTITY_CREATE_RULE__PARENT, null, msgs);
+      msgs = basicSetParent(newParent, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CreationPackage.ENTITY_CREATE_RULE__PARENT, newParent, newParent));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.ENTITY_CREATE_RULE__PARENT:
+        return basicSetParent(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.ENTITY_CREATE_RULE__PARENT:
+        return getParent();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.ENTITY_CREATE_RULE__PARENT:
+        setParent((Term)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.ENTITY_CREATE_RULE__PARENT:
+        setParent((Term)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.ENTITY_CREATE_RULE__PARENT:
+        return parent != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //EntityCreateRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/RelationCreateRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/RelationCreateRuleImpl.java
new file mode 100644
index 0000000..19bb38f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/RelationCreateRuleImpl.java
@@ -0,0 +1,281 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Relation Create Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.RelationCreateRuleImpl#getTarget <em>Target</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.RelationCreateRuleImpl#getSource <em>Source</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RelationCreateRuleImpl extends ElementCreateRuleImpl implements RelationCreateRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getTarget() <em>Target</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getTarget()
+   * @generated
+   * @ordered
+   */
+  protected Term target;
+
+  /**
+   * The cached value of the '{@link #getSource() <em>Source</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSource()
+   * @generated
+   * @ordered
+   */
+  protected Term source;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RelationCreateRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CreationPackage.Literals.RELATION_CREATE_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getTarget()
+  {
+    return target;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetTarget(Term newTarget, NotificationChain msgs)
+  {
+    Term oldTarget = target;
+    target = newTarget;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CreationPackage.RELATION_CREATE_RULE__TARGET, oldTarget, newTarget);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setTarget(Term newTarget)
+  {
+    if (newTarget != target)
+    {
+      NotificationChain msgs = null;
+      if (target != null)
+        msgs = ((InternalEObject)target).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CreationPackage.RELATION_CREATE_RULE__TARGET, null, msgs);
+      if (newTarget != null)
+        msgs = ((InternalEObject)newTarget).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CreationPackage.RELATION_CREATE_RULE__TARGET, null, msgs);
+      msgs = basicSetTarget(newTarget, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CreationPackage.RELATION_CREATE_RULE__TARGET, newTarget, newTarget));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getSource()
+  {
+    return source;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetSource(Term newSource, NotificationChain msgs)
+  {
+    Term oldSource = source;
+    source = newSource;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CreationPackage.RELATION_CREATE_RULE__SOURCE, oldSource, newSource);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setSource(Term newSource)
+  {
+    if (newSource != source)
+    {
+      NotificationChain msgs = null;
+      if (source != null)
+        msgs = ((InternalEObject)source).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CreationPackage.RELATION_CREATE_RULE__SOURCE, null, msgs);
+      if (newSource != null)
+        msgs = ((InternalEObject)newSource).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CreationPackage.RELATION_CREATE_RULE__SOURCE, null, msgs);
+      msgs = basicSetSource(newSource, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CreationPackage.RELATION_CREATE_RULE__SOURCE, newSource, newSource));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.RELATION_CREATE_RULE__TARGET:
+        return basicSetTarget(null, msgs);
+      case CreationPackage.RELATION_CREATE_RULE__SOURCE:
+        return basicSetSource(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.RELATION_CREATE_RULE__TARGET:
+        return getTarget();
+      case CreationPackage.RELATION_CREATE_RULE__SOURCE:
+        return getSource();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.RELATION_CREATE_RULE__TARGET:
+        setTarget((Term)newValue);
+        return;
+      case CreationPackage.RELATION_CREATE_RULE__SOURCE:
+        setSource((Term)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.RELATION_CREATE_RULE__TARGET:
+        setTarget((Term)null);
+        return;
+      case CreationPackage.RELATION_CREATE_RULE__SOURCE:
+        setSource((Term)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.RELATION_CREATE_RULE__TARGET:
+        return target != null;
+      case CreationPackage.RELATION_CREATE_RULE__SOURCE:
+        return source != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //RelationCreateRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/RelationshipCreateRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/RelationshipCreateRuleImpl.java
new file mode 100644
index 0000000..8aa852f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/impl/RelationshipCreateRuleImpl.java
@@ -0,0 +1,283 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ModelManipulationRuleImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationshipCreateRule;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Relationship Create Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.RelationshipCreateRuleImpl#getSuper <em>Super</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.RelationshipCreateRuleImpl#getSub <em>Sub</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class RelationshipCreateRuleImpl extends ModelManipulationRuleImpl implements RelationshipCreateRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getSuper() <em>Super</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSuper()
+   * @generated
+   * @ordered
+   */
+  protected Term super_;
+
+  /**
+   * The cached value of the '{@link #getSub() <em>Sub</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSub()
+   * @generated
+   * @ordered
+   */
+  protected Term sub;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RelationshipCreateRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return CreationPackage.Literals.RELATIONSHIP_CREATE_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getSuper()
+  {
+    return super_;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetSuper(Term newSuper, NotificationChain msgs)
+  {
+    Term oldSuper = super_;
+    super_ = newSuper;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CreationPackage.RELATIONSHIP_CREATE_RULE__SUPER, oldSuper, newSuper);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setSuper(Term newSuper)
+  {
+    if (newSuper != super_)
+    {
+      NotificationChain msgs = null;
+      if (super_ != null)
+        msgs = ((InternalEObject)super_).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CreationPackage.RELATIONSHIP_CREATE_RULE__SUPER, null, msgs);
+      if (newSuper != null)
+        msgs = ((InternalEObject)newSuper).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CreationPackage.RELATIONSHIP_CREATE_RULE__SUPER, null, msgs);
+      msgs = basicSetSuper(newSuper, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CreationPackage.RELATIONSHIP_CREATE_RULE__SUPER, newSuper, newSuper));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getSub()
+  {
+    return sub;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetSub(Term newSub, NotificationChain msgs)
+  {
+    Term oldSub = sub;
+    sub = newSub;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CreationPackage.RELATIONSHIP_CREATE_RULE__SUB, oldSub, newSub);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setSub(Term newSub)
+  {
+    if (newSub != sub)
+    {
+      NotificationChain msgs = null;
+      if (sub != null)
+        msgs = ((InternalEObject)sub).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CreationPackage.RELATIONSHIP_CREATE_RULE__SUB, null, msgs);
+      if (newSub != null)
+        msgs = ((InternalEObject)newSub).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CreationPackage.RELATIONSHIP_CREATE_RULE__SUB, null, msgs);
+      msgs = basicSetSub(newSub, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, CreationPackage.RELATIONSHIP_CREATE_RULE__SUB, newSub, newSub));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.RELATIONSHIP_CREATE_RULE__SUPER:
+        return basicSetSuper(null, msgs);
+      case CreationPackage.RELATIONSHIP_CREATE_RULE__SUB:
+        return basicSetSub(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.RELATIONSHIP_CREATE_RULE__SUPER:
+        return getSuper();
+      case CreationPackage.RELATIONSHIP_CREATE_RULE__SUB:
+        return getSub();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.RELATIONSHIP_CREATE_RULE__SUPER:
+        setSuper((Term)newValue);
+        return;
+      case CreationPackage.RELATIONSHIP_CREATE_RULE__SUB:
+        setSub((Term)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.RELATIONSHIP_CREATE_RULE__SUPER:
+        setSuper((Term)null);
+        return;
+      case CreationPackage.RELATIONSHIP_CREATE_RULE__SUB:
+        setSub((Term)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case CreationPackage.RELATIONSHIP_CREATE_RULE__SUPER:
+        return super_ != null;
+      case CreationPackage.RELATIONSHIP_CREATE_RULE__SUB:
+        return sub != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //RelationshipCreateRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/util/CreationAdapterFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/util/CreationAdapterFactory.java
new file mode 100644
index 0000000..cae20a1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/util/CreationAdapterFactory.java
@@ -0,0 +1,334 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage
+ * @generated
+ */
+public class CreationAdapterFactory extends AdapterFactoryImpl
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static CreationPackage modelPackage;
+
+  /**
+   * Creates an instance of the adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CreationAdapterFactory()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = CreationPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Returns whether this factory is applicable for the type of the object.
+   * <!-- begin-user-doc -->
+   * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+   * <!-- end-user-doc -->
+   * @return whether this factory is applicable for the type of the object.
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object object)
+  {
+    if (object == modelPackage)
+    {
+      return true;
+    }
+    if (object instanceof EObject)
+    {
+      return ((EObject)object).eClass().getEPackage() == modelPackage;
+    }
+    return false;
+  }
+
+  /**
+   * The switch that delegates to the <code>createXXX</code> methods.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected CreationSwitch<Adapter> modelSwitch =
+    new CreationSwitch<Adapter>()
+    {
+      @Override
+      public Adapter caseRelationshipCreateRule(RelationshipCreateRule object)
+      {
+        return createRelationshipCreateRuleAdapter();
+      }
+      @Override
+      public Adapter caseRelationCreateRule(RelationCreateRule object)
+      {
+        return createRelationCreateRuleAdapter();
+      }
+      @Override
+      public Adapter caseElementCreateRule(ElementCreateRule object)
+      {
+        return createElementCreateRuleAdapter();
+      }
+      @Override
+      public Adapter caseEntityCreateRule(EntityCreateRule object)
+      {
+        return createEntityCreateRuleAdapter();
+      }
+      @Override
+      public Adapter caseCreateSupertypeOf(CreateSupertypeOf object)
+      {
+        return createCreateSupertypeOfAdapter();
+      }
+      @Override
+      public Adapter caseCreateInstanceOf(CreateInstanceOf object)
+      {
+        return createCreateInstanceOfAdapter();
+      }
+      @Override
+      public Adapter caseAnnotatedElement(AnnotatedElement object)
+      {
+        return createAnnotatedElementAdapter();
+      }
+      @Override
+      public Adapter caseGTASMElement(GTASMElement object)
+      {
+        return createGTASMElementAdapter();
+      }
+      @Override
+      public Adapter caseASMRuleInvocation(ASMRuleInvocation object)
+      {
+        return createASMRuleInvocationAdapter();
+      }
+      @Override
+      public Adapter caseModelManipulationRule(ModelManipulationRule object)
+      {
+        return createModelManipulationRuleAdapter();
+      }
+      @Override
+      public Adapter defaultCase(EObject object)
+      {
+        return createEObjectAdapter();
+      }
+    };
+
+  /**
+   * Creates an adapter for the <code>target</code>.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param target the object to adapt.
+   * @return the adapter for the <code>target</code>.
+   * @generated
+   */
+  @Override
+  public Adapter createAdapter(Notifier target)
+  {
+    return modelSwitch.doSwitch((EObject)target);
+  }
+
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationshipCreateRule <em>Relationship Create Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationshipCreateRule
+   * @generated
+   */
+  public Adapter createRelationshipCreateRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule <em>Relation Create Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule
+   * @generated
+   */
+  public Adapter createRelationCreateRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.ElementCreateRule <em>Element Create Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.ElementCreateRule
+   * @generated
+   */
+  public Adapter createElementCreateRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.EntityCreateRule <em>Entity Create Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.EntityCreateRule
+   * @generated
+   */
+  public Adapter createEntityCreateRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateSupertypeOf <em>Create Supertype Of</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateSupertypeOf
+   * @generated
+   */
+  public Adapter createCreateSupertypeOfAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateInstanceOf <em>Create Instance Of</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateInstanceOf
+   * @generated
+   */
+  public Adapter createCreateInstanceOfAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement <em>Annotated Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement
+   * @generated
+   */
+  public Adapter createAnnotatedElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement <em>GTASM Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement
+   * @generated
+   */
+  public Adapter createGTASMElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation <em>ASM Rule Invocation</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation
+   * @generated
+   */
+  public Adapter createASMRuleInvocationAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule <em>Model Manipulation Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule
+   * @generated
+   */
+  public Adapter createModelManipulationRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for the default case.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @generated
+   */
+  public Adapter createEObjectAdapter()
+  {
+    return null;
+  }
+
+} //CreationAdapterFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/util/CreationSwitch.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/util/CreationSwitch.java
new file mode 100644
index 0000000..826fdb6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/creation/util/CreationSwitch.java
@@ -0,0 +1,367 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage
+ * @generated
+ */
+public class CreationSwitch<T>
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static CreationPackage modelPackage;
+
+  /**
+   * Creates an instance of the switch.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public CreationSwitch()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = CreationPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  public T doSwitch(EObject theEObject)
+  {
+    return doSwitch(theEObject.eClass(), theEObject);
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(EClass theEClass, EObject theEObject)
+  {
+    if (theEClass.eContainer() == modelPackage)
+    {
+      return doSwitch(theEClass.getClassifierID(), theEObject);
+    }
+    else
+    {
+      List<EClass> eSuperTypes = theEClass.getESuperTypes();
+      return
+        eSuperTypes.isEmpty() ?
+          defaultCase(theEObject) :
+          doSwitch(eSuperTypes.get(0), theEObject);
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(int classifierID, EObject theEObject)
+  {
+    switch (classifierID)
+    {
+      case CreationPackage.RELATIONSHIP_CREATE_RULE:
+      {
+        RelationshipCreateRule relationshipCreateRule = (RelationshipCreateRule)theEObject;
+        T result = caseRelationshipCreateRule(relationshipCreateRule);
+        if (result == null) result = caseModelManipulationRule(relationshipCreateRule);
+        if (result == null) result = caseASMRuleInvocation(relationshipCreateRule);
+        if (result == null) result = caseGTASMElement(relationshipCreateRule);
+        if (result == null) result = caseAnnotatedElement(relationshipCreateRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CreationPackage.RELATION_CREATE_RULE:
+      {
+        RelationCreateRule relationCreateRule = (RelationCreateRule)theEObject;
+        T result = caseRelationCreateRule(relationCreateRule);
+        if (result == null) result = caseElementCreateRule(relationCreateRule);
+        if (result == null) result = caseModelManipulationRule(relationCreateRule);
+        if (result == null) result = caseASMRuleInvocation(relationCreateRule);
+        if (result == null) result = caseGTASMElement(relationCreateRule);
+        if (result == null) result = caseAnnotatedElement(relationCreateRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CreationPackage.ELEMENT_CREATE_RULE:
+      {
+        ElementCreateRule elementCreateRule = (ElementCreateRule)theEObject;
+        T result = caseElementCreateRule(elementCreateRule);
+        if (result == null) result = caseModelManipulationRule(elementCreateRule);
+        if (result == null) result = caseASMRuleInvocation(elementCreateRule);
+        if (result == null) result = caseGTASMElement(elementCreateRule);
+        if (result == null) result = caseAnnotatedElement(elementCreateRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CreationPackage.ENTITY_CREATE_RULE:
+      {
+        EntityCreateRule entityCreateRule = (EntityCreateRule)theEObject;
+        T result = caseEntityCreateRule(entityCreateRule);
+        if (result == null) result = caseElementCreateRule(entityCreateRule);
+        if (result == null) result = caseModelManipulationRule(entityCreateRule);
+        if (result == null) result = caseASMRuleInvocation(entityCreateRule);
+        if (result == null) result = caseGTASMElement(entityCreateRule);
+        if (result == null) result = caseAnnotatedElement(entityCreateRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CreationPackage.CREATE_SUPERTYPE_OF:
+      {
+        CreateSupertypeOf createSupertypeOf = (CreateSupertypeOf)theEObject;
+        T result = caseCreateSupertypeOf(createSupertypeOf);
+        if (result == null) result = caseRelationshipCreateRule(createSupertypeOf);
+        if (result == null) result = caseModelManipulationRule(createSupertypeOf);
+        if (result == null) result = caseASMRuleInvocation(createSupertypeOf);
+        if (result == null) result = caseGTASMElement(createSupertypeOf);
+        if (result == null) result = caseAnnotatedElement(createSupertypeOf);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case CreationPackage.CREATE_INSTANCE_OF:
+      {
+        CreateInstanceOf createInstanceOf = (CreateInstanceOf)theEObject;
+        T result = caseCreateInstanceOf(createInstanceOf);
+        if (result == null) result = caseRelationshipCreateRule(createInstanceOf);
+        if (result == null) result = caseModelManipulationRule(createInstanceOf);
+        if (result == null) result = caseASMRuleInvocation(createInstanceOf);
+        if (result == null) result = caseGTASMElement(createInstanceOf);
+        if (result == null) result = caseAnnotatedElement(createInstanceOf);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      default: return defaultCase(theEObject);
+    }
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Relationship Create Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Relationship Create Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseRelationshipCreateRule(RelationshipCreateRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Relation Create Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Relation Create Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseRelationCreateRule(RelationCreateRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Element Create Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Element Create Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseElementCreateRule(ElementCreateRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Entity Create Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Entity Create Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseEntityCreateRule(EntityCreateRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Create Supertype Of</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Create Supertype Of</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseCreateSupertypeOf(CreateSupertypeOf object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Create Instance Of</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Create Instance Of</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseCreateInstanceOf(CreateInstanceOf object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseAnnotatedElement(AnnotatedElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGTASMElement(GTASMElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>ASM Rule Invocation</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>ASM Rule Invocation</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseASMRuleInvocation(ASMRuleInvocation object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Model Manipulation Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Model Manipulation Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseModelManipulationRule(ModelManipulationRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch, but this is the last case anyway.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+   * @generated
+   */
+  public T defaultCase(EObject object)
+  {
+    return null;
+  }
+
+} //CreationSwitch
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/DeleteInstanceOf.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/DeleteInstanceOf.java
new file mode 100644
index 0000000..45065ef
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/DeleteInstanceOf.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Delete Instance Of</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage#getDeleteInstanceOf()
+ * @model
+ * @generated
+ */
+public interface DeleteInstanceOf extends RelationshipDeleteRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // DeleteInstanceOf
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/DeleteSupertypeOf.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/DeleteSupertypeOf.java
new file mode 100644
index 0000000..1651ab3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/DeleteSupertypeOf.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Delete Supertype Of</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage#getDeleteSupertypeOf()
+ * @model
+ * @generated
+ */
+public interface DeleteSupertypeOf extends RelationshipDeleteRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // DeleteSupertypeOf
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/DeletionFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/DeletionFactory.java
new file mode 100644
index 0000000..9b39d01
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/DeletionFactory.java
@@ -0,0 +1,77 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage
+ * @generated
+ */
+public interface DeletionFactory extends EFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The singleton instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  DeletionFactory eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionFactoryImpl.init();
+
+  /**
+   * Returns a new object of class '<em>Element Delete Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Element Delete Rule</em>'.
+   * @generated
+   */
+  ElementDeleteRule createElementDeleteRule();
+
+  /**
+   * Returns a new object of class '<em>Delete Instance Of</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Delete Instance Of</em>'.
+   * @generated
+   */
+  DeleteInstanceOf createDeleteInstanceOf();
+
+  /**
+   * Returns a new object of class '<em>Delete Supertype Of</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Delete Supertype Of</em>'.
+   * @generated
+   */
+  DeleteSupertypeOf createDeleteSupertypeOf();
+
+  /**
+   * Returns the package supported by this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the package supported by this factory.
+   * @generated
+   */
+  DeletionPackage getDeletionPackage();
+
+} //DeletionFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/DeletionPackage.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/DeletionPackage.java
new file mode 100644
index 0000000..5782afb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/DeletionPackage.java
@@ -0,0 +1,659 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ *   <li>each class,</li>
+ *   <li>each feature of each class,</li>
+ *   <li>each enum,</li>
+ *   <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface DeletionPackage extends EPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The package name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNAME = "deletion";
+
+  /**
+   * The package namespace URI.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_URI = "http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion.ecore";
+
+  /**
+   * The package namespace name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_PREFIX = "viatragtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion";
+
+  /**
+   * The singleton instance of the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  DeletionPackage eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl.init();
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.RelationshipDeleteRuleImpl <em>Relationship Delete Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.RelationshipDeleteRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl#getRelationshipDeleteRule()
+   * @generated
+   */
+  int RELATIONSHIP_DELETE_RULE = 0;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_DELETE_RULE__ANNOTATIONS = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_DELETE_RULE__NAME = SimpleRulesPackage.MODEL_MANIPULATION_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_DELETE_RULE__ID = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_DELETE_RULE__FQN = SimpleRulesPackage.MODEL_MANIPULATION_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_DELETE_RULE__RUNTIME_ANNOTATIONS = SimpleRulesPackage.MODEL_MANIPULATION_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_DELETE_RULE__CALLER = SimpleRulesPackage.MODEL_MANIPULATION_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_DELETE_RULE__ASM_RULE = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Super</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_DELETE_RULE__SUPER = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Sub</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_DELETE_RULE__SUB = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Relationship Delete Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_DELETE_RULE_FEATURE_COUNT = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.ElementDeleteRuleImpl <em>Element Delete Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.ElementDeleteRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl#getElementDeleteRule()
+   * @generated
+   */
+  int ELEMENT_DELETE_RULE = 1;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_DELETE_RULE__ANNOTATIONS = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_DELETE_RULE__NAME = SimpleRulesPackage.MODEL_MANIPULATION_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_DELETE_RULE__ID = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_DELETE_RULE__FQN = SimpleRulesPackage.MODEL_MANIPULATION_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_DELETE_RULE__RUNTIME_ANNOTATIONS = SimpleRulesPackage.MODEL_MANIPULATION_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_DELETE_RULE__CALLER = SimpleRulesPackage.MODEL_MANIPULATION_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_DELETE_RULE__ASM_RULE = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Element</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_DELETE_RULE__ELEMENT = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Semantics</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_DELETE_RULE__SEMANTICS = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Element Delete Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_DELETE_RULE_FEATURE_COUNT = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeleteInstanceOfImpl <em>Delete Instance Of</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeleteInstanceOfImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl#getDeleteInstanceOf()
+   * @generated
+   */
+  int DELETE_INSTANCE_OF = 2;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_INSTANCE_OF__ANNOTATIONS = RELATIONSHIP_DELETE_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_INSTANCE_OF__NAME = RELATIONSHIP_DELETE_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_INSTANCE_OF__ID = RELATIONSHIP_DELETE_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_INSTANCE_OF__FQN = RELATIONSHIP_DELETE_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_INSTANCE_OF__RUNTIME_ANNOTATIONS = RELATIONSHIP_DELETE_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_INSTANCE_OF__CALLER = RELATIONSHIP_DELETE_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_INSTANCE_OF__ASM_RULE = RELATIONSHIP_DELETE_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Super</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_INSTANCE_OF__SUPER = RELATIONSHIP_DELETE_RULE__SUPER;
+
+  /**
+   * The feature id for the '<em><b>Sub</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_INSTANCE_OF__SUB = RELATIONSHIP_DELETE_RULE__SUB;
+
+  /**
+   * The number of structural features of the '<em>Delete Instance Of</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_INSTANCE_OF_FEATURE_COUNT = RELATIONSHIP_DELETE_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeleteSupertypeOfImpl <em>Delete Supertype Of</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeleteSupertypeOfImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl#getDeleteSupertypeOf()
+   * @generated
+   */
+  int DELETE_SUPERTYPE_OF = 3;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_SUPERTYPE_OF__ANNOTATIONS = RELATIONSHIP_DELETE_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_SUPERTYPE_OF__NAME = RELATIONSHIP_DELETE_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_SUPERTYPE_OF__ID = RELATIONSHIP_DELETE_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_SUPERTYPE_OF__FQN = RELATIONSHIP_DELETE_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_SUPERTYPE_OF__RUNTIME_ANNOTATIONS = RELATIONSHIP_DELETE_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_SUPERTYPE_OF__CALLER = RELATIONSHIP_DELETE_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_SUPERTYPE_OF__ASM_RULE = RELATIONSHIP_DELETE_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Super</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_SUPERTYPE_OF__SUPER = RELATIONSHIP_DELETE_RULE__SUPER;
+
+  /**
+   * The feature id for the '<em><b>Sub</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_SUPERTYPE_OF__SUB = RELATIONSHIP_DELETE_RULE__SUB;
+
+  /**
+   * The number of structural features of the '<em>Delete Supertype Of</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int DELETE_SUPERTYPE_OF_FEATURE_COUNT = RELATIONSHIP_DELETE_RULE_FEATURE_COUNT + 0;
+
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.RelationshipDeleteRule <em>Relationship Delete Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Relationship Delete Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.RelationshipDeleteRule
+   * @generated
+   */
+  EClass getRelationshipDeleteRule();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.RelationshipDeleteRule#getSuper <em>Super</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Super</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.RelationshipDeleteRule#getSuper()
+   * @see #getRelationshipDeleteRule()
+   * @generated
+   */
+  EReference getRelationshipDeleteRule_Super();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.RelationshipDeleteRule#getSub <em>Sub</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Sub</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.RelationshipDeleteRule#getSub()
+   * @see #getRelationshipDeleteRule()
+   * @generated
+   */
+  EReference getRelationshipDeleteRule_Sub();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule <em>Element Delete Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Element Delete Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule
+   * @generated
+   */
+  EClass getElementDeleteRule();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule#getElement <em>Element</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Element</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule#getElement()
+   * @see #getElementDeleteRule()
+   * @generated
+   */
+  EReference getElementDeleteRule_Element();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule#getSemantics <em>Semantics</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Semantics</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule#getSemantics()
+   * @see #getElementDeleteRule()
+   * @generated
+   */
+  EAttribute getElementDeleteRule_Semantics();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteInstanceOf <em>Delete Instance Of</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Delete Instance Of</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteInstanceOf
+   * @generated
+   */
+  EClass getDeleteInstanceOf();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteSupertypeOf <em>Delete Supertype Of</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Delete Supertype Of</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteSupertypeOf
+   * @generated
+   */
+  EClass getDeleteSupertypeOf();
+
+  /**
+   * Returns the factory that creates the instances of the model.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the factory that creates the instances of the model.
+   * @generated
+   */
+  DeletionFactory getDeletionFactory();
+
+  /**
+   * <!-- begin-user-doc -->
+   * Defines literals for the meta objects that represent
+   * <ul>
+   *   <li>each class,</li>
+   *   <li>each feature of each class,</li>
+   *   <li>each enum,</li>
+   *   <li>and each data type</li>
+   * </ul>
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  interface Literals
+  {
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.RelationshipDeleteRuleImpl <em>Relationship Delete Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.RelationshipDeleteRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl#getRelationshipDeleteRule()
+     * @generated
+     */
+    EClass RELATIONSHIP_DELETE_RULE = eINSTANCE.getRelationshipDeleteRule();
+
+    /**
+     * The meta object literal for the '<em><b>Super</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference RELATIONSHIP_DELETE_RULE__SUPER = eINSTANCE.getRelationshipDeleteRule_Super();
+
+    /**
+     * The meta object literal for the '<em><b>Sub</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference RELATIONSHIP_DELETE_RULE__SUB = eINSTANCE.getRelationshipDeleteRule_Sub();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.ElementDeleteRuleImpl <em>Element Delete Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.ElementDeleteRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl#getElementDeleteRule()
+     * @generated
+     */
+    EClass ELEMENT_DELETE_RULE = eINSTANCE.getElementDeleteRule();
+
+    /**
+     * The meta object literal for the '<em><b>Element</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference ELEMENT_DELETE_RULE__ELEMENT = eINSTANCE.getElementDeleteRule_Element();
+
+    /**
+     * The meta object literal for the '<em><b>Semantics</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute ELEMENT_DELETE_RULE__SEMANTICS = eINSTANCE.getElementDeleteRule_Semantics();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeleteInstanceOfImpl <em>Delete Instance Of</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeleteInstanceOfImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl#getDeleteInstanceOf()
+     * @generated
+     */
+    EClass DELETE_INSTANCE_OF = eINSTANCE.getDeleteInstanceOf();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeleteSupertypeOfImpl <em>Delete Supertype Of</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeleteSupertypeOfImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl#getDeleteSupertypeOf()
+     * @generated
+     */
+    EClass DELETE_SUPERTYPE_OF = eINSTANCE.getDeleteSupertypeOf();
+
+  }
+
+} //DeletionPackage
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/ElementDeleteRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/ElementDeleteRule.java
new file mode 100644
index 0000000..d5c2a6a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/ElementDeleteRule.java
@@ -0,0 +1,102 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DeleteSemantics;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Element Delete Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule#getElement <em>Element</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule#getSemantics <em>Semantics</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage#getElementDeleteRule()
+ * @model
+ * @generated
+ */
+public interface ElementDeleteRule extends ModelManipulationRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Element</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Element</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Element</em>' containment reference.
+   * @see #setElement(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage#getElementDeleteRule_Element()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getElement();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule#getElement <em>Element</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Element</em>' containment reference.
+   * @see #getElement()
+   * @generated
+   */
+  void setElement(Term value);
+
+  /**
+   * Returns the value of the '<em><b>Semantics</b></em>' attribute.
+   * The default value is <code>"dropContent"</code>.
+   * The literals are from the enumeration {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DeleteSemantics}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Semantics</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Semantics</em>' attribute.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DeleteSemantics
+   * @see #setSemantics(DeleteSemantics)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage#getElementDeleteRule_Semantics()
+   * @model default="dropContent" required="true" ordered="false"
+   * @generated
+   */
+  DeleteSemantics getSemantics();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule#getSemantics <em>Semantics</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Semantics</em>' attribute.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DeleteSemantics
+   * @see #getSemantics()
+   * @generated
+   */
+  void setSemantics(DeleteSemantics value);
+
+} // ElementDeleteRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/RelationshipDeleteRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/RelationshipDeleteRule.java
new file mode 100644
index 0000000..9595a98
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/RelationshipDeleteRule.java
@@ -0,0 +1,96 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Relationship Delete Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.RelationshipDeleteRule#getSuper <em>Super</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.RelationshipDeleteRule#getSub <em>Sub</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage#getRelationshipDeleteRule()
+ * @model abstract="true"
+ * @generated
+ */
+public interface RelationshipDeleteRule extends ModelManipulationRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Super</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Super</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Super</em>' containment reference.
+   * @see #setSuper(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage#getRelationshipDeleteRule_Super()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getSuper();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.RelationshipDeleteRule#getSuper <em>Super</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Super</em>' containment reference.
+   * @see #getSuper()
+   * @generated
+   */
+  void setSuper(Term value);
+
+  /**
+   * Returns the value of the '<em><b>Sub</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Sub</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Sub</em>' containment reference.
+   * @see #setSub(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage#getRelationshipDeleteRule_Sub()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getSub();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.RelationshipDeleteRule#getSub <em>Sub</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Sub</em>' containment reference.
+   * @see #getSub()
+   * @generated
+   */
+  void setSub(Term value);
+
+} // RelationshipDeleteRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/impl/DeleteInstanceOfImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/impl/DeleteInstanceOfImpl.java
new file mode 100644
index 0000000..fb5aeb3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/impl/DeleteInstanceOfImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteInstanceOf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Delete Instance Of</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class DeleteInstanceOfImpl extends RelationshipDeleteRuleImpl implements DeleteInstanceOf
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected DeleteInstanceOfImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return DeletionPackage.Literals.DELETE_INSTANCE_OF;
+  }
+
+} //DeleteInstanceOfImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/impl/DeleteSupertypeOfImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/impl/DeleteSupertypeOfImpl.java
new file mode 100644
index 0000000..0829c19
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/impl/DeleteSupertypeOfImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteSupertypeOf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Delete Supertype Of</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class DeleteSupertypeOfImpl extends RelationshipDeleteRuleImpl implements DeleteSupertypeOf
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected DeleteSupertypeOfImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return DeletionPackage.Literals.DELETE_SUPERTYPE_OF;
+  }
+
+} //DeleteSupertypeOfImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/impl/DeletionFactoryImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/impl/DeletionFactoryImpl.java
new file mode 100644
index 0000000..e1a6d07
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/impl/DeletionFactoryImpl.java
@@ -0,0 +1,146 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DeletionFactoryImpl extends EFactoryImpl implements DeletionFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Creates the default factory implementation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static DeletionFactory init()
+  {
+    try
+    {
+      DeletionFactory theDeletionFactory = (DeletionFactory)EPackage.Registry.INSTANCE.getEFactory("http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion.ecore"); 
+      if (theDeletionFactory != null)
+      {
+        return theDeletionFactory;
+      }
+    }
+    catch (Exception exception)
+    {
+      EcorePlugin.INSTANCE.log(exception);
+    }
+    return new DeletionFactoryImpl();
+  }
+
+  /**
+   * Creates an instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DeletionFactoryImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public EObject create(EClass eClass)
+  {
+    switch (eClass.getClassifierID())
+    {
+      case DeletionPackage.ELEMENT_DELETE_RULE: return createElementDeleteRule();
+      case DeletionPackage.DELETE_INSTANCE_OF: return createDeleteInstanceOf();
+      case DeletionPackage.DELETE_SUPERTYPE_OF: return createDeleteSupertypeOf();
+      default:
+        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+    }
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ElementDeleteRule createElementDeleteRule()
+  {
+    ElementDeleteRuleImpl elementDeleteRule = new ElementDeleteRuleImpl();
+    return elementDeleteRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DeleteInstanceOf createDeleteInstanceOf()
+  {
+    DeleteInstanceOfImpl deleteInstanceOf = new DeleteInstanceOfImpl();
+    return deleteInstanceOf;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DeleteSupertypeOf createDeleteSupertypeOf()
+  {
+    DeleteSupertypeOfImpl deleteSupertypeOf = new DeleteSupertypeOfImpl();
+    return deleteSupertypeOf;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DeletionPackage getDeletionPackage()
+  {
+    return (DeletionPackage)getEPackage();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @deprecated
+   * @generated
+   */
+  @Deprecated
+  public static DeletionPackage getPackage()
+  {
+    return DeletionPackage.eINSTANCE;
+  }
+
+} //DeletionFactoryImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/impl/DeletionPackageImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/impl/DeletionPackageImpl.java
new file mode 100644
index 0000000..7013632
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/impl/DeletionPackageImpl.java
@@ -0,0 +1,406 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymovePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteInstanceOf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteSupertypeOf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.RelationshipDeleteRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DeletionPackageImpl extends EPackageImpl implements DeletionPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass relationshipDeleteRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass elementDeleteRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass deleteInstanceOfEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass deleteSupertypeOfEClass = null;
+
+  /**
+   * Creates an instance of the model <b>Package</b>, registered with
+   * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+   * package URI value.
+   * <p>Note: the correct way to create the package is via the static
+   * factory method {@link #init init()}, which also performs
+   * initialization of the package, or returns the registered package,
+   * if one already exists.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.emf.ecore.EPackage.Registry
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage#eNS_URI
+   * @see #init()
+   * @generated
+   */
+  private DeletionPackageImpl()
+  {
+    super(eNS_URI, DeletionFactory.eINSTANCE);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static boolean isInited = false;
+
+  /**
+   * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+   * 
+   * <p>This method is used to initialize {@link DeletionPackage#eINSTANCE} when that field is accessed.
+   * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #eNS_URI
+   * @see #createPackageContents()
+   * @see #initializePackageContents()
+   * @generated
+   */
+  public static DeletionPackage init()
+  {
+    if (isInited) return (DeletionPackage)EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI);
+
+    // Obtain or create and register package
+    DeletionPackageImpl theDeletionPackage = (DeletionPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof DeletionPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new DeletionPackageImpl());
+
+    isInited = true;
+
+    // Obtain or create and register interdependencies
+    EditmodelPackageImpl theEditmodelPackage = (EditmodelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) instanceof EditmodelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) : EditmodelPackage.eINSTANCE);
+    QueryFunctionsPackageImpl theQueryFunctionsPackage = (QueryFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) instanceof QueryFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) : QueryFunctionsPackage.eINSTANCE);
+    CreationPackageImpl theCreationPackage = (CreationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) instanceof CreationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) : CreationPackage.eINSTANCE);
+    CopymovePackageImpl theCopymovePackage = (CopymovePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) instanceof CopymovePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) : CopymovePackage.eINSTANCE);
+    UpdatePackageImpl theUpdatePackage = (UpdatePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) instanceof UpdatePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) : UpdatePackage.eINSTANCE);
+    DefinitionsPackageImpl theDefinitionsPackage = (DefinitionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) instanceof DefinitionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) : DefinitionsPackage.eINSTANCE);
+    CorePackageImpl theCorePackage = (CorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) instanceof CorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) : CorePackage.eINSTANCE);
+    SimpleRulesPackageImpl theSimpleRulesPackage = (SimpleRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) instanceof SimpleRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) : SimpleRulesPackage.eINSTANCE);
+    CompoundRulesPackageImpl theCompoundRulesPackage = (CompoundRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) instanceof CompoundRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) : CompoundRulesPackage.eINSTANCE);
+    EnumsPackageImpl theEnumsPackage = (EnumsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) instanceof EnumsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) : EnumsPackage.eINSTANCE);
+    TermsPackageImpl theTermsPackage = (TermsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) instanceof TermsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) : TermsPackage.eINSTANCE);
+    BuiltInFunctionsPackageImpl theBuiltInFunctionsPackage = (BuiltInFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) instanceof BuiltInFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) : BuiltInFunctionsPackage.eINSTANCE);
+    GtPackageImpl theGtPackage = (GtPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) instanceof GtPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) : GtPackage.eINSTANCE);
+
+    // Create package meta-data objects
+    theDeletionPackage.createPackageContents();
+    theEditmodelPackage.createPackageContents();
+    theQueryFunctionsPackage.createPackageContents();
+    theCreationPackage.createPackageContents();
+    theCopymovePackage.createPackageContents();
+    theUpdatePackage.createPackageContents();
+    theDefinitionsPackage.createPackageContents();
+    theCorePackage.createPackageContents();
+    theSimpleRulesPackage.createPackageContents();
+    theCompoundRulesPackage.createPackageContents();
+    theEnumsPackage.createPackageContents();
+    theTermsPackage.createPackageContents();
+    theBuiltInFunctionsPackage.createPackageContents();
+    theGtPackage.createPackageContents();
+
+    // Initialize created meta-data
+    theDeletionPackage.initializePackageContents();
+    theEditmodelPackage.initializePackageContents();
+    theQueryFunctionsPackage.initializePackageContents();
+    theCreationPackage.initializePackageContents();
+    theCopymovePackage.initializePackageContents();
+    theUpdatePackage.initializePackageContents();
+    theDefinitionsPackage.initializePackageContents();
+    theCorePackage.initializePackageContents();
+    theSimpleRulesPackage.initializePackageContents();
+    theCompoundRulesPackage.initializePackageContents();
+    theEnumsPackage.initializePackageContents();
+    theTermsPackage.initializePackageContents();
+    theBuiltInFunctionsPackage.initializePackageContents();
+    theGtPackage.initializePackageContents();
+
+    // Mark meta-data to indicate it can't be changed
+    theDeletionPackage.freeze();
+
+  
+    // Update the registry and return the package
+    EPackage.Registry.INSTANCE.put(DeletionPackage.eNS_URI, theDeletionPackage);
+    return theDeletionPackage;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getRelationshipDeleteRule()
+  {
+    return relationshipDeleteRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getRelationshipDeleteRule_Super()
+  {
+    return (EReference)relationshipDeleteRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getRelationshipDeleteRule_Sub()
+  {
+    return (EReference)relationshipDeleteRuleEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getElementDeleteRule()
+  {
+    return elementDeleteRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getElementDeleteRule_Element()
+  {
+    return (EReference)elementDeleteRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getElementDeleteRule_Semantics()
+  {
+    return (EAttribute)elementDeleteRuleEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getDeleteInstanceOf()
+  {
+    return deleteInstanceOfEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getDeleteSupertypeOf()
+  {
+    return deleteSupertypeOfEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DeletionFactory getDeletionFactory()
+  {
+    return (DeletionFactory)getEFactoryInstance();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isCreated = false;
+
+  /**
+   * Creates the meta-model objects for the package.  This method is
+   * guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void createPackageContents()
+  {
+    if (isCreated) return;
+    isCreated = true;
+
+    // Create classes and their features
+    relationshipDeleteRuleEClass = createEClass(RELATIONSHIP_DELETE_RULE);
+    createEReference(relationshipDeleteRuleEClass, RELATIONSHIP_DELETE_RULE__SUPER);
+    createEReference(relationshipDeleteRuleEClass, RELATIONSHIP_DELETE_RULE__SUB);
+
+    elementDeleteRuleEClass = createEClass(ELEMENT_DELETE_RULE);
+    createEReference(elementDeleteRuleEClass, ELEMENT_DELETE_RULE__ELEMENT);
+    createEAttribute(elementDeleteRuleEClass, ELEMENT_DELETE_RULE__SEMANTICS);
+
+    deleteInstanceOfEClass = createEClass(DELETE_INSTANCE_OF);
+
+    deleteSupertypeOfEClass = createEClass(DELETE_SUPERTYPE_OF);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isInitialized = false;
+
+  /**
+   * Complete the initialization of the package and its meta-model.  This
+   * method is guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void initializePackageContents()
+  {
+    if (isInitialized) return;
+    isInitialized = true;
+
+    // Initialize package
+    setName(eNAME);
+    setNsPrefix(eNS_PREFIX);
+    setNsURI(eNS_URI);
+
+    // Obtain other dependent packages
+    SimpleRulesPackage theSimpleRulesPackage = (SimpleRulesPackage)EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI);
+    TermsPackage theTermsPackage = (TermsPackage)EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI);
+    EnumsPackage theEnumsPackage = (EnumsPackage)EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI);
+
+    // Create type parameters
+
+    // Set bounds for type parameters
+
+    // Add supertypes to classes
+    relationshipDeleteRuleEClass.getESuperTypes().add(theSimpleRulesPackage.getModelManipulationRule());
+    elementDeleteRuleEClass.getESuperTypes().add(theSimpleRulesPackage.getModelManipulationRule());
+    deleteInstanceOfEClass.getESuperTypes().add(this.getRelationshipDeleteRule());
+    deleteSupertypeOfEClass.getESuperTypes().add(this.getRelationshipDeleteRule());
+
+    // Initialize classes and features; add operations and parameters
+    initEClass(relationshipDeleteRuleEClass, RelationshipDeleteRule.class, "RelationshipDeleteRule", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getRelationshipDeleteRule_Super(), theTermsPackage.getTerm(), null, "super", null, 1, 1, RelationshipDeleteRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getRelationshipDeleteRule_Sub(), theTermsPackage.getTerm(), null, "sub", null, 1, 1, RelationshipDeleteRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(elementDeleteRuleEClass, ElementDeleteRule.class, "ElementDeleteRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getElementDeleteRule_Element(), theTermsPackage.getTerm(), null, "element", null, 1, 1, ElementDeleteRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEAttribute(getElementDeleteRule_Semantics(), theEnumsPackage.getDeleteSemantics(), "semantics", "dropContent", 1, 1, ElementDeleteRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(deleteInstanceOfEClass, DeleteInstanceOf.class, "DeleteInstanceOf", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(deleteSupertypeOfEClass, DeleteSupertypeOf.class, "DeleteSupertypeOf", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    // Create resource
+    createResource(eNS_URI);
+  }
+
+} //DeletionPackageImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/impl/ElementDeleteRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/impl/ElementDeleteRuleImpl.java
new file mode 100644
index 0000000..6854d00
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/impl/ElementDeleteRuleImpl.java
@@ -0,0 +1,285 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DeleteSemantics;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ModelManipulationRuleImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Element Delete Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.ElementDeleteRuleImpl#getElement <em>Element</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.ElementDeleteRuleImpl#getSemantics <em>Semantics</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ElementDeleteRuleImpl extends ModelManipulationRuleImpl implements ElementDeleteRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getElement() <em>Element</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getElement()
+   * @generated
+   * @ordered
+   */
+  protected Term element;
+
+  /**
+   * The default value of the '{@link #getSemantics() <em>Semantics</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSemantics()
+   * @generated
+   * @ordered
+   */
+  protected static final DeleteSemantics SEMANTICS_EDEFAULT = DeleteSemantics.DROP_CONTENT_LITERAL;
+
+  /**
+   * The cached value of the '{@link #getSemantics() <em>Semantics</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSemantics()
+   * @generated
+   * @ordered
+   */
+  protected DeleteSemantics semantics = SEMANTICS_EDEFAULT;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ElementDeleteRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return DeletionPackage.Literals.ELEMENT_DELETE_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getElement()
+  {
+    return element;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetElement(Term newElement, NotificationChain msgs)
+  {
+    Term oldElement = element;
+    element = newElement;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DeletionPackage.ELEMENT_DELETE_RULE__ELEMENT, oldElement, newElement);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setElement(Term newElement)
+  {
+    if (newElement != element)
+    {
+      NotificationChain msgs = null;
+      if (element != null)
+        msgs = ((InternalEObject)element).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DeletionPackage.ELEMENT_DELETE_RULE__ELEMENT, null, msgs);
+      if (newElement != null)
+        msgs = ((InternalEObject)newElement).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DeletionPackage.ELEMENT_DELETE_RULE__ELEMENT, null, msgs);
+      msgs = basicSetElement(newElement, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DeletionPackage.ELEMENT_DELETE_RULE__ELEMENT, newElement, newElement));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DeleteSemantics getSemantics()
+  {
+    return semantics;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setSemantics(DeleteSemantics newSemantics)
+  {
+    DeleteSemantics oldSemantics = semantics;
+    semantics = newSemantics == null ? SEMANTICS_EDEFAULT : newSemantics;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DeletionPackage.ELEMENT_DELETE_RULE__SEMANTICS, oldSemantics, semantics));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case DeletionPackage.ELEMENT_DELETE_RULE__ELEMENT:
+        return basicSetElement(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case DeletionPackage.ELEMENT_DELETE_RULE__ELEMENT:
+        return getElement();
+      case DeletionPackage.ELEMENT_DELETE_RULE__SEMANTICS:
+        return getSemantics();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case DeletionPackage.ELEMENT_DELETE_RULE__ELEMENT:
+        setElement((Term)newValue);
+        return;
+      case DeletionPackage.ELEMENT_DELETE_RULE__SEMANTICS:
+        setSemantics((DeleteSemantics)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case DeletionPackage.ELEMENT_DELETE_RULE__ELEMENT:
+        setElement((Term)null);
+        return;
+      case DeletionPackage.ELEMENT_DELETE_RULE__SEMANTICS:
+        setSemantics(SEMANTICS_EDEFAULT);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case DeletionPackage.ELEMENT_DELETE_RULE__ELEMENT:
+        return element != null;
+      case DeletionPackage.ELEMENT_DELETE_RULE__SEMANTICS:
+        return semantics != SEMANTICS_EDEFAULT;
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (semantics: ");
+    result.append(semantics);
+    result.append(')');
+    return result.toString();
+  }
+
+} //ElementDeleteRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/impl/RelationshipDeleteRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/impl/RelationshipDeleteRuleImpl.java
new file mode 100644
index 0000000..c78f708
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/impl/RelationshipDeleteRuleImpl.java
@@ -0,0 +1,283 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ModelManipulationRuleImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.RelationshipDeleteRule;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Relationship Delete Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.RelationshipDeleteRuleImpl#getSuper <em>Super</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.RelationshipDeleteRuleImpl#getSub <em>Sub</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class RelationshipDeleteRuleImpl extends ModelManipulationRuleImpl implements RelationshipDeleteRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getSuper() <em>Super</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSuper()
+   * @generated
+   * @ordered
+   */
+  protected Term super_;
+
+  /**
+   * The cached value of the '{@link #getSub() <em>Sub</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSub()
+   * @generated
+   * @ordered
+   */
+  protected Term sub;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RelationshipDeleteRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return DeletionPackage.Literals.RELATIONSHIP_DELETE_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getSuper()
+  {
+    return super_;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetSuper(Term newSuper, NotificationChain msgs)
+  {
+    Term oldSuper = super_;
+    super_ = newSuper;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DeletionPackage.RELATIONSHIP_DELETE_RULE__SUPER, oldSuper, newSuper);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setSuper(Term newSuper)
+  {
+    if (newSuper != super_)
+    {
+      NotificationChain msgs = null;
+      if (super_ != null)
+        msgs = ((InternalEObject)super_).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DeletionPackage.RELATIONSHIP_DELETE_RULE__SUPER, null, msgs);
+      if (newSuper != null)
+        msgs = ((InternalEObject)newSuper).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DeletionPackage.RELATIONSHIP_DELETE_RULE__SUPER, null, msgs);
+      msgs = basicSetSuper(newSuper, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DeletionPackage.RELATIONSHIP_DELETE_RULE__SUPER, newSuper, newSuper));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getSub()
+  {
+    return sub;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetSub(Term newSub, NotificationChain msgs)
+  {
+    Term oldSub = sub;
+    sub = newSub;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DeletionPackage.RELATIONSHIP_DELETE_RULE__SUB, oldSub, newSub);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setSub(Term newSub)
+  {
+    if (newSub != sub)
+    {
+      NotificationChain msgs = null;
+      if (sub != null)
+        msgs = ((InternalEObject)sub).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DeletionPackage.RELATIONSHIP_DELETE_RULE__SUB, null, msgs);
+      if (newSub != null)
+        msgs = ((InternalEObject)newSub).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DeletionPackage.RELATIONSHIP_DELETE_RULE__SUB, null, msgs);
+      msgs = basicSetSub(newSub, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, DeletionPackage.RELATIONSHIP_DELETE_RULE__SUB, newSub, newSub));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case DeletionPackage.RELATIONSHIP_DELETE_RULE__SUPER:
+        return basicSetSuper(null, msgs);
+      case DeletionPackage.RELATIONSHIP_DELETE_RULE__SUB:
+        return basicSetSub(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case DeletionPackage.RELATIONSHIP_DELETE_RULE__SUPER:
+        return getSuper();
+      case DeletionPackage.RELATIONSHIP_DELETE_RULE__SUB:
+        return getSub();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case DeletionPackage.RELATIONSHIP_DELETE_RULE__SUPER:
+        setSuper((Term)newValue);
+        return;
+      case DeletionPackage.RELATIONSHIP_DELETE_RULE__SUB:
+        setSub((Term)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case DeletionPackage.RELATIONSHIP_DELETE_RULE__SUPER:
+        setSuper((Term)null);
+        return;
+      case DeletionPackage.RELATIONSHIP_DELETE_RULE__SUB:
+        setSub((Term)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case DeletionPackage.RELATIONSHIP_DELETE_RULE__SUPER:
+        return super_ != null;
+      case DeletionPackage.RELATIONSHIP_DELETE_RULE__SUB:
+        return sub != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //RelationshipDeleteRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/util/DeletionAdapterFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/util/DeletionAdapterFactory.java
new file mode 100644
index 0000000..c1dbc7a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/util/DeletionAdapterFactory.java
@@ -0,0 +1,294 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage
+ * @generated
+ */
+public class DeletionAdapterFactory extends AdapterFactoryImpl
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static DeletionPackage modelPackage;
+
+  /**
+   * Creates an instance of the adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DeletionAdapterFactory()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = DeletionPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Returns whether this factory is applicable for the type of the object.
+   * <!-- begin-user-doc -->
+   * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+   * <!-- end-user-doc -->
+   * @return whether this factory is applicable for the type of the object.
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object object)
+  {
+    if (object == modelPackage)
+    {
+      return true;
+    }
+    if (object instanceof EObject)
+    {
+      return ((EObject)object).eClass().getEPackage() == modelPackage;
+    }
+    return false;
+  }
+
+  /**
+   * The switch that delegates to the <code>createXXX</code> methods.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected DeletionSwitch<Adapter> modelSwitch =
+    new DeletionSwitch<Adapter>()
+    {
+      @Override
+      public Adapter caseRelationshipDeleteRule(RelationshipDeleteRule object)
+      {
+        return createRelationshipDeleteRuleAdapter();
+      }
+      @Override
+      public Adapter caseElementDeleteRule(ElementDeleteRule object)
+      {
+        return createElementDeleteRuleAdapter();
+      }
+      @Override
+      public Adapter caseDeleteInstanceOf(DeleteInstanceOf object)
+      {
+        return createDeleteInstanceOfAdapter();
+      }
+      @Override
+      public Adapter caseDeleteSupertypeOf(DeleteSupertypeOf object)
+      {
+        return createDeleteSupertypeOfAdapter();
+      }
+      @Override
+      public Adapter caseAnnotatedElement(AnnotatedElement object)
+      {
+        return createAnnotatedElementAdapter();
+      }
+      @Override
+      public Adapter caseGTASMElement(GTASMElement object)
+      {
+        return createGTASMElementAdapter();
+      }
+      @Override
+      public Adapter caseASMRuleInvocation(ASMRuleInvocation object)
+      {
+        return createASMRuleInvocationAdapter();
+      }
+      @Override
+      public Adapter caseModelManipulationRule(ModelManipulationRule object)
+      {
+        return createModelManipulationRuleAdapter();
+      }
+      @Override
+      public Adapter defaultCase(EObject object)
+      {
+        return createEObjectAdapter();
+      }
+    };
+
+  /**
+   * Creates an adapter for the <code>target</code>.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param target the object to adapt.
+   * @return the adapter for the <code>target</code>.
+   * @generated
+   */
+  @Override
+  public Adapter createAdapter(Notifier target)
+  {
+    return modelSwitch.doSwitch((EObject)target);
+  }
+
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.RelationshipDeleteRule <em>Relationship Delete Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.RelationshipDeleteRule
+   * @generated
+   */
+  public Adapter createRelationshipDeleteRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule <em>Element Delete Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule
+   * @generated
+   */
+  public Adapter createElementDeleteRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteInstanceOf <em>Delete Instance Of</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteInstanceOf
+   * @generated
+   */
+  public Adapter createDeleteInstanceOfAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteSupertypeOf <em>Delete Supertype Of</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteSupertypeOf
+   * @generated
+   */
+  public Adapter createDeleteSupertypeOfAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement <em>Annotated Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement
+   * @generated
+   */
+  public Adapter createAnnotatedElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement <em>GTASM Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement
+   * @generated
+   */
+  public Adapter createGTASMElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation <em>ASM Rule Invocation</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation
+   * @generated
+   */
+  public Adapter createASMRuleInvocationAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule <em>Model Manipulation Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule
+   * @generated
+   */
+  public Adapter createModelManipulationRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for the default case.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @generated
+   */
+  public Adapter createEObjectAdapter()
+  {
+    return null;
+  }
+
+} //DeletionAdapterFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/util/DeletionSwitch.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/util/DeletionSwitch.java
new file mode 100644
index 0000000..ea69c16
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/deletion/util/DeletionSwitch.java
@@ -0,0 +1,311 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage
+ * @generated
+ */
+public class DeletionSwitch<T>
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static DeletionPackage modelPackage;
+
+  /**
+   * Creates an instance of the switch.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public DeletionSwitch()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = DeletionPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  public T doSwitch(EObject theEObject)
+  {
+    return doSwitch(theEObject.eClass(), theEObject);
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(EClass theEClass, EObject theEObject)
+  {
+    if (theEClass.eContainer() == modelPackage)
+    {
+      return doSwitch(theEClass.getClassifierID(), theEObject);
+    }
+    else
+    {
+      List<EClass> eSuperTypes = theEClass.getESuperTypes();
+      return
+        eSuperTypes.isEmpty() ?
+          defaultCase(theEObject) :
+          doSwitch(eSuperTypes.get(0), theEObject);
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(int classifierID, EObject theEObject)
+  {
+    switch (classifierID)
+    {
+      case DeletionPackage.RELATIONSHIP_DELETE_RULE:
+      {
+        RelationshipDeleteRule relationshipDeleteRule = (RelationshipDeleteRule)theEObject;
+        T result = caseRelationshipDeleteRule(relationshipDeleteRule);
+        if (result == null) result = caseModelManipulationRule(relationshipDeleteRule);
+        if (result == null) result = caseASMRuleInvocation(relationshipDeleteRule);
+        if (result == null) result = caseGTASMElement(relationshipDeleteRule);
+        if (result == null) result = caseAnnotatedElement(relationshipDeleteRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case DeletionPackage.ELEMENT_DELETE_RULE:
+      {
+        ElementDeleteRule elementDeleteRule = (ElementDeleteRule)theEObject;
+        T result = caseElementDeleteRule(elementDeleteRule);
+        if (result == null) result = caseModelManipulationRule(elementDeleteRule);
+        if (result == null) result = caseASMRuleInvocation(elementDeleteRule);
+        if (result == null) result = caseGTASMElement(elementDeleteRule);
+        if (result == null) result = caseAnnotatedElement(elementDeleteRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case DeletionPackage.DELETE_INSTANCE_OF:
+      {
+        DeleteInstanceOf deleteInstanceOf = (DeleteInstanceOf)theEObject;
+        T result = caseDeleteInstanceOf(deleteInstanceOf);
+        if (result == null) result = caseRelationshipDeleteRule(deleteInstanceOf);
+        if (result == null) result = caseModelManipulationRule(deleteInstanceOf);
+        if (result == null) result = caseASMRuleInvocation(deleteInstanceOf);
+        if (result == null) result = caseGTASMElement(deleteInstanceOf);
+        if (result == null) result = caseAnnotatedElement(deleteInstanceOf);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case DeletionPackage.DELETE_SUPERTYPE_OF:
+      {
+        DeleteSupertypeOf deleteSupertypeOf = (DeleteSupertypeOf)theEObject;
+        T result = caseDeleteSupertypeOf(deleteSupertypeOf);
+        if (result == null) result = caseRelationshipDeleteRule(deleteSupertypeOf);
+        if (result == null) result = caseModelManipulationRule(deleteSupertypeOf);
+        if (result == null) result = caseASMRuleInvocation(deleteSupertypeOf);
+        if (result == null) result = caseGTASMElement(deleteSupertypeOf);
+        if (result == null) result = caseAnnotatedElement(deleteSupertypeOf);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      default: return defaultCase(theEObject);
+    }
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Relationship Delete Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Relationship Delete Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseRelationshipDeleteRule(RelationshipDeleteRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Element Delete Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Element Delete Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseElementDeleteRule(ElementDeleteRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Delete Instance Of</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Delete Instance Of</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseDeleteInstanceOf(DeleteInstanceOf object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Delete Supertype Of</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Delete Supertype Of</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseDeleteSupertypeOf(DeleteSupertypeOf object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseAnnotatedElement(AnnotatedElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGTASMElement(GTASMElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>ASM Rule Invocation</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>ASM Rule Invocation</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseASMRuleInvocation(ASMRuleInvocation object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Model Manipulation Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Model Manipulation Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseModelManipulationRule(ModelManipulationRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch, but this is the last case anyway.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+   * @generated
+   */
+  public T defaultCase(EObject object)
+  {
+    return null;
+  }
+
+} //DeletionSwitch
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/RenameRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/RenameRule.java
new file mode 100644
index 0000000..e74a09e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/RenameRule.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Rename Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage#getRenameRule()
+ * @model
+ * @generated
+ */
+public interface RenameRule extends SetRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // RenameRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetAggregationRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetAggregationRule.java
new file mode 100644
index 0000000..3fbcaca
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetAggregationRule.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Set Aggregation Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage#getSetAggregationRule()
+ * @model
+ * @generated
+ */
+public interface SetAggregationRule extends SetRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // SetAggregationRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetAnyEndpointRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetAnyEndpointRule.java
new file mode 100644
index 0000000..77c2457
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetAnyEndpointRule.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Set Any Endpoint Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage#getSetAnyEndpointRule()
+ * @model abstract="true"
+ * @generated
+ */
+public interface SetAnyEndpointRule extends SetRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // SetAnyEndpointRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetAnySourceRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetAnySourceRule.java
new file mode 100644
index 0000000..dfebf0c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetAnySourceRule.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Set Any Source Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage#getSetAnySourceRule()
+ * @model
+ * @generated
+ */
+public interface SetAnySourceRule extends SetAnyEndpointRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // SetAnySourceRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetAnyTargetRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetAnyTargetRule.java
new file mode 100644
index 0000000..28b7021
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetAnyTargetRule.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Set Any Target Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage#getSetAnyTargetRule()
+ * @model
+ * @generated
+ */
+public interface SetAnyTargetRule extends SetAnyEndpointRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // SetAnyTargetRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetInverseRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetInverseRule.java
new file mode 100644
index 0000000..10f1a48
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetInverseRule.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Set Inverse Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage#getSetInverseRule()
+ * @model
+ * @generated
+ */
+public interface SetInverseRule extends SetRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // SetInverseRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetMultiplicityRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetMultiplicityRule.java
new file mode 100644
index 0000000..621d2c5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetMultiplicityRule.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Set Multiplicity Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage#getSetMultiplicityRule()
+ * @model
+ * @generated
+ */
+public interface SetMultiplicityRule extends SetRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // SetMultiplicityRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetRelationEndPoint.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetRelationEndPoint.java
new file mode 100644
index 0000000..d5ecdb5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetRelationEndPoint.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Set Relation End Point</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage#getSetRelationEndPoint()
+ * @model abstract="true"
+ * @generated
+ */
+public interface SetRelationEndPoint extends SetRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // SetRelationEndPoint
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetRelationFrom.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetRelationFrom.java
new file mode 100644
index 0000000..ee5d6de
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetRelationFrom.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Set Relation From</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage#getSetRelationFrom()
+ * @model
+ * @generated
+ */
+public interface SetRelationFrom extends SetRelationEndPoint
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // SetRelationFrom
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetRelationTo.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetRelationTo.java
new file mode 100644
index 0000000..f4b6802
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetRelationTo.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Set Relation To</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage#getSetRelationTo()
+ * @model
+ * @generated
+ */
+public interface SetRelationTo extends SetRelationEndPoint
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // SetRelationTo
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetRule.java
new file mode 100644
index 0000000..dce9dda
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetRule.java
@@ -0,0 +1,96 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Set Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRule#getElement <em>Element</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRule#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage#getSetRule()
+ * @model abstract="true"
+ * @generated
+ */
+public interface SetRule extends ModelManipulationRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Element</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Element</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Element</em>' containment reference.
+   * @see #setElement(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage#getSetRule_Element()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getElement();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRule#getElement <em>Element</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Element</em>' containment reference.
+   * @see #getElement()
+   * @generated
+   */
+  void setElement(Term value);
+
+  /**
+   * Returns the value of the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Value</em>' containment reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Value</em>' containment reference.
+   * @see #setValue(Term)
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage#getSetRule_Value()
+   * @model containment="true" required="true" ordered="false"
+   * @generated
+   */
+  Term getValue();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRule#getValue <em>Value</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Value</em>' containment reference.
+   * @see #getValue()
+   * @generated
+   */
+  void setValue(Term value);
+
+} // SetRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetValueRule.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetValueRule.java
new file mode 100644
index 0000000..8babc13
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/SetValueRule.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Set Value Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage#getSetValueRule()
+ * @model
+ * @generated
+ */
+public interface SetValueRule extends SetRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // SetValueRule
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/UpdateFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/UpdateFactory.java
new file mode 100644
index 0000000..ecd38f8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/UpdateFactory.java
@@ -0,0 +1,131 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage
+ * @generated
+ */
+public interface UpdateFactory extends EFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The singleton instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  UpdateFactory eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdateFactoryImpl.init();
+
+  /**
+   * Returns a new object of class '<em>Rename Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Rename Rule</em>'.
+   * @generated
+   */
+  RenameRule createRenameRule();
+
+  /**
+   * Returns a new object of class '<em>Set Value Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Set Value Rule</em>'.
+   * @generated
+   */
+  SetValueRule createSetValueRule();
+
+  /**
+   * Returns a new object of class '<em>Set Relation To</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Set Relation To</em>'.
+   * @generated
+   */
+  SetRelationTo createSetRelationTo();
+
+  /**
+   * Returns a new object of class '<em>Set Relation From</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Set Relation From</em>'.
+   * @generated
+   */
+  SetRelationFrom createSetRelationFrom();
+
+  /**
+   * Returns a new object of class '<em>Set Multiplicity Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Set Multiplicity Rule</em>'.
+   * @generated
+   */
+  SetMultiplicityRule createSetMultiplicityRule();
+
+  /**
+   * Returns a new object of class '<em>Set Inverse Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Set Inverse Rule</em>'.
+   * @generated
+   */
+  SetInverseRule createSetInverseRule();
+
+  /**
+   * Returns a new object of class '<em>Set Any Target Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Set Any Target Rule</em>'.
+   * @generated
+   */
+  SetAnyTargetRule createSetAnyTargetRule();
+
+  /**
+   * Returns a new object of class '<em>Set Any Source Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Set Any Source Rule</em>'.
+   * @generated
+   */
+  SetAnySourceRule createSetAnySourceRule();
+
+  /**
+   * Returns a new object of class '<em>Set Aggregation Rule</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Set Aggregation Rule</em>'.
+   * @generated
+   */
+  SetAggregationRule createSetAggregationRule();
+
+  /**
+   * Returns the package supported by this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the package supported by this factory.
+   * @generated
+   */
+  UpdatePackage getUpdatePackage();
+
+} //UpdateFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/UpdatePackage.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/UpdatePackage.java
new file mode 100644
index 0000000..66ce6a0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/UpdatePackage.java
@@ -0,0 +1,1580 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ *   <li>each class,</li>
+ *   <li>each feature of each class,</li>
+ *   <li>each enum,</li>
+ *   <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdateFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface UpdatePackage extends EPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The package name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNAME = "update";
+
+  /**
+   * The package namespace URI.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_URI = "http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update.ecore";
+
+  /**
+   * The package namespace name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_PREFIX = "viatragtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update";
+
+  /**
+   * The singleton instance of the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  UpdatePackage eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl.init();
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetRuleImpl <em>Set Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetRule()
+   * @generated
+   */
+  int SET_RULE = 1;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RULE__ANNOTATIONS = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RULE__NAME = SimpleRulesPackage.MODEL_MANIPULATION_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RULE__ID = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RULE__FQN = SimpleRulesPackage.MODEL_MANIPULATION_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RULE__RUNTIME_ANNOTATIONS = SimpleRulesPackage.MODEL_MANIPULATION_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RULE__CALLER = SimpleRulesPackage.MODEL_MANIPULATION_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RULE__ASM_RULE = SimpleRulesPackage.MODEL_MANIPULATION_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Element</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RULE__ELEMENT = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RULE__VALUE = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 1;
+
+  /**
+   * The number of structural features of the '<em>Set Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RULE_FEATURE_COUNT = SimpleRulesPackage.MODEL_MANIPULATION_RULE_FEATURE_COUNT + 2;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.RenameRuleImpl <em>Rename Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.RenameRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getRenameRule()
+   * @generated
+   */
+  int RENAME_RULE = 0;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RENAME_RULE__ANNOTATIONS = SET_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RENAME_RULE__NAME = SET_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RENAME_RULE__ID = SET_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RENAME_RULE__FQN = SET_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RENAME_RULE__RUNTIME_ANNOTATIONS = SET_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RENAME_RULE__CALLER = SET_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RENAME_RULE__ASM_RULE = SET_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Element</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RENAME_RULE__ELEMENT = SET_RULE__ELEMENT;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RENAME_RULE__VALUE = SET_RULE__VALUE;
+
+  /**
+   * The number of structural features of the '<em>Rename Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RENAME_RULE_FEATURE_COUNT = SET_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetValueRuleImpl <em>Set Value Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetValueRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetValueRule()
+   * @generated
+   */
+  int SET_VALUE_RULE = 2;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_VALUE_RULE__ANNOTATIONS = SET_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_VALUE_RULE__NAME = SET_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_VALUE_RULE__ID = SET_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_VALUE_RULE__FQN = SET_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_VALUE_RULE__RUNTIME_ANNOTATIONS = SET_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_VALUE_RULE__CALLER = SET_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_VALUE_RULE__ASM_RULE = SET_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Element</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_VALUE_RULE__ELEMENT = SET_RULE__ELEMENT;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_VALUE_RULE__VALUE = SET_RULE__VALUE;
+
+  /**
+   * The number of structural features of the '<em>Set Value Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_VALUE_RULE_FEATURE_COUNT = SET_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetRelationEndPointImpl <em>Set Relation End Point</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetRelationEndPointImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetRelationEndPoint()
+   * @generated
+   */
+  int SET_RELATION_END_POINT = 4;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_END_POINT__ANNOTATIONS = SET_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_END_POINT__NAME = SET_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_END_POINT__ID = SET_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_END_POINT__FQN = SET_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_END_POINT__RUNTIME_ANNOTATIONS = SET_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_END_POINT__CALLER = SET_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_END_POINT__ASM_RULE = SET_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Element</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_END_POINT__ELEMENT = SET_RULE__ELEMENT;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_END_POINT__VALUE = SET_RULE__VALUE;
+
+  /**
+   * The number of structural features of the '<em>Set Relation End Point</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_END_POINT_FEATURE_COUNT = SET_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetRelationToImpl <em>Set Relation To</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetRelationToImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetRelationTo()
+   * @generated
+   */
+  int SET_RELATION_TO = 3;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_TO__ANNOTATIONS = SET_RELATION_END_POINT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_TO__NAME = SET_RELATION_END_POINT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_TO__ID = SET_RELATION_END_POINT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_TO__FQN = SET_RELATION_END_POINT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_TO__RUNTIME_ANNOTATIONS = SET_RELATION_END_POINT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_TO__CALLER = SET_RELATION_END_POINT__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_TO__ASM_RULE = SET_RELATION_END_POINT__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Element</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_TO__ELEMENT = SET_RELATION_END_POINT__ELEMENT;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_TO__VALUE = SET_RELATION_END_POINT__VALUE;
+
+  /**
+   * The number of structural features of the '<em>Set Relation To</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_TO_FEATURE_COUNT = SET_RELATION_END_POINT_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetRelationFromImpl <em>Set Relation From</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetRelationFromImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetRelationFrom()
+   * @generated
+   */
+  int SET_RELATION_FROM = 5;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_FROM__ANNOTATIONS = SET_RELATION_END_POINT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_FROM__NAME = SET_RELATION_END_POINT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_FROM__ID = SET_RELATION_END_POINT__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_FROM__FQN = SET_RELATION_END_POINT__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_FROM__RUNTIME_ANNOTATIONS = SET_RELATION_END_POINT__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_FROM__CALLER = SET_RELATION_END_POINT__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_FROM__ASM_RULE = SET_RELATION_END_POINT__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Element</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_FROM__ELEMENT = SET_RELATION_END_POINT__ELEMENT;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_FROM__VALUE = SET_RELATION_END_POINT__VALUE;
+
+  /**
+   * The number of structural features of the '<em>Set Relation From</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_RELATION_FROM_FEATURE_COUNT = SET_RELATION_END_POINT_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetMultiplicityRuleImpl <em>Set Multiplicity Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetMultiplicityRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetMultiplicityRule()
+   * @generated
+   */
+  int SET_MULTIPLICITY_RULE = 6;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_MULTIPLICITY_RULE__ANNOTATIONS = SET_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_MULTIPLICITY_RULE__NAME = SET_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_MULTIPLICITY_RULE__ID = SET_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_MULTIPLICITY_RULE__FQN = SET_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_MULTIPLICITY_RULE__RUNTIME_ANNOTATIONS = SET_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_MULTIPLICITY_RULE__CALLER = SET_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_MULTIPLICITY_RULE__ASM_RULE = SET_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Element</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_MULTIPLICITY_RULE__ELEMENT = SET_RULE__ELEMENT;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_MULTIPLICITY_RULE__VALUE = SET_RULE__VALUE;
+
+  /**
+   * The number of structural features of the '<em>Set Multiplicity Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_MULTIPLICITY_RULE_FEATURE_COUNT = SET_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetInverseRuleImpl <em>Set Inverse Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetInverseRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetInverseRule()
+   * @generated
+   */
+  int SET_INVERSE_RULE = 7;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_INVERSE_RULE__ANNOTATIONS = SET_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_INVERSE_RULE__NAME = SET_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_INVERSE_RULE__ID = SET_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_INVERSE_RULE__FQN = SET_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_INVERSE_RULE__RUNTIME_ANNOTATIONS = SET_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_INVERSE_RULE__CALLER = SET_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_INVERSE_RULE__ASM_RULE = SET_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Element</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_INVERSE_RULE__ELEMENT = SET_RULE__ELEMENT;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_INVERSE_RULE__VALUE = SET_RULE__VALUE;
+
+  /**
+   * The number of structural features of the '<em>Set Inverse Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_INVERSE_RULE_FEATURE_COUNT = SET_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetAnyEndpointRuleImpl <em>Set Any Endpoint Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetAnyEndpointRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetAnyEndpointRule()
+   * @generated
+   */
+  int SET_ANY_ENDPOINT_RULE = 9;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_ENDPOINT_RULE__ANNOTATIONS = SET_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_ENDPOINT_RULE__NAME = SET_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_ENDPOINT_RULE__ID = SET_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_ENDPOINT_RULE__FQN = SET_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_ENDPOINT_RULE__RUNTIME_ANNOTATIONS = SET_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_ENDPOINT_RULE__CALLER = SET_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_ENDPOINT_RULE__ASM_RULE = SET_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Element</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_ENDPOINT_RULE__ELEMENT = SET_RULE__ELEMENT;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_ENDPOINT_RULE__VALUE = SET_RULE__VALUE;
+
+  /**
+   * The number of structural features of the '<em>Set Any Endpoint Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_ENDPOINT_RULE_FEATURE_COUNT = SET_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetAnyTargetRuleImpl <em>Set Any Target Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetAnyTargetRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetAnyTargetRule()
+   * @generated
+   */
+  int SET_ANY_TARGET_RULE = 8;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_TARGET_RULE__ANNOTATIONS = SET_ANY_ENDPOINT_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_TARGET_RULE__NAME = SET_ANY_ENDPOINT_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_TARGET_RULE__ID = SET_ANY_ENDPOINT_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_TARGET_RULE__FQN = SET_ANY_ENDPOINT_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_TARGET_RULE__RUNTIME_ANNOTATIONS = SET_ANY_ENDPOINT_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_TARGET_RULE__CALLER = SET_ANY_ENDPOINT_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_TARGET_RULE__ASM_RULE = SET_ANY_ENDPOINT_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Element</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_TARGET_RULE__ELEMENT = SET_ANY_ENDPOINT_RULE__ELEMENT;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_TARGET_RULE__VALUE = SET_ANY_ENDPOINT_RULE__VALUE;
+
+  /**
+   * The number of structural features of the '<em>Set Any Target Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_TARGET_RULE_FEATURE_COUNT = SET_ANY_ENDPOINT_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetAnySourceRuleImpl <em>Set Any Source Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetAnySourceRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetAnySourceRule()
+   * @generated
+   */
+  int SET_ANY_SOURCE_RULE = 10;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_SOURCE_RULE__ANNOTATIONS = SET_ANY_ENDPOINT_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_SOURCE_RULE__NAME = SET_ANY_ENDPOINT_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_SOURCE_RULE__ID = SET_ANY_ENDPOINT_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_SOURCE_RULE__FQN = SET_ANY_ENDPOINT_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_SOURCE_RULE__RUNTIME_ANNOTATIONS = SET_ANY_ENDPOINT_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_SOURCE_RULE__CALLER = SET_ANY_ENDPOINT_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_SOURCE_RULE__ASM_RULE = SET_ANY_ENDPOINT_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Element</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_SOURCE_RULE__ELEMENT = SET_ANY_ENDPOINT_RULE__ELEMENT;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_SOURCE_RULE__VALUE = SET_ANY_ENDPOINT_RULE__VALUE;
+
+  /**
+   * The number of structural features of the '<em>Set Any Source Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_ANY_SOURCE_RULE_FEATURE_COUNT = SET_ANY_ENDPOINT_RULE_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetAggregationRuleImpl <em>Set Aggregation Rule</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetAggregationRuleImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetAggregationRule()
+   * @generated
+   */
+  int SET_AGGREGATION_RULE = 11;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_AGGREGATION_RULE__ANNOTATIONS = SET_RULE__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_AGGREGATION_RULE__NAME = SET_RULE__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_AGGREGATION_RULE__ID = SET_RULE__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_AGGREGATION_RULE__FQN = SET_RULE__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_AGGREGATION_RULE__RUNTIME_ANNOTATIONS = SET_RULE__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Caller</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_AGGREGATION_RULE__CALLER = SET_RULE__CALLER;
+
+  /**
+   * The feature id for the '<em><b>Asm Rule</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_AGGREGATION_RULE__ASM_RULE = SET_RULE__ASM_RULE;
+
+  /**
+   * The feature id for the '<em><b>Element</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_AGGREGATION_RULE__ELEMENT = SET_RULE__ELEMENT;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_AGGREGATION_RULE__VALUE = SET_RULE__VALUE;
+
+  /**
+   * The number of structural features of the '<em>Set Aggregation Rule</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SET_AGGREGATION_RULE_FEATURE_COUNT = SET_RULE_FEATURE_COUNT + 0;
+
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.RenameRule <em>Rename Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Rename Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.RenameRule
+   * @generated
+   */
+  EClass getRenameRule();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRule <em>Set Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Set Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRule
+   * @generated
+   */
+  EClass getSetRule();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRule#getElement <em>Element</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Element</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRule#getElement()
+   * @see #getSetRule()
+   * @generated
+   */
+  EReference getSetRule_Element();
+
+  /**
+   * Returns the meta object for the containment reference '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRule#getValue <em>Value</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference '<em>Value</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRule#getValue()
+   * @see #getSetRule()
+   * @generated
+   */
+  EReference getSetRule_Value();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetValueRule <em>Set Value Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Set Value Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetValueRule
+   * @generated
+   */
+  EClass getSetValueRule();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationTo <em>Set Relation To</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Set Relation To</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationTo
+   * @generated
+   */
+  EClass getSetRelationTo();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationEndPoint <em>Set Relation End Point</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Set Relation End Point</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationEndPoint
+   * @generated
+   */
+  EClass getSetRelationEndPoint();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationFrom <em>Set Relation From</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Set Relation From</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationFrom
+   * @generated
+   */
+  EClass getSetRelationFrom();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetMultiplicityRule <em>Set Multiplicity Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Set Multiplicity Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetMultiplicityRule
+   * @generated
+   */
+  EClass getSetMultiplicityRule();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetInverseRule <em>Set Inverse Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Set Inverse Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetInverseRule
+   * @generated
+   */
+  EClass getSetInverseRule();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnyTargetRule <em>Set Any Target Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Set Any Target Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnyTargetRule
+   * @generated
+   */
+  EClass getSetAnyTargetRule();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnyEndpointRule <em>Set Any Endpoint Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Set Any Endpoint Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnyEndpointRule
+   * @generated
+   */
+  EClass getSetAnyEndpointRule();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnySourceRule <em>Set Any Source Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Set Any Source Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnySourceRule
+   * @generated
+   */
+  EClass getSetAnySourceRule();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAggregationRule <em>Set Aggregation Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Set Aggregation Rule</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAggregationRule
+   * @generated
+   */
+  EClass getSetAggregationRule();
+
+  /**
+   * Returns the factory that creates the instances of the model.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the factory that creates the instances of the model.
+   * @generated
+   */
+  UpdateFactory getUpdateFactory();
+
+  /**
+   * <!-- begin-user-doc -->
+   * Defines literals for the meta objects that represent
+   * <ul>
+   *   <li>each class,</li>
+   *   <li>each feature of each class,</li>
+   *   <li>each enum,</li>
+   *   <li>and each data type</li>
+   * </ul>
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  interface Literals
+  {
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.RenameRuleImpl <em>Rename Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.RenameRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getRenameRule()
+     * @generated
+     */
+    EClass RENAME_RULE = eINSTANCE.getRenameRule();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetRuleImpl <em>Set Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetRule()
+     * @generated
+     */
+    EClass SET_RULE = eINSTANCE.getSetRule();
+
+    /**
+     * The meta object literal for the '<em><b>Element</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference SET_RULE__ELEMENT = eINSTANCE.getSetRule_Element();
+
+    /**
+     * The meta object literal for the '<em><b>Value</b></em>' containment reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference SET_RULE__VALUE = eINSTANCE.getSetRule_Value();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetValueRuleImpl <em>Set Value Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetValueRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetValueRule()
+     * @generated
+     */
+    EClass SET_VALUE_RULE = eINSTANCE.getSetValueRule();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetRelationToImpl <em>Set Relation To</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetRelationToImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetRelationTo()
+     * @generated
+     */
+    EClass SET_RELATION_TO = eINSTANCE.getSetRelationTo();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetRelationEndPointImpl <em>Set Relation End Point</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetRelationEndPointImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetRelationEndPoint()
+     * @generated
+     */
+    EClass SET_RELATION_END_POINT = eINSTANCE.getSetRelationEndPoint();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetRelationFromImpl <em>Set Relation From</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetRelationFromImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetRelationFrom()
+     * @generated
+     */
+    EClass SET_RELATION_FROM = eINSTANCE.getSetRelationFrom();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetMultiplicityRuleImpl <em>Set Multiplicity Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetMultiplicityRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetMultiplicityRule()
+     * @generated
+     */
+    EClass SET_MULTIPLICITY_RULE = eINSTANCE.getSetMultiplicityRule();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetInverseRuleImpl <em>Set Inverse Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetInverseRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetInverseRule()
+     * @generated
+     */
+    EClass SET_INVERSE_RULE = eINSTANCE.getSetInverseRule();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetAnyTargetRuleImpl <em>Set Any Target Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetAnyTargetRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetAnyTargetRule()
+     * @generated
+     */
+    EClass SET_ANY_TARGET_RULE = eINSTANCE.getSetAnyTargetRule();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetAnyEndpointRuleImpl <em>Set Any Endpoint Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetAnyEndpointRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetAnyEndpointRule()
+     * @generated
+     */
+    EClass SET_ANY_ENDPOINT_RULE = eINSTANCE.getSetAnyEndpointRule();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetAnySourceRuleImpl <em>Set Any Source Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetAnySourceRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetAnySourceRule()
+     * @generated
+     */
+    EClass SET_ANY_SOURCE_RULE = eINSTANCE.getSetAnySourceRule();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetAggregationRuleImpl <em>Set Aggregation Rule</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetAggregationRuleImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl#getSetAggregationRule()
+     * @generated
+     */
+    EClass SET_AGGREGATION_RULE = eINSTANCE.getSetAggregationRule();
+
+  }
+
+} //UpdatePackage
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/RenameRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/RenameRuleImpl.java
new file mode 100644
index 0000000..2d640d3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/RenameRuleImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.RenameRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Rename Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class RenameRuleImpl extends SetRuleImpl implements RenameRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RenameRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return UpdatePackage.Literals.RENAME_RULE;
+  }
+
+} //RenameRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetAggregationRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetAggregationRuleImpl.java
new file mode 100644
index 0000000..ffcda23
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetAggregationRuleImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAggregationRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Set Aggregation Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class SetAggregationRuleImpl extends SetRuleImpl implements SetAggregationRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SetAggregationRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return UpdatePackage.Literals.SET_AGGREGATION_RULE;
+  }
+
+} //SetAggregationRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetAnyEndpointRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetAnyEndpointRuleImpl.java
new file mode 100644
index 0000000..6a6c8c0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetAnyEndpointRuleImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnyEndpointRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Set Any Endpoint Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class SetAnyEndpointRuleImpl extends SetRuleImpl implements SetAnyEndpointRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SetAnyEndpointRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return UpdatePackage.Literals.SET_ANY_ENDPOINT_RULE;
+  }
+
+} //SetAnyEndpointRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetAnySourceRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetAnySourceRuleImpl.java
new file mode 100644
index 0000000..2df3d4d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetAnySourceRuleImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnySourceRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Set Any Source Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class SetAnySourceRuleImpl extends SetAnyEndpointRuleImpl implements SetAnySourceRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SetAnySourceRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return UpdatePackage.Literals.SET_ANY_SOURCE_RULE;
+  }
+
+} //SetAnySourceRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetAnyTargetRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetAnyTargetRuleImpl.java
new file mode 100644
index 0000000..921c508
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetAnyTargetRuleImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnyTargetRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Set Any Target Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class SetAnyTargetRuleImpl extends SetAnyEndpointRuleImpl implements SetAnyTargetRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SetAnyTargetRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return UpdatePackage.Literals.SET_ANY_TARGET_RULE;
+  }
+
+} //SetAnyTargetRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetInverseRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetInverseRuleImpl.java
new file mode 100644
index 0000000..474a997
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetInverseRuleImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetInverseRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Set Inverse Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class SetInverseRuleImpl extends SetRuleImpl implements SetInverseRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SetInverseRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return UpdatePackage.Literals.SET_INVERSE_RULE;
+  }
+
+} //SetInverseRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetMultiplicityRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetMultiplicityRuleImpl.java
new file mode 100644
index 0000000..5cb3631
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetMultiplicityRuleImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetMultiplicityRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Set Multiplicity Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class SetMultiplicityRuleImpl extends SetRuleImpl implements SetMultiplicityRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SetMultiplicityRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return UpdatePackage.Literals.SET_MULTIPLICITY_RULE;
+  }
+
+} //SetMultiplicityRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetRelationEndPointImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetRelationEndPointImpl.java
new file mode 100644
index 0000000..a99de6f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetRelationEndPointImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationEndPoint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Set Relation End Point</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class SetRelationEndPointImpl extends SetRuleImpl implements SetRelationEndPoint
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SetRelationEndPointImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return UpdatePackage.Literals.SET_RELATION_END_POINT;
+  }
+
+} //SetRelationEndPointImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetRelationFromImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetRelationFromImpl.java
new file mode 100644
index 0000000..21ff3cd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetRelationFromImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationFrom;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Set Relation From</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class SetRelationFromImpl extends SetRelationEndPointImpl implements SetRelationFrom
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SetRelationFromImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return UpdatePackage.Literals.SET_RELATION_FROM;
+  }
+
+} //SetRelationFromImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetRelationToImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetRelationToImpl.java
new file mode 100644
index 0000000..11ea439
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetRelationToImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationTo;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Set Relation To</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class SetRelationToImpl extends SetRelationEndPointImpl implements SetRelationTo
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SetRelationToImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return UpdatePackage.Literals.SET_RELATION_TO;
+  }
+
+} //SetRelationToImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetRuleImpl.java
new file mode 100644
index 0000000..6062adc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetRuleImpl.java
@@ -0,0 +1,283 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.ModelManipulationRuleImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Set Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetRuleImpl#getElement <em>Element</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.SetRuleImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class SetRuleImpl extends ModelManipulationRuleImpl implements SetRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getElement() <em>Element</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getElement()
+   * @generated
+   * @ordered
+   */
+  protected Term element;
+
+  /**
+   * The cached value of the '{@link #getValue() <em>Value</em>}' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getValue()
+   * @generated
+   * @ordered
+   */
+  protected Term value;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SetRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return UpdatePackage.Literals.SET_RULE;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getElement()
+  {
+    return element;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetElement(Term newElement, NotificationChain msgs)
+  {
+    Term oldElement = element;
+    element = newElement;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, UpdatePackage.SET_RULE__ELEMENT, oldElement, newElement);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setElement(Term newElement)
+  {
+    if (newElement != element)
+    {
+      NotificationChain msgs = null;
+      if (element != null)
+        msgs = ((InternalEObject)element).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - UpdatePackage.SET_RULE__ELEMENT, null, msgs);
+      if (newElement != null)
+        msgs = ((InternalEObject)newElement).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - UpdatePackage.SET_RULE__ELEMENT, null, msgs);
+      msgs = basicSetElement(newElement, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, UpdatePackage.SET_RULE__ELEMENT, newElement, newElement));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Term getValue()
+  {
+    return value;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetValue(Term newValue, NotificationChain msgs)
+  {
+    Term oldValue = value;
+    value = newValue;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, UpdatePackage.SET_RULE__VALUE, oldValue, newValue);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setValue(Term newValue)
+  {
+    if (newValue != value)
+    {
+      NotificationChain msgs = null;
+      if (value != null)
+        msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - UpdatePackage.SET_RULE__VALUE, null, msgs);
+      if (newValue != null)
+        msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - UpdatePackage.SET_RULE__VALUE, null, msgs);
+      msgs = basicSetValue(newValue, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, UpdatePackage.SET_RULE__VALUE, newValue, newValue));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case UpdatePackage.SET_RULE__ELEMENT:
+        return basicSetElement(null, msgs);
+      case UpdatePackage.SET_RULE__VALUE:
+        return basicSetValue(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case UpdatePackage.SET_RULE__ELEMENT:
+        return getElement();
+      case UpdatePackage.SET_RULE__VALUE:
+        return getValue();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case UpdatePackage.SET_RULE__ELEMENT:
+        setElement((Term)newValue);
+        return;
+      case UpdatePackage.SET_RULE__VALUE:
+        setValue((Term)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case UpdatePackage.SET_RULE__ELEMENT:
+        setElement((Term)null);
+        return;
+      case UpdatePackage.SET_RULE__VALUE:
+        setValue((Term)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case UpdatePackage.SET_RULE__ELEMENT:
+        return element != null;
+      case UpdatePackage.SET_RULE__VALUE:
+        return value != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //SetRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetValueRuleImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetValueRuleImpl.java
new file mode 100644
index 0000000..21a185f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/SetValueRuleImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetValueRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Set Value Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class SetValueRuleImpl extends SetRuleImpl implements SetValueRule
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SetValueRuleImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return UpdatePackage.Literals.SET_VALUE_RULE;
+  }
+
+} //SetValueRuleImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/UpdateFactoryImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/UpdateFactoryImpl.java
new file mode 100644
index 0000000..adbb510
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/UpdateFactoryImpl.java
@@ -0,0 +1,218 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class UpdateFactoryImpl extends EFactoryImpl implements UpdateFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Creates the default factory implementation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static UpdateFactory init()
+  {
+    try
+    {
+      UpdateFactory theUpdateFactory = (UpdateFactory)EPackage.Registry.INSTANCE.getEFactory("http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update.ecore"); 
+      if (theUpdateFactory != null)
+      {
+        return theUpdateFactory;
+      }
+    }
+    catch (Exception exception)
+    {
+      EcorePlugin.INSTANCE.log(exception);
+    }
+    return new UpdateFactoryImpl();
+  }
+
+  /**
+   * Creates an instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public UpdateFactoryImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public EObject create(EClass eClass)
+  {
+    switch (eClass.getClassifierID())
+    {
+      case UpdatePackage.RENAME_RULE: return createRenameRule();
+      case UpdatePackage.SET_VALUE_RULE: return createSetValueRule();
+      case UpdatePackage.SET_RELATION_TO: return createSetRelationTo();
+      case UpdatePackage.SET_RELATION_FROM: return createSetRelationFrom();
+      case UpdatePackage.SET_MULTIPLICITY_RULE: return createSetMultiplicityRule();
+      case UpdatePackage.SET_INVERSE_RULE: return createSetInverseRule();
+      case UpdatePackage.SET_ANY_TARGET_RULE: return createSetAnyTargetRule();
+      case UpdatePackage.SET_ANY_SOURCE_RULE: return createSetAnySourceRule();
+      case UpdatePackage.SET_AGGREGATION_RULE: return createSetAggregationRule();
+      default:
+        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+    }
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public RenameRule createRenameRule()
+  {
+    RenameRuleImpl renameRule = new RenameRuleImpl();
+    return renameRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SetValueRule createSetValueRule()
+  {
+    SetValueRuleImpl setValueRule = new SetValueRuleImpl();
+    return setValueRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SetRelationTo createSetRelationTo()
+  {
+    SetRelationToImpl setRelationTo = new SetRelationToImpl();
+    return setRelationTo;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SetRelationFrom createSetRelationFrom()
+  {
+    SetRelationFromImpl setRelationFrom = new SetRelationFromImpl();
+    return setRelationFrom;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SetMultiplicityRule createSetMultiplicityRule()
+  {
+    SetMultiplicityRuleImpl setMultiplicityRule = new SetMultiplicityRuleImpl();
+    return setMultiplicityRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SetInverseRule createSetInverseRule()
+  {
+    SetInverseRuleImpl setInverseRule = new SetInverseRuleImpl();
+    return setInverseRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SetAnyTargetRule createSetAnyTargetRule()
+  {
+    SetAnyTargetRuleImpl setAnyTargetRule = new SetAnyTargetRuleImpl();
+    return setAnyTargetRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SetAnySourceRule createSetAnySourceRule()
+  {
+    SetAnySourceRuleImpl setAnySourceRule = new SetAnySourceRuleImpl();
+    return setAnySourceRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SetAggregationRule createSetAggregationRule()
+  {
+    SetAggregationRuleImpl setAggregationRule = new SetAggregationRuleImpl();
+    return setAggregationRule;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public UpdatePackage getUpdatePackage()
+  {
+    return (UpdatePackage)getEPackage();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @deprecated
+   * @generated
+   */
+  @Deprecated
+  public static UpdatePackage getPackage()
+  {
+    return UpdatePackage.eINSTANCE;
+  }
+
+} //UpdateFactoryImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/UpdatePackageImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/UpdatePackageImpl.java
new file mode 100644
index 0000000..536bb04
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/impl/UpdatePackageImpl.java
@@ -0,0 +1,564 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymovePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.RenameRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAggregationRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnyEndpointRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnySourceRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnyTargetRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetInverseRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetMultiplicityRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationEndPoint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationFrom;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationTo;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetValueRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdateFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class UpdatePackageImpl extends EPackageImpl implements UpdatePackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass renameRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass setRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass setValueRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass setRelationToEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass setRelationEndPointEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass setRelationFromEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass setMultiplicityRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass setInverseRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass setAnyTargetRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass setAnyEndpointRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass setAnySourceRuleEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass setAggregationRuleEClass = null;
+
+  /**
+   * Creates an instance of the model <b>Package</b>, registered with
+   * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+   * package URI value.
+   * <p>Note: the correct way to create the package is via the static
+   * factory method {@link #init init()}, which also performs
+   * initialization of the package, or returns the registered package,
+   * if one already exists.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.emf.ecore.EPackage.Registry
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage#eNS_URI
+   * @see #init()
+   * @generated
+   */
+  private UpdatePackageImpl()
+  {
+    super(eNS_URI, UpdateFactory.eINSTANCE);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static boolean isInited = false;
+
+  /**
+   * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+   * 
+   * <p>This method is used to initialize {@link UpdatePackage#eINSTANCE} when that field is accessed.
+   * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #eNS_URI
+   * @see #createPackageContents()
+   * @see #initializePackageContents()
+   * @generated
+   */
+  public static UpdatePackage init()
+  {
+    if (isInited) return (UpdatePackage)EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI);
+
+    // Obtain or create and register package
+    UpdatePackageImpl theUpdatePackage = (UpdatePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof UpdatePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new UpdatePackageImpl());
+
+    isInited = true;
+
+    // Obtain or create and register interdependencies
+    EditmodelPackageImpl theEditmodelPackage = (EditmodelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) instanceof EditmodelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) : EditmodelPackage.eINSTANCE);
+    QueryFunctionsPackageImpl theQueryFunctionsPackage = (QueryFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) instanceof QueryFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) : QueryFunctionsPackage.eINSTANCE);
+    DeletionPackageImpl theDeletionPackage = (DeletionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) instanceof DeletionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) : DeletionPackage.eINSTANCE);
+    CreationPackageImpl theCreationPackage = (CreationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) instanceof CreationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) : CreationPackage.eINSTANCE);
+    CopymovePackageImpl theCopymovePackage = (CopymovePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) instanceof CopymovePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) : CopymovePackage.eINSTANCE);
+    DefinitionsPackageImpl theDefinitionsPackage = (DefinitionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) instanceof DefinitionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) : DefinitionsPackage.eINSTANCE);
+    CorePackageImpl theCorePackage = (CorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) instanceof CorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) : CorePackage.eINSTANCE);
+    SimpleRulesPackageImpl theSimpleRulesPackage = (SimpleRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) instanceof SimpleRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) : SimpleRulesPackage.eINSTANCE);
+    CompoundRulesPackageImpl theCompoundRulesPackage = (CompoundRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) instanceof CompoundRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) : CompoundRulesPackage.eINSTANCE);
+    EnumsPackageImpl theEnumsPackage = (EnumsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) instanceof EnumsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) : EnumsPackage.eINSTANCE);
+    TermsPackageImpl theTermsPackage = (TermsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) instanceof TermsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) : TermsPackage.eINSTANCE);
+    BuiltInFunctionsPackageImpl theBuiltInFunctionsPackage = (BuiltInFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) instanceof BuiltInFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) : BuiltInFunctionsPackage.eINSTANCE);
+    GtPackageImpl theGtPackage = (GtPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) instanceof GtPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) : GtPackage.eINSTANCE);
+
+    // Create package meta-data objects
+    theUpdatePackage.createPackageContents();
+    theEditmodelPackage.createPackageContents();
+    theQueryFunctionsPackage.createPackageContents();
+    theDeletionPackage.createPackageContents();
+    theCreationPackage.createPackageContents();
+    theCopymovePackage.createPackageContents();
+    theDefinitionsPackage.createPackageContents();
+    theCorePackage.createPackageContents();
+    theSimpleRulesPackage.createPackageContents();
+    theCompoundRulesPackage.createPackageContents();
+    theEnumsPackage.createPackageContents();
+    theTermsPackage.createPackageContents();
+    theBuiltInFunctionsPackage.createPackageContents();
+    theGtPackage.createPackageContents();
+
+    // Initialize created meta-data
+    theUpdatePackage.initializePackageContents();
+    theEditmodelPackage.initializePackageContents();
+    theQueryFunctionsPackage.initializePackageContents();
+    theDeletionPackage.initializePackageContents();
+    theCreationPackage.initializePackageContents();
+    theCopymovePackage.initializePackageContents();
+    theDefinitionsPackage.initializePackageContents();
+    theCorePackage.initializePackageContents();
+    theSimpleRulesPackage.initializePackageContents();
+    theCompoundRulesPackage.initializePackageContents();
+    theEnumsPackage.initializePackageContents();
+    theTermsPackage.initializePackageContents();
+    theBuiltInFunctionsPackage.initializePackageContents();
+    theGtPackage.initializePackageContents();
+
+    // Mark meta-data to indicate it can't be changed
+    theUpdatePackage.freeze();
+
+  
+    // Update the registry and return the package
+    EPackage.Registry.INSTANCE.put(UpdatePackage.eNS_URI, theUpdatePackage);
+    return theUpdatePackage;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getRenameRule()
+  {
+    return renameRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getSetRule()
+  {
+    return setRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getSetRule_Element()
+  {
+    return (EReference)setRuleEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getSetRule_Value()
+  {
+    return (EReference)setRuleEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getSetValueRule()
+  {
+    return setValueRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getSetRelationTo()
+  {
+    return setRelationToEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getSetRelationEndPoint()
+  {
+    return setRelationEndPointEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getSetRelationFrom()
+  {
+    return setRelationFromEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getSetMultiplicityRule()
+  {
+    return setMultiplicityRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getSetInverseRule()
+  {
+    return setInverseRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getSetAnyTargetRule()
+  {
+    return setAnyTargetRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getSetAnyEndpointRule()
+  {
+    return setAnyEndpointRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getSetAnySourceRule()
+  {
+    return setAnySourceRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getSetAggregationRule()
+  {
+    return setAggregationRuleEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public UpdateFactory getUpdateFactory()
+  {
+    return (UpdateFactory)getEFactoryInstance();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isCreated = false;
+
+  /**
+   * Creates the meta-model objects for the package.  This method is
+   * guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void createPackageContents()
+  {
+    if (isCreated) return;
+    isCreated = true;
+
+    // Create classes and their features
+    renameRuleEClass = createEClass(RENAME_RULE);
+
+    setRuleEClass = createEClass(SET_RULE);
+    createEReference(setRuleEClass, SET_RULE__ELEMENT);
+    createEReference(setRuleEClass, SET_RULE__VALUE);
+
+    setValueRuleEClass = createEClass(SET_VALUE_RULE);
+
+    setRelationToEClass = createEClass(SET_RELATION_TO);
+
+    setRelationEndPointEClass = createEClass(SET_RELATION_END_POINT);
+
+    setRelationFromEClass = createEClass(SET_RELATION_FROM);
+
+    setMultiplicityRuleEClass = createEClass(SET_MULTIPLICITY_RULE);
+
+    setInverseRuleEClass = createEClass(SET_INVERSE_RULE);
+
+    setAnyTargetRuleEClass = createEClass(SET_ANY_TARGET_RULE);
+
+    setAnyEndpointRuleEClass = createEClass(SET_ANY_ENDPOINT_RULE);
+
+    setAnySourceRuleEClass = createEClass(SET_ANY_SOURCE_RULE);
+
+    setAggregationRuleEClass = createEClass(SET_AGGREGATION_RULE);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isInitialized = false;
+
+  /**
+   * Complete the initialization of the package and its meta-model.  This
+   * method is guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void initializePackageContents()
+  {
+    if (isInitialized) return;
+    isInitialized = true;
+
+    // Initialize package
+    setName(eNAME);
+    setNsPrefix(eNS_PREFIX);
+    setNsURI(eNS_URI);
+
+    // Obtain other dependent packages
+    SimpleRulesPackage theSimpleRulesPackage = (SimpleRulesPackage)EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI);
+    TermsPackage theTermsPackage = (TermsPackage)EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI);
+
+    // Create type parameters
+
+    // Set bounds for type parameters
+
+    // Add supertypes to classes
+    renameRuleEClass.getESuperTypes().add(this.getSetRule());
+    setRuleEClass.getESuperTypes().add(theSimpleRulesPackage.getModelManipulationRule());
+    setValueRuleEClass.getESuperTypes().add(this.getSetRule());
+    setRelationToEClass.getESuperTypes().add(this.getSetRelationEndPoint());
+    setRelationEndPointEClass.getESuperTypes().add(this.getSetRule());
+    setRelationFromEClass.getESuperTypes().add(this.getSetRelationEndPoint());
+    setMultiplicityRuleEClass.getESuperTypes().add(this.getSetRule());
+    setInverseRuleEClass.getESuperTypes().add(this.getSetRule());
+    setAnyTargetRuleEClass.getESuperTypes().add(this.getSetAnyEndpointRule());
+    setAnyEndpointRuleEClass.getESuperTypes().add(this.getSetRule());
+    setAnySourceRuleEClass.getESuperTypes().add(this.getSetAnyEndpointRule());
+    setAggregationRuleEClass.getESuperTypes().add(this.getSetRule());
+
+    // Initialize classes and features; add operations and parameters
+    initEClass(renameRuleEClass, RenameRule.class, "RenameRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(setRuleEClass, SetRule.class, "SetRule", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getSetRule_Element(), theTermsPackage.getTerm(), null, "element", null, 1, 1, SetRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getSetRule_Value(), theTermsPackage.getTerm(), null, "value", null, 1, 1, SetRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(setValueRuleEClass, SetValueRule.class, "SetValueRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(setRelationToEClass, SetRelationTo.class, "SetRelationTo", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(setRelationEndPointEClass, SetRelationEndPoint.class, "SetRelationEndPoint", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(setRelationFromEClass, SetRelationFrom.class, "SetRelationFrom", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(setMultiplicityRuleEClass, SetMultiplicityRule.class, "SetMultiplicityRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(setInverseRuleEClass, SetInverseRule.class, "SetInverseRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(setAnyTargetRuleEClass, SetAnyTargetRule.class, "SetAnyTargetRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(setAnyEndpointRuleEClass, SetAnyEndpointRule.class, "SetAnyEndpointRule", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(setAnySourceRuleEClass, SetAnySourceRule.class, "SetAnySourceRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(setAggregationRuleEClass, SetAggregationRule.class, "SetAggregationRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    // Create resource
+    createResource(eNS_URI);
+  }
+
+} //UpdatePackageImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/util/UpdateAdapterFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/util/UpdateAdapterFactory.java
new file mode 100644
index 0000000..e76d45c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/util/UpdateAdapterFactory.java
@@ -0,0 +1,454 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage
+ * @generated
+ */
+public class UpdateAdapterFactory extends AdapterFactoryImpl
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static UpdatePackage modelPackage;
+
+  /**
+   * Creates an instance of the adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public UpdateAdapterFactory()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = UpdatePackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Returns whether this factory is applicable for the type of the object.
+   * <!-- begin-user-doc -->
+   * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+   * <!-- end-user-doc -->
+   * @return whether this factory is applicable for the type of the object.
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object object)
+  {
+    if (object == modelPackage)
+    {
+      return true;
+    }
+    if (object instanceof EObject)
+    {
+      return ((EObject)object).eClass().getEPackage() == modelPackage;
+    }
+    return false;
+  }
+
+  /**
+   * The switch that delegates to the <code>createXXX</code> methods.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected UpdateSwitch<Adapter> modelSwitch =
+    new UpdateSwitch<Adapter>()
+    {
+      @Override
+      public Adapter caseRenameRule(RenameRule object)
+      {
+        return createRenameRuleAdapter();
+      }
+      @Override
+      public Adapter caseSetRule(SetRule object)
+      {
+        return createSetRuleAdapter();
+      }
+      @Override
+      public Adapter caseSetValueRule(SetValueRule object)
+      {
+        return createSetValueRuleAdapter();
+      }
+      @Override
+      public Adapter caseSetRelationTo(SetRelationTo object)
+      {
+        return createSetRelationToAdapter();
+      }
+      @Override
+      public Adapter caseSetRelationEndPoint(SetRelationEndPoint object)
+      {
+        return createSetRelationEndPointAdapter();
+      }
+      @Override
+      public Adapter caseSetRelationFrom(SetRelationFrom object)
+      {
+        return createSetRelationFromAdapter();
+      }
+      @Override
+      public Adapter caseSetMultiplicityRule(SetMultiplicityRule object)
+      {
+        return createSetMultiplicityRuleAdapter();
+      }
+      @Override
+      public Adapter caseSetInverseRule(SetInverseRule object)
+      {
+        return createSetInverseRuleAdapter();
+      }
+      @Override
+      public Adapter caseSetAnyTargetRule(SetAnyTargetRule object)
+      {
+        return createSetAnyTargetRuleAdapter();
+      }
+      @Override
+      public Adapter caseSetAnyEndpointRule(SetAnyEndpointRule object)
+      {
+        return createSetAnyEndpointRuleAdapter();
+      }
+      @Override
+      public Adapter caseSetAnySourceRule(SetAnySourceRule object)
+      {
+        return createSetAnySourceRuleAdapter();
+      }
+      @Override
+      public Adapter caseSetAggregationRule(SetAggregationRule object)
+      {
+        return createSetAggregationRuleAdapter();
+      }
+      @Override
+      public Adapter caseAnnotatedElement(AnnotatedElement object)
+      {
+        return createAnnotatedElementAdapter();
+      }
+      @Override
+      public Adapter caseGTASMElement(GTASMElement object)
+      {
+        return createGTASMElementAdapter();
+      }
+      @Override
+      public Adapter caseASMRuleInvocation(ASMRuleInvocation object)
+      {
+        return createASMRuleInvocationAdapter();
+      }
+      @Override
+      public Adapter caseModelManipulationRule(ModelManipulationRule object)
+      {
+        return createModelManipulationRuleAdapter();
+      }
+      @Override
+      public Adapter defaultCase(EObject object)
+      {
+        return createEObjectAdapter();
+      }
+    };
+
+  /**
+   * Creates an adapter for the <code>target</code>.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param target the object to adapt.
+   * @return the adapter for the <code>target</code>.
+   * @generated
+   */
+  @Override
+  public Adapter createAdapter(Notifier target)
+  {
+    return modelSwitch.doSwitch((EObject)target);
+  }
+
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.RenameRule <em>Rename Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.RenameRule
+   * @generated
+   */
+  public Adapter createRenameRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRule <em>Set Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRule
+   * @generated
+   */
+  public Adapter createSetRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetValueRule <em>Set Value Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetValueRule
+   * @generated
+   */
+  public Adapter createSetValueRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationTo <em>Set Relation To</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationTo
+   * @generated
+   */
+  public Adapter createSetRelationToAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationEndPoint <em>Set Relation End Point</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationEndPoint
+   * @generated
+   */
+  public Adapter createSetRelationEndPointAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationFrom <em>Set Relation From</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRelationFrom
+   * @generated
+   */
+  public Adapter createSetRelationFromAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetMultiplicityRule <em>Set Multiplicity Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetMultiplicityRule
+   * @generated
+   */
+  public Adapter createSetMultiplicityRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetInverseRule <em>Set Inverse Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetInverseRule
+   * @generated
+   */
+  public Adapter createSetInverseRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnyTargetRule <em>Set Any Target Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnyTargetRule
+   * @generated
+   */
+  public Adapter createSetAnyTargetRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnyEndpointRule <em>Set Any Endpoint Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnyEndpointRule
+   * @generated
+   */
+  public Adapter createSetAnyEndpointRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnySourceRule <em>Set Any Source Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAnySourceRule
+   * @generated
+   */
+  public Adapter createSetAnySourceRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAggregationRule <em>Set Aggregation Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetAggregationRule
+   * @generated
+   */
+  public Adapter createSetAggregationRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement <em>Annotated Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement
+   * @generated
+   */
+  public Adapter createAnnotatedElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement <em>GTASM Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement
+   * @generated
+   */
+  public Adapter createGTASMElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation <em>ASM Rule Invocation</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation
+   * @generated
+   */
+  public Adapter createASMRuleInvocationAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule <em>Model Manipulation Rule</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule
+   * @generated
+   */
+  public Adapter createModelManipulationRuleAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for the default case.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @generated
+   */
+  public Adapter createEObjectAdapter()
+  {
+    return null;
+  }
+
+} //UpdateAdapterFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/util/UpdateSwitch.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/util/UpdateSwitch.java
new file mode 100644
index 0000000..74b1812
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/manipulationRules/update/util/UpdateSwitch.java
@@ -0,0 +1,540 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ModelManipulationRule;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage
+ * @generated
+ */
+public class UpdateSwitch<T>
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static UpdatePackage modelPackage;
+
+  /**
+   * Creates an instance of the switch.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public UpdateSwitch()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = UpdatePackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  public T doSwitch(EObject theEObject)
+  {
+    return doSwitch(theEObject.eClass(), theEObject);
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(EClass theEClass, EObject theEObject)
+  {
+    if (theEClass.eContainer() == modelPackage)
+    {
+      return doSwitch(theEClass.getClassifierID(), theEObject);
+    }
+    else
+    {
+      List<EClass> eSuperTypes = theEClass.getESuperTypes();
+      return
+        eSuperTypes.isEmpty() ?
+          defaultCase(theEObject) :
+          doSwitch(eSuperTypes.get(0), theEObject);
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(int classifierID, EObject theEObject)
+  {
+    switch (classifierID)
+    {
+      case UpdatePackage.RENAME_RULE:
+      {
+        RenameRule renameRule = (RenameRule)theEObject;
+        T result = caseRenameRule(renameRule);
+        if (result == null) result = caseSetRule(renameRule);
+        if (result == null) result = caseModelManipulationRule(renameRule);
+        if (result == null) result = caseASMRuleInvocation(renameRule);
+        if (result == null) result = caseGTASMElement(renameRule);
+        if (result == null) result = caseAnnotatedElement(renameRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case UpdatePackage.SET_RULE:
+      {
+        SetRule setRule = (SetRule)theEObject;
+        T result = caseSetRule(setRule);
+        if (result == null) result = caseModelManipulationRule(setRule);
+        if (result == null) result = caseASMRuleInvocation(setRule);
+        if (result == null) result = caseGTASMElement(setRule);
+        if (result == null) result = caseAnnotatedElement(setRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case UpdatePackage.SET_VALUE_RULE:
+      {
+        SetValueRule setValueRule = (SetValueRule)theEObject;
+        T result = caseSetValueRule(setValueRule);
+        if (result == null) result = caseSetRule(setValueRule);
+        if (result == null) result = caseModelManipulationRule(setValueRule);
+        if (result == null) result = caseASMRuleInvocation(setValueRule);
+        if (result == null) result = caseGTASMElement(setValueRule);
+        if (result == null) result = caseAnnotatedElement(setValueRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case UpdatePackage.SET_RELATION_TO:
+      {
+        SetRelationTo setRelationTo = (SetRelationTo)theEObject;
+        T result = caseSetRelationTo(setRelationTo);
+        if (result == null) result = caseSetRelationEndPoint(setRelationTo);
+        if (result == null) result = caseSetRule(setRelationTo);
+        if (result == null) result = caseModelManipulationRule(setRelationTo);
+        if (result == null) result = caseASMRuleInvocation(setRelationTo);
+        if (result == null) result = caseGTASMElement(setRelationTo);
+        if (result == null) result = caseAnnotatedElement(setRelationTo);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case UpdatePackage.SET_RELATION_END_POINT:
+      {
+        SetRelationEndPoint setRelationEndPoint = (SetRelationEndPoint)theEObject;
+        T result = caseSetRelationEndPoint(setRelationEndPoint);
+        if (result == null) result = caseSetRule(setRelationEndPoint);
+        if (result == null) result = caseModelManipulationRule(setRelationEndPoint);
+        if (result == null) result = caseASMRuleInvocation(setRelationEndPoint);
+        if (result == null) result = caseGTASMElement(setRelationEndPoint);
+        if (result == null) result = caseAnnotatedElement(setRelationEndPoint);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case UpdatePackage.SET_RELATION_FROM:
+      {
+        SetRelationFrom setRelationFrom = (SetRelationFrom)theEObject;
+        T result = caseSetRelationFrom(setRelationFrom);
+        if (result == null) result = caseSetRelationEndPoint(setRelationFrom);
+        if (result == null) result = caseSetRule(setRelationFrom);
+        if (result == null) result = caseModelManipulationRule(setRelationFrom);
+        if (result == null) result = caseASMRuleInvocation(setRelationFrom);
+        if (result == null) result = caseGTASMElement(setRelationFrom);
+        if (result == null) result = caseAnnotatedElement(setRelationFrom);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case UpdatePackage.SET_MULTIPLICITY_RULE:
+      {
+        SetMultiplicityRule setMultiplicityRule = (SetMultiplicityRule)theEObject;
+        T result = caseSetMultiplicityRule(setMultiplicityRule);
+        if (result == null) result = caseSetRule(setMultiplicityRule);
+        if (result == null) result = caseModelManipulationRule(setMultiplicityRule);
+        if (result == null) result = caseASMRuleInvocation(setMultiplicityRule);
+        if (result == null) result = caseGTASMElement(setMultiplicityRule);
+        if (result == null) result = caseAnnotatedElement(setMultiplicityRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case UpdatePackage.SET_INVERSE_RULE:
+      {
+        SetInverseRule setInverseRule = (SetInverseRule)theEObject;
+        T result = caseSetInverseRule(setInverseRule);
+        if (result == null) result = caseSetRule(setInverseRule);
+        if (result == null) result = caseModelManipulationRule(setInverseRule);
+        if (result == null) result = caseASMRuleInvocation(setInverseRule);
+        if (result == null) result = caseGTASMElement(setInverseRule);
+        if (result == null) result = caseAnnotatedElement(setInverseRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case UpdatePackage.SET_ANY_TARGET_RULE:
+      {
+        SetAnyTargetRule setAnyTargetRule = (SetAnyTargetRule)theEObject;
+        T result = caseSetAnyTargetRule(setAnyTargetRule);
+        if (result == null) result = caseSetAnyEndpointRule(setAnyTargetRule);
+        if (result == null) result = caseSetRule(setAnyTargetRule);
+        if (result == null) result = caseModelManipulationRule(setAnyTargetRule);
+        if (result == null) result = caseASMRuleInvocation(setAnyTargetRule);
+        if (result == null) result = caseGTASMElement(setAnyTargetRule);
+        if (result == null) result = caseAnnotatedElement(setAnyTargetRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case UpdatePackage.SET_ANY_ENDPOINT_RULE:
+      {
+        SetAnyEndpointRule setAnyEndpointRule = (SetAnyEndpointRule)theEObject;
+        T result = caseSetAnyEndpointRule(setAnyEndpointRule);
+        if (result == null) result = caseSetRule(setAnyEndpointRule);
+        if (result == null) result = caseModelManipulationRule(setAnyEndpointRule);
+        if (result == null) result = caseASMRuleInvocation(setAnyEndpointRule);
+        if (result == null) result = caseGTASMElement(setAnyEndpointRule);
+        if (result == null) result = caseAnnotatedElement(setAnyEndpointRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case UpdatePackage.SET_ANY_SOURCE_RULE:
+      {
+        SetAnySourceRule setAnySourceRule = (SetAnySourceRule)theEObject;
+        T result = caseSetAnySourceRule(setAnySourceRule);
+        if (result == null) result = caseSetAnyEndpointRule(setAnySourceRule);
+        if (result == null) result = caseSetRule(setAnySourceRule);
+        if (result == null) result = caseModelManipulationRule(setAnySourceRule);
+        if (result == null) result = caseASMRuleInvocation(setAnySourceRule);
+        if (result == null) result = caseGTASMElement(setAnySourceRule);
+        if (result == null) result = caseAnnotatedElement(setAnySourceRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case UpdatePackage.SET_AGGREGATION_RULE:
+      {
+        SetAggregationRule setAggregationRule = (SetAggregationRule)theEObject;
+        T result = caseSetAggregationRule(setAggregationRule);
+        if (result == null) result = caseSetRule(setAggregationRule);
+        if (result == null) result = caseModelManipulationRule(setAggregationRule);
+        if (result == null) result = caseASMRuleInvocation(setAggregationRule);
+        if (result == null) result = caseGTASMElement(setAggregationRule);
+        if (result == null) result = caseAnnotatedElement(setAggregationRule);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      default: return defaultCase(theEObject);
+    }
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Rename Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Rename Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseRenameRule(RenameRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Set Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Set Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseSetRule(SetRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Set Value Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Set Value Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseSetValueRule(SetValueRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Set Relation To</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Set Relation To</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseSetRelationTo(SetRelationTo object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Set Relation End Point</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Set Relation End Point</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseSetRelationEndPoint(SetRelationEndPoint object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Set Relation From</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Set Relation From</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseSetRelationFrom(SetRelationFrom object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Set Multiplicity Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Set Multiplicity Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseSetMultiplicityRule(SetMultiplicityRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Set Inverse Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Set Inverse Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseSetInverseRule(SetInverseRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Set Any Target Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Set Any Target Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseSetAnyTargetRule(SetAnyTargetRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Set Any Endpoint Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Set Any Endpoint Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseSetAnyEndpointRule(SetAnyEndpointRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Set Any Source Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Set Any Source Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseSetAnySourceRule(SetAnySourceRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Set Aggregation Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Set Aggregation Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseSetAggregationRule(SetAggregationRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseAnnotatedElement(AnnotatedElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGTASMElement(GTASMElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>ASM Rule Invocation</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>ASM Rule Invocation</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseASMRuleInvocation(ASMRuleInvocation object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Model Manipulation Rule</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Model Manipulation Rule</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseModelManipulationRule(ModelManipulationRule object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch, but this is the last case anyway.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+   * @generated
+   */
+  public T defaultCase(EObject object)
+  {
+    return null;
+  }
+
+} //UpdateSwitch
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Aggregate.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Aggregate.java
new file mode 100644
index 0000000..0014804
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Aggregate.java
@@ -0,0 +1,35 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Aggregate</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage#getAggregate()
+ * @model
+ * @generated
+ */
+public interface Aggregate extends ModelElementQuery
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // Aggregate
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/ElementReference.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/ElementReference.java
new file mode 100644
index 0000000..4526ecf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/ElementReference.java
@@ -0,0 +1,35 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Element Reference</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage#getElementReference()
+ * @model
+ * @generated
+ */
+public interface ElementReference extends ModelElementQuery
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // ElementReference
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/FullyQualifiedName.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/FullyQualifiedName.java
new file mode 100644
index 0000000..b55faff
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/FullyQualifiedName.java
@@ -0,0 +1,35 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Fully Qualified Name</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage#getFullyQualifiedName()
+ * @model
+ * @generated
+ */
+public interface FullyQualifiedName extends ModelElementQuery
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // FullyQualifiedName
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Inverse.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Inverse.java
new file mode 100644
index 0000000..6265994
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Inverse.java
@@ -0,0 +1,35 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Inverse</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage#getInverse()
+ * @model
+ * @generated
+ */
+public interface Inverse extends ModelElementQuery
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // Inverse
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Multiplicity.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Multiplicity.java
new file mode 100644
index 0000000..486892f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Multiplicity.java
@@ -0,0 +1,35 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Multiplicity</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage#getMultiplicity()
+ * @model
+ * @generated
+ */
+public interface Multiplicity extends ModelElementQuery
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // Multiplicity
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Name.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Name.java
new file mode 100644
index 0000000..7fd62ff
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Name.java
@@ -0,0 +1,35 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Name</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage#getName_()
+ * @model
+ * @generated
+ */
+public interface Name extends ModelElementQuery
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // Name
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/QueryFunctionsFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/QueryFunctionsFactory.java
new file mode 100644
index 0000000..c5afb40
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/QueryFunctionsFactory.java
@@ -0,0 +1,131 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage
+ * @generated
+ */
+public interface QueryFunctionsFactory extends EFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The singleton instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  QueryFunctionsFactory eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsFactoryImpl.init();
+
+  /**
+   * Returns a new object of class '<em>Aggregate</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Aggregate</em>'.
+   * @generated
+   */
+  Aggregate createAggregate();
+
+  /**
+   * Returns a new object of class '<em>Source</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Source</em>'.
+   * @generated
+   */
+  Source createSource();
+
+  /**
+   * Returns a new object of class '<em>Target</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Target</em>'.
+   * @generated
+   */
+  Target createTarget();
+
+  /**
+   * Returns a new object of class '<em>Element Reference</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Element Reference</em>'.
+   * @generated
+   */
+  ElementReference createElementReference();
+
+  /**
+   * Returns a new object of class '<em>Fully Qualified Name</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Fully Qualified Name</em>'.
+   * @generated
+   */
+  FullyQualifiedName createFullyQualifiedName();
+
+  /**
+   * Returns a new object of class '<em>Name</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Name</em>'.
+   * @generated
+   */
+  Name createName();
+
+  /**
+   * Returns a new object of class '<em>Value</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Value</em>'.
+   * @generated
+   */
+  Value createValue();
+
+  /**
+   * Returns a new object of class '<em>Inverse</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Inverse</em>'.
+   * @generated
+   */
+  Inverse createInverse();
+
+  /**
+   * Returns a new object of class '<em>Multiplicity</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Multiplicity</em>'.
+   * @generated
+   */
+  Multiplicity createMultiplicity();
+
+  /**
+   * Returns the package supported by this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the package supported by this factory.
+   * @generated
+   */
+  QueryFunctionsPackage getQueryFunctionsPackage();
+
+} //QueryFunctionsFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/QueryFunctionsPackage.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/QueryFunctionsPackage.java
new file mode 100644
index 0000000..74a2b26
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/QueryFunctionsPackage.java
@@ -0,0 +1,1100 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ *   <li>each class,</li>
+ *   <li>each feature of each class,</li>
+ *   <li>each enum,</li>
+ *   <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface QueryFunctionsPackage extends EPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The package name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNAME = "queryFunctions";
+
+  /**
+   * The package namespace URI.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_URI = "http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions.ecore";
+
+  /**
+   * The package namespace name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_PREFIX = "viatragtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions";
+
+  /**
+   * The singleton instance of the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  QueryFunctionsPackage eINSTANCE = org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl.init();
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.AggregateImpl <em>Aggregate</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.AggregateImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl#getAggregate()
+   * @generated
+   */
+  int AGGREGATE = 0;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int AGGREGATE__ANNOTATIONS = TermsPackage.MODEL_ELEMENT_QUERY__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int AGGREGATE__NAME = TermsPackage.MODEL_ELEMENT_QUERY__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int AGGREGATE__ID = TermsPackage.MODEL_ELEMENT_QUERY__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int AGGREGATE__FQN = TermsPackage.MODEL_ELEMENT_QUERY__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int AGGREGATE__RUNTIME_ANNOTATIONS = TermsPackage.MODEL_ELEMENT_QUERY__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int AGGREGATE__KIND = TermsPackage.MODEL_ELEMENT_QUERY__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int AGGREGATE__TYPE = TermsPackage.MODEL_ELEMENT_QUERY__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Argument</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int AGGREGATE__ARGUMENT = TermsPackage.MODEL_ELEMENT_QUERY__ARGUMENT;
+
+  /**
+   * The number of structural features of the '<em>Aggregate</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int AGGREGATE_FEATURE_COUNT = TermsPackage.MODEL_ELEMENT_QUERY_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.SourceImpl <em>Source</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.SourceImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl#getSource()
+   * @generated
+   */
+  int SOURCE = 1;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SOURCE__ANNOTATIONS = TermsPackage.MODEL_ELEMENT_QUERY__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SOURCE__NAME = TermsPackage.MODEL_ELEMENT_QUERY__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SOURCE__ID = TermsPackage.MODEL_ELEMENT_QUERY__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SOURCE__FQN = TermsPackage.MODEL_ELEMENT_QUERY__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SOURCE__RUNTIME_ANNOTATIONS = TermsPackage.MODEL_ELEMENT_QUERY__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SOURCE__KIND = TermsPackage.MODEL_ELEMENT_QUERY__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SOURCE__TYPE = TermsPackage.MODEL_ELEMENT_QUERY__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Argument</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SOURCE__ARGUMENT = TermsPackage.MODEL_ELEMENT_QUERY__ARGUMENT;
+
+  /**
+   * The number of structural features of the '<em>Source</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SOURCE_FEATURE_COUNT = TermsPackage.MODEL_ELEMENT_QUERY_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.TargetImpl <em>Target</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.TargetImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl#getTarget()
+   * @generated
+   */
+  int TARGET = 2;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TARGET__ANNOTATIONS = TermsPackage.MODEL_ELEMENT_QUERY__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TARGET__NAME = TermsPackage.MODEL_ELEMENT_QUERY__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TARGET__ID = TermsPackage.MODEL_ELEMENT_QUERY__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TARGET__FQN = TermsPackage.MODEL_ELEMENT_QUERY__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TARGET__RUNTIME_ANNOTATIONS = TermsPackage.MODEL_ELEMENT_QUERY__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TARGET__KIND = TermsPackage.MODEL_ELEMENT_QUERY__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TARGET__TYPE = TermsPackage.MODEL_ELEMENT_QUERY__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Argument</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TARGET__ARGUMENT = TermsPackage.MODEL_ELEMENT_QUERY__ARGUMENT;
+
+  /**
+   * The number of structural features of the '<em>Target</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TARGET_FEATURE_COUNT = TermsPackage.MODEL_ELEMENT_QUERY_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.ElementReferenceImpl <em>Element Reference</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.ElementReferenceImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl#getElementReference()
+   * @generated
+   */
+  int ELEMENT_REFERENCE = 3;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_REFERENCE__ANNOTATIONS = TermsPackage.MODEL_ELEMENT_QUERY__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_REFERENCE__NAME = TermsPackage.MODEL_ELEMENT_QUERY__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_REFERENCE__ID = TermsPackage.MODEL_ELEMENT_QUERY__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_REFERENCE__FQN = TermsPackage.MODEL_ELEMENT_QUERY__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_REFERENCE__RUNTIME_ANNOTATIONS = TermsPackage.MODEL_ELEMENT_QUERY__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_REFERENCE__KIND = TermsPackage.MODEL_ELEMENT_QUERY__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_REFERENCE__TYPE = TermsPackage.MODEL_ELEMENT_QUERY__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Argument</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_REFERENCE__ARGUMENT = TermsPackage.MODEL_ELEMENT_QUERY__ARGUMENT;
+
+  /**
+   * The number of structural features of the '<em>Element Reference</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ELEMENT_REFERENCE_FEATURE_COUNT = TermsPackage.MODEL_ELEMENT_QUERY_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.FullyQualifiedNameImpl <em>Fully Qualified Name</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.FullyQualifiedNameImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl#getFullyQualifiedName()
+   * @generated
+   */
+  int FULLY_QUALIFIED_NAME = 4;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FULLY_QUALIFIED_NAME__ANNOTATIONS = TermsPackage.MODEL_ELEMENT_QUERY__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FULLY_QUALIFIED_NAME__NAME = TermsPackage.MODEL_ELEMENT_QUERY__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FULLY_QUALIFIED_NAME__ID = TermsPackage.MODEL_ELEMENT_QUERY__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FULLY_QUALIFIED_NAME__FQN = TermsPackage.MODEL_ELEMENT_QUERY__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FULLY_QUALIFIED_NAME__RUNTIME_ANNOTATIONS = TermsPackage.MODEL_ELEMENT_QUERY__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FULLY_QUALIFIED_NAME__KIND = TermsPackage.MODEL_ELEMENT_QUERY__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FULLY_QUALIFIED_NAME__TYPE = TermsPackage.MODEL_ELEMENT_QUERY__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Argument</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FULLY_QUALIFIED_NAME__ARGUMENT = TermsPackage.MODEL_ELEMENT_QUERY__ARGUMENT;
+
+  /**
+   * The number of structural features of the '<em>Fully Qualified Name</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int FULLY_QUALIFIED_NAME_FEATURE_COUNT = TermsPackage.MODEL_ELEMENT_QUERY_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.NameImpl <em>Name</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.NameImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl#getName_()
+   * @generated
+   */
+  int NAME = 5;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NAME__ANNOTATIONS = TermsPackage.MODEL_ELEMENT_QUERY__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NAME__NAME = TermsPackage.MODEL_ELEMENT_QUERY__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NAME__ID = TermsPackage.MODEL_ELEMENT_QUERY__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NAME__FQN = TermsPackage.MODEL_ELEMENT_QUERY__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NAME__RUNTIME_ANNOTATIONS = TermsPackage.MODEL_ELEMENT_QUERY__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NAME__KIND = TermsPackage.MODEL_ELEMENT_QUERY__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NAME__TYPE = TermsPackage.MODEL_ELEMENT_QUERY__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Argument</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NAME__ARGUMENT = TermsPackage.MODEL_ELEMENT_QUERY__ARGUMENT;
+
+  /**
+   * The number of structural features of the '<em>Name</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int NAME_FEATURE_COUNT = TermsPackage.MODEL_ELEMENT_QUERY_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.ValueImpl <em>Value</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.ValueImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl#getValue()
+   * @generated
+   */
+  int VALUE = 6;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VALUE__ANNOTATIONS = TermsPackage.MODEL_ELEMENT_QUERY__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VALUE__NAME = TermsPackage.MODEL_ELEMENT_QUERY__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VALUE__ID = TermsPackage.MODEL_ELEMENT_QUERY__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VALUE__FQN = TermsPackage.MODEL_ELEMENT_QUERY__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VALUE__RUNTIME_ANNOTATIONS = TermsPackage.MODEL_ELEMENT_QUERY__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VALUE__KIND = TermsPackage.MODEL_ELEMENT_QUERY__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VALUE__TYPE = TermsPackage.MODEL_ELEMENT_QUERY__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Argument</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VALUE__ARGUMENT = TermsPackage.MODEL_ELEMENT_QUERY__ARGUMENT;
+
+  /**
+   * The number of structural features of the '<em>Value</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VALUE_FEATURE_COUNT = TermsPackage.MODEL_ELEMENT_QUERY_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.InverseImpl <em>Inverse</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.InverseImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl#getInverse()
+   * @generated
+   */
+  int INVERSE = 7;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int INVERSE__ANNOTATIONS = TermsPackage.MODEL_ELEMENT_QUERY__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int INVERSE__NAME = TermsPackage.MODEL_ELEMENT_QUERY__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int INVERSE__ID = TermsPackage.MODEL_ELEMENT_QUERY__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int INVERSE__FQN = TermsPackage.MODEL_ELEMENT_QUERY__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int INVERSE__RUNTIME_ANNOTATIONS = TermsPackage.MODEL_ELEMENT_QUERY__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int INVERSE__KIND = TermsPackage.MODEL_ELEMENT_QUERY__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int INVERSE__TYPE = TermsPackage.MODEL_ELEMENT_QUERY__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Argument</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int INVERSE__ARGUMENT = TermsPackage.MODEL_ELEMENT_QUERY__ARGUMENT;
+
+  /**
+   * The number of structural features of the '<em>Inverse</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int INVERSE_FEATURE_COUNT = TermsPackage.MODEL_ELEMENT_QUERY_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.MultiplicityImpl <em>Multiplicity</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.MultiplicityImpl
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl#getMultiplicity()
+   * @generated
+   */
+  int MULTIPLICITY = 8;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MULTIPLICITY__ANNOTATIONS = TermsPackage.MODEL_ELEMENT_QUERY__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MULTIPLICITY__NAME = TermsPackage.MODEL_ELEMENT_QUERY__NAME;
+
+  /**
+   * The feature id for the '<em><b>Id</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MULTIPLICITY__ID = TermsPackage.MODEL_ELEMENT_QUERY__ID;
+
+  /**
+   * The feature id for the '<em><b>Fqn</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MULTIPLICITY__FQN = TermsPackage.MODEL_ELEMENT_QUERY__FQN;
+
+  /**
+   * The feature id for the '<em><b>Runtime Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MULTIPLICITY__RUNTIME_ANNOTATIONS = TermsPackage.MODEL_ELEMENT_QUERY__RUNTIME_ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Kind</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MULTIPLICITY__KIND = TermsPackage.MODEL_ELEMENT_QUERY__KIND;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MULTIPLICITY__TYPE = TermsPackage.MODEL_ELEMENT_QUERY__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Argument</b></em>' containment reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MULTIPLICITY__ARGUMENT = TermsPackage.MODEL_ELEMENT_QUERY__ARGUMENT;
+
+  /**
+   * The number of structural features of the '<em>Multiplicity</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MULTIPLICITY_FEATURE_COUNT = TermsPackage.MODEL_ELEMENT_QUERY_FEATURE_COUNT + 0;
+
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Aggregate <em>Aggregate</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Aggregate</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Aggregate
+   * @generated
+   */
+  EClass getAggregate();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Source <em>Source</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Source</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Source
+   * @generated
+   */
+  EClass getSource();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Target <em>Target</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Target</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Target
+   * @generated
+   */
+  EClass getTarget();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.ElementReference <em>Element Reference</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Element Reference</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.ElementReference
+   * @generated
+   */
+  EClass getElementReference();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.FullyQualifiedName <em>Fully Qualified Name</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Fully Qualified Name</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.FullyQualifiedName
+   * @generated
+   */
+  EClass getFullyQualifiedName();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Name <em>Name</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Name</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Name
+   * @generated
+   */
+  EClass getName_();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Value <em>Value</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Value</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Value
+   * @generated
+   */
+  EClass getValue();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Inverse <em>Inverse</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Inverse</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Inverse
+   * @generated
+   */
+  EClass getInverse();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Multiplicity <em>Multiplicity</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Multiplicity</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Multiplicity
+   * @generated
+   */
+  EClass getMultiplicity();
+
+  /**
+   * Returns the factory that creates the instances of the model.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the factory that creates the instances of the model.
+   * @generated
+   */
+  QueryFunctionsFactory getQueryFunctionsFactory();
+
+  /**
+   * <!-- begin-user-doc -->
+   * Defines literals for the meta objects that represent
+   * <ul>
+   *   <li>each class,</li>
+   *   <li>each feature of each class,</li>
+   *   <li>each enum,</li>
+   *   <li>and each data type</li>
+   * </ul>
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  interface Literals
+  {
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.AggregateImpl <em>Aggregate</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.AggregateImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl#getAggregate()
+     * @generated
+     */
+    EClass AGGREGATE = eINSTANCE.getAggregate();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.SourceImpl <em>Source</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.SourceImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl#getSource()
+     * @generated
+     */
+    EClass SOURCE = eINSTANCE.getSource();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.TargetImpl <em>Target</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.TargetImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl#getTarget()
+     * @generated
+     */
+    EClass TARGET = eINSTANCE.getTarget();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.ElementReferenceImpl <em>Element Reference</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.ElementReferenceImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl#getElementReference()
+     * @generated
+     */
+    EClass ELEMENT_REFERENCE = eINSTANCE.getElementReference();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.FullyQualifiedNameImpl <em>Fully Qualified Name</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.FullyQualifiedNameImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl#getFullyQualifiedName()
+     * @generated
+     */
+    EClass FULLY_QUALIFIED_NAME = eINSTANCE.getFullyQualifiedName();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.NameImpl <em>Name</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.NameImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl#getName_()
+     * @generated
+     */
+    EClass NAME = eINSTANCE.getName_();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.ValueImpl <em>Value</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.ValueImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl#getValue()
+     * @generated
+     */
+    EClass VALUE = eINSTANCE.getValue();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.InverseImpl <em>Inverse</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.InverseImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl#getInverse()
+     * @generated
+     */
+    EClass INVERSE = eINSTANCE.getInverse();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.MultiplicityImpl <em>Multiplicity</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.MultiplicityImpl
+     * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl#getMultiplicity()
+     * @generated
+     */
+    EClass MULTIPLICITY = eINSTANCE.getMultiplicity();
+
+  }
+
+} //QueryFunctionsPackage
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Source.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Source.java
new file mode 100644
index 0000000..fb7b69a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Source.java
@@ -0,0 +1,35 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Source</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage#getSource()
+ * @model
+ * @generated
+ */
+public interface Source extends ModelElementQuery
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // Source
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Target.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Target.java
new file mode 100644
index 0000000..ce1fc52
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Target.java
@@ -0,0 +1,35 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Target</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage#getTarget()
+ * @model
+ * @generated
+ */
+public interface Target extends ModelElementQuery
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // Target
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Value.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Value.java
new file mode 100644
index 0000000..7284ba4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/Value.java
@@ -0,0 +1,35 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Value</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage#getValue()
+ * @model
+ * @generated
+ */
+public interface Value extends ModelElementQuery
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // Value
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/AggregateImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/AggregateImpl.java
new file mode 100644
index 0000000..b453fd0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/AggregateImpl.java
@@ -0,0 +1,60 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ModelElementQueryImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Aggregate;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Aggregate</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class AggregateImpl extends ModelElementQueryImpl implements Aggregate
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected AggregateImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return QueryFunctionsPackage.Literals.AGGREGATE;
+  }
+
+} //AggregateImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/ElementReferenceImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/ElementReferenceImpl.java
new file mode 100644
index 0000000..8503169
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/ElementReferenceImpl.java
@@ -0,0 +1,60 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ModelElementQueryImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.ElementReference;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Element Reference</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class ElementReferenceImpl extends ModelElementQueryImpl implements ElementReference
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ElementReferenceImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return QueryFunctionsPackage.Literals.ELEMENT_REFERENCE;
+  }
+
+} //ElementReferenceImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/FullyQualifiedNameImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/FullyQualifiedNameImpl.java
new file mode 100644
index 0000000..84e9cf5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/FullyQualifiedNameImpl.java
@@ -0,0 +1,60 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ModelElementQueryImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.FullyQualifiedName;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Fully Qualified Name</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class FullyQualifiedNameImpl extends ModelElementQueryImpl implements FullyQualifiedName
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected FullyQualifiedNameImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return QueryFunctionsPackage.Literals.FULLY_QUALIFIED_NAME;
+  }
+
+} //FullyQualifiedNameImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/InverseImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/InverseImpl.java
new file mode 100644
index 0000000..bc960f0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/InverseImpl.java
@@ -0,0 +1,60 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ModelElementQueryImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Inverse;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Inverse</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class InverseImpl extends ModelElementQueryImpl implements Inverse
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected InverseImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return QueryFunctionsPackage.Literals.INVERSE;
+  }
+
+} //InverseImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/MultiplicityImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/MultiplicityImpl.java
new file mode 100644
index 0000000..b59e0ce
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/MultiplicityImpl.java
@@ -0,0 +1,60 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ModelElementQueryImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Multiplicity;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Multiplicity</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class MultiplicityImpl extends ModelElementQueryImpl implements Multiplicity
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected MultiplicityImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return QueryFunctionsPackage.Literals.MULTIPLICITY;
+  }
+
+} //MultiplicityImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/NameImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/NameImpl.java
new file mode 100644
index 0000000..8ffd3c8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/NameImpl.java
@@ -0,0 +1,60 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ModelElementQueryImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Name;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Name</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class NameImpl extends ModelElementQueryImpl implements Name
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected NameImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return QueryFunctionsPackage.Literals.NAME;
+  }
+
+} //NameImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/QueryFunctionsFactoryImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/QueryFunctionsFactoryImpl.java
new file mode 100644
index 0000000..f09ca5f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/QueryFunctionsFactoryImpl.java
@@ -0,0 +1,218 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class QueryFunctionsFactoryImpl extends EFactoryImpl implements QueryFunctionsFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Creates the default factory implementation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static QueryFunctionsFactory init()
+  {
+    try
+    {
+      QueryFunctionsFactory theQueryFunctionsFactory = (QueryFunctionsFactory)EPackage.Registry.INSTANCE.getEFactory("http:///viatragtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions.ecore"); 
+      if (theQueryFunctionsFactory != null)
+      {
+        return theQueryFunctionsFactory;
+      }
+    }
+    catch (Exception exception)
+    {
+      EcorePlugin.INSTANCE.log(exception);
+    }
+    return new QueryFunctionsFactoryImpl();
+  }
+
+  /**
+   * Creates an instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public QueryFunctionsFactoryImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public EObject create(EClass eClass)
+  {
+    switch (eClass.getClassifierID())
+    {
+      case QueryFunctionsPackage.AGGREGATE: return createAggregate();
+      case QueryFunctionsPackage.SOURCE: return createSource();
+      case QueryFunctionsPackage.TARGET: return createTarget();
+      case QueryFunctionsPackage.ELEMENT_REFERENCE: return createElementReference();
+      case QueryFunctionsPackage.FULLY_QUALIFIED_NAME: return createFullyQualifiedName();
+      case QueryFunctionsPackage.NAME: return createName();
+      case QueryFunctionsPackage.VALUE: return createValue();
+      case QueryFunctionsPackage.INVERSE: return createInverse();
+      case QueryFunctionsPackage.MULTIPLICITY: return createMultiplicity();
+      default:
+        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+    }
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Aggregate createAggregate()
+  {
+    AggregateImpl aggregate = new AggregateImpl();
+    return aggregate;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Source createSource()
+  {
+    SourceImpl source = new SourceImpl();
+    return source;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Target createTarget()
+  {
+    TargetImpl target = new TargetImpl();
+    return target;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ElementReference createElementReference()
+  {
+    ElementReferenceImpl elementReference = new ElementReferenceImpl();
+    return elementReference;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public FullyQualifiedName createFullyQualifiedName()
+  {
+    FullyQualifiedNameImpl fullyQualifiedName = new FullyQualifiedNameImpl();
+    return fullyQualifiedName;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Name createName()
+  {
+    NameImpl name = new NameImpl();
+    return name;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Value createValue()
+  {
+    ValueImpl value = new ValueImpl();
+    return value;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Inverse createInverse()
+  {
+    InverseImpl inverse = new InverseImpl();
+    return inverse;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Multiplicity createMultiplicity()
+  {
+    MultiplicityImpl multiplicity = new MultiplicityImpl();
+    return multiplicity;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public QueryFunctionsPackage getQueryFunctionsPackage()
+  {
+    return (QueryFunctionsPackage)getEPackage();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @deprecated
+   * @generated
+   */
+  @Deprecated
+  public static QueryFunctionsPackage getPackage()
+  {
+    return QueryFunctionsPackage.eINSTANCE;
+  }
+
+} //QueryFunctionsFactoryImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/QueryFunctionsPackageImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/QueryFunctionsPackageImpl.java
new file mode 100644
index 0000000..db5ac81
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/QueryFunctionsPackageImpl.java
@@ -0,0 +1,469 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymovePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Aggregate;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.ElementReference;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.FullyQualifiedName;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Inverse;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Multiplicity;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Name;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Source;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Target;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Value;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class QueryFunctionsPackageImpl extends EPackageImpl implements QueryFunctionsPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass aggregateEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass sourceEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass targetEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass elementReferenceEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass fullyQualifiedNameEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass nameEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass valueEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass inverseEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass multiplicityEClass = null;
+
+  /**
+   * Creates an instance of the model <b>Package</b>, registered with
+   * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+   * package URI value.
+   * <p>Note: the correct way to create the package is via the static
+   * factory method {@link #init init()}, which also performs
+   * initialization of the package, or returns the registered package,
+   * if one already exists.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.emf.ecore.EPackage.Registry
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage#eNS_URI
+   * @see #init()
+   * @generated
+   */
+  private QueryFunctionsPackageImpl()
+  {
+    super(eNS_URI, QueryFunctionsFactory.eINSTANCE);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static boolean isInited = false;
+
+  /**
+   * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+   * 
+   * <p>This method is used to initialize {@link QueryFunctionsPackage#eINSTANCE} when that field is accessed.
+   * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #eNS_URI
+   * @see #createPackageContents()
+   * @see #initializePackageContents()
+   * @generated
+   */
+  public static QueryFunctionsPackage init()
+  {
+    if (isInited) return (QueryFunctionsPackage)EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI);
+
+    // Obtain or create and register package
+    QueryFunctionsPackageImpl theQueryFunctionsPackage = (QueryFunctionsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof QueryFunctionsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new QueryFunctionsPackageImpl());
+
+    isInited = true;
+
+    // Obtain or create and register interdependencies
+    EditmodelPackageImpl theEditmodelPackage = (EditmodelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) instanceof EditmodelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI) : EditmodelPackage.eINSTANCE);
+    DeletionPackageImpl theDeletionPackage = (DeletionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) instanceof DeletionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) : DeletionPackage.eINSTANCE);
+    CreationPackageImpl theCreationPackage = (CreationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) instanceof CreationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) : CreationPackage.eINSTANCE);
+    CopymovePackageImpl theCopymovePackage = (CopymovePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) instanceof CopymovePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) : CopymovePackage.eINSTANCE);
+    UpdatePackageImpl theUpdatePackage = (UpdatePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) instanceof UpdatePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) : UpdatePackage.eINSTANCE);
+    DefinitionsPackageImpl theDefinitionsPackage = (DefinitionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) instanceof DefinitionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) : DefinitionsPackage.eINSTANCE);
+    CorePackageImpl theCorePackage = (CorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) instanceof CorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) : CorePackage.eINSTANCE);
+    SimpleRulesPackageImpl theSimpleRulesPackage = (SimpleRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) instanceof SimpleRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) : SimpleRulesPackage.eINSTANCE);
+    CompoundRulesPackageImpl theCompoundRulesPackage = (CompoundRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) instanceof CompoundRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) : CompoundRulesPackage.eINSTANCE);
+    EnumsPackageImpl theEnumsPackage = (EnumsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) instanceof EnumsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) : EnumsPackage.eINSTANCE);
+    TermsPackageImpl theTermsPackage = (TermsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) instanceof TermsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) : TermsPackage.eINSTANCE);
+    BuiltInFunctionsPackageImpl theBuiltInFunctionsPackage = (BuiltInFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) instanceof BuiltInFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) : BuiltInFunctionsPackage.eINSTANCE);
+    GtPackageImpl theGtPackage = (GtPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) instanceof GtPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) : GtPackage.eINSTANCE);
+
+    // Create package meta-data objects
+    theQueryFunctionsPackage.createPackageContents();
+    theEditmodelPackage.createPackageContents();
+    theDeletionPackage.createPackageContents();
+    theCreationPackage.createPackageContents();
+    theCopymovePackage.createPackageContents();
+    theUpdatePackage.createPackageContents();
+    theDefinitionsPackage.createPackageContents();
+    theCorePackage.createPackageContents();
+    theSimpleRulesPackage.createPackageContents();
+    theCompoundRulesPackage.createPackageContents();
+    theEnumsPackage.createPackageContents();
+    theTermsPackage.createPackageContents();
+    theBuiltInFunctionsPackage.createPackageContents();
+    theGtPackage.createPackageContents();
+
+    // Initialize created meta-data
+    theQueryFunctionsPackage.initializePackageContents();
+    theEditmodelPackage.initializePackageContents();
+    theDeletionPackage.initializePackageContents();
+    theCreationPackage.initializePackageContents();
+    theCopymovePackage.initializePackageContents();
+    theUpdatePackage.initializePackageContents();
+    theDefinitionsPackage.initializePackageContents();
+    theCorePackage.initializePackageContents();
+    theSimpleRulesPackage.initializePackageContents();
+    theCompoundRulesPackage.initializePackageContents();
+    theEnumsPackage.initializePackageContents();
+    theTermsPackage.initializePackageContents();
+    theBuiltInFunctionsPackage.initializePackageContents();
+    theGtPackage.initializePackageContents();
+
+    // Mark meta-data to indicate it can't be changed
+    theQueryFunctionsPackage.freeze();
+
+  
+    // Update the registry and return the package
+    EPackage.Registry.INSTANCE.put(QueryFunctionsPackage.eNS_URI, theQueryFunctionsPackage);
+    return theQueryFunctionsPackage;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getAggregate()
+  {
+    return aggregateEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getSource()
+  {
+    return sourceEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getTarget()
+  {
+    return targetEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getElementReference()
+  {
+    return elementReferenceEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getFullyQualifiedName()
+  {
+    return fullyQualifiedNameEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getName_()
+  {
+    return nameEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getValue()
+  {
+    return valueEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getInverse()
+  {
+    return inverseEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getMultiplicity()
+  {
+    return multiplicityEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public QueryFunctionsFactory getQueryFunctionsFactory()
+  {
+    return (QueryFunctionsFactory)getEFactoryInstance();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isCreated = false;
+
+  /**
+   * Creates the meta-model objects for the package.  This method is
+   * guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void createPackageContents()
+  {
+    if (isCreated) return;
+    isCreated = true;
+
+    // Create classes and their features
+    aggregateEClass = createEClass(AGGREGATE);
+
+    sourceEClass = createEClass(SOURCE);
+
+    targetEClass = createEClass(TARGET);
+
+    elementReferenceEClass = createEClass(ELEMENT_REFERENCE);
+
+    fullyQualifiedNameEClass = createEClass(FULLY_QUALIFIED_NAME);
+
+    nameEClass = createEClass(NAME);
+
+    valueEClass = createEClass(VALUE);
+
+    inverseEClass = createEClass(INVERSE);
+
+    multiplicityEClass = createEClass(MULTIPLICITY);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isInitialized = false;
+
+  /**
+   * Complete the initialization of the package and its meta-model.  This
+   * method is guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void initializePackageContents()
+  {
+    if (isInitialized) return;
+    isInitialized = true;
+
+    // Initialize package
+    setName(eNAME);
+    setNsPrefix(eNS_PREFIX);
+    setNsURI(eNS_URI);
+
+    // Obtain other dependent packages
+    TermsPackage theTermsPackage = (TermsPackage)EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI);
+
+    // Create type parameters
+
+    // Set bounds for type parameters
+
+    // Add supertypes to classes
+    aggregateEClass.getESuperTypes().add(theTermsPackage.getModelElementQuery());
+    sourceEClass.getESuperTypes().add(theTermsPackage.getModelElementQuery());
+    targetEClass.getESuperTypes().add(theTermsPackage.getModelElementQuery());
+    elementReferenceEClass.getESuperTypes().add(theTermsPackage.getModelElementQuery());
+    fullyQualifiedNameEClass.getESuperTypes().add(theTermsPackage.getModelElementQuery());
+    nameEClass.getESuperTypes().add(theTermsPackage.getModelElementQuery());
+    valueEClass.getESuperTypes().add(theTermsPackage.getModelElementQuery());
+    inverseEClass.getESuperTypes().add(theTermsPackage.getModelElementQuery());
+    multiplicityEClass.getESuperTypes().add(theTermsPackage.getModelElementQuery());
+
+    // Initialize classes and features; add operations and parameters
+    initEClass(aggregateEClass, Aggregate.class, "Aggregate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(sourceEClass, Source.class, "Source", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(targetEClass, Target.class, "Target", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(elementReferenceEClass, ElementReference.class, "ElementReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(fullyQualifiedNameEClass, FullyQualifiedName.class, "FullyQualifiedName", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(nameEClass, Name.class, "Name", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(valueEClass, Value.class, "Value", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(inverseEClass, Inverse.class, "Inverse", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(multiplicityEClass, Multiplicity.class, "Multiplicity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    // Create resource
+    createResource(eNS_URI);
+  }
+
+} //QueryFunctionsPackageImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/SourceImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/SourceImpl.java
new file mode 100644
index 0000000..56fb6d9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/SourceImpl.java
@@ -0,0 +1,60 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ModelElementQueryImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Source;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Source</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class SourceImpl extends ModelElementQueryImpl implements Source
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SourceImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return QueryFunctionsPackage.Literals.SOURCE;
+  }
+
+} //SourceImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/TargetImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/TargetImpl.java
new file mode 100644
index 0000000..e23a4db
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/TargetImpl.java
@@ -0,0 +1,60 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ModelElementQueryImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Target;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Target</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class TargetImpl extends ModelElementQueryImpl implements Target
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected TargetImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return QueryFunctionsPackage.Literals.TARGET;
+  }
+
+} //TargetImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/ValueImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/ValueImpl.java
new file mode 100644
index 0000000..c5162c5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/impl/ValueImpl.java
@@ -0,0 +1,60 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.ModelElementQueryImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Value;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Value</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class ValueImpl extends ModelElementQueryImpl implements Value
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ValueImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return QueryFunctionsPackage.Literals.VALUE;
+  }
+
+} //ValueImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/util/QueryFunctionsAdapterFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/util/QueryFunctionsAdapterFactory.java
new file mode 100644
index 0000000..9d4b6c6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/util/QueryFunctionsAdapterFactory.java
@@ -0,0 +1,394 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage
+ * @generated
+ */
+public class QueryFunctionsAdapterFactory extends AdapterFactoryImpl
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static QueryFunctionsPackage modelPackage;
+
+  /**
+   * Creates an instance of the adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public QueryFunctionsAdapterFactory()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = QueryFunctionsPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Returns whether this factory is applicable for the type of the object.
+   * <!-- begin-user-doc -->
+   * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+   * <!-- end-user-doc -->
+   * @return whether this factory is applicable for the type of the object.
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object object)
+  {
+    if (object == modelPackage)
+    {
+      return true;
+    }
+    if (object instanceof EObject)
+    {
+      return ((EObject)object).eClass().getEPackage() == modelPackage;
+    }
+    return false;
+  }
+
+  /**
+   * The switch that delegates to the <code>createXXX</code> methods.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected QueryFunctionsSwitch<Adapter> modelSwitch =
+    new QueryFunctionsSwitch<Adapter>()
+    {
+      @Override
+      public Adapter caseAggregate(Aggregate object)
+      {
+        return createAggregateAdapter();
+      }
+      @Override
+      public Adapter caseSource(Source object)
+      {
+        return createSourceAdapter();
+      }
+      @Override
+      public Adapter caseTarget(Target object)
+      {
+        return createTargetAdapter();
+      }
+      @Override
+      public Adapter caseElementReference(ElementReference object)
+      {
+        return createElementReferenceAdapter();
+      }
+      @Override
+      public Adapter caseFullyQualifiedName(FullyQualifiedName object)
+      {
+        return createFullyQualifiedNameAdapter();
+      }
+      @Override
+      public Adapter caseName(Name object)
+      {
+        return createNameAdapter();
+      }
+      @Override
+      public Adapter caseValue(Value object)
+      {
+        return createValueAdapter();
+      }
+      @Override
+      public Adapter caseInverse(Inverse object)
+      {
+        return createInverseAdapter();
+      }
+      @Override
+      public Adapter caseMultiplicity(Multiplicity object)
+      {
+        return createMultiplicityAdapter();
+      }
+      @Override
+      public Adapter caseAnnotatedElement(AnnotatedElement object)
+      {
+        return createAnnotatedElementAdapter();
+      }
+      @Override
+      public Adapter caseGTASMElement(GTASMElement object)
+      {
+        return createGTASMElementAdapter();
+      }
+      @Override
+      public Adapter caseTerm(Term object)
+      {
+        return createTermAdapter();
+      }
+      @Override
+      public Adapter caseModelElementQuery(ModelElementQuery object)
+      {
+        return createModelElementQueryAdapter();
+      }
+      @Override
+      public Adapter defaultCase(EObject object)
+      {
+        return createEObjectAdapter();
+      }
+    };
+
+  /**
+   * Creates an adapter for the <code>target</code>.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param target the object to adapt.
+   * @return the adapter for the <code>target</code>.
+   * @generated
+   */
+  @Override
+  public Adapter createAdapter(Notifier target)
+  {
+    return modelSwitch.doSwitch((EObject)target);
+  }
+
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Aggregate <em>Aggregate</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Aggregate
+   * @generated
+   */
+  public Adapter createAggregateAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Source <em>Source</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Source
+   * @generated
+   */
+  public Adapter createSourceAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Target <em>Target</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Target
+   * @generated
+   */
+  public Adapter createTargetAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.ElementReference <em>Element Reference</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.ElementReference
+   * @generated
+   */
+  public Adapter createElementReferenceAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.FullyQualifiedName <em>Fully Qualified Name</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.FullyQualifiedName
+   * @generated
+   */
+  public Adapter createFullyQualifiedNameAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Name <em>Name</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Name
+   * @generated
+   */
+  public Adapter createNameAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Value <em>Value</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Value
+   * @generated
+   */
+  public Adapter createValueAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Inverse <em>Inverse</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Inverse
+   * @generated
+   */
+  public Adapter createInverseAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Multiplicity <em>Multiplicity</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Multiplicity
+   * @generated
+   */
+  public Adapter createMultiplicityAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement <em>Annotated Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement
+   * @generated
+   */
+  public Adapter createAnnotatedElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement <em>GTASM Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement
+   * @generated
+   */
+  public Adapter createGTASMElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term <em>Term</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term
+   * @generated
+   */
+  public Adapter createTermAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery <em>Model Element Query</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery
+   * @generated
+   */
+  public Adapter createModelElementQueryAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for the default case.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @generated
+   */
+  public Adapter createEObjectAdapter()
+  {
+    return null;
+  }
+
+} //QueryFunctionsAdapterFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/util/QueryFunctionsSwitch.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/util/QueryFunctionsSwitch.java
new file mode 100644
index 0000000..a104812
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/gtasm/metamodel/modelmanagement/queryFunctions/util/QueryFunctionsSwitch.java
@@ -0,0 +1,444 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage
+ * @generated
+ */
+public class QueryFunctionsSwitch<T>
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static QueryFunctionsPackage modelPackage;
+
+  /**
+   * Creates an instance of the switch.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public QueryFunctionsSwitch()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = QueryFunctionsPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  public T doSwitch(EObject theEObject)
+  {
+    return doSwitch(theEObject.eClass(), theEObject);
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(EClass theEClass, EObject theEObject)
+  {
+    if (theEClass.eContainer() == modelPackage)
+    {
+      return doSwitch(theEClass.getClassifierID(), theEObject);
+    }
+    else
+    {
+      List<EClass> eSuperTypes = theEClass.getESuperTypes();
+      return
+        eSuperTypes.isEmpty() ?
+          defaultCase(theEObject) :
+          doSwitch(eSuperTypes.get(0), theEObject);
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(int classifierID, EObject theEObject)
+  {
+    switch (classifierID)
+    {
+      case QueryFunctionsPackage.AGGREGATE:
+      {
+        Aggregate aggregate = (Aggregate)theEObject;
+        T result = caseAggregate(aggregate);
+        if (result == null) result = caseModelElementQuery(aggregate);
+        if (result == null) result = caseTerm(aggregate);
+        if (result == null) result = caseGTASMElement(aggregate);
+        if (result == null) result = caseAnnotatedElement(aggregate);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case QueryFunctionsPackage.SOURCE:
+      {
+        Source source = (Source)theEObject;
+        T result = caseSource(source);
+        if (result == null) result = caseModelElementQuery(source);
+        if (result == null) result = caseTerm(source);
+        if (result == null) result = caseGTASMElement(source);
+        if (result == null) result = caseAnnotatedElement(source);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case QueryFunctionsPackage.TARGET:
+      {
+        Target target = (Target)theEObject;
+        T result = caseTarget(target);
+        if (result == null) result = caseModelElementQuery(target);
+        if (result == null) result = caseTerm(target);
+        if (result == null) result = caseGTASMElement(target);
+        if (result == null) result = caseAnnotatedElement(target);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case QueryFunctionsPackage.ELEMENT_REFERENCE:
+      {
+        ElementReference elementReference = (ElementReference)theEObject;
+        T result = caseElementReference(elementReference);
+        if (result == null) result = caseModelElementQuery(elementReference);
+        if (result == null) result = caseTerm(elementReference);
+        if (result == null) result = caseGTASMElement(elementReference);
+        if (result == null) result = caseAnnotatedElement(elementReference);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case QueryFunctionsPackage.FULLY_QUALIFIED_NAME:
+      {
+        FullyQualifiedName fullyQualifiedName = (FullyQualifiedName)theEObject;
+        T result = caseFullyQualifiedName(fullyQualifiedName);
+        if (result == null) result = caseModelElementQuery(fullyQualifiedName);
+        if (result == null) result = caseTerm(fullyQualifiedName);
+        if (result == null) result = caseGTASMElement(fullyQualifiedName);
+        if (result == null) result = caseAnnotatedElement(fullyQualifiedName);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case QueryFunctionsPackage.NAME:
+      {
+        Name name = (Name)theEObject;
+        T result = caseName(name);
+        if (result == null) result = caseModelElementQuery(name);
+        if (result == null) result = caseTerm(name);
+        if (result == null) result = caseGTASMElement(name);
+        if (result == null) result = caseAnnotatedElement(name);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case QueryFunctionsPackage.VALUE:
+      {
+        Value value = (Value)theEObject;
+        T result = caseValue(value);
+        if (result == null) result = caseModelElementQuery(value);
+        if (result == null) result = caseTerm(value);
+        if (result == null) result = caseGTASMElement(value);
+        if (result == null) result = caseAnnotatedElement(value);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case QueryFunctionsPackage.INVERSE:
+      {
+        Inverse inverse = (Inverse)theEObject;
+        T result = caseInverse(inverse);
+        if (result == null) result = caseModelElementQuery(inverse);
+        if (result == null) result = caseTerm(inverse);
+        if (result == null) result = caseGTASMElement(inverse);
+        if (result == null) result = caseAnnotatedElement(inverse);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case QueryFunctionsPackage.MULTIPLICITY:
+      {
+        Multiplicity multiplicity = (Multiplicity)theEObject;
+        T result = caseMultiplicity(multiplicity);
+        if (result == null) result = caseModelElementQuery(multiplicity);
+        if (result == null) result = caseTerm(multiplicity);
+        if (result == null) result = caseGTASMElement(multiplicity);
+        if (result == null) result = caseAnnotatedElement(multiplicity);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      default: return defaultCase(theEObject);
+    }
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Aggregate</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Aggregate</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseAggregate(Aggregate object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Source</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Source</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseSource(Source object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Target</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Target</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseTarget(Target object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Element Reference</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Element Reference</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseElementReference(ElementReference object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Fully Qualified Name</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Fully Qualified Name</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseFullyQualifiedName(FullyQualifiedName object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Name</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Name</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseName(Name object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Value</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Value</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseValue(Value object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Inverse</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Inverse</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseInverse(Inverse object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Multiplicity</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Multiplicity</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseMultiplicity(Multiplicity object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseAnnotatedElement(AnnotatedElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>GTASM Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseGTASMElement(GTASMElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Term</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Term</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseTerm(Term object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Model Element Query</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Model Element Query</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseModelElementQuery(ModelElementQuery object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch, but this is the last case anyway.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+   * @generated
+   */
+  public T defaultCase(EObject object)
+  {
+    return null;
+  }
+
+} //QueryFunctionsSwitch
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/EditmodelFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/EditmodelFactory.java
new file mode 100644
index 0000000..6306f82
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/EditmodelFactory.java
@@ -0,0 +1,86 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage
+ * @generated
+ */
+public interface EditmodelFactory extends EFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The singleton instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  EditmodelFactory eINSTANCE = org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelFactoryImpl.init();
+
+  /**
+   * Returns a new object of class '<em>Entity</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Entity</em>'.
+   * @generated
+   */
+  Entity createEntity();
+
+  /**
+   * Returns a new object of class '<em>Relation</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Relation</em>'.
+   * @generated
+   */
+  Relation createRelation();
+
+  /**
+   * Returns a new object of class '<em>Type Of</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Type Of</em>'.
+   * @generated
+   */
+  TypeOf createTypeOf();
+
+  /**
+   * Returns a new object of class '<em>Supertype Of</em>'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return a new object of class '<em>Supertype Of</em>'.
+   * @generated
+   */
+  SupertypeOf createSupertypeOf();
+
+  /**
+   * Returns the package supported by this factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the package supported by this factory.
+   * @generated
+   */
+  EditmodelPackage getEditmodelPackage();
+
+} //EditmodelFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/EditmodelPackage.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/EditmodelPackage.java
new file mode 100644
index 0000000..5150c97
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/EditmodelPackage.java
@@ -0,0 +1,1453 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ *   <li>each class,</li>
+ *   <li>each feature of each class,</li>
+ *   <li>each enum,</li>
+ *   <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface EditmodelPackage extends EPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The package name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNAME = "editmodel";
+
+  /**
+   * The package namespace URI.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_URI = "http:///viatragtasmmodel/vpm/editmodel.ecore";
+
+  /**
+   * The package namespace name.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String eNS_PREFIX = "viatragtasmmodel.vpm.editmodel";
+
+  /**
+   * The singleton instance of the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  EditmodelPackage eINSTANCE = org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl.init();
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.VPMElementImpl <em>VPM Element</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.VPMElementImpl
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl#getVPMElement()
+   * @generated
+   */
+  int VPM_ELEMENT = 6;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VPM_ELEMENT__ANNOTATIONS = CorePackage.ANNOTATED_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Variable References</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VPM_ELEMENT__VARIABLE_REFERENCES = CorePackage.ANNOTATED_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The number of structural features of the '<em>VPM Element</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int VPM_ELEMENT_FEATURE_COUNT = CorePackage.ANNOTATED_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.ModelElementImpl <em>Model Element</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.ModelElementImpl
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl#getModelElement()
+   * @generated
+   */
+  int MODEL_ELEMENT = 0;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT__ANNOTATIONS = VPM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Variable References</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT__VARIABLE_REFERENCES = VPM_ELEMENT__VARIABLE_REFERENCES;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT__TYPE = VPM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Instance</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT__INSTANCE = VPM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The feature id for the '<em><b>Supertype</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT__SUPERTYPE = VPM_ELEMENT_FEATURE_COUNT + 2;
+
+  /**
+   * The feature id for the '<em><b>Subtype</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT__SUBTYPE = VPM_ELEMENT_FEATURE_COUNT + 3;
+
+  /**
+   * The feature id for the '<em><b>Relations To</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT__RELATIONS_TO = VPM_ELEMENT_FEATURE_COUNT + 4;
+
+  /**
+   * The feature id for the '<em><b>Sub Relationships</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT__SUB_RELATIONSHIPS = VPM_ELEMENT_FEATURE_COUNT + 5;
+
+  /**
+   * The feature id for the '<em><b>Super Relationships</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT__SUPER_RELATIONSHIPS = VPM_ELEMENT_FEATURE_COUNT + 6;
+
+  /**
+   * The feature id for the '<em><b>Type Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT__TYPE_STR = VPM_ELEMENT_FEATURE_COUNT + 7;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT__NAME = VPM_ELEMENT_FEATURE_COUNT + 8;
+
+  /**
+   * The feature id for the '<em><b>Namespace Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT__NAMESPACE_STR = VPM_ELEMENT_FEATURE_COUNT + 9;
+
+  /**
+   * The feature id for the '<em><b>Real Element</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT__REAL_ELEMENT = VPM_ELEMENT_FEATURE_COUNT + 10;
+
+  /**
+   * The feature id for the '<em><b>Relations From</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT__RELATIONS_FROM = VPM_ELEMENT_FEATURE_COUNT + 11;
+
+  /**
+   * The number of structural features of the '<em>Model Element</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int MODEL_ELEMENT_FEATURE_COUNT = VPM_ELEMENT_FEATURE_COUNT + 12;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.RelationshipImpl <em>Relationship</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.RelationshipImpl
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl#getRelationship()
+   * @generated
+   */
+  int RELATIONSHIP = 1;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP__ANNOTATIONS = VPM_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Variable References</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP__VARIABLE_REFERENCES = VPM_ELEMENT__VARIABLE_REFERENCES;
+
+  /**
+   * The feature id for the '<em><b>Client Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP__CLIENT_STR = VPM_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Supplier Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP__SUPPLIER_STR = VPM_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The feature id for the '<em><b>Client</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP__CLIENT = VPM_ELEMENT_FEATURE_COUNT + 2;
+
+  /**
+   * The feature id for the '<em><b>Supplier</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP__SUPPLIER = VPM_ELEMENT_FEATURE_COUNT + 3;
+
+  /**
+   * The number of structural features of the '<em>Relationship</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATIONSHIP_FEATURE_COUNT = VPM_ELEMENT_FEATURE_COUNT + 4;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EntityImpl <em>Entity</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EntityImpl
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl#getEntity()
+   * @generated
+   */
+  int ENTITY = 2;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY__ANNOTATIONS = MODEL_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Variable References</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY__VARIABLE_REFERENCES = MODEL_ELEMENT__VARIABLE_REFERENCES;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY__TYPE = MODEL_ELEMENT__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Instance</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY__INSTANCE = MODEL_ELEMENT__INSTANCE;
+
+  /**
+   * The feature id for the '<em><b>Supertype</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY__SUPERTYPE = MODEL_ELEMENT__SUPERTYPE;
+
+  /**
+   * The feature id for the '<em><b>Subtype</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY__SUBTYPE = MODEL_ELEMENT__SUBTYPE;
+
+  /**
+   * The feature id for the '<em><b>Relations To</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY__RELATIONS_TO = MODEL_ELEMENT__RELATIONS_TO;
+
+  /**
+   * The feature id for the '<em><b>Sub Relationships</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY__SUB_RELATIONSHIPS = MODEL_ELEMENT__SUB_RELATIONSHIPS;
+
+  /**
+   * The feature id for the '<em><b>Super Relationships</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY__SUPER_RELATIONSHIPS = MODEL_ELEMENT__SUPER_RELATIONSHIPS;
+
+  /**
+   * The feature id for the '<em><b>Type Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY__TYPE_STR = MODEL_ELEMENT__TYPE_STR;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY__NAME = MODEL_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Namespace Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY__NAMESPACE_STR = MODEL_ELEMENT__NAMESPACE_STR;
+
+  /**
+   * The feature id for the '<em><b>Real Element</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY__REAL_ELEMENT = MODEL_ELEMENT__REAL_ELEMENT;
+
+  /**
+   * The feature id for the '<em><b>Relations From</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY__RELATIONS_FROM = MODEL_ELEMENT__RELATIONS_FROM;
+
+  /**
+   * The feature id for the '<em><b>Parent</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY__PARENT = MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>Components</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY__COMPONENTS = MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The feature id for the '<em><b>Value</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY__VALUE = MODEL_ELEMENT_FEATURE_COUNT + 2;
+
+  /**
+   * The number of structural features of the '<em>Entity</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int ENTITY_FEATURE_COUNT = MODEL_ELEMENT_FEATURE_COUNT + 3;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.RelationImpl <em>Relation</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.RelationImpl
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl#getRelation()
+   * @generated
+   */
+  int RELATION = 3;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION__ANNOTATIONS = MODEL_ELEMENT__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Variable References</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION__VARIABLE_REFERENCES = MODEL_ELEMENT__VARIABLE_REFERENCES;
+
+  /**
+   * The feature id for the '<em><b>Type</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION__TYPE = MODEL_ELEMENT__TYPE;
+
+  /**
+   * The feature id for the '<em><b>Instance</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION__INSTANCE = MODEL_ELEMENT__INSTANCE;
+
+  /**
+   * The feature id for the '<em><b>Supertype</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION__SUPERTYPE = MODEL_ELEMENT__SUPERTYPE;
+
+  /**
+   * The feature id for the '<em><b>Subtype</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION__SUBTYPE = MODEL_ELEMENT__SUBTYPE;
+
+  /**
+   * The feature id for the '<em><b>Relations To</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION__RELATIONS_TO = MODEL_ELEMENT__RELATIONS_TO;
+
+  /**
+   * The feature id for the '<em><b>Sub Relationships</b></em>' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION__SUB_RELATIONSHIPS = MODEL_ELEMENT__SUB_RELATIONSHIPS;
+
+  /**
+   * The feature id for the '<em><b>Super Relationships</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION__SUPER_RELATIONSHIPS = MODEL_ELEMENT__SUPER_RELATIONSHIPS;
+
+  /**
+   * The feature id for the '<em><b>Type Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION__TYPE_STR = MODEL_ELEMENT__TYPE_STR;
+
+  /**
+   * The feature id for the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION__NAME = MODEL_ELEMENT__NAME;
+
+  /**
+   * The feature id for the '<em><b>Namespace Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION__NAMESPACE_STR = MODEL_ELEMENT__NAMESPACE_STR;
+
+  /**
+   * The feature id for the '<em><b>Real Element</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION__REAL_ELEMENT = MODEL_ELEMENT__REAL_ELEMENT;
+
+  /**
+   * The feature id for the '<em><b>Relations From</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION__RELATIONS_FROM = MODEL_ELEMENT__RELATIONS_FROM;
+
+  /**
+   * The feature id for the '<em><b>To</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION__TO = MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+  /**
+   * The feature id for the '<em><b>From Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION__FROM_STR = MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+  /**
+   * The feature id for the '<em><b>To Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION__TO_STR = MODEL_ELEMENT_FEATURE_COUNT + 2;
+
+  /**
+   * The feature id for the '<em><b>From</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION__FROM = MODEL_ELEMENT_FEATURE_COUNT + 3;
+
+  /**
+   * The number of structural features of the '<em>Relation</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int RELATION_FEATURE_COUNT = MODEL_ELEMENT_FEATURE_COUNT + 4;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.TypeOfImpl <em>Type Of</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.TypeOfImpl
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl#getTypeOf()
+   * @generated
+   */
+  int TYPE_OF = 4;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TYPE_OF__ANNOTATIONS = RELATIONSHIP__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Variable References</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TYPE_OF__VARIABLE_REFERENCES = RELATIONSHIP__VARIABLE_REFERENCES;
+
+  /**
+   * The feature id for the '<em><b>Client Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TYPE_OF__CLIENT_STR = RELATIONSHIP__CLIENT_STR;
+
+  /**
+   * The feature id for the '<em><b>Supplier Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TYPE_OF__SUPPLIER_STR = RELATIONSHIP__SUPPLIER_STR;
+
+  /**
+   * The feature id for the '<em><b>Client</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TYPE_OF__CLIENT = RELATIONSHIP__CLIENT;
+
+  /**
+   * The feature id for the '<em><b>Supplier</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TYPE_OF__SUPPLIER = RELATIONSHIP__SUPPLIER;
+
+  /**
+   * The number of structural features of the '<em>Type Of</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int TYPE_OF_FEATURE_COUNT = RELATIONSHIP_FEATURE_COUNT + 0;
+
+  /**
+   * The meta object id for the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.SupertypeOfImpl <em>Supertype Of</em>}' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.SupertypeOfImpl
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl#getSupertypeOf()
+   * @generated
+   */
+  int SUPERTYPE_OF = 5;
+
+  /**
+   * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SUPERTYPE_OF__ANNOTATIONS = RELATIONSHIP__ANNOTATIONS;
+
+  /**
+   * The feature id for the '<em><b>Variable References</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SUPERTYPE_OF__VARIABLE_REFERENCES = RELATIONSHIP__VARIABLE_REFERENCES;
+
+  /**
+   * The feature id for the '<em><b>Client Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SUPERTYPE_OF__CLIENT_STR = RELATIONSHIP__CLIENT_STR;
+
+  /**
+   * The feature id for the '<em><b>Supplier Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SUPERTYPE_OF__SUPPLIER_STR = RELATIONSHIP__SUPPLIER_STR;
+
+  /**
+   * The feature id for the '<em><b>Client</b></em>' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SUPERTYPE_OF__CLIENT = RELATIONSHIP__CLIENT;
+
+  /**
+   * The feature id for the '<em><b>Supplier</b></em>' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SUPERTYPE_OF__SUPPLIER = RELATIONSHIP__SUPPLIER;
+
+  /**
+   * The number of structural features of the '<em>Supertype Of</em>' class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  int SUPERTYPE_OF_FEATURE_COUNT = RELATIONSHIP_FEATURE_COUNT + 0;
+
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement <em>Model Element</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Model Element</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement
+   * @generated
+   */
+  EClass getModelElement();
+
+  /**
+   * Returns the meta object for the reference list '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getType <em>Type</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference list '<em>Type</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getType()
+   * @see #getModelElement()
+   * @generated
+   */
+  EReference getModelElement_Type();
+
+  /**
+   * Returns the meta object for the reference list '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getInstance <em>Instance</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference list '<em>Instance</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getInstance()
+   * @see #getModelElement()
+   * @generated
+   */
+  EReference getModelElement_Instance();
+
+  /**
+   * Returns the meta object for the reference list '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSupertype <em>Supertype</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference list '<em>Supertype</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSupertype()
+   * @see #getModelElement()
+   * @generated
+   */
+  EReference getModelElement_Supertype();
+
+  /**
+   * Returns the meta object for the reference list '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSubtype <em>Subtype</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference list '<em>Subtype</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSubtype()
+   * @see #getModelElement()
+   * @generated
+   */
+  EReference getModelElement_Subtype();
+
+  /**
+   * Returns the meta object for the reference list '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getRelationsTo <em>Relations To</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference list '<em>Relations To</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getRelationsTo()
+   * @see #getModelElement()
+   * @generated
+   */
+  EReference getModelElement_RelationsTo();
+
+  /**
+   * Returns the meta object for the reference list '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSubRelationships <em>Sub Relationships</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference list '<em>Sub Relationships</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSubRelationships()
+   * @see #getModelElement()
+   * @generated
+   */
+  EReference getModelElement_SubRelationships();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSuperRelationships <em>Super Relationships</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Super Relationships</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSuperRelationships()
+   * @see #getModelElement()
+   * @generated
+   */
+  EReference getModelElement_SuperRelationships();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getTypeStr <em>Type Str</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Type Str</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getTypeStr()
+   * @see #getModelElement()
+   * @generated
+   */
+  EAttribute getModelElement_TypeStr();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getName <em>Name</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Name</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getName()
+   * @see #getModelElement()
+   * @generated
+   */
+  EAttribute getModelElement_Name();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getNamespaceStr <em>Namespace Str</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Namespace Str</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getNamespaceStr()
+   * @see #getModelElement()
+   * @generated
+   */
+  EAttribute getModelElement_NamespaceStr();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getRealElement <em>Real Element</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Real Element</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getRealElement()
+   * @see #getModelElement()
+   * @generated
+   */
+  EAttribute getModelElement_RealElement();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getRelationsFrom <em>Relations From</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Relations From</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getRelationsFrom()
+   * @see #getModelElement()
+   * @generated
+   */
+  EReference getModelElement_RelationsFrom();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship <em>Relationship</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Relationship</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship
+   * @generated
+   */
+  EClass getRelationship();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getClientStr <em>Client Str</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Client Str</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getClientStr()
+   * @see #getRelationship()
+   * @generated
+   */
+  EAttribute getRelationship_ClientStr();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getSupplierStr <em>Supplier Str</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Supplier Str</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getSupplierStr()
+   * @see #getRelationship()
+   * @generated
+   */
+  EAttribute getRelationship_SupplierStr();
+
+  /**
+   * Returns the meta object for the container reference '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getClient <em>Client</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the container reference '<em>Client</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getClient()
+   * @see #getRelationship()
+   * @generated
+   */
+  EReference getRelationship_Client();
+
+  /**
+   * Returns the meta object for the reference '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getSupplier <em>Supplier</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference '<em>Supplier</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getSupplier()
+   * @see #getRelationship()
+   * @generated
+   */
+  EReference getRelationship_Supplier();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity <em>Entity</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Entity</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity
+   * @generated
+   */
+  EClass getEntity();
+
+  /**
+   * Returns the meta object for the container reference '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity#getParent <em>Parent</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the container reference '<em>Parent</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity#getParent()
+   * @see #getEntity()
+   * @generated
+   */
+  EReference getEntity_Parent();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity#getComponents <em>Components</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Components</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity#getComponents()
+   * @see #getEntity()
+   * @generated
+   */
+  EReference getEntity_Components();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity#getValue <em>Value</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>Value</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity#getValue()
+   * @see #getEntity()
+   * @generated
+   */
+  EAttribute getEntity_Value();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation <em>Relation</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Relation</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation
+   * @generated
+   */
+  EClass getRelation();
+
+  /**
+   * Returns the meta object for the reference '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getTo <em>To</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the reference '<em>To</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getTo()
+   * @see #getRelation()
+   * @generated
+   */
+  EReference getRelation_To();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getFromStr <em>From Str</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>From Str</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getFromStr()
+   * @see #getRelation()
+   * @generated
+   */
+  EAttribute getRelation_FromStr();
+
+  /**
+   * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getToStr <em>To Str</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the attribute '<em>To Str</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getToStr()
+   * @see #getRelation()
+   * @generated
+   */
+  EAttribute getRelation_ToStr();
+
+  /**
+   * Returns the meta object for the container reference '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getFrom <em>From</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the container reference '<em>From</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getFrom()
+   * @see #getRelation()
+   * @generated
+   */
+  EReference getRelation_From();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.TypeOf <em>Type Of</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Type Of</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.TypeOf
+   * @generated
+   */
+  EClass getTypeOf();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.SupertypeOf <em>Supertype Of</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>Supertype Of</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.SupertypeOf
+   * @generated
+   */
+  EClass getSupertypeOf();
+
+  /**
+   * Returns the meta object for class '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.VPMElement <em>VPM Element</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for class '<em>VPM Element</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.VPMElement
+   * @generated
+   */
+  EClass getVPMElement();
+
+  /**
+   * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.VPMElement#getVariableReferences <em>Variable References</em>}'.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the meta object for the containment reference list '<em>Variable References</em>'.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.VPMElement#getVariableReferences()
+   * @see #getVPMElement()
+   * @generated
+   */
+  EReference getVPMElement_VariableReferences();
+
+  /**
+   * Returns the factory that creates the instances of the model.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the factory that creates the instances of the model.
+   * @generated
+   */
+  EditmodelFactory getEditmodelFactory();
+
+  /**
+   * <!-- begin-user-doc -->
+   * Defines literals for the meta objects that represent
+   * <ul>
+   *   <li>each class,</li>
+   *   <li>each feature of each class,</li>
+   *   <li>each enum,</li>
+   *   <li>and each data type</li>
+   * </ul>
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  interface Literals
+  {
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.ModelElementImpl <em>Model Element</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.ModelElementImpl
+     * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl#getModelElement()
+     * @generated
+     */
+    EClass MODEL_ELEMENT = eINSTANCE.getModelElement();
+
+    /**
+     * The meta object literal for the '<em><b>Type</b></em>' reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MODEL_ELEMENT__TYPE = eINSTANCE.getModelElement_Type();
+
+    /**
+     * The meta object literal for the '<em><b>Instance</b></em>' reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MODEL_ELEMENT__INSTANCE = eINSTANCE.getModelElement_Instance();
+
+    /**
+     * The meta object literal for the '<em><b>Supertype</b></em>' reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MODEL_ELEMENT__SUPERTYPE = eINSTANCE.getModelElement_Supertype();
+
+    /**
+     * The meta object literal for the '<em><b>Subtype</b></em>' reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MODEL_ELEMENT__SUBTYPE = eINSTANCE.getModelElement_Subtype();
+
+    /**
+     * The meta object literal for the '<em><b>Relations To</b></em>' reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MODEL_ELEMENT__RELATIONS_TO = eINSTANCE.getModelElement_RelationsTo();
+
+    /**
+     * The meta object literal for the '<em><b>Sub Relationships</b></em>' reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MODEL_ELEMENT__SUB_RELATIONSHIPS = eINSTANCE.getModelElement_SubRelationships();
+
+    /**
+     * The meta object literal for the '<em><b>Super Relationships</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MODEL_ELEMENT__SUPER_RELATIONSHIPS = eINSTANCE.getModelElement_SuperRelationships();
+
+    /**
+     * The meta object literal for the '<em><b>Type Str</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute MODEL_ELEMENT__TYPE_STR = eINSTANCE.getModelElement_TypeStr();
+
+    /**
+     * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute MODEL_ELEMENT__NAME = eINSTANCE.getModelElement_Name();
+
+    /**
+     * The meta object literal for the '<em><b>Namespace Str</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute MODEL_ELEMENT__NAMESPACE_STR = eINSTANCE.getModelElement_NamespaceStr();
+
+    /**
+     * The meta object literal for the '<em><b>Real Element</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute MODEL_ELEMENT__REAL_ELEMENT = eINSTANCE.getModelElement_RealElement();
+
+    /**
+     * The meta object literal for the '<em><b>Relations From</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference MODEL_ELEMENT__RELATIONS_FROM = eINSTANCE.getModelElement_RelationsFrom();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.RelationshipImpl <em>Relationship</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.RelationshipImpl
+     * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl#getRelationship()
+     * @generated
+     */
+    EClass RELATIONSHIP = eINSTANCE.getRelationship();
+
+    /**
+     * The meta object literal for the '<em><b>Client Str</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute RELATIONSHIP__CLIENT_STR = eINSTANCE.getRelationship_ClientStr();
+
+    /**
+     * The meta object literal for the '<em><b>Supplier Str</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute RELATIONSHIP__SUPPLIER_STR = eINSTANCE.getRelationship_SupplierStr();
+
+    /**
+     * The meta object literal for the '<em><b>Client</b></em>' container reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference RELATIONSHIP__CLIENT = eINSTANCE.getRelationship_Client();
+
+    /**
+     * The meta object literal for the '<em><b>Supplier</b></em>' reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference RELATIONSHIP__SUPPLIER = eINSTANCE.getRelationship_Supplier();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EntityImpl <em>Entity</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EntityImpl
+     * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl#getEntity()
+     * @generated
+     */
+    EClass ENTITY = eINSTANCE.getEntity();
+
+    /**
+     * The meta object literal for the '<em><b>Parent</b></em>' container reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference ENTITY__PARENT = eINSTANCE.getEntity_Parent();
+
+    /**
+     * The meta object literal for the '<em><b>Components</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference ENTITY__COMPONENTS = eINSTANCE.getEntity_Components();
+
+    /**
+     * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute ENTITY__VALUE = eINSTANCE.getEntity_Value();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.RelationImpl <em>Relation</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.RelationImpl
+     * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl#getRelation()
+     * @generated
+     */
+    EClass RELATION = eINSTANCE.getRelation();
+
+    /**
+     * The meta object literal for the '<em><b>To</b></em>' reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference RELATION__TO = eINSTANCE.getRelation_To();
+
+    /**
+     * The meta object literal for the '<em><b>From Str</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute RELATION__FROM_STR = eINSTANCE.getRelation_FromStr();
+
+    /**
+     * The meta object literal for the '<em><b>To Str</b></em>' attribute feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EAttribute RELATION__TO_STR = eINSTANCE.getRelation_ToStr();
+
+    /**
+     * The meta object literal for the '<em><b>From</b></em>' container reference feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference RELATION__FROM = eINSTANCE.getRelation_From();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.TypeOfImpl <em>Type Of</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.TypeOfImpl
+     * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl#getTypeOf()
+     * @generated
+     */
+    EClass TYPE_OF = eINSTANCE.getTypeOf();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.SupertypeOfImpl <em>Supertype Of</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.SupertypeOfImpl
+     * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl#getSupertypeOf()
+     * @generated
+     */
+    EClass SUPERTYPE_OF = eINSTANCE.getSupertypeOf();
+
+    /**
+     * The meta object literal for the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.VPMElementImpl <em>VPM Element</em>}' class.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.VPMElementImpl
+     * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EditmodelPackageImpl#getVPMElement()
+     * @generated
+     */
+    EClass VPM_ELEMENT = eINSTANCE.getVPMElement();
+
+    /**
+     * The meta object literal for the '<em><b>Variable References</b></em>' containment reference list feature.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    EReference VPM_ELEMENT__VARIABLE_REFERENCES = eINSTANCE.getVPMElement_VariableReferences();
+
+  }
+
+} //EditmodelPackage
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/Entity.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/Entity.java
new file mode 100644
index 0000000..2a7d7e7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/Entity.java
@@ -0,0 +1,115 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Entity</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity#getParent <em>Parent</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity#getComponents <em>Components</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getEntity()
+ * @model
+ * @generated
+ */
+public interface Entity extends ModelElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Parent</b></em>' container reference.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity#getComponents <em>Components</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Parent</em>' container reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Parent</em>' container reference.
+   * @see #setParent(Entity)
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getEntity_Parent()
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity#getComponents
+   * @model opposite="components" transient="false"
+   * @generated
+   */
+  Entity getParent();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity#getParent <em>Parent</em>}' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Parent</em>' container reference.
+   * @see #getParent()
+   * @generated
+   */
+  void setParent(Entity value);
+
+  /**
+   * Returns the value of the '<em><b>Components</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity}.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity#getParent <em>Parent</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Components</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Components</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getEntity_Components()
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity#getParent
+   * @model opposite="parent" containment="true" ordered="false"
+   * @generated
+   */
+  EList<Entity> getComponents();
+
+  /**
+   * Returns the value of the '<em><b>Value</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Value</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Value</em>' attribute.
+   * @see #setValue(String)
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getEntity_Value()
+   * @model unique="false" required="true" ordered="false"
+   * @generated
+   */
+  String getValue();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity#getValue <em>Value</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Value</em>' attribute.
+   * @see #getValue()
+   * @generated
+   */
+  void setValue(String value);
+
+} // Entity
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/ModelElement.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/ModelElement.java
new file mode 100644
index 0000000..9f7bf39
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/ModelElement.java
@@ -0,0 +1,300 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Model Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getType <em>Type</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getInstance <em>Instance</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSupertype <em>Supertype</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSubtype <em>Subtype</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getRelationsTo <em>Relations To</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSubRelationships <em>Sub Relationships</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSuperRelationships <em>Super Relationships</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getTypeStr <em>Type Str</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getName <em>Name</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getNamespaceStr <em>Namespace Str</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getRealElement <em>Real Element</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getRelationsFrom <em>Relations From</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getModelElement()
+ * @model abstract="true"
+ * @generated
+ */
+public interface ModelElement extends VPMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Type</b></em>' reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement}.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getInstance <em>Instance</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Type</em>' reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Type</em>' reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getModelElement_Type()
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getInstance
+   * @model opposite="instance" ordered="false"
+   * @generated
+   */
+  EList<ModelElement> getType();
+
+  /**
+   * Returns the value of the '<em><b>Instance</b></em>' reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement}.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getType <em>Type</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Instance</em>' reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Instance</em>' reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getModelElement_Instance()
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getType
+   * @model opposite="type" ordered="false"
+   * @generated
+   */
+  EList<ModelElement> getInstance();
+
+  /**
+   * Returns the value of the '<em><b>Supertype</b></em>' reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement}.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSubtype <em>Subtype</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Supertype</em>' reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Supertype</em>' reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getModelElement_Supertype()
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSubtype
+   * @model opposite="subtype" ordered="false"
+   * @generated
+   */
+  EList<ModelElement> getSupertype();
+
+  /**
+   * Returns the value of the '<em><b>Subtype</b></em>' reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement}.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSupertype <em>Supertype</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Subtype</em>' reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Subtype</em>' reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getModelElement_Subtype()
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSupertype
+   * @model opposite="supertype" ordered="false"
+   * @generated
+   */
+  EList<ModelElement> getSubtype();
+
+  /**
+   * Returns the value of the '<em><b>Relations To</b></em>' reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation}.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getTo <em>To</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Relations To</em>' reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Relations To</em>' reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getModelElement_RelationsTo()
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getTo
+   * @model opposite="to"
+   * @generated
+   */
+  EList<Relation> getRelationsTo();
+
+  /**
+   * Returns the value of the '<em><b>Sub Relationships</b></em>' reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship}.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getSupplier <em>Supplier</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Sub Relationships</em>' reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Sub Relationships</em>' reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getModelElement_SubRelationships()
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getSupplier
+   * @model opposite="supplier" ordered="false"
+   * @generated
+   */
+  EList<Relationship> getSubRelationships();
+
+  /**
+   * Returns the value of the '<em><b>Super Relationships</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship}.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getClient <em>Client</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Super Relationships</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Super Relationships</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getModelElement_SuperRelationships()
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getClient
+   * @model opposite="client" containment="true" ordered="false"
+   * @generated
+   */
+  EList<Relationship> getSuperRelationships();
+
+  /**
+   * Returns the value of the '<em><b>Type Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Type Str</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Type Str</em>' attribute.
+   * @see #setTypeStr(String)
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getModelElement_TypeStr()
+   * @model unique="false" required="true" ordered="false"
+   * @generated
+   */
+  String getTypeStr();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getTypeStr <em>Type Str</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Type Str</em>' attribute.
+   * @see #getTypeStr()
+   * @generated
+   */
+  void setTypeStr(String value);
+
+  /**
+   * Returns the value of the '<em><b>Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Name</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Name</em>' attribute.
+   * @see #setName(String)
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getModelElement_Name()
+   * @model unique="false" required="true" ordered="false"
+   * @generated
+   */
+  String getName();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getName <em>Name</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Name</em>' attribute.
+   * @see #getName()
+   * @generated
+   */
+  void setName(String value);
+
+  /**
+   * Returns the value of the '<em><b>Namespace Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Namespace Str</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Namespace Str</em>' attribute.
+   * @see #setNamespaceStr(String)
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getModelElement_NamespaceStr()
+   * @model unique="false" required="true" ordered="false"
+   * @generated
+   */
+  String getNamespaceStr();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getNamespaceStr <em>Namespace Str</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Namespace Str</em>' attribute.
+   * @see #getNamespaceStr()
+   * @generated
+   */
+  void setNamespaceStr(String value);
+
+  /**
+   * Returns the value of the '<em><b>Real Element</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Real Element</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Real Element</em>' attribute.
+   * @see #setRealElement(String)
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getModelElement_RealElement()
+   * @model
+   * @generated
+   */
+  String getRealElement();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getRealElement <em>Real Element</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Real Element</em>' attribute.
+   * @see #getRealElement()
+   * @generated
+   */
+  void setRealElement(String value);
+
+  /**
+   * Returns the value of the '<em><b>Relations From</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation}.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getFrom <em>From</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Relations From</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Relations From</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getModelElement_RelationsFrom()
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getFrom
+   * @model opposite="from" containment="true"
+   * @generated
+   */
+  EList<Relation> getRelationsFrom();
+
+} // ModelElement
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/Relation.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/Relation.java
new file mode 100644
index 0000000..4e45dea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/Relation.java
@@ -0,0 +1,151 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Relation</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getTo <em>To</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getFromStr <em>From Str</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getToStr <em>To Str</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getFrom <em>From</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getRelation()
+ * @model
+ * @generated
+ */
+public interface Relation extends ModelElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>To</b></em>' reference.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getRelationsTo <em>Relations To</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>To</em>' reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>To</em>' reference.
+   * @see #setTo(ModelElement)
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getRelation_To()
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getRelationsTo
+   * @model opposite="relationsTo" required="true" ordered="false"
+   * @generated
+   */
+  ModelElement getTo();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getTo <em>To</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>To</em>' reference.
+   * @see #getTo()
+   * @generated
+   */
+  void setTo(ModelElement value);
+
+  /**
+   * Returns the value of the '<em><b>From Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>From Str</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>From Str</em>' attribute.
+   * @see #setFromStr(String)
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getRelation_FromStr()
+   * @model unique="false" required="true" ordered="false"
+   * @generated
+   */
+  String getFromStr();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getFromStr <em>From Str</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>From Str</em>' attribute.
+   * @see #getFromStr()
+   * @generated
+   */
+  void setFromStr(String value);
+
+  /**
+   * Returns the value of the '<em><b>To Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>To Str</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>To Str</em>' attribute.
+   * @see #setToStr(String)
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getRelation_ToStr()
+   * @model unique="false" required="true" ordered="false"
+   * @generated
+   */
+  String getToStr();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getToStr <em>To Str</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>To Str</em>' attribute.
+   * @see #getToStr()
+   * @generated
+   */
+  void setToStr(String value);
+
+  /**
+   * Returns the value of the '<em><b>From</b></em>' container reference.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getRelationsFrom <em>Relations From</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>From</em>' container reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>From</em>' container reference.
+   * @see #setFrom(ModelElement)
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getRelation_From()
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getRelationsFrom
+   * @model opposite="relationsFrom" transient="false"
+   * @generated
+   */
+  ModelElement getFrom();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation#getFrom <em>From</em>}' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>From</em>' container reference.
+   * @see #getFrom()
+   * @generated
+   */
+  void setFrom(ModelElement value);
+
+} // Relation
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/Relationship.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/Relationship.java
new file mode 100644
index 0000000..f68f3d7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/Relationship.java
@@ -0,0 +1,151 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Relationship</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getClientStr <em>Client Str</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getSupplierStr <em>Supplier Str</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getClient <em>Client</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getSupplier <em>Supplier</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getRelationship()
+ * @model abstract="true"
+ * @generated
+ */
+public interface Relationship extends VPMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Client Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Client Str</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Client Str</em>' attribute.
+   * @see #setClientStr(String)
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getRelationship_ClientStr()
+   * @model unique="false" required="true" ordered="false"
+   * @generated
+   */
+  String getClientStr();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getClientStr <em>Client Str</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Client Str</em>' attribute.
+   * @see #getClientStr()
+   * @generated
+   */
+  void setClientStr(String value);
+
+  /**
+   * Returns the value of the '<em><b>Supplier Str</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Supplier Str</em>' attribute isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Supplier Str</em>' attribute.
+   * @see #setSupplierStr(String)
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getRelationship_SupplierStr()
+   * @model unique="false" required="true" ordered="false"
+   * @generated
+   */
+  String getSupplierStr();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getSupplierStr <em>Supplier Str</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Supplier Str</em>' attribute.
+   * @see #getSupplierStr()
+   * @generated
+   */
+  void setSupplierStr(String value);
+
+  /**
+   * Returns the value of the '<em><b>Client</b></em>' container reference.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSuperRelationships <em>Super Relationships</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Client</em>' container reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Client</em>' container reference.
+   * @see #setClient(ModelElement)
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getRelationship_Client()
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSuperRelationships
+   * @model opposite="superRelationships" ordered="false"
+   * @generated
+   */
+  ModelElement getClient();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getClient <em>Client</em>}' container reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Client</em>' container reference.
+   * @see #getClient()
+   * @generated
+   */
+  void setClient(ModelElement value);
+
+  /**
+   * Returns the value of the '<em><b>Supplier</b></em>' reference.
+   * It is bidirectional and its opposite is '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSubRelationships <em>Sub Relationships</em>}'.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Supplier</em>' reference isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Supplier</em>' reference.
+   * @see #setSupplier(ModelElement)
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getRelationship_Supplier()
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement#getSubRelationships
+   * @model opposite="subRelationships" required="true" ordered="false"
+   * @generated
+   */
+  ModelElement getSupplier();
+
+  /**
+   * Sets the value of the '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship#getSupplier <em>Supplier</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param value the new value of the '<em>Supplier</em>' reference.
+   * @see #getSupplier()
+   * @generated
+   */
+  void setSupplier(ModelElement value);
+
+} // Relationship
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/SupertypeOf.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/SupertypeOf.java
new file mode 100644
index 0000000..7d6ac20
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/SupertypeOf.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Supertype Of</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getSupertypeOf()
+ * @model
+ * @generated
+ */
+public interface SupertypeOf extends Relationship
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // SupertypeOf
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/TypeOf.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/TypeOf.java
new file mode 100644
index 0000000..7b0f62c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/TypeOf.java
@@ -0,0 +1,34 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Of</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getTypeOf()
+ * @model
+ * @generated
+ */
+public interface TypeOf extends Relationship
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+} // TypeOf
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/VPMElement.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/VPMElement.java
new file mode 100644
index 0000000..77d9db1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/VPMElement.java
@@ -0,0 +1,61 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>VPM Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.VPMElement#getVariableReferences <em>Variable References</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getVPMElement()
+ * @model abstract="true"
+ * @generated
+ */
+public interface VPMElement extends AnnotatedElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Returns the value of the '<em><b>Variable References</b></em>' containment reference list.
+   * The list contents are of type {@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference}.
+   * <!-- begin-user-doc -->
+   * <p>
+   * If the meaning of the '<em>Variable References</em>' containment reference list isn't clear,
+   * there really should be more of a description here...
+   * </p>
+   * <!-- end-user-doc -->
+   * @return the value of the '<em>Variable References</em>' containment reference list.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#getVPMElement_VariableReferences()
+   * @model containment="true"
+   * @generated
+   */
+  EList<VariableReference> getVariableReferences();
+
+} // VPMElement
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/EditmodelFactoryImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/EditmodelFactoryImpl.java
new file mode 100644
index 0000000..23fbe5c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/EditmodelFactoryImpl.java
@@ -0,0 +1,158 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class EditmodelFactoryImpl extends EFactoryImpl implements EditmodelFactory
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * Creates the default factory implementation.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static EditmodelFactory init()
+  {
+    try
+    {
+      EditmodelFactory theEditmodelFactory = (EditmodelFactory)EPackage.Registry.INSTANCE.getEFactory("http:///viatragtasmmodel/vpm/editmodel.ecore"); 
+      if (theEditmodelFactory != null)
+      {
+        return theEditmodelFactory;
+      }
+    }
+    catch (Exception exception)
+    {
+      EcorePlugin.INSTANCE.log(exception);
+    }
+    return new EditmodelFactoryImpl();
+  }
+
+  /**
+   * Creates an instance of the factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EditmodelFactoryImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public EObject create(EClass eClass)
+  {
+    switch (eClass.getClassifierID())
+    {
+      case EditmodelPackage.ENTITY: return createEntity();
+      case EditmodelPackage.RELATION: return createRelation();
+      case EditmodelPackage.TYPE_OF: return createTypeOf();
+      case EditmodelPackage.SUPERTYPE_OF: return createSupertypeOf();
+      default:
+        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+    }
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Entity createEntity()
+  {
+    EntityImpl entity = new EntityImpl();
+    return entity;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Relation createRelation()
+  {
+    RelationImpl relation = new RelationImpl();
+    return relation;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public TypeOf createTypeOf()
+  {
+    TypeOfImpl typeOf = new TypeOfImpl();
+    return typeOf;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public SupertypeOf createSupertypeOf()
+  {
+    SupertypeOfImpl supertypeOf = new SupertypeOfImpl();
+    return supertypeOf;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EditmodelPackage getEditmodelPackage()
+  {
+    return (EditmodelPackage)getEPackage();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @deprecated
+   * @generated
+   */
+  @Deprecated
+  public static EditmodelPackage getPackage()
+  {
+    return EditmodelPackage.eINSTANCE;
+  }
+
+} //EditmodelFactoryImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/EditmodelPackageImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/EditmodelPackageImpl.java
new file mode 100644
index 0000000..babf0e2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/EditmodelPackageImpl.java
@@ -0,0 +1,714 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.impl.CompoundRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CorePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.impl.DefinitionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.EnumsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.impl.EnumsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.impl.BuiltInFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.impl.TermsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.impl.GtPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymovePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.impl.CopymovePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.impl.CreationPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.impl.DeletionPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdatePackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.impl.UpdatePackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsPackage;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.impl.QueryFunctionsPackageImpl;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelFactory;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.SupertypeOf;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.TypeOf;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.VPMElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class EditmodelPackageImpl extends EPackageImpl implements EditmodelPackage
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass modelElementEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass relationshipEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass entityEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass relationEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass typeOfEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass supertypeOfEClass = null;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private EClass vpmElementEClass = null;
+
+  /**
+   * Creates an instance of the model <b>Package</b>, registered with
+   * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+   * package URI value.
+   * <p>Note: the correct way to create the package is via the static
+   * factory method {@link #init init()}, which also performs
+   * initialization of the package, or returns the registered package,
+   * if one already exists.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see org.eclipse.emf.ecore.EPackage.Registry
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage#eNS_URI
+   * @see #init()
+   * @generated
+   */
+  private EditmodelPackageImpl()
+  {
+    super(eNS_URI, EditmodelFactory.eINSTANCE);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private static boolean isInited = false;
+
+  /**
+   * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+   * 
+   * <p>This method is used to initialize {@link EditmodelPackage#eINSTANCE} when that field is accessed.
+   * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #eNS_URI
+   * @see #createPackageContents()
+   * @see #initializePackageContents()
+   * @generated
+   */
+  public static EditmodelPackage init()
+  {
+    if (isInited) return (EditmodelPackage)EPackage.Registry.INSTANCE.getEPackage(EditmodelPackage.eNS_URI);
+
+    // Obtain or create and register package
+    EditmodelPackageImpl theEditmodelPackage = (EditmodelPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof EditmodelPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new EditmodelPackageImpl());
+
+    isInited = true;
+
+    // Obtain or create and register interdependencies
+    QueryFunctionsPackageImpl theQueryFunctionsPackage = (QueryFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) instanceof QueryFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(QueryFunctionsPackage.eNS_URI) : QueryFunctionsPackage.eINSTANCE);
+    DeletionPackageImpl theDeletionPackage = (DeletionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) instanceof DeletionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DeletionPackage.eNS_URI) : DeletionPackage.eINSTANCE);
+    CreationPackageImpl theCreationPackage = (CreationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) instanceof CreationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CreationPackage.eNS_URI) : CreationPackage.eINSTANCE);
+    CopymovePackageImpl theCopymovePackage = (CopymovePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) instanceof CopymovePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CopymovePackage.eNS_URI) : CopymovePackage.eINSTANCE);
+    UpdatePackageImpl theUpdatePackage = (UpdatePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) instanceof UpdatePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UpdatePackage.eNS_URI) : UpdatePackage.eINSTANCE);
+    DefinitionsPackageImpl theDefinitionsPackage = (DefinitionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) instanceof DefinitionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DefinitionsPackage.eNS_URI) : DefinitionsPackage.eINSTANCE);
+    CorePackageImpl theCorePackage = (CorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) instanceof CorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) : CorePackage.eINSTANCE);
+    SimpleRulesPackageImpl theSimpleRulesPackage = (SimpleRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) instanceof SimpleRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SimpleRulesPackage.eNS_URI) : SimpleRulesPackage.eINSTANCE);
+    CompoundRulesPackageImpl theCompoundRulesPackage = (CompoundRulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) instanceof CompoundRulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CompoundRulesPackage.eNS_URI) : CompoundRulesPackage.eINSTANCE);
+    EnumsPackageImpl theEnumsPackage = (EnumsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) instanceof EnumsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EnumsPackage.eNS_URI) : EnumsPackage.eINSTANCE);
+    TermsPackageImpl theTermsPackage = (TermsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) instanceof TermsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI) : TermsPackage.eINSTANCE);
+    BuiltInFunctionsPackageImpl theBuiltInFunctionsPackage = (BuiltInFunctionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) instanceof BuiltInFunctionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BuiltInFunctionsPackage.eNS_URI) : BuiltInFunctionsPackage.eINSTANCE);
+    GtPackageImpl theGtPackage = (GtPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) instanceof GtPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GtPackage.eNS_URI) : GtPackage.eINSTANCE);
+
+    // Create package meta-data objects
+    theEditmodelPackage.createPackageContents();
+    theQueryFunctionsPackage.createPackageContents();
+    theDeletionPackage.createPackageContents();
+    theCreationPackage.createPackageContents();
+    theCopymovePackage.createPackageContents();
+    theUpdatePackage.createPackageContents();
+    theDefinitionsPackage.createPackageContents();
+    theCorePackage.createPackageContents();
+    theSimpleRulesPackage.createPackageContents();
+    theCompoundRulesPackage.createPackageContents();
+    theEnumsPackage.createPackageContents();
+    theTermsPackage.createPackageContents();
+    theBuiltInFunctionsPackage.createPackageContents();
+    theGtPackage.createPackageContents();
+
+    // Initialize created meta-data
+    theEditmodelPackage.initializePackageContents();
+    theQueryFunctionsPackage.initializePackageContents();
+    theDeletionPackage.initializePackageContents();
+    theCreationPackage.initializePackageContents();
+    theCopymovePackage.initializePackageContents();
+    theUpdatePackage.initializePackageContents();
+    theDefinitionsPackage.initializePackageContents();
+    theCorePackage.initializePackageContents();
+    theSimpleRulesPackage.initializePackageContents();
+    theCompoundRulesPackage.initializePackageContents();
+    theEnumsPackage.initializePackageContents();
+    theTermsPackage.initializePackageContents();
+    theBuiltInFunctionsPackage.initializePackageContents();
+    theGtPackage.initializePackageContents();
+
+    // Mark meta-data to indicate it can't be changed
+    theEditmodelPackage.freeze();
+
+  
+    // Update the registry and return the package
+    EPackage.Registry.INSTANCE.put(EditmodelPackage.eNS_URI, theEditmodelPackage);
+    return theEditmodelPackage;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getModelElement()
+  {
+    return modelElementEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getModelElement_Type()
+  {
+    return (EReference)modelElementEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getModelElement_Instance()
+  {
+    return (EReference)modelElementEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getModelElement_Supertype()
+  {
+    return (EReference)modelElementEClass.getEStructuralFeatures().get(2);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getModelElement_Subtype()
+  {
+    return (EReference)modelElementEClass.getEStructuralFeatures().get(3);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getModelElement_RelationsTo()
+  {
+    return (EReference)modelElementEClass.getEStructuralFeatures().get(4);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getModelElement_SubRelationships()
+  {
+    return (EReference)modelElementEClass.getEStructuralFeatures().get(5);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getModelElement_SuperRelationships()
+  {
+    return (EReference)modelElementEClass.getEStructuralFeatures().get(6);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getModelElement_TypeStr()
+  {
+    return (EAttribute)modelElementEClass.getEStructuralFeatures().get(7);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getModelElement_Name()
+  {
+    return (EAttribute)modelElementEClass.getEStructuralFeatures().get(8);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getModelElement_NamespaceStr()
+  {
+    return (EAttribute)modelElementEClass.getEStructuralFeatures().get(9);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getModelElement_RealElement()
+  {
+    return (EAttribute)modelElementEClass.getEStructuralFeatures().get(10);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getModelElement_RelationsFrom()
+  {
+    return (EReference)modelElementEClass.getEStructuralFeatures().get(11);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getRelationship()
+  {
+    return relationshipEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getRelationship_ClientStr()
+  {
+    return (EAttribute)relationshipEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getRelationship_SupplierStr()
+  {
+    return (EAttribute)relationshipEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getRelationship_Client()
+  {
+    return (EReference)relationshipEClass.getEStructuralFeatures().get(2);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getRelationship_Supplier()
+  {
+    return (EReference)relationshipEClass.getEStructuralFeatures().get(3);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getEntity()
+  {
+    return entityEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getEntity_Parent()
+  {
+    return (EReference)entityEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getEntity_Components()
+  {
+    return (EReference)entityEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getEntity_Value()
+  {
+    return (EAttribute)entityEClass.getEStructuralFeatures().get(2);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getRelation()
+  {
+    return relationEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getRelation_To()
+  {
+    return (EReference)relationEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getRelation_FromStr()
+  {
+    return (EAttribute)relationEClass.getEStructuralFeatures().get(1);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EAttribute getRelation_ToStr()
+  {
+    return (EAttribute)relationEClass.getEStructuralFeatures().get(2);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getRelation_From()
+  {
+    return (EReference)relationEClass.getEStructuralFeatures().get(3);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getTypeOf()
+  {
+    return typeOfEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getSupertypeOf()
+  {
+    return supertypeOfEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EClass getVPMElement()
+  {
+    return vpmElementEClass;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EReference getVPMElement_VariableReferences()
+  {
+    return (EReference)vpmElementEClass.getEStructuralFeatures().get(0);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EditmodelFactory getEditmodelFactory()
+  {
+    return (EditmodelFactory)getEFactoryInstance();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isCreated = false;
+
+  /**
+   * Creates the meta-model objects for the package.  This method is
+   * guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void createPackageContents()
+  {
+    if (isCreated) return;
+    isCreated = true;
+
+    // Create classes and their features
+    modelElementEClass = createEClass(MODEL_ELEMENT);
+    createEReference(modelElementEClass, MODEL_ELEMENT__TYPE);
+    createEReference(modelElementEClass, MODEL_ELEMENT__INSTANCE);
+    createEReference(modelElementEClass, MODEL_ELEMENT__SUPERTYPE);
+    createEReference(modelElementEClass, MODEL_ELEMENT__SUBTYPE);
+    createEReference(modelElementEClass, MODEL_ELEMENT__RELATIONS_TO);
+    createEReference(modelElementEClass, MODEL_ELEMENT__SUB_RELATIONSHIPS);
+    createEReference(modelElementEClass, MODEL_ELEMENT__SUPER_RELATIONSHIPS);
+    createEAttribute(modelElementEClass, MODEL_ELEMENT__TYPE_STR);
+    createEAttribute(modelElementEClass, MODEL_ELEMENT__NAME);
+    createEAttribute(modelElementEClass, MODEL_ELEMENT__NAMESPACE_STR);
+    createEAttribute(modelElementEClass, MODEL_ELEMENT__REAL_ELEMENT);
+    createEReference(modelElementEClass, MODEL_ELEMENT__RELATIONS_FROM);
+
+    relationshipEClass = createEClass(RELATIONSHIP);
+    createEAttribute(relationshipEClass, RELATIONSHIP__CLIENT_STR);
+    createEAttribute(relationshipEClass, RELATIONSHIP__SUPPLIER_STR);
+    createEReference(relationshipEClass, RELATIONSHIP__CLIENT);
+    createEReference(relationshipEClass, RELATIONSHIP__SUPPLIER);
+
+    entityEClass = createEClass(ENTITY);
+    createEReference(entityEClass, ENTITY__PARENT);
+    createEReference(entityEClass, ENTITY__COMPONENTS);
+    createEAttribute(entityEClass, ENTITY__VALUE);
+
+    relationEClass = createEClass(RELATION);
+    createEReference(relationEClass, RELATION__TO);
+    createEAttribute(relationEClass, RELATION__FROM_STR);
+    createEAttribute(relationEClass, RELATION__TO_STR);
+    createEReference(relationEClass, RELATION__FROM);
+
+    typeOfEClass = createEClass(TYPE_OF);
+
+    supertypeOfEClass = createEClass(SUPERTYPE_OF);
+
+    vpmElementEClass = createEClass(VPM_ELEMENT);
+    createEReference(vpmElementEClass, VPM_ELEMENT__VARIABLE_REFERENCES);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  private boolean isInitialized = false;
+
+  /**
+   * Complete the initialization of the package and its meta-model.  This
+   * method is guarded to have no affect on any invocation but its first.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void initializePackageContents()
+  {
+    if (isInitialized) return;
+    isInitialized = true;
+
+    // Initialize package
+    setName(eNAME);
+    setNsPrefix(eNS_PREFIX);
+    setNsURI(eNS_URI);
+
+    // Obtain other dependent packages
+    CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI);
+    TermsPackage theTermsPackage = (TermsPackage)EPackage.Registry.INSTANCE.getEPackage(TermsPackage.eNS_URI);
+
+    // Create type parameters
+
+    // Set bounds for type parameters
+
+    // Add supertypes to classes
+    modelElementEClass.getESuperTypes().add(this.getVPMElement());
+    relationshipEClass.getESuperTypes().add(this.getVPMElement());
+    entityEClass.getESuperTypes().add(this.getModelElement());
+    relationEClass.getESuperTypes().add(this.getModelElement());
+    typeOfEClass.getESuperTypes().add(this.getRelationship());
+    supertypeOfEClass.getESuperTypes().add(this.getRelationship());
+    vpmElementEClass.getESuperTypes().add(theCorePackage.getAnnotatedElement());
+
+    // Initialize classes and features; add operations and parameters
+    initEClass(modelElementEClass, ModelElement.class, "ModelElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getModelElement_Type(), this.getModelElement(), this.getModelElement_Instance(), "type", null, 0, -1, ModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getModelElement_Instance(), this.getModelElement(), this.getModelElement_Type(), "instance", null, 0, -1, ModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getModelElement_Supertype(), this.getModelElement(), this.getModelElement_Subtype(), "supertype", null, 0, -1, ModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getModelElement_Subtype(), this.getModelElement(), this.getModelElement_Supertype(), "subtype", null, 0, -1, ModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getModelElement_RelationsTo(), this.getRelation(), this.getRelation_To(), "relationsTo", null, 0, -1, ModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getModelElement_SubRelationships(), this.getRelationship(), this.getRelationship_Supplier(), "subRelationships", null, 0, -1, ModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getModelElement_SuperRelationships(), this.getRelationship(), this.getRelationship_Client(), "superRelationships", null, 0, -1, ModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEAttribute(getModelElement_TypeStr(), ecorePackage.getEString(), "typeStr", null, 1, 1, ModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEAttribute(getModelElement_Name(), ecorePackage.getEString(), "name", null, 1, 1, ModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEAttribute(getModelElement_NamespaceStr(), ecorePackage.getEString(), "namespaceStr", null, 1, 1, ModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEAttribute(getModelElement_RealElement(), ecorePackage.getEString(), "realElement", null, 0, 1, ModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getModelElement_RelationsFrom(), this.getRelation(), this.getRelation_From(), "relationsFrom", null, 0, -1, ModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(relationshipEClass, Relationship.class, "Relationship", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEAttribute(getRelationship_ClientStr(), ecorePackage.getEString(), "clientStr", null, 1, 1, Relationship.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEAttribute(getRelationship_SupplierStr(), ecorePackage.getEString(), "supplierStr", null, 1, 1, Relationship.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getRelationship_Client(), this.getModelElement(), this.getModelElement_SuperRelationships(), "client", null, 0, 1, Relationship.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getRelationship_Supplier(), this.getModelElement(), this.getModelElement_SubRelationships(), "supplier", null, 1, 1, Relationship.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(entityEClass, Entity.class, "Entity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getEntity_Parent(), this.getEntity(), this.getEntity_Components(), "parent", null, 0, 1, Entity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getEntity_Components(), this.getEntity(), this.getEntity_Parent(), "components", null, 0, -1, Entity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEAttribute(getEntity_Value(), ecorePackage.getEString(), "value", null, 1, 1, Entity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+    initEClass(relationEClass, Relation.class, "Relation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getRelation_To(), this.getModelElement(), this.getModelElement_RelationsTo(), "to", null, 1, 1, Relation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEAttribute(getRelation_FromStr(), ecorePackage.getEString(), "fromStr", null, 1, 1, Relation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEAttribute(getRelation_ToStr(), ecorePackage.getEString(), "toStr", null, 1, 1, Relation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+    initEReference(getRelation_From(), this.getModelElement(), this.getModelElement_RelationsFrom(), "from", null, 0, 1, Relation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    initEClass(typeOfEClass, TypeOf.class, "TypeOf", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(supertypeOfEClass, SupertypeOf.class, "SupertypeOf", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+    initEClass(vpmElementEClass, VPMElement.class, "VPMElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+    initEReference(getVPMElement_VariableReferences(), theTermsPackage.getVariableReference(), null, "variableReferences", null, 0, -1, VPMElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+    // Create resource
+    createResource(eNS_URI);
+  }
+
+} //EditmodelPackageImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/EntityImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/EntityImpl.java
new file mode 100644
index 0000000..d5e8574
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/EntityImpl.java
@@ -0,0 +1,350 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Entity</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EntityImpl#getParent <em>Parent</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EntityImpl#getComponents <em>Components</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.EntityImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class EntityImpl extends ModelElementImpl implements Entity
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getComponents() <em>Components</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getComponents()
+   * @generated
+   * @ordered
+   */
+  protected EList<Entity> components;
+
+  /**
+   * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getValue()
+   * @generated
+   * @ordered
+   */
+  protected static final String VALUE_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getValue()
+   * @generated
+   * @ordered
+   */
+  protected String value = VALUE_EDEFAULT;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected EntityImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return EditmodelPackage.Literals.ENTITY;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Entity getParent()
+  {
+    if (eContainerFeatureID() != EditmodelPackage.ENTITY__PARENT) return null;
+    return (Entity)eContainer();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetParent(Entity newParent, NotificationChain msgs)
+  {
+    msgs = eBasicSetContainer((InternalEObject)newParent, EditmodelPackage.ENTITY__PARENT, msgs);
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setParent(Entity newParent)
+  {
+    if (newParent != eInternalContainer() || (eContainerFeatureID() != EditmodelPackage.ENTITY__PARENT && newParent != null))
+    {
+      if (EcoreUtil.isAncestor(this, newParent))
+        throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+      NotificationChain msgs = null;
+      if (eInternalContainer() != null)
+        msgs = eBasicRemoveFromContainer(msgs);
+      if (newParent != null)
+        msgs = ((InternalEObject)newParent).eInverseAdd(this, EditmodelPackage.ENTITY__COMPONENTS, Entity.class, msgs);
+      msgs = basicSetParent(newParent, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, EditmodelPackage.ENTITY__PARENT, newParent, newParent));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Entity> getComponents()
+  {
+    if (components == null)
+    {
+      components = new EObjectContainmentWithInverseEList<Entity>(Entity.class, this, EditmodelPackage.ENTITY__COMPONENTS, EditmodelPackage.ENTITY__PARENT);
+    }
+    return components;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getValue()
+  {
+    return value;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setValue(String newValue)
+  {
+    String oldValue = value;
+    value = newValue;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, EditmodelPackage.ENTITY__VALUE, oldValue, value));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.ENTITY__PARENT:
+        if (eInternalContainer() != null)
+          msgs = eBasicRemoveFromContainer(msgs);
+        return basicSetParent((Entity)otherEnd, msgs);
+      case EditmodelPackage.ENTITY__COMPONENTS:
+        return ((InternalEList<InternalEObject>)(InternalEList<?>)getComponents()).basicAdd(otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.ENTITY__PARENT:
+        return basicSetParent(null, msgs);
+      case EditmodelPackage.ENTITY__COMPONENTS:
+        return ((InternalEList<?>)getComponents()).basicRemove(otherEnd, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
+  {
+    switch (eContainerFeatureID())
+    {
+      case EditmodelPackage.ENTITY__PARENT:
+        return eInternalContainer().eInverseRemove(this, EditmodelPackage.ENTITY__COMPONENTS, Entity.class, msgs);
+    }
+    return super.eBasicRemoveFromContainerFeature(msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.ENTITY__PARENT:
+        return getParent();
+      case EditmodelPackage.ENTITY__COMPONENTS:
+        return getComponents();
+      case EditmodelPackage.ENTITY__VALUE:
+        return getValue();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.ENTITY__PARENT:
+        setParent((Entity)newValue);
+        return;
+      case EditmodelPackage.ENTITY__COMPONENTS:
+        getComponents().clear();
+        getComponents().addAll((Collection<? extends Entity>)newValue);
+        return;
+      case EditmodelPackage.ENTITY__VALUE:
+        setValue((String)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.ENTITY__PARENT:
+        setParent((Entity)null);
+        return;
+      case EditmodelPackage.ENTITY__COMPONENTS:
+        getComponents().clear();
+        return;
+      case EditmodelPackage.ENTITY__VALUE:
+        setValue(VALUE_EDEFAULT);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.ENTITY__PARENT:
+        return getParent() != null;
+      case EditmodelPackage.ENTITY__COMPONENTS:
+        return components != null && !components.isEmpty();
+      case EditmodelPackage.ENTITY__VALUE:
+        return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (value: ");
+    result.append(value);
+    result.append(')');
+    return result.toString();
+  }
+
+} //EntityImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/ModelElementImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/ModelElementImpl.java
new file mode 100644
index 0000000..f36867a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/ModelElementImpl.java
@@ -0,0 +1,722 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Model Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.ModelElementImpl#getType <em>Type</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.ModelElementImpl#getInstance <em>Instance</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.ModelElementImpl#getSupertype <em>Supertype</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.ModelElementImpl#getSubtype <em>Subtype</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.ModelElementImpl#getRelationsTo <em>Relations To</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.ModelElementImpl#getSubRelationships <em>Sub Relationships</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.ModelElementImpl#getSuperRelationships <em>Super Relationships</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.ModelElementImpl#getTypeStr <em>Type Str</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.ModelElementImpl#getName <em>Name</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.ModelElementImpl#getNamespaceStr <em>Namespace Str</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.ModelElementImpl#getRealElement <em>Real Element</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.ModelElementImpl#getRelationsFrom <em>Relations From</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class ModelElementImpl extends VPMElementImpl implements ModelElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getType() <em>Type</em>}' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getType()
+   * @generated
+   * @ordered
+   */
+  protected EList<ModelElement> type;
+
+  /**
+   * The cached value of the '{@link #getInstance() <em>Instance</em>}' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getInstance()
+   * @generated
+   * @ordered
+   */
+  protected EList<ModelElement> instance;
+
+  /**
+   * The cached value of the '{@link #getSupertype() <em>Supertype</em>}' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSupertype()
+   * @generated
+   * @ordered
+   */
+  protected EList<ModelElement> supertype;
+
+  /**
+   * The cached value of the '{@link #getSubtype() <em>Subtype</em>}' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSubtype()
+   * @generated
+   * @ordered
+   */
+  protected EList<ModelElement> subtype;
+
+  /**
+   * The cached value of the '{@link #getRelationsTo() <em>Relations To</em>}' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getRelationsTo()
+   * @generated
+   * @ordered
+   */
+  protected EList<Relation> relationsTo;
+
+  /**
+   * The cached value of the '{@link #getSubRelationships() <em>Sub Relationships</em>}' reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSubRelationships()
+   * @generated
+   * @ordered
+   */
+  protected EList<Relationship> subRelationships;
+
+  /**
+   * The cached value of the '{@link #getSuperRelationships() <em>Super Relationships</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSuperRelationships()
+   * @generated
+   * @ordered
+   */
+  protected EList<Relationship> superRelationships;
+
+  /**
+   * The default value of the '{@link #getTypeStr() <em>Type Str</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getTypeStr()
+   * @generated
+   * @ordered
+   */
+  protected static final String TYPE_STR_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getTypeStr() <em>Type Str</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getTypeStr()
+   * @generated
+   * @ordered
+   */
+  protected String typeStr = TYPE_STR_EDEFAULT;
+
+  /**
+   * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getName()
+   * @generated
+   * @ordered
+   */
+  protected static final String NAME_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getName()
+   * @generated
+   * @ordered
+   */
+  protected String name = NAME_EDEFAULT;
+
+  /**
+   * The default value of the '{@link #getNamespaceStr() <em>Namespace Str</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getNamespaceStr()
+   * @generated
+   * @ordered
+   */
+  protected static final String NAMESPACE_STR_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getNamespaceStr() <em>Namespace Str</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getNamespaceStr()
+   * @generated
+   * @ordered
+   */
+  protected String namespaceStr = NAMESPACE_STR_EDEFAULT;
+
+  /**
+   * The default value of the '{@link #getRealElement() <em>Real Element</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getRealElement()
+   * @generated
+   * @ordered
+   */
+  protected static final String REAL_ELEMENT_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getRealElement() <em>Real Element</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getRealElement()
+   * @generated
+   * @ordered
+   */
+  protected String realElement = REAL_ELEMENT_EDEFAULT;
+
+  /**
+   * The cached value of the '{@link #getRelationsFrom() <em>Relations From</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getRelationsFrom()
+   * @generated
+   * @ordered
+   */
+  protected EList<Relation> relationsFrom;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected ModelElementImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return EditmodelPackage.Literals.MODEL_ELEMENT;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<ModelElement> getType()
+  {
+    if (type == null)
+    {
+      type = new EObjectWithInverseResolvingEList.ManyInverse<ModelElement>(ModelElement.class, this, EditmodelPackage.MODEL_ELEMENT__TYPE, EditmodelPackage.MODEL_ELEMENT__INSTANCE);
+    }
+    return type;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<ModelElement> getInstance()
+  {
+    if (instance == null)
+    {
+      instance = new EObjectWithInverseResolvingEList.ManyInverse<ModelElement>(ModelElement.class, this, EditmodelPackage.MODEL_ELEMENT__INSTANCE, EditmodelPackage.MODEL_ELEMENT__TYPE);
+    }
+    return instance;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<ModelElement> getSupertype()
+  {
+    if (supertype == null)
+    {
+      supertype = new EObjectWithInverseResolvingEList.ManyInverse<ModelElement>(ModelElement.class, this, EditmodelPackage.MODEL_ELEMENT__SUPERTYPE, EditmodelPackage.MODEL_ELEMENT__SUBTYPE);
+    }
+    return supertype;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<ModelElement> getSubtype()
+  {
+    if (subtype == null)
+    {
+      subtype = new EObjectWithInverseResolvingEList.ManyInverse<ModelElement>(ModelElement.class, this, EditmodelPackage.MODEL_ELEMENT__SUBTYPE, EditmodelPackage.MODEL_ELEMENT__SUPERTYPE);
+    }
+    return subtype;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Relation> getRelationsTo()
+  {
+    if (relationsTo == null)
+    {
+      relationsTo = new EObjectWithInverseResolvingEList<Relation>(Relation.class, this, EditmodelPackage.MODEL_ELEMENT__RELATIONS_TO, EditmodelPackage.RELATION__TO);
+    }
+    return relationsTo;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Relationship> getSubRelationships()
+  {
+    if (subRelationships == null)
+    {
+      subRelationships = new EObjectWithInverseResolvingEList<Relationship>(Relationship.class, this, EditmodelPackage.MODEL_ELEMENT__SUB_RELATIONSHIPS, EditmodelPackage.RELATIONSHIP__SUPPLIER);
+    }
+    return subRelationships;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Relationship> getSuperRelationships()
+  {
+    if (superRelationships == null)
+    {
+      superRelationships = new EObjectContainmentWithInverseEList<Relationship>(Relationship.class, this, EditmodelPackage.MODEL_ELEMENT__SUPER_RELATIONSHIPS, EditmodelPackage.RELATIONSHIP__CLIENT);
+    }
+    return superRelationships;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getTypeStr()
+  {
+    return typeStr;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setTypeStr(String newTypeStr)
+  {
+    String oldTypeStr = typeStr;
+    typeStr = newTypeStr;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, EditmodelPackage.MODEL_ELEMENT__TYPE_STR, oldTypeStr, typeStr));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getName()
+  {
+    return name;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setName(String newName)
+  {
+    String oldName = name;
+    name = newName;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, EditmodelPackage.MODEL_ELEMENT__NAME, oldName, name));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getNamespaceStr()
+  {
+    return namespaceStr;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setNamespaceStr(String newNamespaceStr)
+  {
+    String oldNamespaceStr = namespaceStr;
+    namespaceStr = newNamespaceStr;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, EditmodelPackage.MODEL_ELEMENT__NAMESPACE_STR, oldNamespaceStr, namespaceStr));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getRealElement()
+  {
+    return realElement;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setRealElement(String newRealElement)
+  {
+    String oldRealElement = realElement;
+    realElement = newRealElement;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, EditmodelPackage.MODEL_ELEMENT__REAL_ELEMENT, oldRealElement, realElement));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<Relation> getRelationsFrom()
+  {
+    if (relationsFrom == null)
+    {
+      relationsFrom = new EObjectContainmentWithInverseEList<Relation>(Relation.class, this, EditmodelPackage.MODEL_ELEMENT__RELATIONS_FROM, EditmodelPackage.RELATION__FROM);
+    }
+    return relationsFrom;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.MODEL_ELEMENT__TYPE:
+        return ((InternalEList<InternalEObject>)(InternalEList<?>)getType()).basicAdd(otherEnd, msgs);
+      case EditmodelPackage.MODEL_ELEMENT__INSTANCE:
+        return ((InternalEList<InternalEObject>)(InternalEList<?>)getInstance()).basicAdd(otherEnd, msgs);
+      case EditmodelPackage.MODEL_ELEMENT__SUPERTYPE:
+        return ((InternalEList<InternalEObject>)(InternalEList<?>)getSupertype()).basicAdd(otherEnd, msgs);
+      case EditmodelPackage.MODEL_ELEMENT__SUBTYPE:
+        return ((InternalEList<InternalEObject>)(InternalEList<?>)getSubtype()).basicAdd(otherEnd, msgs);
+      case EditmodelPackage.MODEL_ELEMENT__RELATIONS_TO:
+        return ((InternalEList<InternalEObject>)(InternalEList<?>)getRelationsTo()).basicAdd(otherEnd, msgs);
+      case EditmodelPackage.MODEL_ELEMENT__SUB_RELATIONSHIPS:
+        return ((InternalEList<InternalEObject>)(InternalEList<?>)getSubRelationships()).basicAdd(otherEnd, msgs);
+      case EditmodelPackage.MODEL_ELEMENT__SUPER_RELATIONSHIPS:
+        return ((InternalEList<InternalEObject>)(InternalEList<?>)getSuperRelationships()).basicAdd(otherEnd, msgs);
+      case EditmodelPackage.MODEL_ELEMENT__RELATIONS_FROM:
+        return ((InternalEList<InternalEObject>)(InternalEList<?>)getRelationsFrom()).basicAdd(otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.MODEL_ELEMENT__TYPE:
+        return ((InternalEList<?>)getType()).basicRemove(otherEnd, msgs);
+      case EditmodelPackage.MODEL_ELEMENT__INSTANCE:
+        return ((InternalEList<?>)getInstance()).basicRemove(otherEnd, msgs);
+      case EditmodelPackage.MODEL_ELEMENT__SUPERTYPE:
+        return ((InternalEList<?>)getSupertype()).basicRemove(otherEnd, msgs);
+      case EditmodelPackage.MODEL_ELEMENT__SUBTYPE:
+        return ((InternalEList<?>)getSubtype()).basicRemove(otherEnd, msgs);
+      case EditmodelPackage.MODEL_ELEMENT__RELATIONS_TO:
+        return ((InternalEList<?>)getRelationsTo()).basicRemove(otherEnd, msgs);
+      case EditmodelPackage.MODEL_ELEMENT__SUB_RELATIONSHIPS:
+        return ((InternalEList<?>)getSubRelationships()).basicRemove(otherEnd, msgs);
+      case EditmodelPackage.MODEL_ELEMENT__SUPER_RELATIONSHIPS:
+        return ((InternalEList<?>)getSuperRelationships()).basicRemove(otherEnd, msgs);
+      case EditmodelPackage.MODEL_ELEMENT__RELATIONS_FROM:
+        return ((InternalEList<?>)getRelationsFrom()).basicRemove(otherEnd, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.MODEL_ELEMENT__TYPE:
+        return getType();
+      case EditmodelPackage.MODEL_ELEMENT__INSTANCE:
+        return getInstance();
+      case EditmodelPackage.MODEL_ELEMENT__SUPERTYPE:
+        return getSupertype();
+      case EditmodelPackage.MODEL_ELEMENT__SUBTYPE:
+        return getSubtype();
+      case EditmodelPackage.MODEL_ELEMENT__RELATIONS_TO:
+        return getRelationsTo();
+      case EditmodelPackage.MODEL_ELEMENT__SUB_RELATIONSHIPS:
+        return getSubRelationships();
+      case EditmodelPackage.MODEL_ELEMENT__SUPER_RELATIONSHIPS:
+        return getSuperRelationships();
+      case EditmodelPackage.MODEL_ELEMENT__TYPE_STR:
+        return getTypeStr();
+      case EditmodelPackage.MODEL_ELEMENT__NAME:
+        return getName();
+      case EditmodelPackage.MODEL_ELEMENT__NAMESPACE_STR:
+        return getNamespaceStr();
+      case EditmodelPackage.MODEL_ELEMENT__REAL_ELEMENT:
+        return getRealElement();
+      case EditmodelPackage.MODEL_ELEMENT__RELATIONS_FROM:
+        return getRelationsFrom();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.MODEL_ELEMENT__TYPE:
+        getType().clear();
+        getType().addAll((Collection<? extends ModelElement>)newValue);
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__INSTANCE:
+        getInstance().clear();
+        getInstance().addAll((Collection<? extends ModelElement>)newValue);
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__SUPERTYPE:
+        getSupertype().clear();
+        getSupertype().addAll((Collection<? extends ModelElement>)newValue);
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__SUBTYPE:
+        getSubtype().clear();
+        getSubtype().addAll((Collection<? extends ModelElement>)newValue);
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__RELATIONS_TO:
+        getRelationsTo().clear();
+        getRelationsTo().addAll((Collection<? extends Relation>)newValue);
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__SUB_RELATIONSHIPS:
+        getSubRelationships().clear();
+        getSubRelationships().addAll((Collection<? extends Relationship>)newValue);
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__SUPER_RELATIONSHIPS:
+        getSuperRelationships().clear();
+        getSuperRelationships().addAll((Collection<? extends Relationship>)newValue);
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__TYPE_STR:
+        setTypeStr((String)newValue);
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__NAME:
+        setName((String)newValue);
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__NAMESPACE_STR:
+        setNamespaceStr((String)newValue);
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__REAL_ELEMENT:
+        setRealElement((String)newValue);
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__RELATIONS_FROM:
+        getRelationsFrom().clear();
+        getRelationsFrom().addAll((Collection<? extends Relation>)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.MODEL_ELEMENT__TYPE:
+        getType().clear();
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__INSTANCE:
+        getInstance().clear();
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__SUPERTYPE:
+        getSupertype().clear();
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__SUBTYPE:
+        getSubtype().clear();
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__RELATIONS_TO:
+        getRelationsTo().clear();
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__SUB_RELATIONSHIPS:
+        getSubRelationships().clear();
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__SUPER_RELATIONSHIPS:
+        getSuperRelationships().clear();
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__TYPE_STR:
+        setTypeStr(TYPE_STR_EDEFAULT);
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__NAME:
+        setName(NAME_EDEFAULT);
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__NAMESPACE_STR:
+        setNamespaceStr(NAMESPACE_STR_EDEFAULT);
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__REAL_ELEMENT:
+        setRealElement(REAL_ELEMENT_EDEFAULT);
+        return;
+      case EditmodelPackage.MODEL_ELEMENT__RELATIONS_FROM:
+        getRelationsFrom().clear();
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.MODEL_ELEMENT__TYPE:
+        return type != null && !type.isEmpty();
+      case EditmodelPackage.MODEL_ELEMENT__INSTANCE:
+        return instance != null && !instance.isEmpty();
+      case EditmodelPackage.MODEL_ELEMENT__SUPERTYPE:
+        return supertype != null && !supertype.isEmpty();
+      case EditmodelPackage.MODEL_ELEMENT__SUBTYPE:
+        return subtype != null && !subtype.isEmpty();
+      case EditmodelPackage.MODEL_ELEMENT__RELATIONS_TO:
+        return relationsTo != null && !relationsTo.isEmpty();
+      case EditmodelPackage.MODEL_ELEMENT__SUB_RELATIONSHIPS:
+        return subRelationships != null && !subRelationships.isEmpty();
+      case EditmodelPackage.MODEL_ELEMENT__SUPER_RELATIONSHIPS:
+        return superRelationships != null && !superRelationships.isEmpty();
+      case EditmodelPackage.MODEL_ELEMENT__TYPE_STR:
+        return TYPE_STR_EDEFAULT == null ? typeStr != null : !TYPE_STR_EDEFAULT.equals(typeStr);
+      case EditmodelPackage.MODEL_ELEMENT__NAME:
+        return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+      case EditmodelPackage.MODEL_ELEMENT__NAMESPACE_STR:
+        return NAMESPACE_STR_EDEFAULT == null ? namespaceStr != null : !NAMESPACE_STR_EDEFAULT.equals(namespaceStr);
+      case EditmodelPackage.MODEL_ELEMENT__REAL_ELEMENT:
+        return REAL_ELEMENT_EDEFAULT == null ? realElement != null : !REAL_ELEMENT_EDEFAULT.equals(realElement);
+      case EditmodelPackage.MODEL_ELEMENT__RELATIONS_FROM:
+        return relationsFrom != null && !relationsFrom.isEmpty();
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (typeStr: ");
+    result.append(typeStr);
+    result.append(", name: ");
+    result.append(name);
+    result.append(", namespaceStr: ");
+    result.append(namespaceStr);
+    result.append(", realElement: ");
+    result.append(realElement);
+    result.append(')');
+    return result.toString();
+  }
+
+} //ModelElementImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/RelationImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/RelationImpl.java
new file mode 100644
index 0000000..3d0bee4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/RelationImpl.java
@@ -0,0 +1,455 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Relation</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.RelationImpl#getTo <em>To</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.RelationImpl#getFromStr <em>From Str</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.RelationImpl#getToStr <em>To Str</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.RelationImpl#getFrom <em>From</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RelationImpl extends ModelElementImpl implements Relation
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getTo() <em>To</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getTo()
+   * @generated
+   * @ordered
+   */
+  protected ModelElement to;
+
+  /**
+   * The default value of the '{@link #getFromStr() <em>From Str</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getFromStr()
+   * @generated
+   * @ordered
+   */
+  protected static final String FROM_STR_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getFromStr() <em>From Str</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getFromStr()
+   * @generated
+   * @ordered
+   */
+  protected String fromStr = FROM_STR_EDEFAULT;
+
+  /**
+   * The default value of the '{@link #getToStr() <em>To Str</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getToStr()
+   * @generated
+   * @ordered
+   */
+  protected static final String TO_STR_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getToStr() <em>To Str</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getToStr()
+   * @generated
+   * @ordered
+   */
+  protected String toStr = TO_STR_EDEFAULT;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RelationImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return EditmodelPackage.Literals.RELATION;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ModelElement getTo()
+  {
+    if (to != null && to.eIsProxy())
+    {
+      InternalEObject oldTo = (InternalEObject)to;
+      to = (ModelElement)eResolveProxy(oldTo);
+      if (to != oldTo)
+      {
+        if (eNotificationRequired())
+          eNotify(new ENotificationImpl(this, Notification.RESOLVE, EditmodelPackage.RELATION__TO, oldTo, to));
+      }
+    }
+    return to;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ModelElement basicGetTo()
+  {
+    return to;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetTo(ModelElement newTo, NotificationChain msgs)
+  {
+    ModelElement oldTo = to;
+    to = newTo;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EditmodelPackage.RELATION__TO, oldTo, newTo);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setTo(ModelElement newTo)
+  {
+    if (newTo != to)
+    {
+      NotificationChain msgs = null;
+      if (to != null)
+        msgs = ((InternalEObject)to).eInverseRemove(this, EditmodelPackage.MODEL_ELEMENT__RELATIONS_TO, ModelElement.class, msgs);
+      if (newTo != null)
+        msgs = ((InternalEObject)newTo).eInverseAdd(this, EditmodelPackage.MODEL_ELEMENT__RELATIONS_TO, ModelElement.class, msgs);
+      msgs = basicSetTo(newTo, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, EditmodelPackage.RELATION__TO, newTo, newTo));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getFromStr()
+  {
+    return fromStr;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setFromStr(String newFromStr)
+  {
+    String oldFromStr = fromStr;
+    fromStr = newFromStr;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, EditmodelPackage.RELATION__FROM_STR, oldFromStr, fromStr));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getToStr()
+  {
+    return toStr;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setToStr(String newToStr)
+  {
+    String oldToStr = toStr;
+    toStr = newToStr;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, EditmodelPackage.RELATION__TO_STR, oldToStr, toStr));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ModelElement getFrom()
+  {
+    if (eContainerFeatureID() != EditmodelPackage.RELATION__FROM) return null;
+    return (ModelElement)eContainer();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetFrom(ModelElement newFrom, NotificationChain msgs)
+  {
+    msgs = eBasicSetContainer((InternalEObject)newFrom, EditmodelPackage.RELATION__FROM, msgs);
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setFrom(ModelElement newFrom)
+  {
+    if (newFrom != eInternalContainer() || (eContainerFeatureID() != EditmodelPackage.RELATION__FROM && newFrom != null))
+    {
+      if (EcoreUtil.isAncestor(this, newFrom))
+        throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+      NotificationChain msgs = null;
+      if (eInternalContainer() != null)
+        msgs = eBasicRemoveFromContainer(msgs);
+      if (newFrom != null)
+        msgs = ((InternalEObject)newFrom).eInverseAdd(this, EditmodelPackage.MODEL_ELEMENT__RELATIONS_FROM, ModelElement.class, msgs);
+      msgs = basicSetFrom(newFrom, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, EditmodelPackage.RELATION__FROM, newFrom, newFrom));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.RELATION__TO:
+        if (to != null)
+          msgs = ((InternalEObject)to).eInverseRemove(this, EditmodelPackage.MODEL_ELEMENT__RELATIONS_TO, ModelElement.class, msgs);
+        return basicSetTo((ModelElement)otherEnd, msgs);
+      case EditmodelPackage.RELATION__FROM:
+        if (eInternalContainer() != null)
+          msgs = eBasicRemoveFromContainer(msgs);
+        return basicSetFrom((ModelElement)otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.RELATION__TO:
+        return basicSetTo(null, msgs);
+      case EditmodelPackage.RELATION__FROM:
+        return basicSetFrom(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
+  {
+    switch (eContainerFeatureID())
+    {
+      case EditmodelPackage.RELATION__FROM:
+        return eInternalContainer().eInverseRemove(this, EditmodelPackage.MODEL_ELEMENT__RELATIONS_FROM, ModelElement.class, msgs);
+    }
+    return super.eBasicRemoveFromContainerFeature(msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.RELATION__TO:
+        if (resolve) return getTo();
+        return basicGetTo();
+      case EditmodelPackage.RELATION__FROM_STR:
+        return getFromStr();
+      case EditmodelPackage.RELATION__TO_STR:
+        return getToStr();
+      case EditmodelPackage.RELATION__FROM:
+        return getFrom();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.RELATION__TO:
+        setTo((ModelElement)newValue);
+        return;
+      case EditmodelPackage.RELATION__FROM_STR:
+        setFromStr((String)newValue);
+        return;
+      case EditmodelPackage.RELATION__TO_STR:
+        setToStr((String)newValue);
+        return;
+      case EditmodelPackage.RELATION__FROM:
+        setFrom((ModelElement)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.RELATION__TO:
+        setTo((ModelElement)null);
+        return;
+      case EditmodelPackage.RELATION__FROM_STR:
+        setFromStr(FROM_STR_EDEFAULT);
+        return;
+      case EditmodelPackage.RELATION__TO_STR:
+        setToStr(TO_STR_EDEFAULT);
+        return;
+      case EditmodelPackage.RELATION__FROM:
+        setFrom((ModelElement)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.RELATION__TO:
+        return to != null;
+      case EditmodelPackage.RELATION__FROM_STR:
+        return FROM_STR_EDEFAULT == null ? fromStr != null : !FROM_STR_EDEFAULT.equals(fromStr);
+      case EditmodelPackage.RELATION__TO_STR:
+        return TO_STR_EDEFAULT == null ? toStr != null : !TO_STR_EDEFAULT.equals(toStr);
+      case EditmodelPackage.RELATION__FROM:
+        return getFrom() != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (fromStr: ");
+    result.append(fromStr);
+    result.append(", toStr: ");
+    result.append(toStr);
+    result.append(')');
+    return result.toString();
+  }
+
+} //RelationImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/RelationshipImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/RelationshipImpl.java
new file mode 100644
index 0000000..e889fb1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/RelationshipImpl.java
@@ -0,0 +1,455 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Relationship</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.RelationshipImpl#getClientStr <em>Client Str</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.RelationshipImpl#getSupplierStr <em>Supplier Str</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.RelationshipImpl#getClient <em>Client</em>}</li>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.RelationshipImpl#getSupplier <em>Supplier</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class RelationshipImpl extends VPMElementImpl implements Relationship
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The default value of the '{@link #getClientStr() <em>Client Str</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getClientStr()
+   * @generated
+   * @ordered
+   */
+  protected static final String CLIENT_STR_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getClientStr() <em>Client Str</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getClientStr()
+   * @generated
+   * @ordered
+   */
+  protected String clientStr = CLIENT_STR_EDEFAULT;
+
+  /**
+   * The default value of the '{@link #getSupplierStr() <em>Supplier Str</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSupplierStr()
+   * @generated
+   * @ordered
+   */
+  protected static final String SUPPLIER_STR_EDEFAULT = null;
+
+  /**
+   * The cached value of the '{@link #getSupplierStr() <em>Supplier Str</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSupplierStr()
+   * @generated
+   * @ordered
+   */
+  protected String supplierStr = SUPPLIER_STR_EDEFAULT;
+
+  /**
+   * The cached value of the '{@link #getSupplier() <em>Supplier</em>}' reference.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSupplier()
+   * @generated
+   * @ordered
+   */
+  protected ModelElement supplier;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected RelationshipImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return EditmodelPackage.Literals.RELATIONSHIP;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getClientStr()
+  {
+    return clientStr;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setClientStr(String newClientStr)
+  {
+    String oldClientStr = clientStr;
+    clientStr = newClientStr;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, EditmodelPackage.RELATIONSHIP__CLIENT_STR, oldClientStr, clientStr));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public String getSupplierStr()
+  {
+    return supplierStr;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setSupplierStr(String newSupplierStr)
+  {
+    String oldSupplierStr = supplierStr;
+    supplierStr = newSupplierStr;
+    if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, EditmodelPackage.RELATIONSHIP__SUPPLIER_STR, oldSupplierStr, supplierStr));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ModelElement getClient()
+  {
+    if (eContainerFeatureID() != EditmodelPackage.RELATIONSHIP__CLIENT) return null;
+    return (ModelElement)eContainer();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetClient(ModelElement newClient, NotificationChain msgs)
+  {
+    msgs = eBasicSetContainer((InternalEObject)newClient, EditmodelPackage.RELATIONSHIP__CLIENT, msgs);
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setClient(ModelElement newClient)
+  {
+    if (newClient != eInternalContainer() || (eContainerFeatureID() != EditmodelPackage.RELATIONSHIP__CLIENT && newClient != null))
+    {
+      if (EcoreUtil.isAncestor(this, newClient))
+        throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+      NotificationChain msgs = null;
+      if (eInternalContainer() != null)
+        msgs = eBasicRemoveFromContainer(msgs);
+      if (newClient != null)
+        msgs = ((InternalEObject)newClient).eInverseAdd(this, EditmodelPackage.MODEL_ELEMENT__SUPER_RELATIONSHIPS, ModelElement.class, msgs);
+      msgs = basicSetClient(newClient, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, EditmodelPackage.RELATIONSHIP__CLIENT, newClient, newClient));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ModelElement getSupplier()
+  {
+    if (supplier != null && supplier.eIsProxy())
+    {
+      InternalEObject oldSupplier = (InternalEObject)supplier;
+      supplier = (ModelElement)eResolveProxy(oldSupplier);
+      if (supplier != oldSupplier)
+      {
+        if (eNotificationRequired())
+          eNotify(new ENotificationImpl(this, Notification.RESOLVE, EditmodelPackage.RELATIONSHIP__SUPPLIER, oldSupplier, supplier));
+      }
+    }
+    return supplier;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public ModelElement basicGetSupplier()
+  {
+    return supplier;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public NotificationChain basicSetSupplier(ModelElement newSupplier, NotificationChain msgs)
+  {
+    ModelElement oldSupplier = supplier;
+    supplier = newSupplier;
+    if (eNotificationRequired())
+    {
+      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EditmodelPackage.RELATIONSHIP__SUPPLIER, oldSupplier, newSupplier);
+      if (msgs == null) msgs = notification; else msgs.add(notification);
+    }
+    return msgs;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void setSupplier(ModelElement newSupplier)
+  {
+    if (newSupplier != supplier)
+    {
+      NotificationChain msgs = null;
+      if (supplier != null)
+        msgs = ((InternalEObject)supplier).eInverseRemove(this, EditmodelPackage.MODEL_ELEMENT__SUB_RELATIONSHIPS, ModelElement.class, msgs);
+      if (newSupplier != null)
+        msgs = ((InternalEObject)newSupplier).eInverseAdd(this, EditmodelPackage.MODEL_ELEMENT__SUB_RELATIONSHIPS, ModelElement.class, msgs);
+      msgs = basicSetSupplier(newSupplier, msgs);
+      if (msgs != null) msgs.dispatch();
+    }
+    else if (eNotificationRequired())
+      eNotify(new ENotificationImpl(this, Notification.SET, EditmodelPackage.RELATIONSHIP__SUPPLIER, newSupplier, newSupplier));
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.RELATIONSHIP__CLIENT:
+        if (eInternalContainer() != null)
+          msgs = eBasicRemoveFromContainer(msgs);
+        return basicSetClient((ModelElement)otherEnd, msgs);
+      case EditmodelPackage.RELATIONSHIP__SUPPLIER:
+        if (supplier != null)
+          msgs = ((InternalEObject)supplier).eInverseRemove(this, EditmodelPackage.MODEL_ELEMENT__SUB_RELATIONSHIPS, ModelElement.class, msgs);
+        return basicSetSupplier((ModelElement)otherEnd, msgs);
+    }
+    return super.eInverseAdd(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.RELATIONSHIP__CLIENT:
+        return basicSetClient(null, msgs);
+      case EditmodelPackage.RELATIONSHIP__SUPPLIER:
+        return basicSetSupplier(null, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
+  {
+    switch (eContainerFeatureID())
+    {
+      case EditmodelPackage.RELATIONSHIP__CLIENT:
+        return eInternalContainer().eInverseRemove(this, EditmodelPackage.MODEL_ELEMENT__SUPER_RELATIONSHIPS, ModelElement.class, msgs);
+    }
+    return super.eBasicRemoveFromContainerFeature(msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.RELATIONSHIP__CLIENT_STR:
+        return getClientStr();
+      case EditmodelPackage.RELATIONSHIP__SUPPLIER_STR:
+        return getSupplierStr();
+      case EditmodelPackage.RELATIONSHIP__CLIENT:
+        return getClient();
+      case EditmodelPackage.RELATIONSHIP__SUPPLIER:
+        if (resolve) return getSupplier();
+        return basicGetSupplier();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.RELATIONSHIP__CLIENT_STR:
+        setClientStr((String)newValue);
+        return;
+      case EditmodelPackage.RELATIONSHIP__SUPPLIER_STR:
+        setSupplierStr((String)newValue);
+        return;
+      case EditmodelPackage.RELATIONSHIP__CLIENT:
+        setClient((ModelElement)newValue);
+        return;
+      case EditmodelPackage.RELATIONSHIP__SUPPLIER:
+        setSupplier((ModelElement)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.RELATIONSHIP__CLIENT_STR:
+        setClientStr(CLIENT_STR_EDEFAULT);
+        return;
+      case EditmodelPackage.RELATIONSHIP__SUPPLIER_STR:
+        setSupplierStr(SUPPLIER_STR_EDEFAULT);
+        return;
+      case EditmodelPackage.RELATIONSHIP__CLIENT:
+        setClient((ModelElement)null);
+        return;
+      case EditmodelPackage.RELATIONSHIP__SUPPLIER:
+        setSupplier((ModelElement)null);
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.RELATIONSHIP__CLIENT_STR:
+        return CLIENT_STR_EDEFAULT == null ? clientStr != null : !CLIENT_STR_EDEFAULT.equals(clientStr);
+      case EditmodelPackage.RELATIONSHIP__SUPPLIER_STR:
+        return SUPPLIER_STR_EDEFAULT == null ? supplierStr != null : !SUPPLIER_STR_EDEFAULT.equals(supplierStr);
+      case EditmodelPackage.RELATIONSHIP__CLIENT:
+        return getClient() != null;
+      case EditmodelPackage.RELATIONSHIP__SUPPLIER:
+        return supplier != null;
+    }
+    return super.eIsSet(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public String toString()
+  {
+    if (eIsProxy()) return super.toString();
+
+    StringBuffer result = new StringBuffer(super.toString());
+    result.append(" (clientStr: ");
+    result.append(clientStr);
+    result.append(", supplierStr: ");
+    result.append(supplierStr);
+    result.append(')');
+    return result.toString();
+  }
+
+} //RelationshipImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/SupertypeOfImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/SupertypeOfImpl.java
new file mode 100644
index 0000000..ec31c9c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/SupertypeOfImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.SupertypeOf;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Supertype Of</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class SupertypeOfImpl extends RelationshipImpl implements SupertypeOf
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected SupertypeOfImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return EditmodelPackage.Literals.SUPERTYPE_OF;
+  }
+
+} //SupertypeOfImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/TypeOfImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/TypeOfImpl.java
new file mode 100644
index 0000000..ee58c74
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/TypeOfImpl.java
@@ -0,0 +1,58 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.TypeOf;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Of</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeOfImpl extends RelationshipImpl implements TypeOf
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected TypeOfImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return EditmodelPackage.Literals.TYPE_OF;
+  }
+
+} //TypeOfImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/VPMElementImpl.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/VPMElementImpl.java
new file mode 100644
index 0000000..227c2b7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/impl/VPMElementImpl.java
@@ -0,0 +1,184 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.AnnotatedElementImpl;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.VPMElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>VPM Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.impl.VPMElementImpl#getVariableReferences <em>Variable References</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class VPMElementImpl extends AnnotatedElementImpl implements VPMElement
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached value of the '{@link #getVariableReferences() <em>Variable References</em>}' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getVariableReferences()
+   * @generated
+   * @ordered
+   */
+  protected EList<VariableReference> variableReferences;
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected VPMElementImpl()
+  {
+    super();
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  protected EClass eStaticClass()
+  {
+    return EditmodelPackage.Literals.VPM_ELEMENT;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EList<VariableReference> getVariableReferences()
+  {
+    if (variableReferences == null)
+    {
+      variableReferences = new EObjectContainmentEList<VariableReference>(VariableReference.class, this, EditmodelPackage.VPM_ELEMENT__VARIABLE_REFERENCES);
+    }
+    return variableReferences;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.VPM_ELEMENT__VARIABLE_REFERENCES:
+        return ((InternalEList<?>)getVariableReferences()).basicRemove(otherEnd, msgs);
+    }
+    return super.eInverseRemove(otherEnd, featureID, msgs);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.VPM_ELEMENT__VARIABLE_REFERENCES:
+        return getVariableReferences();
+    }
+    return super.eGet(featureID, resolve, coreType);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @SuppressWarnings("unchecked")
+  @Override
+  public void eSet(int featureID, Object newValue)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.VPM_ELEMENT__VARIABLE_REFERENCES:
+        getVariableReferences().clear();
+        getVariableReferences().addAll((Collection<? extends VariableReference>)newValue);
+        return;
+    }
+    super.eSet(featureID, newValue);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public void eUnset(int featureID)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.VPM_ELEMENT__VARIABLE_REFERENCES:
+        getVariableReferences().clear();
+        return;
+    }
+    super.eUnset(featureID);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  @Override
+  public boolean eIsSet(int featureID)
+  {
+    switch (featureID)
+    {
+      case EditmodelPackage.VPM_ELEMENT__VARIABLE_REFERENCES:
+        return variableReferences != null && !variableReferences.isEmpty();
+    }
+    return super.eIsSet(featureID);
+  }
+
+} //VPMElementImpl
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/util/EditmodelAdapterFactory.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/util/EditmodelAdapterFactory.java
new file mode 100644
index 0000000..91a4026
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/util/EditmodelAdapterFactory.java
@@ -0,0 +1,290 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage
+ * @generated
+ */
+public class EditmodelAdapterFactory extends AdapterFactoryImpl
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static EditmodelPackage modelPackage;
+
+  /**
+   * Creates an instance of the adapter factory.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EditmodelAdapterFactory()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = EditmodelPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Returns whether this factory is applicable for the type of the object.
+   * <!-- begin-user-doc -->
+   * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+   * <!-- end-user-doc -->
+   * @return whether this factory is applicable for the type of the object.
+   * @generated
+   */
+  @Override
+  public boolean isFactoryForType(Object object)
+  {
+    if (object == modelPackage)
+    {
+      return true;
+    }
+    if (object instanceof EObject)
+    {
+      return ((EObject)object).eClass().getEPackage() == modelPackage;
+    }
+    return false;
+  }
+
+  /**
+   * The switch that delegates to the <code>createXXX</code> methods.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected EditmodelSwitch<Adapter> modelSwitch =
+    new EditmodelSwitch<Adapter>()
+    {
+      @Override
+      public Adapter caseModelElement(ModelElement object)
+      {
+        return createModelElementAdapter();
+      }
+      @Override
+      public Adapter caseRelationship(Relationship object)
+      {
+        return createRelationshipAdapter();
+      }
+      @Override
+      public Adapter caseEntity(Entity object)
+      {
+        return createEntityAdapter();
+      }
+      @Override
+      public Adapter caseRelation(Relation object)
+      {
+        return createRelationAdapter();
+      }
+      @Override
+      public Adapter caseTypeOf(TypeOf object)
+      {
+        return createTypeOfAdapter();
+      }
+      @Override
+      public Adapter caseSupertypeOf(SupertypeOf object)
+      {
+        return createSupertypeOfAdapter();
+      }
+      @Override
+      public Adapter caseVPMElement(VPMElement object)
+      {
+        return createVPMElementAdapter();
+      }
+      @Override
+      public Adapter caseAnnotatedElement(AnnotatedElement object)
+      {
+        return createAnnotatedElementAdapter();
+      }
+      @Override
+      public Adapter defaultCase(EObject object)
+      {
+        return createEObjectAdapter();
+      }
+    };
+
+  /**
+   * Creates an adapter for the <code>target</code>.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param target the object to adapt.
+   * @return the adapter for the <code>target</code>.
+   * @generated
+   */
+  @Override
+  public Adapter createAdapter(Notifier target)
+  {
+    return modelSwitch.doSwitch((EObject)target);
+  }
+
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement <em>Model Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement
+   * @generated
+   */
+  public Adapter createModelElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship <em>Relationship</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship
+   * @generated
+   */
+  public Adapter createRelationshipAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity <em>Entity</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity
+   * @generated
+   */
+  public Adapter createEntityAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation <em>Relation</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation
+   * @generated
+   */
+  public Adapter createRelationAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.TypeOf <em>Type Of</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.TypeOf
+   * @generated
+   */
+  public Adapter createTypeOfAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.SupertypeOf <em>Supertype Of</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.SupertypeOf
+   * @generated
+   */
+  public Adapter createSupertypeOfAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.vpm.editmodel.VPMElement <em>VPM Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.VPMElement
+   * @generated
+   */
+  public Adapter createVPMElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement <em>Annotated Element</em>}'.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null so that we can easily ignore cases;
+   * it's useful to ignore a case when inheritance will catch all the cases anyway.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @see org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement
+   * @generated
+   */
+  public Adapter createAnnotatedElementAdapter()
+  {
+    return null;
+  }
+
+  /**
+   * Creates a new adapter for the default case.
+   * <!-- begin-user-doc -->
+   * This default implementation returns null.
+   * <!-- end-user-doc -->
+   * @return the new adapter.
+   * @generated
+   */
+  public Adapter createEObjectAdapter()
+  {
+    return null;
+  }
+
+} //EditmodelAdapterFactory
diff --git a/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/util/EditmodelSwitch.java b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/util/EditmodelSwitch.java
new file mode 100644
index 0000000..5683c56
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.model/src/org/eclipse/viatra2/gtasmmodel/vpm/editmodel/util/EditmodelSwitch.java
@@ -0,0 +1,327 @@
+/**
+ *  * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
+ *  * All rights reserved. This program and the accompanying materials
+ *  * are made available under the terms of the Eclipse Public License v1.0
+ *  * which accompanies this distribution, and is available at
+ *  * http://www.eclipse.org/legal/epl-v10.html
+ *  *
+ *  * Contributors:
+ *  *    Istvan Rath, Daniel Varro - initial API and implementation
+ * 
+ */
+package org.eclipse.viatra2.gtasmmodel.vpm.editmodel.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelPackage
+ * @generated
+ */
+public class EditmodelSwitch<T>
+{
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n *    Istvan Rath, Daniel Varro - initial API and implementation\r\n";
+
+  /**
+   * The cached model package
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  protected static EditmodelPackage modelPackage;
+
+  /**
+   * Creates an instance of the switch.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public EditmodelSwitch()
+  {
+    if (modelPackage == null)
+    {
+      modelPackage = EditmodelPackage.eINSTANCE;
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  public T doSwitch(EObject theEObject)
+  {
+    return doSwitch(theEObject.eClass(), theEObject);
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(EClass theEClass, EObject theEObject)
+  {
+    if (theEClass.eContainer() == modelPackage)
+    {
+      return doSwitch(theEClass.getClassifierID(), theEObject);
+    }
+    else
+    {
+      List<EClass> eSuperTypes = theEClass.getESuperTypes();
+      return
+        eSuperTypes.isEmpty() ?
+          defaultCase(theEObject) :
+          doSwitch(eSuperTypes.get(0), theEObject);
+    }
+  }
+
+  /**
+   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return the first non-null result returned by a <code>caseXXX</code> call.
+   * @generated
+   */
+  protected T doSwitch(int classifierID, EObject theEObject)
+  {
+    switch (classifierID)
+    {
+      case EditmodelPackage.MODEL_ELEMENT:
+      {
+        ModelElement modelElement = (ModelElement)theEObject;
+        T result = caseModelElement(modelElement);
+        if (result == null) result = caseVPMElement(modelElement);
+        if (result == null) result = caseAnnotatedElement(modelElement);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case EditmodelPackage.RELATIONSHIP:
+      {
+        Relationship relationship = (Relationship)theEObject;
+        T result = caseRelationship(relationship);
+        if (result == null) result = caseVPMElement(relationship);
+        if (result == null) result = caseAnnotatedElement(relationship);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case EditmodelPackage.ENTITY:
+      {
+        Entity entity = (Entity)theEObject;
+        T result = caseEntity(entity);
+        if (result == null) result = caseModelElement(entity);
+        if (result == null) result = caseVPMElement(entity);
+        if (result == null) result = caseAnnotatedElement(entity);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case EditmodelPackage.RELATION:
+      {
+        Relation relation = (Relation)theEObject;
+        T result = caseRelation(relation);
+        if (result == null) result = caseModelElement(relation);
+        if (result == null) result = caseVPMElement(relation);
+        if (result == null) result = caseAnnotatedElement(relation);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case EditmodelPackage.TYPE_OF:
+      {
+        TypeOf typeOf = (TypeOf)theEObject;
+        T result = caseTypeOf(typeOf);
+        if (result == null) result = caseRelationship(typeOf);
+        if (result == null) result = caseVPMElement(typeOf);
+        if (result == null) result = caseAnnotatedElement(typeOf);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case EditmodelPackage.SUPERTYPE_OF:
+      {
+        SupertypeOf supertypeOf = (SupertypeOf)theEObject;
+        T result = caseSupertypeOf(supertypeOf);
+        if (result == null) result = caseRelationship(supertypeOf);
+        if (result == null) result = caseVPMElement(supertypeOf);
+        if (result == null) result = caseAnnotatedElement(supertypeOf);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      case EditmodelPackage.VPM_ELEMENT:
+      {
+        VPMElement vpmElement = (VPMElement)theEObject;
+        T result = caseVPMElement(vpmElement);
+        if (result == null) result = caseAnnotatedElement(vpmElement);
+        if (result == null) result = defaultCase(theEObject);
+        return result;
+      }
+      default: return defaultCase(theEObject);
+    }
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Model Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Model Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseModelElement(ModelElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Relationship</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Relationship</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseRelationship(Relationship object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Entity</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Entity</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseEntity(Entity object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Relation</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Relation</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseRelation(Relation object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Type Of</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Type Of</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseTypeOf(TypeOf object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Supertype Of</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Supertype Of</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseSupertypeOf(SupertypeOf object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>VPM Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>VPM Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseVPMElement(VPMElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>Annotated Element</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+   * @generated
+   */
+  public T caseAnnotatedElement(AnnotatedElement object)
+  {
+    return null;
+  }
+
+  /**
+   * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * <!-- begin-user-doc -->
+   * This implementation returns null;
+   * returning a non-null result will terminate the switch, but this is the last case anyway.
+   * <!-- end-user-doc -->
+   * @param object the target of the switch.
+   * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+   * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+   * @generated
+   */
+  public T defaultCase(EObject object)
+  {
+    return null;
+  }
+
+} //EditmodelSwitch
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/.classpath b/org.eclipse.viatra2.gtasm.patternmatcher.impl/.classpath
new file mode 100644
index 0000000..ad32c83
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/.project b/org.eclipse.viatra2.gtasm.patternmatcher.impl/.project
new file mode 100644
index 0000000..21cdd1e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.viatra2.gtasm.patternmatcher.impl</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra2.gtasm.patternmatcher.impl/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..4a26c10
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Wed Jan 12 11:20:55 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.6
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.viatra2.gtasm.patternmatcher.impl/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..8835e8a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,5 @@
+#Mon Sep 20 14:02:58 CEST 2010

+eclipse.preferences.version=1

+internal.default.compliance=default

+org.eclipse.jdt.ui.javadoc=false

+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\r\n * Copyright (c) 2004-2010 Akos Horvath, Gergely Varro and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n *    Akos Horvath - initial API and implementation\r\n *******************************************************************************/\r\n</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author Akos Horvath\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) 2004-2010 Akos Horvath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n *    Akos Horvath - initial API and implementation\r\n *******************************************************************************/\r\n\r\n\r\n${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.eclipse.viatra2.gtasm.patternmatcher.impl/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000..f3391b2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Thu Aug 03 02:30:54 CEST 2006
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/.settings/org.eclipse.wst.validation.prefs b/org.eclipse.viatra2.gtasm.patternmatcher.impl/.settings/org.eclipse.wst.validation.prefs
new file mode 100644
index 0000000..db982d7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/.settings/org.eclipse.wst.validation.prefs
@@ -0,0 +1,6 @@
+#Thu Aug 03 02:30:54 CEST 2006
+DELEGATES_PREFERENCE=delegateValidatorListorg.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator\=org.eclipse.wst.wsdl.validation.internal.eclipse.Validator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator\=org.eclipse.wst.xsd.core.internal.validation.eclipse.Validator;
+USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.jst.jsp.core.internal.validation.JSPJavaValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPDirectiveValidator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPELValidator;
+USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.jst.jsp.core.internal.validation.JSPJavaValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPDirectiveValidator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPELValidator;
+USER_PREFERENCE=overrideGlobalPreferencesfalse
+eclipse.preferences.version=1
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/META-INF/MANIFEST.MF b/org.eclipse.viatra2.gtasm.patternmatcher.impl/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..5067241
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/META-INF/MANIFEST.MF
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: VIATRA2 R3 Pattern Matcher Implementation
+Bundle-SymbolicName: org.eclipse.viatra2.gtasm.patternmatcher.impl;singleton:=true
+Bundle-Version: 3.3.0.qualifier
+Export-Package: 
+ org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.core,
+ org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions,
+ org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.extension,
+ org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.core,
+ org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal,
+ org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.algorithms,
+ org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph,
+ org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation,
+ org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg,
+ org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph,
+ org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term
+Require-Bundle: org.eclipse.viatra2.core2,
+ org.eclipse.viatra2.gtasm.model,
+ org.eclipse.viatra2.gtasm.patternmatcher,
+ org.eclipse.viatra2.gtasm.interpreter,
+ org.eclipse.core.runtime,
+ org.eclipse.viatra2.gtasm.interpreter.term,
+ org.eclipse.viatra2.gtasm.interpreter.impl
+Bundle-Vendor: BUTE-FTSRG
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.extension.VIATRAGTMatcherPlugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/about.html b/org.eclipse.viatra2.gtasm.patternmatcher.impl/about.html
new file mode 100644
index 0000000..b72be18
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/about.html
@@ -0,0 +1,28 @@
+<!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>About</title>

+</head>

+<body lang="EN-US">

+<h2>About This Content</h2>

+ 

+<p>July 4th, 2008</p>	

+<h3>License</h3>

+

+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 

+indicated below, the Content is provided to you under the org.eclipse.viatra2.gtasm.interpreter.term.rules and conditions of the

+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is 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>If you did not receive this Content directly from the Eclipse Foundation, the Content is 

+being redistributed by another party (&quot;Redistributor&quot;) and different org.eclipse.viatra2.gtasm.interpreter.term.rules and conditions may

+apply to your use of any object code in the Content.  Check the Redistributor's license that was 

+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise

+indicated below, the org.eclipse.viatra2.gtasm.interpreter.term.rules and conditions of the EPL still apply to any source code in the Content

+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>

+

+</body>

+</html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/build.properties b/org.eclipse.viatra2.gtasm.patternmatcher.impl/build.properties
new file mode 100644
index 0000000..5fd9a19
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/build.properties
@@ -0,0 +1,7 @@
+bin.includes = META-INF/,\
+               plugin.xml,\
+               .,\
+               schema/
+
+source.. = src/
+src.includes = schema/
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/plugin.xml b/org.eclipse.viatra2.gtasm.patternmatcher.impl/plugin.xml
new file mode 100644
index 0000000..72b031b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/plugin.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<?eclipse version="3.2"?>

+<plugin>

+   <extension

+         point="org.eclipse.viatra2.gtasm.patternmatcher.patternmatcher">

+      <matcherfactory

+            annotation_name="localsearch"

+            class="org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.core.LocalSearchPatternMatcherFactory"

+            id="org.eclipse.viatra2.patternmatcher.local_search"

+            name="Local Search based Pattern Matcher">

+      </matcherfactory>

+   </extension>

+   <extension

+         point="org.eclipse.viatra2.gtasm.patternmatcher.gtrulematcher">

+      <gtmatcherfactory

+            class="org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.core.LocalSearchGTRuleMatcherFactory"

+            id="org.eclipse.viatra2.gtmatcher.local_search"

+            name="Local Search based GT Rule Matcher">

+      </gtmatcherfactory>

+   </extension>

+   <extension

+         point="org.eclipse.viatra2.gtasm.patternmatcher.gtrulematcher">

+      <gtmatcherfactory

+            class="org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.core.ExtendedGTRuleMatcherwithAlternativePatternMatcherFactory"

+            id="org.eclipse.viatra2.gtmatcher.alternative"

+            name="Alternativer GT Rule Matcher which allows Alternative Pattern Matcher for the LHS">

+      </gtmatcherfactory>

+   </extension>

+</plugin>

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/schema/org.eclipse.viatra2.gtasm.patternmatcher.impl.alternativeseaarchgraph.exsd b/org.eclipse.viatra2.gtasm.patternmatcher.impl/schema/org.eclipse.viatra2.gtasm.patternmatcher.impl.alternativeseaarchgraph.exsd
new file mode 100644
index 0000000..032dfb4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/schema/org.eclipse.viatra2.gtasm.patternmatcher.impl.alternativeseaarchgraph.exsd
@@ -0,0 +1,87 @@
+<?xml version='1.0' encoding='UTF-8'?>

+<!-- Schema file written by PDE -->

+<schema targetNamespace="org.eclipse.viatra2.gtasm.patternmatcher.impl">

+<annotation>

+      <appInfo>

+         <meta.schema plugin="org.eclipse.viatra2.gtasm.patternmatcher.impl" id="alternativeseaarchgraph" name="Alternative Search Graph"/>

+      </appInfo>

+      <documentation>

+         [Enter description of this org.eclipse.viatra2.gtasm.patternmatcher.extension point.]

+      </documentation>

+   </annotation>

+

+   <element name="org.eclipse.viatra2.gtasm.patternmatcher.extension">

+      <complexType>

+         <attribute name="point" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appInfo>

+                  <meta.attribute translatable="true"/>

+               </appInfo>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="since"/>

+      </appInfo>

+      <documentation>

+         [Enter the first release in which this org.eclipse.viatra2.gtasm.patternmatcher.extension point appears.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="examples"/>

+      </appInfo>

+      <documentation>

+         [Enter org.eclipse.viatra2.gtasm.patternmatcher.extension point usage example here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="apiInfo"/>

+      </appInfo>

+      <documentation>

+         [Enter API information here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="implementation"/>

+      </appInfo>

+      <documentation>

+         [Enter information about supplied implementation of this org.eclipse.viatra2.gtasm.patternmatcher.extension point.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="copyright"/>

+      </appInfo>

+      <documentation>

+         

+      </documentation>

+   </annotation>

+

+</schema>

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/core/ExtendedGTRuleMatcherwithAlternativePatternMatcherFactory.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/core/ExtendedGTRuleMatcherwithAlternativePatternMatcherFactory.java
new file mode 100644
index 0000000..b6aa79a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/core/ExtendedGTRuleMatcherwithAlternativePatternMatcherFactory.java
@@ -0,0 +1,68 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Akos Horvath, Gergely Varro - initial API and implementation

+ *******************************************************************************/

+
+package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.core;

+

+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;

+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;

+import org.eclipse.viatra2.gtasm.patternmatcher.PatternMatcherParameters;

+import org.eclipse.viatra2.gtasm.patternmatcher.extension.IGTRuleMatcherFactory;

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GraphTransformationException;

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.ExtendedGTRuleMatcherwithAlternativePatternMatcher;

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.BasicTermHandler;

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.TermHandler;

+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IGTRuleMatcher;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;

+

+

+/**

+ *

+ * Implements the IGTRuleMatcherFactory extension point for the viatra GTASM interpreter with Incremental pattern matching

+ * @author Akos Horvath

+ */

+public class ExtendedGTRuleMatcherwithAlternativePatternMatcherFactory implements IGTRuleMatcherFactory {

+	

+	private IGTRuleMatcher construct(GTRule gtRule, IExecutionEnvironment enviroment, PatternMatcherParameters pmParams) 

+    		throws ViatraTransformationException {

+		if (gtRule.getPrecondition() != null) {

+			// traditional type gtRule with alternative pattern matching

+			TermHandler handler = new BasicTermHandler(enviroment);

+			return new ExtendedGTRuleMatcherwithAlternativePatternMatcher(gtRule,enviroment, handler, pmParams);

+		} else {

+			enviroment.getFramework().getLogger().warning("ActionPattern type GTRule not yet supported");

+		}

+		return null;

+	}

+

+	public IGTRuleMatcher getGTMatcher(IExecutionEnvironment gtEnviroment,

+			GTRule gtRule, PatternMatcherParameters mp)

+			throws ViatraTransformationException {

+		IGTRuleMatcher gtMatcher=null;

+		if (GTRuleMatchers.getInstance().containsKey(gtRule)) {
+			// We already had it precompiled

+			gtMatcher=GTRuleMatchers.getInstance().get(gtRule);

+			gtMatcher.initGTRule(gtEnviroment);

+		} else {

+			// We need to create a new gtmatcher

+			gtMatcher = construct(gtRule, gtEnviroment,mp);

+			if (gtMatcher != null) {

+				GTRuleMatchers.getInstance().put(gtRule, gtMatcher);

+			} else {

+				String[] context = {gtRule.getName()};

+				throw new GraphTransformationException(GTErrorStrings.GTRULETYPE_NOTSUPPORTED

+						,context

+						,gtRule);
+			}

+		}

+		return gtMatcher;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/core/GTRuleMatchers.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/core/GTRuleMatchers.java
new file mode 100644
index 0000000..de31bea
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/core/GTRuleMatchers.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.core;

+

+import java.util.Hashtable;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IGTRuleMatcher;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;
+

+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class GTRuleMatchers extends Hashtable<GTRule, IGTRuleMatcher> {

+	

+	/**

+	 * Stores the gt rule matchers previously created

+	 * 

+	 * @author Akos Horvath

+	 */

+	private static final long serialVersionUID = 2L;

+	private static GTRuleMatchers  _instance=new GTRuleMatchers();

+	public static GTRuleMatchers  getInstance()

+	{

+		return _instance;

+	}

+	

+	public GTRuleMatchers() {

+		super();

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/core/LocalSearchGTRuleMatcherFactory.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/core/LocalSearchGTRuleMatcherFactory.java
new file mode 100644
index 0000000..e399b0c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/core/LocalSearchGTRuleMatcherFactory.java
@@ -0,0 +1,71 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Akos Horvath, Gergely Varro - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.core;

+

+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;

+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;

+import org.eclipse.viatra2.gtasm.patternmatcher.PatternMatcherParameters;

+import org.eclipse.viatra2.gtasm.patternmatcher.extension.IGTRuleMatcherFactory;

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GraphTransformationException;

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.TraditionalGTRuleMatcher;

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.BasicTermHandler;

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.TermHandler;

+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IGTRuleMatcher;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;

+

+

+/**

+ * Implements the IGTRuleMatcherFactory org.eclipse.viatra2.gtasm.patternmatcher.extension point for the viatra GTASM org.eclipse.viatra2.gtasm.interpreter.impl.interpreter with Local search based pattern matching

+ * @author Akos Horvath

+ *

+ */

+public class LocalSearchGTRuleMatcherFactory implements IGTRuleMatcherFactory {

+	

+	private IGTRuleMatcher construct(GTRule gtRule, IExecutionEnvironment enviroment, PatternMatcherParameters pmParams) 

+			throws ViatraTransformationException {

+		if (gtRule.getPrecondition() != null) {

+			// traditional type gtRule with local search based pattern matching

+			TermHandler handler = new BasicTermHandler(enviroment);

+			return new TraditionalGTRuleMatcher(gtRule,enviroment, handler, pmParams);

+		} else {

+			enviroment.getFramework().getLogger().warning("ActionPattern type GTRule not yet supported");

+		}

+		return null;

+	}

+

+	public IGTRuleMatcher getGTMatcher(IExecutionEnvironment gtEnviroment,

+			GTRule gtRule, PatternMatcherParameters mp)

+			throws ViatraTransformationException {

+		IGTRuleMatcher gtMatcher=null;

+		if (GTRuleMatchers.getInstance().containsKey(gtRule)) {

+			// We already had it precompiled
+			gtMatcher=GTRuleMatchers.getInstance().get(gtRule);

+			gtMatcher.initGTRule(gtEnviroment);

+		} else {

+			// We need to make a new gtMatcher

+			// GTRuleBuilder gtBuilder = new GTRuleBuilder(gtEnviroment.getFramework().getLogger(), gtEnviroment.getFramework().getTopmodel().getModelManager(), handlerr);

+			// gtMatcher = gtBuilder.construct(gtRule, gtEnviroment,mp);

+			gtMatcher = construct(gtRule, gtEnviroment,mp);

+			if (gtMatcher != null) {

+				GTRuleMatchers.getInstance().put(gtRule, gtMatcher);

+			} else {

+				String[] context = {gtRule.getName()};

+				throw new GraphTransformationException(GTErrorStrings.GTRULETYPE_NOTSUPPORTED

+						,context

+						,gtRule);
+			}
+			

+		}

+		return gtMatcher;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/exceptions/GTErrorStrings.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/exceptions/GTErrorStrings.java
new file mode 100644
index 0000000..025f690
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/exceptions/GTErrorStrings.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions;

+

+/**Error templates

+ * @author Akos Horvath

+ *

+ */

+public class GTErrorStrings {

+	

+	
+	public static final String INTERNAL_ERROR_INPUTPARAMS_SYMPARAMS_LENGTH = "[INTERNAL ERROR] The number of input parameter's mappingd and do not match the number of signature element.";    
+	public static final String INTERNAL_ERROR_INPUTPARAM_WITHOUT_A_VALUE = "[INTERNAL ERROR] Input parameter without value (NULL)";
+	public static final String INTERNAL_GTVALIDATION_NOT_DELETED = "[INTERNAL ERROR] No delete operation on the '{1}' deletable parameter of the LHS";
+	public static final String INTERNAL_EMPTY_VALUE = "[INTERNAL ERROR] The '{1}' element in the {2} operation has an empty value (null)";
+	public static final String INTERNAL_CREATE_ENTITY ="[INTERNAL ERROR] Entity '{1}' creation failed due to: {2} ";
+	public static final String INTERNAL_CREATE_INSTANCEOF ="[INTERNAL ERROR] InstanceOf creation failed, between Type '{1}' and Instance '{2}' due to: {3}";
+	public static final String INTERNAL_CREATE_RELATION = "[INTERNAL ERROR] Relation '{1}' creation failed due to: {2}";
+	public static final String INTERNAL_CREATE_SUPERTYPEOF ="[INTERNAL ERROR] Inheritance creation failed, between SuperType: '{1}' and Subtype '{2}' due to: {3}";
+	public static final String INTERNAL_DELETE_MODELELEMENT = "[INTERNAL ERROR] ModelElement '{1}' deletion failed due to: {2} ";
+	public static final String INTERNAL_OPERATION_NOT_SUPPORTED = "[INTERNAL ERROR] The {1} operation is not supported";
+	public static final String INTERNAL_MOVE_MODELELEMENT = "[INTERNAL ERROR] The move element under a new container operation failed, between the Element '{1}' and the Container '{2}' due to {3}";
+	public static final String INTERNAL_SET_RELATION_TARGET = "[INTERNAL ERROR] The target of the '{1}' relation could not be set to the '{2}' element due to: {3}";
+	public static final String INTERNAL_SET_RELATION_SOURCE = "[INTERNAL ERROR] The source of the '{1}' relation could not be set to the '{2}' element due to: {3}";
+	
+	public static final String NOT_AN_ENTITY = "The '{1}' element in the {2} operation is not an Entity";
+	public static final String NOT_A_RELATION = "The '{1}' element in the {2} operation is not a Relation";
+	public static final String NOT_A_MODELELEMENT = "The '{1}' element in the {2} operation is not a ModelElement (Entity or Relation)";
+	
+	public static final String GTVALIDATION_SET_TARGET= "The Target of the {1} relation is set more than once";
+	public static final String GTVALIDATION_SET_SOURCE= "The Source of the {1} relation is set more than once";
+	public static final String GTVALIDATION_SET_BOTH= "Both the source and target of the {1} relation is set more than once";
+	public static final String GTVALIDATION_KEEP_DEL = "The {1} input variable is specified to be kept and also to be deleted";
+	public static final String GTVALIDATION_MORE_THANONE_DEL = "More than one delete operation is defined over the {1} element";
+	public static final String GTVALIDATION_MORE_THANONE_CREATE = "More then one create operation is defined on the {1} element";
+	public static final String GTVALIDATION_DEL_AND_OTHEROPERATION = "Conflicting operations on the {1} element. One delete operation and additionally {2} create, {3} move and {4} set operation(s)";
+	public static final String GTVALIDATION_DEL_AND_USED = "The {1} element is deleted but also invovled in other operations";
+	public static final String GTRULETYPE_NOTSUPPORTED = "The type of the {1} GT rule is not supported by the org.eclipse.viatra2.gtasm.interpreter.impl.interpreter bundle ";
+	public static final String NO_ALTERNATIVE_PATTERN_MATCHER = "No alternative pattern matcher was available for the {1} gtRule";
+	
+	//public static final String IN_CONTAINMENT_FAILED = "The {1} parameter in the LHS has more than one 'IN' containment constraint defined over.";
+	public static final String SYMBOLIC_QUANTIFICITION = "The {1} input symbolic parameter is not quantified by the invoking rule";
+	public static final String NOT_CONTAINER = " {1} cannot be resolved as a container element (possibly not an entity).";
+	public static final String MORE_ONE_IN_CONTAINMENT = "{1} has more than 1 'IN' type containment constraints";
+	public static final String GTRULE_RHS_FAILED_CHECK = "The '{1}' consistency check operation failed on the right hand side of the {2} gtRule.";
+	public static final String GTRULE_RHS_FAILED_MANIPULATION = "The '{1}' model manipulation operation failed on the right hand side of the {2} gtRule.";
+

+	

+//	public static final String CREATE_SUPERTYPEOF = "SuperTypeOf creation failed, between: ";
+//	public static final String DELETE_INSTANCEOF = "InstanceOf deletion failed, between: ";
+//	public static final String DELETE_SUPERTYPEOF = "SuperTypeOf deletion failed, between: ";
+//	public static final String CONTAINMENT_FAILED = "Containment Constraint failed on the RHS Element between: ";
+//	public static final String INIT = " \n Error during the initialization of the gt Rule parameters: ";
+//	public static final String INIT_ACTION= " \n Error during initializing the variables for the ACTION part of the GtRule (): ";
+//	public static final String GTRULE_EXCEPTION_STRING= "Error in gtRule: ";

+//	public static final String CAST_EXCEPTION = "Not a ModelElement (Entity or Relation) type Variable (Class Cast failed)";

+//	public static final String CAST_EXCEPTION_ENTITY = "Not an Entity type Variable (Class Cast failed):";

+//	public static final String GTRULE_CONSTRUCT= "GTRULE construct failed";

+	
+	
+	
+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/exceptions/GTOperationException.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/exceptions/GTOperationException.java
new file mode 100644
index 0000000..91613ae
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/exceptions/GTOperationException.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions;

+

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+/** 
+ * The specific exception for the GT Rule execution
+ * @author Akos Horvath
+ *

+ */

+public class GTOperationException extends GraphTransformationException {

+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -4290690575225451930L;
+

+	public GTOperationException(String msg, String[] context,
+			AnnotatedElement element) {
+		super(msg, context, element);
+	}
+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/exceptions/GTRuleBuildingException.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/exceptions/GTRuleBuildingException.java
new file mode 100644
index 0000000..d482720
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/exceptions/GTRuleBuildingException.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions;

+

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+
+/**
+ * The specific exception of for the building of a GT Rule matcher
+ * @author Akos Horvath
+ *

+ */

+public class GTRuleBuildingException extends GraphTransformationException {

+	

+	/**

+	 * 

+	 */

+	private static final long serialVersionUID = 5766827372883906119L;

+	

+	public GTRuleBuildingException(String string,String[] context, AnnotatedElement node) {

+		super(string, context, node);

+	}

+
+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/exceptions/GraphTransformationException.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/exceptions/GraphTransformationException.java
new file mode 100644
index 0000000..4be7a14
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/exceptions/GraphTransformationException.java
@@ -0,0 +1,32 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Akos Horvath, Gergely Varro - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions;

+

+import org.eclipse.viatra2.gtasm.interpreter.exception.GTASMException;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;

+

+

+public class GraphTransformationException extends GTASMException {

+	/**

+	 * 

+	 */

+	private static final long serialVersionUID = -9216398057977736617L;

+

+/*	public GraphTransformationException(String msg) {

+		super(msg);

+	}*/

+

+	public GraphTransformationException(String msg, String[] context, AnnotatedElement element) {

+		super(msg,context);

+		addNewStackElement(element);

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/extension/VIATRAGTMatcherPlugin.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/extension/VIATRAGTMatcherPlugin.java
new file mode 100644
index 0000000..1110611
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/extension/VIATRAGTMatcherPlugin.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.extension;

+

+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+

+/**

+ * The activator class for the GtMatcher. Holds the references for the alternative pattern matcher

+ * @author Akos Horvath

+ *

+ */

+public class VIATRAGTMatcherPlugin extends Plugin {

+

+	// The plug-in ID

+	public static final String PLUGIN_ID = "org.eclipse.viatra2.gtasm.patternmatcher.impl";

+	//Extension points

+//	public static final String PATTERN_MATCHER_EXT_ID = "org.eclipse.viatra2.gtasm.patternmatcher.impl.alternativepatternmatcher";

+//

+//	public static final String INCREMENTAL_PM_FACTORY_ID="org.eclipse.viatra2.gtasm.patternmatcher.incremental.alternativeGTmatcher";

+//	//  public static final String INCREMENTAL_PARALlEL_PM_FACTORY_ID="org.eclipse.viatra2.gtasm.patternmatcher.incremental.parallel.alternativeGTmatcher";
+//	//	public static final String LOCAL_PM_FACTORY_ID = "org.eclipse.viatra2.local_search";

+//	public static final String DEFAULT_ALTERNATIVE_PM_FACTORY_ID = INCREMENTAL_PM_FACTORY_ID;

+

+	// The shared instance

+	private static VIATRAGTMatcherPlugin  plugin;

+

+	/**

+	 * The constructor

+	 */

+	public VIATRAGTMatcherPlugin() {

+		plugin = this;

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)

+	 */

+	@Override
+	public void start(BundleContext context) throws Exception {

+		super.start(context);

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)

+	 */

+	@Override
+	public void stop(BundleContext context) throws Exception {

+		plugin = null;

+		super.stop(context);

+	}

+

+	/**

+	 * Returns the shared instance

+	 *

+	 * @return the shared instance

+	 */

+	public static VIATRAGTMatcherPlugin getDefault() {

+		return plugin;

+	}

+

+//	/** PATTERN MATCHER FACTORIES*/

+//	private Map<String,IAlternativePatternMatcherFactory> patternMatcherFactories;

+//

+//	public Map<String,IAlternativePatternMatcherFactory> getPatternMatcherFactories()

+//	{

+//		if (patternMatcherFactories==null)

+//		{

+//			patternMatcherFactories = initPatternMatcherFactories();

+//		}

+//		return patternMatcherFactories;

+//	}

+//

+//	/** Returns the pattern matcher registered with the input id

+//	 * @param id The id of the registered patternMatcher plugin id

+//	 * @return the IAlternativePatternMatcherFactory for the patternMatcher

+//	 */

+//	public IAlternativePatternMatcherFactory getPatternMatcherFactory(String id){

+//		if (patternMatcherFactories==null)

+//		{

+//			patternMatcherFactories = initPatternMatcherFactories();

+//		}

+//		return patternMatcherFactories.containsKey(id)? patternMatcherFactories.get(id): null;

+//	}

+//

+//

+//	private Map<String,IAlternativePatternMatcherFactory> initPatternMatcherFactories()

+//	{

+//		IExtensionRegistry reg = Platform.getExtensionRegistry();

+//		IExtensionPoint poi = reg.getExtensionPoint(PATTERN_MATCHER_EXT_ID);

+//		HashMap<String,IAlternativePatternMatcherFactory> r = new HashMap<String,IAlternativePatternMatcherFactory>();

+//		if (poi==null) return r;

+//		IExtension[] exts = poi.getExtensions();

+//		for (int i=0;i<exts.length;i++)

+//		{

+//			IConfigurationElement[] el = exts[i].getConfigurationElements();

+//			for (int j=0;j<el.length;j++)

+//			{

+//				try

+//				{

+//					Object o = el[j].createExecutableExtension("class");

+//					if (o instanceof IAlternativePatternMatcherFactory)

+//						{String id = el[j].getAttribute("id");

+//						 r.put(id,(IAlternativePatternMatcherFactory)o);

+//						}

+//				}

+//				catch (Exception e)

+//				{

+//					e.printStackTrace();

+//				}

+//			}

+//		}

+//		return r;

+//	}

+//

+//	/** Checks if there is a registered pattern matcher on the plugin

+//	 * @return

+//	 */

+//	public Boolean hasAlternativePatternMatcher(){

+//		if (patternMatcherFactories==null)

+//		{

+//			patternMatcherFactories = initPatternMatcherFactories();

+//		}

+//		return patternMatcherFactories.size() > 0;

+//	}

+

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/ExtendedGTRuleMatcherwithAlternativePatternMatcher.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/ExtendedGTRuleMatcherwithAlternativePatternMatcher.java
new file mode 100644
index 0000000..9deb398
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/ExtendedGTRuleMatcherwithAlternativePatternMatcher.java
@@ -0,0 +1,55 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Akos Horvath, Gergely Varro - initial API and implementation

+ *******************************************************************************/

+
+package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal;

+

+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;

+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;

+import org.eclipse.viatra2.gtasm.patternmatcher.PatternMatcherParameters;

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.ITermHandler;

+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IPatternMatcher;

+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.PatternMatcherProvider;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;

+

+

+/**

+ * Provides a complete GT rule matcher functionality with the possibility to use alternative pattern matchers for the LHS of the GT rule

+ * @author Akos Horvath

+ *

+ */

+public class ExtendedGTRuleMatcherwithAlternativePatternMatcher extends TraditionalGTRuleMatcher {

+

+	public ExtendedGTRuleMatcherwithAlternativePatternMatcher(GTRule gt,

+			IExecutionEnvironment enviroment, ITermHandler handler,

+			PatternMatcherParameters mp) throws ViatraTransformationException {

+		super(gt, enviroment, handler, mp);

+	}

+

+	/* The only method that has to be overridden in order to enable the Alternative Pattern Matchers in case when we want to use

+	 * the already implemented Traditional GT Rule matcher

+	 * (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.TraditionalGTRuleMatcher#getPatternMatcherforPreCondition()

+	 */

+	@Override

+	protected IPatternMatcher getPatternMatcherforPreCondition() throws ViatraTransformationException{
+		// is true pseudorandom required?

+		isRandom = false;

+		for (Object annot : gtRule.getPrecondition().getCalledPattern().getRuntimeAnnotations()) {

+			if ("@random".equals(((RuntimeAnnotation) annot).getAnnotationName().toLowerCase())) {

+				isRandom = true; break;

+			}

+		}	

+		

+		return PatternMatcherProvider.getInstance().getPatternMatcher(

+				gtEnvironment, gtRule.getPrecondition().getCalledPattern());

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/GTElementMapping.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/GTElementMapping.java
new file mode 100644
index 0000000..2221911
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/GTElementMapping.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal;

+

+/**A mapping between the LHS and RHS input elements 

+ * @author Akos Horvath

+ *

+ */

+

+public class GTElementMapping {

+	

+	private int  lhsInputOrderIndex , rhsInputOrderIndex;

+	private GTElementMappingType mappingType;

+	//private GTElementRelationShipMapping relationShips;

+	

+

+	public GTElementMapping(int lhsInputIndex,int rhsInputIndex, GTElementMappingType type){

+		lhsInputOrderIndex = lhsInputIndex;

+		rhsInputOrderIndex = rhsInputIndex;

+		mappingType = type;

+		//relationShips = new GTElementRelationShipMapping();

+	}

+	

+	public GTElementMapping(int lhsInputIndex,int rhsInputIndex){

+		lhsInputOrderIndex = lhsInputIndex;

+		rhsInputOrderIndex = rhsInputIndex;

+		mappingType = null;

+		//relationShips = new GTElementRelationShipMapping();

+	}

+	

+	

+	/**

+	 * @return the mappingType

+	 */

+	public GTElementMappingType getMappingType() {

+		return mappingType;

+	}

+

+	/**

+	 * @param mappingType the mappingType to set

+	 */

+	public void setMappingType(GTElementMappingType mappingType) {

+		this.mappingType = mappingType;

+	}

+

+	/**

+	 * @return the rhsInputOrderIndex

+	 */

+	public int getRhsInputOrderIndex() {

+		return rhsInputOrderIndex;

+	}

+

+	/**

+	 * @param rhsInputOrderIndex the rhsInputOrderIndex to set

+	 */

+	public void setRhsInputOrderIndex(int rhsInputOrderIndex) {

+		this.rhsInputOrderIndex = rhsInputOrderIndex;

+	}

+

+	/**

+	 * @return the lhsInputOrderIndex

+	 */

+	public int getLhsInputOrderIndex() {

+		return lhsInputOrderIndex;

+	}

+

+	/**

+	 * @param lhsInputOrderIndex the lhsInputOrderIndex to set

+	 */

+	public void setLhsInputOrderIndex(int lhsInputOrderIndex) {

+		this.lhsInputOrderIndex = lhsInputOrderIndex;

+	}

+

+	/**

+	 * @return the relationShips

+	 */

+//	public GTElementRelationShipMapping getRelationShips() {

+//		return relationShips;

+//	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/GTElementMappingType.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/GTElementMappingType.java
new file mode 100644
index 0000000..351b740
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/GTElementMappingType.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal;

+

+/** Possible types of the LHS and RHS mapping

+ * @author Akos Horvath

+ *

+ */

+public enum GTElementMappingType {

+	

+	DEL,

+	KEEP

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/GTOperationContext.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/GTOperationContext.java
new file mode 100644
index 0000000..4099fb9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/GTOperationContext.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal;

+

+import java.util.Collection;
+import java.util.Vector;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.IUpdatePlanOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.ISearchPlanOperation;
+

+

+/**Holds the non-input specific operations of a GT Rule

+ * @author Akos Horvath

+ *

+ */

+public class GTOperationContext {

+	

+	private MatchingFrame returnFrame;

+	private Collection<IUpdatePlanOperation> finalOperations; //non input specific operations

+	private Collection<ISearchPlanOperation> CheckSet; //containment check operation based on the input parameters parent constraint

+

+	public GTOperationContext(MatchingFrame returnFrame, Collection<IUpdatePlanOperation> finalOperations,

+			Collection<ISearchPlanOperation> CheckSet) {

+		this.finalOperations = finalOperations;

+		this.returnFrame = returnFrame;

+		this.CheckSet = CheckSet;

+	}

+

+	/**

+	 * @return the finalOperations

+	 */

+	public Collection<IUpdatePlanOperation> getFinalOperations() {

+		return finalOperations;

+	}

+

+	/**

+	 * @return the returnFrame

+	 */

+	public MatchingFrame getReturnFrame() {

+		return returnFrame;

+	}

+

+	/**

+	 * @param finalOperations the finalOperations to set

+	 */

+	public void setFinalOperations(Vector<IUpdatePlanOperation> finalOperations) {

+		this.finalOperations = finalOperations;

+	}

+

+	/**

+	 * @return the checkSet

+	 */

+	protected Collection<ISearchPlanOperation> getCheckSet() {

+		return CheckSet;

+	}

+

+	/**

+	 * @param checkSet the checkSet to set

+	 */

+	protected void setCheckSet(Collection<ISearchPlanOperation> checkSet) {

+		CheckSet = checkSet;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/GTOperationGenerator.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/GTOperationGenerator.java
new file mode 100644
index 0000000..be17554
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/GTOperationGenerator.java
@@ -0,0 +1,480 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal;

+

+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTRuleBuildingException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateEntity;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateEntityWithConstantContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateEntityWithVariableContainment;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateInstanceofBound2Bound;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateInstanceofBound2Constant;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateInstanceofConstant2Bound;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateInstanceofConstant2Constant;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateRelationBound2Bound;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateRelationBound2Constant;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateRelationConstant2Bound;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateRelationConstant2Constant;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateSuperTypeofBound2Bound;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateSuperTypeofBound2Constant;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateSuperTypeofConstant2Bound;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateSuperTypeofConstant2Constant;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.ElementManipulationOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.IUpdatePlanOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.MoveBoundunderBound;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.MoveBoundunderConstant;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.SetRelationSource;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.SetRelationTarget;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.EdgeType;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.VPMModelElementType;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.algorithms.ISearchGraph;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.BoundToBoundCheckOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.BoundToConstantCheckOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.ConstantToBoundCheckOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.ConstantToConstantCheckOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.ISearchPlanOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.IsEntityorRelationCheckOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.ConstantSearchGraphNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.VariableSearchGraphNode;
+

+

+/**
+ * Responsible for the generation of the GT rule based operation

+ * @author Akos Horvath

+  */

+public class GTOperationGenerator {

+	

+	 

+    /**

+     * Generates the operation related to the node element, a node can represent a vpm.entity or a vpm.relation

+     * @param node a node in the search graph

+     * @param manager the model manager of the VIATRA model space

+     * @param postSearchPlanOperations  a collection that holds the operations related to the consistency of the matching of the rule (injectivity or containment)

+     * @return a simple operation that is related with the input node element

+     * @throws GTRuleBuildingException 

+     */

+    public static ElementManipulationOperation getModelManipulationOperation(VariableSearchGraphNode node 

+    		, IModelManager manager

+    		, ArrayList<ISearchPlanOperation> checkSet

+    		, ISearchGraph searchGraph

+    		)

+    throws GTRuleBuildingException{

+    	ElementManipulationOperation operation = null;

+    	

+//    	if(!node.getTreeEdge().getSourceNode().isChecked() || node.isChecked())

+//    		return null;

+//    	

+    	if(node.getVpmModelElementType().compareTo(VPMModelElementType.ENTITY) == 0)

+    	  		{

+    			SearchGraphEdge containmentEdge= null;

+    			node.setChecked(true);

+    			

+    			//only works when a node has none or only one IN constraint

+    			for(SearchGraphEdge edge : node.getSources()){

+    				if(edge.getVPMEdgeType().compareTo(EdgeType.IN) == 0

+    						&& edge.isSource()

+    						&& !edge.isChecked()

+    						&& edge.getSourceNode().isChecked())

+	    					{if(containmentEdge == null)

+	    						{containmentEdge = edge;}

+	    					else

+	    						{
+	    						String[] context = {node.getName()};
+	    						throw new GTRuleBuildingException(GTErrorStrings.MORE_ONE_IN_CONTAINMENT
+	    								,context
+	    								,searchGraph.getGTASMRepresentation(node));
+	    						}

+	    					}

+    				//the element has below containment on it

+    				else if(edge.getVPMEdgeType().compareTo(EdgeType.BELOW) == 0

+    							&& !edge.isChecked()

+    							&& edge.isSource())

+    						{edge.setChecked(true);

+    						

+//    						if(!(edge.getSourceNode() instanceof VariableSearchGraphNode

+//    								&& edge.getVPMEdgeType().equals(EdgeType.BELOW)

+//    								&& (template.getValue(((VariableSearchGraphNode)edge.getSourceNode()).getId()) != null)

+//    								&& ((IModelElement)template.getValue(((VariableSearchGraphNode)edge.getSourceNode()).getId())).equals(manager.getRoot())))

+//    							//check that element is below root element is not needed

+    						checkSet.add(getBelowContainmentCheckOperation(manager,edge));

+    		    			}

+	    		}

+    			

+    			if(containmentEdge != null)

+    				{containmentEdge.setChecked(true);

+    				if(containmentEdge.getSourceNode() instanceof VariableSearchGraphNode) //variable type container

+    					return new CreateEntityWithVariableContainment(node.getId(),manager,((VariableSearchGraphNode)containmentEdge.getSourceNode()));

+    				else//constant node container

+    					try{

+    					return new CreateEntityWithConstantContainer(node.getId(),manager
+    							,(IEntity)manager.getElementByName(((ConstantSearchGraphNode)containmentEdge.getSourceNode()).getElement())
+    							,(ConstantSearchGraphNode)containmentEdge.getSourceNode());

+    					}catch(ClassCastException e)

+	        				{
+    						String[] context = {containmentEdge.getSourceNode().getName()};

+	        				throw new GTRuleBuildingException(GTErrorStrings.NOT_CONTAINER
+	        						,context
+	        						,searchGraph.getGTASMRepresentation(containmentEdge.getSourceNode()));

+	        				}

+    					}    			

+    			else return new CreateEntity(node.getId(),manager);

+    			}

+    	else

+    	if(node.getVpmModelElementType().compareTo(VPMModelElementType.RELATION) == 0)

+	    	{SearchGraphNode target = null;

+	    	 SearchGraphNode source = null;

+	    	 SearchGraphEdge sourceedge = null;

+	    	 SearchGraphEdge targetedge = null;

+	    	 

+	    	 //get the target and the source of the edge

+	    	 for(SearchGraphEdge edge: node.getSources())

+	    	 	{

+	    		 if(edge.getVPMEdgeType().compareTo(EdgeType.SOURCE) == 0

+	    				 && (!edge.isSource())

+	    				 && edge.getSourceNode().isChecked())

+	    		 	{source = edge.getSourceNode();

+	    		 	sourceedge = edge;

+	    		 	}

+	    		 else

+	    		 if(edge.getVPMEdgeType().compareTo(EdgeType.TARGET) == 0

+				 		&& (!edge.isSource())

+				 		&& edge.getSourceNode().isChecked()) 

+	    			 {target = edge.getSourceNode();

+	    			  targetedge = edge;

+	    			 }

+	    	 	}

+	    	 

+	    	 // creates a create operation for the relation and connects it to the target and source Elements

+	    	 if(target != null && source != null)

+	    	 	{

+	    		 if(source instanceof VariableSearchGraphNode && target instanceof VariableSearchGraphNode)

+	    				operation = new CreateRelationBound2Bound(((VariableSearchGraphNode)source).getId()

+	    							,((VariableSearchGraphNode)target).getId()

+	    							,node.getId()
+	    							, manager);

+	    			else

+	    			if(source  instanceof VariableSearchGraphNode && target instanceof ConstantSearchGraphNode )

+	    				operation = new CreateRelationBound2Constant(((VariableSearchGraphNode)source).getId()

+	    						,(ConstantSearchGraphNode)target

+	    						,node.getId()
+	    						, manager);

+	    			else

+	    			if(source  instanceof ConstantSearchGraphNode && target instanceof VariableSearchGraphNode)

+	    				operation = new CreateRelationConstant2Bound((ConstantSearchGraphNode)source

+	    						,((VariableSearchGraphNode)target).getId()

+	    						,node.getId()
+	    						, manager);

+	    			else

+	    			if(source  instanceof ConstantSearchGraphNode && target instanceof ConstantSearchGraphNode)

+	    				operation = new CreateRelationConstant2Constant((ConstantSearchGraphNode)source

+	    						,(ConstantSearchGraphNode)target

+	    						,node.getId()
+	    						, manager);

+	    		 

+	    		 node.setChecked(true);

+	    		 sourceedge.setChecked(true);

+	    		 targetedge.setChecked(true);

+	    		 return operation;

+	    	 	}

+	    	}

+    		

+    	return null;

+    }

+    

+    

+    /**

+     * Generated the operation related to the edge input parameter, an edge represents a vpm.relatinship or target/source of a vpm.relation

+     * @param edge SearchGraphEdge element of the search graph

+     * @param manager model manager of the VIATRA model space

+     * @param checkSet a collection that holds the operations related to the consistency of the matching of the rule (injectivity and containment)

+     * @return a simple operation related to the input edge parameter

+     * @throws GTRuleBuildingException

+     */

+    public static ElementManipulationOperation getModelManipulationOperation(SearchGraphEdge edge

+    		,IModelManager manager

+    		,ArrayList<ISearchPlanOperation> checkSet
+    		, ISearchGraph searchGraph) 

+    throws GTRuleBuildingException {

+    	ElementManipulationOperation operation = null;

+    	

+    	if( (!edge.getSourceNode().isChecked()) || !edge.getTargetNode().isChecked())

+    		return null;

+

+    	//supertypeof, traversed on the inverse edge

+    	if(edge.getVPMEdgeType().compareTo(EdgeType.SUPERTYPEOF) == 0 

+    			&& !edge.isSource())

+    			 //TODO: have to change to handle input parameters supertype change

+    			{

+    		

+    		//	cannot create SupertypeOf Relationships to vpm Entities or Relations

+    			if(edge.getTargetNode() instanceof ConstantSearchGraphNode && 
+    					( ((ConstantSearchGraphNode)edge.getTargetNode()).getElement().equals(ISearchGraph.VPM_RELATION_FQN)
+    							|| ((ConstantSearchGraphNode)edge.getTargetNode()).getElement().equals(ISearchGraph.VPM_ENTITY_FQN) )
+    			  )

+    			{

+    			edge.setChecked(true);

+    			return null;

+    			}	

+ 

+    			if(edge.getSourceNode() instanceof VariableSearchGraphNode && 	edge.getTargetNode() instanceof VariableSearchGraphNode)

+						operation = new CreateSuperTypeofBound2Bound(((VariableSearchGraphNode)edge.getSourceNode()).getId()

+								,((VariableSearchGraphNode)	edge.getTargetNode()).getId()

+								, manager,edge);

+				else

+				if(edge.getSourceNode()  instanceof VariableSearchGraphNode && 	edge.getTargetNode() instanceof ConstantSearchGraphNode )

+					operation = new CreateSuperTypeofBound2Constant(((VariableSearchGraphNode)edge.getSourceNode()).getId()

+							,manager.getElementByName(((ConstantSearchGraphNode)edge.getTargetNode()).getElement())

+							, manager,edge);

+				else

+				if(edge.getSourceNode()  instanceof ConstantSearchGraphNode && 	edge.getTargetNode() instanceof VariableSearchGraphNode)

+					operation = new CreateSuperTypeofConstant2Bound(manager.getElementByName(((ConstantSearchGraphNode)edge.getSourceNode()).getElement())

+							,((VariableSearchGraphNode)	edge.getTargetNode()).getId()

+							, manager,edge);

+				else

+				if(edge.getSourceNode()  instanceof ConstantSearchGraphNode && 	edge.getTargetNode() instanceof ConstantSearchGraphNode)

+					operation = new CreateSuperTypeofConstant2Constant(manager.getElementByName(((ConstantSearchGraphNode)edge.getSourceNode()).getElement())

+							,manager.getElementByName(((ConstantSearchGraphNode)edge.getTargetNode()).getElement())

+							, manager,edge);

+	    		

+		    	edge.setChecked(true);

+				return operation;

+				}

+

+    	//instanceof

+    	if(edge.getVPMEdgeType().compareTo(EdgeType.INSTANCEOF) == 0 

+    			&& edge.isSource())

+    		{	

+    				

+    		//cannot create instanceOF Relationships to vpm Entities or Relations

+			if(edge.getSourceNode() instanceof ConstantSearchGraphNode && 
+					(((ConstantSearchGraphNode)edge.getSourceNode()).getElement().equals(ISearchGraph.VPM_RELATION_FQN)
+						|| ((ConstantSearchGraphNode)edge.getSourceNode()).getElement().equals(ISearchGraph.VPM_ENTITY_FQN))
+			  )

+			{

+			edge.setChecked(true);

+			return null;

+			}	

+    		

+    		

+    		if(edge.getSourceNode() instanceof VariableSearchGraphNode && 	edge.getTargetNode() instanceof VariableSearchGraphNode)

+    				operation = new CreateInstanceofBound2Bound(((VariableSearchGraphNode)edge.getSourceNode()).getId()

+									,((VariableSearchGraphNode)	edge.getTargetNode()).getId()

+									, manager,edge);

+			else

+			if(edge.getSourceNode()  instanceof VariableSearchGraphNode && 	edge.getTargetNode() instanceof ConstantSearchGraphNode )

+					operation = new CreateInstanceofBound2Constant(((VariableSearchGraphNode)edge.getSourceNode()).getId()

+								,manager.getElementByName(((ConstantSearchGraphNode)	edge.getTargetNode()).getElement())

+								, manager,edge);

+			else

+			if(edge.getSourceNode()  instanceof ConstantSearchGraphNode && 	edge.getTargetNode() instanceof VariableSearchGraphNode)

+					operation = new CreateInstanceofConstant2Bound(manager.getElementByName(((ConstantSearchGraphNode)edge.getSourceNode()).getElement())

+								,((VariableSearchGraphNode)	edge.getTargetNode()).getId()

+								, manager,edge);

+			else

+			if(edge.getSourceNode()  instanceof ConstantSearchGraphNode && 	edge.getTargetNode() instanceof ConstantSearchGraphNode)

+					operation = new CreateInstanceofConstant2Constant(manager.getElementByName(((ConstantSearchGraphNode)edge.getSourceNode()).getElement())

+								,manager.getElementByName(((ConstantSearchGraphNode)	edge.getTargetNode()).getElement())

+								, manager,edge);

+		    		

+		    edge.setChecked(true);

+		    return operation;

+		   	}

+    	

+    	if(edge.getVPMEdgeType().compareTo(EdgeType.BELOW) == 0 

+    			&& edge.isSource())

+    			{

+	       		checkSet.add(getBelowContainmentCheckOperation(manager,edge));

+    			//Debug

+    			//logger.debug("Containment Check Below "+edge.getSourceNode().getName()+" below "+edge.getSourceNode().getName());

+    			//if move is needed for input parameters than this line have to be changed

+    			edge.setChecked(true);

+    			}

+    	

+    	if(edge.getVPMEdgeType().compareTo(EdgeType.IN) == 0 

+    			&& edge.isSource())

+    			{

+    			    		

+    			try{

+    			if(edge.getSourceNode() instanceof ConstantSearchGraphNode)

+    				operation = new MoveBoundunderConstant(manager

+    						,(IEntity)manager.getElementByName(((ConstantSearchGraphNode)edge.getSourceNode()).getElement())

+    						,((VariableSearchGraphNode)edge.getTargetNode()).getId()
+    						,edge);

+    			else

+    			if(edge.getSourceNode() instanceof VariableSearchGraphNode)

+    				operation = new MoveBoundunderBound(manager

+    						,((VariableSearchGraphNode)edge.getSourceNode()).getId()

+    						,((VariableSearchGraphNode)edge.getTargetNode()).getId()
+    						,edge);

+    			

+    			edge.setChecked(true);

+    			return operation;

+    			}catch(ClassCastException e)

+    				{
+    				String[] context = {edge.getSourceNode().getName()};
+    				throw new GTRuleBuildingException(GTErrorStrings.NOT_CONTAINER
+    						,context
+    						,searchGraph.getGTASMRepresentation(edge.getSourceNode()));

+    				}

+    			}

+    			

+//

+//    	if(edge.getVPMEdgeType().compareTo(EdgeType.SOURCE) ==0 

+//    			|| edge.getVPMEdgeType().compareTo(EdgeType.TARGET) ==0)

+//    			{//Debug

+//    			System.out.println("Relation "+edge.getName());

+//    			}

+    	

+    	//target and source (this cannot be processed as it is connected to the Relation searchgraph node creation

+   	return null;

+    }

+    

+    /**

+     * Generates containment check operation represented by the edge input parameter

+     * @param manager model manager of the viatra model space

+     * @param edge a containment edge in the search graph

+     * @return the containment check operation based on the edge input param 

+     */

+    public static ISearchPlanOperation getBelowContainmentCheckOperation(IModelManager manager,SearchGraphEdge edge) {

+    	ISearchPlanOperation sop = null;

+    

+	if(edge.getSourceNode() instanceof VariableSearchGraphNode && edge.getTargetNode() instanceof VariableSearchGraphNode)

+		sop = new BoundToBoundCheckOperation(((VariableSearchGraphNode)edge.getSourceNode()).getId()

+					,((VariableSearchGraphNode)edge.getTargetNode()).getId()

+					,edge);

+	else

+	if(edge.getSourceNode() instanceof VariableSearchGraphNode && edge.getTargetNode() instanceof ConstantSearchGraphNode )

+		sop = new BoundToConstantCheckOperation(((VariableSearchGraphNode)edge.getSourceNode()).getId()

+				,manager.getElementByName(((ConstantSearchGraphNode)edge.getTargetNode()).getElement())

+				,edge);

+	else

+	if(edge.getSourceNode() instanceof ConstantSearchGraphNode && edge.getTargetNode() instanceof VariableSearchGraphNode)

+		sop = new ConstantToBoundCheckOperation(manager.getElementByName(((ConstantSearchGraphNode)edge.getSourceNode()).getElement())

+				,((VariableSearchGraphNode)edge.getTargetNode()).getId()

+				,edge);

+	else

+	if(edge.getSourceNode() instanceof ConstantSearchGraphNode && edge.getTargetNode() instanceof ConstantSearchGraphNode)

+		sop = new ConstantToConstantCheckOperation(manager.getElementByName(((ConstantSearchGraphNode)edge.getSourceNode()).getElement())

+				,manager.getElementByName(((ConstantSearchGraphNode)edge.getTargetNode()).getElement())

+				,edge);

+	

+    return sop;}

+

+

+	/** Generates operation related to bound input parameters for the RHS.

+	 * @param node The input search graph node

+	 * @param manager Model manager of the model space

+	 * @param checkSet Collection containing the check operation for the RHS

+	 * @return The model manipulation operations related to the input node.

+	 */

+	public static Collection<IUpdatePlanOperation> getInputSpecificOperation(VariableSearchGraphNode node

+			, IModelManager manager, 

+			ArrayList<ISearchPlanOperation> checkSet) {

+		Collection<IUpdatePlanOperation> operations = new ArrayList<IUpdatePlanOperation>();

+		

+		

+		for(SearchGraphEdge edge : node.getSources()){

+		

+		/** Check Operations*/	

+		//constant instance of relation on a variable from the lhs

+		if(edge.getVPMEdgeType().compareTo(EdgeType.INSTANCEOF) == 0

+				&& edge.isSource()

+				&& edge.getSourceNode() instanceof ConstantSearchGraphNode)

+					{
+					//specific operation required when the type is vpm.entity or vpm.relation
+					if(((ConstantSearchGraphNode)edge.getSourceNode()).getElement().equals(ISearchGraph.VPM_RELATION_FQN)
+									|| ((ConstantSearchGraphNode)edge.getSourceNode()).getElement().equals(ISearchGraph.VPM_ENTITY_FQN))
+						{
+						
+						ISearchPlanOperation op = new IsEntityorRelationCheckOperation(node.getId()
+								,edge,
+								((ConstantSearchGraphNode)edge.getSourceNode()).getElement());
+						checkSet.add(op);
+						}
+					else
+						{

+						ISearchPlanOperation op = new ConstantToBoundCheckOperation(

+									manager.getElementByName(((ConstantSearchGraphNode)	edge.getSourceNode()).getElement()),

+									node.getId(),
+									edge);

+						checkSet.add(op);
+						}

+			

+					edge.setChecked(true);

+					edge.getSourceNode().setChecked(true);

+					}

+		//constant Supertype relation to an input parameter which is from the lhs pattern

+		else

+		if(edge.getVPMEdgeType().compareTo(EdgeType.SUPERTYPEOF) == 0

+				&& !edge.isSource()

+				&& edge.getSourceNode() instanceof ConstantSearchGraphNode)

+					{

+					if(((ConstantSearchGraphNode)edge.getSourceNode()).getElement().equals(ISearchGraph.VPM_RELATION_FQN)
+							|| ((ConstantSearchGraphNode)edge.getSourceNode()).getElement().equals(ISearchGraph.VPM_ENTITY_FQN))
+						{
+						ISearchPlanOperation op = new IsEntityorRelationCheckOperation(node.getId()
+								,edge,
+								((ConstantSearchGraphNode)edge.getSourceNode()).getElement());
+						checkSet.add(op);
+						
+						}
+					else
+						{
+						ISearchPlanOperation op = new ConstantToBoundCheckOperation(

+						manager.getElementByName(((ConstantSearchGraphNode)	edge.getSourceNode()).getElement()),

+						node.getId(),edge);

+						checkSet.add(op);

+						}

+					edge.setChecked(true);

+					edge.getSourceNode().setChecked(true);

+					}

+		else

+		//the relation is bound and only its source and target entites will have to be (re)set	

+		

+		if(edge.getVPMEdgeType().compareTo(EdgeType.TARGET) == 0

+				&& !edge.isSource()

+				&& edge.getSourceNode() instanceof VariableSearchGraphNode

+				&& node.getVpmModelElementType().equals(VPMModelElementType.RELATION))	

+					{	

+					IUpdatePlanOperation op = new SetRelationTarget(node.getId()

+							,((VariableSearchGraphNode)edge.getSourceNode()).getId()
+							,manager
+							,edge);

+					operations.add(op);

+					

+					edge.setChecked(true);

+					}

+		else

+		if(edge.getVPMEdgeType().compareTo(EdgeType.SOURCE) == 0

+				&& !edge.isSource()

+				&& edge.getSourceNode() instanceof VariableSearchGraphNode

+				&& node.getVpmModelElementType().equals(VPMModelElementType.RELATION))	

+					{	

+					IUpdatePlanOperation op = new SetRelationSource(node.getId()

+							,((VariableSearchGraphNode)edge.getSourceNode()).getId()
+							,manager
+							,edge);

+					operations.add(op);

+					

+					edge.setChecked(true);

+					}

+		}

+		return operations;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/GTRuleMatcher.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/GTRuleMatcher.java
new file mode 100644
index 0000000..4e3ada1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/GTRuleMatcher.java
@@ -0,0 +1,195 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal;

+

+
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.interpreter.exception.GTASMException;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.patternmatcher.ExecutionMode;
+import org.eclipse.viatra2.gtasm.patternmatcher.ParameterMode;
+import org.eclipse.viatra2.gtasm.patternmatcher.PatternCallSignature;
+import org.eclipse.viatra2.gtasm.patternmatcher.PatternMatcherParameters;
+import org.eclipse.viatra2.gtasm.patternmatcher.Scope;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GraphTransformationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.ITermHandler;
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IGTRuleMatcher;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;
+import org.eclipse.viatra2.logger.Logger;
+

+/**
+ * * The class encapsulates the basic methods to initialise a GTRule matcher 

+ * @author Akos Horvath

+ */

+public abstract class GTRuleMatcher implements IGTRuleMatcher{

+	

+	protected Logger logger;

+    protected IModelManager manager;

+    protected GTRule gtRule;

+	protected IExecutionEnvironment gtEnvironment = null;

+	protected ITermHandler handler;

+	

+	// INITIALIZING methods for gt rule matching

+    

+    /**

+     * Initialize the gtRule matcher

+     * @param logger the logger of the actual modelspace

+     * @param manager viatra model space manager

+     * @param gtRule the actual rule

+     * @param gtEnviroment the execution enviroment on which the rule communicates with the org.eclipse.viatra2.gtasm.interpreter.impl.interpreter

+     * @param handler term handler for the rule

+     */

+    public GTRuleMatcher(Logger logger

+    		, IModelManager manager

+    		, GTRule gtRule

+    	//	, IGTRuleExecutionEnvironment gtEnviroment

+    		//, TermHandler handler

+    		) {

+        this.logger = logger;

+        this.manager = manager;

+        this.gtRule = gtRule;

+        //this.gtEnviroment = gtEnviroment;

+        //this.handler = handler;

+    }

+    

+    

+    //***************************************** INPUT parameter manipulation methods****************************

+

+    /**

+     * Initialize the Left hand side (matcher part) pattern of the gt rule and combinde the parameter mapping with the input parameters of the gt rule

+     * @param symSignatures mapping of the conatinment constraints of the input parameters

+     * @param symInputMapping mapping of the input parameters

+     * @param symQuantificationOrder the order of the forall and choose quantificated elements

+     * @return an inner class holding the inputmapping, the Signatures and the QuantifiationOrder

+     * @throws GTASMException

+     */

+    protected PatternMatcherParameters initLHSPattern(PatternCallSignature[] symSignatures, Object[] symInputMapping, Integer[] symQuantificationOrder) 

+    	throws ViatraTransformationException

+	{

+		//******LHS of the GTRule

+		

+		//create the PatternCall signature for the lhs call

+		PatternCallSignature[] lhsSignatures = new PatternCallSignature[gtRule.getPrecondition().getActualParameters().size()];

+		Object[] lhsInputMapping = new Object[gtRule.getPrecondition().getActualParameters().size()];

+		Integer[] lhsQuantification = new Integer[gtRule.getPrecondition().getActualParameters().size()];

+		int forallQuantificationNumber = 0;

+		

+		//copy the symbolic parameter signatures and inputMapping to the lhs signature and Value arrays		

+		for(int i = 0; i< symSignatures.length; i++)

+			{

+			SymbolicRuleParameter symParam = gtRule.getSymParameters().get(i);

+			if(symParam.getVariable().getReferences().size() > 0) //is the symParam in one of the patterns

+				{if(getActualParameterIndexofSymbolicParameter(gtRule.getPrecondition(), symParam) != -1)

+					{lhsSignatures[getActualParameterIndexofSymbolicParameter(gtRule.getPrecondition(), symParam)] = symSignatures[i];

+					 lhsInputMapping[getActualParameterIndexofSymbolicParameter(gtRule.getPrecondition(), symParam)] = symInputMapping[i];

+					

+					if(symQuantificationOrder != null)

+						{

+						// its a quantificated variable with a forall rule

+						//if(symSignatures[i].getExecutionMode().compareTo(ExecutionMode.MULTIPLE_RESULTS) == 0)

+						//	{

+							lhsQuantification[getSymQuantificationIndex(i,symQuantificationOrder)] = getActualParameterIndexofSymbolicParameter(gtRule.getPrecondition(), symParam);

+							 forallQuantificationNumber++;

+						//	}

+						//else

+						//	{lhsQuantification[getSymQuantificationIndex(i,symQuantificationOrder)] = getActualParameterIndexofSymbolicParameter(gtRule.getPrecondition(), symParam);

+						//	}

+						}

+					}

+				}

+			else

+				logger.warning(symParam.getVariable().getName()+" is never used inside "+gtRule.getName()+".");

+			}

+		//fill up the lhs signature and InputMapping arrays with the corresponding values

+		for(int j=0; j < gtRule.getPrecondition().getActualParameters().size(); j++)

+		{

+	 	 if(lhsSignatures[j] == null)

+	 	 	{lhsSignatures[j] = new PatternCallSignature();

+			 lhsSignatures[j].setExecutionMode(ExecutionMode.SINGLE_RESULT);

+			 lhsSignatures[j].setParameterMode(ParameterMode.OUTPUT);

+			 lhsSignatures[j].setParameterScope(new Scope());

+			 lhsInputMapping[j] = ValueKind.UNDEF_LITERAL;

+	 	 	 

+		 if(symQuantificationOrder != null)

+				{

+				// its a quantificated variable with a forall rule

+				lhsQuantification[forallQuantificationNumber] = j;

+				forallQuantificationNumber++;

+				}

+	 	 	} 

+		}

+		return new PatternMatcherParameters(lhsSignatures, lhsInputMapping, lhsQuantification);

+	}

+	

+	/** Returns the order of the rule from the invocation

+	 * @param symParamIndex the current index of the rule

+	 * @param symQuantificationOrder Quantification order of the invocation

+	 * @return the qunatification order of the symBolic parameter's index

+	 * @throws GTASMException

+	 */

+	private int getSymQuantificationIndex(Integer symParamIndex, Integer[] symQuantificationOrder)

+			throws ViatraTransformationException{

+		

+		for (int j = 0; j < symQuantificationOrder.length; j++) {

+			if(symQuantificationOrder[j].compareTo(symParamIndex) == 0) {

+				return j;

+			}

+		}

+		//there is an error in the input quantification order

+		String[] context = {(gtRule.getSymParameters().get(symParamIndex)).getVariable().getName(),
+				gtRule.getName()};
+		throw new GraphTransformationException(
+					GTErrorStrings.SYMBOLIC_QUANTIFICITION + gtRule.getName()
+					,context
+					,gtRule);
+	}

+

+	/** Returns the actual index of the Variable from the invocation context

+	 * @param gtPattCall the gt rule invocation

+	 * @param var a variable of the gt pattern call

+	 * @return the index of the input variable

+	 */

+	protected int getActualParameterIndexof(GTPatternCall gtPattCall, Variable var){

+		for (Object obj :var.getReferences()) {

+			if (gtPattCall.getActualParameters().contains(obj)) {

+				return gtPattCall.getActualParameters().indexOf(obj);

+			}

+		}

+		return -1;

+	}

+	

+	/** Returns the actual index of the Variable refernce's variable from the invocation context

+	 * @param gtPatt the gt rule invocation context

+	 * @param symParam the symbolic parameter of the invoked GT rule

+	 * @return the index of the symbolic parameter in the GT rules

+	 */

+	protected int getActualParameterIndexofSymbolicParameter(GTPatternCall gtPattCall, SymbolicRuleParameter symParam){

+		return getActualParameterIndexof(gtPattCall, symParam.getVariable());

+	}

+	

+	protected Object[] getOutPutSymbolicParatemerRules() 
+			throws ViatraTransformationException {
+		Object[] values = new Object[gtRule.getSymParameters().size()];

+		for (int i = 0; i < gtRule.getSymParameters().size(); i++) {
+			SymbolicRuleParameter symParam = 
+				gtRule.getSymParameters().get(i);

+			values[i] = gtEnvironment.getVariableValue(symParam.getVariable());	

+		}

+		return values;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/RightHandSideMatcher.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/RightHandSideMatcher.java
new file mode 100644
index 0000000..1349abe
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/RightHandSideMatcher.java
@@ -0,0 +1,151 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal;

+

+import java.util.Collection;
+
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.ParameterMode;
+import org.eclipse.viatra2.gtasm.patternmatcher.PatternCallSignature;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherCompileTimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTRuleBuildingException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcher;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.FlattenedPattern;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.ITermHandler;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.logger.Logger;
+

+

+/**Specific PatternMatcher for the RHS of a GTRule.
+ * Used to create the search graph of the pattern and then generate the according operations
+ * @author Akos Horvath and Gergely Varro
+ *
+ */
+public class RightHandSideMatcher extends PatternMatcher {

+	//private IModelElement[] scopeMapping;

+	private FlattenedPattern flattenedPattern;

+	

+	RightHandSideMatcher(GTPattern pattern, Logger logger, IModelManager manager, ITermHandler termHandler) 

+    	throws ViatraTransformationException {

+		// Flattening is executed in the constructor of the superclass (PatternMatcher)

+		super(pattern,logger,manager,termHandler);

+		try{
+		flattenedPattern = root.getSingleFlattenedPattern();

+		}catch(PatternMatcherCompileTimeException e ){
+			throw e.addNewStackElement(pattern);
+		}
+		
+		
+		// Scope handling removed

+		// flattenedPattern.getSearchGraph().addScope(pattern, flattenedPattern.getFrameSize());

+		//scopeMapping = new IModelElement[pattern.getSymParameters().size()];

+	}	

+

+    /** Returns the MatchingFrame with the already bound parameters. 

+     * @param gtElementMappings The mapping the LHS and RHS elements

+     * @param inputMapping the input variable values

+     * @param signature signatures of the rhs input parameters

+     * @return

+     * @throws GTRuleBuildingException

+     */

+    public MatchingFrame generateMatchingFrameofInputContext(Collection<GTElementMapping> gtElementMappings,

+    		Object[] inputMapping,

+    		PatternCallSignature[] signature 

+    		) throws GTRuleBuildingException

+    	{

+	    	
+    	if (inputMapping.length != signature.length) 
+	    		{
+	    		 throw new GTRuleBuildingException(GTErrorStrings.INTERNAL_ERROR_INPUTPARAMS_SYMPARAMS_LENGTH
+	    				 ,null
+	    				 ,null);

+	        	}

+	

+    	MatchingFrame template = new MatchingFrame(flattenedPattern);

+			

+		// Input processing

+		for (int i = 0; i < inputMapping.length; i++) 
+			{

+				if (signature[i].getParameterMode() == ParameterMode.OUTPUT) {

+					if (inputMapping[i] == null || inputMapping[i].equals(ValueKind.UNDEF_LITERAL)) {

+							// Output parameter without value: do nothing

+					} else {

+							// Output parameter with value: a possible bug in the code

+							logger.debug("Parameter " + i +

+									" is an output parameter with value " + 

+									inputMapping[i].toString());

+					}

+				} else if (signature[i].getParameterMode() == ParameterMode.INPUT) {

+					if (inputMapping[i] != null) {

+							// Input parameter with value: test and set the value

+							template.testAndSetValue(i, inputMapping[i]);

+					} else {

+							// Input parameter without value: throw an exception

+						throw new GTRuleBuildingException(GTErrorStrings.INTERNAL_ERROR_INPUTPARAM_WITHOUT_A_VALUE
+								,null
+								,null);

+					}

+				} 

+			}

+		     // Input scope processing

+

+			/* boolean[] inConstraints =  flattenedPattern.getSearchGraph().hasinputParameterINContstraint();

+			 Vector<IUpdatePlanOperation> operations = new Vector<IUpdatePlanOperation>();

+			 Vector<ISearchPlanOperation> checkSet = new Vector<ISearchPlanOperation>();

+		     for (int i = 0; i < inputMapping.length; i++) {

+		    	 if(!(signature[i].getParameterScope().getParent().equals(Scope.DEFAULT_PARENT)

+						   && signature[i].getParameterScope().getContainmentMode().equals(Scope.DEFAULT_MODE)))

+		    	   {IModelElement element = signature[i].getParameterScope().getParent();

+		            if (element != null) 

+		            {

+		            	if(signature[i].getParameterScope().getContainmentMode().compareTo(Scope.IN) == 0)

+		            		{

+		            		if(inConstraints[i])

+		            			throw new GTRuleBuildingException(GTErrorStrings.MORE_ONE_IN_CONTAINMENT);

+		            		else // have to move the element under the container

+		            			{

+		            			operations.add(new MoveBoundunderConstant(manager,

+		            					(IEntity)element, i));

+		            			}

+		            		}

+		            	else // below type containment constraint

+		            		{

+		            			checkSet.add(new GTBelowContainmentCheckBoundUnderConstant(i,

+		            					signature[i].getParameterScope().getParent()));

+		            		}

+		            }

+		            	// template.setValue(frameSize + i, element);}

+		            else{

+		                // Input parameter scope without value: throw an exception

+		                throw new GTRuleBuildingException("Input parameter scope " + i + " does not have a value.");

+		            	}

+		    	   }

+		       }*/

+ 		    return template;

+    	}

+	

+	public GTOperationContext generateGTOperation(Collection<GTElementMapping> gtElementMappings,

+    		//Object[] inputMapping,

+    		PatternCallSignature[] signature 

+    		//Vector<RelationShipMapping> relationShipMapping

+    		) throws GTRuleBuildingException {

+    	

+		GTOperationContext finalOperations =

+			flattenedPattern.getSearchGraph().generateGTOperations(gtElementMappings, manager, signature);

+		 return finalOperations; 

+    }

+    

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/TraditionalGTRuleMatcher.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/TraditionalGTRuleMatcher.java
new file mode 100644
index 0000000..dd950b7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/TraditionalGTRuleMatcher.java
@@ -0,0 +1,514 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal;

+

+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.interpreter.exception.GTASMException;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.impl.rules.RuleInterpreter;
+import org.eclipse.viatra2.gtasm.patternmatcher.IMatching;
+import org.eclipse.viatra2.gtasm.patternmatcher.ParameterMode;
+import org.eclipse.viatra2.gtasm.patternmatcher.PatternCallSignature;
+import org.eclipse.viatra2.gtasm.patternmatcher.PatternMatcherParameters;
+import org.eclipse.viatra2.gtasm.patternmatcher.Scope;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherCompileTimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTRuleBuildingException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GraphTransformationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.IUpdatePlanOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.ISearchPlanOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.BasicTermHandler;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.ITermHandler;
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IPatternMatcher;
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.PatternMatcherProvider;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;
+

+ 

+/**
+ *
+ * The class interprets all traditionally defined GT rule containing
+ * LHS, RHS and action part (or a subset of these elements).
+ * @author Akos Horvath

+ */

+public class TraditionalGTRuleMatcher extends GTRuleMatcher {

+	IPatternMatcher leftHandSidePatternMatcher;

+ 	RightHandSideMatcher rightHandSideMatcher;

+	boolean isRandom;
+	

+	Collection<GTElementMapping> elementMappings;

+	Collection<IUpdatePlanOperation> nonchangeableGTOperations;

+	Collection<ISearchPlanOperation> checkSet;

+	

+	public TraditionalGTRuleMatcher( GTRule gt

+			, IExecutionEnvironment enviroment

+			, ITermHandler handler

+			, PatternMatcherParameters mp) throws ViatraTransformationException {

+		super(enviroment.getFramework().getLogger()

+				, enviroment.getFramework().getTopmodel().getModelManager()

+				, gt);

+		elementMappings = new ArrayList<GTElementMapping>();

+		this.initGTRule(enviroment);

+		this.construct(manager,mp.getCallSignature());

+	}

+

+	/** 
+	 * Returns a Pattern Matcher to work with, in case of alternative pattern matchers this is the Method to override

+	 * @return Pattern matcher for the

+	 * @throws GTASMException

+	 */

+	protected IPatternMatcher getPatternMatcherforPreCondition() throws ViatraTransformationException{
+//		PatternBuilder pb = new PatternBuilder(this.logger, manager, handler);
+//		try {
+//			return pb.construct(gtRule.getPrecondition().getCalledPattern());
+//		} catch (PatternMatcherCompileTimeException e) {
+//			//logger.error(e.getMessage());
+//			throw e.addNewStackElement(gtRule);
+//		}
+		
+		return PatternMatcherProvider.getInstance().getPatternMatcher(
+				gtEnvironment, gtRule.getPrecondition().getCalledPattern());
+	}

+	
+	/**
+	 * Determines whether true pseudorandom matching is required for ChooseRules.
+	 * @return true if random is required
+	 */
+	protected boolean isLeftHandSideRandom() {
+		// is true pseudorandom required?
+		for (Object annot : gtRule.getPrecondition().getCalledPattern().getRuntimeAnnotations()) {
+			if ("@random".equals(((RuntimeAnnotation) annot).getAnnotationName().toLowerCase())) {
+				return true;
+			}
+		}	
+		return false;
+	}
+	

+	/**

+	 * Creates the GTrule matcher by constructing the search graph of the LHS and RHS (optional) part, and the operations from RHS\LHS

+	 * @param manager model manager of the VIATRA model space

+	 * @throws GTASMException

+	 */

+	private void construct(IModelManager manager, PatternCallSignature[] symSignatures) throws ViatraTransformationException{

+		

+		if(gtRule.getPostcondition() != null && gtRule.getPrecondition() == null)

+			logger.error("There is only PostCondition defined for the GTRule "+ gtRule.getName());

+		

+		if (gtRule.getPostcondition() != null) {
+			try {
+				leftHandSidePatternMatcher = getPatternMatcherforPreCondition();
+				isRandom = isLeftHandSideRandom();
+				rightHandSideMatcher =
+					new RightHandSideMatcher(gtRule.getPostcondition().getCalledPattern(), logger, manager, handler); 
+			} catch (PatternMatcherCompileTimeException e) {
+				logger.error(e.getMessage());
+				throw e.addNewStackElement(gtRule);
+			}
+			//maps the parameters between the RHS and the LHS
+			elementMappings = new ArrayList<GTElementMapping>();
+			int actualIndex = 0;
+			for(Object obj: gtRule.getPrecondition().getActualParameters()){
+				VariableReference varReference = (VariableReference) obj;
+				Variable actualVariable = varReference.getVariable();
+				if(getActualParameterIndexof(gtRule.getPostcondition(),actualVariable) != -1)
+				{
+					GTElementMapping map = new GTElementMapping(actualIndex,getActualParameterIndexof(gtRule.getPostcondition(),actualVariable));
+					elementMappings.add(map);
+				}

+				actualIndex++;
+			}
+
+			PatternCallSignature[] rhsSignatures = new PatternCallSignature[gtRule.getPostcondition().getActualParameters().size()];
+			//Input parameters from the symmetric parameters
+			if(gtRule.getPostcondition().getActualParameters().size() > 0)
+				for(int i = 0; i < symSignatures.length; i++){

+					SymbolicRuleParameter symParam = gtRule.getSymParameters().get(i);

+					if(symParam.getVariable().getReferences().size() > 0) 

+						if(getActualParameterIndexofSymbolicParameter(gtRule.getPostcondition(), symParam) != -1)

+						{
+							if(symSignatures[i].getParameterMode().compareTo(ParameterMode.INPUT) == 0)

+							{

+								PatternCallSignature sig = new PatternCallSignature();

+								sig.setParameterMode(ParameterMode.INPUT);

+								rhsSignatures[getActualParameterIndexofSymbolicParameter(gtRule.getPostcondition(), symParam)] = sig;

+							}

+							else

+								rhsSignatures[getActualParameterIndexofSymbolicParameter(gtRule.getPostcondition(), symParam)] = symSignatures[i].clone();

+						}

+				}
+
+//			//Element mapping
+			for(GTElementMapping map: elementMappings)
+				if(rhsSignatures[map.getRhsInputOrderIndex()] == null)
+				{
+					PatternCallSignature sig = new PatternCallSignature();
+					sig.setParameterMode(ParameterMode.INPUT);
+					rhsSignatures[map.getRhsInputOrderIndex()] = sig;
+				}
+				else // it is a GT Rule parameter which can be output type but as it is represented in both of the patterns
+					// to the RHS it is an input parameter
+				{
+					rhsSignatures[map.getRhsInputOrderIndex()].setParameterMode(ParameterMode.INPUT);
+				}
+			//output parameter of the RHS, which is used in the action part only
+			for(int j=0; j < gtRule.getPostcondition().getActualParameters().size(); j++)
+			{
+				if(rhsSignatures[j] == null)
+				{rhsSignatures[j] = new PatternCallSignature();
+				rhsSignatures[j].setParameterMode(ParameterMode.OUTPUT);
+				}
+			}
+			try {
+				GTOperationContext _temp = rightHandSideMatcher.generateGTOperation(elementMappings,rhsSignatures);
+				nonchangeableGTOperations = _temp.getFinalOperations();
+				checkSet = _temp.getCheckSet();
+
+			} catch (GTRuleBuildingException e) {
+				throw e.addNewStackElement(gtRule);
+			}
+		}

+		else //only a precondition is available

+		{

+			leftHandSidePatternMatcher = getPatternMatcherforPreCondition();

+			isRandom = isLeftHandSideRandom();
+			elementMappings = null;

+			nonchangeableGTOperations = null;

+		}

+	}

+	

+	@Override
+	public void initGTRule(IExecutionEnvironment actualEnvironment) throws ViatraTransformationException{

+		//sets the actual context of the gt rule invocation 

+		this.gtEnvironment = actualEnvironment;

+		this.handler = new BasicTermHandler(actualEnvironment); //handler;

+		

+		try {
+			// adds the local variables & sym parameters to the execution environment -> later only the values need to be changed

+			for(Object o:gtRule.getLocalVariables()){

+				gtEnvironment.addVariable((Variable) o, ValueKind.UNDEF_LITERAL);
+			}
+		} catch (ViatraTransformationException e) {
+			throw e.addNewStackElement(gtRule);
+			// throw new GTASMException(e.getLocalizedMessage() + GTErrorStrings.INIT+gtRule.getName(), gtRule);
+		}

+	}

+	

+	/**

+	 * Executes the GT operations created from the RHS/LHS and the optional DO part of the rule

+	 * @param symSignatures the signature of the rule

+	 * @param symInputMapping mapping of the input parameters

+	 * @param lhsFrame the signature, input mapping and the quantification order for he LHS

+	 * @return Returns the values of the rule's parameters after executing the operations constructed form the rule

+	 * @throws GTASMException

+	 */

+	protected Object[] executeGTOperations(PatternCallSignature[] symSignatures

+			, Object[] symInputMapping

+			, IMatching lhsFrame) throws ViatraTransformationException{

+		

+		GTOperationContext actualGTContext = null;

+		GTPatternCall preConditionCall = gtRule.getPrecondition();

+		GTPatternCall postConditionCall = gtRule.getPostcondition();

+		// *****RHS of the GTRule

+		logger.debug("[debug] Starting GT rule: "+ gtRule.getName());

+		

+		if (lhsFrame != null && postConditionCall != null) {
+			PatternCallSignature[] rhsSignatures = new PatternCallSignature[postConditionCall.getActualParameters().size()];

+			Object[] rhsInputMapping = new Object[postConditionCall.getActualParameters().size()];

+			

+			//Input parameters from the symmetric parameters

+			if(postConditionCall.getActualParameters().size() > 0)

+			for(int i = 0; i < symSignatures.length; i++){

+				SymbolicRuleParameter symParam = gtRule.getSymParameters().get(i);

+				if(symParam.getVariable().getReferences().size() > 0) 

+					if(getActualParameterIndexofSymbolicParameter(postConditionCall, symParam) != -1)

+						{

+						rhsInputMapping[getActualParameterIndexofSymbolicParameter(postConditionCall, symParam)] = symInputMapping[i];

+						if(symSignatures[i].getParameterMode().compareTo(ParameterMode.INPUT) == 0)

+							{

+							PatternCallSignature sig = new PatternCallSignature();

+							sig.setParameterMode(ParameterMode.INPUT);

+							sig.setParameterScope(new Scope());

+							rhsSignatures[getActualParameterIndexofSymbolicParameter(postConditionCall, symParam)] = sig;

+							}

+						else//input parameter

+							rhsSignatures[getActualParameterIndexofSymbolicParameter(postConditionCall, symParam)] = symSignatures[i];

+						}

+				}

+			

+			//Element mapping

+			for(GTElementMapping map: elementMappings)

+				if(rhsSignatures[map.getRhsInputOrderIndex()] == null)

+					{rhsInputMapping[map.getRhsInputOrderIndex()]= lhsFrame.lookup(map.getLhsInputOrderIndex()); 

+					PatternCallSignature sig = new PatternCallSignature();

+					sig.setParameterMode(ParameterMode.INPUT);

+					sig.setParameterScope(new Scope());

+					rhsSignatures[map.getRhsInputOrderIndex()] = sig;

+					}

+				else // it is a GT Rule parameter which can be any in any parametermode but as it is represented in both LHS and RHS

+					 // to the RHS it is an input parameter

+					{

+					rhsInputMapping[map.getRhsInputOrderIndex()]= lhsFrame.lookup(map.getLhsInputOrderIndex()); 

+					rhsSignatures[map.getRhsInputOrderIndex()].setParameterMode(ParameterMode.INPUT);

+					}

+			// it is an input parameter for the RHS form the GT Rule head

+			for(int j=0; j < postConditionCall.getActualParameters().size(); j++)

+				{

+			 	 if(rhsSignatures[j] == null)

+			 	 	{rhsSignatures[j] = new PatternCallSignature();

+					 rhsSignatures[j].setParameterMode(ParameterMode.OUTPUT);

+					 rhsSignatures[j].setParameterScope(new Scope());

+					 rhsInputMapping[j] = ValueKind.UNDEF_LITERAL;

+			 	 	}

+				}

+			try {

+				MatchingFrame frame = rightHandSideMatcher.generateMatchingFrameofInputContext(this.elementMappings, rhsInputMapping,rhsSignatures);

+				actualGTContext = new GTOperationContext(frame,nonchangeableGTOperations,checkSet);

+			} catch (GTRuleBuildingException e) {

+				throw e.addNewStackElement(gtRule);

+			}

+		}

+		

+		// Running the operations from the difference of the RHS and the LHS

+		if (lhsFrame != null && actualGTContext != null) {
+			logger.debug("GT Opeations of the GtRule: "+this.gtRule.getName());

+		

+			//* manipulation operations */

+			for (IUpdatePlanOperation op :actualGTContext.getFinalOperations()) {

+				try {

+					if (op.update(actualGTContext.getReturnFrame())) {

+						logger.debug(op.toString(actualGTContext.getReturnFrame()));
+					} else {
+						String[] context ={op.toString(actualGTContext.getReturnFrame()), gtRule.getName()};
+						GraphTransformationException e = 
+							new GraphTransformationException(GTErrorStrings.GTRULE_RHS_FAILED_MANIPULATION
+									,context

+									,op.getErrorfulElement(actualGTContext.getReturnFrame())); 
+						e.addNewStackElement(postConditionCall.getCalledPattern());
+						throw e.addNewStackElement(gtRule);

+					}

+				} catch (GTOperationException e) {
+					e.addNewStackElement(postConditionCall.getCalledPattern());
+					throw e.addNewStackElement(gtRule);
+				}

+			}

+			//* check operations */

+			for(ISearchPlanOperation op: actualGTContext.getCheckSet()){

+				try

+				{

+					op.preprocess(actualGTContext.getReturnFrame());

+					if(!op.execute(actualGTContext.getReturnFrame())){

+						String[] context = {op.toString(actualGTContext.getReturnFrame()), gtRule.getName()};
+						GraphTransformationException ex = 
+							new GraphTransformationException(GTErrorStrings.GTRULE_RHS_FAILED_CHECK
+									,context
+									,op.getErrorfulElement(actualGTContext.getReturnFrame()));
+						ex.addNewStackElement(postConditionCall.getCalledPattern());
+						throw ex.addNewStackElement(gtRule);  

+					}

+				} catch(PatternMatcherRuntimeException e) {

+					e.addNewStackElement(postConditionCall.getCalledPattern());
+					throw e.addNewStackElement(gtRule);

+				}

+			}

+		}

+

+		// * ACTION part of the GTRULE */

+		//there is an action part in the gtrule

+		if(gtRule.getAction() != null)

+		{	// fill up the input parameter for the action part

+			try

+			{	//The rule has only PreCondition

+				if(postConditionCall == null)

+						{	//symbolic parameter its not in the LHS

+							for(int i = 0; i< symInputMapping.length; i++)

+							{SymbolicRuleParameter symParam = gtRule.getSymParameters().get(i);

+							// its a variable which isn't in the LHS 

+							if(getActualParameterIndexofSymbolicParameter(preConditionCall, symParam) == -1)

+								{//this variable can only be founded in the action part

+							 	if(symParam.getVariable().getReferences().size() > 0)

+									 this.gtEnvironment.setVariableValue(symParam.getVariable(),symInputMapping[i]);

+							 	else

+							 	 	 logger.warning("SymbolicRuleParameter "+symParam.getName()+" in gtRule " + gtRule.getName()+ "is never used");

+								}

+							}

+							//Local variables: have to check where are they initialized at the first time

+							for(Object oVar: gtRule.getLocalVariables())

+							{	Variable actualVariable = (Variable) oVar;

+								//The variable is in the LHS Pattern

+								if(getActualParameterIndexof(preConditionCall,actualVariable) != -1)

+									{

+									Object actualValue = lhsFrame.lookup(getActualParameterIndexof(preConditionCall,actualVariable));
+									gtEnvironment.setVariableValue(actualVariable, returnValidValue(actualValue));

+									}

+							}

+						}

+				//both Pre and Post Condition

+				else

+						{

+						//symbolic parameter

+						for(int i = 0; i< symInputMapping.length; i++)

+						{SymbolicRuleParameter symParam = gtRule.getSymParameters().get(i);

+						// it is a variable which isn't in the RHS or the LHS 

+						if(getActualParameterIndexofSymbolicParameter(postConditionCall, symParam) == -1

+								&& getActualParameterIndexofSymbolicParameter(preConditionCall, symParam) == -1)

+							//this variable can only be found in the action part

+						 	if(symParam.getVariable().getReferences().size() > 0)

+								 this.gtEnvironment.setVariableValue(symParam.getVariable(),symInputMapping[i]);

+						 	else

+						 	 	 logger.warning("SymbolicRuleParameter "+symParam.getName()+" in gtRule " + gtRule.getName()+ "is never used");

+						}

+						//Local variables, have to check where are they initialized at the first time

+						for(Object oVar: gtRule.getLocalVariables())

+						{	Variable actualVariable = (Variable) oVar;

+							//The variable is in the RHS

+							if(getActualParameterIndexof(postConditionCall,actualVariable) != -1)

+									{
+									Object actualValue = actualGTContext.getReturnFrame().getValue(getActualParameterIndexof(postConditionCall,actualVariable));
+									gtEnvironment.setVariableValue(actualVariable, returnValidValue(actualValue));
+									}

+							else

+							if(getActualParameterIndexof(preConditionCall,actualVariable) != -1)

+									{
+									Object actualValue = lhsFrame.lookup(getActualParameterIndexof(preConditionCall,actualVariable));
+									gtEnvironment.setVariableValue(actualVariable, returnValidValue(actualValue));
+									}

+							}

+						}

+			}

+			catch (ViatraTransformationException e) {

+				// Variable setting failed
+				throw e.addNewStackElement(gtRule);

+				// throw new GTASMException(e.getMessage()+GTErrorStrings.INIT_ACTION+gtRule.getName(), gtRule);

+			}

+			//GTAction Execution 

+			try {
+				RuleInterpreter.getInstance().interpretRule(gtEnvironment, gtRule.getAction(),null); 
+				return getOutPutSymbolicParatemerRules();

+			} catch (ViatraTransformationException e) {
+				// GTAction Execution Failed
+				throw e.addNewStackElement(gtRule);

+			}

+		}

+		else //******** Only LHS and RHS!

+		{

+			for(int i = 0; i< symInputMapping.length; i++)

+			{SymbolicRuleParameter symParam = gtRule.getSymParameters().get(i);

+			// its a variable which isn't in the RHS or the LHS 

+			if(getActualParameterIndexofSymbolicParameter(postConditionCall, symParam) == -1

+					&& getActualParameterIndexofSymbolicParameter(preConditionCall, symParam) == -1

+					)

+				//this variable can only be founded in the action part

+			 	 if(symParam.getVariable().getReferences().size() > 0)

+					 gtEnvironment.setVariableValue(symParam.getVariable(),symInputMapping[i] );

+			 	 else

+			 	 	logger.warning("SymbolicRuleParameter "+symParam.getName()+" in gtRule " + gtRule.getName()+ "is never used");

+			}

+			if(postConditionCall != null && preConditionCall != null)

+			{

+				for(Object oVar: gtRule.getLocalVariables())

+				{	Variable actualVariable = (Variable) oVar;

+					//The variable is in the RHS

+					if(getActualParameterIndexof(postConditionCall,actualVariable) != -1)

+						{
+						Object actualValue = actualGTContext.getReturnFrame().getValue(getActualParameterIndexof(postConditionCall,actualVariable));
+						gtEnvironment.setVariableValue(actualVariable, returnValidValue(actualValue));
+						}

+					else

+					if(getActualParameterIndexof(preConditionCall,actualVariable) != -1)
+						{
+						Object actualValue = lhsFrame.lookup(getActualParameterIndexof(preConditionCall,actualVariable));
+						gtEnvironment.setVariableValue(actualVariable, returnValidValue(actualValue));
+						}

+				}

+			}

+			return getOutPutSymbolicParatemerRules();

+		}

+	}

+	
+	/** Returns a valid equivalent value (for the Viatra interpreter) of the input. For example instead of a deleted element or null pointer it returns an UNDEF literal
+	 * @param o input parameter o
+	 * @return The 
+	 */
+	private Object returnValidValue(Object obj){
+		
+		if(obj == null)
+			return ValueKind.UNDEF_LITERAL;
+		
+		if(obj instanceof IModelElement)
+			{
+			IModelElement element = (IModelElement)obj;
+			if(element.isDeleted())
+				return ValueKind.UNDEF_LITERAL;
+			}
+		
+		return obj;
+	}
+	
+	

+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.patterns.IGTRuleMatcher#match(org.eclipse.viatra2.gtasm.patternmatcher.PatternCallSignature[], java.lang.Object[])
+	 */
+	@Override
+	public Object[] match(PatternCallSignature[] symSignatures, Object[] symInputMapping)
+		throws ViatraTransformationException{

+	

+	IMatching lhsFrame;

+	PatternMatcherParameters lhsParamters;

+	lhsParamters = initLHSPattern(symSignatures, symInputMapping, null);	

+	lhsFrame = isRandom? leftHandSidePatternMatcher.matchRandomly(lhsParamters.getInputMapping(), lhsParamters.getCallSignature()) 
+			: leftHandSidePatternMatcher.match(lhsParamters.getInputMapping(), lhsParamters.getCallSignature());

+	

+	if(lhsFrame != null)

+		return executeGTOperations( symSignatures

+			,symInputMapping

+			,lhsFrame);

+	else

+		return null;

+	}

+	

+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.patterns.IGTRuleMatcher#initMatchAll(org.eclipse.viatra2.gtasm.patternmatcher.PatternCallSignature[], java.lang.Object[], java.lang.Integer[])
+	 */
+	@Override
+	public Collection<IMatching> initMatchAll(PatternCallSignature[] symSignatures, Object[] symInputMapping, Integer[] quantificationOrder)

+			throws ViatraTransformationException {

+		PatternMatcherParameters lhsParamters;

+		lhsParamters = initLHSPattern(symSignatures, symInputMapping,quantificationOrder);	

+		return leftHandSidePatternMatcher.matchAll(lhsParamters.getInputMapping(), lhsParamters.getCallSignature(),lhsParamters.getQuantificationOrder());	

+	}

+

+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.patterns.IGTRuleMatcher#matchAll(org.eclipse.viatra2.gtasm.patternmatcher.IMatching, org.eclipse.viatra2.gtasm.patternmatcher.PatternCallSignature[], java.lang.Object[])
+	 */
+	@Override
+	public Object[] matchAll(IMatching LHSMatching ,PatternCallSignature[] symSignatures, Object[] symInputMapping)
+		throws ViatraTransformationException {

+		IMatching lhsFrame = LHSMatching;

+		return executeGTOperations( symSignatures

+				,symInputMapping

+				,lhsFrame);

+	}

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateBound2Bound.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateBound2Bound.java
new file mode 100644
index 0000000..9a57560
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateBound2Bound.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelManager;
+
+

+/**

+ * @author Akos Horvath

+ *

+ */

+public abstract class CreateBound2Bound extends CreateElement {

+	

+	protected int target,source;

+	

+	/** 

+	 * @param manager

+	 * @param variableI

+	 */

+	public CreateBound2Bound(IModelManager manager, int variableI) {

+		super(manager, variableI);

+	}

+

+	/**

+	 * @param m

+	 */

+	public CreateBound2Bound(IModelManager m) {

+		super(m);

+	}
+	
+

+	/**

+	 * @return the source

+	 */

+	public int getSource() {

+		return source;

+	}

+

+	/**

+	 * @return the target

+	 */

+	public int getTarget() {

+		return target;

+	}

+

+	/**

+	 * @param source the source to set

+	 */

+	protected void setSource(int source) {

+		this.source = source;

+	}

+

+	/**

+	 * @param target the target to set

+	 */

+	protected void setTarget(int target) {

+		this.target = target;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateBound2Constant.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateBound2Constant.java
new file mode 100644
index 0000000..ad25e37
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateBound2Constant.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public abstract class CreateBound2Constant extends CreateElement {

+

+	protected int source;

+	protected IModelElement target;

+	

+	public CreateBound2Constant(IModelManager m) {

+		super(m);

+	}

+	
+	public CreateBound2Constant(IModelManager m,int variableI) {
+		super(m,variableI);
+	}

+

+		/**

+	 * @return the source

+	 */

+	public int getSource() {

+		return source;

+	}

+

+	/**

+	 * @return the target

+	 */

+	public IModelElement getTarget() {

+		return target;

+	}

+

+	/**

+	 * @param source the source to set

+	 */

+	protected void setSource(int source) {

+		this.source = source;

+	}

+

+	/**

+	 * @param target the target to set

+	 */

+	protected void setTarget(IModelElement target) {

+		this.target = target;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateConstant2Bound.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateConstant2Bound.java
new file mode 100644
index 0000000..e1bdd39
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateConstant2Bound.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public abstract class CreateConstant2Bound extends CreateElement {

+	protected IModelElement source;

+	protected int target;

+	

+	

+	

+	/**

+	 * @param manager

+	 * @param variableI

+	 */

+	public CreateConstant2Bound(IModelManager manager, int variableI) {

+		super(manager, variableI);

+	}

+

+	/**

+	 * @param m

+	 */

+	public CreateConstant2Bound(IModelManager m) {

+		super(m);

+	}

+

+	/**

+	 * @return the source

+	 */

+	public IModelElement getSource() {

+		return source;

+	}

+

+	/**

+	 * @return the target

+	 */

+	public int getTarget() {

+		return target;

+	}

+

+	/**

+	 * @param source the source to set

+	 */

+	protected void setSource(IModelElement source) {

+		this.source = source;

+	}

+

+	/**

+	 * @param target the target to set

+	 */

+	protected void setTarget(int target) {

+		this.target = target;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateConstant2Constant.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateConstant2Constant.java
new file mode 100644
index 0000000..4b5cbd0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateConstant2Constant.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public abstract class CreateConstant2Constant extends CreateElement {

+

+	protected IModelElement source;

+	protected IModelElement target;

+	

+	/**

+	 * @param manager

+	 * @param variableI

+	 */

+	public CreateConstant2Constant(IModelManager manager, int variableI) {

+		super(manager, variableI);

+	}

+

+	/**

+	 * @param m

+	 */

+	public CreateConstant2Constant(IModelManager m) {

+		super(m);

+	}

+	@Override

+	protected boolean create(MatchingFrame frame) throws GTOperationException {

+		return false;

+	}

+

+	/**

+	 * @return the source

+	 */

+	public IModelElement getSource() {

+		return source;

+	}

+

+	/**

+	 * @return the target

+	 */

+	public IModelElement getTarget() {

+		return target;

+	}

+

+	/**

+	 * @param source the source to set

+	 */

+	protected void setSource(IModelElement source) {

+		this.source = source;

+	}

+

+	/**

+	 * @param target the target to set

+	 */

+	protected void setTarget(IModelElement target) {

+		this.target = target;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateElement.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateElement.java
new file mode 100644
index 0000000..1b92742
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateElement.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+abstract public class CreateElement extends ElementManipulationOperation{

+	

+//private boolean hasBeenExecuted;

+protected IModelManager manager;

+protected int variableIndex;
+    

+    public CreateElement(IModelManager manager, int variableI) {

+        this.manager = manager;

+        this.variableIndex = variableI;

+    }

+    

+    public CreateElement(IModelManager m){

+    	this.manager = m;
+    }
+    
+    public boolean update(MatchingFrame frame) throws GTOperationException {

+        create(frame);

+        return true;

+    } 

+

+    abstract protected boolean create(MatchingFrame frame) throws GTOperationException;

+

+	/**

+	 * @return the variableIndex

+	 */

+	public int getVariableIndex() {

+		return variableIndex;

+	}

+  

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateEntity.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateEntity.java
new file mode 100644
index 0000000..c435114
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateEntity.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class CreateEntity extends CreateElement{

+

+	

+	/**

+	 * 

+	 */

+	public CreateEntity(int id, IModelManager manager){

+		super(manager,id);

+	}

+	

+	

+	@Override

+	protected boolean create(MatchingFrame frame) throws GTOperationException{

+		frame.setValue(variableIndex, manager.newEntity()); 

+

+		return true;

+	}

+    

+	 public String toString() {

+			return getClass().getSimpleName() + " : " + 

+					variableIndex;

+		}
+
+
+	public String toString(MatchingFrame frame) {
+		
+		return "Create Entity: "+ variableIndex;
+	}
+	
+	 @Override
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+	   	return frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getTraceabilityElement().getRepresentativeEMFElement();
+	}	

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateEntityWithConstantContainer.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateEntityWithConstantContainer.java
new file mode 100644
index 0000000..1113b8d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateEntityWithConstantContainer.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.ConstantSearchGraphNode;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class CreateEntityWithConstantContainer extends CreateEntity {

+	

+	

+	IEntity container;
+	ConstantSearchGraphNode containerSearchGraphNode;

+	/**

+	 * @param variableIndex

+	 * @param manager
+	 * @param containerSearchGraphNode 

+	 */

+	public CreateEntityWithConstantContainer(int variableI, IModelManager manager, IEntity con, ConstantSearchGraphNode containerSearchGraphNode) {

+		super(variableI, manager);

+		this.container = con;
+		this.containerSearchGraphNode = containerSearchGraphNode;
+	}

+

+	protected boolean create(MatchingFrame frame) throws GTOperationException{

+		if(container == null)

+			{
+			String[] context = {containerSearchGraphNode.getName(),getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,containerSearchGraphNode.getTraceabilityElement().getRepresentativeEMFElement());
+			}

+		

+		try {

+			frame.setValue(variableIndex, manager.newEntity(container));

+		}  catch (VPMCoreException e) {
+			String context[] = {frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getName(),e.getMessage()};

+			throw new GTOperationException(GTErrorStrings.INTERNAL_CREATE_ENTITY
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getTraceabilityElement().getRepresentativeEMFElement());

+		} 

+

+		return true;

+	}

+	

+	public String toString() {

+			return getClass().getSimpleName() + " : " + 

+	            variableIndex +" in "+container.getName();

+	}
+	
+    @Override
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+    	return frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getTraceabilityElement().getRepresentativeEMFElement();
+    }	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateEntityWithVariableContainment.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateEntityWithVariableContainment.java
new file mode 100644
index 0000000..d1eef87
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateEntityWithVariableContainment.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.VariableSearchGraphNode;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class CreateEntityWithVariableContainment extends CreateEntity{

+	

+	VariableSearchGraphNode container;

+	/**

+	 * @param variableIndex

+	 * @param manager

+	 */

+	public CreateEntityWithVariableContainment(int variableI, IModelManager manager, VariableSearchGraphNode con) {

+		super(variableI, manager);

+		this.container = con;

+	}

+

+	protected boolean create(MatchingFrame frame) throws GTOperationException{

+		IEntity tempContainer =null;

+		

+		try{

+			tempContainer = (IEntity)frame.getValue(container.getId());

+		} catch(ClassCastException e){
+			String[] context = {container.getName(), getClass().getSimpleName()};

+			throw new GTOperationException(GTErrorStrings.NOT_AN_ENTITY

+					,context
+					,container.getTraceabilityElement().getRepresentativeEMFElement());

+		}	

+		

+		if(tempContainer == null)

+			{
+			String[] context = {container.getName(),getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,container.getTraceabilityElement().getRepresentativeEMFElement());
+			}

+		

+		try {

+			frame.setValue(variableIndex, manager.newEntity(tempContainer));

+		} catch (VPMCoreException e) {

+			String context[] = {frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getName(),e.getMessage()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_CREATE_ENTITY
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getTraceabilityElement().getRepresentativeEMFElement());

+		} 

+

+		return true;

+	}

+	

+	public String toString() {

+			return getClass().getSimpleName() + " : " + 

+	            variableIndex+" in "+container;

+	}

+
+    @Override
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+    	return frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getTraceabilityElement().getRepresentativeEMFElement();
+    }	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateInstanceofBound2Bound.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateInstanceofBound2Bound.java
new file mode 100644
index 0000000..4d6d971
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateInstanceofBound2Bound.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class CreateInstanceofBound2Bound extends CreateBound2Bound {

+

+	

+	/**

+	 * @param manager

+	 * @param variableI

+	 */
+	private SearchGraphEdge relatedSearchGraphEdge;
+	

+	public CreateInstanceofBound2Bound(int s, int t,IModelManager manager, SearchGraphEdge edge){

+		super(manager);

+		target = t;

+		source = s;
+		relatedSearchGraphEdge = edge;

+	}

+	

+	@Override

+	protected boolean create(MatchingFrame frame) throws GTOperationException {

+		

+		IModelElement sourceElement = null;

+        IModelElement targetElement = null;

+        try {

+            sourceElement = (IModelElement) frame.getValue(source);

+        } catch (ClassCastException e) {

+    			String[] context = {relatedSearchGraphEdge.getSourceNode().getName(), getClass().getSimpleName()};
+    			throw new GTOperationException(GTErrorStrings.NOT_A_MODELELEMENT
+    					,context
+    					,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+        }

+        try {

+            targetElement = (IModelElement) frame.getValue(target);

+        } catch (ClassCastException e) {

+        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(), getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.NOT_A_MODELELEMENT
+					,context
+					,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+        }

+        if (sourceElement == null) {

+        	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(),getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+			

+        }

+        if (targetElement == null) {

+        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(),getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+        }

+		

+		

+		try {

+			manager.newInstanceOf(sourceElement,targetElement);

+		}catch (VPMCoreException e) {

+			String[] context = {frame.getPattern().getSearchGraph().getSearchNode(source).getName(),frame.getPattern().getSearchGraph().getSearchNode(target).getName(), e.getMessage()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_CREATE_INSTANCEOF

+					,context
+					,relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement());

+		}

+		

+		return true;

+	}

+	

+	public String toString() {

+			return getClass().getSimpleName() + " : " + 

+	            source + "(type) -- instanceof -> " + target;

+	}
+	
+	@Override
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+    	return relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement();
+    }
+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateInstanceofBound2Constant.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateInstanceofBound2Constant.java
new file mode 100644
index 0000000..609531e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateInstanceofBound2Constant.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class CreateInstanceofBound2Constant extends CreateBound2Constant {

+

+	private SearchGraphEdge relatedSearchGraphEdge;
+	

+	

+	public CreateInstanceofBound2Constant(int s, IModelElement t,IModelManager manager, SearchGraphEdge edge ){

+		super(manager);

+		target = t;

+		source = s;
+		relatedSearchGraphEdge = edge;

+	}

+	

+	@Override

+	protected boolean create(MatchingFrame frame) throws GTOperationException {

+		IModelElement sourceElement = null;

+        try {

+            sourceElement = (IModelElement) frame.getValue(source);

+        } catch (ClassCastException e) {

+        	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(), getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.NOT_A_MODELELEMENT
+					,context
+					,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+        }

+       

+        if (sourceElement == null) {
+            	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(),getClass().getSimpleName()};
+    			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+    					,context
+    					,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+    	} 
+        
+        if (target == null) {
+        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(),getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+        }

+		

+		

+		try {

+			manager.newInstanceOf(sourceElement,target);

+		}catch (VPMCoreException e) {

+			String[] context = {frame.getPattern().getSearchGraph().getSearchNode(source).getName(),target.getFullyQualifiedName(), e.getMessage()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_CREATE_INSTANCEOF
+					,context
+					,relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement());
+		}

+		

+		return true;

+	}

+	

+	public String toString() {

+			return getClass().getSimpleName() + " : " + 

+	            source + "(type) -- instanceof -> " + target.getName();

+	}
+
+	@Override
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+    	return relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement();
+    }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateInstanceofConstant2Bound.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateInstanceofConstant2Bound.java
new file mode 100644
index 0000000..99a38fb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateInstanceofConstant2Bound.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class CreateInstanceofConstant2Bound extends CreateConstant2Bound {

+

+	private SearchGraphEdge relatedSearchGraphEdge;
+	
+	

+	public CreateInstanceofConstant2Bound(IModelElement s, int t,IModelManager manager, SearchGraphEdge edge ){

+		super(manager);

+		target = t;

+		source = s;
+		relatedSearchGraphEdge = edge;

+	}

+	

+	@Override

+	protected boolean create(MatchingFrame frame) throws GTOperationException {

+		IModelElement targetElement = null;

+        try {

+            targetElement = (IModelElement) frame.getValue(target);

+        } catch (ClassCastException e) {

+        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(), getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.NOT_A_MODELELEMENT
+					,context
+					,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+        }

+        if (source == null) {

+        	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(),getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+     

+        }

+        if (targetElement == null) {

+        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(),getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+        }

+		

+		try {

+			manager.newInstanceOf(source,targetElement);

+		}catch (VPMCoreException e) {

+			String[] context = {source.getFullyQualifiedName(),frame.getPattern().getSearchGraph().getSearchNode(target).getName(), e.getMessage()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_CREATE_INSTANCEOF
+					,context
+					,relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement());
+		}

+		

+		return true;

+	}

+	

+	public String toString() {

+			return getClass().getSimpleName() + " : " + 

+	            source.getName() + "(type) -- instanceof -> " + target;

+	}

+	
+	@Override
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+	    	return relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement();
+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateInstanceofConstant2Constant.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateInstanceofConstant2Constant.java
new file mode 100644
index 0000000..fdca641
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateInstanceofConstant2Constant.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class CreateInstanceofConstant2Constant extends CreateConstant2Constant {

+

+	private SearchGraphEdge relatedSearchGraphEdge;
+		

+	public CreateInstanceofConstant2Constant(IModelElement s,
+			IModelElement t,IModelManager manager, SearchGraphEdge edge){

+		super(manager);

+		source = s;

+		target= t;
+		relatedSearchGraphEdge = edge;

+	}

+	

+	@Override

+	protected boolean create(MatchingFrame frame)throws GTOperationException {

+		

+        if (source == null) {

+        	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(),getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+     

+        }

+        if (target == null) {

+        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(),getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+        }

+			

+		try {

+			manager.newInstanceOf(source,target);

+		} catch (VPMCoreException e) {

+			String[] context = {source.getFullyQualifiedName(),target.getFullyQualifiedName(), e.getMessage()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_CREATE_INSTANCEOF
+					,context
+					,relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement());
+	}

+

+		return true;

+	}

+	

+	public String toString() {

+			return getClass().getSimpleName() + " : " + 

+	            source.getName() + "(type) -- instanceof -> " + target.getName();

+	}
+	 
+	@Override
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+	    	return relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement();
+	    }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateRelationBound2Bound.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateRelationBound2Bound.java
new file mode 100644
index 0000000..0e289cb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateRelationBound2Bound.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class CreateRelationBound2Bound extends CreateBound2Bound {

+

+	

+	/**

+	 * @param manager

+	 * @param variableI

+	 */
+	
+	public CreateRelationBound2Bound(int s, int t,
+			int variableI ,IModelManager manager){

+		super(manager,variableI);

+		target = t;

+		source = s;
+	}

+	

+	@Override

+	protected boolean create(MatchingFrame frame) throws GTOperationException{

+		

+		IModelElement sourceElement = null;

+        IModelElement targetElement = null;

+        try {
+            sourceElement = (IModelElement) frame.getValue(source);
+        } catch (ClassCastException e) {
+    			String[] context = {frame.getPattern().getSearchGraph().getSearchNode(source).getName(), getClass().getSimpleName()};
+    			throw new GTOperationException(GTErrorStrings.NOT_A_MODELELEMENT
+    					,context
+    					,frame.getPattern().getSearchGraph().getSearchNode(source).getTraceabilityElement().getRepresentativeEMFElement());
+        }
+        try {
+            targetElement = (IModelElement) frame.getValue(target);
+        } catch (ClassCastException e) {
+        	String[] context = {frame.getPattern().getSearchGraph().getSearchNode(target).getName(), getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.NOT_A_MODELELEMENT
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(target).getTraceabilityElement().getRepresentativeEMFElement());
+        }
+        if (sourceElement == null) {
+        	String[] context = {frame.getPattern().getSearchGraph().getSearchNode(source).getName(),getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(source).getTraceabilityElement().getRepresentativeEMFElement());
+			
+        }
+        if (targetElement == null) {
+        	String[] context = {frame.getPattern().getSearchGraph().getSearchNode(target).getName(),getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(target).getTraceabilityElement().getRepresentativeEMFElement());
+        }

+        

+		try {

+			frame.setValue(variableIndex, manager.newRelation(sourceElement,targetElement));

+		}catch (VPMCoreException e) {

+			String[] context = {frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getName(),e.getMessage()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_CREATE_RELATION
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getTraceabilityElement().getRepresentativeEMFElement());
+		}

+		

+		return true;

+	}

+	

+	public String toString() {

+			return getClass().getSimpleName() + " : " + 

+	            source + " -- Relation:"+ variableIndex+" -> " + target;

+	}

+	   
+	@Override
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+	    	return frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getTraceabilityElement().getRepresentativeEMFElement();
+	    }
+}
+
+

+

+	

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateRelationBound2Constant.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateRelationBound2Constant.java
new file mode 100644
index 0000000..e5fa65a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateRelationBound2Constant.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.ConstantSearchGraphNode;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class CreateRelationBound2Constant extends CreateBound2Constant {

+
+	ConstantSearchGraphNode targetNode;

+

+	public CreateRelationBound2Constant(int s, ConstantSearchGraphNode t,int variableI
+			,IModelManager manager){

+		super(manager,variableI);

+		source = s;
+		targetNode = t;

+		target= manager.getElementByName(t.getElement());
+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateElement#create(org.eclipse.viatra2.gtasm.patternmatcher.internal.MatchingFrame)

+	 */

+	@Override

+	protected boolean create(MatchingFrame frame) throws GTOperationException{

+		IModelElement sourceElement = null;

+		try {
+            sourceElement = (IModelElement) frame.getValue(source);
+        } catch (ClassCastException e) {
+        	String[] context = {frame.getPattern().getSearchGraph().getSearchNode(source).getName(), getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.NOT_A_MODELELEMENT
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(source).getTraceabilityElement().getRepresentativeEMFElement());
+        }
+
+        if (sourceElement == null) {
+            	String[] context = {frame.getPattern().getSearchGraph().getSearchNode(source).getName(),getClass().getSimpleName()};
+    			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+    					,context
+    					,frame.getPattern().getSearchGraph().getSearchNode(source).getTraceabilityElement().getRepresentativeEMFElement());
+    	}
+
+        if (target == null) {
+        	String[] context = {targetNode.getElement(),getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,targetNode.getTraceabilityElement().getRepresentativeEMFElement());
+        }

+

+

+		try {

+			frame.setValue(variableIndex, manager.newRelation(sourceElement,target));

+		} catch (VPMCoreException e) {

+			String[] context = {frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getName(),e.getMessage()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_CREATE_RELATION
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getTraceabilityElement().getRepresentativeEMFElement());
+

+		}

+		return true;

+	}

+

+	public String toString() {

+		return getClass().getSimpleName() + " : " +

+            source + " -- Relation:"+ variableIndex+" -> " + target.getName();

+	}

+
+    @Override
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+    	return frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getTraceabilityElement().getRepresentativeEMFElement();
+    }

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateRelationConstant2Bound.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateRelationConstant2Bound.java
new file mode 100644
index 0000000..711f30f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateRelationConstant2Bound.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.ConstantSearchGraphNode;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class CreateRelationConstant2Bound extends CreateConstant2Bound {

+
+	ConstantSearchGraphNode sourceNode;
+

+	public CreateRelationConstant2Bound(ConstantSearchGraphNode s, int t
+			 ,int variableI,IModelManager manager){

+		super(manager,variableI);

+		sourceNode = s;
+		source = manager.getElementByName(s.getElement());

+		target= t;
+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateElement#create(org.eclipse.viatra2.gtasm.patternmatcher.internal.MatchingFrame)

+	 */

+	@Override

+	protected boolean create(MatchingFrame frame) throws GTOperationException {

+		IModelElement targetElement = null;

+		try {
+            targetElement = (IModelElement) frame.getValue(target);
+        } catch (ClassCastException e) {
+        	String[] context = {frame.getPattern().getSearchGraph().getSearchNode(target).getName(), getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.NOT_A_MODELELEMENT
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(target).getTraceabilityElement().getRepresentativeEMFElement());
+        }
+        if (source == null) {
+        	String[] context = {sourceNode.getName(),getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,sourceNode.getTraceabilityElement().getRepresentativeEMFElement());
+
+        }
+        if (targetElement == null) {
+        	String[] context = {frame.getPattern().getSearchGraph().getSearchNode(target).getName(),getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(target).getTraceabilityElement().getRepresentativeEMFElement());
+        }

+

+		try {

+			frame.setValue(variableIndex, manager.newRelation(source,targetElement));

+		}catch (VPMCoreException e) {

+			String[] context = {frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getName(),e.getMessage()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_CREATE_RELATION
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getTraceabilityElement().getRepresentativeEMFElement());
+

+		}

+		return true;

+	}

+

+	public String toString() {

+		return getClass().getSimpleName() + " : " +

+            source.getName() + " -- Relation:"+ variableIndex+" -> " + target;

+	}
+
+    @Override
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+    	return frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getTraceabilityElement().getRepresentativeEMFElement();
+    }

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateRelationConstant2Constant.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateRelationConstant2Constant.java
new file mode 100644
index 0000000..51cca04
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateRelationConstant2Constant.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.ConstantSearchGraphNode;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+//In normal cases this type of relation creating operation would not be nstanciated

+public class CreateRelationConstant2Constant extends CreateConstant2Constant {

+

+	ConstantSearchGraphNode sourceNode, targetNode;
+

+	public CreateRelationConstant2Constant(ConstantSearchGraphNode s,
+			ConstantSearchGraphNode t,  int variableI,IModelManager manager){

+		super(manager,variableI);

+		sourceNode = s;
+		targetNode = t;
+
+		source = manager.getElementByName(s.getElement());

+		target= manager.getElementByName(t.getElement());
+	}

+

+	@Override

+	protected boolean create(MatchingFrame frame)throws GTOperationException {

+		 if (source == null) {
+	        	String[] context = {sourceNode.getName(),getClass().getSimpleName()};
+				throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+						,context
+						,sourceNode.getTraceabilityElement().getRepresentativeEMFElement());
+
+	        }
+	        if (target == null) {
+	        	String[] context = {targetNode.getName(),getClass().getSimpleName()};
+				throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+						,context
+						,targetNode.getTraceabilityElement().getRepresentativeEMFElement());
+	        }

+

+		try {

+			frame.setValue(variableIndex, manager.newRelation(source,target));

+		} catch (VPMCoreException e) {

+			String[] context = {frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getName(),e.getMessage()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_CREATE_RELATION
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getTraceabilityElement().getRepresentativeEMFElement());
+		}

+		return true;

+	}

+

+	public String toString() {

+		return getClass().getSimpleName() + " : " +

+            source.getName() + " -- Relation:"+ variableIndex+" -> " + target.getName();

+	}

+
+    @Override
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+    	return frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getTraceabilityElement().getRepresentativeEMFElement();
+    }

+

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateSuperTypeofBound2Bound.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateSuperTypeofBound2Bound.java
new file mode 100644
index 0000000..3c70bac
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateSuperTypeofBound2Bound.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class CreateSuperTypeofBound2Bound extends CreateBound2Bound {

+
+	private SearchGraphEdge relatedSearchGraphEdge;
+	

+	/**

+	 * @param m

+	 */

+	public CreateSuperTypeofBound2Bound(int s, int t,
+			IModelManager manager,SearchGraphEdge edge ){

+		super(manager);

+		target = t;

+		source = s;
+		relatedSearchGraphEdge = edge;

+	}

+	

+	@Override

+	protected boolean create(MatchingFrame frame) throws GTOperationException {

+		IModelElement sourceElement = null;

+        IModelElement targetElement = null;

+        try {
+            sourceElement = (IModelElement) frame.getValue(source);
+        } catch (ClassCastException e) {
+    			String[] context = {relatedSearchGraphEdge.getSourceNode().getName(), getClass().getSimpleName()};
+    			throw new GTOperationException(GTErrorStrings.NOT_A_MODELELEMENT
+    					,context
+    					,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+        }
+        try {
+            targetElement = (IModelElement) frame.getValue(target);
+        } catch (ClassCastException e) {
+        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(), getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.NOT_A_MODELELEMENT
+					,context
+					,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+        }
+        if (sourceElement == null) {
+        	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(),getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+			
+        }
+        if (targetElement == null) {
+        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(),getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+        }

+		

+		try {

+			manager.newSupertypeOf(sourceElement,targetElement);

+		} 

+		catch (VPMCoreException e) {

+			String[] context = {frame.getPattern().getSearchGraph().getSearchNode(source).getName(),frame.getPattern().getSearchGraph().getSearchNode(target).getName(), e.getMessage()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_CREATE_SUPERTYPEOF
+					,context
+					,relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement());
+

+		}

+		return true;

+	}
+	
+	public String toString() {
+		return getClass().getSimpleName() + " : " + 
+            source + " -- Supertypeof: -> " + target;
+	}
+	
+	@Override
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+    	return relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement();
+    }

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateSuperTypeofBound2Constant.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateSuperTypeofBound2Constant.java
new file mode 100644
index 0000000..772dc64
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateSuperTypeofBound2Constant.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class CreateSuperTypeofBound2Constant extends CreateBound2Constant{

+

+	private SearchGraphEdge relatedSearchGraphEdge;
+	

+	public CreateSuperTypeofBound2Constant(int s, IModelElement t
+			,IModelManager manager, SearchGraphEdge edge ){

+		super(manager);

+		target = t;

+		source = s;
+		relatedSearchGraphEdge = edge;

+	}

+	

+	@Override

+	protected boolean create(MatchingFrame frame) throws GTOperationException {

+		IModelElement sourceElement = null;

+		try {
+            sourceElement = (IModelElement) frame.getValue(source);
+        } catch (ClassCastException e) {
+        	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(), getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.NOT_A_MODELELEMENT
+					,context
+					,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+        }
+       
+        if (sourceElement == null) {
+            	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(),getClass().getSimpleName()};
+    			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+    					,context
+    					,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+    	} 
+        
+        if (target == null) {
+        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(),getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+        }

+				

+		try {

+			manager.newSupertypeOf(sourceElement,target);

+		} catch (VPMCoreException e) {

+			String[] context = {frame.getPattern().getSearchGraph().getSearchNode(source).getName(),target.getFullyQualifiedName(), e.getMessage()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_CREATE_SUPERTYPEOF
+					,context
+					,relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement());
+

+		}

+		

+		return true;

+	}
+	
+	public String toString() {
+		return getClass().getSimpleName() + " : " + 
+            source + " -- Supertypeof: -> " + target.getName();
+	}
+	
+	@Override
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+    	return relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement();
+    }

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateSuperTypeofConstant2Bound.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateSuperTypeofConstant2Bound.java
new file mode 100644
index 0000000..86722f1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateSuperTypeofConstant2Bound.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class CreateSuperTypeofConstant2Bound extends CreateConstant2Bound{

+	
+	private SearchGraphEdge relatedSearchGraphEdge;
+	

+	public CreateSuperTypeofConstant2Bound(IModelElement s, int t
+			,IModelManager manager, SearchGraphEdge edge ){

+		super(manager);

+		target = t;

+		source = s;
+		relatedSearchGraphEdge = edge;

+	}

+	

+	@Override

+	protected boolean create(MatchingFrame frame) throws GTOperationException {

+				IModelElement targetElement = null;

+				try {
+		            targetElement = (IModelElement) frame.getValue(target);
+		        } catch (ClassCastException e) {
+		        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(), getClass().getSimpleName()};
+					throw new GTOperationException(GTErrorStrings.NOT_A_MODELELEMENT
+							,context
+							,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+		        }
+		        if (source == null) {
+		        	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(),getClass().getSimpleName()};
+					throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+							,context
+							,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+		     
+		        }
+		        if (targetElement == null) {
+		        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(),getClass().getSimpleName()};
+					throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+							,context
+							,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+		        }

+		

+        try {

+			manager.newSupertypeOf(source,targetElement);

+		}catch (VPMCoreException e) {

+			String[] context = {source.getFullyQualifiedName(),frame.getPattern().getSearchGraph().getSearchNode(target).getName(), e.getMessage()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_CREATE_SUPERTYPEOF
+					,context
+					,relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement());
+

+		}

+		

+		return true;

+	}
+	
+	public String toString() {
+		return getClass().getSimpleName() + " : " + 
+            source.getName() + " -- Supertypeof: -> " + target;
+	}
+	
+	@Override
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+    	return relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement();
+    }

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateSuperTypeofConstant2Constant.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateSuperTypeofConstant2Constant.java
new file mode 100644
index 0000000..532c134
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/CreateSuperTypeofConstant2Constant.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class CreateSuperTypeofConstant2Constant extends CreateConstant2Constant {

+	
+	private SearchGraphEdge relatedSearchGraphEdge;
+	

+	public CreateSuperTypeofConstant2Constant(IModelElement s, IModelElement t
+			,IModelManager manager, SearchGraphEdge edge){

+		super(manager);

+		source = s;

+		target= t;
+		relatedSearchGraphEdge = edge;

+	}

+	

+	@Override

+	protected boolean create(MatchingFrame frame)throws GTOperationException{

+		  if (source == null) {
+	        	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(),getClass().getSimpleName()};
+				throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+						,context
+						,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+	     
+	        }
+	        if (target == null) {
+	        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(),getClass().getSimpleName()};
+				throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+						,context
+						,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+	        }

+		

+		try {

+			manager.newSupertypeOf(source,target);

+		} catch (VPMCoreException e) {

+			String[] context = {source.getFullyQualifiedName(),target.getFullyQualifiedName(), e.getMessage()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_CREATE_SUPERTYPEOF
+					,context
+					,relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement());
+		}

+		return true;

+	}
+	
+	public String toString() {
+		return getClass().getSimpleName() + " : " + 
+            source.getName() + " -- Supertypeof: -> " + target.getName();
+	}
+	
+	@Override
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+    	return relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement();
+    }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/DeleteElement.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/DeleteElement.java
new file mode 100644
index 0000000..9efac8c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/DeleteElement.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+abstract public class DeleteElement extends ElementManipulationOperation {

+

+//	private boolean hasBeenExecuted;

+	protected IModelManager manager;

+	protected int variableIndex;

+	    

+    public DeleteElement(IModelManager manager, int variableI) {

+//	        hasBeenExecuted = false;

+        this.manager = manager;

+        this.variableIndex = variableI;

+    }

+	    

+    public boolean update(MatchingFrame frame) throws GTOperationException{

+   		delete(frame);

+	    return true;

+    }

+

+    abstract protected boolean delete(MatchingFrame frame) throws GTOperationException;

+
+    /**

+	 * @return the variableIndex

+	 */

+	public int getVariableIndex() {

+		return variableIndex;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/DeleteInstanceof.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/DeleteInstanceof.java
new file mode 100644
index 0000000..4794d4f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/DeleteInstanceof.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class DeleteInstanceof extends DeleteRelationShip {

+

+	/**

+	 * @param manager

+	 * @param variableI

+	 */

+	

+	public DeleteInstanceof(IModelManager manager, IModelElement source, IModelElement target) {

+		super(manager,source,target);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.DeleteElement#delete(org.eclipse.viatra2.gtasm.patternmatcher.internal.MatchingFrame)

+	 */

+	@Override

+	protected boolean delete(MatchingFrame frame) throws GTOperationException{

+		// target = instance

+		// source = type

+		

+ /*       if (source == null) {

+            throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE);

+        }

+        if (target == null) {

+        	throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE);

+        }

+		

+		try {

+			manager.deleteInstanceOf(source, target );

+		} catch (VPMCoreException e) {

+			throw new GTOperationException(GTErrorStrings.DELETE_INSTANCEOF

+					+"Type: "+source.getFullyQualifiedName()

+					+"Instance: "+target.getFullyQualifiedName());

+			

+		}

+		return true;*/
+		String[] context = {getClass().getSimpleName()};
+		throw new GTOperationException(GTErrorStrings.INTERNAL_OPERATION_NOT_SUPPORTED
+				,context
+				,null);

+	}

+	

+

+    public String toString(){

+    	return "Delete "+ source.getName()+" instanceof "+target.getName();

+    }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/DeleteModelElement.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/DeleteModelElement.java
new file mode 100644
index 0000000..016168a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/DeleteModelElement.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.EDeleteSemantics;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class DeleteModelElement extends DeleteElement {

+

+	public DeleteModelElement(IModelManager manager, int variableI) {

+		super(manager, variableI);

+	}

+

+	@Override

+	protected boolean delete(MatchingFrame frame) throws GTOperationException {

+

+		IModelElement elementToDelete = null;

+        

+        try {

+        	elementToDelete = (IModelElement) frame.getValue(this.variableIndex);

+        } catch (ClassCastException e) {

+        	String[] context = {frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getName(), getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.NOT_A_MODELELEMENT
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getTraceabilityElement().getRepresentativeEMFElement());
+         }

+        if (elementToDelete == null) {

+        	String[] context = {frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getName(),getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getTraceabilityElement().getRepresentativeEMFElement());
+     

+        }

+        		

+		try {

+			manager.deleteElement(elementToDelete, EDeleteSemantics.DELETE_SEMANTICS_BRANCH_FORCE);

+			frame.setValue(variableIndex, ValueKind.UNDEF_LITERAL);

+			

+		}catch (VPMCoreException e) {

+			String context[] = {frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getName(),e.getMessage()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_DELETE_MODELELEMENT
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getTraceabilityElement().getRepresentativeEMFElement());
+		}

+		return true;

+	}

+

+

+    public String toString(){

+    	return "Del: "+variableIndex;

+    }
+    
+    @Override
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+    	return frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getTraceabilityElement().getRepresentativeEMFElement();
+    }
+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/DeleteRelationShip.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/DeleteRelationShip.java
new file mode 100644
index 0000000..b147d63
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/DeleteRelationShip.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+

+/**

+ * @author Akos Horvath

+ *

+ */

+public abstract class DeleteRelationShip extends DeleteElement {

+

+	

+	IModelElement target, source; 

+	

+	public DeleteRelationShip(IModelManager manager, IModelElement s,IModelElement t ) {

+		super(manager, 0);

+		target = t;

+		source = s;

+	}

+

+	@Override

+	protected boolean delete(MatchingFrame frame) throws GTOperationException {

+		return false;

+	}

+

+	

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/DeleteSuperTypeof.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/DeleteSuperTypeof.java
new file mode 100644
index 0000000..fb13e9b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/DeleteSuperTypeof.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class DeleteSuperTypeof extends DeleteRelationShip {

+

+	/**

+	 * @param manager

+	 * @param variableI

+	 * @param p

+	 */

+	public DeleteSuperTypeof(IModelManager manager, IModelElement target, IModelElement source) {

+		super(manager,source,target);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.DeleteElement#delete(org.eclipse.viatra2.gtasm.patternmatcher.internal.MatchingFrame)

+	 */

+	@Override

+	protected boolean delete(MatchingFrame frame) throws GTOperationException{

+		// target = supertype

+		// source = subtype

+		

+	/*	if (source == null) {

+	            throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE);

+	        }

+	    if (target == null) {

+	        	throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE);

+	        }

+			

+		

+		try {

+			manager.deleteSupertypeOf(source, target);

+		} catch (VPMCoreException e) {

+			throw new GTOperationException(GTErrorStrings.DELETE_SUPERTYPEOF

+					+"SuperType: "+source.getFullyQualifiedName()

+					+"SubType: "+target.getFullyQualifiedName());

+			

+		}

+		return true;*/
+		String[] context = {getClass().getSimpleName()};
+		throw new GTOperationException(GTErrorStrings.INTERNAL_OPERATION_NOT_SUPPORTED
+				,context
+				,null);
+

+	}

+	

+

+    public String toString(){

+    	return "Delete "+ source.getName()+" supertypeof "+target.getName();

+    }
+    
+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/ElementManipulationOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/ElementManipulationOperation.java
new file mode 100644
index 0000000..8c46032
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/ElementManipulationOperation.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**The root of the manipulation operation hierarchy

+ * @author Akos Horvath

+ *

+ */

+public abstract class ElementManipulationOperation implements IUpdatePlanOperation {

+	

+	public boolean update(MatchingFrame frame) throws GTOperationException {

+		return false;

+	}

+    

+    public String toString() {

+        return getClass().getSimpleName();

+    }

+    

+    public AnnotatedElement getErrorfulElement(MatchingFrame frame){

+    	return null;

+    }
+    
+    public String toString(MatchingFrame frame) {
+		return toString();
+	}

+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/IUpdatePlanOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/IUpdatePlanOperation.java
new file mode 100644
index 0000000..5104907
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/IUpdatePlanOperation.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+
+

+public interface IUpdatePlanOperation {

+	/** Executes the operation
+	 * @param frame The matching frame of the invocation context
+	 * @return true if the execution finished without problems else false
+	 * @throws GTOperationException
+	 */
+	public boolean update(MatchingFrame frame) throws GTOperationException;
+	/**A detailed serialized description of the operation
+	 * @param frame The matching frame of the invocation context
+	 * @return
+	 */
+	public String toString(MatchingFrame frame);
+	/**Returns the GTASM element from which the operation was created (also which caused the error durng the execution)
+	 * @param frame The matching frame of the invocation context
+	 * @return
+	 */
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame);

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/MoveBoundunderBound.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/MoveBoundunderBound.java
new file mode 100644
index 0000000..2c4ba55
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/MoveBoundunderBound.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class MoveBoundunderBound extends MoveElement{

+	

+		int container;

+		SearchGraphEdge relatedSearchGraphEdge;

+		

+	

+	    public MoveBoundunderBound(IModelManager manager, int cont
+	    		, int variable, SearchGraphEdge edge) {

+	        super(manager,variable);

+	        container = cont;
+	        relatedSearchGraphEdge = edge;

+	        

+	    }

+	    

+	    public boolean update(MatchingFrame frame) throws GTOperationException {

+	   		

+	   			IEntity containerElement = null;

+	   			IEntity variableElement = null;

+	   	        try {

+	   	        	containerElement = (IEntity) frame.getValue(container);

+	   	        } catch (ClassCastException e) {

+	   	        	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(), getClass().getSimpleName()};
+	    			throw new GTOperationException(GTErrorStrings.NOT_AN_ENTITY
+	    					,context
+	    					,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+	   	        }

+	   	        try {

+	   	            variableElement = (IEntity) frame.getValue(variableIndex);

+	   	        } catch (ClassCastException e) {

+	   	     	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(), getClass().getSimpleName()};
+				throw new GTOperationException(GTErrorStrings.NOT_AN_ENTITY
+						,context
+						,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+	   	        }

+	   	        if (containerElement == null) {

+	   	        	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(),getClass().getSimpleName()};
+	   				throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+	   						,context
+	   						,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+	   			}

+	   	        if (variableElement == null) {

+	   	        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(),getClass().getSimpleName()};
+	   				throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+	   						,context
+	   						,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+	   	        }

+	   			

+	   			

+	   			try {

+					manager.moveEntityTo(variableElement,containerElement);

+				

+//					hasBeenExecuted = true;

+		   			return true;

+	   			}

+	   			 catch (VPMCoreException e) {

+		   			 String[] context = {frame.getPattern().getSearchGraph().getSearchNode(container).getName()
+		   					 , frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getName()
+		   					 , e.getMessage()};
+		   			 
+	   				 throw new GTOperationException(GTErrorStrings.INTERNAL_MOVE_MODELELEMENT

+	   						,context
+	   						,relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement());

+				 }

+	    }

+	    

+	    public String toString() {

+			return getClass().getSimpleName() + " : " + 

+	            variableIndex + " -- move under -> " + container;

+	    }

+

+		/**

+		 * @return the container

+		 */

+		public int getContainer() {

+			return container;

+		}

+
+		@Override
+		public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+	    	return relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement();
+	    }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/MoveBoundunderConstant.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/MoveBoundunderConstant.java
new file mode 100644
index 0000000..7ed71d7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/MoveBoundunderConstant.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class MoveBoundunderConstant extends MoveElement {

+

+//	private boolean hasBeenExecuted;

+	IEntity container;

+	SearchGraphEdge relatedSearchGraphEdge;

+	

+	public MoveBoundunderConstant(IModelManager manager, IEntity cont
+			, int variable, SearchGraphEdge edge) {

+	        super(manager,variable);

+	        container = cont;

+	        relatedSearchGraphEdge = edge;

+	    }

+	    

+	    public boolean update(MatchingFrame frame) throws GTOperationException {

+	   			IEntity variableElement = null;

+	   	        try {

+	   	            variableElement = (IEntity) frame.getValue(variableIndex);

+	   	        } catch (ClassCastException e) {

+	   	        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(), getClass().getSimpleName()};
+					throw new GTOperationException(GTErrorStrings.NOT_AN_ENTITY
+							,context
+							,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+		        }

+	   	        if (container == null) {

+	   	        	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(),getClass().getSimpleName()};
+	   				throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+	   						,context
+	   						,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+	   			}

+	   	        if (variableElement == null) {

+	   	        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(),getClass().getSimpleName()};
+	   				throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+	   						,context
+	   						,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+	   	        }

+	   			

+	   			try {

+					manager.moveEntityTo(variableElement, container);

+		   			return true;

+	   			}catch (VPMCoreException e) {

+	   			 String[] context = {container.getFullyQualifiedName()
+	   					 , frame.getPattern().getSearchGraph().getSearchNode(variableIndex).getName()
+	   					 , e.getMessage()};
+	   			 
+   				 throw new GTOperationException(GTErrorStrings.INTERNAL_MOVE_MODELELEMENT
+   						,context
+   						,relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement());
+	   			}

+	    }

+	    

+	    public String toString() {

+			return getClass().getSimpleName() + " : " + 

+	            variableIndex + " -- move under -> " + container.getName();

+	    }
+	    
+	    @Override
+		public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+	    	return relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement();
+	    }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/MoveElement.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/MoveElement.java
new file mode 100644
index 0000000..10f2e9c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/MoveElement.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelManager;
+

+/**

+ * @author Akos Horvath

+ *

+ */

+public abstract class MoveElement extends ElementManipulationOperation {

+

+	protected IModelManager manager;

+	protected int variableIndex;

+	

+	protected MoveElement(IModelManager manager, int variable){

+		this.manager= manager;

+		this.variableIndex = variable;

+	}

+

+	/**

+	 * @return the variable

+	 */

+	public int getVariableIndex() {

+		return variableIndex;

+	}

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/SetRelation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/SetRelation.java
new file mode 100644
index 0000000..327cd49
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/SetRelation.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelManager;
+

+/**

+ * @author Akos Horvath

+ *

+ */

+public abstract class SetRelation extends ElementManipulationOperation {

+

+	protected IModelManager manager;

+	protected int relation;

+	

+	

+	public SetRelation(IModelManager manager, int relation) {

+		this.relation = relation;

+		this.manager = manager;

+	}

+

+

+	/**

+	 * @return the relation

+	 */

+	public int getRelation() {

+		return relation;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/SetRelationSource.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/SetRelationSource.java
new file mode 100644
index 0000000..386aab8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/SetRelationSource.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+public class SetRelationSource extends SetRelation {

+	

+	SearchGraphEdge relatedSearchGraphEdge;

+	int source;

+	

+	public SetRelationSource(int rel, int source
+			,IModelManager manager, SearchGraphEdge edge) {

+		super(manager,rel);

+		this.source= source;
+		relatedSearchGraphEdge = edge;

+	}

+	

+	public boolean update(MatchingFrame frame)throws GTOperationException {

+		IModelElement sourceElement = null;

+        IRelation relationElement = null;

+		try {

+            sourceElement = (IModelElement) frame.getValue(source);

+        } catch (ClassCastException e) {

+        	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(), getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.NOT_A_MODELELEMENT
+					,context
+					,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+        }

+        try {

+            relationElement = (IRelation) frame.getValue(relation);

+        } catch (ClassCastException e) {

+        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(), getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.NOT_A_RELATION
+					,context
+					,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+   	    }

+        if (sourceElement == null) {

+        	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(),getClass().getSimpleName()};
+				throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+						,context
+						,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+		}

+		

+		try {

+		if(!relationElement.getFrom().equals(sourceElement))	

+				manager.setRelationFrom(relationElement,sourceElement);

+		return true;

+		}catch (VPMCoreException e) {

+			String[] context = {relatedSearchGraphEdge.getTargetNode().getName(), relatedSearchGraphEdge.getTargetNode().getName(), e.getMessage()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_SET_RELATION_SOURCE
+					,context
+					,relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement());

+		}	

+	}

+	

+	@Override

+	public String toString() {

+		return "Relation: "+ relation+"-- set Source --> " + source; 

+	}

+

+	@Override
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+    	return relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement();
+    }

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/SetRelationTarget.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/SetRelationTarget.java
new file mode 100644
index 0000000..0852747
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/internal/operation/SetRelationTarget.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTOperationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class SetRelationTarget extends SetRelation{

+

+	/**

+	 * 

+	 */

+	SearchGraphEdge relatedSearchGraphEdge;

+	int target;

+	

+	public SetRelationTarget(int rel, int target
+			,IModelManager manager, SearchGraphEdge edge) {

+		super(manager,rel);

+		this.target = target;
+		relatedSearchGraphEdge = edge;

+	}

+	

+	public boolean update(MatchingFrame frame)throws GTOperationException {

+		IModelElement targetElement = null;

+        IRelation relationElement = null;

+		try {

+            targetElement = (IModelElement) frame.getValue(target);

+        } catch (ClassCastException e) {

+        	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(), getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.NOT_A_MODELELEMENT
+					,context
+					,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+        }

+        try {

+            relationElement = (IRelation) frame.getValue(relation);

+        } catch (ClassCastException e) {

+        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(), getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.NOT_A_RELATION
+					,context
+					,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+   	  }

+        if (targetElement == null) {

+        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(),getClass().getSimpleName()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+     }

+		

+		try {

+			if(!relationElement.getTo().equals(targetElement))

+				manager.setRelationTo(relationElement,targetElement);

+			return true;

+		}catch (VPMCoreException e) {

+			String[] context = {relatedSearchGraphEdge.getTargetNode().getName(), relatedSearchGraphEdge.getTargetNode().getName(), e.getMessage()};
+			throw new GTOperationException(GTErrorStrings.INTERNAL_SET_RELATION_TARGET
+					,context
+					,relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement());
+		}	

+	}

+	

+	@Override

+	public String toString() {

+		return "Relation: "+relation + "-- set Target --> " + target; 

+	}

+	
+	@Override

+	public AnnotatedElement getErrorfulElement(MatchingFrame frame){
+    	return relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement();
+    }

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/validation/GTRuleValidator.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/validation/GTRuleValidator.java
new file mode 100644
index 0000000..f325734
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/validation/GTRuleValidator.java
@@ -0,0 +1,316 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.validation;

+

+

+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTRuleBuildingException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.GTElementMapping;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.GTElementMappingType;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateElement;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateEntity;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateRelationBound2Bound;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateRelationBound2Constant;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateRelationConstant2Bound;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateRelationConstant2Constant;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.DeleteModelElement;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.IUpdatePlanOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.MoveBoundunderBound;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.MoveElement;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.SetRelation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.SetRelationSource;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.SetRelationTarget;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.EdgeType;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.algorithms.ISearchGraph;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.ISearchPlanOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.ConstantSearchGraphNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphNode;
+

+

+/** Encapsulates GT Rule validating operations

+ * @author Akos Horvath

+ *

+ */

+public class GTRuleValidator {

+

+	

+	private Map<Integer,GTValidationElement> validationElements;

+	

+	

+	public GTRuleValidator(){

+		validationElements = new HashMap<Integer, GTValidationElement>();

+	}

+	

+	private GTValidationElement getValidationElement(Integer i){

+		if(!validationElements.containsKey(i))

+			validationElements.put(i, new GTValidationElement());

+		

+		return validationElements.get(i);

+	}

+	

+	

+	/** Adds a collection to the validation process

+	 * @param operations  The collection of operations to add for the validation

+	 */

+	public void addElements(Collection<IUpdatePlanOperation> operations){

+		for(IUpdatePlanOperation op: operations)

+			addElement(op);

+	}

+	

+	/** Adds an operation to the validation process

+	 * @param operation The operation to add for the validation

+	 */

+	private void addElement(IUpdatePlanOperation operation){

+		

+		if(operation instanceof CreateElement)

+			{

+			if(operation instanceof CreateEntity)

+				getValidationElement(((CreateEntity)operation).getVariableIndex()).addCreateOperation(((CreateEntity)operation));

+			else 

+			if (operation instanceof CreateRelationBound2Bound)

+				{getValidationElement(((CreateRelationBound2Bound)operation).getVariableIndex()).addCreateOperation(((CreateRelationBound2Bound)operation));

+				getValidationElement(((CreateRelationBound2Bound)operation).getTarget()).addRelatedCreateOperation(((CreateRelationBound2Bound)operation));

+				getValidationElement(((CreateRelationBound2Bound)operation).getSource()).addRelatedCreateOperation(((CreateRelationBound2Bound)operation));

+				}

+			else if (operation instanceof CreateRelationBound2Constant)

+				{getValidationElement(((CreateRelationBound2Constant)operation).getVariableIndex()).addCreateOperation(((CreateRelationBound2Constant)operation));

+				 getValidationElement(((CreateRelationBound2Constant)operation).getSource()).addRelatedCreateOperation(((CreateRelationBound2Constant)operation));

+				}

+			else if (operation instanceof CreateRelationConstant2Bound)

+				{getValidationElement(((CreateRelationConstant2Bound)operation).getVariableIndex()).addCreateOperation(((CreateRelationConstant2Bound)operation));

+				getValidationElement(((CreateRelationConstant2Bound)operation).getTarget()).addRelatedCreateOperation(((CreateRelationConstant2Bound)operation));

+				}

+			else if (operation instanceof CreateRelationConstant2Constant)

+				getValidationElement(((CreateRelationConstant2Constant)operation).getVariableIndex()).addCreateOperation(((CreateRelationConstant2Constant)operation));

+			//Relationship operations are currently not used in the process

+			}

+		else if(operation instanceof DeleteModelElement)

+			getValidationElement(((DeleteModelElement)operation).getVariableIndex()).addDelOperation(((DeleteModelElement)operation));

+		else if(operation instanceof MoveElement)

+			{

+			getValidationElement(((MoveElement)operation).getVariableIndex()).addMoveOperation(((MoveElement)operation));

+			if(operation instanceof MoveBoundunderBound)

+				getValidationElement(((MoveBoundunderBound)operation).getContainer()).addRelatedMoveOperation(((MoveElement)operation));

+			}

+		else if(operation instanceof SetRelation)

+			{

+			getValidationElement(((SetRelation)operation).getRelation()).addSetOperation(((SetRelation)operation));

+			//source and target of the operation
+			//if(operation instanceof SetRelationSource)

+			//	getValidationElement(((SetRelationSource)operation).getSource()).addSetOperation(((SetRelation)operation));

+			//if(operation instanceof SetRelationTarget)

+			//	getValidationElement(((SetRelationTarget)operation).getTarget()).addSetOperation(((SetRelation)operation));

+			}

+	}

+	

+	

+	/**Simple validation algorithm on the input searchgraph
+	 * @param searchGraph
+	 * @throws GTRuleBuildingException
+	 */
+	private void basicValidation(ISearchGraph searchGraph) throws GTRuleBuildingException{

+		

+//		on all elements simple checks

+		for(Map.Entry<Integer, GTValidationElement> entry: validationElements.entrySet()){

+
+		GTValidationElement element = entry.getValue();

+			//basic operation checks 

+			if(element.getDelOperations().size()>1)

+				{
+				String[] context = {searchGraph.getSearchNode(entry.getKey()).getName()};
+				throw new GTRuleBuildingException(GTErrorStrings.GTVALIDATION_MORE_THANONE_DEL
+						,context
+						,searchGraph.getGTASMRepresentation(searchGraph.getSearchNode(entry.getKey())));
+				}

+				

+			if(element.getCreateOperations().size()>1)

+				{
+				String[] context = {searchGraph.getSearchNode(entry.getKey()).getName()};
+				throw new GTRuleBuildingException(GTErrorStrings.GTVALIDATION_MORE_THANONE_CREATE
+						,context
+						,searchGraph.getGTASMRepresentation(searchGraph.getSearchNode(entry.getKey())));
+				}
+				

+			if(element.getDelOperations().size() == 1 

+					&& 

+					(element.createOperations.size() != 0

+							|| element.moveOperations.size() != 0

+							|| element.setOperations.size() != 0))

+				{
+				String[] context = {searchGraph.getSearchNode(entry.getKey()).getName()
+						,""+element.createOperations.size()
+						,""+element.moveOperations.size()
+						,""+element.setOperations.size()};
+				throw new GTRuleBuildingException(GTErrorStrings.GTVALIDATION_DEL_AND_OTHEROPERATION
+						,context
+						,searchGraph.getGTASMRepresentation(searchGraph.getSearchNode(entry.getKey())));
+				}
+				

+			//it has to be deleted but also used in a relation/relationship/move/set create operation as a target or source of the relation

+			if((element.getRelatedCreateOperations().size() > 0 

+					|| element.getRelatedMoveOperations().size() > 0 

+					|| element.getRelatedSetOperations().size() >0)

+					&&

+					(element.getDelOperations().size() == 1))
+				{
+				String[] context = {searchGraph.getSearchNode(entry.getKey()).getName()};

+				throw new GTRuleBuildingException(GTErrorStrings.GTVALIDATION_DEL_AND_USED
+						,context
+						,searchGraph.getGTASMRepresentation(searchGraph.getSearchNode(entry.getKey())));

+				}

+		}

+

+	}

+	

+	private void gtElementMappingValidation( Collection<GTElementMapping> elementMappings,
+			Collection<ISearchPlanOperation> checkSet, ISearchGraph searchGraph) throws GTRuleBuildingException{

+		//searchGraph.getGTASMRepresentation(searchGraph.get(2));

+		for(GTElementMapping mapping: elementMappings){

+			GTValidationElement element = null; 

+			

+			if(!validationElements.containsKey(mapping.getRhsInputOrderIndex()))

+				continue;

+			

+			element= validationElements.get(mapping.getRhsInputOrderIndex());

+			

+			if(mapping.getMappingType().equals(GTElementMappingType.KEEP)){

+				if(element.getDelOperations().size() != 0)

+					{
+					String[] context = {searchGraph.getSearchNode(mapping.getRhsInputOrderIndex()).getName()};
+					throw new GTRuleBuildingException(GTErrorStrings.GTVALIDATION_KEEP_DEL
+							,context
+							,searchGraph.getGTASMRepresentation(searchGraph.getSearchNode(mapping.getRhsInputOrderIndex())));
+					
+					}

+				}

+			else

+				if(element.getDelOperations().size() != 1)

+					{
+					String[] context = {searchGraph.getSearchNode(mapping.getRhsInputOrderIndex()).getName()};
+					throw new GTRuleBuildingException(GTErrorStrings.INTERNAL_GTVALIDATION_NOT_DELETED
+							,context
+							,searchGraph.getGTASMRepresentation(searchGraph.getSearchNode(mapping.getRhsInputOrderIndex())));
+					}
+			//more then one set operation on the same relation

+			if(element.getSetOperations().size() > 1){

+				int to=0,from=0;

+				for(SetRelation setR: element.getSetOperations())

+					{

+					if(setR instanceof SetRelationSource)

+						from++;

+					else if(setR instanceof SetRelationTarget)

+						to++;

+					}

+				if(to==1 && from >1)
+				{
+					String[] context = {searchGraph.getSearchNode(mapping.getRhsInputOrderIndex()).getName()};
+					throw new GTRuleBuildingException(GTErrorStrings.GTVALIDATION_SET_SOURCE
+							,context
+							,searchGraph.getGTASMRepresentation(searchGraph.getSearchNode(mapping.getRhsInputOrderIndex())));
+				}
+				
+				if(to>1 && from == 1)
+				{
+					String[] context = {searchGraph.getSearchNode(mapping.getRhsInputOrderIndex()).getName()};
+					throw new GTRuleBuildingException(GTErrorStrings.GTVALIDATION_SET_TARGET
+							,context
+							,searchGraph.getGTASMRepresentation(searchGraph.getSearchNode(mapping.getRhsInputOrderIndex())));
+				}
+				
+				if(to>1 && from > 1)
+				{
+					String[] context = {searchGraph.getSearchNode(mapping.getRhsInputOrderIndex()).getName()};
+					throw new GTRuleBuildingException(GTErrorStrings.GTVALIDATION_SET_BOTH
+							,context
+							,searchGraph.getGTASMRepresentation(searchGraph.getSearchNode(mapping.getRhsInputOrderIndex())));
+				}

+			}

+		}

+	}

+		

+	

+	/** Validates the search plan for multiple del, set, create etc. operations on a single element
+	 * @param nonchangeableGTOperations The operations to be checked
+	 * @param checkSet the check set that contains additional check operation on elements
+	 * @param elementMappings The element mapping between the LHS nad the RHS
+	 * @param searchGraph The search graph
+	 * @throws GTRuleBuildingException
+	 */
+	public void validateOperationPlan(Collection<IUpdatePlanOperation> nonchangeableGTOperations

+			, Collection<ISearchPlanOperation> checkSet

+			, Collection<GTElementMapping> elementMappings, ISearchGraph searchGraph) throws GTRuleBuildingException{

+		

+		addElements(nonchangeableGTOperations);

+		basicValidation(searchGraph);

+		gtElementMappingValidation(elementMappings,checkSet,searchGraph);

+	}
+	
+	/** Validates the containment related elements between entities
+	 * @param node The node to be checked
+	 * @param manager The model space manager
+	 * @param hasOneInConstraint The global 'IN' type constraint store for the input elements 
+	 * @throws GTRuleBuildingException
+	 */
+	public static void validateContainment(SearchGraphNode node, IModelManager manager, Map<SearchGraphNode, Boolean> hasOneInConstraint) throws GTRuleBuildingException {
+		for(SearchGraphEdge edge: node.getSources()){ 
+			//direct IN constraints on the node
+			if(edge.getVPMEdgeType().equals(EdgeType.IN) && edge.isSource())
+				//&& edge.isChecked()
+				if(hasOneInConstraint.get(node) != null && hasOneInConstraint.get(node))
+	//				two IN constraints on the element
+				{	String[] context = {node.getName()};
+					throw new GTRuleBuildingException(GTErrorStrings.MORE_ONE_IN_CONTAINMENT
+							,context
+							,node.getTraceabilityElement().getRepresentativeEMFElement());
+				}
+				else
+					hasOneInConstraint.put(node, Boolean.TRUE);
+			
+			//edges that are aggregations
+			if(edge.getVPMEdgeType().equals(EdgeType.TARGET) && edge.isSource())
+			{
+				SearchGraphNode edgeNode = edge.getSourceNode();
+				for(SearchGraphEdge typeEdge: edgeNode.getSources())
+					{ 
+					if(typeEdge.getVPMEdgeType().equals(EdgeType.INSTANCEOF) && edge.getSourceNode() instanceof ConstantSearchGraphNode && edge.isSource())
+						{
+						String fqn = ((ConstantSearchGraphNode)edge.getSourceNode()).getElement();
+						//it can be a relation type
+						if(fqn != null && !fqn.equals(ISearchGraph.VPM_ENTITY_FQN) && !fqn.equals(ISearchGraph.VPM_RELATION_FQN))
+							{ IRelation relation = manager.getRelationByName(fqn);
+								if(relation != null && 	relation.getIsAggregation())
+									{
+									if(hasOneInConstraint.get(node) != null && hasOneInConstraint.get(node))
+									{	String[] context = {node.getName()};
+									throw new GTRuleBuildingException(GTErrorStrings.MORE_ONE_IN_CONTAINMENT
+											,context
+											,node.getTraceabilityElement().getRepresentativeEMFElement());
+									}
+									else
+										hasOneInConstraint.put(node, Boolean.TRUE);
+									}
+							}
+						}
+					}
+			}
+		}
+	}

+
+}

+

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/validation/GTValidationElement.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/validation/GTValidationElement.java
new file mode 100644
index 0000000..aa4b33b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/gtmatcher/validation/GTValidationElement.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.validation;

+

+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.CreateElement;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.DeleteElement;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.MoveElement;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.SetRelation;
+

+

+/** Holds the operations that needs to be validated

+ * @author Akos Horvath

+ *

+ */

+public class GTValidationElement {

+	

+	Collection<DeleteElement> delOperations;

+	Collection<CreateElement> createOperations;

+	Collection<MoveElement> moveOperations;

+	Collection<SetRelation> setOperations;

+	

+	//related operation, where the element is only used as a target or a source

+	//Collection<DeleteElement> relatedDelOperations;

+	Collection<CreateElement> relatedCreateOperations;

+	Collection<MoveElement> relatedMoveOperations;

+	Collection<SetRelation> relatedSetOperations;

+	

+	public GTValidationElement(){

+		delOperations = new ArrayList<DeleteElement>();

+		createOperations = new ArrayList<CreateElement>();

+		moveOperations = new ArrayList<MoveElement>();

+		setOperations = new ArrayList<SetRelation>();

+	

+		//relatedDelOperations = new ArrayList<DeleteElement>();

+		relatedCreateOperations = new ArrayList<CreateElement>();

+		relatedMoveOperations = new ArrayList<MoveElement>();

+		relatedSetOperations = new ArrayList<SetRelation>();

+	

+	}

+	

+	/**

+	 * @return the createOperations

+	 */

+	public Collection<CreateElement> getCreateOperations() {

+		return createOperations;

+	}

+	/**

+	 * @return the delOperations

+	 */

+	public Collection<DeleteElement> getDelOperations() {

+		return delOperations;

+	}

+	/**

+	 * @return the moveOperations

+	 */

+	public Collection<MoveElement> getMoveOperations() {

+		return moveOperations;

+	}

+	/**

+	 * @return the setOperations

+	 */

+	public Collection<SetRelation> getSetOperations() {

+		return setOperations;

+	}

+	/** Adds the operation to the appropriate collection

+	 * @param op

+	 */

+	public void addCreateOperation(CreateElement op){

+		createOperations.add(op);

+	}

+	/** Adds the operation to the appropriate collection

+	 * @param op

+	 */

+	public void addDelOperation(DeleteElement op){

+		delOperations.add(op);

+	}

+	/** Adds the operation to the appropriate collection

+	 * @param op

+	 */

+	public void addMoveOperation(MoveElement op){

+		moveOperations.add(op);

+	}

+	/** Adds the operation to the appropriate collection

+	 * @param op

+	 */

+	public void addSetOperation(SetRelation op){

+		setOperations.add(op);

+	}

+

+	/**

+	 * @return the relatedCreateOperations

+	 */

+	public Collection<CreateElement> getRelatedCreateOperations() {

+		return relatedCreateOperations;

+	}

+

+//	/**

+//	 * @return the relatedDelOperations

+//	 */

+//	public Collection<DeleteElement> getRelatedDelOperations() {

+//		return relatedDelOperations;

+//	}

+//

+	/**

+	 * @return the relatedMoveOperations

+	 */

+	public Collection<MoveElement> getRelatedMoveOperations() {

+		return relatedMoveOperations;

+	}

+

+	/**

+	 * @return the relatedSetOperations

+	 */

+	public Collection<SetRelation> getRelatedSetOperations() {

+		return relatedSetOperations;

+	}	

+	

+	/** Adds the operation to the appropriate collection

+	 * @param op

+	 */

+	public void addRelatedCreateOperation(CreateElement op){

+		relatedCreateOperations.add(op);

+	}

+	/** Adds the operation to the appropriate collection

+	 * @param op

+	 */

+//	public void addRelatedDelOperation(DeleteElement op){

+//		relatedDelOperations.add(op);

+//	}

+	/** Adds the operation to the appropriate collection

+	 * @param op

+	 */

+	public void addRelatedMoveOperation(MoveElement op){

+		relatedMoveOperations.add(op);

+	}

+	/** Adds the operation to the appropriate collection

+	 * @param op

+	 */

+	public void addRelatedSetOperation(SetRelation op){

+		relatedSetOperations.add(op);

+	}

+	

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/core/LocalSearchPatternMatcherFactory.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/core/LocalSearchPatternMatcherFactory.java
new file mode 100644
index 0000000..27251bd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/core/LocalSearchPatternMatcherFactory.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.core;

+

+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.patternmatcher.extension.IPatternMatcherFactory;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.BasicTermHandler;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.TermHandler;
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IPatternMatcher;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+
+

+/**

+ * Implements the IPatternMatcherFactory for org.eclipse.viatra2.gtasm.patternmatcher.extension point for the viatra GTASM intepreter

+ * @author Akos Horvath

+ *

+ */

+public class LocalSearchPatternMatcherFactory implements IPatternMatcherFactory {

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.extension.IPatternMatcherFactory#getPatternMatcher(org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment, org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern)

+	 */

+	public IPatternMatcher getPatternMatcher(IExecutionEnvironment executionEnvironment,

+			GTPattern gtPattern) throws ViatraTransformationException {

+		

+		IPatternMatcher patternMatcher = null;

+		if (PatternMatchers.getInstance().containsKey(gtPattern)) {

+			// We had it precompiled
+			patternMatcher=PatternMatchers.getInstance().get(gtPattern);

+		} else {

+        	TermHandler handler = 
+        		new BasicTermHandler(executionEnvironment);

+        	PatternBuilder patternBuilder = 
+        		new PatternBuilder(executionEnvironment.getFramework().getLogger(),
+        				executionEnvironment.getFramework().getTopmodel().getModelManager(),
+        				handler);

+		

+			try {

+				patternMatcher = patternBuilder.construct(gtPattern);

+				PatternMatchers.getInstance().put(gtPattern, patternMatcher);

+			} catch (ViatraTransformationException e) {
+				throw e.addNewStackElement(gtPattern);
+			}

+		}

+		return patternMatcher;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/core/PatternBuilder.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/core/PatternBuilder.java
new file mode 100644
index 0000000..06321ec
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/core/PatternBuilder.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.core;

+

+
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherCompileTimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcher;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.ITermHandler;
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IPatternMatcher;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.logger.Logger;
+

+/**

+ * PatternBuilder reads the specification (i.e., a model that conforms to

+ * the GTPattern metamodel), and after an invocation graph analysis 

+ * it generates PatternMatchers, and the corresponding FlattenedPatterns 

+ * and SearchGraph structure.

+ * 

+ * @author Gergely Varro & Akos Horvath

+ */

+public class PatternBuilder {

+    private final Logger logger;

+    private final IModelManager manager;

+    private final ITermHandler termHandler;

+    

+    public PatternBuilder(Logger logger, IModelManager manager, ITermHandler termHandler) {

+        this.logger = logger;

+        this.manager = manager;

+        this.termHandler = termHandler;

+    }

+    

+    public IPatternMatcher construct(GTPattern pattern) 

+        throws PatternMatcherCompileTimeException {

+        return new PatternMatcher(pattern, logger, manager, termHandler);
+        // TODO gervarro: call graph analysis may be integrated into the parser
+        
+        //Use hacked pattern matcher with extreme caution: Can only be used if there are no containment constraints on the input parameters
+        // and the patterns is not recursively matched. Additionally it cannot be used with the Hybrid approach!
+        //return new HackedPatternMatcher(pattern, logger, manager, termHandler);

+    }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/core/PatternMatchers.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/core/PatternMatchers.java
new file mode 100644
index 0000000..6473c29
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/core/PatternMatchers.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.core;

+

+import java.util.Hashtable;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IPatternMatcher;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+

+

+

+public class PatternMatchers extends Hashtable<GTPattern, IPatternMatcher> {

+

+	/**

+	 * Stores the pattern matchers previously created

+	 * 

+	 * @author Akos Horvath and Gergely Varro

+	 */

+	private static final long serialVersionUID = 1L;

+	private static PatternMatchers  _instance=new PatternMatchers();

+	public static PatternMatchers  getInstance()

+	{

+		return _instance;

+	}

+	

+	private PatternMatchers() {

+		super();

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/EdgeType.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/EdgeType.java
new file mode 100644
index 0000000..744d3cf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/EdgeType.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal;

+

+/**

+ * The enumeration of the possible type of edges. These 

+ * edge types are used in the search graph and search plans.

+ */

+public enum EdgeType {

+	SUPERTYPEOF,

+	INSTANCEOF,

+	IN,

+    BELOW,

+	SOURCE,

+	TARGET,

+    NACCHECK,

+    PATTERN_CALL_PARAMETER,
+    PATTERN_CALL_STORAGE,

+    VARIABLE_ASSIGNMENT,
+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/HackedPatternMatcher.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/HackedPatternMatcher.java
new file mode 100644
index 0000000..17ad6a3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/HackedPatternMatcher.java
@@ -0,0 +1,231 @@
+/*******************************************************************************
+ * Copyright (c) 2009-2010, Akos horvath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Akos Horvath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal;

+

+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.ExecutionMode;
+import org.eclipse.viatra2.gtasm.patternmatcher.IMatching;
+import org.eclipse.viatra2.gtasm.patternmatcher.ParameterMode;
+import org.eclipse.viatra2.gtasm.patternmatcher.PatternCallSignature;
+import org.eclipse.viatra2.gtasm.patternmatcher.Scope;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherCompileTimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.FlattenedPattern;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.DummyOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.SearchPlanOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.ITermHandler;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ContainmentMode;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.logger.Logger;
+

+

+public class HackedPatternMatcher extends PatternMatcher {

+

+	FlattenedPattern[] flattenedPatterns = null;

+	

+	public HackedPatternMatcher(GTPattern pattern, Logger logger,

+			IModelManager manager, ITermHandler termHandler)

+			throws PatternMatcherCompileTimeException {

+		super(pattern, logger, manager, termHandler);

+		flattenedPatterns = root.getFlattenedPatterns(); 

+	}

+

+	@Override

+	//TODO: Can only be used when there is no Recursive call!!

+	public IMatching match(Object[] inputMapping,

+			PatternCallSignature[] signature) throws ViatraTransformationException {

+

+		for(FlattenedPattern pattern: flattenedPatterns){

+				IMatching frame = internalMatch(inputMapping, signature, pattern);

+				if(frame != null)

+					{// Checking IN/BELOW constraints on the result 

+					//TODO: Can be possible that it does not fulfil the Containment Constraints on the input parameters --> Use with caution with containment constraints! 

+					boolean constraintsFulfilled = true;

+		            for (int i = 0; constraintsFulfilled && i < signature.length; i++)

+		            	{

+		                    if (signature[i].getParameterMode() == ParameterMode.OUTPUT) { 

+		                        Scope s = signature[i].getParameterScope();

+		                        IEntity container = (IEntity) s.getParent();

+		                        Object obj = frame.lookup(i);

+		                        if (obj instanceof IModelElement) {

+		                            IModelElement me = (IModelElement) obj;

+		                            if (s.getContainmentMode() == ContainmentMode.IN) {

+		                                constraintsFulfilled = me.getNamespace().compareTo(container) == 0; 

+		                            } else if (s.getContainmentMode() == ContainmentMode.BELOW) {

+		                                constraintsFulfilled = me.isBelowNamespace(container);

+		                            }

+		                        } else {

+		                            // TODO Akos Horvath: what happens, if a formal parameter is a String, integer and it has a container constraint?

+		                        }

+		                    }

+		            	}

+		            if (constraintsFulfilled) 

+		            	return frame;

+					}

+			}

+		return null;

+	}

+	

+	//TODO: truehybrid approach does not work with the current version of the hackedpatternmacther-> do not know exactly why

+	// but does not generate the IncrementalRemote goal while it generates the incrementalpatternNode.

+	

+	private IMatching internalMatch(Object[] inputMapping,

+			PatternCallSignature[] signature,

+			FlattenedPattern flattenedPattern) throws ViatraTransformationException {

+		  for (int i = 0; i < signature.length; i++) {

+	            if (signature[i].getExecutionMode() == ExecutionMode.MULTIPLE_RESULTS) {

+					logger.debug("The method match(Object[], PatternCallSignature[] has been invoked in MULTIPLE_RESULTS execution mode.");

+					return null;

+	            }

+	        }

+	    	Integer[] quantificationOrder = new Integer[signature.length];

+	    	for (int i = 0; i < quantificationOrder.length; i++) {

+				quantificationOrder[i] = i;

+			}

+	    	

+    		// Key generator preparation based on the variables with forall quantifier

+            if (signature.length != quantificationOrder.length) {

+	            	 String[] context = {root.getPattern().getName()};

+	             	throw new PatternMatcherRuntimeException(

+	             			PatternMatcherErrorStrings.INTERNAL_QUANTIFICATION_AND_SIGNATURES_PARAMETER_MISMATCH

+	             			,context

+	             			,root.getPattern());

+	             	

+	            }

+	            int multipleUpperBound = 0;

+	            Vector<Integer> vector = new Vector<Integer>();

+	            for (int i = 0; i < quantificationOrder.length; i++) {

+	                Integer index = quantificationOrder[i];

+	                if (index < signature.length) {

+	                    if (signature[index].getExecutionMode() == ExecutionMode.MULTIPLE_RESULTS) {

+	                        if (i <= multipleUpperBound) {

+	                            vector.add(index);

+	                            multipleUpperBound++;

+	                        } else {

+	                        	 String[] context = {root.getPattern().getName()};

+	                         	throw new PatternMatcherRuntimeException(

+	                         			PatternMatcherErrorStrings.INTERNAL_QUANTIFICATION_ORDER

+	                         			,context

+	                         			,root.getPattern());

+	                        }

+	                    }

+	                } else {

+	                	 String[] context = {root.getPattern().getName()};

+                     	throw new PatternMatcherRuntimeException(

+                     			PatternMatcherErrorStrings.INTERNAL_QUANTIFICATION_ORDER

+                     			,context

+                     			,root.getPattern());

+	                }

+	            }

+	            final Integer[] keys = new Integer[vector.size()];

+	            vector.toArray(keys); 

+/*	            IKeyGenerator<MatchingKey, MatchingFrame> resultKeyGenerator = 

+	                new IKeyGenerator<MatchingKey, MatchingFrame>() {

+

+	                public MatchingKey calculateKey(MatchingFrame value) {

+	                    Object[] matchingKey = new Object[keys.length];

+	                    for (int i = 0; i < keys.length; i++) {

+	                        matchingKey[i] = value.getValue(keys[i]);

+	                    }

+	                    return new MatchingKey(matchingKey);

+	                }

+

+	    			public int size() {

+	    				return keys.length;

+	    			}

+	            };*/

+	            

+//	            // Matching table initalization

+	            

+	            MatchingFrame frame = new MatchingFrame(flattenedPattern);

+	            

+	        	// Initialization (IN/BELOW constraint processing)

+	            final Boolean[] adornment = new Boolean[signature.length]; 

+	    		Vector<Object> vec = new Vector<Object>();

+	            for (int i = 0; i < signature.length; i++) {

+	                if (signature[i].getParameterMode() == ParameterMode.INPUT) {

+	                    adornment[i] = true;

+	                    vec.add(inputMapping[i]);

+	                    frame.setValue(i, inputMapping[i]);

+	                } else {

+	                    adornment[i] = false;

+	                }

+	            }            

+	            

+	    		int strongestConstraint = 0;

+	            if (vec.size() == 0) {

+	                int largestDistance = 0;

+	                boolean hasInConstraint = false;

+	                for (int i = 0; i < signature.length; i++) {

+	                    Scope s = signature[i].getParameterScope();

+	                    int distance = 0;

+	                    IEntity parent = (IEntity) s.getParent();

+	                    for (distance = 0; !parent.equals(manager.getRoot()); distance++) {

+	                        parent = parent.getParent();

+	                    }

+

+	                    if (s.getContainmentMode() == ContainmentMode.IN) {

+	                        if (hasInConstraint && distance > largestDistance) {

+	                            largestDistance = distance;

+	                            strongestConstraint = i;

+	                        } else if (!hasInConstraint) {

+	                            hasInConstraint = true;

+	                            largestDistance = distance;

+	                            strongestConstraint = i;

+	                        }

+	                    } else if (s.getContainmentMode() == ContainmentMode.BELOW) {

+	                        if (!hasInConstraint && distance > largestDistance) {

+	                            largestDistance = distance;

+	                            strongestConstraint = i;

+	                        }

+	                    }

+	                }

+	                adornment[strongestConstraint] = true;

+	            }

+

+	            SearchPlanOperation[] t = new SearchPlanOperation[1];

+	            List<SearchPlanOperation> operations =  flattenedPattern.generateSearchPlan(adornment, manager);

+	            operations.add(new DummyOperation()); //some funky legacy code from Gergely Varro to be able to separate searchplan along recursive code

+	            

+	            SearchPlan searchPlan = new SearchPlan(operations.toArray(t)); 

+	            

+	            // no input parameter, have to create an iterator of possible choices

+	            if (vec.size() == 0) {

+	            	Scope s = signature[strongestConstraint].getParameterScope();

+	                IEntity parent = (IEntity) s.getParent();

+	            	Iterator<IModelElement> i = (s.getContainmentMode() == ContainmentMode.IN 

+	            			? parent.getElementsInNamespace().iterator()

+	            			: parent.getAllElementsInNamespace().iterator());

+	            	for (; i.hasNext();) {

+	            		MatchingFrame framenoBound = new MatchingFrame(flattenedPattern);

+	            		framenoBound.setValue(strongestConstraint, i.next());

+	            		if(searchPlan.execute(framenoBound))

+	    	           		return framenoBound;

+					}

+	            }

+	            else //there is a bound input parameter*/

+	           	if(searchPlan.execute(frame))

+	           		return frame;

+	           	else

+	           		return null;

+	            

+	            

+			return null;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/IKeyGenerator.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/IKeyGenerator.java
new file mode 100644
index 0000000..4a94ef0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/IKeyGenerator.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal;

+

+public interface IKeyGenerator<KeyType, ValueType> {

+    public KeyType calculateKey(ValueType value);

+    public int size();

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/MatchingFrame.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/MatchingFrame.java
new file mode 100644
index 0000000..a03221c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/MatchingFrame.java
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.IMatching;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.FlattenedPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+

+/**

+ * MatchingFrame represents an array that contains the actual

+ * mappings of variables to constants. A MatchingFrame maintains

+ * a reference to a corresponding FlattenedPattern.

+ * 

+ * The following mappings are used by the interpreted engine:

+ * VariableType => PatternVariable

+ * ValueType    => AnyModelElement

+ */

+public class MatchingFrame implements Cloneable,IMatching {

+

+    /**

+     * An internal, array-based representation of a matching.

+     * Arrays are indexed by integers and contain values showing

+     * the actual values.

+     * 

+     * If a MatchingFrame represents a matching for a recursive

+     * FlattenedPattern, then parent points to the 

+     * matching frame which is extended to get this matching. 

+	 */

+	private MatchingFrame parent;

+

+	/**

+     * The pattern variant for which this MatchingFrame is a

+     * matching. 

+	 */

+	private FlattenedPattern pattern;

+

+	/**

+     * The array that physically holds the values.

+	 */

+    private Object[] frame;

+

+    public MatchingFrame(FlattenedPattern pattern) {

+        this.parent = null;

+        this.pattern = pattern;

+        // this.frame = (IModelElement[]) new Object[pattern.getFrameSize()];

+        this.frame = new Object[pattern.getFrameSize()];

+    }

+    

+    MatchingFrame(FlattenedPattern pattern, MatchingFrame parent) {

+        this.parent = parent;

+        this.pattern = pattern;

+        this.frame = new Object[pattern.getFrameSize()];

+    }

+

+    /**

+     * 

+     * @param position

+     * @return

+     */

+	public Object getValue(Integer position) {

+		// TODO gervarro: return (position < frame.length ? frame[position] : pattern.get);

+        return frame[position];

+	}

+    

+    /**

+     * 

+     * @param position

+     * @param value

+     */

+    public void setValue(Integer position, Object value) {

+        frame[position] = value;

+    }

+    

+    public boolean testAndSetValue(Integer position, Object value) {

+        if (frame[position] == null) {

+            frame[position] = value;

+            return true;

+        } else {

+            return frame[position].equals(value);

+        }

+    }

+    

+    /**

+     * @return the parent

+     */

+    public MatchingFrame getParent() {

+        return parent;

+    }

+

+    /**

+     * @param parent the parent to set

+     */

+    public void setParent(MatchingFrame parent) {

+        this.parent = parent;

+    }

+

+    /**

+     * @return the pattern

+     */

+    public FlattenedPattern getPattern() {

+        return pattern;

+    }

+

+    /**

+     * @param pattern the pattern to set

+     */

+    public void setPattern(FlattenedPattern pattern) {

+        this.pattern = pattern;

+    }

+    

+    public Object clone() {

+        MatchingFrame clone = new MatchingFrame(pattern, parent);

+        clone.frame = frame.clone();

+        return clone;

+    }

+    

+    public String toString() {

+    	StringBuffer buf = new StringBuffer();

+    	for (int i = 0; i < frame.length; i++) {

+			buf.append("frame[" + i + "]\t" + frame[i].toString() + "\n");

+		}

+    	return buf.toString();

+    }

+

+    public Object lookup(Variable variable) {

+        return null;

+    }

+

+    public Object lookup(int position) {

+        if (position >= 0 && position < frame.length) {

+            return frame[position];

+        } else {

+            // TODO gervarro: Exception or return null;

+            return null;

+        }

+    }

+    

+    public int size() {

+    	return frame.length;

+    }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/MatchingKey.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/MatchingKey.java
new file mode 100644
index 0000000..cc0a800
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/MatchingKey.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal;

+

+/**

+ * VariableType will be mapped to PatternVariable in the interpreted

+ * engine.

+ **/

+public class MatchingKey {

+    Object[] keys;

+    

+    public MatchingKey(Object[] keys) {

+        this.keys = keys;

+    }

+    

+    public boolean equals(Object other) {

+        if (other != null && other instanceof MatchingKey) {

+            MatchingKey otherKey = (MatchingKey) other;

+            for (int i = 0; i < keys.length; i++) {

+                if (! keys[i].equals(otherKey.keys[i])) {

+                    return false;

+                }

+            }

+            return true;

+        } else {

+            return false;

+        }

+    }

+    

+    public int hashCode() {

+        return toString().hashCode();

+    }

+    

+    public String toString() {

+        StringBuffer key = new StringBuffer();

+        for (int i = 0; i < keys.length; i++) {

+            key.append("_" + keys[i].toString()); 

+        }

+        return key.toString();

+    }

+    

+    public Object[] toArray() {

+    	return keys;

+    }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/MatchingTable.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/MatchingTable.java
new file mode 100644
index 0000000..a8dad76
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/MatchingTable.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal;

+

+import java.util.AbstractCollection;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.NoSuchElementException;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.IMatching;
+

+

+

+public class MatchingTable extends AbstractCollection<IMatching> {

+    private Map<MatchingKey,Collection<MatchingFrame>> matchings;

+    

+    private class MatchingIterator implements Iterator<IMatching> {

+        Iterator<Entry<MatchingKey, Collection<MatchingFrame>>> iterator;

+        

+        private MatchingIterator() {

+            iterator = matchings.entrySet().iterator();

+        }

+

+        public boolean hasNext() {

+            return iterator.hasNext();

+        }

+

+        public IMatching next() {

+            if (hasNext()) {

+                Iterator<MatchingFrame> frameIterator = iterator.next().getValue().iterator();

+                if (frameIterator.hasNext()) {

+                    return frameIterator.next();

+                } else {

+                    throw new NoSuchElementException();

+                }

+            } else {

+                throw new NoSuchElementException();

+            }

+        }

+

+        public void remove() {

+            throw new UnsupportedOperationException();

+        }

+    }

+

+    MatchingTable() {

+        matchings = new HashMap<MatchingKey, Collection<MatchingFrame>>();

+    }

+    

+    @Override

+    public Iterator<IMatching> iterator() {

+        return new MatchingIterator();

+    }

+

+    @Override

+    public int size() {

+        return matchings.keySet().size();

+    }

+

+    void put(MatchingKey key, MatchingFrame value) {

+        Collection<MatchingFrame> coll = matchings.get(key);

+        if (coll == null) {

+            coll = new HashSet<MatchingFrame>();

+        }

+        coll.add(value);

+        matchings.put(key, coll);

+    }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/PatternMatcher.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/PatternMatcher.java
new file mode 100644
index 0000000..3bb7e6c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/PatternMatcher.java
@@ -0,0 +1,470 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal;

+

+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Random;
+import java.util.Vector;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.ExecutionMode;
+import org.eclipse.viatra2.gtasm.patternmatcher.IMatching;
+import org.eclipse.viatra2.gtasm.patternmatcher.ParameterMode;
+import org.eclipse.viatra2.gtasm.patternmatcher.PatternCallSignature;
+import org.eclipse.viatra2.gtasm.patternmatcher.Scope;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherCompileTimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.PatternNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg.MagicSet;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg.RemoteGoal;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.ITermHandler;
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IPatternMatcher;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ContainmentMode;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.logger.Logger;
+

+

+

+/**

+ * PatternMatcher is the (executable) run-time equivalent

+ * of a GTPattern.

+ *

+ * The whole pattern matching engine is not represented as a single object, but

+ * the container ASM interpreter module should consist of a set of

+ * PatternMatcher objects.

+ *

+ * PatternMatcher objects (including all its subordinate data structures)

+ * are generated by PatternBuilders.

+ *

+ * @author Gergely Varro, Akos Horvath

+ */

+public class PatternMatcher implements IPatternMatcher {

+    protected Logger logger;

+    protected IModelManager manager;

+    protected ITermHandler termHandler;

+	protected PatternNode root;

+    protected Map<String,Map<String,RemoteGoal>> rggMapping;

+
+    protected Random random = null;
+
+    public PatternMatcher( Logger logger, IModelManager manager, ITermHandler termHandler)
+			throws PatternMatcherCompileTimeException {
+    	this.logger = logger;
+		this.manager = manager;
+		this.termHandler = termHandler;
+		}
+

+    public PatternMatcher(GTPattern pattern, Logger logger, IModelManager manager, ITermHandler termHandler)

+        	throws PatternMatcherCompileTimeException {

+        this.logger = logger;

+        this.manager = manager;

+        this.termHandler = termHandler;

+        this.root = new PatternNode(this, pattern);

+        this.rggMapping = new HashMap<String, Map<String,RemoteGoal>>();

+    }

+

+    public boolean match(Object[] inputMapping) throws ViatraTransformationException {

+        PatternCallSignature[] signature =

+            new PatternCallSignature[inputMapping.length];

+        for (int i = 0; i < inputMapping.length; i++) {

+            signature[i] = new PatternCallSignature();

+            signature[i].setExecutionMode(ExecutionMode.SINGLE_RESULT);

+

+            if (inputMapping[i] == null || inputMapping[i].equals(ValueKind.UNDEF_LITERAL)) {

+                signature[i].setParameterMode(ParameterMode.OUTPUT);

+            } else {

+                signature[i].setParameterMode(ParameterMode.INPUT);

+            }

+            Scope scope = new Scope(Scope.DEFAULT_MODE, manager.getRoot());

+            signature[i].setParameterScope(scope);

+        }

+        return (match(inputMapping, signature) != null);

+    }

+

+    public IMatching match(Object[] inputMapping,

+    		PatternCallSignature[] signature) throws ViatraTransformationException {

+        for (int i = 0; i < signature.length; i++) {

+            if (signature[i].getExecutionMode() == ExecutionMode.MULTIPLE_RESULTS) {

+            	String[] context = {root.getPattern().getName()};
+				throw new PatternMatcherRuntimeException(
+						PatternMatcherErrorStrings.INTERNAL_PATTERNCALL_CHOOSE_WITH_MULTIPLERESULT
+								,context
+								,root.getPattern());
+            	//logger.warning("The method match(Object[], PatternCallSignature[] has been invoked in MULTIPLE_RESULTS execution mode.");

+				//return null;

+            }

+        }

+    	Integer[] quantificationOrder = new Integer[signature.length];

+    	for (int i = 0; i < quantificationOrder.length; i++) {

+			quantificationOrder[i] = i;

+		}

+    	Collection<IMatching> solutions =

+    		matchAll(inputMapping, signature, quantificationOrder);

+    	for (IMatching matching : solutions) {

+			return matching;

+		}

+    	return null;

+    }

+

+ /*   public MatchingFrame matchFuture(Object[] inputMapping,

+            PatternCallSignature[] signature) {

+        try {

+        	// Initialization (IN/BELOW constraint processing)

+            final Boolean[] adornment = new Boolean[signature.length];

+    		Vector<Object> vec = new Vector<Object>();

+    		Vector<Integer> freeVariables = new Vector<Integer>();

+    		int strongestConstraint = 0;

+    		int smallestWeight = 0;

+    		Scope s = signature[0].getParameterScope();

+    		if (s.getContainmentMode() == ContainmentMode.IN) {

+    			smallestWeight = ((IEntity) s.getParent()).getContents().size();

+    		} else if (s.getContainmentMode() == ContainmentMode.BELOW) {

+    			smallestWeight = ((IEntity) s.getParent()).getAllComponents().size();

+    		}

+

+            for (int i = 0; i < signature.length; i++) {

+            	s = signature[i].getParameterScope();

+            	if (signature[i].getParameterMode() == ParameterMode.INPUT) {

+            		adornment[i] = true;

+            		vec.add(inputMapping[i]);

+            		if (s.getContainmentMode() == ContainmentMode.IN &&

+            				!((IEntity) s.getParent()).getContents().contains(inputMapping[i]) ||

+            				s.getContainmentMode() == ContainmentMode.BELOW &&

+            				!((IEntity) s.getParent()).getAllComponents().contains(inputMapping[i])) {

+            			logger.warning(FAILING_CONTAINMENT_CONSTRAINT);

+            			return null;

+            		}

+            	} else {

+            		adornment[i] = false;

+            		freeVariables.add(i);

+            	}

+    			if (s.getContainmentMode() == ContainmentMode.IN) {

+    	            if (smallestWeight > ((IEntity) s.getParent()).getContents().size()) {

+    	            	smallestWeight = ((IEntity) s.getParent()).getContents().size();

+    	            	strongestConstraint = i;

+    	            }

+    			} else if (s.getContainmentMode() == ContainmentMode.BELOW) {

+    	            if (smallestWeight > ((IEntity) s.getParent()).getAllComponents().size()) {

+        	            smallestWeight = ((IEntity) s.getParent()).getAllComponents().size();

+        	            strongestConstraint = i;

+    	            }

+    			}

+            }

+            adornment[strongestConstraint] = (freeVariables.size() == signature.length

+            		? true : adornment[strongestConstraint]);

+

+            // Preparing rule/goal graphs

+            Map<String, RemoteGoal> rggRoots = new HashMap<String, RemoteGoal>();

+            RemoteGoal main = root.buildRuleGoalGraph(adornment,rggRoots);

+

+            // Magic set initialization

+            if (freeVariables.size() == signature.length) {

+            	s = signature[strongestConstraint].getParameterScope();

+            	Iterator<IModelElement> i = (s.getContainmentMode() == ContainmentMode.IN

+            			? ((IEntity) s.getParent()).getContents().iterator()

+            					: ((IEntity) s.getParent()).getAllComponents().iterator());

+            	for (; i.hasNext();) {

+    				Object[] input = new Object[1];

+    				input[0] = i.next();

+    				main.getMagicSet().addArray(new MatchingKey(input));

+    			}

+            } else {

+            	Object[] input = new Object[vec.size()];

+            	vec.toArray(input);

+            	main.getMagicSet().addArray(new MatchingKey(input));

+            }

+

+            // Initial rule/goal graph synchronization

+            boolean isModified = false;

+            for (RemoteGoal goal : rggRoots.values()) {

+            	isModified = isModified || goal.synchronize();

+            }

+

+            // Pattern matching

+            /*

+            while (isModified) {

+            	isModified = false;

+            	// Calculation phase

+            	for (MatchingFrame frame = null; (frame = main.match(signature, freeVariables)) != null; ) {

+            		return frame;

+            	}

+            	for (RemoteGoal goal : rggRoots.values()) {

+            		if (!goal.equals(main)) {

+            			goal.matchAll();

+            		}

+            	}

+            	// Synchronization phase

+            	for (RemoteGoal goal : rggRoots.values()) {

+            		isModified = (goal.synchronize() ? true : isModified);

+				}

+            }

+

+        } catch (PatternMatcherRuntimeException e) {}

+        return null;

+    }*/

+

+    public Collection<IMatching> matchAll(Object[] inputMapping,

+            PatternCallSignature[] signature,

+            Integer[] quantificationOrder) throws ViatraTransformationException {

+        try {

+        	// Key generator preparation based on the variables with forall quantifier

+            if (signature.length != quantificationOrder.length)
+            	{

+                String[] context = {root.getPattern().getName()};
+            	throw new PatternMatcherRuntimeException(
+            			PatternMatcherErrorStrings.INTERNAL_QUANTIFICATION_AND_SIGNATURES_PARAMETER_MISMATCH
+            			,context
+            			,root.getPattern());

+            	}

+            int multipleUpperBound = 0;

+            Vector<Integer> vector = new Vector<Integer>();

+            for (int i = 0; i < quantificationOrder.length; i++) {

+                Integer index = quantificationOrder[i];

+                if (index < signature.length) {

+                    if (signature[index].getExecutionMode() == ExecutionMode.MULTIPLE_RESULTS) {

+                        if (i <= multipleUpperBound) {

+                            vector.add(index);

+                            multipleUpperBound++;

+                        } else {

+                            String[] context = {root.getPattern().getName()};
+                        	throw new PatternMatcherRuntimeException(
+                        			PatternMatcherErrorStrings.INTERNAL_QUANTIFICATION_ORDER
+                        			,context
+                        			,root.getPattern());

+                        }

+                    }

+                } else {

+                	 String[] context = {root.getPattern().getName()};
+                 	throw new PatternMatcherRuntimeException(
+                 			PatternMatcherErrorStrings.INTERNAL_QUANTIFICATION_ORDER
+                 			,context
+                 			,root.getPattern());

+                }

+            }

+            final Integer[] keys = new Integer[vector.size()];

+            vector.toArray(keys);

+            IKeyGenerator<MatchingKey, MatchingFrame> resultKeyGenerator =

+                new IKeyGenerator<MatchingKey, MatchingFrame>() {

+

+                public MatchingKey calculateKey(MatchingFrame value) {

+                    Object[] matchingKey = new Object[keys.length];

+                    for (int i = 0; i < keys.length; i++) {

+                        matchingKey[i] = value.getValue(keys[i]);

+                    }

+                    return new MatchingKey(matchingKey);

+                }

+

+    			public int size() {

+    				return keys.length;

+    			}

+            };

+

+            // Matching table initialization

+            MatchingTable result = new MatchingTable();

+            if (signature.length == 0) {

+            	return result;

+            }

+

+        	// Initialization (IN/BELOW constraint processing)

+            final Boolean[] adornment = new Boolean[signature.length];

+    		Vector<Object> vec = new Vector<Object>();

+            for (int i = 0; i < signature.length; i++) {

+                if (signature[i].getParameterMode() == ParameterMode.INPUT) {

+                    adornment[i] = true;

+                    vec.add(inputMapping[i]);

+                } else {

+                    adornment[i] = false;

+                }

+            }

+

+    		int strongestConstraint = 0;

+            if (vec.size() == 0) {

+                int largestDistance = 0;

+                boolean hasInConstraint = false;

+                for (int i = 0; i < signature.length; i++) {

+                    Scope s = signature[i].getParameterScope();

+                    int distance = 0;

+                    IEntity parent = (IEntity) s.getParent();

+                    for (distance = 0; !parent.equals(manager.getRoot()); distance++) {

+                        parent = parent.getParent();

+                    }

+

+                    if (s.getContainmentMode() == ContainmentMode.IN) {

+                        if (hasInConstraint && distance > largestDistance) {

+                            largestDistance = distance;

+                            strongestConstraint = i;

+                        } else if (!hasInConstraint) {

+                            hasInConstraint = true;

+                            largestDistance = distance;

+                            strongestConstraint = i;

+                        }

+                    } else if (s.getContainmentMode() == ContainmentMode.BELOW) {

+                        if (!hasInConstraint && distance > largestDistance) {

+                            largestDistance = distance;

+                            strongestConstraint = i;

+                        }

+                    }

+                }

+                adornment[strongestConstraint] = true;

+            }

+

+            // Preparing rule/goal graphs

+            String adornmentString = Arrays.deepToString(adornment);

+            Map<String, RemoteGoal> rggRoots = rggMapping.get(adornmentString);

+            if (rggRoots == null) {

+                rggRoots = new HashMap<String, RemoteGoal>();

+                root.buildRuleGoalGraph(adornment,rggRoots);

+                rggMapping.put(adornmentString, rggRoots);

+            }

+            RemoteGoal main = rggRoots.get(RemoteGoal.generateID(root, adornment));

+

+            // Magic set initialization

+            if (vec.size() == 0) {

+                MagicSet ms = main.getMagicSet();

+            	Scope s = signature[strongestConstraint].getParameterScope();

+                IEntity parent = (IEntity) s.getParent();

+            	Iterator<IModelElement> i = (s.getContainmentMode() == ContainmentMode.IN

+            			? parent.getElementsInNamespace().iterator()

+            			: parent.getAllElementsInNamespace().iterator());

+            	for (; i.hasNext();) {

+					Object[] input = new Object[1];

+					input[0] = i.next();

+					ms.addArray(new MatchingKey(input));

+				}

+            } else {

+            	Object[] input = new Object[vec.size()];

+            	vec.toArray(input);

+            	main.getMagicSet().addArray(new MatchingKey(input));

+            }

+

+            // Initial rule/goal graph synchronization

+            boolean isModified = false;

+            for (RemoteGoal goal : rggRoots.values()) {

+            	isModified = (goal.synchronize() ? true :  isModified);

+            }

+

+            // Pattern matching

+            while (isModified) {

+            	isModified = false;

+            	// Calculation phase

+            	for (RemoteGoal goal : rggRoots.values()) {

+            		goal.matchAll();

+            	}

+            	// Synchronization phase

+            	for (RemoteGoal goal : rggRoots.values()) {

+            		isModified = (goal.synchronize() ? true : isModified);

+				}

+            }

+
+            //for debug purposes
+           //System.out.println("**********Final DEBUG*********");
+            //for (RemoteGoal goal : rggRoots.values()) {
+            //    goal.debug();
+            //}
+
+

+            // Postprocessing (filling the matching table)

+            for (MatchingFrame frame : main) {

+            	boolean constraintsFulfilled = true;

+            	// Checking IN/BELOW constraints on the result

+            	for (int i = 0; constraintsFulfilled && i < signature.length; i++) {

+                    if (signature[i].getParameterMode() == ParameterMode.OUTPUT) {

+                        Scope s = signature[i].getParameterScope();

+                        IEntity container = (IEntity) s.getParent();

+                        Object obj = frame.getValue(i);

+                        if (obj instanceof IModelElement) {

+                            IModelElement me = (IModelElement) obj;

+                            if (s.getContainmentMode() == ContainmentMode.IN) {

+                                constraintsFulfilled = me.getNamespace().compareTo(container) == 0;

+                            } else if (s.getContainmentMode() == ContainmentMode.BELOW) {

+                                constraintsFulfilled = me.isBelowNamespace(container);

+                            }

+                        } else {

+                            // TODO gervarro: what happens, if a formal parameter is a String, integer and it has a container constraint?

+                        }

+                    }

+            	}

+            	if (constraintsFulfilled) {

+                 	// If all constraints are fulfilled, add the frame to the matching table

+            		result.put(resultKeyGenerator.calculateKey(frame), frame);

+            	}

+			}

+            // Clean up for all runtime data structures (except for the result)

+            for (RemoteGoal rg : rggRoots.values()) {

+                rg.init();

+            }

+            return result;

+        } catch (PatternMatcherRuntimeException e) {

+        	throw e.addNewStackElement(root.getPattern());

+        }

+    }

+	public IMatching matchRandomly(Object[] inputMapping,
+			PatternCallSignature[] signature) throws ViatraTransformationException {
+		if(random == null){
+			random = new Random();
+		}
+		// executionMode and quantification order created to mimic forall rule in matchAll
+		Integer[] quantificationOrder = new Integer[inputMapping.length];
+		int quantificationOrderMultipleIndex = 0;
+		int quantificationOrderNonMultipleIndex = signature.length-1;
+		for(int j = 0; j < signature.length; j++)
+			{
+			// output parameters are in the front of the array
+			if(signature[j].getParameterMode() == ParameterMode.OUTPUT)
+				{signature[j].setExecutionMode(ExecutionMode.MULTIPLE_RESULTS);
+				 quantificationOrder[quantificationOrderMultipleIndex] = j;
+				 quantificationOrderMultipleIndex++;
+				}
+			// other parameters in the back
+			else
+				{
+				 quantificationOrder[quantificationOrderNonMultipleIndex] = j;
+				 quantificationOrderNonMultipleIndex--;
+				}
+			}
+
+		Collection<IMatching> allMatches = matchAll(inputMapping, signature, quantificationOrder);
+		if (allMatches == null || allMatches.isEmpty()) return null;
+		// change from Math.random()
+		else return (IMatching) allMatches.toArray()[random.nextInt(allMatches.size())];
+		// TODO suboptimal
+	}
+

+    /**

+     *

+     * @return the logger

+     */

+    public Logger getLogger() {

+        return logger;

+    }

+

+    /**

+     * @return the termHandler

+     */

+    public ITermHandler getTermHandler() {

+        return termHandler;

+    }

+

+    public IModelManager getModelManager() {

+    	return manager;

+    }
+
+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/PatternMatcherErrorStrings.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/PatternMatcherErrorStrings.java
new file mode 100644
index 0000000..3a9a125
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/PatternMatcherErrorStrings.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal;

+

+public class PatternMatcherErrorStrings {

+	
+	
+	 public static final String INTERNAL_EDGETYPE_NOT_SUPPORTED  = "[INTERNAL ERROR] The {1} SearchGraphEdge type of the {2} element is not supported by any current SearchPlanOperation.";
+	 public static final String INTERNAL_PATTERNCALLNODE_EXCEPTION = "[INTERNAL_ERROR] The call node edge of the {1} Pattern call is not checked during the search plan generation.";
+	 public static final String INTERNAL_PATTERNCALLNODE_WRONGPARAMETER_ORDER = "[INTERNAl ERROR] The pattern call edge  of the {1} call is traversed (a tree edge) before its pattern call node was traversed.";
+	 public static final String INTERNAL_PATTERNCALLNODE_EDGE_EXCEPTION = "[INTERNAL ERROR] The tree edge of the {1} unbounded input node is not its input edge to the {2} pattern call." ;
+	 public static final String INTERNAL_PATTERNCALLNODE_EDGE_TRAVERSAL_EXCEPTION = "[INTERNAL ERROR] The {1} pattern call edge is a tree edge before its corresponding {2} pattern call node was traversed.";
+	 public static final String INTERNAL_INCREMENTALLY_MATCED_PATTERN_HAS_NO_PATTERNMATCHER = "[INTERNAL ERROR] The 1{} incrementally matched pattern does not have a valid pattern matcher: {2}";
+	 public static final String INTERNAL_FORMAL_AND_ACTUAL_PARAMETER_MISMATCH = "[INTERNAL ERROR] The number of formal and actual parameters for the {1} pattern call do not match.";
+	 public static final String INTERNAL_QUANTIFICATION_AND_SIGNATURES_PARAMETER_MISMATCH = "[INTERNAL ERROR] The number of signatures and quantification orders for the {1} pattern call do not match.";
+	 public static final String INTERNAL_QUANTIFICATION_ORDER = "[INETRNAL ERROR] Error in the quantification order of the {1}'s pattern call.";
+	 public static final String INTERNAL_BODYNODE_INJECTIVITYCONSTRAINT_ALREADYUSED = "[INTERNAL ERROR] The {1}. index is already added to the injectivity check set of the {2} pattern body " ;
+	 public static final String INTERNAL_FLATTENED_PATTERN_BUILD = "[INTERNAL ERROR] An error happened during the creation of the Rule GOal GRaph of the {1} pattern.";
+	 public static final String INTERNAL_SEARCHPLAN_INIT_FAILED = "[INTERNAL ERROR] The search plan initaliziation of the {1} GT Patten failed.";
+	 public static final String INTERNAL_INCREMENTAL_PATTERNNODE_ROOT = "[INTERNAL ERROR]: THe {1} incrementally matched pattern (node) is the root of the Rule goal graph (should use incremental pattern matcher instead)";
+     public static final String INTERNAL_PATTERNCALL_ADORNED_INPUT_PARAMS = "[INTERNAL ERROR] An error happened during the evaluation of the adorned input parameters of the {1} pattern";
+     public static final String INTERNAL_PATTERNCALL_CHOOSE_WITH_MULTIPLERESULT = "[INTERNAL ERROR] An error happened during the evaluation of the {1} pattern. It was invoked in a single result mode but its input parameters are marked to be multiple results.";
+     public static final String INTERNAL_ERROR_DANGLING_RELATION_FAILED = "[INTERNAL ERROR] Dangling relation element evaluation failed: {1}";
+     public static final String INTERNAL_EMPTY_VALUE = "[INTERNAL ERROR] The '{1}' element in the {2} operation has an empty value (null)";
+   	 public static final String INTERNAL_ISRECURSIVE_ON_NONROOT = "[INTERNAL ERROR] The '{1}' pattern is monitored for recursive behaviour when it is not a root pattern element";
+     
+     public static final String INTERNAL_SEARCGRAPH_RELATION_TARGET_MISSING = "The target of the '{1}' relation cannot be resolved";
+   	 public static final String INTERNAL_SEARCGRAPH_RELATION_SOURCE_MISSING = "The source '{2}' of the '{1}' relation cannot be resolved";
+   	 public static final String INTERNAL_SEARCGRAPH_RELATIONSHIP_SOURCE_MISSING = "The source '{2}' of the '{1}' relationship cannot be resolved";
+  	 public static final String INTERNAL_SEARCGRAPH_RELATION_MISSING = "The relation '{1}' cannot be resolved";
+
+     public static final String NOT_A_MODELELEMENT_EXTEND = "Type mismatch: {2} did not evaluate to a model element (entity or relation), but to type {3} instead. Developer's note: error occurred during the '{1}' type extend operation.";
+     public static final String NOT_A_MODELELEMENT_CHECK = "Type mismatch: {2} did not evaluate to a model element (entity or relation), but to type {3} instead. Developer's note: error occurred during the '{1}' type check operation.";
+     
+     public static final String INTERNAL_ALLENTITIES = "[INTERNAL ERROR] The '{1}' element is extended through the all entites operation but its corresponding element in the search graph is not conform with this operation";
+	 public static final String INTERNAL_ALLRELATIONS = "[INTERNAL ERROR] The '{1}' element is extended through the all relation operation but its corresponding element in the search graph is not conform with this operation";
+	 
+	 public static final String INTERNAL_OPERATION_NOT_SUPPORTED = "[INTERNAL ERROR] The '{1}' type VPM edge related to the '{2}' element is not supported as a check operation.";
+	 public static final String INTERNAL_OPERATION_NOT_POSSIBLE = "[INTERNAL ERROR] The '{1}' element generates a '{2}' type operation that is not allowed.";
+	 public static final String INTERNAL_OPERATION_NOT_USED = "[INTERNAL ERROR] The operation '{1}' is not used by the current patten matcher";
+     		
+ 	 public static final String NOT_A_MODELELEMENT = "The '{1}' element in the {2} operation is not a ModelElement (Entity or Relation)";
+ 	 
+	 public static final String NO_TERM_IN_NAC_CALLS = "The {1}. input parameter in the {2} NAC call is not a Variable.";
+	 public static final String NO_TERM_IN_PATTERN_CALLS = "The {1}. input parameter in the {2} pattern call is not a Variable."; 
+	 public static final String MULTIBODY_OR_RECURSIVE_PATTERN_ON_RHS = "The pattern on the RHS of the gtRule cannot have alternative pattern bodies or be recursive.";
+	 public static final String CHECK_EXPRESSION_NOT_EVALUATED_TO_A_BOOLEAN = "The Check expression in the {1} pattern did not evaluate to a boolean";
+	 public static final String ILLEGAL_INPUT_PARAMETER = "The {1}. input parameter in the {2} GT pattern call is not a Variable.";
+	 

+	 public static final String NO_TERM_HANDLER = "Term handler has not been specified. Term evaluation will not be executed";

+	 public static final String FAILING_CONTAINMENT_CONSTRAINT = "Input parameter does not fulfill its containment constraint.";
+	 public static final String NAC_CALL_WITH_UNBOUND_PARAMETER = "False invocation of the '{1}' nac pattern. Its input '{2}' parameter is unbound and it is also an output variable for its invoking pattern. Negative patterns cannot output variables ";
+	 public static final String VARIABLE_VARIABLEASSIGMENT_MISSING = "The {1} variable of the assigment cannot be locally resolved. The LS matcher does not support this";
+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/SearchPlan.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/SearchPlan.java
new file mode 100644
index 0000000..812b186
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/SearchPlan.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal;

+

+

+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.SearchPlanOperation;
+import org.eclipse.viatra2.logger.Logger;
+

+/**

+ * A SearchPlan is an unmodifiable array of 

+ * SearchPlanOperations. PatternSignatures are supposed

+ * to be fixed 

+ */

+public class SearchPlan {

+	private SearchPlanOperation[] operations;

+    private int currentOperation;

+	

+	public SearchPlan(SearchPlanOperation[] operations){

+		this.operations = operations;

+        this.currentOperation = -1;

+	}

+    

+    private void init(MatchingFrame frame) 

+        throws PatternMatcherRuntimeException {

+        if (currentOperation == -1) {

+            currentOperation++;

+            operations[currentOperation].preprocess(frame);

+        } else if (currentOperation == operations.length - 1) {

+            currentOperation--;

+        } else {
+        	String[] context = {frame.getPattern().getParent().getPattern().getName()};

+            throw new PatternMatcherRuntimeException(
+            		PatternMatcherErrorStrings.INTERNAL_SEARCHPLAN_INIT_FAILED
+            		,context
+            		,frame.getPattern().getParent().getPattern());

+        }

+    }

+	

+	/**

+     * Calculates the cost of the search plan.

+	 */

+	public double cost() {

+		/* default generated stub */;

+		return 0.0;

+	}

+

+    public boolean execute(MatchingFrame frame) 

+        throws PatternMatcherRuntimeException {

+        int upperBound = operations.length - 1;

+        //try {

+            init(frame);

+            while (currentOperation >= 0 && currentOperation < upperBound) {

+                if (operations[currentOperation].execute(frame)) {

+                    currentOperation++;

+                    operations[currentOperation].preprocess(frame);

+                } else {

+                    operations[currentOperation].postprocess(frame);

+                    currentOperation--;

+                }

+            }

+        //TODO: additional stack trace information can be added if needed at this point (LS search plan execution)
+        //} catch (PatternMatcherRuntimeException e) {

+        //e.addNewStackElement(operations[currentOperation].getErrorfulElement(frame));
+        //    throw e;

+        //}

+        return (currentOperation == upperBound);

+    }

+    

+    public void printDebugInformation(Logger logger) {

+        for (int i = 0; i < operations.length; i++) {

+            logger.debug("[" + i + "]\t" + operations[i].toString());

+        }

+    }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/SearchPlanKey.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/SearchPlanKey.java
new file mode 100644
index 0000000..729e170
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/SearchPlanKey.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.PatternCallSignature;
+import org.eclipse.viatra2.gtasm.patternmatcher.Scope;
+

+public class SearchPlanKey {

+

+    SearchPlanKey(PatternCallSignature[] signature, Scope patternScope) {

+        

+    }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/VPMModelElementType.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/VPMModelElementType.java
new file mode 100644
index 0000000..c05e1cc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/VPMModelElementType.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal;

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public enum VPMModelElementType {

+	

+	ENTITY,

+	RELATION,

+	OPERATION,

+//	MODELELEMENT

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/VariableID.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/VariableID.java
new file mode 100644
index 0000000..58214b7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/VariableID.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal;

+

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+

+public class VariableID implements Comparable {

+	private GTPattern pattern;

+	private Integer uid;

+	private String variable;

+

+    public VariableID(GTPattern pattern, int uid, String variable) {

+		this.pattern = pattern;

+		this.uid = uid;

+		this.variable = variable;

+	}

+	

+	public boolean equals(Object id) {

+        if (id != null && id instanceof VariableID) {

+            VariableID otherID = (VariableID) id;

+            return (pattern.getName().equals(otherID.pattern.getName()) &&

+                    uid == otherID.uid &&

+                    variable.equals(otherID.variable));

+        } else {

+            return false;

+        }

+	}

+    

+	// TODO not a smooth solution

+	public int hashCode() { 

+		  //return 1;

+		  return uid;

+		  // return uid+geVariableName().hashCode;

+		  

+		}

+

+    public int compareTo(Object arg0) {

+        VariableID otherID = (VariableID) arg0;

+        if(equals(arg0))

+            return 0;

+        else

+            if(uid == otherID.uid)

+                return variable.compareTo(otherID.variable);

+            else

+                return (uid < otherID.uid ? -1 : 1);

+    }

+

+	public String toString() {

+		return pattern.getName() + "_" + uid.toString() + "_" + variable;

+	}
+	
+	/** Returns the user friendly (readable) representation of the search node's name
+	 * @return
+	 */
+	public String getFancyName() {
+		return "'"+variable + " variable of pattern "+pattern.getName()+"'";
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/algorithms/ChuiEdmonds.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/algorithms/ChuiEdmonds.java
new file mode 100644
index 0000000..99c6489
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/algorithms/ChuiEdmonds.java
@@ -0,0 +1,336 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.algorithms;

+

+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.NoSuchElementException;
+import java.util.TreeMap;
+
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.EdgeTypeinAlgorithm;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.PseudoSearchGraphNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphNodeComparator;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.VariableSearchGraphNode;
+

+

+/**

+ * Implements a variant of the Chu-Edmonds algorithm to calculate a (possibly sub-) optimal search plan

+ * @author Akos Horvath

+ *

+ */

+public class ChuiEdmonds {

+//	private IModelManager manager;

+	int min, finalizedVertexId=-1;

+	ArrayList<SearchGraphNode> sSet = new ArrayList<SearchGraphNode>();

+	

+	 public ChuiEdmonds(IModelManager manager){

+ //        this.manager = manager;

+         sSet.clear();

+         finalizedVertexId = -1;

+         min = Integer.MAX_VALUE;;

+	 }

+	 

+	 /**

+	 * Initialises the Chu-Edmonds algorithm

+	 */

+	public void init() {

+	     sSet.clear();

+	     finalizedVertexId = -1;

+	     min = Integer.MAX_VALUE;;

+	 }

+	

+

+	

+	/** Returns the SearchPlan (traversal order of the node) of the input graph 

+	 * @param iSearchGraph The search graph to work with

+	 * @return The array of the SearchGraph nodes in appropriate order

+	 */

+	public SearchGraphNode[] evaluateSearchPlan(ISearchGraph iSearchGraph) {

+		return evaluateSearchPlanInner(evaluateSearchTreeInner(iSearchGraph.getSearchNodes().values()));		

+	}

+	

+//	public Collection<SearchGraphNode> evaluateSearchTree(FlattenedPattern result) {

+//		

+//		return evaluateSearchTreeInner(result.getSearchGraph().getSearchNodes().values());		

+//		}

+	

+	/** Returns a lightest spanning tree of the input graph

+	 * @param nodes the nodes of the graph

+	 * @return The collection of the search graph's node with the defined spanning tree

+	 */

+	private Collection<SearchGraphNode> evaluateSearchTreeInner(Collection<SearchGraphNode> nodes)

+	{

+	//set the treeEdge pointer to the minimum incoming edge for all SearchGraphNodes

+	for (SearchGraphNode node : nodes) 

+		{

+		if(node instanceof VariableSearchGraphNode && (!((VariableSearchGraphNode)node).isInput()))  

+			 {min = Integer.MAX_VALUE;

+			  for( SearchGraphEdge edge :node.getSources())

+			 	 if(edge.getWeight() < min)

+			 	 {		min = edge.getWeight();

+			 	 		if(node.getTreeEdge() != null)

+			 	 			{

+			 	 			node.getTreeEdge().getSourceNode().decreaseOutgoingTreeEdgeNumber();

+			 	 			node.getTreeEdge().setEdgeTypeinAlgorithm(EdgeTypeinAlgorithm.FREE);

+			 	 			}

+					 	node.setTreeEdge(edge);

+					 	edge.getSourceNode().increaseOutgonigTreeEdgeNumber();

+					 	edge.setEdgeTypeinAlgorithm(EdgeTypeinAlgorithm.TREE);

+			 	 }

+			 }

+		}

+	for(SearchGraphNode node : nodes)

+		{	if(!sSet.contains(node))

+				findCircle(node);

+		}

+	eraseCircles();

+	return nodes;	

+	}

+	

+	/** Evaluates the actual top most virtual vertex of the input node.

+	 * @param node the node who's virtualvertex is the return parameter

+	 * @return

+	 */

+	SearchGraphNode getVirtualVertex(SearchGraphNode node)

+	{	if(node == null) return null;

+		

+		SearchGraphNode virtualnode = node;

+		if(node.getVirtualSearchGraphNode() == null )

+			return node;

+		else

+		{	virtualnode = node;

+			while(virtualnode.getVirtualSearchGraphNode() != null)

+					virtualnode = virtualnode.getVirtualSearchGraphNode();

+			

+			return virtualnode;

+		}

+	}

+	

+	/** If node is in a circle, the edge weights are recalculated along the circle, and a new treeedge is selected

+	 * @param node The node to inspect

+	 */

+	private void findCircle(SearchGraphNode node)

+	{

+		SearchGraphNode actualNode = node, previousNode= node; 

+		while( previousNode!=null && (!sSet.contains(previousNode) ))

+			{

+			sSet.add(previousNode);

+			actualNode = previousNode;

+			if(actualNode.getTreeEdge() != null)

+				previousNode = getVirtualVertex(actualNode.getTreeEdge().getSourceNode()); 

+			else

+				previousNode = null;

+			}

+		//circle is found

+		if(previousNode != null 

+			&& finalizedVertexId < sSet.indexOf(previousNode))

+				evaluateNewEdgeWeights(actualNode,previousNode);	

+		else

+		//it is not a circle

+		{finalizedVertexId = sSet.size()-1;}

+	

+	}

+	 

+	

+	/** Evaluates the new edge weights of a circle (starting with circleBeginNode and ends with circleEndNode) and selects a new tree edge

+	 * for one of the circle nodes, all information is captured by a newly created virtual vertexes

+	 * @param circleBeginNode The starter node of the circle

+	 * @param circleEndNode The end node of the circle

+	 */

+	private void evaluateNewEdgeWeights(SearchGraphNode circleBeginNode, SearchGraphNode circleEndNode) {

+		int minEdgeWeight = Integer.MAX_VALUE;

+		int minIncomingEdgeWeight = Integer.MAX_VALUE;

+		int pseudoNodeId = sSet.size();

+										

+		int smallestId = pseudoNodeId;

+		PseudoSearchGraphNode pseudoNode = new PseudoSearchGraphNode();

+		SearchGraphEdge minIncomingEdge = null;

+		//SearchGraphEdge oldPseudoTreeEdge = null;

+		SearchGraphNode actualNode = circleBeginNode;

+		//CirclebiggestId is already known as it will be the next element in the sSet

+		pseudoNode.setCircleBiggestId(pseudoNodeId-1);

+		

+		//selects the smallest tree edge in the circle and sets it's edges to "circle" type

+		do{

+			if(actualNode.getTreeEdge().getWeight() < minEdgeWeight)

+				minEdgeWeight = actualNode.getTreeEdge().getWeight();

+			

+			if(sSet.indexOf(actualNode) < smallestId)	

+				smallestId = sSet.indexOf(actualNode);

+			

+			if(actualNode instanceof PseudoSearchGraphNode && ((PseudoSearchGraphNode)actualNode).getCircleSmallestId() < smallestId)

+				smallestId = ((PseudoSearchGraphNode)actualNode).getCircleSmallestId();

+			

+			actualNode.getTreeEdge().setEdgeTypeinAlgorithm(EdgeTypeinAlgorithm.CIRCLE);

+			actualNode = getVirtualVertex(actualNode.getTreeEdge().getSourceNode());

+			

+			}

+		while(!actualNode.equals(circleBeginNode));		

+		

+		actualNode = circleBeginNode;

+		pseudoNode.setCircleSmallestId(smallestId);

+		//update the edge weights and selects the smallest incoming to the pseudo node

+		do{

+			for (SearchGraphEdge edge :actualNode.getSources() ) {

+				if(getVirtualVertex(edge.getSourceNode()).getTreeEdge() == null

+				   ||

+				   (edge.getEdgeTypeinAlgorithm()==EdgeTypeinAlgorithm.FREE && 

+				   getVirtualVertex(edge.getSourceNode()).getTreeEdge().getEdgeTypeinAlgorithm() != EdgeTypeinAlgorithm.CIRCLE))

+					{

+					edge.setWeight(edge.getWeight() + minEdgeWeight - actualNode.getTreeEdge().getWeight());

+					//selects the smallest incoming edge into the pseudo node 

+					if(edge.getWeight() < minIncomingEdgeWeight)

+					{

+							minIncomingEdge = edge;

+							minIncomingEdgeWeight = edge.getWeight();

+					}

+					//links the incoming edges to the pseudo node

+					pseudoNode.addSource(edge);

+					}

+				}

+		actualNode = getVirtualVertex(actualNode.getTreeEdge().getSourceNode());

+

+		}while(!actualNode.equals(circleBeginNode));

+

+		//Sets the virtual node to all circle elements

+		actualNode = getVirtualVertex(circleBeginNode.getTreeEdge().getSourceNode());

+		circleBeginNode.setVirtualSearchGraphNode(pseudoNode);

+		circleBeginNode = pseudoNode;

+		SearchGraphNode previousNode = null;		

+		while(!actualNode.equals(circleBeginNode)){

+			previousNode=  actualNode;

+			actualNode = getVirtualVertex(actualNode.getTreeEdge().getSourceNode());

+			previousNode.setVirtualSearchGraphNode(pseudoNode);

+		}

+		previousNode = null;

+

+		if(minIncomingEdge != null)

+			{//sets the tree edge of the target (not pseudo) 

+			pseudoNode.setTreeEdge(minIncomingEdge);

+	//		minIncomingEdge.getTargetNode().setTreeEdge(minIncomingEdge);

+			minIncomingEdge.setEdgeTypeinAlgorithm(EdgeTypeinAlgorithm.TREE);

+	//		minIncomingEdge.getSourceNode().increaseOutgonigTreeEdgeNumber();

+			}

+		pseudoNode.setName("pseudo"+pseudoNodeId);

+		findCircle(pseudoNode);

+	}

+	

+	/**

+	 * Erases the circles of the spanning tree, by evaluating the references of the virtual vertexes and the concrete nodes.

+	 */

+	private void eraseCircles(){

+		

+		for(int i = sSet.size()-1; i > -1; i--)

+			{

+			if(sSet.get(i) instanceof PseudoSearchGraphNode && (!((PseudoSearchGraphNode)sSet.get(i)).isBlocked()))

+				{

+				PseudoSearchGraphNode pnode = (PseudoSearchGraphNode)sSet.get(i);

+				SearchGraphEdge pedge = pnode.getTreeEdge();

+				//SearchGraphNode coverNode = pedge.getTargetNode();

+				int coverNodeId = sSet.indexOf(pedge.getTargetNode());

+				//erase the circle edge of the pseudo node which is 

+				//the treeedge of the Pseudo node's incoming tree edge target node

+				pedge.getTargetNode().getTreeEdge().setEdgeTypeinAlgorithm(EdgeTypeinAlgorithm.FREE);

+				pedge.getTargetNode().getTreeEdge().getSourceNode().decreaseOutgoingTreeEdgeNumber();

+				pedge.getTargetNode().setTreeEdge(pedge);

+				pedge.getSourceNode().increaseOutgonigTreeEdgeNumber();

+				//set the cover pseudo nodes to Blocked

+				for(int j = coverNodeId; j<i; j++)

+					if(sSet.get(j) instanceof PseudoSearchGraphNode)

+						{

+						PseudoSearchGraphNode innerPseudoNode = (PseudoSearchGraphNode)sSet.get(j);

+						if(coverNodeId >= innerPseudoNode.getCircleSmallestId() 

+								&& coverNodeId <= innerPseudoNode.getCircleBiggestId())

+								{

+								innerPseudoNode.setBlocked(true);

+								}

+						}

+				}

+			}

+	}

+	

+	

+	/** Returns the SearchPlan (traversal order of the node) of the input graph (with already evaluated spanning tree)

+	 * @param nodes the graph with the appropriate spannning tree

+	 * @return

+	 */

+	private SearchGraphNode[] evaluateSearchPlanInner(Collection<SearchGraphNode> nodes){

+		//the leaves of the search tree will be in the leaves arraylist

+		SearchGraphNode maxNode = null;

+		int max = Integer.MIN_VALUE;

+		int indexOfSearchPlan = nodes.size()-1;

+		int indexOfInputParameters = -1;

+		SearchGraphNode searchPlan[] = new SearchGraphNode[nodes.size()] ;  

+		SearchGraphNodeComparator comparator = new SearchGraphNodeComparator();

+		

+		//input parameters, their values are known, can be handled as Constant nodes 

+		for(SearchGraphNode node : nodes)

+			if(node instanceof VariableSearchGraphNode && ((VariableSearchGraphNode)node).isInput())

+				{

+				indexOfInputParameters++;

+				searchPlan[indexOfInputParameters]= node;

+				node.setChecked(true);

+				if(node.getTreeEdge() != null)

+					node.getTreeEdge().getSourceNode().decreaseOutgoingTreeEdgeNumber();

+				}

+		//calculate the leaves of the SearchTree

+		TreeMap<SearchGraphNode,Object> leaves = new TreeMap<SearchGraphNode, Object>(comparator); 

+			for(SearchGraphNode node : nodes){

+				if(node.getOutgoingTreeEdgeNumber() == 0 &&

+						(!(node instanceof VariableSearchGraphNode && ((VariableSearchGraphNode)node).isInput())))

+					{leaves.put(node,null);

+					 if( node.getTreeEdge() != null && max < node.getTreeEdge().getOldWeight() )

+					 	{

+						 max = node.getTreeEdge().getOldWeight();

+						 maxNode = node;

+					 	}

+					}

+			}

+	//there is no unbounded searchNode in the pattern

+	if(maxNode == null)		

+		while(indexOfSearchPlan != indexOfInputParameters)

+			{

+			maxNode = leaves.lastKey();

+			searchPlan[indexOfSearchPlan]=  maxNode;

+			indexOfSearchPlan--;

+			}

+		

+	else

+	//get the highest tree edge and put it to the search plan evaluation

+	while(indexOfSearchPlan != indexOfInputParameters)

+		{

+		searchPlan[indexOfSearchPlan]=  maxNode;

+		//to "delete" the treeedge from the tree

+		if(maxNode.getTreeEdge() != null)

+		{	maxNode.getTreeEdge().getSourceNode().decreaseOutgoingTreeEdgeNumber();

+		//if it does not hold an other element by an edge or not an input parameter then it is a leaf

+			if( maxNode.getTreeEdge().getSourceNode().getOutgoingTreeEdgeNumber() == 0 )

+				if(!(maxNode.getTreeEdge().getSourceNode() instanceof VariableSearchGraphNode

+						&& ((VariableSearchGraphNode)maxNode.getTreeEdge().getSourceNode()).isInput()))

+				leaves.put(maxNode.getTreeEdge().getSourceNode(),null);

+		}	

+		leaves.remove(maxNode); 

+		try{

+			if(leaves.isEmpty())

+				break;

+			else

+				maxNode = leaves.lastKey();

+			}

+		catch(NoSuchElementException e){break;}

+		indexOfSearchPlan--;

+		}

+	return searchPlan;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/algorithms/ISearchGraph.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/algorithms/ISearchGraph.java
new file mode 100644
index 0000000..5da7356
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/algorithms/ISearchGraph.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.algorithms;

+

+import java.util.Collection;
+import java.util.TreeMap;
+
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.PatternCallSignature;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherCompileTimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTRuleBuildingException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.GTElementMapping;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.GTOperationContext;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.BodyNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.FlattenedPattern;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.PatternReferenceNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.SearchPlanOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.AbstractNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability.EdgeTraceabilityElement;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability.NodeTraceabilityElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**Interface for the search graph used in the optimization algorithm
+ * @author Akos Horvath
+ *
+ */
+public interface ISearchGraph {

+	

+	  

+    public static final String VPM_RELATION_FQN = "vpm.relation";

+    public static final String VPM_ENTITY_FQN = "vpm.entity";

+	public static final int VARIABLEASSIGNMENT_WEIGHT = 5;

+   

+	

+    //These are the methods that are used by the optimization algorithms

+	public TreeMap<Integer, SearchGraphNode> getSearchNodes();

+	/** Returns the search operation generated from the search graph parametrized with the input parameters adornment

+	 * @param pattern The flattened pattern to generate from

+	 * @param adornment Adornment of the input parameter

+	 * @param manager 

+	 * @return Vector of the Operation plan

+	 * @throws PatternMatcherRuntimeException 

+	 */

+	public Collection<SearchPlanOperation> generateSearchPlan(FlattenedPattern pattern, Boolean[] adornment, IModelManager manager) throws PatternMatcherRuntimeException;

+	/**

+	 * Initializes the search graph

+	 */

+	public void initSearchGraph();

+	public void add(BodyNode node, FlattenedPattern result) throws PatternMatcherCompileTimeException;

+	/** Adds a pattern invocation node to the search graph

+ 	 * @param prNode The new pattern invocation node

+	 * @param result The flattened pattern of the search graph

+	 * @throws PatternMatcherCompileTimeException

+	 */

+	public void add(PatternReferenceNode prNode, FlattenedPattern result) throws PatternMatcherCompileTimeException;

+	/** Returns the generated GTOperations and variable mapping

+	 * @param gtElementMappings The RHS-LHS parameter mapping

+	 * @param manager Model manager of the actual framework

+	 * @param signature The input parameters' signatures 

+	 * @return

+	 * @throws GTRuleBuildingException

+	 */

+	public GTOperationContext generateGTOperations(Collection<GTElementMapping> gtElementMappings, IModelManager manager, PatternCallSignature[] signature) throws GTRuleBuildingException;

+	 /** Returns the search graph element with the input id
+	 * @param key The id of the search graph element
+	 * @return
+	 */
+	public SearchGraphNode getSearchNode(Integer key);

+	/** Evaluates the dangling relations and relationships and adds them to the flattened pattern's search graph

+	 * @param pattern Flattened Pattern of the search graph

+	 * @throws PatternMatcherCompileTimeException

+	 */

+	 public void connectDanglingRelations(FlattenedPattern pattern) throws PatternMatcherCompileTimeException;
+	/**Return the EMF equivalent of the input SearchGraph element
+	 * @param node The node whose EMF representation is returned
+	 * @return
+	 */
+	public AnnotatedElement getGTASMRepresentation(AbstractNode node); 
+	
+	/**To add an edge based traceability element to the search graph
+	 * @param edge The edge whose element is added
+	 * @param element The traceability element
+	 */
+	public void addTraceabilityElement(SearchGraphEdge edge, EdgeTraceabilityElement element);	
+	
+	/**To add a node based traceability element to the search graph
+	 * @param edge The edge whose element is added
+	 * @param element The traceability element
+	 */
+	public void addTraceabilityElement(SearchGraphNode node, NodeTraceabilityElement element);
+		

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/algorithms/ISearchGraphProvider.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/algorithms/ISearchGraphProvider.java
new file mode 100644
index 0000000..d4827d0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/algorithms/ISearchGraphProvider.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.algorithms;

+

+import org.eclipse.viatra2.core.IModelManager;
+

+/**Extension point to be able to use alternate search graphs with the algorithm
+ * @author Akos Horvath
+ *
+ */
+public interface ISearchGraphProvider {

+	

+	public ISearchGraph getSearchGraph(IModelManager manager);

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/algorithms/SearchGraphFactory.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/algorithms/SearchGraphFactory.java
new file mode 100644
index 0000000..ebcc3b7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/algorithms/SearchGraphFactory.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.algorithms;

+

+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.viatra2.core.IModelManager;
+

+/**

+ * Used to return the appropriate SearchGraphProvider (uses the alternate representation if available) for the Flattened Pattern.

+ * @author Akos Horvath

+ *

+ */

+public class SearchGraphFactory{

+	

+	private static boolean useAlternate = false;

+	private static List<ISearchGraphProvider> alternateProvider = new ArrayList<ISearchGraphProvider>();

+	

+	public static ISearchGraph getSearchGraph(IModelManager manager){

+		

+		if( (!useAlternate) || alternateProvider.size() == 0) //use default

+			return new VPMBasedSearchGraph(manager);

+		else

+			return alternateProvider.get(0).getSearchGraph(manager);

+	}

+

+	/**

+	 * @return the useAlternate

+	 */

+	public static boolean isUseAlternate() {

+		return useAlternate;

+	}

+

+	/**

+	 * @param useAlternate the useAlternate to set

+	 */

+	public static void setUseAlternate(boolean useAlternate) {

+		SearchGraphFactory.useAlternate = useAlternate;

+	}

+

+	/**

+	 * @return the alternateProvider

+	 */

+	public static List<ISearchGraphProvider> getAlternateProvider() {

+		return alternateProvider;

+	}

+

+	/**

+	 * @param alternateProvider the alternateProvider to set

+	 */

+	public static void setAlternateProvider(

+			List<ISearchGraphProvider> alternateProvider) {

+		SearchGraphFactory.alternateProvider = alternateProvider;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/algorithms/VPMBasedSearchGraph.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/algorithms/VPMBasedSearchGraph.java
new file mode 100644
index 0000000..982e9d8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/algorithms/VPMBasedSearchGraph.java
@@ -0,0 +1,1073 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.algorithms;

+

+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.Vector;
+
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.ParameterMode;
+import org.eclipse.viatra2.gtasm.patternmatcher.PatternCallSignature;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherCompileTimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTRuleBuildingException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.GTElementMapping;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.GTElementMappingType;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.GTOperationContext;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.GTOperationGenerator;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.DeleteModelElement;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.ElementManipulationOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.internal.operation.IUpdatePlanOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.validation.GTRuleValidator;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.EdgeType;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.VPMModelElementType;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.VariableID;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.BodyNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.DanglingVPMElementDTO;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.FlattenedPattern;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.PatternNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.PatternNodeIncremental;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.PatternReferenceNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.CheckOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.ISearchPlanOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.SearchPlanOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.AbstractNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.ConstantSearchGraphNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.EdgeTypeinAlgorithm;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.PatternCallSearchGraphNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.VariableSearchGraphNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability.AbstractTraceabilityElement;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability.ConstantNodeTraceabilityElement;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability.EdgeTraceabilityElement;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability.NodeTraceabilityElement;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability.PatternCallNodeTraceabilityElement;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability.VariableNodeTraceabilityElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ContainmentMode;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.SupertypeOf;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.TypeOf;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.VPMElement;
+

+

+/**A search graph implementation for the VPM models
+ * @author Akos Horvath
+ *
+ */
+public class VPMBasedSearchGraph implements  ISearchGraph {

+    public static final int BELOW_WEIGHT = 40;

+    public static final int IN_WEIGHT = 10;

+    public static final int INSTANCEOF_WEIGHT = 20;

+    public static final int SUPERTYPE_WEIGHT = 10;

+    public static final int RELATION_WEIGHT = 15;

+    public static final int PATTERNCALLINV_WEIGHT = 4; //Must be the lowest weight !!!

+    public static final int PATTERNCALL_WEIGHT = 20;
+    public static final int PATTERNCALL_INCREMENTAL_WEIGHT = 9;
+    public static final int PATTERNCALL_STORAGE_INCREMENTAL_WEIGHT = 7;
+

+    private static final int VPM_ENTITY = -1;

+    private static final int VPM_RELATION = -2;

+    private static final int PATTERN_CALL_STORAGE_NODE = -3;
+    private static final int CONSTANTNODE_STARTING_ID = -4;
+    // in case the pattern has ENTITY or RELATION as Modelelement
+    // or in case the pattern call is a collector node,
+    // then  they have to added to the constantnodes collection

+

+

+    private int constantNodesNumber = CONSTANTNODE_STARTING_ID;

+

+    /**

+     * The class represents the data structure for the search plan evaluation

+     */

+    private final ChuiEdmonds alg;

+

+	private TreeMap<Integer,SearchGraphNode> searchNodes;

+    private SearchGraphNode[] searchNodeOrder = null;  //SearchGraphNode! not SearcPlanOperation!!!

+    private final TreeMap<String,Integer> constantNodes;

+    private Map<SearchGraphNode,Boolean> hasOneInConstraint;

+    private final ArrayList<DanglingVPMElementDTO> danglingElements;

+    private final Map<AbstractNode,AbstractTraceabilityElement> traceabilityMapping;
+

+    private final int constantNodeNumber = CONSTANTNODE_STARTING_ID;

+

+    public VPMBasedSearchGraph(IModelManager manager) {

+        this.alg = new ChuiEdmonds(manager);

+    	this.searchNodes = new TreeMap<Integer, SearchGraphNode>();

+    	this.constantNodes = new TreeMap<String, Integer>();

+    	this.danglingElements = new ArrayList<DanglingVPMElementDTO>();
+    	this.traceabilityMapping = new HashMap<AbstractNode, AbstractTraceabilityElement>();

+    }

+

+	public void setSearchNodes(TreeMap<Integer,SearchGraphNode> searchGraph) {

+		this.searchNodes = searchGraph;

+	}

+

+	public TreeMap<String, Integer> getConstantNodes() {

+		return constantNodes;

+	}

+

+	public TreeMap<Integer, SearchGraphNode> getSearchNodes() {

+		return searchNodes;

+	}

+

+	public int getConstantNodeNumber() {

+		return constantNodeNumber;

+	}

+

+	public SearchGraphNode getSearchNode(Integer key) {

+		return searchNodes.get(key);

+	}

+

+	public boolean containsKey(Object key) {

+		return searchNodes.containsKey(key);

+	}

+

+//	private void debug(Logger logger) {

+//	    for (SearchGraphNode node : searchNodes.values()) {

+//	        logger.debug(node.getName()+" "+node.getOutgoingTreeEdgeNumber()+ " "+ node.isChecked());

+//	        for(SearchGraphEdge edge: node.getSources()) {

+//	            logger.debug(//"  *****Name "+edge.getName()+" *****Type: "+edge.getVPMEdgeType()

+//	                    ""+"  "+edge.getSourceNode().getName()+" -> "+ edge.getTargetNode().getName()+"  "+edge.getWeight()+" "+edge.getOldWeight()+" "+edge.isChecked()+" "+ edge.getEdgeTypeinAlgorithm());

+//	        }

+//	        if(node.getTreeEdge() != null) {

+//	            logger.debug("   TREEEDGE   "+node.getTreeEdge().getName()+"  "+node.getTreeEdge().getSourceNode().getName()+" -> "+ node.getTreeEdge().getTargetNode().getName()+"  "+node.getTreeEdge().getWeight()+" "+node.getTreeEdge().getOldWeight()+" "+node.getTreeEdge().isChecked());

+//	        }

+//	    }

+//	}

+

+    // sets back the searchGraph to the beginning state

+    public void initSearchGraph() {

+    	alg.init();

+

+    	for (SearchGraphNode node : searchNodes.values()) {

+    		node.setChecked(false);

+    		node.setVirtualSearchGraphNode(null);

+    		for (SearchGraphEdge edge : node.getSources()) {

+    			edge.setEdgeTypeinAlgorithm(EdgeTypeinAlgorithm.FREE);

+    			edge.setChecked(false);

+    			edge.setWeight(edge.getOldWeight());

+    			//alg.init();

+    			//resets the outgoing tree edge number

+    			node.setOutgoingTreeEdgeNumber(0);

+    		}

+    		node.setTreeEdge(null);

+    	}//input parameter of a VariableSearchGraph is set by the FlattenedPattern

+	}

+

+    public void add(BodyNode bodyNode, FlattenedPattern result) throws PatternMatcherCompileTimeException {

+    	GTPatternBody body = bodyNode.getBody();

+		// VPM nodes and edges are mapped to SearchGraphNodes

+

+		TreeIterator<EObject> elements_iter = body.getPatternGraph().eAllContents();

+		//map the VPM relations and entites to SearchGraph nodes

+		while(elements_iter.hasNext()) {

+		    Object obj = elements_iter.next();

+		    if(obj instanceof Relation || obj instanceof Entity)

+		        evaluateModelElement((ModelElement) obj,result,bodyNode);

+		}

+

+		//maps the connections of the local VPM model elements to search graph edges

+		elements_iter = body.getPatternGraph().eAllContents();

+		while(elements_iter.hasNext()) {

+		    Object obj = elements_iter.next();

+

+		    if(obj instanceof Relation)

+		        connectElements((Relation) obj,result,bodyNode);

+		    if(obj instanceof Relationship)

+		        evaluateRelationship((Relationship) obj,result,bodyNode);

+		}

+

+		//saves the dangling relations

+		Iterator<Relation> iter_dangling = body.getDanglingRelations().iterator();

+		while(iter_dangling.hasNext())

+			danglingElements.add(new DanglingVPMElementDTO(iter_dangling.next(), bodyNode));

+

+		//saves the dangling relationships

+		Iterator<Relationship> iter_dangling_relship = body.getDanglingRelationships().iterator();

+		while(iter_dangling_relship.hasNext())

+			danglingElements.add(new DanglingVPMElementDTO(iter_dangling.next(), bodyNode));

+

+		// containment

+		ListIterator<ContainmentConstraint> containmentConstraints = body.getContainmentConstraints().listIterator();

+		while(containmentConstraints.hasNext()) {

+		    //ContainmentConstraint conCons = containmentConstraints.next();

+		    evaluateContainmentConstraints(containmentConstraints.next(),result,bodyNode);

+		}

+    }

+

+	private void evaluateContainmentConstraints(ContainmentConstraint conCons , FlattenedPattern result, BodyNode bodyNode){

+	    SearchGraphEdge edge = new SearchGraphEdge();

+	    SearchGraphEdge invedge = new SearchGraphEdge();

+	    SearchGraphNode target =  getSearchNode(result.getIndex(bodyNode.getVariableID(conCons.getVariable())));

+
+	    //traceability
+		EdgeTraceabilityElement edgeTraceability = new EdgeTraceabilityElement(edge,conCons);
+		traceabilityMapping.put(edge, edgeTraceability);
+
+	    //inverse
+	    EdgeTraceabilityElement inverseEdgeTraceability = new EdgeTraceabilityElement(invedge,conCons);
+		traceabilityMapping.put(invedge, inverseEdgeTraceability);
+

+	    if(conCons.getMode() == ContainmentMode.BELOW_LITERAL) {

+	        edge.setVPMEdgeType(EdgeType.BELOW);

+	        edge.setOldWeight(BELOW_WEIGHT);

+	        edge.setWeight(BELOW_WEIGHT);

+	        invedge.setVPMEdgeType(EdgeType.BELOW);

+	        invedge.setOldWeight(BELOW_WEIGHT*2);

+	        invedge.setWeight(BELOW_WEIGHT*2);

+	    } else {

+	        edge.setVPMEdgeType(EdgeType.IN);

+	        edge.setOldWeight(IN_WEIGHT);

+	        edge.setWeight(IN_WEIGHT);

+	        invedge.setVPMEdgeType(EdgeType.IN);

+	        invedge.setOldWeight(IN_WEIGHT*2);

+	        invedge.setWeight(IN_WEIGHT*2);

+	    }

+

+	    if(conCons.getParent() instanceof VariableReference &&

+	        result.containsIndex(bodyNode.getVariableID(((VariableReference)conCons.getParent()).getVariable())))

+	        {

+	    	VariableID parentID = bodyNode.getVariableID(((VariableReference)conCons.getParent()).getVariable());

+	        VariableSearchGraphNode source;

+

+	        if (searchNodes.containsKey(result.getIndex(parentID)))

+	        	{

+	            source = (VariableSearchGraphNode) getSearchNode(result.getIndex(

+	                    parentID));

+	        	}

+	        else

+	        	{

+	            source = new VariableSearchGraphNode();

+	            source.setVpmModelElementType(VPMModelElementType.ENTITY);

+	            source.setInput(true);

+	            source.setName(parentID.toString());

+	            source.setId(result.getIndex(parentID));

+	            searchNodes.put(source.getId(),source);			//variablereference
+
+	            //traceability
+		        VariableNodeTraceabilityElement traceability = new VariableNodeTraceabilityElement(source,conCons.getParent());
+		        traceabilityMapping.put(source, traceability);

+	        	}

+

+	        edge.setName(conCons.getVariable().getName()+"_Containment");

+	        edge.setTargetNode(target);

+	        edge.setSourceNode(source);

+	        edge.setSource(true);

+	        target.addSource(edge);

+

+	        edge.setInverseEdge(invedge);

+

+	        invedge.setName(conCons.getVariable().getName()+"_ContainmentInverse");

+	        invedge.setTargetNode(source);

+	        invedge.setSourceNode(target);

+	        invedge.setSource(false);

+	        source.addSource(invedge);

+	    } else if (conCons.getParent() instanceof Constant) {

+

+	    	ConstantSearchGraphNode source;

+	        //a bit complicated...

+	        Constant constant = ((Constant)conCons.getParent());

+

+	        if(constantNodes.containsKey(constant.getValue()))

+	 	       {

+	        	source = (ConstantSearchGraphNode) getSearchNode(constantNodes.get(constant.getValue()));

+	           }

+	        else

+	        	{

+	        	source = new ConstantSearchGraphNode();

+		        source.setElement(constant.getValue());

+		        source.setName(constant.getValue());

+		        searchNodes.put(constantNodesNumber,source);

+		        constantNodes.put(source.getName(), constantNodesNumber);

+		        constantNodesNumber--;
+
+		        //traceability
+		        ConstantNodeTraceabilityElement traceability = new ConstantNodeTraceabilityElement(source,conCons.getParent());
+		        traceabilityMapping.put(source, traceability);

+	        	}

+	        edge.setName(conCons.getVariable().getName()+"_Containment");

+	        edge.setTargetNode(target);

+	        edge.setSourceNode(source);

+	        edge.setSource(true);

+	        target.addSource(edge);

+	    } else {

+	        // general case for the Term of the containment constraint

+	        int index = result.addVariable(null);

+	        CheckOperation operation =

+	        	bodyNode.getTermEvaluationOperation(result.getTermHandler(), conCons, index);

+//                handler.getTermEvaluationOperation(parent.pattern, currentLocation, conCons.getParent(), index);

+	        result.addPreSearchPlanOperation(operation);

+

+	        VariableSearchGraphNode source = new VariableSearchGraphNode();

+            source.setInput(true);

+            source.setVpmModelElementType(VPMModelElementType.ENTITY);

+            source.setName("PROCCESEDTERM_"+index);

+            source.setId(index);

+            searchNodes.put(index,source);			//variablereference
+
+            //traceability
+	        VariableNodeTraceabilityElement traceability = new VariableNodeTraceabilityElement(source,conCons.getParent());
+	        traceabilityMapping.put(source, traceability);

+

+            edge.setName(conCons.getVariable().getName()+"_Containment");

+	        edge.setTargetNode(target);

+	        edge.setSourceNode(source);

+	        edge.setSource(true);

+	        target.addSource(edge);

+        }

+	}

+

+	private void connectElements(Relation rel, FlattenedPattern result, BodyNode bodyNode) throws PatternMatcherCompileTimeException {

+		SearchGraphNode source;

+		SearchGraphNode target;

+		SearchGraphNode relationnode;

+
+		String fromStr = rel.getFromStr();

+		String toStr = rel.getToStr();

+

+		Integer toIndex = result.getIndex(bodyNode.getVariableID(toStr));

+		Integer fromIndex = result.getIndex(bodyNode.getVariableID(fromStr));

+		Integer relIndex = result.getIndex(bodyNode.getVariableID(rel));

+

+		if(fromIndex != null

+				&& searchNodes.containsKey(fromIndex)) {

+			source =  getSearchNode(fromIndex);

+        }
+		else if(constantNodes.containsKey(fromStr))  {

+			source =  getSearchNode(constantNodes.get(fromStr));

+        }
+		else{
+			String[] context ={rel.getName(), rel.getFromStr()};
+			throw new PatternMatcherCompileTimeException(PatternMatcherErrorStrings.INTERNAL_SEARCGRAPH_RELATION_SOURCE_MISSING
+    			,context
+    			,rel);
+		}

+

+		if(toIndex != null

+				&& searchNodes.containsKey(toIndex)) {

+			target = getSearchNode(toIndex);

+        } else if(constantNodes.containsKey(toStr)) {

+			target =  getSearchNode(constantNodes.get(toStr));

+        } else {
+        	//TODO: if the target of the relation is missing it is a dangling relation but not contained in the DanlingRelations list :-)
+        	// Needs to be added to the danglingElements collection
+        	danglingElements.add(new DanglingVPMElementDTO(rel, bodyNode));
+        	return;
+//        	String[] context ={rel.getName()};
+//        	throw new PatternMatcherCompileTimeException(PatternMatcherErrorStrings.INTERNAL_SEARCGRAPH_RELATION_TARGET_MISSING
+//        			,context
+//        			,rel);
+        }

+

+        if(relIndex != null

+				&& searchNodes.containsKey(relIndex)) {

+			relationnode =  getSearchNode(relIndex);

+        } else if(constantNodes.containsKey(rel.getName())) {

+			relationnode =  getSearchNode(constantNodes.get(rel.getName()));

+        } else {
+        	String[] context ={rel.getName()};
+        	throw new PatternMatcherCompileTimeException(PatternMatcherErrorStrings.INTERNAL_SEARCGRAPH_RELATION_MISSING
+        			,context
+        			,rel);
+        }

+
+        SearchGraphEdge edgeTarget = new SearchGraphEdge();

+		SearchGraphEdge edgeTargetinverse = new SearchGraphEdge();

+

+		SearchGraphEdge edgeSource = new SearchGraphEdge();

+		SearchGraphEdge edgeSourceinverse = new SearchGraphEdge();

+

+		//		<--Source--     --Target-->

+		// Source        Relation          Target

+		//      --invSource->  <-invTarget--

+

+		//Source

+		edgeSource.setSourceNode(relationnode);

+		edgeSource.setTargetNode(source);

+		edgeSource.setSource(true);

+		edgeSource.setWeight(RELATION_WEIGHT);

+		edgeSource.setOldWeight(RELATION_WEIGHT);

+		edgeSource.setVPMEdgeType(EdgeType.SOURCE);

+		edgeSource.setName(relationnode.getName()+"->"+source.getName());

+		//edgeSource.setParentinEMF(rel);

+		source.addSource(edgeSource);

+

+		//inverse source edge

+		edgeSourceinverse.setSourceNode(source);

+		edgeSourceinverse.setTargetNode(relationnode);

+		edgeSourceinverse.setSource(false);

+		edgeSourceinverse.setWeight(RELATION_WEIGHT);

+		edgeSourceinverse.setOldWeight(RELATION_WEIGHT);

+		edgeSourceinverse.setVPMEdgeType(EdgeType.SOURCE);

+		edgeSourceinverse.setName(source.getName()+"->"+relationnode.getName());

+		//edgeSourceinverse.setParentinEMF(rel);

+		relationnode.addSource(edgeSourceinverse);

+

+		edgeSource.setInverseEdge(edgeSourceinverse);

+

+

+		//Target

+		edgeTarget.setTargetNode(target);

+		edgeTarget.setSourceNode(relationnode);

+		edgeTarget.setSource(true);

+		edgeTarget.setWeight(RELATION_WEIGHT);

+		edgeTarget.setOldWeight(RELATION_WEIGHT);

+		edgeTarget.setVPMEdgeType(EdgeType.TARGET);

+		edgeTarget.setName(relationnode.getName()+"->"+target.getName());

+		//edgeTarget.setParentinEMF(rel);

+		target.addSource(edgeTarget);

+

+		//inverse Target edge

+		edgeTargetinverse.setTargetNode(relationnode);

+		edgeTargetinverse.setSourceNode(target);

+		edgeTargetinverse.setSource(false);

+		edgeTargetinverse.setWeight(RELATION_WEIGHT);

+		edgeTargetinverse.setOldWeight(RELATION_WEIGHT);

+		edgeTargetinverse.setVPMEdgeType(EdgeType.TARGET);

+		edgeTargetinverse.setName(target.getName()+"->"+relationnode.getName());

+		//edgeTargetinverse.setParentinEMF(rel);

+		relationnode.addSource(edgeTargetinverse);

+

+		edgeTarget.setInverseEdge(edgeTargetinverse);
+
+		//traceability
+		//source
+		EdgeTraceabilityElement sourceEdgeTraceability = new EdgeTraceabilityElement(edgeSource,rel);
+		traceabilityMapping.put(edgeSource, sourceEdgeTraceability);
+
+	    //source inverse
+	    EdgeTraceabilityElement sourceInverseEdgeTraceability = new EdgeTraceabilityElement(edgeSourceinverse,rel);
+		traceabilityMapping.put(edgeSourceinverse, sourceInverseEdgeTraceability);
+
+		//target
+		EdgeTraceabilityElement targetEdgeTraceability = new EdgeTraceabilityElement(edgeTarget,rel);
+		traceabilityMapping.put(edgeTarget, targetEdgeTraceability);
+
+	    //target inverse
+	    EdgeTraceabilityElement targetInverseEdgeTraceability = new EdgeTraceabilityElement(edgeTargetinverse,rel);
+		traceabilityMapping.put(edgeTargetinverse, targetInverseEdgeTraceability);
+	}

+

+	/** True if element is a dangling edge in the bodyNode and not contained in the alreadyProcessed list

+	 * @param element The element to test

+	 * @param bodyNode Body node containing the GT pattern

+	 * @param alreadyProcessedDanglings List containing the already processed dangling edges

+	 * @return

+	 */

+	private boolean isDangling(VPMElement element,BodyNode bodyNode, List<DanglingVPMElementDTO> alreadyProcessedDanglings) {

+		GTPatternBody body = bodyNode.getBody();

+

+		if(alreadyProcessedDanglings.contains(element))

+			return Boolean.FALSE;

+

+		Iterator<Relation> iter = body.getDanglingRelations().iterator();

+		while(iter.hasNext())

+			{

+			TreeIterator<EObject> elements_iter = ((EObject)iter.next()).eAllContents();

+			while(elements_iter.hasNext())

+				{if(elements_iter.next().equals(element))

+			        return Boolean.TRUE;

+				}

+			}

+		Iterator<Relationship> iter2 = body.getDanglingRelationships().iterator();

+		while(iter.hasNext())

+			{

+			TreeIterator<EObject> elements_iter = ((EObject)iter2.next()).eAllContents();

+			while(elements_iter.hasNext())

+				{if(elements_iter.next().equals(element))

+			        return Boolean.TRUE;

+				}

+			}

+		return Boolean.FALSE;

+	}

+

+

+	/** Adds the dangling relations & relationships (and their additional relations and relationships) to the search graph

+	 * @param danglings List of Dangling model elements

+	 * @param result The Flattened pattern containing the resulting search graph

+	 * @param alreadyProcessedDanglings Dangling elements already processed during the evaluation (to check circles between dangling edges)

+	 * @throws PatternMatcherCompileTimeException

+	 */

+	private void evaluateDanglingElements(List<DanglingVPMElementDTO> danglings, FlattenedPattern result, List<DanglingVPMElementDTO> alreadyProcessedDanglings) throws PatternMatcherCompileTimeException{

+		 ArrayList<DanglingVPMElementDTO> additionalDanglingElements = new ArrayList<DanglingVPMElementDTO>();

+

+		 	for(DanglingVPMElementDTO dto: danglings){

+				VPMElement element = dto.getElement();

+				BodyNode bodyNode= dto.getBodyNode();

+

+				if(element instanceof Relation)

+					{

+					evaluateModelElement((ModelElement) element,result,bodyNode);

+					for (ModelElement elem: ((Relation)element).getType()) {

+						if(isDangling(elem,bodyNode,alreadyProcessedDanglings))

+							additionalDanglingElements.add(new DanglingVPMElementDTO(elem,bodyNode));

+					}

+					for (Relationship elem : ((Relation)element).getSuperRelationships()) {

+						if(isDangling(elem,bodyNode,alreadyProcessedDanglings))

+							additionalDanglingElements.add(new DanglingVPMElementDTO(elem,bodyNode));

+					}

+					for (Relation elem : ((Relation)element).getRelationsFrom()) {

+						if(isDangling(elem,bodyNode,alreadyProcessedDanglings))

+							additionalDanglingElements.add(new DanglingVPMElementDTO(elem,bodyNode));

+					}

+					for (Relation elem : ((Relation)element).getRelationsTo()) {

+						if(isDangling(elem,bodyNode,alreadyProcessedDanglings))

+							additionalDanglingElements.add(new DanglingVPMElementDTO(elem,bodyNode));

+						}

+

+					connectElements((Relation)element, result, bodyNode);

+

+					}

+				else if(element instanceof Relationship)

+					{
+					VariableID supplierID = bodyNode.getVariableID(((Relationship) element).getSupplierStr());
+					//supplier is a constant -> cannot be unresolvable dangling relation
+					if (!result.containsIndex(supplierID))
+						{
+						evaluateRelationship((Relationship)element, result, bodyNode);
+						}
+					else
+						{
+						//supplier is a variable input type or not defined in the actual body
+						SearchGraphNode suppliernode = getSearchNode(result.getIndex(supplierID));
+
+						//the supplier node is an unresolvable dangling element
+						if(suppliernode == null)
+							{
+							String[] context ={ element instanceof SupertypeOf ?"supertypeOf":"instanceOf",((Relationship)element).getSupplierStr() };
+							throw new PatternMatcherCompileTimeException(PatternMatcherErrorStrings.INTERNAL_SEARCGRAPH_RELATION_SOURCE_MISSING
+					    			,context
+					    			,element);
+							}
+
+						//it has a supplier can be processed
+						evaluateRelationship((Relationship)element, result, bodyNode);
+						}
+					}

+				else
+					{String[] context = {element.toString()};

+					throw new PatternMatcherCompileTimeException(PatternMatcherErrorStrings.INTERNAL_ERROR_DANGLING_RELATION_FAILED
+								,context
+								,element);
+					}

+

+				alreadyProcessedDanglings.add(dto);

+		 	}

+

+			if(additionalDanglingElements.size()!= 0)

+				evaluateDanglingElements(additionalDanglingElements, result, alreadyProcessedDanglings);

+	}

+

+	public void connectDanglingRelations(FlattenedPattern result) throws PatternMatcherCompileTimeException {

+		//TODO: is it possible to have a dangling edge with constant source or target node?

+	    if(danglingElements.size()!= 0)

+	    	evaluateDanglingElements(danglingElements, result, new ArrayList<DanglingVPMElementDTO>());

+	}

+

+	/** Creates the corresponding SearchGraphnode with type information about the input ModelElement

+	 * @param rel The model element that has to be added to the search graph

+	 * @param result Container for the search graph

+	 * @param bodyNode The body node describes the search graph that has to be built up

+	 */

+	private void evaluateModelElement(ModelElement rel, FlattenedPattern result, BodyNode bodyNode) {

+		SearchGraphEdge edge = null;

+		VariableID relID = bodyNode.getVariableID(rel);

+

+		// don't have explicit type relation, have to connect it to the Entity or relation global type

+		if(rel.getType().size() == 0) {

+			edge = new SearchGraphEdge();

+			edge.setVPMEdgeType(EdgeType.INSTANCEOF);

+			edge.setWeight(INSTANCEOF_WEIGHT*3);

+			edge.setOldWeight(INSTANCEOF_WEIGHT*3);

+			edge.setSource(true);
+			//traceability Information
+			EdgeTraceabilityElement edgeTraceability = new EdgeTraceabilityElement(edge,rel);
+			traceabilityMapping.put(edge, edgeTraceability);
+

+			//its an Entity

+			if(rel instanceof Entity) {

+			    // have to create the entity searchGraph node

+			    if( getSearchNode(VPM_ENTITY) == null) {

+			        ConstantSearchGraphNode ent = new ConstantSearchGraphNode();

+			        ent.setName("Entity");

+			        ent.setElement(VPM_ENTITY_FQN);

+			        searchNodes.put(VPM_ENTITY, ent);
+			        //traceability Information
+			        ConstantNodeTraceabilityElement traceability = new ConstantNodeTraceabilityElement(ent,rel);
+			        //TODO what to do if it is the vpm.Entity element? Currently it is the pattern variable (rel)
+			        traceabilityMapping.put(ent, traceability);

+			    }

+			    edge.setSourceNode( getSearchNode(VPM_ENTITY));

+			    edge.setName("Entity-ins->"+rel.getName());

+			} else {

+                // have to create the Relation SearchGraph node

+			    if( getSearchNode(VPM_RELATION) == null) {

+			        ConstantSearchGraphNode ent = new ConstantSearchGraphNode();

+			        ent.setName("Relation");

+			        ent.setElement(VPM_RELATION_FQN);

+			        searchNodes.put(VPM_RELATION, ent);
+
+			        //traceability Information
+			        ConstantNodeTraceabilityElement traceability = new ConstantNodeTraceabilityElement(ent,rel);
+			        //TODO what to do if it is the vpm.Relation element?
+			        traceabilityMapping.put(ent, traceability);

+			    }

+			    edge.setSourceNode( getSearchNode(VPM_RELATION));

+			    edge.setName("Relation-ins->"+rel.getName());

+			}

+		}

+

+		if(result.containsIndex(relID)) {

+		//its a variable type element

+		    if(!searchNodes.containsKey(result.getIndex(relID))) {

+		        VariableSearchGraphNode node = new VariableSearchGraphNode();

+		        node.setId(result.getIndex(relID));

+		        node.setName(relID.getFancyName());

+		        searchNodes.put(node.getId(),node);

+
+		        //traceability
+		        VariableNodeTraceabilityElement traceability = new VariableNodeTraceabilityElement(node,rel);
+		        traceabilityMapping.put(node, traceability);
+

+		        //create new else branch needed for every new IMOdelElement type

+ 		        if(rel instanceof Entity)

+		        	node.setVpmModelElementType(VPMModelElementType.ENTITY);

+ 		        if(rel instanceof Relation)

+ 		        	node.setVpmModelElementType(VPMModelElementType.RELATION);

+

+ 		        if(rel.getType().size() == 0) {

+		            edge.setTargetNode(node);

+		            node.addSource(edge);

+		        }

+		    }

+		} else

+		//its a constant node

+		if(constantNodes.containsKey(rel.getName())) {

+			ConstantSearchGraphNode node = new ConstantSearchGraphNode();

+			node.setElement(rel.getRealElement());

+			node.setName(rel.getRealElement());

+			searchNodes.put(constantNodesNumber,node);

+			constantNodes.put(node.getName(), constantNodesNumber);

+			constantNodesNumber--;

+
+			 //traceability Information
+	        ConstantNodeTraceabilityElement traceability = new ConstantNodeTraceabilityElement(node,rel);
+	        traceabilityMapping.put(node, traceability);
+

+			if(rel.getType().size() == 0) {

+			    edge.setTargetNode(node);

+			    node.addSource(edge);

+			}

+		}

+	}

+

+	private void evaluateRelationship(Relationship rel, FlattenedPattern result, BodyNode bodyNode) {

+		SearchGraphNode suppliernode = null;

+		SearchGraphEdge edge = new SearchGraphEdge();

+		SearchGraphEdge invedge = null;

+		//supplier
+		ModelElement supplier = rel.getSupplier();

+		String supplierName = rel.getSupplierStr();

+		VariableID supplierID = bodyNode.getVariableID(supplierName);
+		//client
+		//ModelElement client = rel.getClient();
+		String clientName = rel.getClientStr();
+		VariableID clientID = bodyNode.getVariableID(clientName);
+
+		VariableSearchGraphNode clientnode =(VariableSearchGraphNode)searchNodes.get(result.getIndex(clientID));
+

+		if (result.containsIndex(supplierID)) {

+		    //supplier is a variable input type or not defined in the actual body

+			suppliernode = getSearchNode(result.getIndex(supplierID));
+
+			//the supplier node is a dangling element, needs to be processed later
+			if(suppliernode == null)
+				{
+				danglingElements.add(new DanglingVPMElementDTO(rel, bodyNode));
+	        	return;
+				}

+		} else {

+            // supplier is a constant

+			if (constantNodes.containsKey(supplierName)) {

+				suppliernode =  getSearchNode(constantNodes.get(supplierName));

+			} else {

+				suppliernode = new ConstantSearchGraphNode();

+			    ((ConstantSearchGraphNode)suppliernode).setElement(supplier.getRealElement());

+			    suppliernode.setName(((ConstantSearchGraphNode)suppliernode).getElement());

+			    searchNodes.put(constantNodesNumber,suppliernode);

+			    constantNodes.put(suppliernode.getName(), constantNodesNumber);

+			    constantNodesNumber--;
+
+			    //Traceability
+			    ConstantNodeTraceabilityElement traceability = new ConstantNodeTraceabilityElement((ConstantSearchGraphNode)suppliernode,supplier);
+		        traceabilityMapping.put(suppliernode, traceability);

+			}

+		}

+

+		if (rel instanceof TypeOf) {

+			edge.setVPMEdgeType(EdgeType.INSTANCEOF);

+			edge.setTargetNode(clientnode);

+			edge.setWeight(INSTANCEOF_WEIGHT);

+			edge.setOldWeight(INSTANCEOF_WEIGHT);

+			edge.setSource(true);

+			edge.setSourceNode(suppliernode);

+			edge.setName(suppliernode.getName()+"_instanceof_"+clientnode.getName());

+			clientnode.addSource(edge);

+

+			//inverse of instanceof

+			if (suppliernode instanceof VariableSearchGraphNode) {

+				invedge = new SearchGraphEdge();

+				invedge.setVPMEdgeType(EdgeType.INSTANCEOF);

+				invedge.setTargetNode(suppliernode);

+				invedge.setWeight(INSTANCEOF_WEIGHT*2);

+				invedge.setOldWeight(INSTANCEOF_WEIGHT*2);

+				invedge.setSource(false);

+				invedge.setSourceNode(clientnode);

+				invedge.setName(suppliernode.getName()+"_instanceofINV_"+clientnode.getName());

+				suppliernode.addSource(invedge);

+

+				edge.setInverseEdge(invedge);
+
+				//traceability inverse
+				EdgeTraceabilityElement inverseEdgeTraceability = new EdgeTraceabilityElement(invedge,rel);
+				traceabilityMapping.put(invedge, inverseEdgeTraceability);

+			}

+		} else {

+			edge.setVPMEdgeType(EdgeType.SUPERTYPEOF);

+			edge.setTargetNode(suppliernode);

+			edge.setSourceNode(clientnode);

+			edge.setSource(true);

+			edge.setWeight(SUPERTYPE_WEIGHT);

+			edge.setOldWeight(SUPERTYPE_WEIGHT);

+			edge.setName(suppliernode.getName()+"_supertypeof_"+clientnode.getName());

+			//edge.setParentinEMF(rel);

+			suppliernode.addSource(edge);

+

+			//inverse

+			invedge = new SearchGraphEdge();

+			invedge.setVPMEdgeType(EdgeType.SUPERTYPEOF);

+			invedge.setTargetNode(clientnode);

+			invedge.setSourceNode(suppliernode);

+			invedge.setSource(false);

+			invedge.setWeight(SUPERTYPE_WEIGHT*2);

+			invedge.setOldWeight(SUPERTYPE_WEIGHT*2);

+			invedge.setName(suppliernode.getName()+"_supertypeof_INV"+clientnode.getName());

+			clientnode.addSource(invedge);
+
+			edge.setInverseEdge(invedge);
+
+			//inverse relationship traceability
+			EdgeTraceabilityElement inverseEdgeTraceability = new EdgeTraceabilityElement(invedge,rel);
+			traceabilityMapping.put(invedge, inverseEdgeTraceability);

+		}
+
+		//relationship traceability
+		EdgeTraceabilityElement edgeTraceability = new EdgeTraceabilityElement(edge,rel);
+		traceabilityMapping.put(edge, edgeTraceability);
+	}

+

+	public void add(PatternReferenceNode prNode, FlattenedPattern result) throws PatternMatcherCompileTimeException {

+		final PatternNode reference = prNode.getReference();

+		final List<Term> actualParameters = prNode.getActualParameters();

+		final BodyNode parent = (BodyNode) prNode.getParent();
+		int weight = PATTERNCALL_WEIGHT;

+		//the parameter order of the pattern call mapped to the id values of the searchGraphNodes

+		Integer[] parameterMapping = new Integer[actualParameters.size()];

+

+		//The pattern call node

+		PatternCallSearchGraphNode patternCallNode = new PatternCallSearchGraphNode();

+		int index = result.addVariable(null);

+
+        patternCallNode.setName("PatternCallof_"+reference.getPattern().getName());

+        patternCallNode.setId(index);

+        patternCallNode.setVpmModelElementType(VPMModelElementType.OPERATION);

+        patternCallNode.setPatternNode(reference);

+        searchNodes.put(patternCallNode.getId(),patternCallNode);

+
+
+        //traceability pattern call
+		PatternCallNodeTraceabilityElement patternCallTraceabilityElement= new PatternCallNodeTraceabilityElement(patternCallNode,prNode.getPatternCall());
+		traceabilityMapping.put(patternCallNode, patternCallTraceabilityElement);
+
+		//if it is an incrementally matched pattern call new weigh values are set and it is attached to the Storage node
+        if(prNode.getReference() instanceof PatternNodeIncremental)
+        	{//TODO: traceability of the storage node and its edge? Is it needed?
+        	weight = PATTERNCALL_INCREMENTAL_WEIGHT;
+
+        	SearchGraphEdge edge = null;
+    		edge = new SearchGraphEdge();
+    		edge.setVPMEdgeType(EdgeType.PATTERN_CALL_STORAGE);
+    		edge.setWeight(PATTERNCALL_STORAGE_INCREMENTAL_WEIGHT);
+    		edge.setOldWeight(PATTERNCALL_STORAGE_INCREMENTAL_WEIGHT);
+    		edge.setSource(true);
+    		// have to create the Storage node
+    		if( getSearchNode(PATTERN_CALL_STORAGE_NODE) == null) {
+    		       ConstantSearchGraphNode ent = new ConstantSearchGraphNode();
+    		       ent.setName("Pattern_Call_Storage_Node");
+    		       ent.setElement(VPM_ENTITY_FQN);
+    		       searchNodes.put(PATTERN_CALL_STORAGE_NODE, ent);
+    		    }
+    		//sets the target and the source nodes
+    		edge.setSourceNode( getSearchNode(PATTERN_CALL_STORAGE_NODE));
+    		edge.setName("PatternStorage-store->"+patternCallNode.getName());
+
+    		edge.setTargetNode(patternCallNode);
+    		patternCallNode.addSource(edge);
+        	}
+

+        //connecting the variables to the pattern call

+        for (int i = 0; i < actualParameters.size(); i++) {

+        	if (actualParameters.get(i) instanceof VariableReference) {

+	        	VariableReference varRef= (VariableReference) actualParameters.get(i);

+	        	SearchGraphNode inputNode = null;

+	        	//the node is already processed in the flattened pattern

+	        	Integer variableIndex = result.getIndex(parent.getVariableID(varRef.getVariable()));

+	        	if (searchNodes.containsKey(variableIndex)) {

+	        		inputNode =  getSearchNode(variableIndex);

+	        		parameterMapping[i] = ((VariableSearchGraphNode)inputNode).getId();

+	        	} else {

+	        		// new search graph node only used in the pattern call!

+	        		inputNode = new VariableSearchGraphNode();

+

+	        		int id;

+	        		inputNode.setName(parent.getVariableID(varRef.getVariable()).toString());

+	        		//recursive pattern matching call

+	        		if (result.getIndex(parent.getVariableID(varRef.getVariable())) != null) {

+	        			//the parameter is passed through the pattern

+	        			//already has an index

+	        			id = result.getIndex(parent.getVariableID(varRef.getVariable()));

+	        		} else{

+	        			//new id

+	        			id = result.addVariable(parent.getVariableID(varRef.getVariable()));

+	        		}

+

+	        		((VariableSearchGraphNode)inputNode).setId(id);

+	        		searchNodes.put(((VariableSearchGraphNode)inputNode).getId(), inputNode);

+

+	        		parameterMapping[i] = id;
+
+	        		//traceability
+			        VariableNodeTraceabilityElement traceability = new VariableNodeTraceabilityElement((VariableSearchGraphNode) inputNode,varRef);
+			        traceabilityMapping.put(inputNode, traceability);
+

+	        		//System.out.println("Pattern Call inside GT pattern with through-passed variables");

+	        	}

+	        	//connects the pattern node to its input parameter nodes

+	        	SearchGraphEdge edgePatternCall = new SearchGraphEdge();

+	    		SearchGraphEdge edgePatternCallinverse = new SearchGraphEdge();

+

+	    		//		        <--PatternCall--

+	    		// Input Variable                  Pattern Call

+	    		//              --PatternCallinverse->

+

+	    		//pattern call edge

+	    		edgePatternCall.setSourceNode(inputNode);

+	    		edgePatternCall.setTargetNode(patternCallNode);

+	    		edgePatternCall.setSource(true);

+	    		edgePatternCall.setWeight(weight);

+	    		edgePatternCall.setOldWeight(weight);

+	    		edgePatternCall.setVPMEdgeType(EdgeType.PATTERN_CALL_PARAMETER);

+	    		edgePatternCall.setName(inputNode.getName()+"->"+patternCallNode.getName());

+	    		//edgeSource.setParentinEMF();

+	    		patternCallNode.addSource(edgePatternCall);

+

+	    		//inverse pattern call edge

+	    		edgePatternCallinverse.setSourceNode(patternCallNode);

+	    		edgePatternCallinverse.setTargetNode(inputNode);

+	    		edgePatternCallinverse.setSource(false);

+	    		edgePatternCallinverse.setWeight(PATTERNCALLINV_WEIGHT);

+	    		edgePatternCallinverse.setOldWeight(PATTERNCALLINV_WEIGHT);

+	    		edgePatternCallinverse.setVPMEdgeType(EdgeType.PATTERN_CALL_PARAMETER);

+	    		edgePatternCallinverse.setName(patternCallNode.getName()+"->"+inputNode.getName());

+	    		//edgeSourceinverse.setParentinEMF(rel);

+	    		inputNode.addSource(edgePatternCallinverse);

+

+	    		edgePatternCall.setInverseEdge(edgePatternCallinverse);
+
+	    		//traceability edge
+	    		EdgeTraceabilityElement edgeTraceability = new EdgeTraceabilityElement(edgePatternCall,varRef);
+	    		traceabilityMapping.put(edgePatternCall, edgeTraceability);
+
+	    		//traceability edge
+	    		EdgeTraceabilityElement inverseEdgeTraceability = new EdgeTraceabilityElement(edgePatternCallinverse,varRef);
+	    		traceabilityMapping.put(edgePatternCallinverse, inverseEdgeTraceability);

+	        } else {
+	        	String[] context = {""+i, prNode.getPatternCall().getCalledPattern().getName()};
+	        	PatternMatcherCompileTimeException e = new PatternMatcherCompileTimeException(PatternMatcherErrorStrings.ILLEGAL_INPUT_PARAMETER
+	        			,context
+	        			,actualParameters.get(i));
+	        	throw e;
+	        }

+        }

+        patternCallNode.setInputParameterMapping(parameterMapping);

+	}

+

+	public GTOperationContext generateGTOperations(Collection<GTElementMapping> gtElementMappings

+			,IModelManager manager

+	        ,PatternCallSignature[] signatures)

+	throws GTRuleBuildingException {

+

+		initSearchGraph();

+		ArrayList<IUpdatePlanOperation> manipulationOperations = new ArrayList<IUpdatePlanOperation>();

+		ArrayList<ISearchPlanOperation> checkSet = new ArrayList<ISearchPlanOperation>();

+		Collection<IUpdatePlanOperation> postSearchPlanOperations = new Vector<IUpdatePlanOperation>();

+		ElementManipulationOperation operation = null;

+		hasOneInConstraint = new HashMap<SearchGraphNode, Boolean>();
+

+		//Adds the to delete input variables to the manipulation operation plan

+		if(gtElementMappings != null)

+		 for(GTElementMapping map: gtElementMappings)

+			//have to keep the element

+			if(searchNodes.containsKey(map.getRhsInputOrderIndex()))

+				{map.setMappingType(GTElementMappingType.KEEP);

+				//all mapped elements are input parameters for the RHS

+				((VariableSearchGraphNode) getSearchNode(map.getRhsInputOrderIndex())).setInput(true);

+				((VariableSearchGraphNode) getSearchNode(map.getRhsInputOrderIndex())).setChecked(true);

+				}

+			else//have to delete the element

+				{

+				map.setMappingType(GTElementMappingType.DEL);

+				manipulationOperations.add(new DeleteModelElement(manager, map.getRhsInputOrderIndex()));

+				}

+

+        // All input parameter specific operations + Check set are generated

+    	for (int j = 0; j < signatures.length; j++) {

+             if (searchNodes.containsKey(j) &&  getSearchNode(j) instanceof VariableSearchGraphNode) {

+            	VariableSearchGraphNode node = (VariableSearchGraphNode)  getSearchNode(j);

+                if(signatures[j].getParameterMode().equals(ParameterMode.INPUT)) {

+                	{node.setInput(true);

+                	 Collection<IUpdatePlanOperation> _temp= GTOperationGenerator.getInputSpecificOperation(node,manager,checkSet);

+                	 if(_temp != null && _temp.size() > 0)

+                		 postSearchPlanOperations.addAll(_temp);

+                	}

+                } else {

+                	node.setInput(false);

+                }

+             }

+        }

+    	//generateInit(inputMapping, signature, template,manager, gtElementMappings);

+		searchNodeOrder = alg.evaluateSearchPlan(this);

+		//boolean hasINConstraint = false;

+		for(SearchGraphNode node : searchNodeOrder) {

+			if(node instanceof ConstantSearchGraphNode) {

+				node.setChecked(true);

+            }

+			GTRuleValidator.validateContainment(node, manager,hasOneInConstraint);

+			//all not mapped variable search graph node have to be created

+			if((!node.isChecked()) && node.getTreeEdge() != null

+					&& (!node.getTreeEdge().isChecked())) {

+				 operation = GTOperationGenerator.getModelManipulationOperation((VariableSearchGraphNode)node, manager,checkSet,this);

+				 if(operation!= null) {

+				     //operation.toString();

+				     manipulationOperations.add(operation);

+				 }

+			}

+			//edges that have to be created

+			for(SearchGraphEdge edge: node.getSources()) {

+				if(edge.getSourceNode().isChecked() && edge.getTargetNode().isChecked() && !edge.isChecked()) {

+				    operation = GTOperationGenerator.getModelManipulationOperation(edge,  manager,checkSet,this);

+				    if(operation!= null) {

+				        //operation.toString();

+				        manipulationOperations.add(operation);

+				    }

+				}

+			}

+		}

+//		 have to check if there are unchecked element in the searchGraph (they must be created or simply checked)

+		boolean noUncheckedOperation = true;

+

+		do {

+		noUncheckedOperation = true;

+			for(SearchGraphNode node : searchNodeOrder) {

+				if(!node.isChecked()) {

+					//System.out.println("Node: "+node.getName());

+					operation = GTOperationGenerator.getModelManipulationOperation((VariableSearchGraphNode)node, manager , checkSet,this);

+					if(operation == null)

+						{noUncheckedOperation = false;}

+					else {

+						manipulationOperations.add(operation);

+						node.setChecked(true);

+					}

+				}

+				//edge checking

+				for(SearchGraphEdge edge : node.getSources())

+					if(!edge.isChecked()

+							&& edge.getSourceNode().isChecked()

+							&& edge.getTargetNode().isChecked())

+						{operation = GTOperationGenerator.getModelManipulationOperation(edge, manager, checkSet,this);

+						//System.out.println("Edge: "+node.getName());

+						if(operation == null)

+							{noUncheckedOperation = false;}

+						else

+							{

+							manipulationOperations.add(operation);

+							edge.setChecked(true);

+							}

+						}

+			}

+		} while(!noUncheckedOperation);

+

+		if(postSearchPlanOperations.size() != 0)

+			manipulationOperations.addAll(postSearchPlanOperations);

+

+		GTRuleValidator gtRuleValidator = new GTRuleValidator();

+		gtRuleValidator.validateOperationPlan(manipulationOperations,checkSet,gtElementMappings,this);

+

+

+		return new GTOperationContext(null,manipulationOperations,checkSet);

+	}

+

+	public Collection<SearchPlanOperation> generateSearchPlan(FlattenedPattern pattern, Boolean[] adornment, IModelManager manager) throws PatternMatcherRuntimeException{

+        // Search graph initialization and search plan generation

+    	for (int j = 0; j < adornment.length; j++) {

+    		SearchGraphNode node = getSearchNode(j);

+            if (node instanceof VariableSearchGraphNode) {

+            	((VariableSearchGraphNode) node).setInput(adornment[j]);

+            }

+        }

+    	searchNodeOrder= alg.evaluateSearchPlan(pattern.getSearchGraph());

+    	return VPMPatternOperationGenerator.evaluateVPMOperationPlan(searchNodeOrder, new MatchingFrame(pattern),manager);

+	}
+
+	public AnnotatedElement getGTASMRepresentation(AbstractNode node) {
+		return node.getTraceabilityElement().getRepresentativeEMFElement();
+	}
+
+	public void addTraceabilityElement(SearchGraphEdge edge, EdgeTraceabilityElement element){
+		traceabilityMapping.put(edge, element);
+	}
+
+	public void addTraceabilityElement(SearchGraphNode node, NodeTraceabilityElement element){
+		traceabilityMapping.put(node, element);
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/algorithms/VPMPatternOperationGenerator.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/algorithms/VPMPatternOperationGenerator.java
new file mode 100644
index 0000000..2ea0a3a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/algorithms/VPMPatternOperationGenerator.java
@@ -0,0 +1,386 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.algorithms;

+

+import java.util.Vector;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.EdgeType;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.AllEntitiesOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.AllRelationsOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.BoundToBoundCheckOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.BoundToConstantCheckOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.ConstantToBoundCheckOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.ConstantToConstantCheckOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.CopyValueOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.ExtendBoundNodeOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.ExtendConstantNodeOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.IsEntityorRelationCheckOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.PatternCallOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.SearchPlanOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.VariableAssignmentCheckOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.ConstantSearchGraphNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.PatternCallSearchGraphNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.VariableSearchGraphNode;
+

+

+/**Generates the operations base on the search plan.

+ * @author Akos Horvath

+ *

+ */

+public class VPMPatternOperationGenerator {

+	

+	public static Vector<SearchPlanOperation> evaluateVPMOperationPlan(SearchGraphNode[] searchPlan,
+			MatchingFrame template,
+			IModelManager manager) throws PatternMatcherRuntimeException{

+		Vector<SearchPlanOperation> searchOperations = new Vector<SearchPlanOperation>();

+		SearchPlanOperation operation = null;

+		

+		for(SearchGraphNode node : searchPlan){

+			if(node instanceof ConstantSearchGraphNode)

+				node.setChecked(true);

+

+			//tree edge evaluation

+			if(node.getTreeEdge() != null && (!node.isChecked()))

+				{operation = VPMPatternOperationGenerator.treeEdgeSearchOperation(node.getTreeEdge(), template,manager);

+				if(operation!= null)

+					{	//operation.debug();

+						searchOperations.add(operation);

+					}

+				}

+			//check operation evaluation	

+			for(SearchGraphEdge edge : node.getSources()){

+				if(edge.getSourceNode().isChecked() && edge.getTargetNode().isChecked())

+					{operation = VPMPatternOperationGenerator.evaluateEdgeSearchPlanOperation(edge, template,manager);

+						if(operation != null)

+							{//operation.debug();

+							searchOperations.add(operation);

+							}

+					}

+				}

+		}

+		// have to check if there are any edges left

+		for(SearchGraphNode node : searchPlan)

+			for(SearchGraphEdge edge : node.getSources())

+				if(!edge.isChecked())

+					{

+					//oldVersion operation = checkSearchOperation(edge, template);

+					operation= VPMPatternOperationGenerator.evaluateEdgeSearchPlanOperation(edge,template,manager);

+					//operation.debug();

+					if(operation != null)

+						searchOperations.add(operation);

+					//searchOperations.add(checkSearchOperation(edge));

+					}

+		

+		

+		return searchOperations;

+	}

+	

+	

+	

+	/** Returns the corresponding search plan operation equivalent to the input search graph edge

+	 * @param edge The edge to process

+	 * @param template the Matching frame with the bound variables

+	 * @param manager Model manager of the actual model space

+	 * @return the generated operation

+	 */

+	public static SearchPlanOperation evaluateEdgeSearchPlanOperation(
+			SearchGraphEdge edge,
+			MatchingFrame template,
+			IModelManager manager) throws PatternMatcherRuntimeException

+	{SearchPlanOperation operation = null;

+		if(edge.isChecked()) return null; 

+		

+		//checking the type of the edge, for debugging

+		if(edge.getVPMEdgeType() == EdgeType.BELOW 

+				|| edge.getVPMEdgeType() == EdgeType.IN

+				|| edge.getVPMEdgeType() == EdgeType.INSTANCEOF 

+				|| edge.getVPMEdgeType() == EdgeType.SOURCE 

+				|| edge.getVPMEdgeType() == EdgeType.TARGET

+				|| edge.getVPMEdgeType() == EdgeType.SUPERTYPEOF

+				|| edge.getVPMEdgeType() == EdgeType.PATTERN_CALL_PARAMETER

+				|| edge.getVPMEdgeType() == EdgeType.VARIABLE_ASSIGNMENT) //TODO: new edge types has to be added to this check

+			{

+			operation = checkSearchOperation(edge, template,manager);

+			}

+		else

+			{
+			String[] context = {edge.getVPMEdgeType().toString(), edge.getName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_EDGETYPE_NOT_SUPPORTED
+					,context
+					,template.getPattern().getGTASMRepresentation(edge));
+			}

+		return operation;

+	}

+	

+	

+	/** Returns the corresponding search plan operation equivalent of the input search graph edge (CHECK OPERATIONS)

+	 * @param edge The edge whose operation is generated

+	 * @param template template the Matching frame with the bound variables

+	 * @param manager model manager

+	 * @return the operation itself

+	 */

+	private static SearchPlanOperation checkSearchOperation(
+			SearchGraphEdge edge,
+			MatchingFrame template,
+			IModelManager manager)

+	throws PatternMatcherRuntimeException{

+		SearchPlanOperation operation = null;

+

+		//some of the check operations have to be skipped as they does not represent any additional constraints

+		if( edge.getSourceNode() instanceof VariableSearchGraphNode

+				&& edge.getVPMEdgeType().equals(EdgeType.BELOW)	//default Scope value

+				&& (template.getValue(((VariableSearchGraphNode)edge.getSourceNode()).getId()) != null)			//default Scope value

+				&& ((IModelElement)template.getValue(((VariableSearchGraphNode)edge.getSourceNode()).getId())).equals(manager.getRoot()))

+			{	

+			edge.setChecked(true);

+			return null;

+			}

+		

+		// in case the source is an entity or a relation a special check operation is required

+		if(	edge.getSourceNode() instanceof ConstantSearchGraphNode

+				&& edge.getVPMEdgeType().equals(EdgeType.INSTANCEOF)

+				&& ( ((ConstantSearchGraphNode)edge.getSourceNode()).getElement().equals(ISearchGraph.VPM_RELATION_FQN) 

+						|| ((ConstantSearchGraphNode)edge.getSourceNode()).getElement().equals(ISearchGraph.VPM_ENTITY_FQN) ))

+			{

+			//TODO: Can an entity have an instance relation to an entity?
+			//If yes, then can be tricked out as an entity can have an instance relation to a relation and it is not checked

+			operation = new IsEntityorRelationCheckOperation(((VariableSearchGraphNode)edge.getTargetNode()).getId()

+					,edge,

+					((ConstantSearchGraphNode)edge.getSourceNode()).getElement());

+			edge.setChecked(true);

+			return operation;

+			}	

+		/************complex operations******************/

+		//pattern call operation

+		if(edge.getTargetNode() instanceof PatternCallSearchGraphNode)

+				{
+				String[] context = {edge.getTargetNode().getName()};

+				throw new PatternMatcherRuntimeException(
+						PatternMatcherErrorStrings.INTERNAL_PATTERNCALLNODE_EXCEPTION
+						,context
+						,template.getPattern().getGTASMRepresentation(edge));

+				}

+				

+		

+		/**************simple operations*******************/

+		if(edge.getVPMEdgeType().equals(EdgeType.VARIABLE_ASSIGNMENT))

+			operation = new VariableAssignmentCheckOperation(((VariableSearchGraphNode)edge.getSourceNode()).getId(),

+					((VariableSearchGraphNode)edge.getTargetNode()).getId()
+					,edge); //TODO: does the direction counts? (inverse or not)

+		else

+		if(edge.getSourceNode() instanceof VariableSearchGraphNode && edge.getTargetNode() instanceof VariableSearchGraphNode)

+			operation = new BoundToBoundCheckOperation(((VariableSearchGraphNode)edge.getSourceNode()).getId()

+						,((VariableSearchGraphNode)edge.getTargetNode()).getId()

+						,edge);

+		else

+		if(edge.getSourceNode() instanceof VariableSearchGraphNode && edge.getTargetNode() instanceof ConstantSearchGraphNode )

+			operation = new BoundToConstantCheckOperation(((VariableSearchGraphNode)edge.getSourceNode()).getId()

+					,manager.getElementByName(((ConstantSearchGraphNode)edge.getTargetNode()).getElement())

+					,edge);

+		else

+		if(edge.getSourceNode() instanceof ConstantSearchGraphNode && edge.getTargetNode() instanceof VariableSearchGraphNode)

+			operation = new ConstantToBoundCheckOperation(manager.getElementByName(((ConstantSearchGraphNode)edge.getSourceNode()).getElement())

+					,((VariableSearchGraphNode)edge.getTargetNode()).getId()

+					,edge);

+		else

+		if(edge.getSourceNode() instanceof ConstantSearchGraphNode && edge.getTargetNode() instanceof ConstantSearchGraphNode)

+			operation = new ConstantToConstantCheckOperation(manager.getElementByName(((ConstantSearchGraphNode)edge.getSourceNode()).getElement())

+					,manager.getElementByName(((ConstantSearchGraphNode)edge.getTargetNode()).getElement())

+					,edge);

+		

+		if(operation != null)

+			edge.setChecked(true);

+		

+		return operation;

+		

+	}

+	

+	private static int getPatternCallParameterId(Integer id,
+			PatternCallSearchGraphNode callNode, MatchingFrame frame
+			) throws PatternMatcherRuntimeException {

+		Integer[] inputParameterMapping = callNode.getInputParameterMapping();
+		
+		for(int i =0; i< inputParameterMapping.length; i++)

+			if(id == inputParameterMapping[i])

+				return i;

+		
+		String[] context = {callNode.getName()};

+		throw new PatternMatcherRuntimeException(
+				PatternMatcherErrorStrings.INTERNAL_PATTERNCALLNODE_WRONGPARAMETER_ORDER
+				,context
+				,frame.getPattern().getGTASMRepresentation(callNode));

+	}

+

+	/** Returns the corresponding search plan operation equivalent of the input search graph TREE edge (EXTEND OPERATIONS)

+	 * @param edge 

+	 * @param Matchingframe containing the bound variables

+	 * @param manager model manager

+	 * @return

+	 */

+	public static SearchPlanOperation treeEdgeSearchOperation(SearchGraphEdge edge, MatchingFrame template, IModelManager manager) throws PatternMatcherRuntimeException{

+		SearchPlanOperation operation = null;

+		if(edge.getSourceNode().isChecked() && edge.getTargetNode().isChecked())

+			//the source and the target are already checked, simple checks the edge

+			operation = checkSearchOperation(edge, template,manager);

+		else//not a check type operation

+

+		/**********complex operations**********/

+		if(edge.getVPMEdgeType().equals(EdgeType.PATTERN_CALL_PARAMETER)
+				|| edge.getVPMEdgeType().equals(EdgeType.PATTERN_CALL_STORAGE))

+		{

+			if(edge.isSource()) //the edge is the tree edge of the pattern call node

+			{

+				PatternCallSearchGraphNode callNode = (PatternCallSearchGraphNode) edge.getTargetNode();

+				Boolean[] boundParameters = new Boolean[callNode.getPatternNode().getPattern().getSymParameters().size()];

+				

+					for (SearchGraphEdge callEdge:callNode.getSources())
+					{

+						//[DEBUG] error in the algorithm, one edge of the PatternCall node is already checked

+						//if(!callEdge.isChecked())

+						//	System.out.println("[ERROR] One edge of a PatternCallNode is already traversed before the PatternNode was traversed");

+

+						//if it is a bound input parameter

+						if(callEdge.getVPMEdgeType().equals(EdgeType.PATTERN_CALL_PARAMETER))
+						{	if(callEdge.getSourceNode().isChecked())

+								{

+								boundParameters[getPatternCallParameterId(((VariableSearchGraphNode)callEdge.getSourceNode()).getId()

+																		,callNode,template)] = true;

+								}

+							else//the pattern call will bound the variable

+							{	if(callEdge.getSourceNode().getTreeEdge().getSourceNode().equals(callNode))

+									{

+									boundParameters[getPatternCallParameterId(((VariableSearchGraphNode)callEdge.getSourceNode()).getId()

+											,callNode,template)] = false;

+									callEdge.getSourceNode().setChecked(true);

+									}

+								else//Error the recursive call is not the tree edge for an unbound parameter

+									{
+									String[] context = {callEdge.getSourceNode().getName(),callNode.getName()};

+									throw new PatternMatcherRuntimeException(
+											PatternMatcherErrorStrings.INTERNAL_PATTERNCALLNODE_EDGE_EXCEPTION
+											,context

+											,template.getPattern().getGTASMRepresentation(callNode));

+									}

+							}
+						}
+						//else // it is an incrementally matched pattern call -> not part of the invocation context
+
+						callEdge.setChecked(true);

+					}

+					return //PatternCallOperation patternOperation =

+						new PatternCallOperation(callNode.getPatternNode()

+							,callNode.getInputParameterMapping(),boundParameters);

+				

+			}

+			else//the edge is an outgoing edge from a pattern call node

+			{

+				//edge.getTargetNode().setChecked(true);

+				PatternCallSearchGraphNode callNode = (PatternCallSearchGraphNode) edge.getSourceNode();
+				String[] context = {edge.getName(),callNode.getName()};
+				throw new PatternMatcherRuntimeException(
+						PatternMatcherErrorStrings.INTERNAL_PATTERNCALLNODE_EDGE_TRAVERSAL_EXCEPTION
+						,context
+						,template.getPattern().getGTASMRepresentation(callNode));
+			}

+		}

+		/**************simple operations	******************/

+		else	

+		if(edge.getSourceNode().isChecked())

+				{

+				//simple operation

+				if(edge.getVPMEdgeType().equals(EdgeType.VARIABLE_ASSIGNMENT))

+					{operation = new CopyValueOperation(((VariableSearchGraphNode)edge.getSourceNode()).getId()

+							,((VariableSearchGraphNode)edge.getTargetNode()).getId()
+							,edge);

+					}

+				else

+				if(edge.getSourceNode() instanceof ConstantSearchGraphNode &&

+						((ConstantSearchGraphNode)edge.getSourceNode()).getElement().equals(ISearchGraph.VPM_ENTITY_FQN))	

+					{

+					operation = new AllEntitiesOperation(((VariableSearchGraphNode)edge.getTargetNode()).getId()

+							,edge, manager);

+					}

+				else

+				if(edge.getSourceNode() instanceof ConstantSearchGraphNode &&

+							((ConstantSearchGraphNode)edge.getSourceNode()).getElement().equals(ISearchGraph.VPM_RELATION_FQN))	

+						{

+						operation = new AllRelationsOperation(((VariableSearchGraphNode)edge.getTargetNode()).getId()

+								,edge, manager);

+						}

+				else

+				if(edge.getSourceNode() instanceof VariableSearchGraphNode && edge.getTargetNode() instanceof VariableSearchGraphNode)

+					{operation = new ExtendBoundNodeOperation(((VariableSearchGraphNode)edge.getSourceNode()).getId()

+							,((VariableSearchGraphNode)edge.getTargetNode()).getId()

+							,edge);

+					}

+				else

+					if(edge.getSourceNode() instanceof ConstantSearchGraphNode && edge.getTargetNode() instanceof VariableSearchGraphNode)

+					{operation = new ExtendConstantNodeOperation(manager.getElementByName(((ConstantSearchGraphNode)edge.getSourceNode()).getElement())

+							,((VariableSearchGraphNode)edge.getTargetNode()).getId()

+							,edge);

+					}	

+				}

+		else

+		if(edge.getTargetNode().isChecked())

+			{

+			//simple operation

+			if(edge.getVPMEdgeType().equals(EdgeType.VARIABLE_ASSIGNMENT))

+			{operation = new CopyValueOperation(((VariableSearchGraphNode)edge.getTargetNode()).getId()

+					,((VariableSearchGraphNode)edge.getSourceNode()).getId()
+					,edge);

+				}

+			if(edge.getTargetNode() instanceof ConstantSearchGraphNode &&

+					((ConstantSearchGraphNode)edge.getTargetNode()).getElement().equals(ISearchGraph.VPM_ENTITY_FQN))	

+				{

+				operation = new AllEntitiesOperation(((VariableSearchGraphNode)edge.getSourceNode()).getId()

+						,edge, manager);

+				}

+			else

+			if(edge.getTargetNode() instanceof ConstantSearchGraphNode &&

+						((ConstantSearchGraphNode)edge.getTargetNode()).getElement().equals(ISearchGraph.VPM_RELATION_FQN))	

+					{

+					operation = new AllRelationsOperation(((VariableSearchGraphNode)edge.getSourceNode()).getId()

+							,edge, manager);

+					}

+			else

+			if(edge.getSourceNode() instanceof VariableSearchGraphNode && edge.getTargetNode() instanceof VariableSearchGraphNode)

+				{operation = new ExtendBoundNodeOperation(((VariableSearchGraphNode)edge.getTargetNode()).getId()

+						,((VariableSearchGraphNode)edge.getSourceNode()).getId()

+						,edge);

+				}

+			else

+			if(edge.getSourceNode() instanceof ConstantSearchGraphNode && edge.getTargetNode() instanceof VariableSearchGraphNode)

+				{operation = new ExtendConstantNodeOperation(manager.getElementByName(((ConstantSearchGraphNode)edge.getTargetNode()).getElement())

+						,((VariableSearchGraphNode)edge.getSourceNode()).getId()

+						,edge);

+				}	

+			}

+		

+		if(operation != null)

+			{

+			edge.getSourceNode().setChecked(true);

+			edge.getTargetNode().setChecked(true);

+			edge.setChecked(true);

+			}

+		

+		return operation;

+		

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/BodyNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/BodyNode.java
new file mode 100644
index 0000000..1ade96a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/BodyNode.java
@@ -0,0 +1,482 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph;

+

+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.impl.executionEnvironment.ExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherCompileTimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.core.PatternBuilder;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.EdgeType;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcher;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.VariableID;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.algorithms.ISearchGraph;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.FlattenedPattern.Pair;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.CheckOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.NACCheckOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability.EdgeTraceabilityElement;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.ITermHandler;
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IPatternMatcher;
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.PatternMatcherProvider;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.NonInjectivityConstraint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableAssignment;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;
+import org.eclipse.viatra2.logger.Logger;
+

+

+

+public class BodyNode extends EvenLevelNode implements IFlattenedPatternElement {

+   private GTPatternBody body;

+    protected OddLevelNode[] children;

+

+    BodyNode(PatternMatcher patternMatcher,

+    		PatternNode parent, GTPatternBody body) throws PatternMatcherCompileTimeException {

+        super(parent);

+        this.body = body;

+        this.children = new OddLevelNode[body.getCalledPatterns().size()];

+

+        List<GTPatternCall> patternCalls = body.getCalledPatterns();

+        for (int i = 0; i < patternCalls.size(); i++) {

+            GTPatternCall patternCall = patternCalls.get(i);

+            PatternNode loopClosingNode = causesRecursion(patternCall.getCalledPattern());

+            if (loopClosingNode == null) {

+                if(isIncrementallyMatched(patternCall.getCalledPattern()))
+                {
+            		IExecutionEnvironment executionEnvironment = new ExecutionEnvironment(patternMatcher.getModelManager().getRoot().getModelSpace().getFramework());
+            		try {
+            			IPatternMatcher patternMatcherInc = null;
+            			patternMatcherInc =  PatternMatcherProvider.getInstance().getPatternMatcher(executionEnvironment, patternCall.getCalledPattern());
+            			PatternNode child = new PatternNodeIncremental(new PatternMatcherWrapper(patternMatcherInc,
+            					patternMatcher.getLogger(),patternMatcher.getModelManager(),
+            					patternMatcher.getTermHandler())
+            			, this, patternCall);
+                    	children[i] = new PatternReferenceNode(this,patternCall,child);
+            		} catch (ViatraTransformationException e) {
+            			// It is a Major bug if an exception is caught here. Means that an already incrementally matched pattern does not have a valid PatternMatcher!
+            			String[] context = {patternCall.getCalledPattern().getName(),e.getMessage()};
+            			throw new PatternMatcherCompileTimeException(
+            					PatternMatcherErrorStrings.INTERNAL_INCREMENTALLY_MATCED_PATTERN_HAS_NO_PATTERNMATCHER
+            					,context
+            					,patternCall);
+            		}
+
+                }
+                else
+                {
+            	PatternNode child = new PatternNode(patternMatcher, this, patternCall);

+                children[i] = child.isRoot()

+                		? new PatternReferenceNode(this, patternCall, child) : child;
+                }

+            } else {

+                children[i] = new PatternReferenceNode(this, patternCall, loopClosingNode);

+            }

+        }

+    }

+

+    /** Returns true if the input called pattern is incrementally matched
+     * @param calledPattern The called pattern to be checked
+     * @return Boolean true if incrementally checked
+     * @throws PatternMatcherCompileTimeException
+     */
+    private boolean isIncrementallyMatched(GTPattern calledPattern) throws PatternMatcherCompileTimeException{
+
+    	EList<RuntimeAnnotation> rtAnnotationsMachine = calledPattern.getNamespace().getRuntimeAnnotations();
+		boolean isMachineIncremental = false;
+    	if (rtAnnotationsMachine != null && rtAnnotationsMachine.size() > 0) {
+			for (RuntimeAnnotation an: rtAnnotationsMachine) {
+				if ("@incremental".equals(an.getAnnotationName().toLowerCase()))
+					{
+					isMachineIncremental = true;
+					}
+				 else if ("@localsearch".equals(an.getAnnotationName()
+						.toLowerCase()))
+				 	{
+					 isMachineIncremental = false;
+				 	}
+				}
+    	}
+
+    	EList<RuntimeAnnotation> rtAnnotationsPattern = calledPattern.getRuntimeAnnotations();
+
+    	if (rtAnnotationsPattern != null && rtAnnotationsPattern.size() > 0) {
+			for (RuntimeAnnotation an: rtAnnotationsPattern) {
+				if ("@incremental".equals(an.getAnnotationName().toLowerCase()))
+					return true;
+
+				if ("@localsearch".equals(an.getAnnotationName()
+							.toLowerCase()))
+					return false;
+			}
+		}
+		return isMachineIncremental; //machine default is used
+	}
+
+	protected PatternNode causesRecursion(GTPattern patternToTest) {

+        return parent.causesRecursion(patternToTest);

+    }

+

+    @Override

+    protected boolean traverse(PatternVariantIterator token) {

+        int size = children.length;

+        assert index == 0 || index == size - 1;

+        while (index >= 0 && index < size) {

+            if (children[index].traverse(token)) {

+                index++;

+            } else {

+                children[index].index = 0;

+                index--;

+            }

+        }

+        boolean result = (index == size);

+        index--;

+        return result;

+    }

+

+    public GTPatternBody getBody() {

+        return body;

+    }

+

+    public VariableID getVariableID(String name) {

+    	return new VariableID(parent.getPattern(), currentLocation, name);

+    }

+

+    public VariableID getVariableID(Variable variable) {

+    	return new VariableID(parent.getPattern(), currentLocation, variable.getName());

+    }

+

+    public VariableID getVariableID(ModelElement element) {

+        return new VariableID(parent.getPattern(), currentLocation, element.getName());

+    }

+

+    private BodyNode getCallerBody() {

+    	return (BodyNode) parent.getParent();

+    }

+

+    public void addLocalVariables(FlattenedPattern pattern) {

+        // Handling of local variables

+        for (Iterator<PatternVariable> iter = body.getLocalVariables().iterator(); iter.hasNext();) {

+            PatternVariable variable = iter.next();

+            pattern.addVariable(getVariableID(variable));

+        }

+    }

+

+    public void addFormalParameters(FlattenedPattern pattern)

+        throws PatternMatcherCompileTimeException {

+        if (parent.isRoot()) {

+            assert body.getHeader() == parent.getPattern();

+        	GTPattern firstPattern = body.getHeader();

+            List<PatternVariable> formalParameters = firstPattern.getSymParameters();

+            int numberOfFormalParameters = formalParameters.size();

+            for (Integer i = 0; i < numberOfFormalParameters; i++) {

+                // TODO gervarro: name convention for local pattern declarations is missing

+                pattern.addVariable(getVariableID(formalParameters.get(i)));

+            }

+            assert firstPattern.getSymParameters().size() == pattern.getFrameSize();

+        } else {

+            // Handling of pattern calls in FlattenedPatterns (i.e., parameter passing)

+            Integer numberOfActualParameters = parent.getActualParameters().size();

+            if (numberOfActualParameters == parent.getPattern().getSymParameters().size()) {

+                for (int j = 0; j < numberOfActualParameters; j++) {

+                    Term actualTerm = parent.getActualParameters().get(j);

+                    PatternVariable formalParameter = parent.getPattern().getSymParameters().get(j);

+                    if (actualTerm instanceof VariableReference) {

+                        VariableReference varRef = (VariableReference) actualTerm;

+                        PatternVariable actualParameter = (PatternVariable) varRef.getVariable();

+                        Integer index = pattern.getIndex(getCallerBody().getVariableID(actualParameter));

+                        pattern.setIndex(getVariableID(formalParameter), index);

+                    } else {

+                        // Based on the latest directive of Dani, terms are not allowed in inner pattern calls

+                        String[] context = {""+j, parent.getPattern().getName()};
+                    	throw new PatternMatcherCompileTimeException(
+                    			PatternMatcherErrorStrings.NO_TERM_IN_PATTERN_CALLS
+                    			,context
+                    			,actualTerm);

+                        /*

+                        // Term evaluation

+                        Integer index = pattern.addVariable(getVariableID(formalParameter));

+                        TermHandler handler = pattern.getTermHandler();

+                        AbstractTermCheckOperation operation =

+                            handler.getTermEvaluationOperation(parent.pattern, currentLocation, actualTerm, index);

+                        pattern.addPreSearchPlanOperation(operation);

+                        */

+                    }

+                }

+            } else {
+            	String[] context = {parent.getPattern().getName()};

+                throw new PatternMatcherCompileTimeException(
+                		PatternMatcherErrorStrings.INTERNAL_FORMAL_AND_ACTUAL_PARAMETER_MISMATCH
+                		,context
+                		,parent.getPattern());

+            }

+        }

+    }

+

+    public Collection<Pair> processVariableAssignments(FlattenedPattern pattern)

+        throws PatternMatcherCompileTimeException {

+    	ArrayList<Pair> pairs = null;
+    	List<PatternVariableAssignment> assigments = body.getVariableAssignments();

+        if (assigments != null) {
+        	pairs = new ArrayList<Pair>();

+            for (int i = 0; i < assigments.size(); i++) {

+                VariableID leftID = getVariableID(assigments.get(i).getLeftValue().getVariable());

+                VariableID rightID = getVariableID(assigments.get(i).getRightValue().getVariable());

+
+                int left = pattern.getIndex(leftID);
+                int right = pattern.getIndex(rightID);
+
+                //The variable assignment operation is handled here
+                SearchGraphNode leftNode = pattern.getSearchGraph().getSearchNodes().get(left);
+                SearchGraphNode rightNode = pattern.getSearchGraph().getSearchNodes().get(right);
+
+                if(leftNode == null)
+            	{
+            	String[] context = {leftID.getFancyName()};
+                throw new PatternMatcherCompileTimeException(
+                		PatternMatcherErrorStrings.VARIABLE_VARIABLEASSIGMENT_MISSING
+                		,context
+                		,assigments.get(i));
+            	}
+
+                if(rightNode == null)
+            	{//Errofull part
+            	String[] context = {rightID.getFancyName()};
+                throw new PatternMatcherCompileTimeException(
+                		PatternMatcherErrorStrings.VARIABLE_VARIABLEASSIGMENT_MISSING
+                		,context
+                		,assigments.get(i));
+            	}
+
+                pairs.add(pattern.addInjectivityExclusionPair(left, right));
+                //pattern.removeInjectivityInclusionPair(left,right);
+
+

+                SearchGraphEdge edge = new SearchGraphEdge();

+                SearchGraphEdge invedge = new SearchGraphEdge();

+

+                edge.setVPMEdgeType(EdgeType.VARIABLE_ASSIGNMENT);

+                edge.setOldWeight(ISearchGraph.VARIABLEASSIGNMENT_WEIGHT);

+                edge.setWeight(ISearchGraph.VARIABLEASSIGNMENT_WEIGHT);

+                edge.setSourceNode(leftNode);

+                edge.setTargetNode(rightNode);

+                edge.setSource(true);

+

+                edge.setName(leftNode.getName() +" variable assignment " + rightNode.getName());

+

+                invedge.setVPMEdgeType(EdgeType.VARIABLE_ASSIGNMENT);

+                invedge.setOldWeight(ISearchGraph.VARIABLEASSIGNMENT_WEIGHT);

+                invedge.setWeight(ISearchGraph.VARIABLEASSIGNMENT_WEIGHT);

+                invedge.setSourceNode(rightNode);

+                invedge.setTargetNode(leftNode);

+                invedge.setSource(false);

+                invedge.setName(rightNode.getName() +" INVERSE variable assignment " + leftNode.getName());

+                invedge.setInverseEdge(invedge);

+

+                rightNode.addSource(edge);

+                leftNode.addSource(invedge);
+
+                //traceability
+
+                EdgeTraceabilityElement edgeTraceability = new EdgeTraceabilityElement(edge,assigments.get(i));
+        		pattern.getSearchGraph().addTraceabilityElement(edge, edgeTraceability);
+
+        	    //source inverse
+        	    EdgeTraceabilityElement inverseEdgeTraceability = new EdgeTraceabilityElement(invedge,assigments.get(i));
+        	    pattern.getSearchGraph().addTraceabilityElement(invedge, inverseEdgeTraceability);

+            }

+        }

+        return pairs;

+    }
+
+    public Collection<Pair> processInjectivityAssignments(FlattenedPattern pattern)
+    throws PatternMatcherCompileTimeException {
+    ArrayList<Pair> pairs= null;
+    List<NonInjectivityConstraint> constraints = body.getNonInjectivityConstraints();
+    if (constraints != null) {
+    	pairs = new ArrayList<Pair>();
+        for (int i = 0; i < constraints.size(); i++) {
+            VariableID leftID = getVariableID(constraints.get(i).getLeftValue().getVariable());
+            VariableID rightID = getVariableID(constraints.get(i).getRightValue().getVariable());
+            int left = pattern.getIndex(leftID);
+            int right = pattern.getIndex(rightID);
+            pairs.add(pattern.addInjectivityInclusionPair(left, right));
+            // pattern.removeInjectivityExclusionPair(left, right); //have to remove from the Exclusion list as it is explicitly defined with the Injectivity assignment
+        }
+    }
+
+    return pairs;
+    }
+
+    public void generateElementInjectivityConstraints(FlattenedPattern flattenedPattern,
+    		Collection<Pair> localAdditionalExclusionInjectivityPairs,
+			Collection<Pair> localAdditionalInclusionInjectivityPairs) throws PatternMatcherCompileTimeException {
+
+    	 HashSet<Integer> bodyPatternIndexes = new HashSet<Integer>();
+    	 boolean isDistinctMatching = parent.getPattern().isDistinctMatching();
+
+    	 //local variables
+    	 for (Iterator<PatternVariable> iter = body.getLocalVariables().iterator(); iter.hasNext();) {
+             PatternVariable variable = iter.next();
+             Integer localVariableIndex = flattenedPattern.getIndex(getVariableID(variable));
+             bodyPatternIndexes.add(localVariableIndex);
+         }
+
+    	 //symbolic parameters are already attached to their actual invocation parameters
+    	 for (Iterator<PatternVariable> iter = parent.getPattern().getSymParameters().iterator(); iter.hasNext();) {
+             PatternVariable formalParemeter = iter.next();
+             Integer formalParameterIndex = flattenedPattern.getIndex(getVariableID(formalParemeter));
+             if(!bodyPatternIndexes.add(formalParameterIndex))
+            	 {
+            	 String[] context = {formalParameterIndex.toString(),parent.getPattern().getName()};
+            	 throw new PatternMatcherCompileTimeException(
+            			 PatternMatcherErrorStrings.INTERNAL_BODYNODE_INJECTIVITYCONSTRAINT_ALREADYUSED
+            			 ,context
+            			 ,body);
+            	 }
+         }
+
+    	 Collection<Pair> localTransitivePairs = flattenedPattern.getTransitiveExclusionSet(localAdditionalExclusionInjectivityPairs, null, true);
+    	 for(Integer i: bodyPatternIndexes)
+    		 for(Integer j: bodyPatternIndexes)
+    		 	if(i < j)
+    		 		{Pair pair = new Pair(i,j);
+						if(isDistinctMatching)
+    		 			{
+    		 			if(localAdditionalExclusionInjectivityPairs != null
+    		 					&& !localAdditionalExclusionInjectivityPairs.contains(pair)) {
+    		 				// inclusion is added only of transitive exclusion is not true
+    		 				if(!localTransitivePairs.contains(pair)) {
+    		 					flattenedPattern.addInjectivityInclusionPair(i, j);
+    		 				}
+    		 			}
+    		 			}
+    		 		else
+    		 			{
+    		 			if(localAdditionalInclusionInjectivityPairs != null
+    		 					&& !localAdditionalInclusionInjectivityPairs.contains(pair))
+    		 			flattenedPattern.addInjectivityExclusionPair(i, j);
+
+    		 			}
+    		 		}
+
+    	/* if(localAdditionalExclusionInjectivityPairs != null)
+    		 for(Pair p: localAdditionalExclusionInjectivityPairs)
+    			 flattenedPattern.removeInjectivityInclusionPair(p.getLeft(), p.getRight());
+
+    	 if(localAdditionalInclusionInjectivityPairs != null)
+    		 for(Pair p: localAdditionalInclusionInjectivityPairs)
+    			 flattenedPattern.removeInjectivityExclusionPair(p.getLeft(), p.getRight());
+    	*/
+
+
+    	 /*for (int j = 0; j < parent.pattern.getSymParameters().size(); j++) {
+                 Term actualTerm = parent.actualParameters.get(j);
+                 if (actualTerm instanceof VariableReference) {
+                     VariableReference varRef = (VariableReference) actualTerm;
+                     PatternVariable actualParameter = (PatternVariable) varRef.getVariable();
+                     Integer index = flattenedPattern.getIndex(getCallerBody().getVariableID(actualParameter));
+                 }
+    	 }*/
+
+	}

+

+    public void processCheckExpressions(FlattenedPattern pattern, Logger logger) {

+        List<Term> checkExpressions = body.getCheckExpressions();

+        if (checkExpressions != null) {

+            ITermHandler handler = pattern.getTermHandler();

+            if (handler != null) {

+                for (int i = 0; i < checkExpressions.size(); i++) {

+                    CheckOperation operation =

+                        handler.getTermCheckOperation(parent.getPattern(), currentLocation, checkExpressions.get(i));

+                    pattern.addPostSearchPlanOperation(operation);

+                }

+            } else {

+                logger.warning(PatternMatcherErrorStrings.NO_TERM_HANDLER);

+            }

+        }

+    }

+

+    public void processNegativeApplicationConditions(FlattenedPattern pattern, Logger logger, IModelManager manager)

+        throws PatternMatcherCompileTimeException {

+        List<GTPatternCall> negativeCalls = body.getNegativePatterns();
+        GTPattern header = body.getHeader();

+        if (negativeCalls != null && negativeCalls.size() > 0) {

+            for (int i = 0; i < negativeCalls.size(); i++) {

+                GTPatternCall call = negativeCalls.get(i);

+                PatternBuilder builder = new PatternBuilder(logger, manager, pattern.getTermHandler());

+                IPatternMatcher matcher = builder.construct(call.getCalledPattern());

+                List<Term> actualTerms = call.getActualParameters();

+                Collection<Variable> passingVariables = new ArrayList<Variable>();
+
+                int[] actualParameterMapping = new int[actualTerms.size()];

+                for (int j = 0; j < actualTerms.size(); j++) {

+                    Term term = actualTerms.get(j);

+                    if (term instanceof VariableReference) {

+                        VariableReference varRef = (VariableReference) term;

+                        actualParameterMapping[j] =

+                            pattern.getIndex(getVariableID(varRef.getVariable()));
+
+                        if(header.getSymParameters().contains(varRef.getVariable())) //it is a variable that goes into the NAC call
+                        	passingVariables.add(varRef.getVariable());
+
+                    } else {
+                    	String[] context = {""+j,call.getCalledPattern().getName()};

+                        throw new PatternMatcherCompileTimeException(

+                                PatternMatcherErrorStrings.NO_TERM_IN_NAC_CALLS
+                                ,context
+                                ,call);

+                    }

+                }
+

+                NACCheckOperation operation = new NACCheckOperation(matcher, actualParameterMapping,call,
+                			passingVariables);

+                pattern.addPostSearchPlanOperation(operation);

+            }

+        }

+    }

+
+    public void buildSearchGraph(FlattenedPattern result) throws PatternMatcherCompileTimeException{
+		try{
+    		result.getSearchGraph().add(this,result);
+		}catch (PatternMatcherCompileTimeException e) {
+			throw e.addNewStackElement(this.body);
+		}
+	}
+

+    public String toString() {

+        return getClass().getSimpleName() + " " + parent.getPattern().getName() + "_" + currentLocation;

+    }

+

+    public CheckOperation getTermEvaluationOperation(ITermHandler handler, ContainmentConstraint conCons, int resultSlot) {

+    	return handler.getTermEvaluationOperation(parent.getPattern(), currentLocation, conCons, resultSlot);

+    }
+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/CallGraphNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/CallGraphNode.java
new file mode 100644
index 0000000..63cb171
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/CallGraphNode.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph;

+

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+

+// TODO gervarro: refactor (normalis DFS-t csinalni) (iterative deepening DFS-t hasznalni???)

+public abstract class CallGraphNode {

+    int index;

+    int currentLocation;

+

+    abstract protected PatternNode causesRecursion(GTPattern patternToTest);

+    abstract protected boolean traverse(PatternVariantIterator token);

+    

+    CallGraphNode() {

+        this.index = 0;

+        this.currentLocation = 0;

+    }

+    

+    public void setCurrentLocation(int currentLocation) {

+    	this.currentLocation = currentLocation;

+    }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/DanglingVPMElementDTO.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/DanglingVPMElementDTO.java
new file mode 100644
index 0000000..84a420e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/DanglingVPMElementDTO.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph;

+

+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.VPMElement;
+

+/** Holds a dangling relation's or relationship's context information

+ * @author Akos Horvath

+ *

+ */

+public class DanglingVPMElementDTO {

+

+	VPMElement element;

+	BodyNode bodyNode;

+	public DanglingVPMElementDTO(VPMElement element, BodyNode bodyNode) {

+		this.element = element;

+		this.bodyNode = bodyNode;

+	}

+	/**

+	 * @return the bodyNode

+	 */

+	public BodyNode getBodyNode() {

+		return bodyNode;

+	}

+	/**

+	 * @param bodyNode the bodyNode to set

+	 */

+	public void setBodyNode(BodyNode bodyNode) {

+		this.bodyNode = bodyNode;

+	}

+	/**

+	 * @return the element

+	 */

+	public VPMElement getElement() {

+		return element;

+	}

+	/**

+	 * @param element the element to set

+	 */

+	public void setElement(VPMElement element) {

+		this.element = element;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/EvenLevelNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/EvenLevelNode.java
new file mode 100644
index 0000000..218f34a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/EvenLevelNode.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph;

+

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+

+public class EvenLevelNode extends CallGraphNode {

+	protected PatternNode parent;

+

+	public EvenLevelNode(PatternNode parent) {

+		this.parent = parent;

+	}

+	

+	@Override

+	protected PatternNode causesRecursion(GTPattern patternToTest) {

+		return null;

+	}

+

+	@Override

+	protected boolean traverse(PatternVariantIterator token) {

+		return false;

+	}

+	

+	public PatternNode getParent() {

+		return parent;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/FlattenedPattern.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/FlattenedPattern.java
new file mode 100644
index 0000000..43e65da
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/FlattenedPattern.java
@@ -0,0 +1,502 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph;

+

+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.Vector;
+
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.PatternCallSignature;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherCompileTimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.SearchPlan;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.SearchPlanKey;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.VariableID;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.algorithms.ISearchGraph;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.algorithms.SearchGraphFactory;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.DummyOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.InjectivityCheckOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.PatternCallOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.SearchPlanOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg.IQueueContentProvider;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg.IndexedRule;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg.LocalGoal;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg.MagicSet;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg.RemoteGoal;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg.UnindexedRule;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.AbstractNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.ITermHandler;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.logger.Logger;
+

+

+/**

+ * A FlattenedPattern corresponds to a PatternBody, in which

+ * variables from all the embedded pattern invocations are aggregated.

+ * 

+ * FlattenedPatterns are generated during the pattern invocation analysis of

+ * GTPatternBodies. If the pattern call graph is a DAG, then we have a 

+ * non-recursive FlattenedPattern consisting of all the variables that appear

+ * in the GTPatternBody itself or any patterns that are called by the 

+ * GTPatternBody.

+ * 

+ * Each branch of OR patterns obviously generate a new FlattenedPattern.

+ * 

+ * The interpreted engine uses the following mapping:

+ * VariableType => PatternVariable

+ */

+public class FlattenedPattern extends EvenLevelNode 

+	implements Comparable<FlattenedPattern> {

+    

+    private boolean isRecursionBased;

+

+    private ISearchGraph searchGraph;

+	/**

+     * The mapping of pattern variables to their location in

+     * the PatternFrames.

+	 */

+    private Map<VariableID,Integer> variableMapping;

+    private Map<Integer, Set<VariableID>> inverseVariableMapping;

+

+    private Set<Pair> injectivityExclusionSet, injectivityInclusionSet, injectivityTransitiveExclusionSet;

+    

+	/**

+     * The mapping of PatternSignatures to the SearchPlans

+     * that are available for a given PatternSignature.

+	 */

+	private Map<SearchPlanKey,Collection<SearchPlan>> searchPlanMapping;

+

+	private Vector<SearchPlanOperation> preSearchPlanOperations;

+    private Vector<SearchPlanOperation> postSearchPlanOperations;

+    

+    /**

+     * The size of the binding arrays inside the corresponding 

+     * MatchingFrames.

+	 */

+	private int frameSize;

+    private int injectivityFrameSize;

+    

+    public FlattenedPattern(PatternNode parent, List<IFlattenedPatternElement> specification) 

+        throws PatternMatcherCompileTimeException {

+    	super(parent);

+    	//this.SearchGraph = new VPMBasedSearchGraph(parent.getModelManager());

+    	this.searchGraph = SearchGraphFactory.getSearchGraph(parent.getModelManager());

+    	this.variableMapping = new HashMap<VariableID, Integer>();

+        this.inverseVariableMapping = new TreeMap<Integer, Set<VariableID>>();

+    	this.searchPlanMapping = new HashMap<SearchPlanKey, Collection<SearchPlan>>();

+      	this.preSearchPlanOperations = new Vector<SearchPlanOperation>();

+        this.postSearchPlanOperations = new Vector<SearchPlanOperation>();

+        this.isRecursionBased = false;

+        this.frameSize = 0;

+        this.injectivityFrameSize = 0;

+        this.injectivityExclusionSet = new HashSet<Pair>();
+        injectivityInclusionSet = new HashSet<Pair>();

+        injectivityTransitiveExclusionSet = new HashSet<Pair>();

+

+        Logger logger = parent.getLogger();

+        // Main loop for processing all the variables of a pattern variant

+        for (int i = 0; i < specification.size(); i++) {

+            IFlattenedPatternElement element = specification.get(i);

+            element.setCurrentLocation(i);

+            element.addFormalParameters(this);

+            element.addLocalVariables(this);

+        }

+        injectivityFrameSize = frameSize;

+        for (int i = 0; i < specification.size(); i++) {

+            IFlattenedPatternElement element = specification.get(i);

+            element.processNegativeApplicationConditions(this, logger, parent.getModelManager());

+            element.processCheckExpressions(this, logger);

+            element.buildSearchGraph(this);

+            element.generateElementInjectivityConstraints(this, 
+            		element.processVariableAssignments(this),
+            		element.processInjectivityAssignments(this));
+            

+            // element.processFormalParameterScopes(this);

+            //Scope of the input parameter is not added to the search graph

+            // element.processPatternCallScopes(this);

+        }

+        this.searchGraph.connectDanglingRelations(this);

+        addPostSearchPlanOperation(new InjectivityCheckOperation());

+

+        //TODO: in case of adaptive pattern matching the searchNodeOrder is not fix have to go back to the iSearchGraph itself

+        // the order of the nodes are calculated, it would be better to have it contained

+
+        //For debugging purpose

+//      result.searchNodeOrder= result.alg.evaulateSearchPlan(result);

+//      result.debug(); 

+//      //result.debugPL(a);

+//      result.alg.evaulateOperationPlan(result.searchNodeOrder);

+

+        printVariableMapping(logger);

+    }

+    

+    /**

+     * Adds SearchPlan plan to the set of search plans with

+     * PatternSignature signature.

+     * @param signature The key that identifies the set of search plans 

+     * to which plan has to be added. 

+     * @param plan The search plan to be added.

+     * @return true if plan has been successfully added to the

+     * search plan mapping dictionary.

+     */

+    boolean addSearchPlan(PatternCallSignature signature, SearchPlan plan) {

+        return false;

+    }

+    

+    MatchingFrame getInstance() {

+        return null;

+    }

+    

+    Collection<SearchPlan> getSearchPlansFor(SearchPlanKey key) {

+        return searchPlanMapping.get(key);

+    }

+

+    /**

+     * 

+     * @return the frameSize

+     */

+    public int getFrameSize() {

+        return frameSize;

+    }

+

+    /**

+     * @param frameSize the frameSize to set

+     */

+    public void setFrameSize(int frameSize) {

+        this.frameSize = frameSize;

+    }

+    

+    public ISearchGraph getSearchGraph() {

+    	return searchGraph;

+    }

+    

+    public void addPreSearchPlanOperation(SearchPlanOperation operation) {

+        preSearchPlanOperations.add(operation);

+    }

+    

+    public void addPostSearchPlanOperation(SearchPlanOperation operation) {

+        postSearchPlanOperations.add(operation);

+    }

+    

+    public Integer getIndex(VariableID variable) {

+        return variableMapping.get(variable);

+    }

+    

+    public Set<VariableID> getVariableIDs(Integer index) {

+        return inverseVariableMapping.get(index);

+    }

+    

+    private void addToInverseMapping(VariableID variable, Integer index) {

+        Set<VariableID> idSet = inverseVariableMapping.get(index);

+        if (idSet == null) {

+            idSet = new HashSet<VariableID>();

+            inverseVariableMapping.put(index, idSet);

+        }

+        idSet.add(variable);

+    }

+    

+    public void setIndex(VariableID variable, Integer index) {

+        variableMapping.put(variable, index);

+        addToInverseMapping(variable, index);

+    }

+    

+    public int addVariable(VariableID variable) {

+        if (variable != null) {

+            variableMapping.put(variable, frameSize);

+            addToInverseMapping(variable, frameSize);

+        }

+        return frameSize++;

+    }

+    

+    private void printVariableMapping(Logger logger) {

+        for (VariableID id : variableMapping.keySet()) {

+            logger.debug(id.toString() + " : " + variableMapping.get(id));

+        }

+        for (Integer key : inverseVariableMapping.keySet()) {

+            for (VariableID id : inverseVariableMapping.get(key)) {

+                logger.debug(key + " : " + id.toString());

+            }

+        }

+        logger.debug("Injective frame size: \t" + injectivityFrameSize);

+        logger.debug("Frame size: \t" + frameSize);

+    }

+    

+    public boolean containsIndex(VariableID variable){

+    	return variableMapping.containsKey(variable);

+    }

+

+	// Moves non-recursion based patterns ahead of recursion based patterns

+    public int compareTo(FlattenedPattern o) {

+        /*

+         * this = o : !isRecursionBased AND !o.isRecursionBased

+         * this = o : isRecursionBased AND o.isRecursionBased

+         * this > o : isRecursionBased AND !o.isRecursionBased

+         * this < o : !isRecursionBased AND o.isRecursionBased

+         */

+        if (isRecursionBased == o.isRecursionBased) {

+            return 0;

+        } else {

+            return (isRecursionBased ? 1 : -1);

+        }

+    }

+

+    /**

+     * @return the injectivityFrameSize

+     */

+    public int getInjectivityFrameSize() {

+        return injectivityFrameSize;

+    }

+

+    public ITermHandler getTermHandler() {

+        return parent.getTermHandler();

+    }

+    

+    public Collection<SearchPlanOperation> generateCoreSearchPlan(Boolean[] adornment, IModelManager manager) throws PatternMatcherRuntimeException{

+    	return searchGraph.generateSearchPlan(this, adornment, manager);

+    }

+    

+    public List<SearchPlanOperation> generateSearchPlan(Boolean[] adornment, IModelManager manager) throws PatternMatcherRuntimeException{

+    	Collection<SearchPlanOperation> vec = searchGraph.generateSearchPlan(this, adornment,manager);

+

+    	// Copies pre and post operations

+    	ArrayList<SearchPlanOperation> finalSearchPlan = new ArrayList<SearchPlanOperation>();

+    	finalSearchPlan.addAll(preSearchPlanOperations);

+    	finalSearchPlan.addAll(vec);

+    	finalSearchPlan.addAll(postSearchPlanOperations);

+    	SearchPlanOperation[] operations = new SearchPlanOperation[finalSearchPlan.size()];

+    	operations = finalSearchPlan.toArray(operations);

+    	SearchPlan splan = new SearchPlan(operations);

+    	splan.printDebugInformation(parent.getLogger());

+    	// sets the iSearchGraph back to starting state

+    	searchGraph.initSearchGraph();

+    	

+        return finalSearchPlan;

+    }

+

+    IQueueContentProvider buildSubtree(Map<String, RemoteGoal> rggRoots,

+    		MagicSet ms,

+    		List<SearchPlanOperation> searchPlan, 

+    		int upperBound, 

+    		SortedSet<Integer> preCallInterfaceVariables) throws PatternMatcherRuntimeException {

+    	//gervarro: put to the constructor of the Rule?

+        SortedSet<Integer> localVariables = new TreeSet<Integer>();

+        int i = upperBound;

+    	for (; i >= 0 && !(searchPlan.get(i) instanceof PatternCallOperation); i--) {

+			searchPlan.get(i).calculateSidewaysPassedVariables(preCallInterfaceVariables);

+			searchPlan.get(i).calculateLocalVariables(localVariables);

+    	}

+

+    	if (upperBound < 0) {

+    		// sup_i.0 :- ms_i

+    		return ms; // look up the appropriate magic set

+    	} else if (i < upperBound) {

+    		// sup_i.j :- sup_i.(j-1), local_j

+    		IQueueContentProvider left = 

+    			buildSubtree(rggRoots, ms, searchPlan, i, preCallInterfaceVariables);

+    		List<SearchPlanOperation> operations = 

+    			new Vector<SearchPlanOperation>(searchPlan.subList(i+1, upperBound+1));

+    		operations.add(new DummyOperation());

+    		SearchPlanOperation[] array = new SearchPlanOperation[operations.size()];

+    		array = operations.toArray(array);

+    		LocalGoal right = new LocalGoal(array);

+

+    		/*

+			int size = localVariables.size();

+			Integer[] localVariableMapping = new Integer[size];

+			Boolean[] adornment = new Boolean[size];

+			int counter = 0;

+			for (Integer position: localVariables) {

+				adornment[counter] = preCallInterfaceVariables.contains(position);

+				counter++;

+			}

+			localVariables.toArray(localVariableMapping);

+			*/

+

+    		return new UnindexedRule(this, left, right);

+    	} else if (i == upperBound) {

+    		// sup_i.j :- sup_i.(j-1), remote_j

+    		PatternCallOperation pco = (PatternCallOperation) searchPlan.get(i);

+    		pco.calculateSidewaysPassedVariables(preCallInterfaceVariables);

+			pco.calculateLocalVariables(localVariables);

+			

+    		IQueueContentProvider left = 

+    			buildSubtree(rggRoots, ms, searchPlan, i-1, preCallInterfaceVariables);

+

+    		String id = RemoteGoal.generateID(pco.getPatternNode(), pco.getAdornment());

+    		// If right goal exists in runtimes

+     		if (rggRoots.containsKey(id)) {

+        		// then get the runtime from runtimes

+    			RemoteGoal right = rggRoots.get(id);

+    			return new IndexedRule(this, left, right, pco.getParameterMapping(), pco.getAdornment());

+    		} else {

+        		// else generate a new runtime

+    			RemoteGoal right = pco.getPatternNode().buildRuleGoalGraph(pco.getAdornment(),rggRoots);

+    			return new IndexedRule(this, left, right, pco.getParameterMapping(), pco.getAdornment());

+    		}

+    		// ms_call :- sup_i.(j-1)

+     		// Explicitly handled by RemoteGoal 

+    	} else {
+    		String[] context = {getParent().getPattern().getName()};

+    		throw new PatternMatcherRuntimeException(
+    				PatternMatcherErrorStrings.INTERNAL_FLATTENED_PATTERN_BUILD
+    				,context
+    				,getParent().getPattern());

+    	}

+    }
+    
+    public AnnotatedElement getGTASMRepresentation(AbstractNode node){
+    	return searchGraph.getGTASMRepresentation(node);
+    }
+    
+    
+    

+    

+    public Pair addInjectivityExclusionPair(int left, int right) {

+    	Pair p = (left < right ? new Pair(left,right) : new Pair(right,left));

+    	injectivityExclusionSet.add(p);
+    	injectivityTransitiveExclusionSet.add(p);
+    	injectivityTransitiveExclusionSet.addAll(getTransitiveExclusionSet(injectivityTransitiveExclusionSet,p, true));
+    	return p;

+    }
+    
+    public void removeInjectivityExclusionPair(int left, int right) {
+    	Pair p = (left < right ? new Pair(left,right) : new Pair(right,left));
+    	if(injectivityExclusionSet.remove(p)) {
+    	// must rebuild set on remove
+				// TODO refactor may be possible by looking at injectivityInclusionSet as well
+				injectivityTransitiveExclusionSet.clear();
+				injectivityTransitiveExclusionSet.addAll(injectivityExclusionSet);
+				injectivityTransitiveExclusionSet.addAll(getTransitiveExclusionSet(injectivityExclusionSet, p, false));
+    	}
+    }

+    
+    public Pair addInjectivityInclusionPair(int left, int right) {
+     	Pair p = (left < right ? new Pair(left,right) : new Pair(right,left));
+     	//if(!injectivityTransitiveExclusionSet.contains(p)) {
+     		// outsider doesn't know about transitive exclusions
+     		injectivityInclusionSet.add(p);
+     		return p;
+     	//} else {
+     	//	return null;
+     	//}
+ 	}
+
+		/**
+		 * @param p
+		 * @param add
+		 */
+		public Collection<Pair> getTransitiveExclusionSet(Collection<Pair> initialPairing, Pair p, boolean add) {
+			boolean isModified = true;
+			Collection<Pair> pairs = new HashSet<Pair>();
+			if(initialPairing != null) {
+				pairs.addAll(initialPairing);
+			}
+			Collection<Pair> pairsToCheck = new HashSet<Pair>();
+			if(add && p != null) {
+				// p is added to the set
+				pairsToCheck.add(p);
+			} else {
+				pairsToCheck.addAll(pairs);
+			}
+			while(isModified) {
+				isModified = false;
+				Collection<Pair> newPairs = new HashSet<Pair>();
+				for(Pair check : pairsToCheck) {
+				 	for(Pair pair : pairs) {
+				 		if(pair.equals(check)) {
+				 			continue;
+				 		}
+				 		if(pair.left == check.left) {
+				 			Pair transitivePair = (pair.right < check.right ? new Pair(pair.right,check.right) : new Pair(check.right,pair.right));
+				 			isModified = (!pairs.contains(transitivePair) && newPairs.add(transitivePair)) || isModified;
+				 		} else if(pair.left == check.right) {
+				 			Pair transitivePair = (pair.right < check.left ? new Pair(pair.right,check.left) : new Pair(check.left,pair.right));
+				 			isModified = (!pairs.contains(transitivePair) && newPairs.add(transitivePair)) || isModified;
+				 		} else if(pair.right == check.left) {
+				 			Pair transitivePair = (pair.left < check.right ? new Pair(pair.left,check.right) : new Pair(check.right,pair.left));
+				 			isModified = (!pairs.contains(transitivePair) && newPairs.add(transitivePair)) || isModified;
+				 		} else if(pair.right == check.right) {
+				 			Pair transitivePair = (pair.left < check.left ? new Pair(pair.left,check.left) : new Pair(check.left,pair.left));
+				 			isModified = (!pairs.contains(transitivePair) && newPairs.add(transitivePair)) || isModified;
+				 		}
+				 	}
+				}
+				if(isModified) {
+					isModified = pairs.addAll(newPairs);
+					pairsToCheck = newPairs;
+				}
+			}
+			return pairs;
+		}
+    
+    public void removeInjectivityInclusionPair(int left, int right) {
+     	Pair p = (left < right ? new Pair(left,right) : new Pair(right,left));
+    	injectivityInclusionSet.remove(p);
+	}
+    

+    public boolean isIncludedInInjectivityCheck(int i, int j) {

+    	Pair p = (i < j ? new Pair(i,j) : new Pair(j,i));
+    	return injectivityInclusionSet.contains(p); // if it is in the Inclusion set then it has to be checked for injectivity (|| !injectivityExclusionSet.contains(p)) 

+    }

+    

+	public static class Pair {

+		public Integer getLeft() {
+			return left;
+		}
+
+		public Integer getRight() {
+			return right;
+		}
+
+		private Integer left;

+		private Integer right;

+		

+		Pair(int left, int right) {

+			this.left = left;

+			this.right = right;

+		}

+		

+		public boolean equals(Object other) {

+			if (other != null && other instanceof Pair) {

+				Pair o = (Pair) other;

+				return (left == o.left && right == o.right);

+			} else {

+				return false;

+			}

+		}

+		

+		public int hashCode() {

+			return left.hashCode() + right.hashCode();

+		}
+		
+		@Override
+		public String toString() {
+			// TODO Auto-generated method stub
+			return left + " : " + right;
+		}

+	}
+
+	
+
+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/IFlattenedPatternElement.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/IFlattenedPatternElement.java
new file mode 100644
index 0000000..80c46c6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/IFlattenedPatternElement.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph;

+

+import java.util.Collection;
+
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherCompileTimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.FlattenedPattern.Pair;
+import org.eclipse.viatra2.logger.Logger;
+

+

+public interface IFlattenedPatternElement {

+    /** Adds the local variables of the pattern body to the search graph of its container search graph
+     * @param pattern The container flattened pattern 
+     * @throws PatternMatcherCompileTimeException
+     */
+    void addLocalVariables(FlattenedPattern pattern)

+        throws PatternMatcherCompileTimeException;

+    /** Evaluates the passed parameters of the flattened pattern body invocation and adds them to the search graph of its container flattened pattern
+     * @param pattern the container flattened pattern
+     * @throws PatternMatcherCompileTimeException
+     */
+    void addFormalParameters(FlattenedPattern pattern)

+        throws PatternMatcherCompileTimeException;

+    /** Adds the variable assignment related elements to the search graph of its containing flattened pattern
+     * @param pattern The container flattened pattern
+     * @throws PatternMatcherCompileTimeException
+     */
+   Collection<Pair> processVariableAssignments(FlattenedPattern pattern)

+        throws PatternMatcherCompileTimeException;

+    /** Adds the NAC check operation to its flattened pattern
+     * @param pattern The container flattened pattern
+     * @param logger The logger to be used in case of execution
+     * @param manager The model manager used to match the NAC pattern
+     * @throws PatternMatcherCompileTimeException
+     * @return The collection of the assigned variables pairs
+     */
+   void processNegativeApplicationConditions(FlattenedPattern pattern, Logger logger, IModelManager manager)

+        throws PatternMatcherCompileTimeException;

+    /** Adds a check operation to the operation plan of its flattened pattern.
+     * @param pattern The container flattened pattern
+     * @param logger The logger to be used when the operation is executed
+     * @throws PatternMatcherCompileTimeException
+     */
+    void processCheckExpressions(FlattenedPattern pattern, Logger logger)

+        throws PatternMatcherCompileTimeException;

+    /**Builds the Search graph of the input flattened pattern
+     * @param pattern The flattened pattern whose search graph is created
+     * @throws PatternMatcherCompileTimeException
+     */
+    void buildSearchGraph(FlattenedPattern pattern)

+        throws PatternMatcherCompileTimeException;

+    /** Sets the current location ID to the input value
+     * @param currentLocation
+     */
+    void setCurrentLocation(int currentLocation);
+    
+    /** Adds the injectivity constraints defined in the pattern to the search operations
+     * @param pattern The container flattened pattern
+     * @throws PatternMatcherCompileTimeException
+     * @return The collection of the assigned variables pairs 
+     */
+    public Collection<Pair> processInjectivityAssignments(FlattenedPattern pattern) throws PatternMatcherCompileTimeException ;
+	
+    /**Generates the injectivity constraints based on its container graph pattern's setting (sharable) and the actual variable assignment and non equality operations
+	 * @param flattenedPattern the container flattened pattern
+     * @param localAdditionalExclusionInjectivityPairs Variable pair indexes that were included in a variable assignment operation (in the actual pattern body)
+	 * @param localAdditionalInclusionInjectivityPairs Variable pair indexes that were included in a non equality  operation (in the actual pattern body)
+   */
+	public void generateElementInjectivityConstraints(FlattenedPattern flattenedPattern,
+			Collection<Pair> localAdditionalExclusionInjectivityPairs,
+			Collection<Pair> localAdditionalInclusionInjectivityPairs) throws PatternMatcherCompileTimeException; 

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/OddLevelNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/OddLevelNode.java
new file mode 100644
index 0000000..146da17
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/OddLevelNode.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph;

+

+import java.util.List;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+

+public abstract class OddLevelNode extends CallGraphNode {

+    private EvenLevelNode parent;

+    private GTPattern pattern;
+    private List<Term> actualParameters;
+    private GTPatternCall patternCall;

+

+    OddLevelNode(EvenLevelNode parent, GTPattern pattern) {

+        this(parent,pattern,null);

+    }

+    

+    OddLevelNode(EvenLevelNode parent, GTPatternCall call) {
+    	this(parent,call.getCalledPattern(),call.getActualParameters());
+    	patternCall = call;
+    }

+    

+    OddLevelNode(EvenLevelNode parent, GTPattern pattern, List<Term> parameters) {

+        super();

+        this.parent = parent;

+        this.pattern = pattern;

+        this.actualParameters = (parameters != null && parameters.size() > 0 ? parameters : null);

+    }

+    

+    public GTPattern getPattern() {

+        return pattern;

+    }
+    
+    public GTPatternCall getPatternCall() {
+        return patternCall;
+    }

+    

+    public List<Term> getActualParameters() {

+    	return actualParameters;

+    }

+    

+    public EvenLevelNode getParent() {

+    	return parent;

+    }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/PatternMatcherWrapper.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/PatternMatcherWrapper.java
new file mode 100644
index 0000000..77db134
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/PatternMatcherWrapper.java
@@ -0,0 +1,84 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Akos Horvath, Gergely Varro - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph;

+

+import java.util.Collection;

+

+import org.eclipse.viatra2.core.IModelManager;

+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;

+import org.eclipse.viatra2.gtasm.patternmatcher.IMatching;

+import org.eclipse.viatra2.gtasm.patternmatcher.PatternCallSignature;

+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherCompileTimeException;

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcher;

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.ITermHandler;

+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IPatternMatcher;

+import org.eclipse.viatra2.logger.Logger;

+

+

+/**Used to wrap the incremental (alternate) pattern matcher PatternMatcher class in order to be used in the rule goal graph

+ * @author Akos Horvath

+ *

+ */

+public class PatternMatcherWrapper extends PatternMatcher {

+

+	IPatternMatcher alternatepatternMatcher;

+	

+	public PatternMatcherWrapper(IPatternMatcher patternMatcher, Logger logger,

+			IModelManager manager, ITermHandler termHandler)

+			throws PatternMatcherCompileTimeException {

+		super(logger, manager, termHandler);

+		alternatepatternMatcher = patternMatcher;

+	}

+

+//	public PatternMatcherWrapper(PatternMatcher patternMatcher, Logger logger,

+//			IModelManager modelManager, ITermHandler termHandler) throws PatternMatcherCompileTimeException {

+//		super(logger, modelManager, termHandler);

+//		alternatepatternMatcher = patternMatcher;

+//	}

+

+	@Override

+	public IMatching match(Object[] inputMapping,

+			PatternCallSignature[] signature) throws ViatraTransformationException{

+		if(alternatepatternMatcher != null)

+			return alternatepatternMatcher.match(inputMapping,signature);

+		else

+		return super.match(inputMapping, signature);

+	}

+

+	@Override

+	public boolean match(Object[] inputMapping)

+			throws ViatraTransformationException {

+		if(alternatepatternMatcher != null)

+			return alternatepatternMatcher.match(inputMapping);

+		else

+			return super.match(inputMapping);

+	}

+

+	@Override

+	public Collection<IMatching> matchAll(Object[] inputMapping,

+			PatternCallSignature[] signature, Integer[] quantificationOrder)

+			throws ViatraTransformationException {

+		if(alternatepatternMatcher != null)

+			return alternatepatternMatcher.matchAll(inputMapping,signature,quantificationOrder);

+		else

+		return super.matchAll(inputMapping, signature, quantificationOrder);

+	}

+

+	@Override

+	public IMatching matchRandomly(Object[] inputMapping,

+			PatternCallSignature[] signature) throws ViatraTransformationException{

+		if(alternatepatternMatcher != null)

+			return alternatepatternMatcher.matchRandomly(inputMapping, signature);

+		else

+		return super.matchRandomly(inputMapping, signature);

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/PatternNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/PatternNode.java
new file mode 100644
index 0000000..1ecaeac
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/PatternNode.java
@@ -0,0 +1,211 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph;

+

+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherCompileTimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcher;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.SearchPlanOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg.RemoteGoal;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg.Rule;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.ITermHandler;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody;
+import org.eclipse.viatra2.logger.Logger;
+

+

+public class PatternNode extends OddLevelNode 

+	implements Iterable<List<IFlattenedPatternElement>> {

+    private boolean isRoot;

+    protected PatternMatcher patternMatcher;

+    protected EvenLevelNode[] children;

+    // private boolean[] adornmentRestriction;

+    

+    protected PatternNode(BodyNode parent, GTPatternCall call){
+    	super(parent,call);
+    	isRoot = false;
+    }
+    
+    public PatternNode(PatternMatcher patternMatcher, 

+    		BodyNode parent, GTPatternCall call) throws PatternMatcherCompileTimeException {

+        super(parent,call);

+        this.isRoot = false;
+        this.patternMatcher = patternMatcher;

+        this.children = new BodyNode[getPattern().getPatternBodies().size()];

+        buildCallGraph();

+    }

+    

+    public PatternNode(PatternMatcher patternMatcher, GTPattern pattern) 

+    		throws PatternMatcherCompileTimeException {

+        super(null, pattern);

+        this.isRoot = true;

+        this.patternMatcher = patternMatcher;
+        this.children = new BodyNode[pattern.getPatternBodies().size()];

+        buildCallGraph();

+    }

+    

+  private void buildCallGraph() throws PatternMatcherCompileTimeException {

+    	// Call graph building

+        List<GTPatternBody> bodies = getPattern().getPatternBodies();

+    	for (int i = 0; i < bodies.size(); i++) {

+			children[i] = new BodyNode(patternMatcher, this, bodies.get(i));

+		}

+    	// Flattening process

+        if (isRoot) {

+        	List<FlattenedPattern> flattenedPatterns = 

+        		new ArrayList<FlattenedPattern>();

+            int index = 0;

+            for (List<IFlattenedPatternElement> patternVariant : this) {

+                printPatternVariant(patternVariant, patternMatcher.getLogger());

+
+                FlattenedPattern fp = 

+                	new FlattenedPattern(this, patternVariant);

+                flattenedPatterns.add(fp);

+                index++;

+            }

+            // Sort the flattened patterns.

+            // Collections.sort(flattenedPatterns);

+            children = new FlattenedPattern[flattenedPatterns.size()];

+            children = flattenedPatterns.toArray(children);

+        }

+    }
+    
+    protected PatternNode causesRecursion(GTPattern patternToTest) {

+        if (getPattern() == patternToTest) {

+            isRoot = true;

+            return this;

+        } else {

+            return (getParent() == null ? null : getParent().causesRecursion(patternToTest));

+        }

+    }

+

+    @Override

+    protected boolean traverse(PatternVariantIterator token) {

+        int size = children.length;

+        assert 0 <= index && index <= size;

+        if (index <= 0) {

+            BodyNode body = (BodyNode) children[index];

+            token.addLast(body);

+            index++;

+            body.index = 0;

+            return body.traverse(token);

+        } else {

+            BodyNode body = (BodyNode) children[index-1];

+            boolean successful = body.traverse(token);

+            if (successful) {

+                return true;

+            } else {

+                token.removeLast();

+                if (index < size) {

+                    body = (BodyNode) children[index];

+                    index++;

+                    token.addLast(body);

+                    body.index = 0;

+                    return body.traverse(token);

+                } else {

+                    return false;

+                }

+            }

+        }

+    }

+

+    boolean isRoot() {

+        return isRoot;

+    }

+    

+    public Iterator<List<IFlattenedPatternElement>> iterator() {

+        return new PatternVariantIterator(this);

+    }

+

+    private static void printPatternVariant(List<IFlattenedPatternElement> patternVariant, Logger logger) {

+        for (IFlattenedPatternElement element : patternVariant) {

+            logger.debug(element.toString());

+        }

+    }

+    

+    public ITermHandler getTermHandler() {

+        return patternMatcher.getTermHandler();

+    }

+    

+    public Logger getLogger() {

+        return patternMatcher.getLogger();

+    }

+

+    public IModelManager getModelManager() {

+    	return patternMatcher.getModelManager();

+    }

+    

+    // Can be be moved to a descendant of PatternNode

+    public FlattenedPattern getSingleFlattenedPattern() throws PatternMatcherCompileTimeException {

+    	if (children.length == 1 && children[0] instanceof FlattenedPattern) {

+    		return (FlattenedPattern) children[0];

+    	} else {
+    		String[] context = {};

+    		throw new PatternMatcherCompileTimeException(
+    				PatternMatcherErrorStrings.MULTIBODY_OR_RECURSIVE_PATTERN_ON_RHS
+    				,context
+    				,getPattern());

+    	}

+    }

+   

+    public FlattenedPattern[] getFlattenedPatterns() throws PatternMatcherCompileTimeException {

+    	FlattenedPattern[] result = new FlattenedPattern[children.length];

+    	for(int i = 0; i< children.length; i++){

+    		if(children[i] instanceof FlattenedPattern)

+    			result[i] = (FlattenedPattern) children[i];

+//    		else

+//    			{
+//    			String[] context = {};
+//    			throw new PatternMatcherCompileTimeException(
+//    					PatternMatcherErrorStrings.);
+//    			
+//    			}

+    	}

+    	return result;

+    }

+    

+    

+    

+    public String toString() {

+    	return getPattern().getName();

+    }

+    

+	public RemoteGoal buildRuleGoalGraph(Boolean[] adornment,

+			Map<String, RemoteGoal> rggRoots) throws PatternMatcherRuntimeException {

+		RemoteGoal result = new RemoteGoal(this, adornment);

+		rggRoots.put(RemoteGoal.generateID(this, adornment), result);

+		for (int i = 0; i < children.length; i++) {

+			FlattenedPattern fp = (FlattenedPattern) children[i];

+			List<SearchPlanOperation> finalSearchPlan = fp.generateSearchPlan(adornment,patternMatcher.getModelManager());

+	    	SortedSet<Integer> preCallInterfaceVariables = new TreeSet<Integer>();

+	    	for (int j = 0; j < adornment.length; j++) {

+				preCallInterfaceVariables.add(j);

+			}

+			Rule rule = (Rule) fp.buildSubtree(rggRoots, result.getMagicSet(), finalSearchPlan, finalSearchPlan.size() - 1, preCallInterfaceVariables);

+			// Rule rule = fp.buildRuleGoalGraph(adornment,rggRoots,result.getMagicSet());

+			result.addChild(rule, new LinkedList<MatchingFrame>());

+		}

+		return result;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/PatternNodeIncremental.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/PatternNodeIncremental.java
new file mode 100644
index 0000000..7677efd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/PatternNodeIncremental.java
@@ -0,0 +1,70 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Akos Horvath, Gergely Varro - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph;

+

+import java.util.Iterator;

+import java.util.List;

+import java.util.Map;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherCompileTimeException;

+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg.RemoteGoal;

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg.RemoteGoalIncremental;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;

+

+

+

+

+public class PatternNodeIncremental extends PatternNode {

+

+	public PatternNodeIncremental(PatternMatcherWrapper patternMatcher,

+			BodyNode parent, GTPatternCall call)

+			throws PatternMatcherCompileTimeException {

+		super(parent, call);

+		 this.patternMatcher = patternMatcher;

+	     this.children = new BodyNode[0];

+	}

+

+	/*public PatternNodeIncremental(PatternMatcherWrapper patternMatcher,

+			GTPattern pattern) throws PatternMatcherCompileTimeException {

+		super(patternMatcher, pattern);

+		String[] context = {pattern.getName()};

+		throw new PatternMatcherCompileTimeException(

+				PatternMatcherErrorStrings.INTERNAL_INCREMENTAL_PATTERNNODE_ROOT

+				,context

+				,pattern);

+	}*/

+

+	@Override

+	public RemoteGoal buildRuleGoalGraph(Boolean[] adornment,

+			Map<String, RemoteGoal> rggRoots) throws PatternMatcherRuntimeException {

+		

+		RemoteGoal result = new RemoteGoalIncremental(this, adornment,patternMatcher);

+		rggRoots.put(RemoteGoal.generateID(this, adornment), result);

+		return result;

+	}

+	

+	 

+    protected PatternNode causesRecursion(GTPattern patternToTest) {

+      return null;

+    }

+

+    @Override

+    protected boolean traverse(PatternVariantIterator token) {

+    	return false;

+    }

+

+    

+    public Iterator<List<IFlattenedPatternElement>> iterator() {

+        return null;

+    }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/PatternReferenceNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/PatternReferenceNode.java
new file mode 100644
index 0000000..9ed2e39
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/PatternReferenceNode.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph;

+

+import java.util.Collection;
+
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherCompileTimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.FlattenedPattern.Pair;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.logger.Logger;
+

+

+public class PatternReferenceNode extends OddLevelNode implements

+        IFlattenedPatternElement {

+    private PatternNode reference;

+    

+    PatternReferenceNode(BodyNode parent, GTPatternCall call, PatternNode reference) {

+        super(parent,call);

+        this.reference = reference;

+    }

+    

+ //   PatternReferenceNode(PatternNode orig) {

+ //       super(orig.parent,orig.pattern,orig.actualParameters);

+ //       reference = orig;

+ //   }

+    

+    protected PatternNode causesRecursion(GTPattern patternToTest) {

+        return null;

+    }

+

+    @Override

+    protected boolean traverse(PatternVariantIterator token) {

+        assert index == 0 || index == 1;

+        if (index == 1) {

+            token.removeLast();

+            index--;

+            return false;

+        } else {

+            token.addLast(this);

+            index++;

+            return true;

+        }

+    }

+

+    public void addLocalVariables(FlattenedPattern pattern) {

+        return;

+    }

+

+    public void addFormalParameters(FlattenedPattern pattern) {

+        return;

+    }

+

+	public void buildSearchGraph(FlattenedPattern result) throws PatternMatcherCompileTimeException {

+		result.getSearchGraph().add(this, result);

+	}

+

+    public Collection<Pair> processVariableAssignments(FlattenedPattern pattern) throws PatternMatcherCompileTimeException {

+   /* 	for (int i = 1; i < actualParameters.size(); i++) {

+        	VariableReference refI = (VariableReference) actualParameters.get(i);

+        	Integer indexI = pattern.getIndex(((BodyNode) parent).getVariableID(refI.getVariable()));

+			for (int j = 0; j < i; j++) {

+	        	VariableReference refJ = (VariableReference) actualParameters.get(j);

+	        	Integer indexJ = pattern.getIndex(((BodyNode) parent).getVariableID(refJ.getVariable()));

+	        	pattern.addExclusionPair(indexI, indexJ);

+			}

+		}*/
+    	
+    	return null;

+    }

+

+    public void processCheckExpressions(FlattenedPattern pattern, Logger logger) {

+    	return;

+    }

+

+    public void processNegativeApplicationConditions(FlattenedPattern pattern, Logger logger, IModelManager manager) throws PatternMatcherCompileTimeException {

+    	return;

+    }

+    

+	public PatternNode getReference() {

+		return reference;

+	}

+

+    public String toString() {

+        return getClass().getSimpleName() + " " + getPattern().getName() + "_" + currentLocation;

+    }
+
+	public Collection<Pair> processInjectivityAssignments(FlattenedPattern pattern)
+			throws PatternMatcherCompileTimeException {
+		return null;
+	}
+
+	public void generateElementInjectivityConstraints (
+			FlattenedPattern flattenedPattern,
+			Collection<Pair> localAdditonalExclusionInjectivityPairs,
+			Collection<Pair> localAdditionalInclusionInjectivityPairs) throws  PatternMatcherCompileTimeException {
+		return;
+	}
+
+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/PatternVariantIterator.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/PatternVariantIterator.java
new file mode 100644
index 0000000..8c715c9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/callgraph/PatternVariantIterator.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph;

+

+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.NoSuchElementException;
+

+

+public class PatternVariantIterator implements Iterator<List<IFlattenedPatternElement>> {

+    private PatternNode root;

+    private LinkedList<IFlattenedPatternElement> solution;

+    private boolean hasNext;

+

+    public PatternVariantIterator(PatternNode root) {

+        this.root = root;

+        this.solution = new LinkedList<IFlattenedPatternElement>();

+        this.hasNext = (root.isRoot() ? root.traverse(this) : false);

+    }

+    

+    void addLast(IFlattenedPatternElement element) {

+        solution.addLast(element);

+    }

+    

+    void removeLast() {

+        solution.removeLast();

+    }

+    

+    public boolean hasNext() {

+        return hasNext;

+    }

+

+    public List<IFlattenedPatternElement> next() {

+        if (hasNext) {

+            List<IFlattenedPatternElement> result = new LinkedList<IFlattenedPatternElement>(solution);

+            hasNext = root.traverse(this);

+            return result;

+        } else {

+            throw new NoSuchElementException();

+        }

+    }

+

+    public void remove() {

+        throw new UnsupportedOperationException();

+    }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/AllEntitiesOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/AllEntitiesOperation.java
new file mode 100644
index 0000000..d804438
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/AllEntitiesOperation.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class AllEntitiesOperation extends ExtendOperation {

+	private IModelManager manager;

+	

+	/**

+	 * @param unbound

+	 * @param edge

+	 */

+	public AllEntitiesOperation(Integer unbound, SearchGraphEdge edge, IModelManager m) {

+		super(unbound, edge);

+		manager = m;

+	}

+	

+	public void preprocess(MatchingFrame frame) throws PatternMatcherRuntimeException {

+		if(edge.isSource())

+			iterator = manager.getEntities().iterator();

+		else
+		{
+			String[] context = {frame.getPattern().getSearchGraph().getSearchNode(unbound).getName()};

+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_ALLENTITIES
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(unbound).getTraceabilityElement().getRepresentativeEMFElement());	
+		}
+	}

+

+	public String toString(){

+		return getClass().getSimpleName() + " : " + 

+        "ENTITY -- " + edge.getVPMEdgeType().name() + " -> " + unbound;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/AllRelationsOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/AllRelationsOperation.java
new file mode 100644
index 0000000..6937ede
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/AllRelationsOperation.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class AllRelationsOperation extends ExtendOperation {

+

+	/**

+	 * @param unbound

+	 * @param edge

+	 */

+	public AllRelationsOperation(Integer unbound, SearchGraphEdge edge, IModelManager m) {

+		super(unbound, edge);

+		manager = m;

+	}

+	private IModelManager manager;

+	

+	public void preprocess(MatchingFrame frame) throws PatternMatcherRuntimeException{

+		if(edge.isSource())

+			iterator = manager.getRelations().iterator();

+		else
+			{

+			String[] context = {frame.getPattern().getSearchGraph().getSearchNode(unbound).getName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_ALLRELATIONS
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(unbound).getTraceabilityElement().getRepresentativeEMFElement());	
+			}

+	}

+

+	public String toString(){

+		return getClass().getSimpleName() + " : " + 

+        "RELATION -- " + edge.getVPMEdgeType().name() + " -> " + unbound;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/BoundToBoundCheckOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/BoundToBoundCheckOperation.java
new file mode 100644
index 0000000..2d2e1a8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/BoundToBoundCheckOperation.java
@@ -0,0 +1,164 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import java.util.Set;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.EdgeType;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**
+ * @author Gergely Varro, Akos Horvath
+ *
+ */
+public class BoundToBoundCheckOperation extends EdgeConstraintCheckOperation {

+    private Integer source;

+    private Integer target;

+    private SearchGraphEdge  edge;

+    

+    public BoundToBoundCheckOperation(Integer source, 

+            Integer target,

+            SearchGraphEdge edge) {

+        this.source = source;

+        this.target = target;

+        this.edge = edge;

+    }

+

+    protected boolean check(MatchingFrame frame) 

+        throws PatternMatcherRuntimeException {

+        IModelElement sourceElement = null;

+        IModelElement targetElement = null;

+        try {

+            sourceElement = (IModelElement) frame.getValue(source);

+        } catch (ClassCastException e) {

+        	String[] context = {edge.getVPMEdgeType().toString(), frame.getPattern().getSearchGraph().getSearchNode(source).getName(), frame.getValue(source).getClass().getName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.NOT_A_MODELELEMENT_CHECK
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(source).getTraceabilityElement().getRepresentativeEMFElement());
+        }

+        try {

+            targetElement = (IModelElement) frame.getValue(target);

+        } catch (ClassCastException e) {

+        	String[] context = {edge.getVPMEdgeType().toString(), frame.getPattern().getSearchGraph().getSearchNode(target).getName(), frame.getValue(target).getClass().getName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.NOT_A_MODELELEMENT_CHECK
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(target).getTraceabilityElement().getRepresentativeEMFElement());
+  

+        }

+        if (sourceElement == null) {

+        	String[] context = {frame.getPattern().getSearchGraph().getSearchNode(source).getName(),getClass().getSimpleName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(source).getTraceabilityElement().getRepresentativeEMFElement());
+	    }

+        if (targetElement == null) {

+        	String[] context = {frame.getPattern().getSearchGraph().getSearchNode(target).getName(),getClass().getSimpleName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(target).getTraceabilityElement().getRepresentativeEMFElement());
+        }

+

+        if (edge.getVPMEdgeType() == EdgeType.INSTANCEOF && !edge.isSource()) {

+            //return sourceElement.getAllTypes().contains(targetElement);
+            return sourceElement.isInstanceOf(targetElement);

+        } else if (edge.getVPMEdgeType() == EdgeType.INSTANCEOF && edge.isSource()) {

+            //return sourceElement.getAllInstances().contains(targetElement);
+            return targetElement.isInstanceOf(sourceElement);

+        } else if (edge.getVPMEdgeType() == EdgeType.SUPERTYPEOF && !edge.isSource()) {

+            //return sourceElement.getAllSubtypes().contains(targetElement);
+        	return targetElement.isSubtypeOf(sourceElement);

+        } else if (edge.getVPMEdgeType() == EdgeType.SUPERTYPEOF && edge.isSource()) {
+        	return sourceElement.isSubtypeOf(targetElement);

+            //return sourceElement.getAllSupertypes().contains(targetElement);

+        } else if (edge.getVPMEdgeType() == EdgeType.SOURCE && !edge.isSource()) {

+            return (targetElement instanceof IRelation ?

+                    ((IRelation) targetElement).getFrom().equals(sourceElement) :

+                        false);

+        } else if (edge.getVPMEdgeType() == EdgeType.SOURCE && edge.isSource()) {

+            return (sourceElement instanceof IRelation ? 

+                    ((IRelation) sourceElement).getFrom().equals(targetElement) :

+                        false);

+        } else if (edge.getVPMEdgeType() == EdgeType.TARGET && !edge.isSource()) {

+            return (targetElement instanceof IRelation ? 

+                    ((IRelation) targetElement).getTo().equals(sourceElement) :

+                        false);

+        } else if (edge.getVPMEdgeType() == EdgeType.TARGET && edge.isSource()) {

+            return (sourceElement instanceof IRelation ? 

+                    ((IRelation) sourceElement).getTo().equals(targetElement) :

+                        false);

+        } else if (edge.getVPMEdgeType() == EdgeType.IN && !edge.isSource()) {

+            return sourceElement.getNamespace().compareTo(targetElement) == 0;

+        } else if (edge.getVPMEdgeType() == EdgeType.IN && edge.isSource()) {

+            return targetElement.getNamespace().compareTo(sourceElement) == 0;

+        } else if (edge.getVPMEdgeType() == EdgeType.BELOW && !edge.isSource()) {

+            return sourceElement.isBelowNamespace(targetElement);

+        } else if (edge.getVPMEdgeType() == EdgeType.BELOW && edge.isSource()) {

+            return targetElement.isBelowNamespace(sourceElement);

+        }

+       
+        String [] context = {edge.getVPMEdgeType().toString(),getClass().getSimpleName()};
+        throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_OPERATION_NOT_SUPPORTED

+                ,context
+                ,edge.getTraceabilityElement().getRepresentativeEMFElement());

+    }

+

+    public String toString() {

+		return getClass().getSimpleName() + " : " + 

+            source + " -- " + edge.getVPMEdgeType().name() + " -> " + target;

+	}
+    
+    public String toString(MatchingFrame frame) {
+    	 IModelElement sourceElement = null;
+         IModelElement targetElement = null;
+         try {
+             sourceElement = (IModelElement) frame.getValue(source);
+         } catch (ClassCastException e) {
+        	 return toString();
+         }
+         try {
+             targetElement = (IModelElement) frame.getValue(target);
+         } catch (ClassCastException e) {
+        	 return toString();
+         }
+         if (sourceElement == null) return toString();
+         if (targetElement == null) return toString();
+         
+         //in which order the relation is pointing
+         if(edge.getVPMEdgeType() == EdgeType.INSTANCEOF)
+	    	 return getClass().getSimpleName() + " : " + 
+	    	 edge.getTargetNode().getName() + " -- " + edge.getVPMEdgeType().name() + " -> " + edge.getSourceNode().getName();
+         else //may require additional filtering
+        	 return getClass().getSimpleName() + " : " + 
+        	 edge.getSourceNode().getName() + " -- " + edge.getVPMEdgeType().name() + " -> " + edge.getTargetNode().getName();
+    }

+    

+    public void calculateSidewaysPassedVariables(Set<Integer> variables) {

+    	variables.add(source);

+    	variables.add(target);

+    }

+    

+    public void calculateLocalVariables(Set<Integer> variables) {

+    	variables.add(source);

+    	variables.add(target);

+    }
+
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame) {
+		return edge.getTraceabilityElement().getRepresentativeEMFElement();
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/BoundToConstantCheckOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/BoundToConstantCheckOperation.java
new file mode 100644
index 0000000..f30d226
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/BoundToConstantCheckOperation.java
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import java.util.Set;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.EdgeType;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**
+ * @author Gergely Varro, Akos Horvath
+ *
+ */
+public class BoundToConstantCheckOperation extends EdgeConstraintCheckOperation {

+    private Integer source;

+    private IModelElement target;

+    private SearchGraphEdge  edge;

+    

+    public BoundToConstantCheckOperation (Integer source, 

+    		IModelElement target,

+            SearchGraphEdge edge) {

+        this.source = source;

+        this.target = target;

+        this.edge = edge;

+    }

+    

+    protected boolean check(MatchingFrame frame) 

+        throws PatternMatcherRuntimeException {

+        IModelElement sourceElement = null;

+        try {

+            sourceElement = (IModelElement) frame.getValue(source);

+        } catch (ClassCastException e) {

+        	String[] context = {edge.getVPMEdgeType().toString(), frame.getPattern().getSearchGraph().getSearchNode(source).getName(), frame.getValue(source).getClass().getName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.NOT_A_MODELELEMENT_CHECK
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(source).getTraceabilityElement().getRepresentativeEMFElement());
+     

+        }

+        if (sourceElement == null) {

+        	String[] context = {frame.getPattern().getSearchGraph().getSearchNode(source).getName(),getClass().getSimpleName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(source).getTraceabilityElement().getRepresentativeEMFElement());
+	

+        }

+        if (target == null) {

+        	String[] context = {edge.getTargetNode().getName(),getClass().getSimpleName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,edge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+	    }

+

+        if (edge.getVPMEdgeType() == EdgeType.INSTANCEOF && !edge.isSource()) {

+            //return sourceElement.getAllTypes().contains(target);
+            return 	sourceElement.isInstanceOf(target);

+        } else if (edge.getVPMEdgeType() == EdgeType.INSTANCEOF && edge.isSource()) {

+            //return sourceElement.getAllInstances().contains(target);
+            return target.isInstanceOf(sourceElement);

+        } else if (edge.getVPMEdgeType() == EdgeType.SUPERTYPEOF && !edge.isSource()) {

+            return sourceElement.getAllSubtypes().contains(target);

+        } else if (edge.getVPMEdgeType() == EdgeType.SUPERTYPEOF && edge.isSource()) {

+            //return sourceElement.getAllSupertypes().contains(target);
+            return target.isSupertypeOf(sourceElement);

+        } else if (edge.getVPMEdgeType() == EdgeType.SOURCE && !edge.isSource()) {

+            return (target instanceof IRelation ? 

+                    ((IRelation) target).getFrom().equals(sourceElement) :

+                        false);

+        } else if (edge.getVPMEdgeType() == EdgeType.SOURCE && edge.isSource()) {

+            return (sourceElement instanceof IRelation ? 

+                    ((IRelation) sourceElement).getFrom().equals(target) :

+                        false);

+        } else if (edge.getVPMEdgeType() == EdgeType.TARGET && !edge.isSource()) {

+            return (target instanceof IRelation ? 

+                    ((IRelation) target).getTo().equals(sourceElement) :

+                        false);

+        } else if (edge.getVPMEdgeType() == EdgeType.TARGET && edge.isSource()) {

+            return (sourceElement instanceof IRelation ?

+                    ((IRelation) sourceElement).getTo().equals(target) :

+                        false);

+        } else if (edge.getVPMEdgeType() == EdgeType.IN && !edge.isSource()) {

+            return sourceElement.getNamespace().compareTo(target) == 0;

+        } else if (edge.getVPMEdgeType() == EdgeType.IN && edge.isSource()) {

+            return target.getNamespace().compareTo(sourceElement) == 0;

+        } else if (edge.getVPMEdgeType() == EdgeType.BELOW && !edge.isSource()) {

+            return sourceElement.isBelowNamespace(target);

+        } else if (edge.getVPMEdgeType() == EdgeType.BELOW && edge.isSource()) {

+            return target.isBelowNamespace(sourceElement);

+        }

+        String [] context = {edge.getVPMEdgeType().toString(),getClass().getSimpleName()};
+        throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_OPERATION_NOT_SUPPORTED
+                ,context
+                ,edge.getTraceabilityElement().getRepresentativeEMFElement());
+    }

+

+    public String toString() {

+        return getClass().getSimpleName() + " : " +

+            source +" -- " + edge.getVPMEdgeType().name() + " -> " + target.getName();

+	}
+    
+    public String toString(MatchingFrame frame) {
+   	 IModelElement sourceElement = null;
+     try {
+           sourceElement = (IModelElement) frame.getValue(source);
+       } catch (ClassCastException e) {
+      	 return toString();
+       }
+     if (sourceElement == null) return toString();
+     
+     //in which order the relation is pointing
+     if(edge.getVPMEdgeType() == EdgeType.INSTANCEOF)
+    	 return getClass().getSimpleName() + " : " + 
+    	 edge.getTargetNode().getName() + " -- " + edge.getVPMEdgeType().name() + " -> " + edge.getSourceNode().getName();
+     else //may require additional filtering
+    	 return getClass().getSimpleName() + " : " + 
+    	 edge.getSourceNode().getName() + " -- " + edge.getVPMEdgeType().name() + " -> " + edge.getTargetNode().getName();
+   }

+    

+    public void calculateSidewaysPassedVariables(Set<Integer> variables) {

+    	variables.add(source);

+    }

+    

+    public void calculateLocalVariables(Set<Integer> variables) {

+    	variables.add(source);

+    }
+    
+    public AnnotatedElement getErrorfulElement(MatchingFrame frame) {
+		return edge.getTraceabilityElement().getRepresentativeEMFElement();
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/CheckOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/CheckOperation.java
new file mode 100644
index 0000000..2d72ff2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/CheckOperation.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+
+

+abstract public class CheckOperation extends SearchPlanOperation {

+    private boolean hasBeenExecuted;

+    

+    public CheckOperation() {

+        hasBeenExecuted = false;

+    }

+    

+    public void preprocess(MatchingFrame frame) {

+        hasBeenExecuted = false;

+    }

+    

+    final public boolean execute(MatchingFrame frame) 

+        throws PatternMatcherRuntimeException {

+        hasBeenExecuted = (hasBeenExecuted ? false : check(frame));

+        return hasBeenExecuted;

+    }

+    

+    public void postprocess(MatchingFrame frame) {

+    	return;

+    }

+    

+    abstract protected boolean check(MatchingFrame frame)

+        throws PatternMatcherRuntimeException;

+    

+    public boolean update(MatchingFrame frame) throws PatternMatcherRuntimeException{

+        try {

+            hasBeenExecuted = false;

+            return execute(frame);

+        } catch (PatternMatcherRuntimeException e) {

+            
+        	e.printStackTrace();

+            return false;

+        }

+    }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/ConstantToBoundCheckOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/ConstantToBoundCheckOperation.java
new file mode 100644
index 0000000..75c8187
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/ConstantToBoundCheckOperation.java
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import java.util.Set;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.EdgeType;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+public class ConstantToBoundCheckOperation extends EdgeConstraintCheckOperation {

+    private IModelElement source;

+    private Integer target;

+    private SearchGraphEdge edge;

+    

+    public ConstantToBoundCheckOperation(IModelElement source, 

+            Integer target,

+            SearchGraphEdge edge) {

+        this.source = source;

+        this.target = target;

+        this.edge = edge;

+    }

+    

+    protected boolean check(MatchingFrame frame) 

+        throws PatternMatcherRuntimeException {

+        IModelElement targetElement = null;

+        try {

+            targetElement = (IModelElement) frame.getValue(target);

+        } catch (ClassCastException e) {

+        	String[] context = {edge.getVPMEdgeType().toString(), frame.getPattern().getSearchGraph().getSearchNode(target).getName(), frame.getValue(target).getClass().getName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.NOT_A_MODELELEMENT_CHECK
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(target).getTraceabilityElement().getRepresentativeEMFElement());
+     

+        }

+        if (source == null) {

+        	String[] context = {edge.getSourceNode().getName(),getClass().getSimpleName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,edge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+	

+        }

+        if (targetElement == null) {

+        	String[] context = {frame.getPattern().getSearchGraph().getSearchNode(target).getName(),getClass().getSimpleName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(target).getTraceabilityElement().getRepresentativeEMFElement());
+	

+        }

+

+        if (edge.getVPMEdgeType() == EdgeType.INSTANCEOF && !edge.isSource()) {

+            //return source.getAllTypes().contains(targetElement);
+            return source.isInstanceOf(targetElement);

+        } else if (edge.getVPMEdgeType() == EdgeType.INSTANCEOF && edge.isSource()) {

+        	////return source.getAllInstances().contains(targetElement);
+        	return targetElement.isInstanceOf(source);

+        } else if (edge.getVPMEdgeType() == EdgeType.SUPERTYPEOF && !edge.isSource()) {

+            //return source.getAllSubtypes().contains(targetElement);
+        	return targetElement.isSubtypeOf(source);

+        } else if (edge.getVPMEdgeType() == EdgeType.SUPERTYPEOF && edge.isSource()) {

+            //return source.getAllSupertypes().contains(targetElement);
+            return source.isSubtypeOf(targetElement);

+        } else if (edge.getVPMEdgeType() == EdgeType.SOURCE && !edge.isSource()) {

+            return (targetElement instanceof IRelation ? 

+                    ((IRelation) targetElement).getFrom().equals(source) :

+                        false);

+        } else if (edge.getVPMEdgeType() == EdgeType.SOURCE && edge.isSource()) {

+            return (source instanceof IRelation ? 

+                    ((IRelation) source).getFrom().equals(targetElement) :

+                        false);

+        } else if (edge.getVPMEdgeType() == EdgeType.TARGET && !edge.isSource()) {

+            return (targetElement instanceof IRelation ? 

+                    ((IRelation) targetElement).getTo().equals(source) :

+                        false);

+        } else if (edge.getVPMEdgeType() == EdgeType.TARGET && edge.isSource()) {

+            return (source instanceof IRelation ? 

+                    ((IRelation) source).getTo().equals(targetElement) :

+                        false);

+        } else if (edge.getVPMEdgeType() == EdgeType.IN && !edge.isSource()) {

+            return source.getNamespace().compareTo(targetElement) == 0;

+        } else if (edge.getVPMEdgeType() == EdgeType.IN && edge.isSource()) {

+            return targetElement.getNamespace().compareTo(source) == 0;

+        } else if (edge.getVPMEdgeType() == EdgeType.BELOW && !edge.isSource()) {

+            return source.isBelowNamespace(targetElement);

+        } else if (edge.getVPMEdgeType() == EdgeType.BELOW && edge.isSource()) {

+            return targetElement.isBelowNamespace(source);

+        }

+        String [] context = {edge.getVPMEdgeType().toString(),getClass().getSimpleName()};
+        throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_OPERATION_NOT_SUPPORTED
+                ,context
+                ,edge.getTraceabilityElement().getRepresentativeEMFElement());
+  }

+    

+    public String toString() {

+        return getClass().getSimpleName() + " : " + 

+            source.getName() + " -- " + edge.getVPMEdgeType().name() + " -> " + target;

+	}
+    
+    public String toString(MatchingFrame frame) {
+   	    IModelElement targetElement = null;
+        try {
+            targetElement = (IModelElement) frame.getValue(target);
+        } catch (ClassCastException e) {
+       	 return toString();
+        }
+        if (targetElement == null) return toString();
+        
+        //in which order the relation is pointing
+        if(edge.getVPMEdgeType() == EdgeType.INSTANCEOF)
+        	return getClass().getSimpleName() + " : " + 
+        	edge.getTargetNode().getName() + " -- " + edge.getVPMEdgeType().name() + " -> " + edge.getSourceNode().getName();
+        else //may require additional filtering
+        	return getClass().getSimpleName() + " : " + 
+       	 	edge.getSourceNode().getName() + " -- " + edge.getVPMEdgeType().name() + " -> " + edge.getTargetNode().getName();
+	}

+

+    public void calculateSidewaysPassedVariables(Set<Integer> variableSet) {

+    	variableSet.add(target);

+    }

+    

+    public void calculateLocalVariables(Set<Integer> variableSet) {

+    	variableSet.add(target);

+    }
+    
+    public AnnotatedElement getErrorfulElement(MatchingFrame frame) {
+		return edge.getTraceabilityElement().getRepresentativeEMFElement();
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/ConstantToConstantCheckOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/ConstantToConstantCheckOperation.java
new file mode 100644
index 0000000..5842eef
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/ConstantToConstantCheckOperation.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.EdgeType;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+public class ConstantToConstantCheckOperation extends EdgeConstraintCheckOperation {

+    private IModelElement source;

+    private IModelElement target;

+    private SearchGraphEdge edge;

+    

+    

+    public ConstantToConstantCheckOperation(IModelElement source, 

+    		IModelElement target,

+            SearchGraphEdge edge) {

+        this.source = source;

+        this.target = target;

+        this.edge = edge;

+    }

+

+    protected boolean check(MatchingFrame frame) 

+        throws PatternMatcherRuntimeException {

+        if (source == null) {

+        	String[] context = {edge.getTargetNode().getName(),getClass().getSimpleName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,edge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+	

+        }

+        if (target == null) {

+        	String[] context = {edge.getTargetNode().getName(),getClass().getSimpleName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,edge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+	

+        }

+

+        if (edge.getVPMEdgeType() == EdgeType.INSTANCEOF && !edge.isSource()) {

+            //return source.getAllTypes().contains(target);
+            return source.isInstanceOf(target);

+        } else if (edge.getVPMEdgeType() == EdgeType.INSTANCEOF && edge.isSource()) {

+            //return source.getAllInstances().contains(target);
+        	return target.isInstanceOf(source);

+        } else if (edge.getVPMEdgeType() == EdgeType.SUPERTYPEOF && !edge.isSource()) {

+            //return source.getAllSubtypes().contains(target);
+            return target.isSubtypeOf(source);

+        } else if (edge.getVPMEdgeType() == EdgeType.SUPERTYPEOF && edge.isSource()) {

+            //return source.getAllSupertypes().contains(target);
+        	return source.isSubtypeOf(target);

+        } else if (edge.getVPMEdgeType() == EdgeType.SOURCE && !edge.isSource()) {

+        	return (target instanceof IRelation ? 

+                    ((IRelation) target).getFrom().equals(source) :

+                        false);

+        } else if (edge.getVPMEdgeType() == EdgeType.SOURCE && edge.isSource()) {

+            return (source instanceof IRelation ?

+                    ((IRelation) source).getFrom().equals(target) :

+                        false);

+        } else if (edge.getVPMEdgeType() == EdgeType.TARGET && !edge.isSource()) {

+            return (target instanceof IRelation ?

+                    ((IRelation) target).getTo().equals(source) :

+                        false);

+        } else if (edge.getVPMEdgeType() == EdgeType.TARGET && edge.isSource()) {

+            return (source instanceof IRelation ? 

+                    ((IRelation) source).getTo().equals(target) : 

+                        false);

+        } else if (edge.getVPMEdgeType() == EdgeType.IN && !edge.isSource()) {

+            return source.getNamespace().compareTo(target) == 0;

+        } else if (edge.getVPMEdgeType() == EdgeType.IN && edge.isSource()) {

+            return target.getNamespace().compareTo(source) == 0;

+        } else if (edge.getVPMEdgeType() == EdgeType.BELOW && !edge.isSource()) {

+            return source.isBelowNamespace(target);

+        } else if (edge.getVPMEdgeType() == EdgeType.BELOW && edge.isSource()) {

+            return target.isBelowNamespace(source);

+        }

+        String [] context = {edge.getVPMEdgeType().toString(),getClass().getSimpleName()};
+        throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_OPERATION_NOT_SUPPORTED
+                ,context
+                ,edge.getTraceabilityElement().getRepresentativeEMFElement());
+    }

+

+    public String toString() {

+		return getClass().getSimpleName() + " : " +

+            source.getName() + " -- " + edge.getVPMEdgeType().name()+ " -> " + target.getName();

+	}
+    
+    public AnnotatedElement getErrorfulElement(MatchingFrame frame) {
+		return edge.getTraceabilityElement().getRepresentativeEMFElement();
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/CopyValueOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/CopyValueOperation.java
new file mode 100644
index 0000000..f3a4ebe
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/CopyValueOperation.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import java.util.Set;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+public class CopyValueOperation extends CheckOperation {

+    private Integer bound;

+    private Integer unbound;
+    private SearchGraphEdge relatedSearchGraphEdge;

+    

+	public CopyValueOperation(Integer bound, Integer unbound, SearchGraphEdge edge) {

+	    this.bound = bound;

+	    this.unbound = unbound;
+	    relatedSearchGraphEdge = edge;

+	}

+	

+	@Override

+	protected boolean check(MatchingFrame frame) throws PatternMatcherRuntimeException {

+        IModelElement boundElement = null;

+        try {

+            boundElement = (IModelElement) frame.getValue(bound);

+        } catch (ClassCastException e) {
+        	String[] context = {frame.getPattern().getSearchGraph().getSearchNode(bound).getName(), getClass().getSimpleName()};

+            throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.NOT_A_MODELELEMENT
+            		,context
+            		,frame.getPattern().getSearchGraph().getSearchNode(bound).getTraceabilityElement().getRepresentativeEMFElement());

+        }

+        if (boundElement == null) {

+        	String[] context = {frame.getPattern().getSearchGraph().getSearchNode(bound).getName(),getClass().getSimpleName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(bound).getTraceabilityElement().getRepresentativeEMFElement());
+        }

+        frame.setValue(unbound, boundElement);

+		return true;

+	}

+    

+    public String toString() {

+        return getClass().getSimpleName() + " : " + bound + " -> " + unbound;

+	}

+    

+    public void calculateSidewaysPassedVariables(Set<Integer> variableSet) {

+    	variableSet.add(bound);

+    	variableSet.remove(unbound);

+    }

+    

+    public void calculateLocalVariables(Set<Integer> variableSet) {

+    	variableSet.add(bound);

+    }
+
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame) {
+		return frame.getPattern().getGTASMRepresentation(relatedSearchGraphEdge);
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/DummyOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/DummyOperation.java
new file mode 100644
index 0000000..6a73a7d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/DummyOperation.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+
+

+public class DummyOperation extends SearchPlanOperation {

+

+	@Override

+	public boolean execute(MatchingFrame frame) throws PatternMatcherRuntimeException {

+		return false;

+	}

+

+	@Override

+	public void postprocess(MatchingFrame frame) throws PatternMatcherRuntimeException {

+		return;

+	}

+

+	@Override

+	public void preprocess(MatchingFrame frame) throws PatternMatcherRuntimeException {

+		return;

+	}
+
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame) {
+		return null;
+	}
+	
+	public String toString(MatchingFrame frame) {
+		return "Dummy operation";
+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/EdgeConstraintCheckOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/EdgeConstraintCheckOperation.java
new file mode 100644
index 0000000..d7b64ef
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/EdgeConstraintCheckOperation.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+/**

+ * Represents an operation, which checks the existence of

+ * a model edge leading between two nodes that have already

+ * been bound.

+ */

+public abstract class EdgeConstraintCheckOperation 

+	extends CheckOperation //implements IUpdatePlanOperation 

+	{

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/ExtendBoundNodeOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/ExtendBoundNodeOperation.java
new file mode 100644
index 0000000..11d0bbe
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/ExtendBoundNodeOperation.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.EdgeType;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+

+/**

+ * The ExtendBoundNodeOperation is an ExtendOperation

+ * where the fixed node has been bound in an earlier phase 

+ * of the algorithm. 

+ */

+public class ExtendBoundNodeOperation extends ExtendOperation {

+    private Integer bound;

+    

+	/**

+	 * @param bound the bound pattern variable.

+	 * @param unbound the unbound pattern variable.

+	 * @param edgeType type of the edge.

+	 * @param isSrc true, if the bound node is the source of the edge.

+	 */

+	public ExtendBoundNodeOperation(Integer bound, Integer unbound,

+			SearchGraphEdge edge) {

+        super(unbound, edge);

+	    this.bound = bound;

+	}

+	

+    public void preprocess(MatchingFrame frame) 

+        throws PatternMatcherRuntimeException {

+        IModelElement boundElement = null;

+        try {

+            boundElement = (IModelElement) frame.getValue(bound);

+        } catch (ClassCastException e) {

+        	String[] context = {edge.getVPMEdgeType().toString(), frame.getPattern().getSearchGraph().getSearchNode(bound).getName(), frame.getValue(bound).getClass().getName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.NOT_A_MODELELEMENT_EXTEND
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(bound).getTraceabilityElement().getRepresentativeEMFElement());
+        }

+        if (boundElement == null) {

+        	String[] context = {frame.getPattern().getSearchGraph().getSearchNode(bound).getName(),getClass().getSimpleName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(bound).getTraceabilityElement().getRepresentativeEMFElement());
+	

+        }

+        

+            if (edge.getVPMEdgeType() == EdgeType.INSTANCEOF && !edge.isSource()) {

+                iterator = boundElement.getAllTypes().iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.INSTANCEOF && edge.isSource()) {

+                iterator = boundElement.getAllInstances().iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.SUPERTYPEOF && !edge.isSource()) {

+                iterator = boundElement.getAllSubtypes().iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.SUPERTYPEOF && edge.isSource()) {

+                iterator = boundElement.getAllSupertypes().iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.SOURCE && !edge.isSource()) {

+                iterator = boundElement.getRelationsFrom().iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.SOURCE && edge.isSource()) {

+                Collection<IModelElement> coll = new HashSet<IModelElement>();

+                if (boundElement instanceof IRelation) {

+                    coll.add(((IRelation) boundElement).getFrom());

+                }

+                iterator = coll.iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.TARGET && !edge.isSource()) {

+                iterator = boundElement.getRelationsTo().iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.TARGET && edge.isSource()) {

+                Collection<IModelElement> coll = new HashSet<IModelElement>();

+                if (boundElement instanceof IRelation) {

+                    coll.add(((IRelation) boundElement).getTo());

+                }

+                iterator = coll.iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.IN && edge.isSource()) {

+                iterator = boundElement.getElementsInNamespace().iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.BELOW && edge.isSource()) {

+                iterator = boundElement.getAllElementsInNamespace().iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.IN && !edge.isSource()) {

+            	Collection<IModelElement> coll = new HashSet<IModelElement>();

+                if(boundElement.getNamespace() != null)
+                	coll.add(boundElement.getNamespace());

+            	
+                iterator = coll.iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.BELOW && !edge.isSource()) {

+                String[] context = {frame.getPattern().getSearchGraph().getSearchNode(unbound).getName(),edge.getVPMEdgeType().toString()};
+            	throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_OPERATION_NOT_POSSIBLE
+            			,context
+            			,edge.getTraceabilityElement().getRepresentativeEMFElement());

+            } else if (edge.getVPMEdgeType() == EdgeType.NACCHECK) {

+            	String[] context = {frame.getPattern().getSearchGraph().getSearchNode(unbound).getName(),edge.getVPMEdgeType().toString()};
+            	throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_OPERATION_NOT_POSSIBLE
+            			,context
+            			,edge.getTraceabilityElement().getRepresentativeEMFElement());
+           

+            }

+    }

+    

+    public String toString() {

+        return getClass().getSimpleName() + " : " + 

+            bound + " -- " + edge.getVPMEdgeType().name() + " -> " + unbound;

+	}

+    

+    public void calculateSidewaysPassedVariables(Set<Integer> variableSet) {

+    	variableSet.add(bound);

+    	super.calculateSidewaysPassedVariables(variableSet);

+    }

+    

+    public void calculateLocalVariables(Set<Integer> variableSet) {

+    	variableSet.add(bound);

+    }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/ExtendConstantNodeOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/ExtendConstantNodeOperation.java
new file mode 100644
index 0000000..0276161
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/ExtendConstantNodeOperation.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import java.util.Collection;
+import java.util.HashSet;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.EdgeType;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+

+

+/**

+ * ExtendConstantNodeOperation is an ExtendOperation where

+ * the bound node is a constant node.

+ */

+public class ExtendConstantNodeOperation extends ExtendOperation {

+    private IModelElement bound;

+    

+	/**

+	 * @param bound The constant node to be extended.

+	 * @param unbound The unbound pattern variable.

+	 * @param edgeType The type of the edge.

+	 * @param isSrc true, if the constant node is the source of the 

+     * edge.

+	 */

+	public ExtendConstantNodeOperation(IModelElement bound, Integer unbound,

+			SearchGraphEdge edge) {

+        super(unbound,edge);

+        this.bound = bound;

+	}

+	

+    public void preprocess(MatchingFrame frame) 

+        throws PatternMatcherRuntimeException {

+        if (bound == null) {

+        	String[] context = {edge.getSourceNode().getName(),getClass().getSimpleName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,edge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+        }

+        

+            if (edge.getVPMEdgeType() == EdgeType.INSTANCEOF && !edge.isSource()) {

+                iterator = bound.getAllTypes().iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.INSTANCEOF && edge.isSource()) {

+                iterator = bound.getAllInstances().iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.SUPERTYPEOF && !edge.isSource()) {

+                iterator = bound.getAllSubtypes().iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.SUPERTYPEOF && edge.isSource()) {

+                iterator = bound.getAllSupertypes().iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.SOURCE && !edge.isSource()) {

+                iterator = bound.getRelationsFrom().iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.SOURCE && edge.isSource()) {

+                Collection<IModelElement> coll = new HashSet<IModelElement>();

+                if (bound instanceof IRelation) {

+                    coll.add(((IRelation) bound).getFrom());

+                }

+                iterator = coll.iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.TARGET && !edge.isSource()) {

+                iterator = bound.getRelationsTo().iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.TARGET && edge.isSource()) {

+                Collection<IModelElement> coll = new HashSet<IModelElement>();

+                if (bound instanceof IRelation) {

+                    coll.add(((IRelation) bound).getTo());

+                }

+                iterator = coll.iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.IN && edge.isSource()) {

+                iterator = bound.getElementsInNamespace().iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.BELOW && edge.isSource()) {

+                iterator = bound.getAllElementsInNamespace().iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.IN && !edge.isSource()) {

+            	Collection<IModelElement> coll = new HashSet<IModelElement>();

+            	if(bound.getNamespace() != null)
+            		coll.add(bound.getNamespace());

+            	
+            	iterator = coll.iterator();

+            } else if (edge.getVPMEdgeType() == EdgeType.BELOW && !edge.isSource()) {

+            	String[] context = {frame.getPattern().getSearchGraph().getSearchNode(unbound).getName(),edge.getVPMEdgeType().toString()};
+            	throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_OPERATION_NOT_POSSIBLE
+            			,context
+            			,edge.getTraceabilityElement().getRepresentativeEMFElement());
+           

+            } else if (edge.getVPMEdgeType() == EdgeType.NACCHECK) {

+            	String[] context = {frame.getPattern().getSearchGraph().getSearchNode(unbound).getName(),edge.getVPMEdgeType().toString()};
+            	throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_OPERATION_NOT_POSSIBLE
+            			,context
+            			,edge.getTraceabilityElement().getRepresentativeEMFElement());
+            }

+    }

+

+    public String toString() {

+        return getClass().getSimpleName() + " : " + 

+            bound.getName() + " -- " + edge.getVPMEdgeType().name() + " -> " + unbound;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/ExtendOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/ExtendOperation.java
new file mode 100644
index 0000000..98d83fa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/ExtendOperation.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * The ExtendOperation is a SearchPlanOperation, where

+ * an already bound node is extended towards 

+ * an unbound node.

+ */

+public abstract class ExtendOperation extends SearchPlanOperation {

+    protected Integer unbound;

+    protected SearchGraphEdge edge;

+   

+    protected Iterator iterator;

+    

+    public ExtendOperation(Integer unbound, SearchGraphEdge edge) {

+        this.unbound = unbound;

+        this.edge = edge;

+        this.iterator = null;

+    }

+    

+    public void postprocess(MatchingFrame frame) {

+        frame.setValue(unbound, null);

+        iterator = null;

+    }

+    

+    public boolean execute(MatchingFrame frame) 

+        throws PatternMatcherRuntimeException {
+    	Object next = "";

+        try {

+            if (iterator.hasNext()) {
+            	next = iterator.next();

+                IModelElement modelElement = (IModelElement) next;

+                frame.setValue(unbound, modelElement);

+                return true;

+            } else {

+                return false;

+            }

+        } catch (ClassCastException e) {

+        	String[] context = {edge.getVPMEdgeType().toString(), frame.getPattern().getSearchGraph().getSearchNode(unbound).getName(), next.getClass().getName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.NOT_A_MODELELEMENT_EXTEND
+					,context
+					,frame.getPattern().getSearchGraph().getSearchNode(unbound).getTraceabilityElement().getRepresentativeEMFElement());
+        }

+    }

+    

+    public void calculateSidewaysPassedVariables(Set<Integer> variableSet) {

+    	variableSet.remove(unbound);

+    }
+    
+    public AnnotatedElement getErrorfulElement(MatchingFrame frame) {
+		return frame.getPattern().getSearchGraph().getSearchNode(unbound).getTraceabilityElement().getRepresentativeEMFElement();
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/ISearchPlanOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/ISearchPlanOperation.java
new file mode 100644
index 0000000..7cd202e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/ISearchPlanOperation.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+
+

+public interface ISearchPlanOperation {

+	/** The pre execution operations are handled
+	 * @param frame The matching frame of the invocation context 
+	 * @throws PatternMatcherRuntimeException
+	 */
+	public void preprocess(MatchingFrame frame) 

+    	throws PatternMatcherRuntimeException;

+

+	/** The post execution operations are handled
+	 * @param frame The matching frame of the invocation context 
+	 * @throws PatternMatcherRuntimeException
+	 */
+	public void postprocess(MatchingFrame frame) 

+    	throws PatternMatcherRuntimeException;

+

+	/**Executes the search operation
+	 * @param frame The matching frame of the invocation context
+	 * @return true if the execution was successful else false
+	 * @throws PatternMatcherRuntimeException
+	 */
+	public boolean execute(MatchingFrame frame) 

+    	throws PatternMatcherRuntimeException;
+	
+	/**Returns the GTASM element from which the operation was created (also which caused the error durng the execution)
+	 * @param frame The matching frame of the invocation context
+	 * @return
+	 */
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame);
+	
+	/**A detailed serialized description of the operation
+	 * @param frame The matching frame of the invocation context
+	 * @return
+	 */
+	public String toString(MatchingFrame frame);
+	
+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/InjectivityCheckOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/InjectivityCheckOperation.java
new file mode 100644
index 0000000..0200b01
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/InjectivityCheckOperation.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.FlattenedPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+
+

+public class InjectivityCheckOperation extends CheckOperation {

+    protected boolean check(MatchingFrame frame) {

+    	FlattenedPattern pattern = frame.getPattern();

+        int size = pattern.getInjectivityFrameSize();

+        for (int i = 1; i < size; i++) {

+            for (int j = 0; j < i; j++) {

+                // TODO refactor frame.getValue(j) -> frame.frame[j] as it may be faster

+                if(frame.getValue(j) != null && frame.getValue(i) != null ) //TODO: akinator: this is just a hack because of NAC and injectivity check!!! have to be fixed

+            	if (pattern.isIncludedInInjectivityCheck(j, i) && 

+                		frame.getValue(j).equals(frame.getValue(i))) {

+                    return false;

+                }

+            }

+        }

+        return true;

+    }
+
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame) {
+		return frame.getPattern().getParent().getPattern();
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/InputCheckOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/InputCheckOperation.java
new file mode 100644
index 0000000..fe5e104
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/InputCheckOperation.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+
+

+public class InputCheckOperation extends CheckOperation {

+    private int index;

+    private Object value;

+    

+    public InputCheckOperation(int index, Object value) {

+        this.index = index;

+        this.value = value;

+    }

+    

+    @Override

+    protected boolean check(MatchingFrame frame) throws PatternMatcherRuntimeException{

+        /*if (value != null) {

+            return frame.testAndSetValue(index, value);

+        } else {

+            return false;

+        }*/
+    	
+    	String[] context = {getClass().getSimpleName()};
+    	throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_OPERATION_NOT_USED
+    			,context
+    			,null);

+    }
+
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame) {
+		return null;
+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/IsEntityorRelationCheckOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/IsEntityorRelationCheckOperation.java
new file mode 100644
index 0000000..a572d55
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/IsEntityorRelationCheckOperation.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.algorithms.ISearchGraph;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class IsEntityorRelationCheckOperation extends CheckOperation {

+

+	private Integer source;

+	private SearchGraphEdge relatedSearchGraphEdge;

+	private String type;

+	

+	/**

+	 * 

+	 */

+	public IsEntityorRelationCheckOperation(Integer source, 

+            SearchGraphEdge edge,

+            String type) {

+        this.source = source;

+        this.relatedSearchGraphEdge = edge;

+        this.type = type;

+	}

+

+	@Override

+	protected boolean check(MatchingFrame frame)

+			throws PatternMatcherRuntimeException {

+		IModelElement sourceElement = null;

+		try{

+	           sourceElement = (IModelElement) frame.getValue(source);

+	    }catch (ClassCastException e) {

+	         	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(), getClass().getSimpleName()};
+				throw new PatternMatcherRuntimeException(GTErrorStrings.NOT_A_MODELELEMENT
+						,context
+						,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+	    }
+	    

+	    if (sourceElement == null) {

+	    	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(),getClass().getSimpleName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+	    }

+		

+	    if(ISearchGraph.VPM_ENTITY_FQN.equals(type))

+	    	return sourceElement.isEntity();

+	    

+	    if(ISearchGraph.VPM_RELATION_FQN.equals(type))

+	    	return sourceElement.isRelation();

+	    

+		return false;

+	}

+	

+	public String toString(){

+		return getClass().getSimpleName() + " : " + 

+        type+"-- " + relatedSearchGraphEdge.getVPMEdgeType().name() + "- CHECK -> " + source;

+	}
+
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame) {
+		return relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement();
+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/NACCheckOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/NACCheckOperation.java
new file mode 100644
index 0000000..ee74b9f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/NACCheckOperation.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import java.util.Collection;
+
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IPatternMatcher;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+

+/**

+ * NACCheckOperation checks an embedded negative pattern.

+ */

+public class NACCheckOperation extends CheckOperation {

+    private IPatternMatcher patternMatcher;

+    private int[] actualParameterMapping;
+    private Collection<Variable> passingVariables;
+    private GTPatternCall nacCall;

+

+    public NACCheckOperation(IPatternMatcher matcher,

+            int[] actualParameterMapping, GTPatternCall call, Collection<Variable> passingVariables) {

+        this.patternMatcher = matcher;

+        this.actualParameterMapping = actualParameterMapping;
+        nacCall = call;
+        this.passingVariables = passingVariables;
+    }

+

+    protected boolean check(MatchingFrame frame) throws PatternMatcherRuntimeException{

+        Object[] actualParameters = new Object[actualParameterMapping.length];

+
+
+        for (int i = 0; i < actualParameterMapping.length; i++) {

+        	actualParameters[i] = frame.getValue(actualParameterMapping[i]);
+            if(actualParameters[i] == null
+            		|| actualParameters[i].equals(ValueKind.UNDEF_LITERAL))
+            		{
+            		if(passingVariables.contains(((VariableReference)nacCall.getActualParameters().get(i)).getVariable()))
+            			{
+            			String[] context =
+	            			{nacCall.getCalledPattern().getName()
+	            				,nacCall.getCalledPattern().getSymParameters().get(i).getName()};
+	            		throw new PatternMatcherRuntimeException(
+							PatternMatcherErrorStrings.NAC_CALL_WITH_UNBOUND_PARAMETER
+									,context
+									,nacCall);
+	            		}
+            		//TODO: else? it is a local variable that is only used in the NAC call
+            		}

+        }

+        try {

+			return !patternMatcher.match(actualParameters);

+		} catch (ViatraTransformationException e) {

+			throw new PatternMatcherRuntimeException(e,nacCall);

+		}

+    }
+
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame) {
+		return nacCall;
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/PatternCallOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/PatternCallOperation.java
new file mode 100644
index 0000000..96d4421
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/PatternCallOperation.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import java.util.Set;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.PatternNode;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+/**

+ * Represents a pattern call operation in a recursive pattern

+ * variant. Such operation is contained by only non-recursive

+ * FlattenedPatterns.

+ */

+public class PatternCallOperation extends SearchPlanOperation {

+	private PatternNode calledPattern = null;

+	private Integer[] callFormalToActualMapping = null;

+	private Boolean[] adornment = null;

+	

+	public PatternCallOperation(PatternNode calledPattern, 

+			Integer[] parameterMapping, 

+			Boolean[] boundParameters) {

+		assert parameterMapping.length == boundParameters.length;

+		this.calledPattern = calledPattern;

+		this.callFormalToActualMapping = parameterMapping;

+		this.adornment = boundParameters;

+	}

+	

+	public void calculateSidewaysPassedVariables(Set<Integer> variableSet) {

+		for (int i = 0; i < callFormalToActualMapping.length; i++) {

+			variableSet.add(callFormalToActualMapping[i]);

+			if (!adornment[i]) {

+				variableSet.remove(callFormalToActualMapping[i]);

+			}

+		}

+	}

+	

+	public void calculateLocalVariables(Set<Integer> variableSet) {

+		for (int i = 0; i < callFormalToActualMapping.length; i++) {

+			variableSet.add(callFormalToActualMapping[i]);

+		}

+	}

+	

+	public PatternNode getPatternNode() {

+		return calledPattern;

+	}

+	

+	public Boolean[] getAdornment() {

+		return adornment;

+	}

+

+	public Integer[] getParameterMapping() {

+		return callFormalToActualMapping;

+	}

+	

+	public String toString(){

+		StringBuffer b = new StringBuffer();

+		b.append(getClass().getSimpleName());

+		b.append(" : ");

+		b.append(calledPattern.getPattern().getName());

+		b.append("^");

+		

+		StringBuffer params = new StringBuffer();

+		assert adornment.length == callFormalToActualMapping.length;

+		for (int i = 0; i < adornment.length; i++) {

+			b.append((adornment[i] ? 'b' : 'f'));

+			params.append(callFormalToActualMapping[i]);

+		}

+		b.append("(");

+		b.append(params);

+		b.append(")");

+		return b.toString();

+	}

+

+	@Override

+	public boolean execute(MatchingFrame frame) throws PatternMatcherRuntimeException {

+		return false;

+	}

+

+	@Override

+	public void postprocess(MatchingFrame frame) throws PatternMatcherRuntimeException {

+	}

+

+	@Override

+	public void preprocess(MatchingFrame frame) throws PatternMatcherRuntimeException {

+	}
+
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame) {
+		return null;
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/SearchPlanOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/SearchPlanOperation.java
new file mode 100644
index 0000000..55e1da0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/SearchPlanOperation.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import java.util.Set;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+

+

+/**

+ * The root of the search plan operation hierarchy.

+ */

+public abstract class SearchPlanOperation implements ISearchPlanOperation{

+	abstract public void preprocess(MatchingFrame frame) 

+        throws PatternMatcherRuntimeException;

+

+	abstract public void postprocess(MatchingFrame frame) 

+        throws PatternMatcherRuntimeException;

+

+	abstract public boolean execute(MatchingFrame frame) 

+        throws PatternMatcherRuntimeException;

+	

+    public boolean update(MatchingFrame frame) throws PatternMatcherRuntimeException {

+            return execute(frame);

+    }

+    

+    public String toString() {

+        return getClass().getSimpleName();

+    }

+

+    public void calculateSidewaysPassedVariables(Set<Integer> variables) {

+		/* default generated stub */;

+		

+	}

+    

+    public void calculateLocalVariables(Set<Integer> variables) {

+		/* default generated stub */;

+    	

+    }
+    
+    public String toString(MatchingFrame frame) {
+		return toString();
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/TermCheckOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/TermCheckOperation.java
new file mode 100644
index 0000000..69c4e45
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/TermCheckOperation.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.term.rules.TermEvaluator;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.AbstractTermCheckOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.TermCheckExecutionEnvironment;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+
+

+public class TermCheckOperation extends AbstractTermCheckOperation {

+	private IExecutionEnvironment parentEnv;

+    private GTPattern pattern;

+    private int uid;

+    private Term term;

+    

+    public TermCheckOperation(IExecutionEnvironment parentEnv, 

+    		GTPattern pattern, int uid, Term term) {

+    	this.parentEnv = parentEnv;

+        this.pattern = pattern;

+        this.uid = uid;

+        this.term = term;

+    }

+    

+    public boolean check(MatchingFrame frame) throws PatternMatcherRuntimeException{

+        TermCheckExecutionEnvironment env = new TermCheckExecutionEnvironment(parentEnv, pattern, uid, frame);

+        Boolean result = false;

+        try {

+            result = (Boolean) TermEvaluator.getInstance().evaluate(env, term);

+        } catch (ViatraTransformationException e) {

+        	throw new PatternMatcherRuntimeException(e,term); 

+        } catch (ClassCastException e) {

+        	String[] context = {pattern.getName()};
+        	throw new PatternMatcherRuntimeException(
+        			PatternMatcherErrorStrings.CHECK_EXPRESSION_NOT_EVALUATED_TO_A_BOOLEAN
+        			,context
+        			,term);

+        }

+        return result;

+    }
+
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame) {
+		return term;
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/TermEvaluationOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/TermEvaluationOperation.java
new file mode 100644
index 0000000..13e4695
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/TermEvaluationOperation.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.term.rules.TermEvaluator;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.AbstractTermCheckOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term.TermCheckExecutionEnvironment;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+
+

+public class TermEvaluationOperation extends AbstractTermCheckOperation {

+	private IExecutionEnvironment parentEnv;

+    private GTPattern pattern;

+    private int uid;

+    private Term term;

+    private int resultSlot;
+    private ContainmentConstraint containmentConstraint;

+    

+    public TermEvaluationOperation(IExecutionEnvironment parentEnv, 
+    		GTPattern pattern, int uid, Term term, int resultSlot) {
+    	this.parentEnv = parentEnv;
+        this.pattern = pattern;
+        this.uid = uid;
+        this.term = term;
+        this.containmentConstraint = null;
+        this.resultSlot = resultSlot;
+    }
+    
+    public TermEvaluationOperation(IExecutionEnvironment parentEnv, 

+    		GTPattern pattern, int uid, ContainmentConstraint conCons, int resultSlot) {

+    	this.parentEnv = parentEnv;

+        this.pattern = pattern;

+        this.uid = uid;

+        this.term = conCons.getParent();
+        this.containmentConstraint = conCons;

+        this.resultSlot = resultSlot;

+    }

+    

+    protected boolean check(MatchingFrame frame)throws PatternMatcherRuntimeException{

+        TermCheckExecutionEnvironment env = new TermCheckExecutionEnvironment(parentEnv, pattern, uid, frame);

+        Object result = null;

+        try {

+            result = TermEvaluator.getInstance().evaluate(env, term);

+        } catch (ViatraTransformationException e) {

+        	throw new PatternMatcherRuntimeException(e,containmentConstraint != null? containmentConstraint: term); 

+        }

+        return (result != null ? frame.testAndSetValue(resultSlot, result) : false);

+    }
+
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame) {
+		return containmentConstraint != null? containmentConstraint: term;
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/VariableAssignmentCheckOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/VariableAssignmentCheckOperation.java
new file mode 100644
index 0000000..e0f4f5d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/operation/VariableAssignmentCheckOperation.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;

+

+import java.util.Set;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.gtmatcher.exceptions.GTErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+

+

+public class VariableAssignmentCheckOperation extends CheckOperation {

+    private Integer source;

+    private Integer target;
+    private SearchGraphEdge relatedSearchGraphEdge;

+    

+    public VariableAssignmentCheckOperation(Integer source, 

+            Integer target, SearchGraphEdge edge) {

+        this.source = source;

+        this.target = target;
+        this.relatedSearchGraphEdge = edge;

+    }

+

+    protected boolean check(MatchingFrame frame) 

+        throws PatternMatcherRuntimeException {

+        IModelElement sourceElement = null;

+        IModelElement targetElement = null;

+        try {

+            sourceElement = (IModelElement) frame.getValue(source);

+        } catch (ClassCastException e) {

+        	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(), getClass().getSimpleName()};
+			throw new PatternMatcherRuntimeException(GTErrorStrings.NOT_A_MODELELEMENT
+					,context
+					,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+

+        }

+        try {

+            targetElement = (IModelElement) frame.getValue(target);

+        } catch (ClassCastException e) {

+        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(), getClass().getSimpleName()};
+			throw new PatternMatcherRuntimeException(GTErrorStrings.NOT_A_MODELELEMENT
+					,context
+					,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+

+        }

+        if (sourceElement == null) {

+        	String[] context = {relatedSearchGraphEdge.getSourceNode().getName(),getClass().getSimpleName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,relatedSearchGraphEdge.getSourceNode().getTraceabilityElement().getRepresentativeEMFElement());
+	

+        }

+        if (targetElement == null) {

+        	String[] context = {relatedSearchGraphEdge.getTargetNode().getName(),getClass().getSimpleName()};
+			throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_EMPTY_VALUE
+					,context
+					,relatedSearchGraphEdge.getTargetNode().getTraceabilityElement().getRepresentativeEMFElement());
+	

+        }

+        return sourceElement.equals(targetElement);

+    }

+

+    public String toString() {

+		return getClass().getSimpleName() + " : " + 

+            source + " == " + target;

+	}

+    

+    public void calculateSidewaysPassedVariables(Set<Integer> variables) {

+    	variables.add(source);

+    	variables.add(target);

+    }

+    

+    public void calculateLocalVariables(Set<Integer> variables) {

+    	variables.add(source);

+    	variables.add(target);

+    }
+
+	public AnnotatedElement getErrorfulElement(MatchingFrame frame) {
+		return relatedSearchGraphEdge.getTraceabilityElement().getRepresentativeEMFElement();
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/Goal.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/Goal.java
new file mode 100644
index 0000000..6783ff6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/Goal.java
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg;

+

+abstract public class Goal extends RuleGoalGraphNode {

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/HistoryList.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/HistoryList.java
new file mode 100644
index 0000000..9c6f4ed
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/HistoryList.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg;

+

+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.IKeyGenerator;
+

+

+public class HistoryList<KeyType, ValueType> extends LinkedList<ValueType> {

+	private static final long serialVersionUID = 4033836249907829630L;

+	private IKeyGenerator<KeyType, ValueType> keyGenerator;

+	private Map<KeyType, List<ValueType>> map;

+	

+	public HistoryList(IKeyGenerator<KeyType, ValueType> keyGenerator) {

+		this.keyGenerator = keyGenerator;

+		this.map = new HashMap<KeyType, List<ValueType>>();

+	}

+	

+	public List<ValueType> get(KeyType key) {

+		return map.get(key);

+	}

+

+	public void init() {

+		clear();

+		map.clear();

+	}

+	

+	public Iterator<ValueType> iterator() {

+		return new Itr(super.iterator());

+	}

+	

+	private class Itr implements Iterator<ValueType> {

+		private Iterator<ValueType> backingIterator;

+		private ValueType lastReturned;

+

+		private Itr(Iterator<ValueType> i) {

+			backingIterator = i;

+			lastReturned = null;

+		}

+		

+		public boolean hasNext() {

+			return backingIterator.hasNext();

+		}

+

+		public ValueType next() {

+			try {

+				lastReturned = backingIterator.next();

+				return lastReturned;

+			} catch (NoSuchElementException e) {

+				lastReturned = null;

+				throw e;

+			}

+		}

+

+		public void remove() {

+			if (lastReturned != null) {

+				KeyType key = keyGenerator.calculateKey(lastReturned);

+				List<ValueType> list = map.get(key);

+				if (list == null) {

+					list = new LinkedList<ValueType>();

+				}

+				list.add(lastReturned);

+				map.put(key, list);

+				backingIterator.remove();

+				lastReturned = null;

+			} else {

+				throw new IllegalStateException();

+			}

+		}

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/IQueueContentProvider.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/IQueueContentProvider.java
new file mode 100644
index 0000000..a5f7c40
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/IQueueContentProvider.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg;

+

+import java.util.Queue;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+

+

+public interface IQueueContentProvider {

+	/*

+	public void initalizeSingleTraversal(Queue<MatchingFrame> queue, MatchingFrame template);

+	public MatchingFrame traverse() throws PatternMatcherRuntimeException;

+	*/

+	public void traverseAll(Queue<MatchingFrame> queue, MatchingFrame template)

+		throws PatternMatcherRuntimeException;

+	public void synchronize();
+	public void init();

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/IndexedRule.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/IndexedRule.java
new file mode 100644
index 0000000..84b9289
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/IndexedRule.java
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg;

+

+import java.util.Queue;
+import java.util.Vector;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.IMatching;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.IKeyGenerator;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingKey;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.FlattenedPattern;
+

+

+public class IndexedRule extends Rule {

+	private RemoteGoal right;

+	private HistoryList<MatchingKey, MatchingFrame> leftInputQueue;

+	private Integer[] parameterMapping;

+	private Boolean[] adornment;

+	private int arraySize;

+	private IKeyGenerator<MatchingKey, MatchingFrame> keyGenerator;

+

+	public IndexedRule(FlattenedPattern pattern,

+			IQueueContentProvider left,

+			RemoteGoal right,

+			Integer[] parameterMapping,

+			Boolean[] adornment) {

+		super(pattern, left);

+

+		arraySize = 0;

+		Vector<Integer> v = new Vector<Integer>();

+		for (int i = 0; i < adornment.length; i++) {

+			if (adornment[i]) {

+				v.add(parameterMapping[i]);

+				arraySize++;

+			}

+		}

+		final Integer[] keys = new Integer[arraySize];

+		v.toArray(keys);

+		keyGenerator = new IKeyGenerator<MatchingKey, MatchingFrame>() {

+

+			public MatchingKey calculateKey(MatchingFrame value) {

+				Object[] matchingKey = new Object[keys.length];

+				for (int i = 0; i < keys.length; i++) {

+					matchingKey[i] = value.getValue(keys[i]);

+				}

+				return new MatchingKey(matchingKey);

+			}

+

+			public int size() {

+				return keys.length;

+			}

+		};

+		this.right = right;

+		this.leftInputQueue = new HistoryList<MatchingKey, MatchingFrame>(keyGenerator);

+		this.parameterMapping = parameterMapping;

+		this.adornment = adornment;

+	}

+	

+	public void traverseAll(Queue<MatchingFrame> resultQueue, MatchingFrame template) throws PatternMatcherRuntimeException {

+		left.traverseAll(leftInputQueue, template);

+		right.calculateAllDeltas(this, resultQueue);

+	}

+	

+	MatchingKey getBoundHeader(MatchingFrame frame) {

+		return keyGenerator.calculateKey(frame);

+	}

+	

+	void merge(MatchingFrame result, IMatching other) 

+		throws PatternMatcherRuntimeException {

+		
+		assert parameterMapping.length == adornment.length;

+		for (int i = 0; i < parameterMapping.length; i++) {

+			if (adornment[i]) {

+				if (!result.getValue(parameterMapping[i]).equals(other.lookup(i))) {

+					{
+					String[] context = {pattern.getParent().getPattern().getName()};
+					throw new PatternMatcherRuntimeException(
+							PatternMatcherErrorStrings.INTERNAL_PATTERNCALL_ADORNED_INPUT_PARAMS
+							,context
+							,pattern.getParent().getPattern());
+					}

+				}

+			} else {

+				result.setValue(parameterMapping[i], other.lookup(i));

+			}

+		}

+	}

+	

+	HistoryList<MatchingKey, MatchingFrame> getQueue() {

+		return leftInputQueue;

+	}

+

+	@Override

+	public void synchronize() {

+		left.synchronize();

+		leftInputQueue.clear();

+	}

+	@Override
+	public void init(){
+		leftInputQueue.init();
+		left.init(); // cannot be initialized (again) as it creates an infinite loop
+		//right.init();
+	}

+	/*

+	public MatchingFrame traverse(Queue<MatchingFrame> resultQueue, MatchingFrame template) throws PatternMatcherRuntimeException {

+		// left.traverse(leftInputQueue, template);

+		// right.calculateDelta(this, resultQueue);

+		return null;

+	}

+

+	public void initalizeSingleTraversal(Queue<MatchingFrame> queue, MatchingFrame template) {

+		left.initalizeSingleTraversal(leftInputQueue, template);

+	}

+

+	public MatchingFrame traverse(MatchingFrame template) throws PatternMatcherRuntimeException {

+		return null;

+	}

+	*/

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/LocalGoal.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/LocalGoal.java
new file mode 100644
index 0000000..799f9e5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/LocalGoal.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg;

+

+import java.util.Iterator;
+import java.util.Queue;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.SearchPlan;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.SearchPlanOperation;
+

+

+public class LocalGoal extends Goal {

+	private SearchPlan searchPlan;

+	

+	public LocalGoal(SearchPlanOperation[] operations) {

+		this.searchPlan = new SearchPlan(operations);

+	}

+	

+	public void calculateAllDeltas(UnindexedRule parent, Queue<MatchingFrame> output) 

+	throws PatternMatcherRuntimeException {

+		Queue<MatchingFrame> input = parent.getQueue();

+		for (Iterator<MatchingFrame> i = input.iterator(); i.hasNext();) {

+			MatchingFrame frame = i.next();

+	        while (searchPlan.execute(frame)) {

+	            MatchingFrame newFrame = (MatchingFrame) frame.clone();

+	            output.offer(newFrame);

+	        }

+	        i.remove();

+		}

+	}

+

+	public boolean calculateDelta(MatchingFrame frame) throws PatternMatcherRuntimeException {

+		return searchPlan.execute(frame);

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/MagicSet.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/MagicSet.java
new file mode 100644
index 0000000..19369c8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/MagicSet.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg;

+

+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Queue;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingKey;
+

+

+public class MagicSet extends RuleGoalGraphNode 

+	implements IQueueContentProvider {

+	private ArrayList<MatchingKey> old;

+	private List<MatchingKey> next;

+	//private int firstNew;

+	private Boolean[] adornment;   
+	private HashSet<MatchingKey> cache;

+	

+	public MagicSet(Boolean[] adornment) {

+		this.old = new ArrayList<MatchingKey>();

+		this.next = new LinkedList<MatchingKey>();

+		//this.firstNew = 0;

+		this.adornment = adornment;
+		this.cache = new HashSet<MatchingKey>(); //stores the old values already matched, only one instance per matching

+	}

+

+	public void traverseAll(Queue<MatchingFrame> queue, MatchingFrame template) 

+	throws PatternMatcherRuntimeException {

+		//ListIterator<MatchingKey> li = old.listIterator(firstNew);

+		Iterator<MatchingKey> li = old.iterator();
+		while (li.hasNext()) {

+			Object[] array = li.next().toArray();

+			MatchingFrame frame = (MatchingFrame) template.clone();

+			int counter = 0;

+			for (int i = 0; i < adornment.length; i++) {

+				if (adornment[i]) {

+					frame.setValue(i, array[counter++]);

+				}

+			}

+			queue.offer(frame);

+		}
+	}

+	

+	public void addArray(MatchingKey array) {

+		next.add(array);

+	}

+	

+	public void synchronize() {}

+	

+	boolean synchronizeFromGoal() {

+		boolean result = false;
+		old.clear();

+	//	firstNew = old.size();
+		for (MatchingKey element : next) {

+			if (!cache.contains(element)) {
+//			if (!old.contains(element)) {
+

+				old.add(element);
+				cache.add(element);

+				result = true;

+			}

+		}

+		next.clear();

+		return result;

+	}

+

+	public void initalizeSingleTraversal(Queue<MatchingFrame> queue, MatchingFrame template) {

+		//ListIterator<MatchingKey> li = old.listIterator(firstNew);
+		Iterator<MatchingKey> li = old.iterator();

+		while (li.hasNext()) {

+			Object[] array = li.next().toArray();

+			MatchingFrame frame = (MatchingFrame) template.clone();

+			int counter = 0;

+			for (int i = 0; i < adornment.length; i++) {

+				if (adornment[i]) {

+					frame.setValue(i, array[counter++]);

+				}

+			}

+			queue.offer(frame);

+		}
+	}

+

+	public MatchingFrame traverse() throws PatternMatcherRuntimeException {

+		return null;

+	}

+    

+    public void init() {

+       // firstNew = 0;
+        cache.clear();

+        old.clear();

+    }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/RemoteGoal.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/RemoteGoal.java
new file mode 100644
index 0000000..f93bb03
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/RemoteGoal.java
@@ -0,0 +1,302 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg;

+

+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Queue;
+import java.util.Vector;
+
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.IMatching;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.IKeyGenerator;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingKey;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.PatternNode;
+

+

+public class RemoteGoal extends Goal implements Iterable<MatchingFrame> {

+	protected String id;

+	protected PatternNode pattern;

+	private Vector<Rule> children;

+	private Vector<Queue<MatchingFrame>> queues;
+	private Map<MatchingKey, List<MatchingFrame>> mapWithAdornedIndex;
+	private Map<MatchingKey, List<MatchingFrame>> map;
+	private Queue<MatchingFrame> newFrames;
+		
+	protected MagicSet ms;
+	protected Boolean[] adornment;
+	protected IKeyGenerator<MatchingKey, IMatching> adornedKeyGenerator;

+	protected IKeyGenerator<MatchingKey, IMatching> keyGenerator;

+	

+	public RemoteGoal(PatternNode pattern, Boolean[] adornment) {

+		this.pattern = pattern;

+		this.id = generateID(pattern, adornment);

+		this.children = new Vector<Rule>();

+		this.queues = new Vector<Queue<MatchingFrame>>();

+		this.newFrames = new LinkedList<MatchingFrame>();

+		this.adornment = adornment;

+		this.mapWithAdornedIndex = new HashMap<MatchingKey, List<MatchingFrame>>();

+		this.map = new HashMap<MatchingKey, List<MatchingFrame>>();

+		ms = new MagicSet(adornment);

+		

+		Vector<Integer> adornedVector = new Vector<Integer>();

+		Vector<Integer> vector = new Vector<Integer>();

+		for (int i = 0; i < adornment.length; i++) {

+			if (adornment[i]) {

+				adornedVector.add(i);

+			}

+			vector.add(i);

+		}

+    	final Integer[] key1 = new Integer[adornedVector.size()]; 

+    	adornedVector.toArray(key1);

+        adornedKeyGenerator = new IKeyGenerator<MatchingKey, IMatching>() {

+

+            public MatchingKey calculateKey(IMatching value) {

+                Object[] matchingKey = new Object[key1.length];

+                for (int i = 0; i < key1.length; i++) {

+                    matchingKey[i] = value.lookup(key1[i]);

+                }

+                return new MatchingKey(matchingKey);

+            }

+

+			public int size() {

+				return key1.length;

+			}

+        };

+        

+    	final Integer[] key2 = new Integer[vector.size()];

+    	vector.toArray(key2);

+    	keyGenerator = new IKeyGenerator<MatchingKey, IMatching>() {

+

+            public MatchingKey calculateKey(IMatching value) {

+                Object[] matchingKey = new Object[key2.length];

+                for (int i = 0; i < key2.length; i++) {

+                    matchingKey[i] = value.lookup(key2[i]);

+                }

+                return new MatchingKey(matchingKey);

+            }

+

+			public int size() {

+				return key2.length;

+			}

+        };

+

+	}

+

+	public static String generateID(PatternNode pattern, Boolean[] adornment) {

+		StringBuffer b = new StringBuffer();

+		for (int i = 0; i < adornment.length; i++) {

+			b.append(adornment[i] ? 'b' : 'f');

+		}

+		return pattern.getPattern().getName() + "^" + b.toString();

+	}

+	

+	public void calculateAllDeltas(IndexedRule parent, Queue<MatchingFrame> output) throws PatternMatcherRuntimeException {

+		//      --->

+		// left |><| right

+		Queue<MatchingFrame> input = parent.getQueue();

+		for (Iterator<MatchingFrame> i = input.iterator(); i.hasNext();) {

+			MatchingFrame leftFrame = i.next();

+			MatchingKey keyForLeftFrame = parent.getBoundHeader(leftFrame);

+			List<MatchingFrame> list = mapWithAdornedIndex.get(keyForLeftFrame);

+			if (list != null) {

+				for (MatchingFrame rightFrame : list) {

+		            MatchingFrame newFrame = (MatchingFrame) leftFrame.clone();

+		            parent.merge(newFrame, rightFrame);

+		            output.offer(newFrame);

+				}

+			}

+	        ms.addArray(keyForLeftFrame);

+	        i.remove();

+		}

+		

+		//      <---

+		// left |><| right

+		for (Iterator<MatchingFrame> j = newFrames.iterator(); j.hasNext();) {

+			MatchingFrame rightFrame = j.next();

+			Vector<Object> v = new Vector<Object>();

+			int size = 0;

+			for (int i = 0; i < adornment.length; i++) {

+				if (adornment[i]) {

+					v.add(rightFrame.getValue(i));

+					size++;

+				}

+			}

+			final Object[] key = new Object[size];

+			v.toArray(key);

+			HistoryList<MatchingKey, MatchingFrame> queue = 

+				parent.getQueue();

+			List<MatchingFrame> list = queue.get(new MatchingKey(key));

+			if (list != null) {

+				for (MatchingFrame leftFrame : list) {

+		            MatchingFrame newFrame = (MatchingFrame) leftFrame.clone();

+		            parent.merge(newFrame, rightFrame);

+		            output.offer(newFrame);

+				}

+			}

+		}

+	}

+	

+	public MagicSet getMagicSet() {

+		return ms;

+	}

+	

+	public void addChild(Rule child, Queue<MatchingFrame> queue) {

+		children.add(child);

+		queues.add(queue);

+	}

+	

+	public boolean equals(Object other) {

+		if (other != null && other instanceof RemoteGoal) {

+			RemoteGoal rg = (RemoteGoal) other;

+			return id.equals(rg.id);

+		} else {

+			return false;

+		}

+	}

+	

+	public String toString() {

+		return id;

+	}

+	

+	public boolean synchronize() throws ViatraTransformationException {

+		boolean result = false;

+		for (Iterator<MatchingFrame> i = newFrames.iterator(); i.hasNext();) {

+			MatchingFrame frame = i.next();

+			MatchingKey keyForFrame = adornedKeyGenerator.calculateKey(frame);

+			List<MatchingFrame> currentList = 

+				mapWithAdornedIndex.get(keyForFrame);

+			if (currentList == null) {

+				currentList = new LinkedList<MatchingFrame>();

+			}

+			currentList.add(frame);

+			mapWithAdornedIndex.put(keyForFrame, currentList);

+			i.remove();

+		}

+

+		assert newFrames.isEmpty();

+		for (Queue<MatchingFrame> queue : queues) {

+			for (Iterator<MatchingFrame> i = queue.iterator(); i.hasNext();) {

+				MatchingFrame frame = i.next();

+				MatchingKey keyForFrame = keyGenerator.calculateKey(frame);

+				List<MatchingFrame> currentList = map.get(keyForFrame);

+				if (currentList == null) {

+					currentList = new LinkedList<MatchingFrame>();

+					newFrames.add(frame);

+					result = true;

+				} 

+				currentList.add(frame);

+				map.put(keyForFrame, currentList);

+				i.remove();

+			}

+		}

+		for (Rule rule : children) {

+			rule.synchronize();

+		}

+		return (ms.synchronizeFromGoal() ? true : result);

+	}

+	

+	public void init() {

+        ms.init();

+		map.clear();

+		mapWithAdornedIndex.clear();

+		for (Queue<MatchingFrame> queue : queues) {

+			queue.clear();

+		}

+		newFrames.clear();
+		
+		//TODO akos: HistoryList in the IndexedRule-s are not properly initialised
+		//and always saves information after pattern matching! In some cases multiple times!
+		for(Rule r:children)
+			r.init();

+	}

+	

+	/*

+	public MatchingFrame match(PatternCallSignature[] signature, Vector<Integer> freeVariables) throws PatternMatcherRuntimeException {

+		// init();

+		assert children.size() == queues.size();

+		for (int i = 0; i < children.size(); i++) {

+			Rule rule = children.get(i);

+			MatchingFrame template = new MatchingFrame(rule.pattern);

+			MatchingFrame frame = rule.traverse(queues.get(i), template);

+			

+    		for (Integer varID : freeVariables) {

+    			Scope s = signature[varID].getParameterScope();

+    			if (s.getContainmentMode() == ContainmentMode.IN && 

+    					!((IEntity) s.getParent()).getContents().contains(frame.getValue(varID)) ||

+    					s.getContainmentMode() == ContainmentMode.BELOW &&

+    					!((IEntity) s.getParent()).getAllComponents().contains(frame.getValue(varID))) {

+    				break;

+    			}

+    			return frame;

+    		}

+		}

+		return null;

+	}

+	*/

+

+	public void matchAll() throws PatternMatcherRuntimeException {

+		// init();

+		assert children.size() == queues.size();

+		for (int i = 0; i < children.size(); i++) {

+			Rule rule = children.get(i);

+			MatchingFrame template = new MatchingFrame(rule.pattern);

+			rule.traverseAll(queues.get(i), template);

+		}

+	}

+

+	public Iterator<MatchingFrame> iterator() {

+		return new ResultFrameIterator();

+	}

+	

+	private class ResultFrameIterator implements Iterator<MatchingFrame> {

+		Iterator<List<MatchingFrame>> listIterator;

+		Iterator<MatchingFrame> frameIterator;

+		

+		private ResultFrameIterator() {

+			listIterator = map.values().iterator();

+			frameIterator = (listIterator.hasNext() ? listIterator.next().iterator() : null);

+		}

+		

+		public boolean hasNext() {

+			while (frameIterator != null && !frameIterator.hasNext()) {

+				frameIterator = (listIterator.hasNext() ? listIterator.next().iterator() : null);

+			}

+			return frameIterator != null;

+		}

+

+		public MatchingFrame next() {

+			if (hasNext()) {

+				return frameIterator.next();

+			} else {

+				throw new NoSuchElementException();

+			}

+		}

+

+		public void remove() {

+			throw new UnsupportedOperationException();

+		}

+		

+	}
+
+	public void debug() {
+		for(Rule rule: children)
+			if(rule instanceof UnindexedRule)
+					((UnindexedRule)rule).debug();
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/RemoteGoalIncremental.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/RemoteGoalIncremental.java
new file mode 100644
index 0000000..280c294
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/RemoteGoalIncremental.java
@@ -0,0 +1,283 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Akos Horvath, Gergely Varro - initial API and implementation

+ *******************************************************************************/

+

+

+package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg;

+

+

+import java.util.Collection;

+import java.util.HashMap;

+import java.util.Iterator;

+import java.util.LinkedList;

+import java.util.List;

+import java.util.Map;

+import java.util.Queue;

+import java.util.Vector;

+

+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;

+import org.eclipse.viatra2.gtasm.patternmatcher.ExecutionMode;

+import org.eclipse.viatra2.gtasm.patternmatcher.IMatching;

+import org.eclipse.viatra2.gtasm.patternmatcher.ParameterMode;

+import org.eclipse.viatra2.gtasm.patternmatcher.PatternCallSignature;

+import org.eclipse.viatra2.gtasm.patternmatcher.Scope;

+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingKey;

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.PatternNode;

+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IPatternMatcher;

+

+

+public class RemoteGoalIncremental extends RemoteGoal {

+

+	private IPatternMatcher patternMatcher;

+	private boolean isFirstTimeSync,isFirstTimeDelta;

+	private Map<MatchingKey, List<IMatching>> mapWithAdornedIndex;

+	private Map<MatchingKey, List<IMatching>> map;

+	private Collection<IMatching> matchings;

+	

+	public RemoteGoalIncremental(PatternNode pattern, Boolean[] adornment, IPatternMatcher patternMatcher) {

+		super(pattern, adornment);

+		isFirstTimeSync = true;

+		isFirstTimeDelta = true;

+		this.patternMatcher = patternMatcher;

+		mapWithAdornedIndex = new HashMap<MatchingKey, List<IMatching>>();

+		map = new HashMap<MatchingKey, List<IMatching>>();

+

+	}

+	

+	public void calculateAllDeltas(IndexedRule parent, Queue<MatchingFrame> output) throws PatternMatcherRuntimeException {

+		//      --->

+		// left |><| right

+		

+		//debug

+		//System.out.println("Pre CaclutaeDelta: ");

+		//this.debug();

+		

+		Queue<MatchingFrame> input = parent.getQueue();

+		for (Iterator<MatchingFrame> i = input.iterator(); i.hasNext();) {

+			MatchingFrame leftFrame = i.next();

+			MatchingKey keyForLeftFrame = parent.getBoundHeader(leftFrame);

+			List<IMatching> list = mapWithAdornedIndex.get(keyForLeftFrame);

+			if (list != null) {

+				for (IMatching rightFrame : list) {

+		            MatchingFrame newFrame = (MatchingFrame) leftFrame.clone();

+		            parent.merge(newFrame, rightFrame);

+		            output.offer(newFrame);

+				}

+			}

+	        ms.addArray(keyForLeftFrame);

+	        i.remove();

+		}

+		

+		//      <---

+		// left |><| right will have to evaluate only once at the first run!

+		if(isFirstTimeDelta && matchings  != null)

+			{isFirstTimeDelta = false;

+			for(List<IMatching> matchings:map.values())

+				for(IMatching rightFrame :matchings){

+				//IMatching rightFrame = j.next();

+				Vector<Object> v = new Vector<Object>();

+				int size = 0;

+				for (int i = 0; i < adornment.length; i++) {

+					if (adornment[i]) {

+						v.add(rightFrame.lookup(i));

+						size++;

+					}

+				}

+				final Object[] key = new Object[size];

+				v.toArray(key);

+				HistoryList<MatchingKey, MatchingFrame> queue = 

+					parent.getQueue();

+				List<MatchingFrame> list = queue.get(new MatchingKey(key));

+				if (list != null) 

+					{

+					for (MatchingFrame leftFrame : list) {

+				           MatchingFrame newFrame = (MatchingFrame) leftFrame.clone();

+				           parent.merge(newFrame, rightFrame);

+				           output.offer(newFrame);

+						}

+					}	

+				}

+			}

+		

+		//debug

+		//System.out.println("Post CaclutaeDelta: ");

+		//this.debug();

+	}

+	

+	public boolean synchronize() throws ViatraTransformationException {

+		

+		//System.out.println("Pre Synch: ");

+		this.debug();

+

+		

+		boolean result = false;

+		//have to be activated the first time when the matchings are available and only once then

+		if(isFirstTimeSync 

+				//&& matchings != null

+				)

+			{isFirstTimeSync = false;

+			

+			//if(matchings == null){

+			Object[] inputMapping = new Object[adornment.length];

+			Integer[] quantificationOrder = new Integer[adornment.length];

+			PatternCallSignature[] signature = new PatternCallSignature[adornment.length];

+			

+			for(int i= 0; i<signature.length; i++){

+				PatternCallSignature _p = new PatternCallSignature();

+				_p.setExecutionMode(ExecutionMode.MULTIPLE_RESULTS);

+				_p.setParameterMode(ParameterMode.OUTPUT);

+				_p.setParameterScope(new Scope());

+				signature[i] = _p;

+				}

+			

+			try {

+				matchings = patternMatcher.matchAll(inputMapping, signature, quantificationOrder);

+				//for(IMatching matching:matchings){

+					//MatchingKey keyforFrame = adornedKeyGenerator.calculateKey(matching);

+					//after the first match all elements are present in the ms

+					//ms.addArray(keyforFrame);

+				//	}

+				

+			} catch (ViatraTransformationException e) {

+				throw e.addNewStackElement(this.pattern.getPattern());

+			}

+			

+			

+			for(IMatching matching: matchings){

+				MatchingKey keyForFrameAdorned = adornedKeyGenerator.calculateKey(matching);

+				List<IMatching> currentList = 

+					mapWithAdornedIndex.get(keyForFrameAdorned);

+				if (currentList == null) {

+					currentList = new LinkedList<IMatching>();

+				}

+				currentList.add(matching);

+				mapWithAdornedIndex.put(keyForFrameAdorned, currentList);

+				ms.addArray(keyForFrameAdorned);

+				

+				MatchingKey keyForFrame = keyGenerator.calculateKey(matching);

+				currentList = map.get(keyForFrame);

+				if (currentList == null) {

+					currentList = new LinkedList<IMatching>();

+					//newFrames.add(frame);

+					result = true;

+				} 

+				currentList.add(matching);

+				map.put(keyForFrame, currentList);

+				}

+			}

+		

+//		for (Iterator<MatchingFrame> i = newFrames.iterator(); i.hasNext();) {

+//			MatchingFrame frame = i.next();

+//			MatchingKey keyForFrame = adornedKeyGenerator.calculateKey(frame);

+//			List<IMatching> currentList = 

+//				mapWithAdornedIndex.get(keyForFrame);

+//			if (currentList == null) {

+//				currentList = new LinkedList<IMatching>();

+//			}

+//			currentList.add(frame);

+//			mapWithAdornedIndex.put(keyForFrame, currentList);

+//			i.remove();

+//		}

+

+//		assert newFrames.isEmpty();

+//		//for (Queue<MatchingFrame> queue : queues) {

+//			//for (Iterator<MatchingFrame> i = queue.iterator(); i.hasNext();) {

+//				//MatchingFrame frame = i.next();

+//		MatchingFrame frame = null; 

+//		MatchingKey keyForFrame = keyGenerator.calculateKey(frame);

+//		List<IMatching> currentList = map.get(keyForFrame);

+//		if (currentList == null) {

+//			currentList = new LinkedList<IMatching>();

+//			newFrames.add(frame);

+//			result = true;

+//		} 

+//		currentList.add(frame);

+//		map.put(keyForFrame, currentList);

+	//	i.remove();

+	//		}

+	//	}

+		//for (Rule rule : children) {

+		//	rule.synchronize();

+		//}

+		

+		//debug

+		//will have to evaluate that are we ready or there are new matches avvailable

+		//System.out.println("Post Synch: ");

+		//this.debug();

+

+		return (ms.synchronizeFromGoal() ? true : result);

+	}

+	

+	public void init() {

+        ms.init();

+		map.clear();

+		matchings = null;

+		mapWithAdornedIndex.clear();

+		isFirstTimeSync = true;

+		isFirstTimeDelta = true;

+		

+		

+		

+		

+		//for (Queue<MatchingFrame> queue : queues) {

+		//	queue.clear();

+		//}

+//		newFrames.clear();

+	}

+	

+	/*

+	public MatchingFrame match(PatternCallSignature[] signature, Vector<Integer> freeVariables) throws PatternMatcherRuntimeException {

+		// init();

+		assert children.size() == queues.size();

+		for (int i = 0; i < children.size(); i++) {

+			Rule rule = children.get(i);

+			MatchingFrame template = new MatchingFrame(rule.pattern);

+			MatchingFrame frame = rule.traverse(queues.get(i), template);

+			

+    		for (Integer varID : freeVariables) {

+    			Scope s = signature[varID].getParameterScope();

+    			if (s.getContainmentMode() == ContainmentMode.IN && 

+    					!((IEntity) s.getParent()).getContents().contains(frame.getValue(varID)) ||

+    					s.getContainmentMode() == ContainmentMode.BELOW &&

+    					!((IEntity) s.getParent()).getAllComponents().contains(frame.getValue(varID))) {

+    				break;

+    			}

+    			return frame;

+    		}

+		}

+		return null;

+	}

+	*/

+

+	public void matchAll() throws PatternMatcherRuntimeException {

+		

+		//TODO: can only be invoked from the PatternMatcher -> exception

+		//throw new PatternMatcherRuntimeException(PatternMatcherRuntimeException.INTERNAL_PATTERNMATCHER_INCREMENTALWITHREMOTEGOAL_MATCHALL_ERROR);

+		// init();

+		//assert children.size() == queues.size();

+		//for (int i = 0; i < children.size(); i++) {

+		//	Rule rule = children.get(i);

+		//	MatchingFrame template = new MatchingFrame(rule.pattern);

+		//	rule.traverseAll(queues.get(i), template);

+		

+		//first call of the matchall after an init

+		

+	}

+

+	@Override

+	public void debug() {

+		//this.

+	}

+}

+	

+	

+

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/Rule.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/Rule.java
new file mode 100644
index 0000000..30e56d9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/Rule.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.FlattenedPattern;
+

+abstract public class Rule extends RuleGoalGraphNode 

+		implements IQueueContentProvider, Comparable<Rule> {

+	FlattenedPattern pattern;

+	IQueueContentProvider left;

+	

+	public Rule(FlattenedPattern pattern, 

+			IQueueContentProvider left) {

+		this.pattern = pattern;

+		this.left = left;

+	}

+	

+	abstract public void synchronize();

+	abstract public void init();
+	

+	public int compareTo(Rule o) {

+		return pattern.compareTo(o.pattern);

+	}

+} 

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/RuleGoalGraphNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/RuleGoalGraphNode.java
new file mode 100644
index 0000000..8304098
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/RuleGoalGraphNode.java
@@ -0,0 +1,15 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg;

+

+public abstract class RuleGoalGraphNode {

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/UnindexedRule.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/UnindexedRule.java
new file mode 100644
index 0000000..f8532e6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/rgg/UnindexedRule.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.rgg;

+

+import java.util.LinkedList;
+import java.util.Queue;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.FlattenedPattern;
+

+

+public class UnindexedRule extends Rule {

+	private LocalGoal right;

+	private LinkedList<MatchingFrame> leftInputQueue;

+	

+	public UnindexedRule(FlattenedPattern pattern,

+			IQueueContentProvider left,

+			LocalGoal right) {

+		super(pattern, left);

+		this.right = right;

+		this.leftInputQueue = new LinkedList<MatchingFrame>();

+	}

+	

+	public void traverseAll(Queue<MatchingFrame> resultQueue, MatchingFrame template) 

+	throws PatternMatcherRuntimeException {

+		left.traverseAll(leftInputQueue, template);

+		right.calculateAllDeltas(this, resultQueue);

+	}

+

+	public Queue<MatchingFrame> getQueue() {

+		return leftInputQueue;

+	}

+

+	@Override

+	public void synchronize() {

+		left.synchronize();

+		leftInputQueue.clear();

+	}

+
+	@Override
+	public void init() {
+		left.init();
+	}

+	/*

+	public void initalizeSingleTraversal(Queue<MatchingFrame> queue, MatchingFrame template) {

+		left.initalizeSingleTraversal(leftInputQueue, template);

+	}

+

+	public MatchingFrame traverse() throws PatternMatcherRuntimeException {

+		return null;

+		// return new MatchingFrameMemo();

+	}

+	

+	private class MatchingFrameMemo {

+		private MatchingFrame lastReturned;

+		

+		MatchingFrameMemo() throws PatternMatcherRuntimeException {

+			this.lastReturned = left.traverse();

+		}

+		

+		public boolean hasNext() {

+			return lastReturned != null;

+		}

+		

+		public MatchingFrame next() throws PatternMatcherRuntimeException {

+			MatchingFrame result = lastReturned;

+			while (lastReturned != null) {

+				if (right.calculateDelta(lastReturned)) {

+					return result;

+				} else {

+					lastReturned = left.traverse();

+				}

+			}

+			return null;

+		}

+	}

+	*/
+
+	public void debug() {
+		System.out.println("  Unindexed Rule left input queue size: "+leftInputQueue.size());
+		
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/AbstractNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/AbstractNode.java
new file mode 100644
index 0000000..2913357
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/AbstractNode.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph;

+
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability.AbstractTraceabilityElement;
+

+public abstract class AbstractNode{

+	private String name;

+	private boolean checked = false;
+	

+	public String getName() {

+		return name;

+	}

+	public void setName(String name) {

+		this.name = name;

+	}

+	public boolean isChecked() {

+		return checked;

+	}

+	public void setChecked(boolean checked) {

+		this.checked = checked;

+	}

+	

+	public void clear()

+	{

+		checked = false;		

+	}
+	
+	public abstract AbstractTraceabilityElement getTraceabilityElement();
+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/ConstantSearchGraphNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/ConstantSearchGraphNode.java
new file mode 100644
index 0000000..2294840
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/ConstantSearchGraphNode.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph;

+
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability.ConstantNodeTraceabilityElement;
+

+public class ConstantSearchGraphNode extends SearchGraphNode {

+    private String element;
+    private ConstantNodeTraceabilityElement traceabilityElement;

+

+	public String getElement() {

+		return element;

+	}

+

+	public void setElement(String element) {

+		this.element = element;

+	}
+
+	@Override
+	public ConstantNodeTraceabilityElement getTraceabilityElement() {
+		return traceabilityElement;
+	}
+	
+	public void setTraceabilityElement(ConstantNodeTraceabilityElement element) {
+		traceabilityElement = element;
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/EdgeTypeinAlgorithm.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/EdgeTypeinAlgorithm.java
new file mode 100644
index 0000000..c7d8e36
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/EdgeTypeinAlgorithm.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph;

+

+public enum EdgeTypeinAlgorithm {

+	

+	TREE,

+	FREE,

+	CIRCLE

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/PatternCallSearchGraphNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/PatternCallSearchGraphNode.java
new file mode 100644
index 0000000..9f2fb41
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/PatternCallSearchGraphNode.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.callgraph.PatternNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability.PatternCallNodeTraceabilityElement;
+
+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class PatternCallSearchGraphNode extends VariableSearchGraphNode {

+

+	/**

+	 * 

+	 */

+	

+	private Integer[] inputParameterMapping;

+	private PatternNode patternNode = null;

+	private PatternCallNodeTraceabilityElement traceabilityElement;

+	

+	

+	public PatternCallSearchGraphNode(int size) {

+		inputParameterMapping = new Integer[size];

+		

+	}

+

+	public PatternCallSearchGraphNode() {

+		super();

+		inputParameterMapping = null;

+	}

+

+	public Integer[] getInputParameterMapping() {

+		return inputParameterMapping;

+	}

+

+	public void setInputParameterMapping(Integer[] inputParameterMapping) {

+		this.inputParameterMapping = inputParameterMapping;

+	}

+

+	public PatternNode getPatternNode() {

+		return patternNode;

+	}

+

+	public void setPatternNode(PatternNode patternNode) {

+		this.patternNode = patternNode;

+	}
+	
+/*	@Override
+	public PatternCallNodeTraceabilityElement getTraceabilityElement() {
+		return traceabilityElement;
+	}
+	
+	public void setTraceabilityElement(PatternCallNodeTraceabilityElement element) {
+		traceabilityElement = element;
+	}

+*/

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/PseudoSearchGraphNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/PseudoSearchGraphNode.java
new file mode 100644
index 0000000..0dbc713
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/PseudoSearchGraphNode.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph;

+
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability.AbstractTraceabilityElement;
+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class PseudoSearchGraphNode extends SearchGraphNode {

+	

+	private int circleSmallestId = -1, circleBiggestId = -1;

+	private boolean isBlocked = false;

+/**

+	 * @return the circleBiggestId

+	 */

+	public int getCircleBiggestId() {

+		return circleBiggestId;

+	}

+

+	/**

+	 * @param circleBiggestId the circleBiggestId to set

+	 */

+	public void setCircleBiggestId(int circleBiggestId) {

+		this.circleBiggestId = circleBiggestId;

+	}

+

+	/**

+	 * @return the circleSmallestId

+	 */

+	public int getCircleSmallestId() {

+		return circleSmallestId;

+	}

+

+	/**

+	 * @param circleSmallestId the circleSmallestId to set

+	 */

+	public void setCircleSmallestId(int circleSmallestId) {

+		this.circleSmallestId = circleSmallestId;

+	}

+

+	/**

+	 * @return the isBlocked

+	 */

+	public boolean isBlocked() {

+		return isBlocked;

+	}

+

+	/**

+	 * @param isBlocked the isBlocked to set

+	 */

+	public void setBlocked(boolean isBlocked) {

+		this.isBlocked = isBlocked;

+	}
+
+	@Override
+	public AbstractTraceabilityElement getTraceabilityElement() {
+		return null;
+	}

+

+

+	

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/SearchGraphEdge.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/SearchGraphEdge.java
new file mode 100644
index 0000000..eb7a888
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/SearchGraphEdge.java
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.EdgeType;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability.EdgeTraceabilityElement;
+

+

+public class SearchGraphEdge extends AbstractNode {

+    private int oldWeight = -1, weight = -1, idinSearchPath= -1;

+	private EdgeTypeinAlgorithm type = EdgeTypeinAlgorithm.FREE;

+	private SearchGraphNode targetNode, sourceNode;

+	private EdgeType vpmEdgetype;

+	private SearchGraphEdge inverseEdge = null;

+	private boolean isSource; 
+	private EdgeTraceabilityElement traceabilityElement;

+	

+	public int getOldWeight() {

+		return oldWeight;

+	}

+

+	public void setOldWeight(int oldWeight) {

+		this.oldWeight = oldWeight;

+	}

+

+	public int getWeight() {

+		return weight;

+	}

+

+	public void setWeight(int weight) {

+		this.weight = weight;

+	}

+

+	public EdgeTypeinAlgorithm getEdgeTypeinAlgorithm() {

+		return type;

+	}

+

+	public void setEdgeTypeinAlgorithm(EdgeTypeinAlgorithm type) {

+		this.type = type;

+	}

+

+	public int getIdinSearchPath() {

+		return idinSearchPath;

+	}

+

+	public void setIdinSearchPath(int idinSearchPath) {

+		this.idinSearchPath = idinSearchPath;

+	}

+

+	public SearchGraphNode getSourceNode() {

+		return sourceNode;

+	}

+

+	public void setSourceNode(SearchGraphNode sourceNode) {

+		this.sourceNode = sourceNode;

+	}

+

+	public SearchGraphNode getTargetNode() {

+		return targetNode;

+	}

+

+	public void setTargetNode(SearchGraphNode targetNode) {

+		this.targetNode = targetNode;

+	}

+

+	public EdgeType getVPMEdgeType() {

+		return vpmEdgetype;

+	}

+

+	public void setVPMEdgeType(EdgeType vpmEdgetype) {

+		this.vpmEdgetype = vpmEdgetype;

+	}

+

+	public boolean isSource() {

+		return isSource;

+	}

+

+	public void setSource(boolean isSource) {

+		this.isSource = isSource;

+	}

+

+	/**

+	 * @return the inverseEdge

+	 */

+	public SearchGraphEdge getInverseEdge() {

+		return inverseEdge;

+	}

+

+	/**

+	 * @param inverseEdge the inverseEdge to set

+	 */

+	public void setInverseEdge(SearchGraphEdge inverseEdge) {

+		this.inverseEdge = inverseEdge;

+		inverseEdge.NonRecursiveInverseEdgeSet(this);

+	}

+

+	/**

+	 * @param inverseEdge the inverseEdge to set

+	 */

+	private void NonRecursiveInverseEdgeSet(SearchGraphEdge inverseEdge) {

+		this.inverseEdge = inverseEdge;

+	}

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.internal.AbstractNode#setChecked(boolean)

+	 */

+	@Override

+	public void setChecked(boolean checked) {

+		super.setChecked(checked);

+		if(inverseEdge != null)

+			inverseEdge.nonRecursiveSetChecked(checked);

+	}

+	

+	private void nonRecursiveSetChecked(boolean checked) {

+		super.setChecked(checked);

+		

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.internal.AbstractNode#clear()

+	 */

+	@Override

+	public void clear() {

+		//super.clear();

+		setChecked(false);

+	}
+
+	@Override
+	public EdgeTraceabilityElement getTraceabilityElement() {
+		return traceabilityElement;
+	}
+	
+	public void setTraceabilityElement(EdgeTraceabilityElement element) {
+		traceabilityElement = element;
+	}

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/SearchGraphNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/SearchGraphNode.java
new file mode 100644
index 0000000..8cf0198
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/SearchGraphNode.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph;

+

+import java.util.Vector;
+

+

+public abstract class SearchGraphNode extends AbstractNode implements Comparable{

+	

+	

+	private Vector<SearchGraphEdge> Sources;

+	private SearchGraphEdge treeEdge = null;

+	private SearchGraphNode VirtualSearchGraphNode = null;

+	private int outgoingTreeEdgeNumber = 0;

+	

+	public SearchGraphNode() {

+		super();

+		Sources = new Vector<SearchGraphEdge>();

+		outgoingTreeEdgeNumber = 0;

+

+	}

+	public void addSource(SearchGraphEdge enode){

+		this.Sources.add(enode);

+	}

+	public Vector<SearchGraphEdge> getSources(){

+		return Sources;

+	}

+	public SearchGraphNode getVirtualSearchGraphNode() {

+		return VirtualSearchGraphNode;

+	}

+	public void setVirtualSearchGraphNode(SearchGraphNode virtualVertex) {

+		this.VirtualSearchGraphNode = virtualVertex;

+	}

+	public SearchGraphEdge getTreeEdge() {

+		return treeEdge;

+	}

+	public void setTreeEdge(SearchGraphEdge treeEdge) {

+		this.treeEdge = treeEdge;

+	}

+	public int getOutgoingTreeEdgeNumber() {

+		return outgoingTreeEdgeNumber;

+	}

+	public void setOutgoingTreeEdgeNumber(int outgoingTreeEdge) {

+		this.outgoingTreeEdgeNumber = outgoingTreeEdge;

+	}

+	public void increaseOutgonigTreeEdgeNumber(){

+		outgoingTreeEdgeNumber++;

+	}

+

+	public void decreaseOutgoingTreeEdgeNumber(){

+		outgoingTreeEdgeNumber--;

+	}

+	public int compareTo(Object o) {

+		if (o instanceof SearchGraphNode)

+		{SearchGraphNode node = (SearchGraphNode) o;

+			if(this.treeEdge.getOldWeight() < node.getTreeEdge().getOldWeight())

+				return -1;

+			else

+			if(this.treeEdge.getOldWeight() == node.getTreeEdge().getOldWeight())

+				//because of the set there can be no matching

+				return 0;

+			else

+				return 1;

+		}

+		

+		return 0;

+	}
+		

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/SearchGraphNodeComparator.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/SearchGraphNodeComparator.java
new file mode 100644
index 0000000..1f657c5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/SearchGraphNodeComparator.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph;

+

+import java.io.Serializable;
+import java.util.Comparator;
+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class SearchGraphNodeComparator implements Comparator<SearchGraphNode>, Serializable {

+

+	/**

+	 * 

+	 */

+	private static final long serialVersionUID = 4964712646210992592L;

+

+	/* (non-Javadoc)

+	 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)

+	 */

+	public int compare(SearchGraphNode node0, SearchGraphNode node1) {

+		if(node1.equals(node0))

+			return 0;

+		else		

+		if(node0.getTreeEdge() == null && node1.getTreeEdge() == null)

+			{

+			if(node0 instanceof ConstantSearchGraphNode && node1 instanceof ConstantSearchGraphNode)

+					return node0.getName().compareTo(node1.getName());

+			else 

+			if(node0 instanceof ConstantSearchGraphNode && node1 instanceof VariableSearchGraphNode)

+				return -1;	

+			else

+			if(node0 instanceof VariableSearchGraphNode && node1 instanceof ConstantSearchGraphNode)

+				return 1;

+			else //both are variable constant nodes

+				return ((VariableSearchGraphNode)node0).getId().compareTo( ((VariableSearchGraphNode)node1).getId() );

+			}

+		else

+		if(node0.getTreeEdge()== null)

+			return -1;

+		else

+		if(node1.getTreeEdge() == null)

+			return 1;

+		else

+			//the normal comapre

+		if(node0.getTreeEdge().getOldWeight() < node1.getTreeEdge().getOldWeight())

+			return -1; 

+		else

+		if(node0.getTreeEdge().getOldWeight() > node1.getTreeEdge().getOldWeight())

+			return 1;

+		else

+			

+			//this is not a smooth solution

+		if(node0.getTreeEdge().getOldWeight() == node1.getTreeEdge().getOldWeight())

+			{if(node0 instanceof ConstantSearchGraphNode && node1 instanceof ConstantSearchGraphNode)

+					return node0.getName().compareTo(node1.getName());

+			else 

+			if(node0 instanceof ConstantSearchGraphNode && node1 instanceof VariableSearchGraphNode)

+				return -1;	

+			else

+			if(node0 instanceof VariableSearchGraphNode && node1 instanceof ConstantSearchGraphNode)

+				return 1;

+			else //both are variable constant nodes

+				return ((VariableSearchGraphNode)node0).getId().compareTo( ((VariableSearchGraphNode)node1).getId());

+			

+			}

+		

+		return -1;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/VariableSearchGraphNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/VariableSearchGraphNode.java
new file mode 100644
index 0000000..0d7212b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/VariableSearchGraphNode.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.VPMModelElementType;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability.VariableNodeTraceabilityElement;
+
+

+public class VariableSearchGraphNode extends SearchGraphNode {

+    private Integer id;

+    private boolean isInput = false;

+    private VPMModelElementType vpmModelElementType;
+    private VariableNodeTraceabilityElement traceabilityElement;

+    

+	public void clear(){

+	super.clear();

+		isInput = false;

+	}

+

+	public Integer getId() {

+		return id;

+	}

+

+	public void setId(Integer id) {

+		this.id = id;

+	}

+

+	/**

+	 * @return the isInput

+	 */

+	public boolean isInput() {

+		return isInput;

+	}

+

+	/**

+	 * @param isInput the isInput to set

+	 */

+	public void setInput(boolean isInput) {

+		this.isInput = isInput;

+	}

+

+	/**

+	 * @return the vpmModelElementType

+	 */

+	public VPMModelElementType getVpmModelElementType() {

+		return vpmModelElementType;

+	}

+

+	/**

+	 * @param vpmModelElementType the vpmModelElementType to set

+	 */

+	public void setVpmModelElementType(VPMModelElementType vpmModelElementType) {

+		this.vpmModelElementType = vpmModelElementType;

+	}
+
+	@Override
+	public VariableNodeTraceabilityElement getTraceabilityElement() {
+		return traceabilityElement;
+	}
+	
+	public void setTraceabilityElement(VariableNodeTraceabilityElement element) {
+		traceabilityElement = element;
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/traceability/AbstractTraceabilityElement.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/traceability/AbstractTraceabilityElement.java
new file mode 100644
index 0000000..d46741e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/traceability/AbstractTraceabilityElement.java
@@ -0,0 +1,77 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Akos Horvath and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Akos Horvath - initial API and implementation

+ *******************************************************************************/

+

+

+/**

+ * 

+ */

+package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability;

+

+import java.util.ArrayList;

+

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;

+

+

+/**

+ * For each VPM search graph element a traceability Element is created that can point to multiple GTASM element 

+ * and its corresponding operation (either pattern or gtRule)

+ * @author Akos Horvath

+ *

+ */

+public abstract class AbstractTraceabilityElement<VPMType> {

+	

+	private ArrayList<AnnotatedElement> emfElements;

+	

+	public AbstractTraceabilityElement(){

+		emfElements = new ArrayList<AnnotatedElement>();

+	}

+	

+	public AbstractTraceabilityElement(AnnotatedElement element){

+		emfElements = new ArrayList<AnnotatedElement>();

+		if(element != null)

+			emfElements.add(0, element);

+	}

+	

+	/** Adds an EMF element to the traceability node. If it is the first one than it will become the representative one

+	 * @param element

+	 */

+	public void addEMFElement(AnnotatedElement element){

+		if(element != null)

+			emfElements.add(element);

+	}

+	

+	/** Adds the representative EMF element to the traceability node

+	 * @param element

+	 */

+	public void addRepresentativeElement(AnnotatedElement element){

+		if(element != null)

+		{

+			if(emfElements.get(0) != null)

+				{

+				AnnotatedElement _temp = emfElements.get(0);

+				emfElements.add(0, element);

+				emfElements.add(_temp);

+				}

+			else

+				emfElements.add(0,element);

+		}

+	}

+	

+	/** Return the representative EMF element. 

+	 * @return

+	 */

+	public AnnotatedElement getRepresentativeEMFElement(){

+		return emfElements.get(0);

+	}

+	

+	public abstract VPMType getVPMElement();

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/traceability/ConstantNodeTraceabilityElement.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/traceability/ConstantNodeTraceabilityElement.java
new file mode 100644
index 0000000..38362ef
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/traceability/ConstantNodeTraceabilityElement.java
@@ -0,0 +1,41 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Akos Horvath and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Akos Horvath - initial API and implementation

+ *******************************************************************************/

+

+

+/**

+ * 

+ */

+package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.ConstantSearchGraphNode;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;

+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class ConstantNodeTraceabilityElement extends NodeTraceabilityElement {

+

+	ConstantSearchGraphNode constantSearchGraphNode;

+	

+	public ConstantNodeTraceabilityElement(ConstantSearchGraphNode node, AnnotatedElement element){

+		super(element);

+		constantSearchGraphNode = node;

+		constantSearchGraphNode.setTraceabilityElement(this);

+	}

+	

+	@Override

+	public ConstantSearchGraphNode getVPMElement() {

+		return constantSearchGraphNode;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/traceability/EdgeTraceabilityElement.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/traceability/EdgeTraceabilityElement.java
new file mode 100644
index 0000000..428c20d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/traceability/EdgeTraceabilityElement.java
@@ -0,0 +1,40 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Akos Horvath and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Akos Horvath - initial API and implementation

+ *******************************************************************************/

+

+

+/**

+ * 

+ */

+package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphEdge;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;

+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class EdgeTraceabilityElement extends AbstractTraceabilityElement<SearchGraphEdge> {

+	

+	SearchGraphEdge searchGraphEdge;

+	

+	public EdgeTraceabilityElement(SearchGraphEdge edge, AnnotatedElement element){

+		super(element);

+		searchGraphEdge = edge;

+		searchGraphEdge.setTraceabilityElement(this);

+	}

+	

+	public SearchGraphEdge getVPMElement() {

+		return searchGraphEdge;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/traceability/NodeTraceabilityElement.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/traceability/NodeTraceabilityElement.java
new file mode 100644
index 0000000..843f6a9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/traceability/NodeTraceabilityElement.java
@@ -0,0 +1,37 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Akos Horvath and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Akos Horvath - initial API and implementation

+ *******************************************************************************/

+

+

+/**

+ * 

+ */

+package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.SearchGraphNode;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;

+

+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public abstract class NodeTraceabilityElement extends AbstractTraceabilityElement<SearchGraphNode> {

+

+	public NodeTraceabilityElement(){

+		super();

+	}

+	

+	public NodeTraceabilityElement(AnnotatedElement element){

+		super(element);

+	}

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/traceability/PatternCallNodeTraceabilityElement.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/traceability/PatternCallNodeTraceabilityElement.java
new file mode 100644
index 0000000..97e82c3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/traceability/PatternCallNodeTraceabilityElement.java
@@ -0,0 +1,33 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Akos Horvath and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Akos Horvath - initial API and implementation

+ *******************************************************************************/

+

+

+package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.PatternCallSearchGraphNode;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;

+

+

+/**A simple traceability element 

+ * @author Akos Horvath

+ *

+ */

+public class PatternCallNodeTraceabilityElement extends VariableNodeTraceabilityElement {

+

+	public PatternCallNodeTraceabilityElement(PatternCallSearchGraphNode node, AnnotatedElement element) {

+		super(node,element);

+	}

+	

+	public PatternCallSearchGraphNode getVPMElement() {

+		return (PatternCallSearchGraphNode)variableSearchGraphNode;

+	}

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/traceability/VariableNodeTraceabilityElement.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/traceability/VariableNodeTraceabilityElement.java
new file mode 100644
index 0000000..36af2b7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/internal/searchgraph/traceability/VariableNodeTraceabilityElement.java
@@ -0,0 +1,42 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Akos Horvath and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Akos Horvath - initial API and implementation

+ *******************************************************************************/

+

+

+/**

+ * 

+ */

+package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.traceability;

+

+

+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.searchgraph.VariableSearchGraphNode;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;

+

+

+/**

+ * @author Akos Horvath

+ *

+ */

+public class VariableNodeTraceabilityElement extends NodeTraceabilityElement {

+	

+	VariableSearchGraphNode variableSearchGraphNode;

+	

+	

+	public VariableNodeTraceabilityElement(VariableSearchGraphNode node, AnnotatedElement element){

+		super(element);

+		variableSearchGraphNode = node;

+		variableSearchGraphNode.setTraceabilityElement(this);

+	}

+

+	@Override

+	public VariableSearchGraphNode getVPMElement() {

+		return variableSearchGraphNode;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/term/AbstractTermCheckOperation.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/term/AbstractTermCheckOperation.java
new file mode 100644
index 0000000..8e4294e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/term/AbstractTermCheckOperation.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.CheckOperation;
+
+

+public abstract class AbstractTermCheckOperation extends CheckOperation {

+    abstract protected boolean check(MatchingFrame frame) throws PatternMatcherRuntimeException;

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/term/BasicTermHandler.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/term/BasicTermHandler.java
new file mode 100644
index 0000000..0dfe0e5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/term/BasicTermHandler.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term;

+

+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.TermCheckOperation;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation.TermEvaluationOperation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+
+

+public class BasicTermHandler extends TermHandler {

+	private IExecutionEnvironment parentEnv;

+	

+	public BasicTermHandler(IExecutionEnvironment parentEnv) {

+		this.parentEnv = parentEnv;

+	}

+	

+    @Override

+    public AbstractTermCheckOperation getTermCheckOperation(GTPattern pattern, int uid, 

+    		Term term) {

+        return new TermCheckOperation(parentEnv, pattern, uid, term);

+    }

+

+    @Override //currentyl not used as TermEvaluation is only nedded in case of constant parent element in containment constraints

+    public AbstractTermCheckOperation getTermEvaluationOperation(GTPattern pattern, 

+    		int uid, Term term, int resultSlot) {

+        return new TermEvaluationOperation(parentEnv, pattern, uid, term, resultSlot);

+    }
+
+  public AbstractTermCheckOperation getTermEvaluationOperation(
+			GTPattern pattern, int uid, ContainmentConstraint conCons,
+			int resultSlot) {
+		return new TermEvaluationOperation(parentEnv, pattern, uid, conCons, resultSlot);
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/term/ITermHandler.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/term/ITermHandler.java
new file mode 100644
index 0000000..c46a0e2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/term/ITermHandler.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term;

+

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+

+public interface ITermHandler {

+

+	public AbstractTermCheckOperation getTermEvaluationOperation(

+			GTPattern pattern, int uid, ContainmentConstraint conCons, int resultSlot);

+

+	public AbstractTermCheckOperation getTermCheckOperation(GTPattern pattern,

+			int uid, Term term);

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/term/TermCheckExecutionEnvironment.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/term/TermCheckExecutionEnvironment.java
new file mode 100644
index 0000000..8cb6b16
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/term/TermCheckExecutionEnvironment.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term;

+

+import java.util.HashMap;
+import java.util.Map;
+import java.util.Vector;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame;
+import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.VariableID;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+

+public class TermCheckExecutionEnvironment implements IExecutionEnvironment {
+	private IExecutionEnvironment parent;

+    private GTPattern pattern;

+    private int uid;

+    private MatchingFrame frame;

+

+    public TermCheckExecutionEnvironment(IExecutionEnvironment parent, GTPattern pattern, int uid, MatchingFrame frame) {

+        this.parent = parent;

+        this.pattern = pattern;

+        this.uid = uid;

+        this.frame = frame;

+    }

+

+    public Object getVariableValue(Variable variable) {

+        Integer index = frame.getPattern().getIndex(new VariableID(pattern,uid,variable.getName()));

+        return frame.getValue(index);

+    }
+
+	public void addVariable(Variable key, Object value) throws ViatraTransformationException {
+		// Do nothing
+	}
+
+	public void fetchVariableVariations(HashMap<Variable, Vector<Object>> possibleVariableValues, Term termToBeEvaluated) {
+		parent.fetchVariableVariations(possibleVariableValues, termToBeEvaluated);
+	}
+
+	public IFramework getFramework() {
+		return parent.getFramework();
+	}
+
+	public Object getValueOfASMFunction(ASMFunction asmFunction, EList<Object> location) {
+		return parent.getValueOfASMFunction(asmFunction, location);
+	}
+
+	public Map<Variable, Object> getVariableValues() {
+		return parent.getVariableValues();
+	}
+
+	public void setVariableValue(Variable variable, Object value) throws ViatraTransformationException {
+		// Do nothing
+	}
+
+	public void updateASMFunction(ASMFunction asmFunction, EList<Object> location, Object value) throws ViatraTransformationException {
+		parent.updateASMFunction(asmFunction, location, value);
+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/term/TermHandler.java b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/term/TermHandler.java
new file mode 100644
index 0000000..dcd4081
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.impl/src/org/eclipse/viatra2/gtasm/patternmatcher/impl/patternmatcher/term/TermHandler.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.term;

+

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+

+public abstract class TermHandler implements ITermHandler {

+    /* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.term.ITermHandler#getTermEvaluationOperation(org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern, int, org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term, int)

+	 */

+    abstract public AbstractTermCheckOperation getTermEvaluationOperation(GTPattern pattern, int uid, Term term, int resultSlot);

+    /* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.term.ITermHandler#getTermCheckOperation(org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern, int, org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term)

+	 */

+    abstract public AbstractTermCheckOperation getTermCheckOperation(GTPattern pattern, int uid, Term term);

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/.classpath b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/.classpath
new file mode 100644
index 0000000..ad32c83
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/.project b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/.project
new file mode 100644
index 0000000..4dc23e4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<projectDescription>

+	<name>org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete</name>

+	<comment></comment>

+	<projects>

+	</projects>

+	<buildSpec>

+		<buildCommand>

+			<name>org.eclipse.jdt.core.javabuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+		<buildCommand>

+			<name>org.eclipse.pde.ManifestBuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+		<buildCommand>

+			<name>org.eclipse.pde.SchemaBuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+	</buildSpec>

+	<natures>

+		<nature>org.eclipse.pde.PluginNature</nature>

+		<nature>org.eclipse.jdt.core.javanature</nature>

+	</natures>

+</projectDescription>

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..64c9e7c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Wed Jan 12 11:22:13 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.6
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/Call-Through Update Propagation - org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.patch b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/Call-Through Update Propagation - org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.patch
new file mode 100644
index 0000000..d180533
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/Call-Through Update Propagation - org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.patch
@@ -0,0 +1,75 @@
+Index: src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/StandardNode.java

+===================================================================

+--- src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/StandardNode.java	(revision 1585)

++++ src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/StandardNode.java	(working copy)

+@@ -11,7 +11,7 @@

+ 
+ package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network;
+ 
+-import java.util.LinkedList;
++import java.util.ArrayList;
+ import java.util.List;
+ 
+ import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+@@ -30,12 +30,26 @@

+ 	public StandardNode(ReteContainer reteContainer) {
+ 		this.reteContainer = reteContainer;
+ 		this.nodeId = reteContainer.registerNode(this);
+-		children = new LinkedList<Receiver>();
++		children = new ArrayList<Receiver>();
+ 	}
++	
++//	static long zanyádCounter = 0;
++//	private static final int _alot = 1000000;//-1;
+ 
+ 	protected void propagateUpdate(Direction direction, Tuple updateElement) {
++//		zanyádCounter+=children.size();if (zanyádCounter == _alot) {
++//			System.out.println("Ã?Ã?Ã?Ã?Ã?Ã?Ã?Ã?");
++//			while (true) try {
++//				Thread.sleep(_alot);
++//			} catch (InterruptedException e) {
++//				// TODO Auto-generated catch block
++//				e.printStackTrace();
++//			}
++//		}
+ 		for (Receiver r : children)
+-			reteContainer.sendUpdateInternal(r, direction, updateElement);
++			r.update(direction, updateElement);
++			//reteContainer.sendUpdateInternal(r, direction, updateElement);
++
+ 	}
+ 
+ 	public void appendChild(Receiver receiver) {
+Index: src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/TrimmerNode.java

+===================================================================

+--- src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/TrimmerNode.java	(revision 1585)

++++ src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/TrimmerNode.java	(working copy)

+@@ -11,9 +11,11 @@

+ 
+ package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single;
+ 
++import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;
++import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver;
+ import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+-import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;
+ import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
++import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;
+ 
+ /**
+  * Trims the matchings as specified by a mask.
+@@ -64,5 +66,15 @@

+ 	protected Tuple transform(Tuple input) {
+ 		return mask.transform(input);
+ 	}
++	
++	/* (non-Javadoc)
++	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.StandardNode#propagateUpdate(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple)
++	 */
++	@Override
++	protected void propagateUpdate(Direction direction, Tuple updateElement) {
++		// TODO HÃ?K to avoid circularity problems with production node (where RETE can turn non-DAG)
++		for (Receiver r: children)
++			reteContainer.sendUpdateInternal(r, direction, updateElement);
++	}
+ 
+ }
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/META-INF/MANIFEST.MF b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..95d4e4e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/META-INF/MANIFEST.MF
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: VIATRA2 R3 Incremental Pattern Matcher Core
+Bundle-SymbolicName: org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete
+Bundle-Version: 3.3.0.qualifier
+Bundle-Activator: org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.Activator
+Bundle-Vendor: BUTE-FTSRG / Bergmann Gabor
+Require-Bundle: org.eclipse.core.runtime
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary,
+ org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction,
+ org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.basiclinear,
+ org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.helpers,
+ org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem,
+ org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicdeferred,
+ org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables,
+ org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index,
+ org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher,
+ org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.misc,
+ org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network,
+ org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote,
+ org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single,
+ org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple,
+ org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/OPTIjegyz.txt b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/OPTIjegyz.txt
new file mode 100644
index 0000000..0b76c09
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/OPTIjegyz.txt
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/TODO b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/TODO
new file mode 100644
index 0000000..b946a53
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/TODO
@@ -0,0 +1,54 @@
+viatra.inremental

+-----------------

+TODO

+   * RESOLVE: Network lock versus Modelspace lock összeakadás

+   * dualinputnode, child of the same Indexer twice?

+   * goal: párhuzamosság

+    * gyors epites

+    * conténer lebontás?

+    * parhuz + triggers?

+    * parhuz modelspace

+    

+

+   * javítás:

+    * [error] Negative org.eclipse.viatra2.gtasm.patternmatcher.patterns or check expressions cannot output variables - [call(name: isMatched, id: 0, fqn: isMatched)] in [name: hasCommonSrcMatched, id: 0, fqn: composition_02.hasCommonSrcMatched]

+    * check expressionből find

+    

+   * korrekt sideStub + optimalizáció kétféle mask-kal multiplicitással és anélkül

+   * PatternGraph overhaul (graph helyett constraint systems vagy valami)?

+   

+   * TermEval output ertek

+

+   * Constant modelelement megsinyli a torlest

+   * PatternGraph kiemelese packagebe?

+   * PatternMemory -> generikus (Clearable nyilvan nem lehet)

+HALASZTVA/NEM AKT/REMLHETLEG OK

+   * injectivity mint pEdge?

+   * GTRuleMatcher -> állítólag nem kell

+   * gtPattern.isDistinctMatching() -> specin kivuli; majd r3-ba esetleg lesz

+   * quantificationOrder? -> meg a sima se tudja            

+OPTI

+   * internalMessageQueue = externalMessageQueue; gyors masolas

+   * dupla oroklodesu Tuple, transform Tuple

+   * oroklos Tuple-ok ancestort cserelne, ha !=, de equals

+   * tuple tipusok varialhatosaga halozaton belul (pl. JoinNode parameterezese) + heurisztika meret alapjan

+   * trivialis maszk

+      * trimmer node, mindket szelsoseg

+      * trivialis indexer, mindket szelsoseg

+   	  * kulonleges memoryk? torekves rajuk epiteskor   

+   * LEAPS után: lazy eval message, iterátorokat tárol a köv receiver-re és a köv tuple-re

+      * igazan depth-first eseten lenne jo, mert igy rendes sorrendezessel haram ki lesznek fejtve a queue vegere;

+         * rendes sorrendezes helyett eleg az egy csomopontbol indulokat sorrendezni? Ekkor cimzett szerint nem lehet lazy!

+   * wrap: org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network objectknt id, fqn vagy marad ModelElement? 

+

+   * epites: jobb bejaras, bizonyos elek elonyben reszesitese (PatternEdge.compareTo())

+   * epites: reszgrafok cache-elese

+   * epites: több típusú entity-k egyszerűsítése, mi adódik az élekbÅ‘l is? 

+   * epites: több típusú relation-ök?

+   * epites: több típus (és konstans containment?) külön részhálóban csekkolva, nem lineárisan

+   * matchAll()-nál Indexer használata, plusz szkópok vertikális ellenÅ‘rzése

+   * Constant-kezeles optimalizalas : csekkeles meg a jobb oldalon, de ne jusson be a foaramba

+   

+   * Slot-bl maszk nlkli az lekhez -> gyorsts       

+   * hol legyen Tree, Hash, List a klnbz Collectionkben? Szfa?    

+ 
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/build.properties b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/build.properties
new file mode 100644
index 0000000..41eb6ad
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/build.properties
@@ -0,0 +1,4 @@
+source.. = src/

+output.. = bin/

+bin.includes = META-INF/,\

+               .

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/Activator.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/Activator.java
new file mode 100644
index 0000000..f4059b8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/Activator.java
@@ -0,0 +1,62 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete;

+

+import org.eclipse.core.runtime.Plugin;

+import org.osgi.framework.BundleContext;

+

+/**

+ * The activator class controls the plug-in life cycle

+ */

+public class Activator extends Plugin {

+

+	// The plug-in ID

+	public static final String PLUGIN_ID = "org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete";

+

+	// The shared instance

+	private static Activator plugin;

+	

+	/**

+	 * The constructor

+	 */

+	public Activator() {

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)

+	 */

+	@Override

+	public void start(BundleContext context) throws Exception {

+		super.start(context);

+		plugin = this;

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)

+	 */

+	@Override

+	public void stop(BundleContext context) throws Exception {

+		plugin = null;

+		super.stop(context);

+	}

+

+	/**

+	 * Returns the shared instance

+	 *

+	 * @return the shared instance

+	 */

+	public static Activator getDefault() {

+		return plugin;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/AbstractEvaluator.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/AbstractEvaluator.java
new file mode 100644
index 0000000..9f0bfe9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/AbstractEvaluator.java
@@ -0,0 +1,42 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary;

+

+import java.util.HashSet;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+

+

+/**

+ * Depicts an abstract evaluator that evaluates tuples to Objects. Used inside evaluator nodes.

+ * @author Bergmann Gábor

+ *

+ */

+public abstract class AbstractEvaluator {

+	/**

+	 * Each tuple represents a trace of the activity during evaluation. 

+	 * Change notifications received on these traces will be used to trigger re-evaluation.

+	 */

+	Set<Tuple> traces = new HashSet<Tuple>();

+	

+	public abstract Object doEvaluate(Tuple tuple) throws Throwable;

+	

+	Object evaluate(Tuple tuple) throws Throwable {

+		traces.clear();

+		return doEvaluate(tuple);

+	}

+

+	public Set<Tuple> getTraces() {

+		return traces;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/ContainmentFeeder.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/ContainmentFeeder.java
new file mode 100644
index 0000000..d6ff1f4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/ContainmentFeeder.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherRuntimeContext;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Network;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.Address;
+
+
+
+public class ContainmentFeeder extends Feeder {
+
+	/**
+	 * @param receiver
+	 * @param context
+	 * @param network
+	 * @param boundary
+	 */
+	public ContainmentFeeder(Address<? extends Receiver> receiver,
+			IPatternMatcherRuntimeContext<?> context, Network network,
+			ReteBoundary<?> boundary) {
+		super(receiver, context, network, boundary);
+		// TODO Auto-generated constructor stub
+	}
+
+	@Override
+	public void feed() {
+		context.enumerateAllUnaryContainments(pairCrawler());
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/Disconnectable.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/Disconnectable.java
new file mode 100644
index 0000000..3f8beaa
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/Disconnectable.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary;
+
+/**
+ * For objects that connect a RETE implementation to the Viatra framework.
+ * 
+ * @author Gabor Bergmann
+ * 
+ */
+public interface Disconnectable {
+
+	/**
+	 * Disconnects this rete engine component from the viatra framework.
+	 * Disconnecting enables the garbage collection mechanisms to dispose of the
+	 * rete network.
+	 */
+	void disconnect();
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/EntityFeeder.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/EntityFeeder.java
new file mode 100644
index 0000000..ca28654
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/EntityFeeder.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext.GeneralizationQueryDirection;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherRuntimeContext;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Network;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.Address;
+
+
+public class EntityFeeder extends Feeder {
+	protected Object typeObject;
+
+	/**
+	 * @param receiver
+	 * @param context
+	 * @param network
+	 * @param boundary
+	 * @param typeObject
+	 */
+	public EntityFeeder(Address<? extends Receiver> receiver,
+			IPatternMatcherRuntimeContext<?> context, Network network,
+			ReteBoundary<?> boundary, Object typeObject) {
+		super(receiver, context, network, boundary);
+		this.typeObject = typeObject;
+	}
+
+
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.Feeder#feed()
+	 */
+	@Override
+	public void feed() {
+		if (typeObject != null) {
+			if (context.allowedGeneralizationQueryDirection() == GeneralizationQueryDirection.BOTH)
+				context.enumerateDirectUnaryInstances(typeObject, unaryCrawler());
+			else
+				context.enumerateAllUnaryInstances(typeObject, unaryCrawler());				
+		} else {
+			context.enumerateAllUnaries(unaryCrawler());
+		}
+	}
+	
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/Feeder.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/Feeder.java
new file mode 100644
index 0000000..7d5d419
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/Feeder.java
@@ -0,0 +1,84 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherRuntimeContext;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Network;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.Address;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public abstract class Feeder {

+	protected Address<? extends Receiver> receiver;

+	protected IPatternMatcherRuntimeContext<?> context;

+	protected Network network;

+	protected ReteBoundary<?> boundary;

+

+	/**

+	 * @param receiver

+	 * @param context

+	 * @param network

+	 * @param boundary

+	 */

+	public Feeder(Address<? extends Receiver> receiver,

+			IPatternMatcherRuntimeContext<?> context, Network network,

+			ReteBoundary<?> boundary) {

+		super();

+		this.receiver = receiver;

+		this.context = context;

+		this.network = network;

+		this.boundary = boundary;

+	}

+

+	public abstract void feed();

+	

+	protected void emit(Tuple tuple) {

+		network.sendConstructionUpdate(receiver, Direction.INSERT, tuple);

+	}

+	

+	protected IPatternMatcherRuntimeContext.ModelElementCrawler unaryCrawler() {

+		return new IPatternMatcherRuntimeContext.ModelElementCrawler() {

+			public void crawl(Object element) {

+				emit(new FlatTuple(boundary.wrapElement(element)));

+			}

+		};

+	}

+

+	protected IPatternMatcherRuntimeContext.ModelElementPairCrawler pairCrawler() {

+		return new IPatternMatcherRuntimeContext.ModelElementPairCrawler() {

+			public void crawl(Object first, Object second) {

+				emit(new FlatTuple(boundary.wrapElement(first), boundary.wrapElement(second)));

+			}

+		};

+	}

+	

+	protected IPatternMatcherRuntimeContext.ModelElementCrawler ternaryCrawler() {

+		return new IPatternMatcherRuntimeContext.ModelElementCrawler() {

+			public void crawl(Object element) {

+				Object relation = element;

+				Object from = context.ternaryEdgeSource(relation);					

+				Object to = context.ternaryEdgeTarget(relation);				

+				emit(new FlatTuple(

+						boundary.wrapElement(relation),

+						boundary.wrapElement(from), 

+						boundary.wrapElement(to)));

+			}

+		};

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/GeneralizationFeeder.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/GeneralizationFeeder.java
new file mode 100644
index 0000000..1357776
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/GeneralizationFeeder.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherRuntimeContext;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Network;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.Address;
+
+
+public class GeneralizationFeeder extends Feeder {
+
+	/**
+	 * @param receiver
+	 * @param context
+	 * @param network
+	 * @param boundary
+	 */
+	public GeneralizationFeeder(Address<? extends Receiver> receiver,
+			IPatternMatcherRuntimeContext<?> context, Network network,
+			ReteBoundary<?> boundary) {
+		super(receiver, context, network, boundary);
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.Feeder#feed()
+	 */
+	@Override
+	public void feed() {
+		context.enumerateAllGeneralizations(pairCrawler());
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/IManipulationListener.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/IManipulationListener.java
new file mode 100644
index 0000000..e97bd63
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/IManipulationListener.java
@@ -0,0 +1,34 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public interface IManipulationListener extends Disconnectable {

+	

+	/**

+	 * @param element

+	 * @param termEvaluatorNode

+	 */

+	void registerSensitiveTerm(Object element,

+			PredicateEvaluatorNode termEvaluatorNode);

+

+	/**

+	 * @param element

+	 * @param termEvaluatorNode

+	 */

+	void unregisterSensitiveTerm(Object element,

+			PredicateEvaluatorNode termEvaluatorNode);

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/IPredicateTraceListener.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/IPredicateTraceListener.java
new file mode 100644
index 0000000..9d540b5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/IPredicateTraceListener.java
@@ -0,0 +1,27 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+

+/**

+ * Collects traces of predicate evaluation, and notifies the predicate evaluator node to re-evaluate predicates when these traces are influenced by changes.

+ * @author Bergmann Gábor

+ *

+ */

+public interface IPredicateTraceListener extends Disconnectable {

+

+	public void registerSensitiveTrace(Tuple trace, PredicateEvaluatorNode node);

+

+	public void unregisterSensitiveTrace(Tuple trace, PredicateEvaluatorNode node);

+

+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/InstantiationFeeder.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/InstantiationFeeder.java
new file mode 100644
index 0000000..d5d7f58
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/InstantiationFeeder.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherRuntimeContext;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Network;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.Address;
+
+
+public class InstantiationFeeder extends Feeder {
+	
+	/**
+	 * @param receiver
+	 * @param context
+	 * @param network
+	 * @param boundary
+	 */
+	public InstantiationFeeder(Address<? extends Receiver> receiver,
+			IPatternMatcherRuntimeContext<?> context, Network network,
+			ReteBoundary<?> boundary) {
+		super(receiver, context, network, boundary);
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.Feeder#feed()
+	 */
+	@Override
+	public void feed() {
+		context.enumerateAllInstantiations(pairCrawler());
+	}
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/PredicateEvaluatorNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/PredicateEvaluatorNode.java
new file mode 100644
index 0000000..7717428
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/PredicateEvaluatorNode.java
@@ -0,0 +1,317 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary;

+

+import java.util.Collection;

+import java.util.HashMap;

+import java.util.HashSet;

+import java.util.LinkedList;

+import java.util.Map;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.IdentityIndexer;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.NullIndexer;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.ReteEngine;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.Address;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.SingleInputNode;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMemory;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util.Options;

+

+

+/**

+ * @author Gabor Bergmann

+ * 

+ *         Permits the traversal of update notifications if a given function

+ *         (with variables mapped to given positions in the Tuple) equals a

+ *         right-hand-side (also mapped to a given position). If right-hand-side

+ *         is omitted, the function is the predicate itself and should evaluate to true.

+ * 

+ *         The predicate is reevaluated on the Tuple each time an element affected by

+ *         the term experiences a move, name or value change. Furthermore, it is

+ *         also reevaluated if any ASMfunctions called at the previous

+ *         evaluation are changed at the positions that were used.

+ * 

+ *         Uses unwrapped tuples. In distributed environments, AbstractPredicateEvaluatorNodes 

+ *         should always be built on the head container, because they need access to Viatra.

+ * 

+ */

+

+public class PredicateEvaluatorNode extends SingleInputNode {

+

+	protected ReteEngine<?> engine;

+	protected ReteBoundary<?> boundary;

+	protected Integer rhsIndex;

+	protected int[] affectedIndices;

+	protected Set<Tuple> outgoing;

+	protected NullIndexer nullIndexer;

+	protected IdentityIndexer identityIndexer;

+	protected Map<Object, Collection<Tuple>> elementOccurences;

+	protected Map<Tuple, Set<Tuple>> invoker2traces;

+	protected Map<Tuple, Set<Tuple>> trace2invokers;

+	protected Address<ASMFunctionTraceNotifierNode> asmFunctionTraceNotifier;

+	protected Address<ElementChangeNotifierNode> elementChangeNotifier;

+	protected AbstractEvaluator evaluator;

+	

+	/**

+	 * @param rhsIndex

+	 *            the index of the element in the Tuple that should equals the

+	 *            result of the evaluation; if null, the right-hand-side will be the

+	 *            Boolean true.

+	 * @param variableIndices

+	 *            maps variable names to values.

+	 */

+	public PredicateEvaluatorNode(ReteEngine<?> engine, ReteContainer container,

+			Integer rhsIndex, int[] affectedIndices, int tupleWidth,

+			AbstractEvaluator evaluator) {

+		super(container);

+		this.engine = engine;

+		this.boundary = engine.getBoundary();

+		this.rhsIndex = rhsIndex;

+		this.affectedIndices = affectedIndices;

+		this.evaluator = evaluator;

+		

+		this.elementOccurences = new HashMap<Object, Collection<Tuple>>();

+		this.outgoing = new HashSet<Tuple>();

+		this.invoker2traces = new HashMap<Tuple, Set<Tuple>>();

+		this.trace2invokers = new HashMap<Tuple, Set<Tuple>>();

+		// extractASMFunctions();

+		this.asmFunctionTraceNotifier = Address

+				.of(new ASMFunctionTraceNotifierNode(reteContainer));

+		this.elementChangeNotifier = Address.of(new ElementChangeNotifierNode(

+				reteContainer));

+

+		if (Options.employTrivialIndexers) {

+			nullIndexer = new NullIndexer(reteContainer, tupleWidth, outgoing, this);

+			reteContainer.getLibrary().registerSpecializedProjectionIndexer(this, nullIndexer);

+			identityIndexer = new IdentityIndexer(reteContainer, tupleWidth, outgoing, this);

+			reteContainer.getLibrary().registerSpecializedProjectionIndexer(this, identityIndexer);

+		}

+

+	}

+	

+	public void pullInto(Collection<Tuple> collector) {

+		for (Tuple ps : outgoing)

+			collector.add(boundary.wrapTuple(ps));

+	

+	}

+

+	public void update(Direction direction, Tuple wrappers) {

+		Tuple updateElement = boundary.unwrapTuple(wrappers);

+		updateOccurences(direction, updateElement);

+		if (direction == Direction.REVOKE) {

+			if (outgoing.remove(updateElement)) {

+				clearTraces(updateElement);

+				propagateUpdate(Direction.REVOKE, wrappers);

+			}

+		} else /* (direction == Direction.INSERT) */

+		{

+			check(updateElement);

+		}

+	}

+

+	protected void notifyASMFunctionValueChanged(Tuple trace) {

+		// System.out.println("TEN notified");

+		Set<Tuple> invokers = trace2invokers.get(trace);

+		if (invokers != null) {

+			LinkedList<Tuple> copy = new LinkedList<Tuple>(invokers);

+			for (Tuple ps : copy)

+				check(ps);

+		}

+	}

+

+	protected void notifyElementChange(Object element) {

+		for (Tuple ps : elementOccurences.get(element))

+			check(ps);

+	}

+

+	protected void updateOccurences(Direction direction, Tuple ps) {

+		for (Integer i : affectedIndices) {

+			Object element = ps.get(i);

+			//if (element instanceof IModelElement) {

+				updateElementOccurence(direction, ps, element);

+			//}

+		}

+	}

+

+	protected void updateElementOccurence(Direction direction, Tuple ps,

+			Object element) {

+				Collection<Tuple> occurences;

+				if (direction == Direction.INSERT) {

+					occurences = elementOccurences.get(element);

+					boolean change = occurences == null;

+					if (change) {

+						occurences = new TupleMemory();

+						elementOccurences.put(element, occurences);

+						engine.getManipulationListener().registerSensitiveTerm(element, this);

+					}

+					occurences.add(ps);

+				} else // REVOKE

+				{

+					occurences = elementOccurences.get(element);

+					occurences.remove(ps);

+					boolean change = occurences.isEmpty();

+					if (change) {

+						elementOccurences.remove(element);

+						engine.getManipulationListener().unregisterSensitiveTerm(element,

+								this);

+					}

+				}

+			}

+

+	protected void check(Tuple ps) {

+		boolean result = evaluateExpression(ps);

+		if (result) /* expression evaluates to true */

+		{

+			if (outgoing.add(ps))

+				propagateUpdate(Direction.INSERT, boundary.wrapTuple(ps));

+		} else /* expression evaluates to false */

+		{

+			if (outgoing.remove(ps))

+				propagateUpdate(Direction.REVOKE, boundary.wrapTuple(ps));

+		}

+	}

+

+	protected boolean evaluateExpression(Tuple ps) {

+		Object termResult = evaluateTerm(ps);

+		Object rightHandSide = (rhsIndex == null) ? true : ps.get(rhsIndex);

+	

+		return (termResult == null) ? rightHandSide == null : termResult

+				.equals(rightHandSide);

+	}

+	

+	public Object evaluateTerm(Tuple ps) {

+		// clearing ASMfunction traces

+		clearTraces(ps);

+

+		// actual evaluation

+		Object result = null;

+		try {

+			result = evaluator.evaluate(ps);

+		} catch (Throwable e) {

+			e.printStackTrace();

+			engine.getContext().logWarning( 

+					"(Note: this is most likely a transient problem and can be usually ignored.) " +

+					"The incremental pattern matcher encountered an error during check() evaluation over variables "

+					+ prettyPrintTuple(ps) + 

+					" (Developer note: " + e.getClass().getSimpleName() + " in RETE term evaluator node). " + 

+					"Error message: " + e.getMessage(), e);

+			engine.logEvaluatorException(e);

+			

+			result = Boolean.FALSE;

+		}

+

+		// saving ASMFunction traces

+		saveTraces(ps, evaluator.getTraces());

+

+		return result;

+	}

+	

+	protected String prettyPrintTuple(Tuple ps) {

+		return ps.toString();

+	}

+	

+	protected void clearTraces(Tuple invoker) {

+		Set<Tuple> traces = invoker2traces.get(invoker);

+		if (traces != null) {

+			invoker2traces.remove(invoker);

+			for (Tuple trace : traces) {

+				Set<Tuple> invokers = trace2invokers.get(trace);

+				invokers.remove(invoker);

+				if (invokers.isEmpty()) {

+					trace2invokers.remove(trace);

+					engine.geTraceListener().unregisterSensitiveTrace(trace,

+							this);

+				}

+			}

+		}

+	}

+

+	protected void saveTraces(Tuple invoker, Set<Tuple> traces) {

+		if (traces != null && !traces.isEmpty()) {

+			invoker2traces.put(invoker, traces);

+	

+			for (Tuple trace : traces) {

+				Set<Tuple> invokers = trace2invokers.get(trace);

+				if (invokers == null) {

+					invokers = new HashSet<Tuple>();

+					trace2invokers.put(trace, invokers);

+					engine.geTraceListener().registerSensitiveTrace(trace,

+							this);

+				}

+				invokers.add(invoker);

+			}

+		}

+	}

+

+	@Override

+	protected void propagateUpdate(Direction direction, Tuple updateElement) {

+		super.propagateUpdate(direction, updateElement);

+		if (Options.employTrivialIndexers) {

+			identityIndexer.propagate(direction, updateElement);

+			boolean radical = (direction==Direction.REVOKE && outgoing.isEmpty()) 

+				|| (direction==Direction.INSERT && outgoing.size()==1);

+			nullIndexer.propagate(direction, updateElement, radical);

+		}

+	}

+

+	/**

+	 * @return the asmFunctionTraceNotifier

+	 */

+	public Address<? extends Receiver> getAsmFunctionTraceNotifier() {

+		return asmFunctionTraceNotifier;

+	}

+

+	/**

+	 * @return the elementChangeNotifier

+	 */

+	public Address<? extends Receiver> getElementChangeNotifier() {

+		return elementChangeNotifier;

+	}

+

+	/**

+	 * @return the engine

+	 */

+	public ReteEngine<?> getEngine() {

+		return engine;

+	}

+	

+	class ASMFunctionTraceNotifierNode extends SingleInputNode {

+		public ASMFunctionTraceNotifierNode(ReteContainer reteContainer) {

+			super(reteContainer);

+		}

+

+		public void pullInto(Collection<Tuple> collector) {

+		}

+

+		public void update(Direction direction, Tuple updateElement) {

+			notifyASMFunctionValueChanged(updateElement);

+		}

+	}

+

+	class ElementChangeNotifierNode extends SingleInputNode {

+		public ElementChangeNotifierNode(ReteContainer reteContainer) {

+			super(reteContainer);

+		}

+

+		public void pullInto(Collection<Tuple> collector) {

+		}

+

+		public void update(Direction direction, Tuple updateElement) {

+			notifyElementChange(updateElement.get(0));

+		}

+	}

+

+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/ReferenceFeeder.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/ReferenceFeeder.java
new file mode 100644
index 0000000..60e4284
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/ReferenceFeeder.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext.GeneralizationQueryDirection;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherRuntimeContext;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Network;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.Address;
+
+
+public class ReferenceFeeder extends Feeder {
+
+	protected Object typeObject;
+
+	/**
+	 * @param receiver
+	 * @param context
+	 * @param network
+	 * @param boundary
+	 * @param typeObject
+	 */
+	public ReferenceFeeder(Address<? extends Receiver> receiver,
+			IPatternMatcherRuntimeContext<?> context, Network network,
+			ReteBoundary<?> boundary, Object typeObject) {
+		super(receiver, context, network, boundary);
+		this.typeObject = typeObject;
+	}
+
+
+
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.Feeder#feed()
+	 */
+	@Override
+	public void feed() {
+		if (typeObject != null) {
+			if (context.allowedGeneralizationQueryDirection() == GeneralizationQueryDirection.BOTH)			
+				context.enumerateDirectBinaryEdgeInstances(typeObject, pairCrawler());
+			else
+				context.enumerateAllBinaryEdgeInstances(typeObject, pairCrawler());		
+		} else {
+			context.enumerateAllBinaryEdges(pairCrawler());
+		}
+	}
+	
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/RelationFeeder.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/RelationFeeder.java
new file mode 100644
index 0000000..69b4cb9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/RelationFeeder.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext.GeneralizationQueryDirection;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherRuntimeContext;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Network;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.Address;
+
+
+public class RelationFeeder extends Feeder {
+
+	protected Object typeObject;
+
+	/**
+	 * @param receiver
+	 * @param context
+	 * @param network
+	 * @param boundary
+	 * @param typeObject
+	 */
+	public RelationFeeder(Address<? extends Receiver> receiver,
+			IPatternMatcherRuntimeContext<?> context, Network network,
+			ReteBoundary<?> boundary, Object typeObject) {
+		super(receiver, context, network, boundary);
+		this.typeObject = typeObject;
+	}
+
+
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.Feeder#feed()
+	 */
+	@Override
+	public void feed() {
+		if (typeObject != null) {
+			if (context.allowedGeneralizationQueryDirection() == GeneralizationQueryDirection.BOTH)			
+				context.enumerateDirectTernaryEdgeInstances(typeObject, ternaryCrawler());
+			else 
+				context.enumerateAllTernaryEdgeInstances(typeObject, ternaryCrawler());
+		} else {
+			context.enumerateAllTernaryEdges(ternaryCrawler());
+		}
+	}
+	
+	
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/ReteBoundary.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/ReteBoundary.java
new file mode 100644
index 0000000..8629e96
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/boundary/ReteBoundary.java
@@ -0,0 +1,682 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.Indexer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.IterableIndexer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.JoinNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext.GeneralizationQueryDirection;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherRuntimeContext;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.ReteEngine;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Network;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Production;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Tunnel;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.Address;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.TrimmerNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;
+
+
+/**
+ * Responsible for the storage, maintenance and communication of the nodes of the network 
+ * that are accessible form the outside for various reasons. 
+ * 
+ * @author Bergmann Gábor
+ *
+ * @param <PatternDescription>
+ */
+public class ReteBoundary<PatternDescription> {
+
+	protected ReteEngine<PatternDescription> engine;
+	protected Network network;
+	protected ReteContainer headContainer;
+	
+	protected IPatternMatcherRuntimeContext<PatternDescription> context;
+	IPatternMatcherContext.GeneralizationQueryDirection generalizationQueryDirection;
+
+	/*
+	 * arity:1
+	 * used as simple entity constraints
+	 * label is the object representing the type
+	 * null label means all entities regardless of type (global supertype), if allowed
+	 */
+	protected Map<Object, Address<? extends Tunnel>> unaryRoots; 
+	/*
+	 * arity:3 (rel, from, to)
+	 * used as VPM relation constraints
+	 * null label means all relations regardless of type (global supertype)
+	 */
+	protected Map<Object, Address<? extends Tunnel>> ternaryEdgeRoots;
+	/*
+	 * arity:2 (from, to)
+	 * not used over VPM; can be used as EMF references for instance
+	 * label is the object representing the type
+	 * null label means all entities regardless of type if allowed (global supertype), if allowed
+	 */
+	protected Map<Object, Address<? extends Tunnel>> binaryEdgeRoots; 
+
+	protected Map<PatternDescription, Address<? extends Production>> productions;
+	//protected Map<PatternDescription, Map<Map<Integer, Scope>, Address<? extends Production>>> productionsScoped; // (pattern, scopemap) -> production
+	
+	protected Address<? extends Tunnel> containmentRoot;
+	protected Address<? extends Supplier> containmentTransitiveRoot;
+	protected Address<? extends Tunnel> instantiationRoot;
+	protected Address<? extends Supplier> instantiationTransitiveRoot;
+	protected Address<? extends Tunnel> generalizationRoot;
+	protected Address<? extends Supplier> generalizationTransitiveRoot;
+	
+	/**
+	 * Stubs of parent nodes that have the key node as their child.
+	 * For RETE --> Stub traceability, mainly at production nodes.
+	 */
+	protected Map<Address<? extends Receiver>, Set<Stub<Address<? extends Supplier>>>> parentStubsOfReceiver; 
+
+	/**
+	 * Prerequisite: engine has its network and framework fields initialized
+	 * 
+	 * @param headContainer
+	 */
+	public ReteBoundary(ReteEngine<PatternDescription> engine) {
+		super();
+		this.engine = engine;
+		this.network = engine.getReteNet();
+		this.headContainer = network.getHeadContainer();
+		
+		this.context = engine.getContext();
+		this.generalizationQueryDirection = this.context.allowedGeneralizationQueryDirection();
+		this.parentStubsOfReceiver = new HashMap<Address<? extends Receiver>, Set<Stub<Address<? extends Supplier>>>>();
+
+		unaryRoots = new HashMap<Object, Address<? extends Tunnel>>();
+		ternaryEdgeRoots = new HashMap<Object, Address<? extends Tunnel>>();
+		binaryEdgeRoots = new HashMap<Object, Address<? extends Tunnel>>();		
+
+		productions = new HashMap<PatternDescription, Address<? extends Production>>();
+		//productionsScoped = new HashMap<GTPattern, Map<Map<Integer,Scope>,Address<? extends Production>>>();
+
+		containmentRoot = null;
+		containmentTransitiveRoot = null;
+		instantiationRoot = null;
+		generalizationRoot = null;
+		generalizationTransitiveRoot = null;
+	}
+
+	/**
+	 * Wraps the element into a form suitable for entering the network
+	 * model element -> internal object
+	 */
+	public Object wrapElement(Object element) {
+		return element;// .getID();
+	}
+
+	/**
+	 * Unwraps the element into its original form
+	 * internal object -> model element
+	 */
+	public Object unwrapElement(Object wrapper) {
+		return wrapper;// modelManager.getElementByID((String)
+										// wrapper);
+	}
+
+	/**
+	 * Unwraps the tuple of elements into a form suitable for entering the
+	 * network
+	 */
+	public Tuple wrapTuple(Tuple unwrapped) {
+		// int size = unwrapped.getSize();
+		// Object[] elements = new Object[size];
+		// for (int i=0; i<size; ++i) elements[i] =
+		// wrapElement(unwrapped.get(i));
+		// return new FlatTuple(elements);
+		return unwrapped;
+	}
+
+	/**
+	 * Unwraps the tuple of elements into their original form
+	 */
+	public Tuple unwrapTuple(Tuple wrappers) {
+		// int size = wrappers.getSize();
+		// Object[] elements = new Object[size];
+		// for (int i=0; i<size; ++i) elements[i] =
+		// unwrapElement(wrappers.get(i));
+		// return new FlatTuple(elements);
+		return wrappers;
+	}
+
+	/**
+	 * fetches the entity Root node under specified label; returns null if it
+	 * doesn't exist yet
+	 */
+	public Address<? extends Tunnel> getUnaryRoot(Object label) {
+		return unaryRoots.get(label);
+	}
+
+	/**
+	 * fetches the relation Root node under specified label; returns null if it
+	 * doesn't exist yet
+	 */
+	public Address<? extends Tunnel> getTernaryEdgeRoot(Object label) {
+		return ternaryEdgeRoots.get(label);
+	}
+
+	/**
+	 * accesses the entity Root node under specified label; creates the node if
+	 * it doesn't exist yet
+	 */
+	public Address<? extends Tunnel> accessUnaryRoot(Object typeObject) {
+		Address<? extends Tunnel> tn;
+		tn = unaryRoots.get(typeObject);
+		if (tn == null) {
+			tn = headContainer.getLibrary().newUniquenessEnforcerNode(1, typeObject);
+			unaryRoots.put(typeObject, tn);
+
+			
+			new EntityFeeder(tn, context, network, this, typeObject).feed();
+
+			if (typeObject != null && generalizationQueryDirection == GeneralizationQueryDirection.BOTH) {
+				Collection<? extends Object> subTypes = context.enumerateDirectUnarySubtypes(typeObject);
+
+				for (Object subType : subTypes) {
+					Address<? extends Tunnel> subRoot = accessUnaryRoot(subType);
+					network.connectRemoteNodes(subRoot, tn, true);
+				}
+			}
+
+		}
+		return tn;
+	}
+
+	/**
+	 * accesses the relation Root node under specified label; creates the node
+	 * if it doesn't exist yet
+	 */
+	public Address<? extends Tunnel> accessTernaryEdgeRoot(Object typeObject) {
+		Address<? extends Tunnel> tn;
+		tn = ternaryEdgeRoots.get(typeObject);
+		if (tn == null) {
+			tn = headContainer.getLibrary().newUniquenessEnforcerNode(3, typeObject);
+			ternaryEdgeRoots.put(typeObject, tn);
+
+			new RelationFeeder(tn, context, network, this, typeObject).feed();
+
+			if (typeObject != null && generalizationQueryDirection == GeneralizationQueryDirection.BOTH) {
+				Collection<? extends Object> subTypes = context.enumerateDirectTernaryEdgeSubtypes(typeObject);
+
+				for (Object subType : subTypes) {
+					Address<? extends Tunnel> subRoot = accessTernaryEdgeRoot(subType);
+					network.connectRemoteNodes(subRoot, tn, true);
+				}
+			}
+		}
+		return tn;
+	}
+
+	
+
+	/**
+	 * accesses the reference Root node under specified label; creates the node
+	 * if it doesn't exist yet
+	 */
+	public Address<? extends Tunnel> accessBinaryEdgeRoot(Object typeObject) {
+		Address<? extends Tunnel> tn;
+		tn = binaryEdgeRoots.get(typeObject);
+		if (tn == null) {
+			tn = headContainer.getLibrary().newUniquenessEnforcerNode(2, typeObject);
+			binaryEdgeRoots.put(typeObject, tn);
+
+			new ReferenceFeeder(tn, context, network, this, typeObject).feed();
+
+			if (typeObject != null && generalizationQueryDirection == GeneralizationQueryDirection.BOTH) {
+				Collection<? extends Object> subTypes = context.enumerateDirectBinaryEdgeSubtypes(typeObject);
+
+				for (Object subType : subTypes) {
+					Address<? extends Tunnel> subRoot = accessBinaryEdgeRoot(subType);
+					network.connectRemoteNodes(subRoot, tn, true);
+				}
+			}
+		}
+		return tn;
+	}
+	
+	/**
+	 * accesses the special direct containment relation Root node; creates the
+	 * node if it doesn't exist yet
+	 */
+	public Address<? extends Tunnel> accessContainmentRoot() {
+		if (containmentRoot == null) {
+			// containment: relation quasi-type
+			containmentRoot = headContainer.getLibrary()
+					.newUniquenessEnforcerNode(2, "$containment");
+
+			new ContainmentFeeder(containmentRoot, context, network, this).feed();
+		}
+		return containmentRoot;
+	}
+
+	/**
+	 * accesses the special transitive containment relation Root node; creates
+	 * the node if it doesn't exist yet
+	 */
+	public Address<? extends Supplier> accessContainmentTransitiveRoot() {
+		if (containmentTransitiveRoot == null) {
+			// transitive containment: derived
+			Address<? extends Tunnel> containmentTransitiveRoot = headContainer
+					.getLibrary().newUniquenessEnforcerNode(2, "$containmentTransitive");
+			network.connectRemoteNodes(accessContainmentRoot(),
+					containmentTransitiveRoot, true);
+
+			final int[] actLI = { 1 };
+			final int arcLIw = 2;
+			final int[] actRI = { 0 };
+			final int arcRIw = 2;
+			Address<? extends IterableIndexer> jPrimarySlot = headContainer.getLibrary()
+					.accessProjectionIndexer(accessContainmentRoot(),
+							new TupleMask(actLI, arcLIw));
+			Address<? extends IterableIndexer> jSecondarySlot = headContainer.getLibrary()
+					.accessProjectionIndexer(containmentTransitiveRoot,
+							new TupleMask(actRI, arcRIw));
+
+			final int[] actRIcomp = { 1 };
+			final int arcRIwcomp = 2;
+			TupleMask complementerMask = new TupleMask(actRIcomp, arcRIwcomp);
+
+			Address<JoinNode> andCT = headContainer.getLibrary()
+					.accessJoinNode(jPrimarySlot, jSecondarySlot,
+							complementerMask);
+
+			final int[] mask = { 0, 2 };
+			final int maskw = 3;
+			Address<TrimmerNode> tr = headContainer.getLibrary()
+					.accessTrimmerNode(andCT, new TupleMask(mask, maskw));
+			network.connectRemoteNodes(tr, containmentTransitiveRoot, true);
+
+			this.containmentTransitiveRoot = containmentTransitiveRoot; // cast
+																		// back
+																		// to
+																		// org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.
+																		// Supplier
+		}
+		return containmentTransitiveRoot;
+	}
+
+	/**
+	 * accesses the special instantiation relation Root node; creates the node
+	 * if it doesn't exist yet
+	 */
+	public Address<? extends Tunnel> accessInstantiationRoot() {
+		if (instantiationRoot == null) {
+			// instantiation: relation quasi-type
+			instantiationRoot = headContainer.getLibrary()
+					.newUniquenessEnforcerNode(2, "$instantiation");
+
+			new InstantiationFeeder(instantiationRoot, context, network, this).feed();
+		}
+		return instantiationRoot;
+	}
+
+	/**
+	 * accesses the special transitive instantiation relation Root node; creates
+	 * the node if it doesn't exist yet InstantiationTransitive = Instantiation
+	 * o (Generalization)^*
+	 */
+	public Address<? extends Supplier> accessInstantiationTransitiveRoot() {
+		if (instantiationTransitiveRoot == null) {
+			// transitive instantiation: derived
+			Address<? extends Tunnel> instantiationTransitiveRoot = headContainer
+					.getLibrary().newUniquenessEnforcerNode(2, "$instantiationTransitive");
+			network.connectRemoteNodes(accessInstantiationRoot(),
+					instantiationTransitiveRoot, true);
+
+			final int[] actLI = { 1 };
+			final int arcLIw = 2;
+			final int[] actRI = { 0 };
+			final int arcRIw = 2;
+			Address<? extends IterableIndexer> jPrimarySlot = headContainer.getLibrary()
+					.accessProjectionIndexer(accessGeneralizationRoot(),
+							new TupleMask(actLI, arcLIw));
+			Address<? extends Indexer> jSecondarySlot = headContainer.getLibrary()
+					.accessProjectionIndexer(instantiationTransitiveRoot,
+							new TupleMask(actRI, arcRIw));
+
+			final int[] actRIcomp = { 1 };
+			final int arcRIwcomp = 2;
+			TupleMask complementerMask = new TupleMask(actRIcomp, arcRIwcomp);
+
+			Address<JoinNode> andCT = headContainer.getLibrary()
+					.accessJoinNode(jPrimarySlot, jSecondarySlot,
+							complementerMask);
+
+			final int[] mask = { 0, 2 };
+			final int maskw = 3;
+			Address<? extends TrimmerNode> tr = headContainer.getLibrary()
+					.accessTrimmerNode(andCT, new TupleMask(mask, maskw));
+			network.connectRemoteNodes(tr, instantiationTransitiveRoot, true);
+
+			this.instantiationTransitiveRoot = instantiationTransitiveRoot; // cast
+																			// back
+																			// to
+																			// org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network
+																			// .
+																			// Supplier
+		}
+		return instantiationTransitiveRoot;
+	}
+
+	/**
+	 * accesses the special generalization relation Root node; creates the node
+	 * if it doesn't exist yet
+	 */
+	public Address<? extends Tunnel> accessGeneralizationRoot() {
+		if (generalizationRoot == null) {
+			// generalization: relation quasi-type
+			generalizationRoot = headContainer.getLibrary()
+					.newUniquenessEnforcerNode(2, "$generalization");
+
+			new GeneralizationFeeder(generalizationRoot, context, network, this).feed();
+		}
+		return generalizationRoot;
+	}
+
+	/**
+	 * accesses the special transitive containment relation Root node; creates
+	 * the node if it doesn't exist yet
+	 */
+	public Address<? extends Supplier> accessGeneralizationTransitiveRoot() {
+		if (generalizationTransitiveRoot == null) {
+			// transitive generalization: derived
+			Address<? extends Tunnel> generalizationTransitiveRoot = headContainer
+					.getLibrary().newUniquenessEnforcerNode(2, "$generalizationTransitive");
+			network.connectRemoteNodes(accessGeneralizationRoot(),
+					generalizationTransitiveRoot, true);
+
+			final int[] actLI = { 1 };
+			final int arcLIw = 2;
+			final int[] actRI = { 0 };
+			final int arcRIw = 2;
+			Address<? extends IterableIndexer> jPrimarySlot = headContainer.getLibrary()
+					.accessProjectionIndexer(accessGeneralizationRoot(),
+							new TupleMask(actLI, arcLIw));
+			Address<? extends Indexer> jSecondarySlot = headContainer.getLibrary()
+					.accessProjectionIndexer(generalizationTransitiveRoot,
+							new TupleMask(actRI, arcRIw));
+
+			final int[] actRIcomp = { 1 };
+			final int arcRIwcomp = 2;
+			TupleMask complementerMask = new TupleMask(actRIcomp, arcRIwcomp);
+
+			Address<JoinNode> andCT = headContainer.getLibrary()
+					.accessJoinNode(jPrimarySlot, jSecondarySlot,
+							complementerMask);
+
+			final int[] mask = { 0, 2 };
+			final int maskw = 3;
+			Address<TrimmerNode> tr = headContainer.getLibrary()
+					.accessTrimmerNode(andCT, new TupleMask(mask, maskw));
+			network.connectRemoteNodes(tr, generalizationTransitiveRoot, true);
+
+			this.generalizationTransitiveRoot = generalizationTransitiveRoot; // cast
+																				// back
+																				// to
+																				// org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network
+																				// .
+																				// Supplier
+		}
+		return generalizationTransitiveRoot;
+	}
+
+	// /**
+	// * Registers and publishes a supplier under specified label.
+	// */
+	// public void publishSupplier(Supplier s, Object label)
+	// {
+	// publishedSuppliers.put(label, s);
+	// }
+	//	
+	// /**
+	// * fetches the production node under specified label;
+	// * returns null if it doesn't exist yet
+	// */
+	// public Production getProductionNode(Object label)
+	// {
+	// return productions.get(label);
+	// }
+	//	
+	// /**
+	// * fetches the published supplier under specified label;
+	// * returns null if it doesn't exist yet
+	// */
+	// public Supplier getPublishedSupplier(Object label)
+	// {
+	// return publishedSuppliers.get(label);
+	// }
+
+	/**
+	 * accesses the production node for specified pattern; builds pattern matcher if it doesn't exist yet
+	 */
+	public synchronized Address<? extends Production> accessProduction(PatternDescription gtPattern) throws RetePatternBuildException {
+		Address<? extends Production> pn;
+		pn = productions.get(gtPattern);
+		if (pn == null) {
+			construct(gtPattern);
+			pn = productions.get(gtPattern);
+			if (pn == null) {
+				String[] args = {gtPattern.toString()};
+				throw new RetePatternBuildException("Unsuccessful creation of production node for pattern {1}", args, gtPattern);
+			}
+		}
+		return pn;
+	}
+	
+	/**
+	 * creates the production node for the specified pattern
+	 * Contract: only call from the builder (through Buildable) responsible for building this pattern
+	 * @throws PatternMatcherCompileTimeException if production node is already created
+	 */
+	public synchronized Address<? extends Production> createProductionInternal(PatternDescription gtPattern) 
+	throws RetePatternBuildException {
+		if (productions.containsKey(gtPattern)) {
+			String[] args = {gtPattern.toString()};
+			throw new RetePatternBuildException("Multiple creation attempts of production node for {1}", args, gtPattern);
+		}
+		
+		HashMap<Object, Integer> posMapping = engine.getBuilder().getPosMapping(gtPattern);
+		Address<? extends Production> pn = headContainer.getLibrary().newProductionNode(posMapping, gtPattern);
+		productions.put(gtPattern, pn);
+		context.reportPatternDependency(gtPattern);
+	
+		return pn;
+	}
+
+//	/**
+//	 * accesses the production node for specified pattern and scope map; creates the node if
+//	 * it doesn't exist yet
+//	 */
+//	public synchronized Address<? extends Production> accessProductionScoped(
+//			GTPattern gtPattern, Map<Integer, Scope> additionalScopeMap) throws PatternMatcherCompileTimeException {
+//		if (additionalScopeMap.isEmpty()) return accessProduction(gtPattern);
+//		
+//		Address<? extends Production> pn;
+//		
+//		Map<Map<Integer, Scope>, Address<? extends Production>> scopes = productionsScoped.get(gtPattern);
+//		if (scopes == null) {
+//			scopes = new HashMap<Map<Integer, Scope>, Address<? extends Production>>();
+//			productionsScoped.put(gtPattern, scopes);
+//		}	
+//		
+//		pn = scopes.get(additionalScopeMap);
+//		if (pn == null) {
+//			Address<? extends Production> unscopedProduction = accessProduction(gtPattern);
+//
+//			HashMap<Object, Integer> posMapping = headContainer.resolveLocal(unscopedProduction).getPosMapping();
+//			pn = headContainer.getLibrary().newProductionNode(posMapping);
+//			scopes.put(additionalScopeMap, pn);
+//
+//			constructScoper(unscopedProduction, additionalScopeMap, pn);
+//		}
+//		return pn;
+//	}
+	
+
+
+	/**
+	 * @pre: builder is set
+	 */
+	protected void construct(PatternDescription gtPattern)
+			throws RetePatternBuildException {
+		engine.getReteNet().waitForReteTermination();
+		engine.getBuilder().construct(gtPattern);
+		// production.setDirty(false);
+	}
+
+//	protected void constructScoper(
+//			Address<? extends Production> unscopedProduction,
+//			Map<Integer, Scope> additionalScopeMap,
+//			Address<? extends Production> production)
+//			throws PatternMatcherCompileTimeException {
+//		engine.reteNet.waitForReteTermination();
+//		engine.builder.constructScoper(unscopedProduction, additionalScopeMap, production);		
+//	}
+	
+	// /**
+	// * Invalidates the subnet constructed for the recognition of a given
+	// pattern.
+	// * The pattern matcher will have to be rebuilt.
+	// * @param gtPattern the pattern whose matcher subnet should be invalidated
+	// */
+	// public void invalidatePattern(GTPattern gtPattern) {
+	// Production production = null;
+	// try {
+	// production = accessProduction(gtPattern);
+	// } catch (PatternMatcherCompileTimeException e) {
+	// // this should not occur here, since we already have a production node
+	// e.printStackTrace();
+	// }
+	//		
+	// production.tearOff();
+	// //production.setDirty(true);
+	// }
+
+	// updaters for change notification
+	// if the corresponding rete input isn't created yet, call is ignored
+	public void updateUnary(Direction direction, Object entity, Object typeObject) {
+		Address<? extends Tunnel> root = unaryRoots.get(typeObject);
+		if (root != null) {
+			network.sendExternalUpdate(root, direction, new FlatTuple(wrapElement(entity)));
+			if (!engine.isParallelExecutionEnabled())
+				network.waitForReteTermination();
+		}
+		if (typeObject!=null && generalizationQueryDirection == GeneralizationQueryDirection.SUPERTYPE_ONLY) {
+			for (Object superType: context.enumerateDirectUnarySupertypes(typeObject)) {
+				updateUnary(direction, entity, superType);
+			}
+		}
+	}
+	
+	public void updateTernaryEdge(Direction direction, Object relation,
+			Object from, Object to, Object typeObject) {
+		Address<? extends Tunnel> root = ternaryEdgeRoots.get(typeObject);
+		if (root != null) {
+			network.sendExternalUpdate(root, direction, new FlatTuple(
+					wrapElement(relation), wrapElement(from), wrapElement(to)));	
+			if (!engine.isParallelExecutionEnabled())
+				network.waitForReteTermination();
+		}
+		if (typeObject!=null && generalizationQueryDirection == GeneralizationQueryDirection.SUPERTYPE_ONLY) {
+			for (Object superType: context.enumerateDirectTernaryEdgeSupertypes(typeObject)) {
+				updateTernaryEdge(direction, relation, from, to, superType);
+			}
+		}	
+	}
+	
+	public void updateBinaryEdge(Direction direction,
+			Object from, Object to, Object typeObject) {
+		Address<? extends Tunnel> root = binaryEdgeRoots.get(typeObject);
+		if (root != null) {
+			network.sendExternalUpdate(root, direction, new FlatTuple(
+					wrapElement(from), wrapElement(to)));
+			if (!engine.isParallelExecutionEnabled())
+				network.waitForReteTermination();
+		}
+		if (typeObject!=null && generalizationQueryDirection == GeneralizationQueryDirection.SUPERTYPE_ONLY) {
+			for (Object superType: context.enumerateDirectBinaryEdgeSupertypes(typeObject)) {
+				updateBinaryEdge(direction, from, to, superType);
+			}
+		}						
+	}
+
+	public void updateContainment(Direction direction, Object container,
+			Object element) {
+		if (containmentRoot != null) {
+			network.sendExternalUpdate(containmentRoot, direction,
+							new FlatTuple(wrapElement(container),
+									wrapElement(element)));
+			if (!engine.isParallelExecutionEnabled())
+				network.waitForReteTermination();
+		}
+	}
+
+	public void updateInstantiation(Direction direction, Object parent,
+			Object child) {
+		if (instantiationRoot != null) {
+			network.sendExternalUpdate(instantiationRoot, direction,
+					new FlatTuple(wrapElement(parent), wrapElement(child)));
+			if (!engine.isParallelExecutionEnabled())
+				network.waitForReteTermination();
+		}
+	}
+
+	public void updateGeneralization(Direction direction, Object parent,
+			Object child) {
+		if (generalizationRoot != null) {
+			network.sendExternalUpdate(generalizationRoot, direction,
+					new FlatTuple(wrapElement(parent), wrapElement(child)));
+			if (!engine.isParallelExecutionEnabled())
+				network.waitForReteTermination();
+		}
+	}
+
+	// no wrapping needed!
+	public void notifyEvaluator(Address<? extends Receiver> receiver,
+			Tuple tuple) {
+		network.sendExternalUpdate(receiver, Direction.INSERT, tuple);
+		if (!engine.isParallelExecutionEnabled())
+			network.waitForReteTermination();
+	}
+	
+	public void registerParentStubForReceiver(Address<? extends Receiver> receiver, Stub<Address<? extends Supplier>> parentStub) {
+		Set<Stub<Address<? extends Supplier>>> parents = parentStubsOfReceiver.get(receiver);
+		if (parents == null) {
+			parents = new HashSet<Stub<Address<? extends Supplier>>>();
+			parentStubsOfReceiver.put(receiver, parents);
+		}
+		parents.add(parentStub);
+	}
+	public Set<Stub<Address<? extends Supplier>>> getParentStubsOfReceiver(Address<? extends Receiver> receiver) {
+		Set<Stub<Address<? extends Supplier>>> parents = parentStubsOfReceiver.get(receiver);
+		if (parents == null) parents = Collections.emptySet();
+		return parents;
+	}
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/Buildable.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/Buildable.java
new file mode 100644
index 0000000..823969b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/Buildable.java
@@ -0,0 +1,71 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.AbstractEvaluator;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;

+

+/**

+ * @author Bergmann Gábor

+ *

+ * An implicit common parameter is the "effort" PatternDescription. This indicates that the build request is part

+ * of an effort to build the matcher of the given pattern; it it important to record this during code generation

+ * so that the generated code can be separated according to patterns. 

+ *  

+ * @param <PatternDescription> the description of a pattern

+ * @param <StubHandle> the handle of a continuable supplier-like RETE ending with associated semantics

+ * @param <Collector> the handle of a receiver-like RETE ending to which stubs can be connected

+ */

+public interface Buildable<PatternDescription, StubHandle, Collector> {

+	

+	public Collector patternCollector(PatternDescription pattern) throws RetePatternBuildException;

+	public Stub<StubHandle> patternCallStub(Tuple nodes, PatternDescription supplierKey) throws RetePatternBuildException;

+

+	public Stub<StubHandle> instantiationTransitiveStub(Tuple nodes);

+	public Stub<StubHandle> instantiationDirectStub(Tuple nodes);

+	public Stub<StubHandle> generalizationTransitiveStub(Tuple nodes);

+	public Stub<StubHandle> generalizationDirectStub(Tuple nodes);

+	public Stub<StubHandle> containmentTransitiveStub(Tuple nodes);

+	public Stub<StubHandle> containmentDirectStub(Tuple nodes);

+	public Stub<StubHandle> binaryEdgeTypeStub(Tuple nodes, Object supplierKey);

+	public Stub<StubHandle> ternaryEdgeTypeStub(Tuple nodes, Object supplierKey);

+	public Stub<StubHandle> unaryTypeStub(Tuple nodes, Object supplierKey);

+	

+	public void buildConnection(Stub<StubHandle> stub, Collector collector);

+	

+	public Stub<StubHandle> buildStartStub(Object[] constantValues, Object[] constantNames);

+	public Stub<StubHandle> buildEqualityChecker(Stub<StubHandle> stub, int[] indices);

+	public Stub<StubHandle> buildInjectivityChecker(Stub<StubHandle> stub, int subject, int[] inequalIndices);

+	public Stub<StubHandle> buildTransitiveClosure(Stub<StubHandle> stub);

+	public Stub<StubHandle> buildTrimmer(Stub<StubHandle> stub, TupleMask trimMask);

+	public Stub<StubHandle> buildBetaNode(Stub<StubHandle> primaryStub, Stub<StubHandle> sideStub, TupleMask primaryMask,

+			TupleMask sideMask, TupleMask complementer, boolean negative);

+	public Stub<StubHandle> buildCounterBetaNode(Stub<StubHandle> primaryStub, Stub<StubHandle> sideStub, 

+			TupleMask primaryMask, TupleMask originalSideMask, TupleMask complementer, Object aggregateResultCalibrationElement);  

+	public Stub<StubHandle> buildCountCheckBetaNode(Stub<StubHandle> primaryStub, Stub<StubHandle> sideStub, 

+			TupleMask primaryMask, TupleMask originalSideMask, int resultPositionInSignature);

+	public Stub<StubHandle> buildScopeConstrainer(Stub<StubHandle> stub, boolean transitive, Object unwrappedContainer, int constrainedIndex);

+	public Stub<StubHandle> buildPredicateChecker(AbstractEvaluator evaluator, Integer rhsIndex, int[] affectedIndices, Stub<StubHandle> stub); 

+

+	

+	/**

+	 * @return a buildable that potentially acts on a separate container

+	 */

+	public Buildable<PatternDescription, StubHandle, Collector> getNextContainer();

+	/**

+	 * @return a buildable that puts build actions on the tab of the given pattern 

+	 */

+	public Buildable<PatternDescription, StubHandle, Collector> putOnTab(PatternDescription effort);

+	

+	public void reinitialize();

+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/CodegenRecorderBuildable.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/CodegenRecorderBuildable.java
new file mode 100644
index 0000000..dcde297
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/CodegenRecorderBuildable.java
@@ -0,0 +1,423 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.LeftInheritanceTuple;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util.Options;

+

+

+/**

+ * Lightweight class that generates Java code of a builder method from the build actions.

+ * Code is sent to a coordinator to be collected in string buffers there.  

+ * @author Bergmann Gábor

+ */

+public abstract class CodegenRecorderBuildable<PatternDescription> 

+	implements Buildable<PatternDescription, String, String> 

+{

+	public CodegenRecordingCoordinator<PatternDescription> coordinator;

+	public PatternDescription effort;

+	public String myName; 

+	public String baseName;

+	public String indent;

+	/**

+	 * @param code

+	 * @param indent

+	 * @param myName

+	 */

+	public CodegenRecorderBuildable(CodegenRecordingCoordinator<PatternDescription> coordinator,

+			PatternDescription effort, String indent, String baseName, String instanceSuffix) 

+	{

+		super();

+		this.coordinator = coordinator;

+		this.effort = effort;

+		this.indent = indent;

+		this.baseName = baseName;

+		this.myName = baseName+instanceSuffix;

+	}	

+

+	public void reinitialize() {

+		throw new UnsupportedOperationException();

+	}

+

+

+	protected String prettyPrintStringArray(String[] elements, String separator) {

+		if (elements.length == 0) return "";

+		else {

+			StringBuilder result = new StringBuilder(elements[0]);

+			for (int i=1; i<elements.length; ++i) {

+				result.append(", ");

+				result.append(elements[i]);

+			}

+			return result.toString();

+		}	

+	}

+	protected String prettyPrintStringArray(String[] elements) {

+		return prettyPrintStringArray(elements, ", ");

+	}

+	protected String prettyPrintIntArray(int[] elements, String separator) {

+		if (elements.length == 0) return "";

+		else {

+			StringBuilder result = new StringBuilder();

+			result.append(elements[0]);

+			for (int i=1; i<elements.length; ++i) {

+				result.append(", ");

+				result.append(elements[i]);

+			}

+			return result.toString();

+		}	

+	}

+	protected String prettyPrintIntArray(int[] elements) {

+		return prettyPrintIntArray(elements, ", ");

+	}	

+	protected String prettyPrintObjectArray(Object[] elements, String separator, boolean strict) {

+		if (elements.length == 0) return "";

+		else {

+			StringBuilder result = new StringBuilder(gen(elements[0], strict));

+			for (int i=1; i<elements.length; ++i) {

+				result.append(separator);

+				result.append(gen(elements[i], strict));

+			}

+			return result.toString();

+		}	

+	}

+	protected String prettyPrintObjectArray(Object[] constantValues, boolean strict) {

+		return prettyPrintObjectArray(constantValues, ", ", strict);

+	}	

+	

+	protected void emitLine(String line) {

+		coordinator.emitPatternBuilderLine(effort, indent, line);

+	}

+	protected String call(String methodName, String arguments) {

+		return(myName+"."+methodName+"("+arguments+")");

+	}

+	protected String call(String methodName, String[] arguments) {

+		return call(methodName, prettyPrintStringArray(arguments));

+	}

+	protected String emitFunctionCall(String resultType, String methodName, String arguments) {

+		return declareNewValue(resultType, call(methodName, arguments));

+	}

+	protected String emitFunctionCall(String resultType, String methodName, String[] arguments) {

+		return declareNewValue(resultType, call(methodName, arguments));

+	}	

+	protected void emitProcedureCall(String methodName, String arguments) {

+		emitLine(call(methodName, arguments)+";");

+	}	

+	protected void emitProcedureCall(String methodName, String[] arguments) {

+		emitLine(call(methodName, arguments)+";");

+	}	

+	protected void declareNew(String type, String identifier, String value, boolean isFinal) {

+		emitLine((isFinal ? "final " : "") + type + " " + identifier + " = " + value + ";");

+	}

+	protected String declareNewValue(String type, String value) {

+		String name = coordinator.newVariableIdentifier();

+		declareNew(type, name, value, true);

+		return name;

+	}

+	protected String declareNewBuildable(String value) {

+		String name = coordinator.newBuildableIdentifier();

+		declareNew(coordinator.buildableType, name, value, true);

+		return name;

+	}

+	

+	protected String gen(Stub<String> stub) {

+		return stub.getHandle();

+	}

+	protected String gen(boolean bool) {

+		return bool? "true": "false";

+	}	

+	protected String gen(Integer integer) {

+		return integer == null ? "null" : integer.toString();

+	}	

+	protected String gen(int[] ints) {

+		// return declareNewValue("int[]", "{"+prettyPrintIntArray(ints)+"}");

+		return "new int[] {" + prettyPrintIntArray(ints) + "}";

+	}	

+	protected String gen(TupleMask mask) {

+		return declareNewValue("TupleMask", "new TupleMask("+gen(mask.indices)+", " + gen(mask.sourceWidth)+ ")");

+	}	

+	protected String gen(Object o, boolean strict) {

+		if (o instanceof Number) return o.toString();

+		if (o instanceof String) return "\"" + o.toString() + "\"";

+		if (!strict) return "\"" + o.toString() + "\""; 

+		throw new UnsupportedOperationException(

+				"Cannot currently generate code from an " + o.getClass() + " instance: " + o.toString());

+	}

+	protected String gen(Object[] o, boolean strict) {

+		// return declareNewValue("Object[]", "{"+prettyPrintObjectArray(o, strict)+"}");

+		return "new Object[] {" + prettyPrintObjectArray(o, strict) + "}";

+	}

+	protected String gen(Tuple tuple, boolean strict) {

+		return "new FlatTuple(" + gen(tuple.getElements(), strict) + ")";

+	}

+	public String genCalibrationElement(Object calibrationElement) {

+		return gen(calibrationElement, false);//calibrationElement.toString();

+	}	

+	

+//	public String genUnaryType(Object type) {

+//		return type==null? "null" : "context.retrieveUnaryType(\"" + coordinator.targetContext.retrieveUnaryTypeFQN(type) + "\")";

+//	}

+//

+//	public String genTernaryEdgeType(Object type) {

+//		return type==null? "null" : "context.retrieveTernaryEdgeType(\"" + coordinator.targetContext.retrieveBinaryEdgeTypeFQN(type) + "\")";

+//

+//	}

+//	public String genBinaryEdgeType(Object type) {

+//		return type==null? "null" : "context.retrieveBinaryEdgeType(\"" + coordinator.targetContext.retrieveTernaryEdgeTypeFQN(type) + "\")";

+//	}

+	

+	public abstract String genUnaryType(Object type);

+	public abstract String genTernaryEdgeType(Object type);

+	public abstract String genBinaryEdgeType(Object type);

+	

+	public abstract String genPattern(PatternDescription desc);

+	//public abstract String genPosMap(PatternDescription desc);

+

+	public String declareNextContainerVariable() {

+		return declareNewBuildable(call("getNextContainer", ""));

+	}

+//	public String declarePutOnTabVariable(PatternDescription effort) {

+//		return declareNewBuildable(call("putOnTab", genPattern(effort)));

+//	}

+	////////////////////////////////////

+	// * BL

+	////////////////////////////////////

+	

+

+	

+	public Stub<String> buildBetaNode(Stub<String> primaryStub, Stub<String> sideStub,

+			TupleMask primaryMask, TupleMask sideMask,

+			TupleMask complementer, boolean negative) 

+	{

+		String[] arguments = {

+			gen(primaryStub), gen(sideStub),

+			gen(primaryMask), gen(sideMask), 

+			gen(complementer), gen(negative)

+		};

+		String resultVar = emitFunctionCall(coordinator.stubType, "buildBetaNode", arguments);

+		

+		if (negative) {

+			return new Stub<String>(primaryStub, resultVar);

+		} else {

+			Tuple newCalibrationPattern = negative ? 

+				primaryStub.getVariablesTuple() : 

+				complementer.combine(primaryStub.getVariablesTuple(), sideStub.getVariablesTuple(), Options.enableInheritance, true);

+

+			return new Stub<String>(primaryStub, sideStub, newCalibrationPattern, resultVar);

+		}

+	}

+

+

+	public Stub<String> buildCountCheckBetaNode(Stub<String> primaryStub,

+			Stub<String> sideStub, TupleMask primaryMask,

+			TupleMask originalSideMask, int resultPositionInSignature) 

+	{

+		String[] arguments = {

+				gen(primaryStub), gen(sideStub),

+				gen(primaryMask), gen(originalSideMask), 

+				gen(resultPositionInSignature)

+			};

+		String resultVar = emitFunctionCall(coordinator.stubType, "buildCountCheckBetaNode", arguments);

+

+		return new Stub<String>(primaryStub, primaryStub.getVariablesTuple(), resultVar);

+	}

+

+	public Stub<String> buildCounterBetaNode(Stub<String> primaryStub,

+			Stub<String> sideStub, TupleMask primaryMask,

+			TupleMask originalSideMask, TupleMask complementer,

+			Object aggregateResultCalibrationElement) 

+	{

+		String[] arguments = {

+				gen(primaryStub), gen(sideStub),

+				gen(primaryMask), gen(originalSideMask),

+				gen(complementer),

+				genCalibrationElement(aggregateResultCalibrationElement)

+			};

+		String resultVar = emitFunctionCall(coordinator.stubType, "buildCounterBetaNode", arguments);

+		

+		Object[] newCalibrationElement = {aggregateResultCalibrationElement}; 

+		Tuple newCalibrationPattern = new LeftInheritanceTuple(primaryStub.getVariablesTuple(), newCalibrationElement);

+		

+		return new Stub<String>(primaryStub, newCalibrationPattern, resultVar);

+	}

+	public void buildConnection(Stub<String> stub, String collector) {

+		String[] arguments = {

+				gen(stub), collector

+		};		

+		emitProcedureCall("buildConnection", arguments);	

+	}

+

+	public Stub<String> buildEqualityChecker(Stub<String> stub, int[] indices) {

+		String[] arguments = {

+				gen(stub),

+				gen(indices)

+		};

+		String resultVar = emitFunctionCall(coordinator.stubType, "buildEqualityChecker", arguments);

+		return new Stub<String>(stub, resultVar);

+	}

+

+	public Stub<String> buildInjectivityChecker(Stub<String> stub, int subject, int[] inequalIndices) {

+		String[] arguments = {

+				gen(stub), gen(subject),

+				gen(inequalIndices)

+		};

+		String resultVar = emitFunctionCall(coordinator.stubType, "buildInjectivityChecker", arguments);

+		return new Stub<String>(stub, resultVar);

+	}

+

+	@Override

+	public Stub<String> buildTransitiveClosure(Stub<String> stub) {

+		String[] arguments = {

+				gen(stub)

+		};

+		String resultVar = emitFunctionCall(coordinator.stubType, "buildTransitiveClosure", arguments);

+		return new Stub<String>(stub, resultVar);

+	}

+	

+	public Stub<String> buildScopeConstrainer(Stub<String> stub, boolean transitive,

+			Object unwrappedContainer, int constrainedIndex) {

+		throw new UnsupportedOperationException("Code generation does not support external scoping as of now");

+	}

+

+	public Stub<String> buildStartStub(Object[] constantValues, Object[] constantNames) {

+		String[] arguments = {

+			gen(constantValues, true),

+			gen(constantNames, false),

+		};

+		String resultVar = emitFunctionCall(coordinator.stubType, "buildStartStub", arguments);

+		return new Stub<String>(new FlatTuple(constantNames), resultVar);

+	}

+

+

+	public Stub<String> buildTrimmer(Stub<String> stub, TupleMask trimMask) {

+		String[] arguments = {

+			gen(stub), gen(trimMask)

+		};

+		String resultVar = emitFunctionCall(coordinator.stubType, "buildTrimmer", arguments);

+		return new Stub<String>(stub, trimMask.transform(stub.getVariablesTuple()), resultVar);

+	}

+

+

+	public Stub<String> containmentDirectStub(Tuple nodes) {

+		String[] arguments = {

+			gen(nodes, false)

+		};	

+		String resultVar = emitFunctionCall(coordinator.stubType, "containmentDirectStub", arguments);

+		return new Stub<String>(nodes, resultVar);

+	}

+

+

+	public Stub<String> containmentTransitiveStub(Tuple nodes) {

+		String[] arguments = {

+				gen(nodes, false)

+		};	

+		String resultVar = emitFunctionCall(coordinator.stubType, "containmentTransitiveStub", arguments);

+		return new Stub<String>(nodes, resultVar);

+	}

+

+

+	public Stub<String> unaryTypeStub(Tuple nodes, Object supplierKey) {

+		String[] arguments = {

+				gen(nodes, false), declareNewValue("Object", genUnaryType(supplierKey))

+		};	

+		String resultVar = emitFunctionCall(coordinator.stubType, "unaryTypeStub", arguments);

+		return new Stub<String>(nodes, resultVar);

+	}

+

+

+	public Stub<String> generalizationDirectStub(Tuple nodes) {

+		String[] arguments = {

+				gen(nodes, false)

+		};	

+		String resultVar = emitFunctionCall(coordinator.stubType, "generalizationDirectStub", arguments);

+		return new Stub<String>(nodes, resultVar);

+	}

+

+

+	public Stub<String> generalizationTransitiveStub(Tuple nodes) {

+		String[] arguments = {

+				gen(nodes, false)

+		};	

+		String resultVar = emitFunctionCall(coordinator.stubType, "generalizationTransitiveStub", arguments);

+		return new Stub<String>(nodes, resultVar);

+	}

+

+	public Stub<String> instantiationDirectStub(Tuple nodes) {

+		String[] arguments = {

+				gen(nodes, false)

+		};	

+		String resultVar = emitFunctionCall(coordinator.stubType, "instantiationDirectStub", arguments);

+		return new Stub<String>(nodes, resultVar);

+	}

+

+

+	public Stub<String> instantiationTransitiveStub(Tuple nodes) {

+		String[] arguments = {

+				gen(nodes, false)

+		};	

+		String resultVar = emitFunctionCall(coordinator.stubType, "instantiationTransitiveStub", arguments);

+		return new Stub<String>(nodes, resultVar);

+	}

+

+

+	public Stub<String> patternCallStub(Tuple nodes, PatternDescription supplierKey)

+	{

+		//if (!coordinator.collectors.containsKey(supplierKey)) coordinator.unbuilt.add(supplierKey);

+		String[] arguments = {

+				gen(nodes, false), genPattern(supplierKey)

+		};	

+		String resultVar = emitFunctionCall(coordinator.stubType, "patternCallStub", arguments);

+		return new Stub<String>(nodes, resultVar);

+	}

+

+

+	public Stub<String> binaryEdgeTypeStub(Tuple nodes, Object supplierKey) {

+		String[] arguments = {

+				gen(nodes, false), declareNewValue("Object", genBinaryEdgeType(supplierKey))

+		};	

+		String resultVar = emitFunctionCall(coordinator.stubType, "binaryEdgeTypeStub", arguments);

+		return new Stub<String>(nodes, resultVar);

+	}

+

+

+	public Stub<String> ternaryEdgeTypeStub(Tuple nodes, Object supplierKey) {

+		String[] arguments = {

+				gen(nodes, false), declareNewValue("Object", genTernaryEdgeType(supplierKey))

+		};	

+		String resultVar = emitFunctionCall(coordinator.stubType, "ternaryEdgeTypeStub", arguments);

+		return new Stub<String>(nodes, resultVar);

+	}

+

+	public String patternCollector(PatternDescription pattern) {

+		String patternName = genPattern(pattern);

+		String[] arguments = {patternName};

+		return emitFunctionCall(coordinator.collectorType, "patternCollector", arguments);

+		//		return coordinator.allocateNewCollector(pattern);

+	}

+	

+//	/**

+//	 * @pre coordinator.isComplete()

+//	 */

+//	public void printInitializer(String collectorsMap, String posMappingMap) {

+//		for (Entry<PatternDescription, String> entry : coordinator.collectors.entrySet()) {

+//			String patternName = genPattern(entry.getKey());

+//			emitLine("// "+patternName);

+//			emitLine(posMappingMap + ".put(" + patternName + ", " +genPosMap(entry.getKey()) + ");");

+//			String[] arguments = {patternName};

+//			String resultVar = emitFunctionCall(coordinator.collectorType, "patternCollector", arguments);

+//			emitLine(entry.getValue() + " = " + resultVar + ";");

+//			emitLine(collectorsMap + ".put(" + patternName + ", " +entry.getValue() + ");");

+//		}

+//	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/CodegenRecordingCoordinator.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/CodegenRecordingCoordinator.java
new file mode 100644
index 0000000..9280c82
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/CodegenRecordingCoordinator.java
@@ -0,0 +1,124 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction;

+

+import java.util.HashMap;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext;

+

+// TODO Output contents of builderCode into files, accompany with PosMapping

+

+/**

+ * 

+ * @author Bergmann Gábor

+ *

+ */

+public class CodegenRecordingCoordinator<PatternDescription> {

+	protected static final String varPrefix = "var";

+	protected static final String buildablePrefix = "buildable";

+	protected static final String collectorPrefix = "production";

+		

+	public Long nextIdentifier; /**/

+	public String stubType; /**/

+	public String collectorType; /**/

+	public String buildableType; /**/

+	HashMap<PatternDescription, StringBuilder> builderCode; /**/

+	// HashMap<PatternDescription, String> collectors; /**/

+	// LinkedHashSet<PatternDescription> unbuilt; /**/

+	public IPatternMatcherContext<PatternDescription> targetContext; /**/

+

+	public CodegenRecordingCoordinator(IPatternMatcherContext<PatternDescription> targetContext,

+			String stubType, String collectorType, String buildableType) 

+	{

+		super();

+		this.targetContext = targetContext;

+		this.nextIdentifier = 0L;

+		this.stubType = stubType;

+		this.collectorType = collectorType;

+		this.buildableType = buildableType;

+		

+		this.builderCode = new HashMap<PatternDescription, StringBuilder>();

+		//this.collectors = new HashMap<PatternDescription, String>();

+		//this.unbuilt = new LinkedHashSet<PatternDescription>();

+		

+	}

+	

+	String newIdentifier(String prefix){

+		return prefix + "_"+(nextIdentifier++).toString();

+	}

+

+	String newVariableIdentifier(){

+		return newIdentifier(varPrefix);

+	}

+	String newBuildableIdentifier(){

+		return newIdentifier(buildablePrefix);

+	}

+	String newCollectorIdentifier(){

+		return newIdentifier(collectorPrefix);

+	}

+	

+	public void emitPatternBuilderLine(PatternDescription effort, String indent, String line) {

+		StringBuilder sb = getBuilder(effort);

+		emitLine(sb, indent, line);

+	}

+	

+	

+	StringBuilder getBuilder(PatternDescription effort) {

+		if (effort == null) 

+			throw new UnsupportedOperationException("Build actions must be put on the tab of a pattern");

+		StringBuilder result = builderCode.get(effort);

+		if (result == null) {

+			result = new StringBuilder();

+			builderCode.put(effort, result);

+		}

+		return result;

+	}

+	

+	private void emitLine(StringBuilder where, String indent, String line) {

+		where.append(indent);

+		where.append(line);

+		where.append(System.getProperty("line.separator"));		

+	}

+	

+	public String getFinishedBuilderCode(PatternDescription pattern) {

+		return builderCode.get(pattern).toString();

+	}

+	public Set<PatternDescription> getBuiltPatterns() {

+		return builderCode.keySet();

+	}

+	

+//	String allocateNewCollector(PatternDescription pattern) {

+//		if (collectors.containsKey(pattern)) 

+//			throw new UnsupportedOperationException("Duplicate production nodes unsupported in RETE code generation");

+//		String prod = newCollectorIdentifier();

+//		collectors.put(pattern, prod);

+//		unbuilt.remove(pattern);

+//		return prod;

+//	}

+	

+//	/**

+//	 * @pre isComplete()

+//	 */

+//	public void printMembers(StringBuilder where, String indent) {

+//		for (String collector : collectors.values()) {

+//			emitLine(where, indent, collectorType + " " + collector + ";");

+//		}

+//	}

+

+//	public boolean isComplete() {

+//		return unbuilt.isEmpty();

+//	}

+//	public PatternDescription nextUnbuilt() {

+//		return unbuilt.iterator().next();	

+//	}	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/IReteLayoutStrategy.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/IReteLayoutStrategy.java
new file mode 100644
index 0000000..8235efd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/IReteLayoutStrategy.java
@@ -0,0 +1,24 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+

+/**

+ * An algorithm that builds a RETE net based on a PSystem. 

+ * @author Bergmann Gábor

+ *

+ */

+public interface IReteLayoutStrategy<PatternDescription, StubHandle, Collector> {

+	public Stub<StubHandle> layout(PSystem<PatternDescription, StubHandle, Collector> pSystem) 

+		throws RetePatternBuildException;

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/IRetePatternBuilder.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/IRetePatternBuilder.java
new file mode 100644
index 0000000..7aea79a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/IRetePatternBuilder.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction;
+
+import java.util.HashMap;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext;
+
+
+
+/**
+ * Exchangeable component of ReteEngine, responsible for building pattern
+ * matcher rete subnets.
+ * 
+ * @author Gabor Bergmann
+ */
+public interface IRetePatternBuilder<PatternDescription, StubHandle, Collector> {
+
+	/**
+	 * Builds a part of the rete network that will match occurences of a given
+	 * pattern.
+	 * 
+	 * @param gtPattern
+	 *            the pattern whose matcher subnet has to be built.
+	 * @return production.
+	 * 	          the Production node that should store matchings of
+	 *            the given pattern.
+	 * @throws RetePatternBuildException
+	 *             if construction fails.
+	 */
+	Collector construct(PatternDescription gtPattern) throws RetePatternBuildException;
+	
+	/**
+	 * Extract the position mapping of the graph pattern.
+	 */
+	HashMap<Object, Integer> getPosMapping(PatternDescription gtPattern);
+	
+//	/**
+//	 * Extends the rete network beyond a production node to 
+//	 * 	further constrain the symbolic parameters with containment scopes.
+//	 * 
+//	 * @param unscopedProduction
+//	 *            the production node to be extended.
+//	 * @param additionalScopeMap
+//	 *            maps the indices of a subset of the symbolic variables to 
+//	 *            the scopes that are to be applied on those variables		
+//	 * @param production
+//	 *            the now-empty Production node that should store matchings of
+//	 *            the given pattern.
+//	 * @return production.
+//	 * @throws PatternMatcherCompileTimeException
+//	 *             if construction fails.
+//	 */
+//	Collector constructScoper(
+//			Address<? extends Production> unscopedProduction,
+//			Map<Integer, Scope> additionalScopeMap,
+//			Collector production)
+//			throws PatternMatcherCompileTimeException;
+	
+//	/**
+//	 * Returns the buildable associated with this builder.
+//	 */
+//	public Buildable<PatternDescription, StubHandle, Collector> getBuildable();
+	/**
+	 * Returns the context associated with this builder.
+	 */
+	public IPatternMatcherContext<PatternDescription> getContext();
+	/**
+	 * After the ReteEngine is reinitialized, the pattern builder has to be
+	 * notified about the change.
+	 */
+	void refresh();
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/ReteContainerBuildable.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/ReteContainerBuildable.java
new file mode 100644
index 0000000..2439b4e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/ReteContainerBuildable.java
@@ -0,0 +1,289 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.AbstractEvaluator;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.PredicateEvaluatorNode;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.ReteBoundary;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.DualInputNode;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.Indexer;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.IterableIndexer;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.ReteEngine;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Library;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Network;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.Address;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.EqualityFilterNode;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.InequalityFilterNode;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.TrimmerNode;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.LeftInheritanceTuple;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util.Options;

+

+

+/**

+ * The buildable interface of a rete container.

+ * 

+ * @author Bergmann Gábor

+ *

+ */

+public class ReteContainerBuildable<PatternDescription> implements Buildable<PatternDescription, Address<? extends Supplier>, Address<? extends Receiver>> {

+

+	protected Library library;

+	protected ReteContainer targetContainer;

+	protected Network reteNet;

+	protected ReteBoundary<PatternDescription> boundary;

+	protected ReteEngine<PatternDescription> engine;

+	protected boolean headAttached = false;

+	

+	/**

+	 * Constructs the builder attached to a specified container.

+	 * Prerequisite: engine has its network and boundary fields initialized.

+	 * @param targetContainer

+	 */

+	public ReteContainerBuildable(ReteEngine<PatternDescription> engine, ReteContainer targetContainer) {

+		super();

+		this.engine = engine;

+		this.reteNet = engine.getReteNet();

+		this.boundary = engine.getBoundary();

+		this.targetContainer = targetContainer;

+		this.library = targetContainer.getLibrary();

+		this.headAttached = false;

+	}

+	/**

+	 * Constructs the builder attached to the head container.

+	 * Prerequisite: engine has its network and boundary fields initialized

+	 */

+	public ReteContainerBuildable(ReteEngine<PatternDescription> engine) {

+		super();

+		this.engine = engine;

+		this.reteNet = engine.getReteNet();

+		this.boundary = engine.getBoundary();

+		this.targetContainer = reteNet.getHeadContainer();

+		this.library = targetContainer.getLibrary();

+		this.headAttached = true;

+	}

+	public void reinitialize() {

+		this.reteNet = engine.getReteNet();

+		this.boundary = engine.getBoundary();

+		this.targetContainer = headAttached ? reteNet.getHeadContainer() : reteNet.getNextContainer();

+		this.library = targetContainer.getLibrary();

+	}

+	

+	public Stub<Address<? extends Supplier>> buildTrimmer(Stub<Address<? extends Supplier>> stub, TupleMask trimMask) { 

+		Address<TrimmerNode> bodyTerminator = library.accessTrimmerNode(stub.getHandle(), trimMask); 

+		return new Stub<Address<? extends Supplier>>(stub, trimMask.transform(stub.getVariablesTuple()), bodyTerminator);

+	}

+

+	public void buildConnection(Stub<Address<? extends Supplier>> stub, Address<? extends Receiver> collector) {

+		reteNet.connectRemoteNodes(stub.getHandle(), collector, true);

+		boundary.registerParentStubForReceiver(collector, stub);

+	}

+

+	public Stub<Address<? extends Supplier>> buildStartStub(Object[] constantValues, Object[] constantNames) {

+		return new Stub<Address<? extends Supplier>>(new FlatTuple(constantNames), 

+			library.accessConstantNode(boundary.wrapTuple(new FlatTuple(constantValues))));

+	}

+

+	public Stub<Address<? extends Supplier>> buildEqualityChecker(Stub<Address<? extends Supplier>> stub, int[] indices) {

+		Address<EqualityFilterNode> checker = library.accessEqualityFilterNode(stub.getHandle(), indices);

+		return new Stub<Address<? extends Supplier>>(stub, checker);

+	}

+

+	public Stub<Address<? extends Supplier>> buildInjectivityChecker(Stub<Address<? extends Supplier>> stub, int subject, int[] inequalIndices) 

+	{

+		Address<InequalityFilterNode> checker = 

+			library.accessInequalityFilterNode(stub.getHandle(), subject, 

+					new TupleMask(inequalIndices, stub.getVariablesTuple().getSize()));

+		return new Stub<Address<? extends Supplier>>(stub, checker);

+	}

+	

+	@Override

+	public Stub<Address<? extends Supplier>> buildTransitiveClosure(Stub<Address<? extends Supplier>> stub) {

+		throw new UnsupportedOperationException("Transitive closure not supported yet");

+// TODO(Tomi) uncomment after library method is implemented

+//		Address<TransitiveClosureNode> checker = library.accessTransitiveClosureNode(stub.getHandle());

+//		return new Stub<Address<? extends Supplier>>(stub, checker);

+	}

+

+	public Stub<Address<? extends Supplier>> patternCallStub(Tuple nodes, PatternDescription supplierKey)

+		throws RetePatternBuildException 

+	{

+		return new Stub<Address<? extends Supplier>>(nodes, boundary.accessProduction(supplierKey));

+	}

+

+	public Stub<Address<? extends Supplier>> instantiationTransitiveStub(Tuple nodes) {

+		return new Stub<Address<? extends Supplier>>(nodes, boundary.accessInstantiationTransitiveRoot());

+	}

+

+	public Stub<Address<? extends Supplier>> instantiationDirectStub(Tuple nodes) {

+		return new Stub<Address<? extends Supplier>>(nodes, boundary.accessInstantiationRoot());

+	}

+

+	public Stub<Address<? extends Supplier>> generalizationTransitiveStub(Tuple nodes) {

+		return new Stub<Address<? extends Supplier>>(nodes, boundary.accessGeneralizationTransitiveRoot());

+	}

+

+	public Stub<Address<? extends Supplier>> generalizationDirectStub(Tuple nodes) {

+		return new Stub<Address<? extends Supplier>>(nodes, boundary.accessGeneralizationRoot());

+	}

+

+	public Stub<Address<? extends Supplier>> containmentTransitiveStub(Tuple nodes) {

+		return new Stub<Address<? extends Supplier>>(nodes, boundary.accessContainmentTransitiveRoot());

+	}

+

+	public Stub<Address<? extends Supplier>> containmentDirectStub(Tuple nodes) {

+		return new Stub<Address<? extends Supplier>>(nodes, boundary.accessContainmentRoot());

+	}

+

+	public Stub<Address<? extends Supplier>> binaryEdgeTypeStub(Tuple nodes, Object supplierKey) {

+		return new Stub<Address<? extends Supplier>>(nodes, boundary.accessBinaryEdgeRoot(supplierKey));

+	}

+

+	public Stub<Address<? extends Supplier>> ternaryEdgeTypeStub(Tuple nodes, Object supplierKey) {

+		return new Stub<Address<? extends Supplier>>(nodes, boundary.accessTernaryEdgeRoot(supplierKey));

+	}

+

+	public Stub<Address<? extends Supplier>> unaryTypeStub(Tuple nodes, Object supplierKey) {

+		return new Stub<Address<? extends Supplier>>(nodes, boundary.accessUnaryRoot(supplierKey));

+	}

+

+	public Stub<Address<? extends Supplier>> buildBetaNode(

+			Stub<Address<? extends Supplier>> primaryStub, 

+			Stub<Address<? extends Supplier>> sideStub, 

+			TupleMask primaryMask,

+			TupleMask sideMask, 

+			TupleMask complementer, 

+			boolean negative) 

+			{

+				Address<? extends IterableIndexer> primarySlot = library.accessProjectionIndexer(primaryStub.getHandle(),primaryMask);

+				Address<? extends Indexer> sideSlot = library.accessProjectionIndexer(sideStub.getHandle(), sideMask);

+			

+				if (negative) {

+					Address<? extends DualInputNode> checker = library.accessExistenceNode(primarySlot, sideSlot, true);

+					return new Stub<Address<? extends Supplier>>(primaryStub, checker);

+				} else {

+					Address<? extends DualInputNode> checker = library.accessJoinNode(primarySlot, sideSlot, complementer);

+					Tuple newCalibrationPattern = complementer.combine(

+							primaryStub.getVariablesTuple(), 

+							sideStub.getVariablesTuple(), 

+							Options.enableInheritance, true);

+					return new Stub<Address<? extends Supplier>>(primaryStub, sideStub, newCalibrationPattern, checker);

+				}			

+			}

+	

+	public Stub<Address<? extends Supplier>> buildCounterBetaNode(

+			Stub<Address<? extends Supplier>> primaryStub, 

+			Stub<Address<? extends Supplier>> sideStub, 

+			TupleMask primaryMask,

+			TupleMask originalSideMask,

+			TupleMask complementer,

+			Object aggregateResultCalibrationElement)  

+			{

+				Address<? extends IterableIndexer> primarySlot = library.accessProjectionIndexer(primaryStub.getHandle(),primaryMask);

+				Address<? extends Indexer> sideSlot = library.accessCountOuterIndexer(sideStub.getHandle(), originalSideMask);

+			

+				Address<? extends DualInputNode> checker = library

+						.accessJoinNode(primarySlot, sideSlot, 

+								TupleMask.selectSingle(originalSideMask.indices.length, originalSideMask.indices.length+1));

+						

+				Object[] newCalibrationElement = {aggregateResultCalibrationElement}; 

+				Tuple newCalibrationPattern = new LeftInheritanceTuple(primaryStub.getVariablesTuple(), newCalibrationElement);

+			

+				Stub<Address<? extends Supplier>> result = new Stub<Address<? extends Supplier>>(primaryStub, newCalibrationPattern, checker);

+			

+				return result;

+			}	

+	public Stub<Address<? extends Supplier>> buildCountCheckBetaNode(

+			Stub<Address<? extends Supplier>> primaryStub, 

+			Stub<Address<? extends Supplier>> sideStub, 

+			TupleMask primaryMask,

+			TupleMask originalSideMask,

+			int resultPositionInSignature) 

+			{

+				Address<? extends IterableIndexer> primarySlot = library.accessProjectionIndexer(primaryStub.getHandle(),primaryMask);

+				Address<? extends Indexer> sideSlot = library.accessCountOuterIdentityIndexer(sideStub.getHandle(), originalSideMask, resultPositionInSignature);

+			

+				Address<? extends DualInputNode> checker = library

+						.accessJoinNode(primarySlot, sideSlot, TupleMask.empty(originalSideMask.indices.length+1));

+						

+				Tuple newCalibrationPattern = primaryStub.getVariablesTuple();

+			

+				Stub<Address<? extends Supplier>> result = new Stub<Address<? extends Supplier>>(primaryStub, newCalibrationPattern, checker);

+			

+				return result;

+			}

+

+	public Stub<Address<? extends Supplier>> buildPredicateChecker(

+			AbstractEvaluator evaluator, 

+			Integer rhsIndex, 

+			int[] affectedIndices,

+			Stub<Address<? extends Supplier>> stub

+		) 

+	{

+		PredicateEvaluatorNode ten =  new PredicateEvaluatorNode(engine, targetContainer, 

+				rhsIndex, affectedIndices, stub.getVariablesTuple().getSize(), evaluator);

+		Address<PredicateEvaluatorNode> checker = Address.of(ten);

+		

+		reteNet.connectRemoteNodes(stub.getHandle(), checker, true);

+		

+		Stub<Address<? extends Supplier>> result = new Stub<Address<? extends Supplier>>(stub, checker);

+		

+		return result;

+	}	

+	

+	/**

+	 * @return a buildable that potentially acts on a separate container

+	 */

+	public ReteContainerBuildable<PatternDescription> getNextContainer() {

+		return new ReteContainerBuildable<PatternDescription>(engine, reteNet.getNextContainer());

+	}

+	

+	public Stub<Address<? extends Supplier>> buildScopeConstrainer(Stub<Address<? extends Supplier>> stub, boolean transitive,

+			Object unwrappedContainer, int constrainedIndex) {

+		Address<? extends Supplier> root = (transitive) ?

+			boundary.accessContainmentTransitiveRoot() :

+			boundary.accessContainmentRoot();

+		// bind the container element

+		Address<? extends Supplier> filteredRoot = 

+			targetContainer.getLibrary().accessValueBinderFilterNode(root, 0/*container*/, boundary.wrapElement(unwrappedContainer));

+		// build secondary indexer

+		int[] secondaryIndices = {1/*contained element*/};

+		Address<? extends Indexer> secondary = 

+			targetContainer.getLibrary().accessProjectionIndexer(filteredRoot, new TupleMask(secondaryIndices, 2));

+		// build primary indexer

+		int[] primaryIndices = {constrainedIndex};

+		TupleMask primaryMask = new TupleMask(primaryIndices, stub.getVariablesTuple().getSize());

+		Address<? extends IterableIndexer> primary = targetContainer.getLibrary().accessProjectionIndexer(stub.getHandle(), primaryMask);

+		// build checker

+		stub = new Stub<Address<? extends Supplier>>(stub, targetContainer.getLibrary().accessExistenceNode(primary, secondary, false));

+		return stub;

+	}

+

+

+	public Address<? extends Receiver> patternCollector(PatternDescription pattern) throws RetePatternBuildException {

+		return engine.getBoundary().createProductionInternal(pattern);

+	}

+	

+	/**

+	 * No need to distinguish

+	 */

+	public ReteContainerBuildable<PatternDescription> putOnTab(PatternDescription effort) {

+		return this;

+	}

+	

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/RetePatternBuildException.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/RetePatternBuildException.java
new file mode 100644
index 0000000..d597ac5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/RetePatternBuildException.java
@@ -0,0 +1,88 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction;

+

+

+/**

+ * A problem has occured during the construction of the RETE net.

+ * 

+ * @author Bergmann Gábor

+ *

+ */

+public class RetePatternBuildException extends Exception {

+

+	/**

+	 * 

+	 */

+	private static final long serialVersionUID = -2424538150959407887L;

+

+	private Object patternDescription;

+	private String templateMessage;

+	private String[] templateContext;

+	

+	/**

+	 * @param message The template of the exception message

+	 * @param context The data elements to be used to instantiate the template. Can be null if no context parameter is defined

+	 * @param patternDescription the PatternDescription where the exception occurred

+	 */

+	public RetePatternBuildException(String message, String[] context, Object patternDescription) {

+		super(bind(message, context));		

+		this.patternDescription = patternDescription;

+		this.templateMessage = message;

+		this.templateContext = context;

+	}

+	

+	/**

+	 * @param message The template of the exception message

+	 * @param context The data elements to be used to instantiate the template. Can be null if no context parameter is defined

+	 * @param patternDescription the PatternDescription where the exception occurred

+	 */

+	public RetePatternBuildException(String message, String[] context, Object patternDescription, Throwable cause) {

+		super(bind(message, context), cause);		

+		this.patternDescription = patternDescription;

+		this.templateMessage = message;

+		this.templateContext = context;

+	}

+

+	public Object getPatternDescription() {

+		return patternDescription;

+	}

+	public void setPatternDescription(Object patternDescription) {

+		this.patternDescription = patternDescription;

+	}	

+

+	public String getTemplateMessage() {

+		return templateMessage;

+	}

+

+	public String[] getTemplateContext() {

+		return templateContext;

+	}

+

+	/**

+	 * Binding the '{n}' (n = 1..N) strings to contextual conditions in 'context'

+	 * @param context : array of context-sensitive Strings

+	 */

+	private static String bind(String message, String[] context) {

+		String additionalError = "";

+		

+		if(context == null) return message;

+		

+		for(int i = 0; i<context.length; i++){

+			message = message.replace("{"+(i+1)+"}", context[i]!= null? context[i] : "<<null>>");

+			//error handling in case there is a null value in the context array

+			if(context[i] == null)

+				additionalError = "[INTERNAL ERROR] A name value in the GTASM model is null. \n\n";

+		}

+		return additionalError+message;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/Stub.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/Stub.java
new file mode 100644
index 0000000..0bae13d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/Stub.java
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction;
+
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+
+/**
+ * 
+ * @author Bergmann Gábor
+ *
+ * @param <HandleType> the buildable-specific representation of RETE node handle this stub type will augment
+ */
+public class Stub<HandleType> {
+	private HandleType handle;
+	private Tuple variablesTuple;
+	private Map<Object, Integer> variablesIndex;
+	private Set<PConstraint> constraints;
+	private Stub<HandleType> primaryParentStub;
+	private Stub<HandleType> secondaryParentStub;
+
+	private Stub(Map<Object, Integer> variablesIndex, Tuple variablesTuple, HandleType handle) {
+		super();
+		this.variablesIndex = variablesIndex;
+		this.variablesTuple = variablesTuple;
+		this.handle = handle;
+		this.constraints = new HashSet<PConstraint>();
+	}
+	public Stub(Tuple variablesTuple, HandleType handle) {
+		this(variablesTuple.invertIndex(), variablesTuple, handle);
+	}
+//	public Stub(Stub<HandleType> template) {
+//		this(template.variablesIndex, template.variablesTuple, template.getHandle());
+//	}	
+	public Stub(Stub<HandleType> primaryParent, HandleType handle) {
+		this(primaryParent.variablesIndex, primaryParent.variablesTuple, handle);
+		this.primaryParentStub = primaryParent;
+		constraints.addAll(primaryParent.getAllEnforcedConstraints());
+	}	
+	public Stub(Stub<HandleType> primaryParent, Tuple variablesTuple, HandleType handle) {
+		this(variablesTuple.invertIndex(), variablesTuple, handle);
+		this.primaryParentStub = primaryParent;
+		constraints.addAll(primaryParent.getAllEnforcedConstraints());
+	}	
+	public Stub(Stub<HandleType> primaryParent, Stub<HandleType> secondaryParent, Tuple variablesTuple, HandleType handle) {
+		this(variablesTuple.invertIndex(), variablesTuple, handle);
+		this.primaryParentStub = primaryParent;
+		this.secondaryParentStub = secondaryParent;
+		constraints.addAll(primaryParent.getAllEnforcedConstraints());
+		constraints.addAll(secondaryParent.getAllEnforcedConstraints());
+	}	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString() {
+		StringBuilder sb = new StringBuilder("Stub("+getVariablesTuple()+"@"+getHandle()+"|");
+		for (PConstraint constraint : constraints) sb.append(constraint.toString() + "&");
+		sb.append(")");
+		return sb.toString();
+	}
+	/**
+	 * @return the tuple of variables that define the schame emanating from the handle
+	 */
+	public Tuple getVariablesTuple() {
+		return variablesTuple;
+	}
+	/**
+	 * @return the handle of a RETE supplier node that hosts a certain relation (set of tuples)  
+	 */
+	public HandleType getHandle() {
+		return handle;
+	}
+	/**
+	 * @return the index of the variable within variablesTuple
+	 */
+	public Map<Object, Integer> getVariablesIndex() {
+		return variablesIndex;
+	}
+	/**
+	 * @return the set of variables involved
+	 */
+	public Set<Object> getVariablesSet() {
+		return variablesIndex.keySet();
+	}	
+	/**
+	 * @return all constraints already enforced at this handle
+	 */
+	public Set<PConstraint> getAllEnforcedConstraints() {
+		return constraints;
+	}
+	/**
+	 * @return the new constraints enforced at this handle, that aren't yet enforced at parents
+	 */
+	public Set<PConstraint> getDeltaEnforcedConstraints() {
+		Set<PConstraint> result = new HashSet<PConstraint>(constraints);
+		if (primaryParentStub != null) result.removeAll(primaryParentStub.getAllEnforcedConstraints());
+		if (secondaryParentStub != null) result.removeAll(secondaryParentStub.getAllEnforcedConstraints());
+		return result;
+	}
+	/**
+	 * @return the constraints
+	 */
+	public void addConstraint(PConstraint constraint) {
+		constraints.add(constraint);
+	}
+	/**
+	 * @return the primaryParentStub
+	 */
+	public Stub<HandleType> getPrimaryParentStub() {
+		return primaryParentStub;
+	}
+	/**
+	 * @return the secondaryParentStub
+	 */
+	public Stub<HandleType> getSecondaryParentStub() {
+		return secondaryParentStub;
+	}	
+	
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/basiclinear/BasicLinearLayout.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/basiclinear/BasicLinearLayout.java
new file mode 100644
index 0000000..cc4ddfe
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/basiclinear/BasicLinearLayout.java
@@ -0,0 +1,135 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.basiclinear;

+

+import java.util.Collections;

+import java.util.HashSet;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Buildable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.IReteLayoutStrategy;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.helpers.BuildHelper;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.helpers.LayoutHelper;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.DeferredPConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.EnumerablePConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util.Options;

+

+/**

+ * Basic layout that builds a linear RETE net based on a heuristic ordering of constraints. 

+ * @author Bergmann Gábor

+ *

+ */

+public class BasicLinearLayout<PatternDescription, StubHandle, Collector> implements IReteLayoutStrategy<PatternDescription, StubHandle, Collector> {

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.IReteLayoutStrategy#layout(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem)

+	 */

+	@Override

+	public Stub<StubHandle> layout(final PSystem<PatternDescription, StubHandle, Collector> pSystem)

+		throws RetePatternBuildException 

+	{

+		PatternDescription pattern = pSystem.getPattern();

+		IPatternMatcherContext<PatternDescription> context = pSystem.getContext();

+		Buildable<PatternDescription, StubHandle, Collector> buildable = pSystem.getBuildable();

+		try {

+			

+			context.logDebug(getClass().getSimpleName() + ": patternbody build started");

+			

+			// UNIFICATION AND WEAK INEQUALITY ELMINATION

+			LayoutHelper.unifyVariablesAlongEqualities(pSystem);

+			LayoutHelper.eliminateWeakInequalities(pSystem);

+		

+			// UNARY ELIMINATION WITH TYPE INFERENCE

+			if (Options.calcImpliedTypes) {

+				LayoutHelper.eliminateInferrableUnaryTypes(pSystem, context);

+			}

+			

+			// PREVENTIVE CHECKS

+			LayoutHelper.checkSanity(pSystem);

+					

+			// STARTING THE LINE

+			Stub<StubHandle> stub = buildable.buildStartStub(new Object[]{}, new Object[]{});

+			

+//			Set<ConstantValue> constants = pSystem.getConstraintsOfType(ConstantValue.class);

+//			for (ConstantValue<PatternDescription, StubHandle> pConstraint : constants) {

+//				Stub<StubHandle> sideStub = pConstraint.doCreateStub();

+//				stub = BuildHelper.naturalJoin(buildable, stub, sideStub);

+//			}

+			

+			Set<PConstraint> pQueue = new HashSet<PConstraint>(pSystem.getConstraints()); //TreeSet<PConstraint>(new OrderingHeuristics());

+//			pQueue.addAll(pSystem.getConstraintsOfType(EnumerablePConstraint.class));

+//			pQueue.addAll(pSystem.getConstraintsOfType(DeferredPConstraint.class));

+//			// omitted: symbolic & equality -- not anymore

+			

+			// MAIN LOOP

+			while (!pQueue.isEmpty()) {

+				PConstraint pConstraint = 

+					Collections.min(pQueue, 

+						new OrderingHeuristics<PatternDescription, StubHandle, Collector>(stub)); //pQueue.iterator().next();

+				pQueue.remove(pConstraint);

+

+				if (pConstraint instanceof EnumerablePConstraint<?, ?>) {

+					EnumerablePConstraint<PatternDescription,StubHandle> enumerable = 

+						(EnumerablePConstraint<PatternDescription,StubHandle>) pConstraint;

+					Stub<StubHandle> sideStub = enumerable.getStub();

+					stub = BuildHelper.naturalJoin(buildable, stub, sideStub);

+				} else {

+					DeferredPConstraint<PatternDescription, StubHandle> deferred = 

+						(DeferredPConstraint<PatternDescription, StubHandle>) pConstraint;

+					if (deferred.isReadyAt(stub)) {

+						stub = deferred.checkOn(stub);

+					} else {

+						deferred.raiseForeverDeferredError(stub);

+					}

+				}

+			}

+			

+			// FINAL CHECK, whether all exported variables are present

+			LayoutHelper.finalCheck(pSystem, stub);

+			

+

+//			// output

+//			int paramNum = patternScaffold.gtPattern.getSymParameters().size();

+//			int[] tI = new int[paramNum];

+//			int tiW = stub.getVariablesTuple().getSize();

+//			for (int i = 0; i < paramNum; i++) {

+//				PatternVariable variable = patternScaffold.gtPattern.getSymParameters().get(i);

+//				// for (Object o : variable.getElementInPattern()) // in all bodies

+//				// {

+//				PatternNodeBase pNode = pGraph.getPNode(variable);

+//				// if (stub.calibrationIndex.containsKey(pNode))

+//				tI[i] = stub.getVariablesIndex().get(pNode);

+//				// }

+//			}

+//			TupleMask trim = new TupleMask(tI, tiW);

+//			Stub<StubHandle> trimmer = buildable.buildTrimmer(stub, trim);

+//			buildable.buildConnection(trimmer, collector);

+

+			context.logDebug(getClass().getSimpleName() + ": patternbody build concluded");

+	

+			return stub;

+			

+		} catch (RetePatternBuildException ex) {

+			ex.setPatternDescription(pattern);

+			throw ex;

+		}	

+	}

+

+

+

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/basiclinear/OrderingHeuristics.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/basiclinear/OrderingHeuristics.java
new file mode 100644
index 0000000..3f7e8fd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/basiclinear/OrderingHeuristics.java
@@ -0,0 +1,95 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.basiclinear;

+

+import java.util.Comparator;

+import java.util.HashSet;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.DeferredPConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.EnumerablePConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables.ConstantValue;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util.OrderingCompareAgent;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class OrderingHeuristics<PatternDescription, StubHandle, Collector> implements Comparator<PConstraint>  {

+	private Stub<StubHandle> stub;

+

+	/**

+	 * @param stub

+	 */

+	public OrderingHeuristics(Stub<StubHandle> stub) {

+		super();

+		this.stub = stub;

+	}

+		

+	/* (non-Javadoc)

+	 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)

+	 */

+	@Override

+	public int compare(PConstraint o1, PConstraint o2) {

+		return new OrderingCompareAgent<PConstraint>(o1, o2) {

+			@Override

+			protected void doCompare() {

+				boolean temp = true

+				&& consider(preferTrue(isConstant(a), isConstant(b)))

+				&& consider(preferTrue(isReady(a), isReady(b)))

+				;

+				if (!temp) return;

+				

+				Set<PVariable> bound1 = boundVariables(a);

+				Set<PVariable> bound2 = boundVariables(b);

+				swallowBoolean(temp 				

+				&& consider(preferTrue(isBound(a, bound1), isBound(b, bound2)))

+				&& consider(preferMore(degreeBound(a, bound1), degreeBound(b, bound2)))

+				&& consider(preferLess(degreeFree(a, bound1), degreeFree(b, bound2)))

+				

+				&& consider(preferLess(a.toString(), b.toString()))

+				);

+			}		

+		}.compare();

+	}

+

+

+	

+	boolean isConstant(PConstraint o) {

+		return (o instanceof ConstantValue<?, ?>); 

+	}

+	boolean isReady(PConstraint o) {

+		return 

+			(o instanceof EnumerablePConstraint<?, ?>) || 

+			(o instanceof DeferredPConstraint<?, ?> && 

+					((DeferredPConstraint<PatternDescription, StubHandle>) o).isReadyAt(stub)); 

+	}

+	Set<PVariable> boundVariables(PConstraint o) {

+		Set<PVariable> boundVariables = new HashSet<PVariable>(o.getAffectedVariables());

+		boundVariables.retainAll(stub.getVariablesIndex().keySet());

+		return boundVariables;

+	}

+	boolean isBound(PConstraint o, Set<PVariable> boundVariables) {

+		return boundVariables.size() == o.getAffectedVariables().size();

+	}

+	int degreeBound(PConstraint o, Set<PVariable> boundVariables) {

+		return boundVariables.size();

+	}

+	int degreeFree(PConstraint o, Set<PVariable> boundVariables) {

+		return o.getAffectedVariables().size() - boundVariables.size();

+	}

+

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/helpers/BuildHelper.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/helpers/BuildHelper.java
new file mode 100644
index 0000000..dc24ad7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/helpers/BuildHelper.java
@@ -0,0 +1,161 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.helpers;

+

+import java.util.List;

+import java.util.Map;

+import java.util.Set;

+import java.util.TreeSet;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Buildable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class BuildHelper {

+

+	/**

+	 * If two or more variables are the same in the variablesTuple of the stub, then a checker node is built to enforce their equality. 

+	 * @return the derived stub that contains the additional checkers, or the original if no action was neccessary.

+	 */

+	public static <StubHandle> Stub<StubHandle> enforceVariableCoincidences(Buildable<?, StubHandle, ?> buildable, Stub<StubHandle> stub)  {

+		Map<Object, List<Integer>> indexWithMupliplicity = 

+			stub.getVariablesTuple().invertIndexWithMupliplicity();

+		for (Map.Entry<Object, List<Integer>> pVariableIndices : indexWithMupliplicity.entrySet()) {

+			List<Integer> indices = pVariableIndices.getValue();

+			if (indices.size() > 1) { 

+				int[] indexArray = new int[indices.size()];

+				int m = 0;

+				for (Integer index : indices)

+					indexArray[m++] = index;

+				stub = buildable.buildEqualityChecker(stub, indexArray);

+				// TODO also trim here?

+			}

+		}

+		return stub;

+		

+	}

+	

+	/**

+	 * Trims the results in the stub into a collector, by selecting exported variables in a particular order.

+	 * @return the derived stub that contains the additional checkers, or the original if no action was neccessary.

+	 */

+	public static <StubHandle, Collector> void projectIntoCollector(

+			Buildable<?, StubHandle, Collector> buildable, 

+			Stub<StubHandle> stub, Collector collector,

+			PVariable[] selectedVariables)  

+	{

+		int paramNum = selectedVariables.length;

+		int[] tI = new int[paramNum];

+		for (int i = 0; i < paramNum; i++) {

+			tI[i] = stub.getVariablesIndex().get(selectedVariables[i]);

+		}

+		int tiW = stub.getVariablesTuple().getSize();

+		TupleMask trim = new TupleMask(tI, tiW);

+		Stub<StubHandle> trimmer = buildable.buildTrimmer(stub, trim);

+		buildable.buildConnection(trimmer, collector);

+	}

+	

+	/**

+	 * Calculated index mappings for a join, based on the common variables of the two parent stubs.

+	 * @author Bergmann Gábor

+	 * 

+	 */

+	public static class JoinHelper<StubHandle> {

+		private TupleMask primaryMask;

+		private TupleMask secondaryMask;

+		private TupleMask complementerMask;

+		

+		/**

+		 * @pre enforceVariableCoincidences() has been called on both sides.

+		 * @param primaryStub

+		 * @param secondaryStub

+		 */

+		public JoinHelper(Stub<StubHandle> primaryStub, Stub<StubHandle> secondaryStub) {

+			super();

+			

+			Set<PVariable> primaryVariables = 

+				primaryStub.getVariablesTuple().getDistinctElements();

+			Set<PVariable> secondaryVariables = 

+				secondaryStub.getVariablesTuple().getDistinctElements();

+			int oldNodes = 0;

+			Set<Integer> introducingSecondaryIndices = new TreeSet<Integer>();

+			for (PVariable var : secondaryVariables) {

+				if (primaryVariables.contains(var)) oldNodes++;

+				else introducingSecondaryIndices.add(secondaryStub.getVariablesIndex().get(var));

+			}

+			int[] primaryIndices = new int[oldNodes];

+			final int[] secondaryIndices = new int[oldNodes];

+			int k = 0;

+			for (PVariable var : secondaryVariables) {

+				if (primaryVariables.contains(var)) {

+					primaryIndices[k] = primaryStub.getVariablesIndex().get(var);

+					secondaryIndices[k] = secondaryStub.getVariablesIndex().get(var);

+					k++;

+				}

+			}

+			int[] complementerIndices = new int[introducingSecondaryIndices.size()];

+			int l = 0;

+			for (Integer integer : introducingSecondaryIndices) {

+				complementerIndices[l++] = integer;

+			}

+			primaryMask = new TupleMask(

+					primaryIndices, 

+					primaryStub.getVariablesTuple().getSize());

+			secondaryMask = new TupleMask(

+					secondaryIndices, 

+					secondaryStub.getVariablesTuple().getSize()); 

+			complementerMask = new TupleMask(

+					complementerIndices,

+					secondaryStub.getVariablesTuple().getSize());

+	

+		}

+		/**

+		 * @return the primaryMask

+		 */

+		public TupleMask getPrimaryMask() {

+			return primaryMask;

+		}

+		/**

+		 * @return the secondaryMask

+		 */

+		public TupleMask getSecondaryMask() {

+			return secondaryMask;

+		}

+		/**

+		 * @return the complementerMask

+		 */

+		public TupleMask getComplementerMask() {

+			return complementerMask;

+		}

+		

+	}

+	

+	public static <StubHandle> Stub<StubHandle> naturalJoin(

+			Buildable<?, StubHandle, ?> buildable,

+			Stub<StubHandle> primaryStub, Stub<StubHandle> secondaryStub) 

+	{

+		JoinHelper<StubHandle> joinHelper = new JoinHelper<StubHandle>(primaryStub, secondaryStub);

+		return buildable.buildBetaNode(

+				primaryStub, secondaryStub, 

+				joinHelper.getPrimaryMask(), 

+				joinHelper.getSecondaryMask(), 

+				joinHelper.getComplementerMask(), 

+				false);

+	}

+

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/helpers/LayoutHelper.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/helpers/LayoutHelper.java
new file mode 100644
index 0000000..9f3f0c6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/helpers/LayoutHelper.java
@@ -0,0 +1,150 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.helpers;

+

+import java.util.Collections;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.ITypeInfoProviderConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicdeferred.Equality;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicdeferred.ExportedParameter;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicdeferred.Inequality;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables.TypeUnary;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class LayoutHelper {

+

+	/**

+	 * Unifies allVariables along equalities so that they can be handled as one.

+	 * @param pSystem

+	 */

+	public static <PatternDescription, StubHandle, Collector> void unifyVariablesAlongEqualities(

+			PSystem<PatternDescription, StubHandle, Collector> pSystem) 

+	{

+		Set<Equality> equals = pSystem.getConstraintsOfType(Equality.class);

+		for (Equality<PatternDescription, StubHandle> equality : equals) {

+			if (!equality.isMoot()) {

+				equality.getWho().unifyInto(equality.getWithWhom());

+			}

+			// equality.delete();

+		}

+	}

+

+	/**

+	 * Eliminates weak inequalities if they are not substantiated.

+	 * @param pSystem

+	 */

+	public static <PatternDescription, StubHandle, Collector> void eliminateWeakInequalities(

+			PSystem<PatternDescription, StubHandle, Collector> pSystem) 

+	{

+		for (Inequality inequality : pSystem.getConstraintsOfType(Inequality.class)) inequality.eliminateWeak();

+	}

+	

+	/**

+	 * Eliminates all unary type constraints that are inferrable from other constraints.

+	 */

+	public static <PatternDescription, StubHandle, Collector> void eliminateInferrableUnaryTypes(

+			final PSystem<PatternDescription, StubHandle, Collector> pSystem,

+			IPatternMatcherContext<PatternDescription> context) 

+	{

+		Set<TypeUnary> constraintsOfType = pSystem.getConstraintsOfType(TypeUnary.class);

+		for (TypeUnary<PatternDescription, StubHandle> typeUnary : constraintsOfType) {

+			PVariable var = (PVariable) typeUnary.getVariablesTuple().get(0);

+			Object expressedType = typeUnary.getTypeInfo(var);

+			Set<ITypeInfoProviderConstraint> typeRestrictors = var.getReferringConstraintsOfType(ITypeInfoProviderConstraint.class);

+			typeRestrictors.remove(typeUnary);

+			for (ITypeInfoProviderConstraint iTypeRestriction : typeRestrictors) {

+				Object typeInfo = iTypeRestriction.getTypeInfo(var);

+				if (typeInfo != ITypeInfoProviderConstraint.TypeInfoSpecials.NO_TYPE_INFO_PROVIDED) {

+					Set<Object> typeClosure = 

+						TypeHelper.typeClosure(Collections.singleton(typeInfo), context);

+					if (typeClosure.contains(expressedType)) {

+						typeUnary.delete();								

+						break;

+					}

+				}

+			}

+		}

+	}

+	

+	/**

+	 * Verifies the sanity of all constraints. Should be issued as a preventive check before layouting.

+	 * @param pSystem

+	 * @throws RetePatternBuildException 

+	 */

+	public static <PatternDescription, StubHandle, Collector> void checkSanity(

+			PSystem<PatternDescription, StubHandle, Collector> pSystem) throws RetePatternBuildException 

+	{

+		for (PConstraint pConstraint : pSystem.getConstraints()) pConstraint.checkSanity();

+	}

+	

+	/**

+	 * Finds an arbitrary constraint that is not enforced at the given stub.

+	 * @param <PatternDescription>

+	 * @param <StubHandle>

+	 * @param <Collector>

+	 * @param pSystem

+	 * @param stub

+	 * @return a PConstraint that is not enforced, if any, or null if all are enforced

+	 */

+	public static <PatternDescription, StubHandle, Collector> PConstraint getAnyUnenforcedConstraint(

+			PSystem<PatternDescription, StubHandle, Collector> pSystem, 

+			Stub<StubHandle> stub) 

+	{

+		Set<PConstraint> allEnforcedConstraints = stub.getAllEnforcedConstraints();

+		Set<PConstraint> constraints = pSystem.getConstraints();

+		for (PConstraint pConstraint : constraints) {

+			if (!allEnforcedConstraints.contains(pConstraint)) return pConstraint;

+		}

+		return null;

+	}

+

+	

+	/**

+	 * Verifies whether all constraints are enforced and exported parameters are present.

+	 * @param pSystem

+	 * @param stub

+	 * @throws RetePatternBuildException

+	 */

+	public static <PatternDescription, StubHandle, Collector> void finalCheck(

+			final PSystem<PatternDescription, StubHandle, Collector> pSystem,

+			Stub<StubHandle> stub) 

+		throws RetePatternBuildException 

+	{

+		PConstraint unenforcedConstraint = getAnyUnenforcedConstraint(pSystem, stub);

+		if (unenforcedConstraint != null) {

+			throw new RetePatternBuildException(

+					"Pattern matcher construction terminated without successfully enforcing constraint {1}.", 

+					new String[]{unenforcedConstraint.toString()}, null);

+		}

+		for (ExportedParameter<PatternDescription, StubHandle> export : 

+			pSystem.getConstraintsOfType(ExportedParameter.class)) 

+		{

+			if (!export.isReadyAt(stub)) { 

+				throw new RetePatternBuildException(

+						"Exported parameter {1} was lost during construction.", 

+						new String[]{export.getParameterName()}, null);

+			}

+		}

+	}

+

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/helpers/TypeHelper.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/helpers/TypeHelper.java
new file mode 100644
index 0000000..b52e09e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/helpers/TypeHelper.java
@@ -0,0 +1,87 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.helpers;

+

+import java.util.Collection;

+import java.util.HashSet;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.ITypeInfoProviderConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class TypeHelper {

+

+	/**

+	 * Infers type information for the given variable, based on the given constraints. 

+	 * Generalization and subsumptions are not taken into account. 

+	 * @param pVariable the variable to infer types for

+	 * @param constraints the set of constraints to extract type info from

+	 */

+	public static Set<Object> inferTypes(PVariable pVariable, Set<PConstraint> constraints) {

+		Set<Object> inferredTypes = new HashSet<Object>();

+		for (PConstraint pConstraint : constraints) {

+			if (pConstraint instanceof ITypeInfoProviderConstraint) {

+				Object typeInfo = ((ITypeInfoProviderConstraint) pConstraint).getTypeInfo(pVariable);

+				if (typeInfo != ITypeInfoProviderConstraint.TypeInfoSpecials.NO_TYPE_INFO_PROVIDED) 

+					inferredTypes.add(typeInfo);

+			}

+		}

+		return inferredTypes;

+	}

+

+	/**

+	 * Calculates the closure of a set of types, with respect to supertyping.

+	 * @return the set of all types in typesToClose and all their direct and indirect supertypes

+	 */

+	public static Set<Object> typeClosure(Set<Object> typesToClose, IPatternMatcherContext<?> context) {

+		Set<Object> closure = new HashSet<Object>(typesToClose);

+		Set<Object> delta = closure;

+		while(!delta.isEmpty()) {

+			Set<Object> newTypes = new HashSet<Object>();

+			for (Object deltaType : delta) {

+				if (deltaType instanceof ITypeInfoProviderConstraint.TypeInfoSpecials) continue;

+				if (context.isUnaryType(deltaType)) newTypes.add(ITypeInfoProviderConstraint.TypeInfoSpecials.ANY_UNARY);

+				if (context.isTernaryEdgeType(deltaType)) newTypes.add(ITypeInfoProviderConstraint.TypeInfoSpecials.ANY_TERNARY);

+				Collection<? extends Object> directSupertypes = context.enumerateDirectSupertypes(deltaType);

+				newTypes.addAll(directSupertypes);

+			}

+			newTypes.removeAll(closure);

+			delta = newTypes;

+			closure.addAll(delta);

+		}

+		return closure;

+	}

+

+	/**

+	 * Calculates a remainder set of types from a larger set, that are not subsumed by a given set of subsuming types.

+	 * @param subsumableTypes a set of types from which some may be implied by the subsming types

+	 * @param subsumingTypes a set of types that may imply some of the subsming types

+	 * @return  the collection of types in subsumableTypes that are NOT identical to or supertypes of any type in subsumingTypes.

+	 */

+	public static Set<Object> subsumeTypes(

+			Set<Object> subsumableTypes,

+			Set<Object> subsumingTypes, 

+			IPatternMatcherContext<?> context) 

+	{

+		Set<Object> closure = typeClosure(subsumingTypes, context);

+		Set<Object> subsumed = new HashSet<Object>(subsumableTypes);

+		subsumed.removeAll(closure);

+		return subsumed;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/BasePConstraint.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/BasePConstraint.java
new file mode 100644
index 0000000..6384d7a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/BasePConstraint.java
@@ -0,0 +1,87 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem;

+

+import java.util.HashSet;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Buildable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public abstract class BasePConstraint<PatternDescription, StubHandle> implements PConstraint {

+	protected PSystem<PatternDescription, StubHandle, ?> pSystem;

+	protected Buildable<PatternDescription, StubHandle, ?> buildable;

+	private Set<PVariable> affectedVariables;

+

+	/**

+	 * @param affectedVariables

+	 */

+	public BasePConstraint(PSystem<PatternDescription, StubHandle, ?> pSystem, Set<PVariable> affectedVariables) {

+		super();

+		this.pSystem = pSystem;

+		this.buildable = pSystem.getBuildable();

+		this.affectedVariables = new HashSet<PVariable>(affectedVariables);

+		

+		for (PVariable pVariable : affectedVariables) {

+			pVariable.refer(this);

+		}

+		pSystem.registerConstraint(this);

+	}

+	@Override

+	public String toString() {

+		return "PC["+getClass().getSimpleName()+":"+toStringRest()+"]";

+	}

+	protected abstract String toStringRest();

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint#getAffectedVariables()

+	 */

+	@Override

+	public Set<PVariable> getAffectedVariables() {

+		return affectedVariables;

+	}

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint#replaceVariable(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable)

+	 */

+	@Override

+	public void replaceVariable(PVariable obsolete, PVariable replacement) {

+		if (affectedVariables.remove(obsolete)) {

+			affectedVariables.add(replacement);

+			obsolete.unrefer(this);

+			replacement.refer(this);

+			doReplaceVariable(obsolete, replacement);

+		}

+	}

+	protected abstract void doReplaceVariable(PVariable obsolete, PVariable replacement);

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint#delete()

+	 */

+	@Override

+	public void delete() {

+		for (PVariable pVariable : affectedVariables) {

+			pVariable.unrefer(this);

+		}

+		pSystem.unregisterConstraint(this);

+	}

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint#checkSanity()

+	 */

+	@Override

+	public void checkSanity() throws RetePatternBuildException {}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/DeferredPConstraint.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/DeferredPConstraint.java
new file mode 100644
index 0000000..548cfa3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/DeferredPConstraint.java
@@ -0,0 +1,49 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem;

+

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+

+/**

+ * Any constraint that can only be checked on certain stubs (e.g. those stubs that already contain some variables).

+ * @author Bergmann Gábor

+ *

+ */

+public abstract class DeferredPConstraint<PatternDescription, StubHandle> extends BasePConstraint<PatternDescription, StubHandle> {

+

+	public DeferredPConstraint(PSystem<PatternDescription, StubHandle, ?> pSystem, Set<PVariable> affectedVariables) {

+		super(pSystem, affectedVariables);

+	}

+

+	public abstract boolean isReadyAt(Stub<StubHandle> stub);

+	

+	/**

+	 * @pre this.isReadyAt(stub);

+	 */

+	public Stub<StubHandle> checkOn(Stub<StubHandle> stub) throws RetePatternBuildException {

+		Stub<StubHandle> newStub = doCheckOn(stub);

+		newStub.addConstraint(this);

+		return newStub;

+	}

+	protected abstract Stub<StubHandle> doCheckOn(Stub<StubHandle> stub) throws RetePatternBuildException;

+

+	/**

+	 * Called when the constraint is not ready, but cannot be deferred further. 

+	 * @param stub

+	 * @throws RetePatternBuildException to indicate the error in detail.

+	 * PRE: !isReady(stub)

+	 */

+	public abstract void raiseForeverDeferredError(Stub<StubHandle> stub) throws RetePatternBuildException;

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/EnumerablePConstraint.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/EnumerablePConstraint.java
new file mode 100644
index 0000000..1f0ed6c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/EnumerablePConstraint.java
@@ -0,0 +1,86 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem;

+

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.helpers.BuildHelper;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+

+/**

+ * A constraint for which all satisfying tuples of variable values can be enumerated at any point during run-time.

+ * @author Bergmann Gábor

+ *

+ */

+public abstract class EnumerablePConstraint<PatternDescription, StubHandle> extends BasePConstraint<PatternDescription, StubHandle> {

+	protected Tuple variablesTuple;

+	private Stub<StubHandle> stub;

+	

+	protected EnumerablePConstraint(PSystem<PatternDescription, StubHandle, ?> pSystem, Tuple variablesTuple) {

+		super(pSystem, variablesTuple.<PVariable>getDistinctElements());

+		this.variablesTuple = variablesTuple;

+	}

+	

+	public Stub<StubHandle> getStub() throws RetePatternBuildException {

+		if (stub == null) {

+			stub = doCreateStub();

+			stub.addConstraint(this);

+			

+			// check for any variable coincidences and enforce them

+			stub = BuildHelper.enforceVariableCoincidences(buildable, stub);

+		}

+		return stub;

+	}

+	

+	public abstract Stub<StubHandle> doCreateStub() throws RetePatternBuildException;

+

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint#replaceVariable(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable)

+	 */

+	@Override

+	public void doReplaceVariable(PVariable obsolete, PVariable replacement) {

+		variablesTuple = variablesTuple.replaceAll(obsolete, replacement);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint#toStringRest()

+	 */

+	@Override

+	protected String toStringRest() {

+		String stringRestRest = toStringRestRest();

+		String tupleString = "@" + variablesTuple.toString();

+		return stringRestRest == null ? tupleString : ":" + stringRestRest + tupleString;

+	}

+	protected String toStringRestRest() {

+		return null;

+	}

+

+	/**

+	 * @return the variablesTuple

+	 */

+	public Tuple getVariablesTuple() {

+		return variablesTuple;

+	}

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint#getDeducedVariables()

+	 */

+	@Override

+	public Set<PVariable> getDeducedVariables() {

+		return getAffectedVariables();

+	}	

+	

+	

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/IFoldablePConstraint.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/IFoldablePConstraint.java
new file mode 100644
index 0000000..1bd0a7f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/IFoldablePConstraint.java
@@ -0,0 +1,42 @@
+///*******************************************************************************

+// * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+// * All rights reserved. This program and the accompanying materials

+// * are made available under the terms of the Eclipse Public License v1.0

+// * which accompanies this distribution, and is available at

+// * http://www.eclipse.org/legal/epl-v10.html

+// *

+// * Contributors:

+// *    Gabor Bergmann - initial API and implementation

+// *******************************************************************************/

+//

+//package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem;

+//

+///**

+// * A constraint that can incorporate other constraints (probably of the same type) and enforce them together

+// * @author Bergmann Gábor

+// *

+// */

+//public interface IFoldablePConstraint extends PConstraint {

+//	/**

+//	 * Attempts to incorporate other into self.

+//	 * Does NOT call other.registerIncorporatationInto(this);

+//	 * 

+//	 * @param other another valid IFoldablePConstraint

+//	 * @return true if other constraint was compatible and could be incorporated in this one.

+//	 * 

+//	 */

+//	public boolean incorporate(IFoldablePConstraint other);

+//	

+//	/**

+//	 * Registers that this constraint was incorporated into another.

+//	 * NOT called by incorporator.incorporate(this);

+//	 * 

+//	 * @param incorporator

+//	 */

+//	public void registerIncorporatationInto(IFoldablePConstraint incorporator);

+//	

+//	/**

+//	 * @return the pConstraint self was incorporated into, or null if there was no such.

+//	 */

+//	public IFoldablePConstraint getIncorporator();

+//}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/ITypeInfoProviderConstraint.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/ITypeInfoProviderConstraint.java
new file mode 100644
index 0000000..66bb41c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/ITypeInfoProviderConstraint.java
@@ -0,0 +1,50 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public interface ITypeInfoProviderConstraint {

+	

+	/**

+	 * Returns type information that is known about the variable if this constraint holds.

+	 * Null if no such information is discernible.

+	 * @param variable 

+	 * @return the inferred type information, or TypeInfoSpecials.NO_TYPE_INFO_PROVIDED if no type information is inferrable. Never returns null.

+	 */

+	public Object getTypeInfo(PVariable variable);

+	

+	public static enum TypeInfoSpecials { 

+		NO_TYPE_INFO_PROVIDED,

+		ANY_UNARY,

+		ANY_TERNARY;

+		

+		public static Object wrapUnary(Object typeKey) {

+			return typeKey == null ? ITypeInfoProviderConstraint.TypeInfoSpecials.ANY_UNARY : typeKey;

+		}

+		public static Object unwrapUnary(Object typeKey) {

+			return typeKey == ITypeInfoProviderConstraint.TypeInfoSpecials.ANY_UNARY ? null : typeKey;

+		}

+		public static Object wrapTernary(Object typeKey) {

+			return typeKey == null ? ITypeInfoProviderConstraint.TypeInfoSpecials.ANY_TERNARY : typeKey;

+		}

+		public static Object unwrapTernary(Object typeKey) {

+			return typeKey == ITypeInfoProviderConstraint.TypeInfoSpecials.ANY_TERNARY ? null : typeKey;

+		}

+		public static Object wrapAny(Object typeKey) {

+			return typeKey == null ? ITypeInfoProviderConstraint.TypeInfoSpecials.NO_TYPE_INFO_PROVIDED : typeKey;

+		}

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/KeyedEnumerablePConstraint.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/KeyedEnumerablePConstraint.java
new file mode 100644
index 0000000..a0ebf50
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/KeyedEnumerablePConstraint.java
@@ -0,0 +1,52 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public abstract class KeyedEnumerablePConstraint<KeyType, PatternDescription, StubHandle> 

+	extends EnumerablePConstraint<PatternDescription, StubHandle> 

+{

+

+	protected KeyType supplierKey;

+

+	/**

+	 * @param variablesTuple

+	 * @param buildable

+	 * @param supplierKey

+	 */

+	public KeyedEnumerablePConstraint(PSystem<PatternDescription, StubHandle, ?> pSystem, Tuple variablesTuple, KeyType supplierKey) {

+		super(pSystem, variablesTuple);

+		this.supplierKey = supplierKey;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.EnumerablePConstraint#toStringRestRest()

+	 */

+	@Override

+	protected String toStringRestRest() {

+		return supplierKey == null ? "$any(null)" : supplierKey.toString();

+	}

+

+	/**

+	 * @return the supplierKey

+	 */

+	public KeyType getSupplierKey() {

+		return supplierKey;

+	}

+	

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/PConstraint.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/PConstraint.java
new file mode 100644
index 0000000..679dac0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/PConstraint.java
@@ -0,0 +1,32 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem;

+

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public interface PConstraint {

+

+	public Set<PVariable> getAffectedVariables();

+	public Set<PVariable> getDeducedVariables();

+	

+	public void replaceVariable(PVariable obsolete, PVariable replacement);

+	

+	public void delete();

+	

+	public void checkSanity() throws RetePatternBuildException;

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/PSystem.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/PSystem.java
new file mode 100644
index 0000000..99b7a71
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/PSystem.java
@@ -0,0 +1,172 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem;

+

+import java.util.HashMap;

+import java.util.HashSet;

+import java.util.Map;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Buildable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables.ConstantValue;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class PSystem<PatternDescription, StubHandle, Collector> {

+	private PatternDescription pattern;

+	private IPatternMatcherContext<PatternDescription> context;

+	private Buildable<PatternDescription, StubHandle, Collector> buildable;

+

+	private Set<PVariable> allVariables;

+	private Set<PVariable> uniqueVariables;

+	private Map<String, PVariable> variablesByName;

+	private Set<PConstraint> constraints;

+	private int nextVirtualNodeID;

+	

+	/**

+	 * 

+	 */

+	public PSystem(

+			IPatternMatcherContext<PatternDescription> context, 

+			Buildable<PatternDescription, StubHandle, Collector> buildable,

+			PatternDescription pattern) 

+	{

+		super();

+		this.pattern = pattern;

+		this.context = context;

+		this.buildable = buildable;

+		allVariables = new HashSet<PVariable>();

+		uniqueVariables = new HashSet<PVariable>();

+		variablesByName = new HashMap<String, PVariable>();

+		constraints = new HashSet<PConstraint>();

+	}

+	/**

+	 * @return whether the submission of the new variable was successful

+	 */

+	private boolean addVariable(PVariable var) {

+		String name = var.getName();

+		if (!variablesByName.containsKey(name)) {

+			allVariables.add(var);

+			if (var.isUnique()) uniqueVariables.add(var);

+			variablesByName.put(name, var);

+			return true;

+		} else {

+			return false; 

+		}

+	}	

+	/**

+	 * Use this method to add a newly created constraint to the pSystem.

+	 * @return whether the submission of the new constraint was successful

+	 */

+	boolean registerConstraint(PConstraint constraint) {

+		return constraints.add(constraint);

+	}	

+	/**

+	 * Use this method to remove an obsolete constraint from the pSystem.

+	 * @return whether the removal of the constraint was successful

+	 */

+	boolean unregisterConstraint(PConstraint constraint) {

+		return constraints.remove(constraint);

+	}	

+	

+	@SuppressWarnings("unchecked")

+	public <ConstraintType> Set<ConstraintType> getConstraintsOfType(Class<ConstraintType> constraintClass) {

+		Set<ConstraintType> result = new HashSet<ConstraintType>();

+		for (PConstraint pConstraint : constraints) {

+			if (constraintClass.isInstance(pConstraint))

+				result.add((ConstraintType) pConstraint);

+		}

+		return result;

+	}

+			

+	public PVariable newVirtualVariable() {

+		String name;

+		do {

+			name = ".virtual{" + nextVirtualNodeID++ + "}";

+		} while (variablesByName.containsKey(name));

+		PVariable var = new PVariable(this, name, true);

+		addVariable(var);

+		return var;

+	}

+	public PVariable newConstantVariable(Object value) {

+		PVariable virtual = newVirtualVariable();

+		new ConstantValue<PatternDescription, StubHandle>(this, virtual, value);

+		return virtual;

+	}

+	

+

+	/**

+	 * @return the context

+	 */

+	public IPatternMatcherContext<PatternDescription> getContext() {

+		return context;

+	}

+	/**

+	 * @return the buildable

+	 */

+	public Buildable<PatternDescription, StubHandle, Collector> getBuildable() {

+		return buildable;

+	}	

+	/**

+	 * @return the allVariables

+	 */

+	public Set<PVariable> getAllVariables() {

+		return allVariables;

+	}

+	/**

+	 * @return the uniqueVariables

+	 */

+	public Set<PVariable> getUniqueVariables() {

+		return uniqueVariables;

+	}

+

+	/**

+	 * @return the variable by name

+	 */

+	private PVariable getVariableByName(String name) {

+		return variablesByName.get(name).getUnifiedIntoRoot();

+	}	

+	/**

+	 * @return the variable by name

+	 */

+	public PVariable getOrCreateVariableByName(String name) {

+		if (!variablesByName.containsKey(name)) addVariable(new PVariable(this, name));

+		return getVariableByName(name);

+	}		

+	/**

+	 * @return the constraints

+	 */

+	public Set<PConstraint> getConstraints() {

+		return constraints;

+	}

+	/**

+	 * @return the pattern

+	 */

+	public PatternDescription getPattern() {

+		return pattern;

+	}

+	/**

+	 * @param pVariable

+	 */

+	void noLongerUnique(PVariable pVariable) {

+		assert(!pVariable.isUnique());

+		uniqueVariables.remove(pVariable);

+	}

+

+

+	

+	

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/PVariable.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/PVariable.java
new file mode 100644
index 0000000..14258f7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/PVariable.java
@@ -0,0 +1,214 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem;

+

+import java.util.HashSet;

+import java.util.Set;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class PVariable {

+	private PSystem<?,?,?> pSystem;

+	/**

+	 * The name of the pattern variable. This is the unique key of the pattern node.

+	 */

+	private String name;

+	/**

+	 * virtual pVariables are nodes that do not correspond to actual pattern

+	 * variables; they represent constants or Term substitutes

+	 */

+	private boolean virtual;

+//	/**

+//	 * whether this is an exported symbolic parameter

+//	 */

+//	private boolean exportedParameter;	

+	

+	/**

+	 * Set of constraints that mention this variable

+	 */

+	private Set<PConstraint> referringConstraints;

+	

+	/**

+	 * Determines whether there are any constraints that can deduce this variable

+	 */	

+	private Boolean deducable;

+	

+	/**

+	 * Another PVariable this variable has been unified into. 

+	 * Please use the other variable instead of this.

+	 * Null iff this is still a first-class variable.

+	 */

+	private PVariable unifiedInto;

+	

+	

+	

+	PVariable(PSystem<?,?,?> pSystem, String name) {

+		this(pSystem, name, false);

+	}

+

+	PVariable(PSystem<?,?,?> pSystem, String name, boolean virtual) {

+		super();

+		this.pSystem = pSystem;

+		this.name = name;

+		this.virtual = virtual;

+		//this.exportedParameter = false;

+		this.referringConstraints = new HashSet<PConstraint>();

+		this.unifiedInto = null;

+		this.deducable = false;

+	}

+	

+	/**

+	 * Replaces this variable with a given other, resulting in their unification.

+	 * This variable will no longer be unique.

+	 * @param constraint

+	 */

+	public void unifyInto(PVariable replacement) {

+		replacementCheck();

+		replacement = replacement.getUnifiedIntoRoot();

+		//replacement.referringConstraints.addAll(this.referringConstraints);

+		//replacement.exportedParameter |= this.exportedParameter;

+		replacement.virtual &= this.virtual;

+		if (replacement.deducable != null && this.deducable != null)

+			replacement.deducable |= this.deducable;

+		else 

+			replacement.deducable = null;

+		Set<PConstraint> snapshotConstraints = // avoid ConcurrentModificationX

+			new HashSet<PConstraint>(this.referringConstraints);

+		for (PConstraint constraint : snapshotConstraints) {

+			constraint.replaceVariable(this, replacement);

+		}

+		// replacementCheck() will fail from this point

+		this.unifiedInto = replacement;

+		pSystem.noLongerUnique(this);

+	}

+	

+	/**

+	 * Determines whether there are any constraints that can deduce this variable

+	 * @return

+	 */

+	public boolean isDeducable() {

+		replacementCheck();

+		if (deducable == null) {

+			deducable = false;

+			for (PConstraint pConstraint : getReferringConstraints()) {

+				if (pConstraint.getDeducedVariables().contains(this)) {

+					deducable = true;

+					break;

+				}

+			}

+		}

+		return deducable;

+	}

+

+	/**

+	 * Register that this variable is referred by the given constraint.

+	 * @param constraint

+	 */

+	public void refer(PConstraint constraint) {

+		replacementCheck();

+		deducable = null;

+		referringConstraints.add(constraint);

+	}

+	

+	/**

+	 * Register that this variable is no longer referred by the given constraint.

+	 * @param constraint

+	 */

+	public void unrefer(PConstraint constraint) {

+		replacementCheck();

+		deducable = null;

+		referringConstraints.remove(constraint);

+	}

+	

+	

+	/**

+	 * @return the name of the pattern variable. This is the unique key of the pattern node.

+	 */

+	public String getName() {

+		replacementCheck();

+		return name;

+	}

+

+	/**

+	 * @return the virtual

+	 */

+	public boolean isVirtual() {

+		replacementCheck();

+		return virtual;

+	}

+

+	

+//	/**

+//	 * @return the exportedParameter

+//	 */

+//	public boolean isExportedParameter() {

+//		replacementCheck();

+//		return exportedParameter;

+//	}

+//

+//	/**

+//	 * @param exportedParameter the exportedParameter to set

+//	 */

+//	public void setExportedParameter(boolean exportedParameter) {

+//		replacementCheck();

+//		this.exportedParameter = exportedParameter;

+//	}

+

+	/**

+	 * @return the referringConstraints

+	 */

+	public Set<PConstraint> getReferringConstraints() {

+		replacementCheck();

+		return referringConstraints;

+	}	

+	

+	@SuppressWarnings("unchecked")

+	public <ConstraintType> Set<ConstraintType> getReferringConstraintsOfType(Class<ConstraintType> constraintClass) {

+		replacementCheck();

+		Set<ConstraintType> result = new HashSet<ConstraintType>();

+		for (PConstraint pConstraint : referringConstraints) {

+			if (constraintClass.isInstance(pConstraint))

+				result.add((ConstraintType) pConstraint);

+		}

+		return result;

+	}

+	

+

+	@Override

+	public String toString() {

+		// replacementCheck();

+		return name;// + ":PatternNode";

+	}

+	

+	public PVariable getDirectUnifiedInto() {

+		return unifiedInto;

+	}

+	public PVariable getUnifiedIntoRoot() {

+		PVariable nextUnified = unifiedInto;

+		PVariable oldUnifiedInto = this;

+		while (nextUnified != null) {

+			oldUnifiedInto = nextUnified;

+			nextUnified = oldUnifiedInto.getDirectUnifiedInto();

+		} 

+		return oldUnifiedInto; //unifiedInto;

+	}

+	public boolean isUnique() {

+		return unifiedInto == null;

+	}

+	private void replacementCheck() {

+		if (unifiedInto != null)

+			throw new IllegalStateException("Illegal usage of variable " + name + " which has been replaced with " + unifiedInto.name);

+	}

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/VariableDeferredPConstraint.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/VariableDeferredPConstraint.java
new file mode 100644
index 0000000..dbd7b47
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/VariableDeferredPConstraint.java
@@ -0,0 +1,53 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem;

+

+import java.util.HashSet;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+

+/**

+ * A kind of deferred constraint that can only be checked when a set of deferring variables are all present in a stub.

+ * @author Bergmann Gábor

+ *

+ */

+public abstract class VariableDeferredPConstraint<PatternDescription, StubHandle> extends DeferredPConstraint<PatternDescription, StubHandle> {

+	/**

+	 * @param affectedVariables

+	 */

+	public VariableDeferredPConstraint(PSystem<PatternDescription, StubHandle, ?> pSystem, Set<PVariable> affectedVariables) {

+		super(pSystem, affectedVariables);

+	}

+	protected abstract Set<PVariable> getDeferringVariables();

+	/**

+	 * Refine further if needed

+	 */

+	@Override

+	public boolean isReadyAt(Stub<StubHandle> stub) {

+		return stub.getVariablesIndex().keySet().containsAll(getDeferringVariables());

+	}

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.DeferredPConstraint#raiseForeverDeferredError(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub)

+	 */

+	@Override

+	public void raiseForeverDeferredError(Stub<StubHandle> stub)

+			throws RetePatternBuildException {

+		Set<PVariable> missing = new HashSet<PVariable>(getDeferringVariables());

+		missing.removeAll(stub.getVariablesIndex().keySet());

+		String[] args = {toString(), missing.toArray().toString()};

+		String msg = "The checking of pattern constraint {1} requires the values of variables {2}, but it cannot be deferred further. " + 

+			"HINT: the incremental matcher is not an equation solver, please make sure that all variable values are deducible.";

+		throw new RetePatternBuildException(msg, args, null);

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/BaseTypeSafePredicateCheck.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/BaseTypeSafePredicateCheck.java
new file mode 100644
index 0000000..ec61aac
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/BaseTypeSafePredicateCheck.java
@@ -0,0 +1,123 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicdeferred;

+

+import java.util.Collections;

+import java.util.HashMap;

+import java.util.Map;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.helpers.TypeHelper;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.VariableDeferredPConstraint;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public abstract class BaseTypeSafePredicateCheck<PatternDescription, StubHandle> extends

+		VariableDeferredPConstraint<PatternDescription, StubHandle> 

+{

+	private Map<PVariable, Set<Object>> allTypeRestrictions;

+

+	/**

+	 * @param buildable

+	 * @param affectedVariables

+	 */

+	public BaseTypeSafePredicateCheck(

+			PSystem<PatternDescription, StubHandle, ?> pSystem,

+			Set<PVariable> affectedVariables) {

+		super(pSystem, affectedVariables);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint#getDeducedVariables()

+	 */

+	@Override

+	public Set<PVariable> getDeducedVariables() {

+		return Collections.emptySet();

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.VariableDeferredPConstraint#getDeferringVariables()

+	 */

+	@Override

+	protected Set<PVariable> getDeferringVariables() {

+		return getAffectedVariables();

+	}

+

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.VariableDeferredPConstraint#isReadyAt(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub)

+	 */

+	@Override

+	public boolean isReadyAt(Stub<StubHandle> stub) {

+		if (super.isReadyAt(stub)) {

+			return checkTypeSafety(stub) == null;

+		}

+		return false;

+	}

+

+	/**

+	 * Checks whether all type restrictions are already enforced on affected variables. 

+	 * @param stub

+	 * @return a variable whose type safety is not enforced yet, or null if the stub is typesafe

+	 */

+	protected PVariable checkTypeSafety(Stub<StubHandle> stub) {

+		for (PVariable pVariable : getAffectedVariables()) {

+			Set<Object> allTypeRestrictionsForVariable = getAllTypeRestrictions().get(pVariable);

+			Set<Object> checkedTypeRestrictions = TypeHelper.inferTypes(pVariable, stub.getAllEnforcedConstraints());

+			Set<Object> uncheckedTypeRestrictions = 

+				TypeHelper.subsumeTypes(

+						allTypeRestrictionsForVariable, 

+						checkedTypeRestrictions, 

+						this.pSystem.getContext());

+			if (!uncheckedTypeRestrictions.isEmpty()) return pVariable;

+		} 

+		return null;

+	}

+

+	/**

+	 * @return the allTypeRestrictions

+	 */

+	public Map<PVariable, Set<Object>> getAllTypeRestrictions() {

+		if (allTypeRestrictions == null) {

+			allTypeRestrictions = new HashMap<PVariable, Set<Object>>();

+			for (PVariable pVariable : getAffectedVariables()) {

+				allTypeRestrictions.put(

+						pVariable, 

+						TypeHelper.inferTypes(pVariable, pVariable.getReferringConstraints()));

+			}		

+		}

+		return allTypeRestrictions;

+	}

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.VariableDeferredPConstraint#raiseForeverDeferredError(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub)

+	 */

+	@Override

+	public void raiseForeverDeferredError(Stub<StubHandle> stub)

+			throws RetePatternBuildException {

+		if (!super.isReadyAt(stub)) {

+			super.raiseForeverDeferredError(stub);

+		} else {

+			String[] args = {toString(), checkTypeSafety(stub).toString()};

+			String msg = "The checking of pattern constraint {1} cannot be deferred further, but variable {2} is still not type safe. " + 

+				"HINT: the incremental matcher is not an equation solver, please make sure that all variable values are deducible.";

+			throw new RetePatternBuildException(msg, args, null);

+		}

+			

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/Equality.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/Equality.java
new file mode 100644
index 0000000..bf2b260
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/Equality.java
@@ -0,0 +1,138 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicdeferred;

+

+import java.util.Collections;

+import java.util.HashSet;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.DeferredPConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class Equality<PatternDescription, StubHandle> extends

+		DeferredPConstraint<PatternDescription, StubHandle> {

+

+	private PVariable who; 

+	private PVariable withWhom;

+	

+	/**

+	 * @param buildable

+	 * @param affectedVariables

+	 */

+	public Equality(PSystem<PatternDescription, StubHandle, ?> pSystem,

+			PVariable who, PVariable withWhom) {

+		super(pSystem, buildSet(who, withWhom));

+		this.who = who;

+		this.withWhom = withWhom;

+	}

+

+

+	private static Set<PVariable> buildSet(PVariable who, PVariable withWhom) {

+		Set<PVariable> set = new HashSet<PVariable>();

+		set.add(who);

+		set.add(withWhom);

+		return set;

+	}

+	

+	public boolean isMoot() {

+		return who.equals(withWhom);

+	}

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.BasePConstraint#replaceVariable(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable)

+	 */

+	@Override

+	public void doReplaceVariable(PVariable obsolete, PVariable replacement) {

+		if (obsolete.equals(who)) who = replacement;

+		if (obsolete.equals(withWhom)) withWhom = replacement;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.BasePConstraint#toStringRest()

+	 */

+	@Override

+	protected String toStringRest() {

+		return who.getName() + "=" + withWhom.getName();

+	}

+

+

+	/**

+	 * @return the who

+	 */

+	public PVariable getWho() {

+		return who;

+	}

+

+	/**

+	 * @return the withWhom

+	 */

+	public PVariable getWithWhom() {

+		return withWhom;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint#getDeducedVariables()

+	 */

+	@Override

+	public Set<PVariable> getDeducedVariables() {

+		return Collections.emptySet();

+	}

+

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.DeferredPConstraint#isReadyAt(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub)

+	 */

+	@Override

+	public boolean isReadyAt(Stub<StubHandle> stub) {

+		return stub.getVariablesIndex().containsKey(who) && stub.getVariablesIndex().containsKey(withWhom);

+		// will be replaced by || if copierNode is available; 

+		// before that, LayoutHelper.unifyVariablesAlongEqualities(PSystem<PatternDescription, StubHandle, Collector>) is recommended.

+	}

+

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.DeferredPConstraint#doCheckOn(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub)

+	 */

+	@Override

+	protected Stub<StubHandle> doCheckOn(Stub<StubHandle> stub) throws RetePatternBuildException {

+		if (isMoot()) return stub;

+		

+		Integer index1 = stub.getVariablesIndex().get(who);

+		Integer index2 = stub.getVariablesIndex().get(withWhom);

+		if (index1 != null && index2 != null) {

+			if (index1.equals(index2)) return stub;

+			else return buildable.buildEqualityChecker(stub, new int[]{index1, index2});

+		}

+		else if (index1 == null) {

+			// TODO build copierNode here

+		}

+		return null;

+	}

+

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.DeferredPConstraint#raiseForeverDeferredError(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub)

+	 */

+	@Override

+	public void raiseForeverDeferredError(Stub<StubHandle> stub) throws RetePatternBuildException {

+		String[] args = {who.toString(), withWhom.toString()};

+		String msg = "Cannot express equality of variables {1} and {2} if neither of them is deducable.";

+		throw new RetePatternBuildException(msg, args, null);

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/ExportedParameter.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/ExportedParameter.java
new file mode 100644
index 0000000..6bfbf97
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/ExportedParameter.java
@@ -0,0 +1,134 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicdeferred;

+

+import java.util.Collections;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.VariableDeferredPConstraint;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class ExportedParameter<PatternDescription, StubHandle> extends 

+	VariableDeferredPConstraint<PatternDescription, StubHandle>  

+{

+	PVariable parameterVariable;

+	String parameterName;

+	

+

+	/**

+	 * @param buildable

+	 * @param parameterVariable

+	 */

+	public ExportedParameter(

+			PSystem<PatternDescription, StubHandle, ?> pSystem,

+			PVariable parameterVariable,

+			String parameterName) {

+		super(pSystem, Collections.singleton(parameterVariable));

+		this.parameterVariable = parameterVariable;

+		this.parameterName = parameterVariable.getName();

+		//parameterVariable.setExportedParameter(true);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint#replaceVariable(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable)

+	 */

+	@Override

+	public void doReplaceVariable(PVariable obsolete, PVariable replacement) {

+		if (obsolete.equals(parameterVariable)) parameterVariable = replacement;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.BasePConstraint#toStringRest()

+	 */

+	@Override

+	protected String toStringRest() {

+		String varName = parameterVariable.getName();

+		return parameterName.equals(varName) ? 

+				parameterName :

+				parameterName + "(" + varName + ")"	;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint#getDeducedVariables()

+	 */

+	@Override

+	public Set<PVariable> getDeducedVariables() {

+		return Collections.emptySet();

+	}

+

+	/**

+	 * @return the parameterName

+	 */

+	public String getParameterName() {

+		return parameterName;

+	}

+

+	/**

+	 * @return the parameterVariable

+	 */

+	public PVariable getParameterVariable() {

+		return parameterVariable;

+	}

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.VariableDeferredPConstraint#getDeferringVariables()

+	 */

+	@Override

+	protected Set<PVariable> getDeferringVariables() {

+		return Collections.singleton(parameterVariable);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.DeferredPConstraint#doCheckOn(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub)

+	 */

+	@Override

+	protected Stub<StubHandle> doCheckOn(Stub<StubHandle> stub) throws RetePatternBuildException {

+		return stub;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.BasePConstraint#checkSanity()

+	 */

+	@Override

+	public void checkSanity() throws RetePatternBuildException {

+		super.checkSanity();

+		if (!parameterVariable.isDeducable()){

+			String[] args = {parameterName};

+			String msg = "Impossible to match pattern: "

+				+ "exported pattern variable {1} can not be determined based on the pattern constraints. "

+				+ "HINT: certain constructs (e.g. negative patterns or check expressions) cannot output symbolic parameters.";

+			throw new RetePatternBuildException(msg, args, null);

+		}					

+

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.VariableDeferredPConstraint#raiseForeverDeferredError(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub)

+	 */

+	@Override

+	public void raiseForeverDeferredError(Stub<StubHandle> stub) throws RetePatternBuildException 

+	{

+			String[] args = {parameterName};

+			String msg = "Pattern Graph Search terminated incompletely: "

+				+ "exported pattern variable {1} could not be determined based on the pattern constraints. "

+				+ "HINT: certain constructs (e.g. negative patterns or check expressions) cannot output symbolic parameters.";

+			throw new RetePatternBuildException(msg, args, null);

+	}

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/Inequality.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/Inequality.java
new file mode 100644
index 0000000..9640d38
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/Inequality.java
@@ -0,0 +1,180 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicdeferred;

+

+import java.util.Arrays;

+import java.util.Collections;

+import java.util.HashSet;

+import java.util.Map;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.VariableDeferredPConstraint;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class Inequality<PatternDescription, StubHandle> 

+	extends VariableDeferredPConstraint<PatternDescription, StubHandle> 

+//	implements IFoldablePConstraint 

+{

+

+	private PVariable who;

+	private PVariable withWhom;

+//	private IFoldablePConstraint incorporator;

+	

+	/**

+	 * The inequality constraint is weak if it can be ignored when who is the same as withWhom, or if any if them is undeducible.

+	 */

+	private boolean weak; 

+	

+	

+	public Inequality(

+			PSystem<PatternDescription, StubHandle, ?> pSystem,

+			PVariable who, PVariable withWhom) 

+	{

+		this(pSystem, who, withWhom, false);

+	}

+	

+	public Inequality(

+			PSystem<PatternDescription, StubHandle, ?> pSystem,

+			PVariable who, PVariable withWhom,

+			boolean weak) 

+	{

+		super(pSystem, new HashSet<PVariable>(Arrays.asList(new PVariable[]{who, withWhom})));

+		// this(pSystem, who, Collections.singleton(withWhom));

+		this.who = who;

+		this.withWhom = withWhom;

+		this.weak = weak;

+	}

+

+//	private Inequality(

+//			PSystem<PatternDescription, StubHandle, ?> pSystem,

+//			PVariable subject, Set<PVariable> inequals) 

+//	{

+//		super(pSystem, include(inequals, subject));

+//		this.subject = subject;

+//		this.inequals = inequals;

+//	}

+

+//	private static HashSet<PVariable> include(Set<PVariable> inequals, PVariable subject) {

+//		HashSet<PVariable> hashSet = new HashSet<PVariable>(inequals);

+//		hashSet.add(subject);

+//		return hashSet;

+//	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.VariableDeferredPConstraint#getDeferringVariables()

+	 */

+	@Override

+	protected Set<PVariable> getDeferringVariables() {

+		return getAffectedVariables();

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.DeferredPConstraint#doCheckOn(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub)

+	 */

+	@Override

+	protected Stub<StubHandle> doCheckOn(Stub<StubHandle> stub) throws RetePatternBuildException {

+		Map<Object, Integer> variablesIndex = stub.getVariablesIndex();

+		return buildable.buildInjectivityChecker(stub, variablesIndex.get(who), new int[]{variablesIndex.get(withWhom)});

+	}

+

+//	private static int[] mapIndices(Map<Object, Integer> variablesIndex, Set<PVariable> keys) {

+//		int[] result = new int[keys.size()];

+//		int k = 0;

+//		for (PVariable key : keys) {

+//			result[k++] = variablesIndex.get(key);

+//		}

+//		return result;

+//	}

+

+//	/* (non-Javadoc)

+//	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.IFoldablePConstraint#getIncorporator()

+//	 */

+//	@Override

+//	public IFoldablePConstraint getIncorporator() {

+//		return incorporator;

+//	}

+//

+//	@Override

+//	public void registerIncorporatationInto(IFoldablePConstraint incorporator) {

+//		this.incorporator = incorporator;

+//	}

+//	

+//	/* (non-Javadoc)

+//	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.IFoldablePConstraint#incorporate(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.IFoldablePConstraint)

+//	 */

+//	@Override

+//	public boolean incorporate(IFoldablePConstraint other) {

+//		if (other instanceof Inequality<?, ?>) {

+//			Inequality other2 = (Inequality) other;

+//			if (subject.equals(other2.subject)) {

+//				Set<PVariable> newInequals = new HashSet<PVariable>(inequals);

+//				newInequals.addAll(other2.inequals);

+//				return new Inequality<PatternDescription, StubHandle>(buildable, subject, newInequals);

+//			}

+//		} else return false;

+//	}

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.BasePConstraint#toStringRest()

+	 */

+	@Override

+	protected String toStringRest() {

+		return who.toString() + (isWeak() ? "!=?" : "!=") + withWhom.toString();

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint#replaceVariable(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable)

+	 */

+	@Override

+	public void doReplaceVariable(PVariable obsolete, PVariable replacement) {

+		if (obsolete.equals(who)) who = replacement;

+		if (obsolete.equals(withWhom)) withWhom = replacement;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint#getDeducedVariables()

+	 */

+	@Override

+	public Set<PVariable> getDeducedVariables() {

+		return Collections.emptySet();

+	}

+

+	/**

+	 * The inequality constraint is weak if it can be ignored when who is the same as withWhom, or if any if them is undeducible.

+	 * @return the weak

+	 */

+	public boolean isWeak() {

+		return weak;

+	}

+

+	/**

+	 * A weak inequality constraint is eliminable if who is the same as withWhom, or if any if them is undeducible.

+	 */

+	public boolean isEliminable() {

+		return isWeak() && (who.equals(withWhom) || !who.isDeducable() || !withWhom.isDeducable());

+	}

+	

+	/**

+	 * Eliminates a weak inequality constraint if it can be ignored when who is the same as withWhom, or if any if them is undeducible.

+	 */	

+	public void eliminateWeak() {

+		if (isEliminable()) delete();

+	}

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/NegativePatternCall.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/NegativePatternCall.java
new file mode 100644
index 0000000..16b0908
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/NegativePatternCall.java
@@ -0,0 +1,81 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicdeferred;

+

+import java.util.Collections;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Buildable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.helpers.BuildHelper;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable; import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class NegativePatternCall<PatternDescription, StubHandle> extends

+		PatternCallBasedDeferred<PatternDescription, StubHandle> {

+	

+	/**

+	 * @param buildable

+	 * @param affectedVariables

+	 */

+	public NegativePatternCall(

+			PSystem<PatternDescription, StubHandle, ?> pSystem,

+			Tuple actualParametersTuple, PatternDescription pattern) {

+		super(pSystem, actualParametersTuple, pattern);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint#getDeducedVariables()

+	 */

+	@Override

+	public Set<PVariable> getDeducedVariables() {

+		return Collections.emptySet();

+	}

+

+	/**

+	 * @return all variables that may potentially be quantified they are not used anywhere else

+	 */

+	@Override

+	protected Set<PVariable> getCandidateQuantifiedVariables() {

+		return getAffectedVariables();

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.DeferredPConstraint#doCheckOn(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub)

+	 */

+	@Override

+	protected Stub<StubHandle> doCheckOn(Stub<StubHandle> stub) throws RetePatternBuildException {

+		Stub<StubHandle> sideStub = getSideStub();

+		BuildHelper.JoinHelper<StubHandle> joinHelper = getJoinHelper(stub, sideStub);

+		return buildable.buildBetaNode(

+				stub, sideStub, 

+				joinHelper.getPrimaryMask(), 

+				joinHelper.getSecondaryMask(), 

+				joinHelper.getComplementerMask(), 

+				true);

+	}

+

+	@Override

+	protected void doDoReplaceVariables(PVariable obsolete, PVariable replacement) {

+	}

+	@Override

+	protected String toStringRest() {

+		return "!" + pattern.toString() + "@" + actualParametersTuple.toString();

+	}

+

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/PatternCallBasedDeferred.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/PatternCallBasedDeferred.java
new file mode 100644
index 0000000..ac898d8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/PatternCallBasedDeferred.java
@@ -0,0 +1,141 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicdeferred;

+

+import java.util.Collections;

+import java.util.HashSet;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.helpers.BuildHelper;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.VariableDeferredPConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+

+/**

+ * @author Bergmann Gábor

+ *

+ * @param <PatternDescription>

+ * @param <StubHandle>

+ */

+public abstract class PatternCallBasedDeferred<PatternDescription, StubHandle>

+		extends VariableDeferredPConstraint<PatternDescription, StubHandle> {

+

+	protected Tuple actualParametersTuple;

+

+	protected abstract void doDoReplaceVariables(PVariable obsolete, PVariable replacement);

+

+	protected abstract Set<PVariable> getCandidateQuantifiedVariables();

+

+	protected PatternDescription pattern;

+	private Set<PVariable> deferringVariables;

+

+	/**

+	 * @param buildable

+	 * @param additionalAffectedVariables

+	 */

+	public PatternCallBasedDeferred(

+			PSystem<PatternDescription, StubHandle, ?> pSystem,

+			Tuple actualParametersTuple, PatternDescription pattern, 

+			Set<PVariable> additionalAffectedVariables) {

+		super(pSystem, union(actualParametersTuple.<PVariable>getDistinctElements(), additionalAffectedVariables));

+		this.actualParametersTuple = actualParametersTuple;

+		this.pattern = pattern;

+	}

+	public PatternCallBasedDeferred(

+			PSystem<PatternDescription, StubHandle, ?> pSystem,

+			Tuple actualParametersTuple, PatternDescription pattern) {

+		this(pSystem, actualParametersTuple, pattern, Collections.<PVariable>emptySet());

+	}

+

+	private static Set<PVariable> union(

+			Set<PVariable> a,

+			Set<PVariable> b) {

+		Set<PVariable> result = new HashSet<PVariable>();

+		result.addAll(a);

+		result.addAll(b);

+		return result;

+	}

+

+	@Override

+	protected Set<PVariable> getDeferringVariables() {

+		if (deferringVariables == null) {

+			deferringVariables = new HashSet<PVariable>();

+			for (PVariable var : getCandidateQuantifiedVariables()) {

+				if (var.isDeducable()) deferringVariables.add(var);

+			}

+		}

+		return deferringVariables;

+	}

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.BasePConstraint#checkSanity()

+	 */

+	@Override

+	public void checkSanity() throws RetePatternBuildException {

+		super.checkSanity();

+		for (Object obj : this.actualParametersTuple.getDistinctElements()) {

+			PVariable var = (PVariable) obj;

+			if (!getDeferringVariables().contains(var)) {

+				// so this is a free variable of the NAC / aggregation?

+				for (PConstraint pConstraint : var.getReferringConstraints()) { 

+					if (

+							pConstraint!=this && 

+							!(

+									pConstraint instanceof Equality<?, ?> && 

+									((Equality<?, ?>)pConstraint).isMoot()

+							)

+						) 

+					throw new RetePatternBuildException(

+							"Variable {1} of constraint {2} is not a positively determined part of the pattern, yet it is also affected by {3}.", 

+							new String[]{var.toString(), this.toString(), pConstraint.toString()}, 

+							null);

+				}

+			}

+		}

+

+	}

+

+	/**

+	 * @param stub

+	 * @param sideStub

+	 * @return

+	 */

+	protected BuildHelper.JoinHelper<StubHandle> getJoinHelper(Stub<StubHandle> stub, Stub<StubHandle> sideStub) {

+		BuildHelper.JoinHelper<StubHandle> joinHelper = new BuildHelper.JoinHelper<StubHandle>(stub, sideStub);

+		return joinHelper;

+	}

+

+	/**

+	 * @return

+	 * @throws RetePatternBuildException

+	 */

+	protected Stub<StubHandle> getSideStub() throws RetePatternBuildException {

+		Stub<StubHandle> sideStub = buildable.patternCallStub(actualParametersTuple, pattern);

+		sideStub = BuildHelper.enforceVariableCoincidences(buildable, sideStub);

+		return sideStub;

+	}

+

+	@Override

+	protected void doReplaceVariable(PVariable obsolete, PVariable replacement) {

+		if (deferringVariables != null) { 

+			throw new IllegalStateException("Cannot replace variables on " + this + 

+					" when deferring variables have already been identified.");

+		}

+		actualParametersTuple.replaceAll(obsolete, replacement);

+		doDoReplaceVariables(obsolete, replacement);

+	}

+

+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/PatternMatchCounter.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/PatternMatchCounter.java
new file mode 100644
index 0000000..61dde41
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicdeferred/PatternMatchCounter.java
@@ -0,0 +1,108 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicdeferred;

+

+import java.util.Collections;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.helpers.BuildHelper;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class PatternMatchCounter<PatternDescription, StubHandle> extends

+		PatternCallBasedDeferred<PatternDescription, StubHandle> {

+

+	private PVariable resultVariable;

+

+	/**

+	 * @param buildable

+	 * @param affectedVariables

+	 */

+	public PatternMatchCounter(

+			PSystem<PatternDescription, StubHandle, ?> pSystem,

+			Tuple actualParametersTuple, PatternDescription pattern, PVariable resultVariable) {

+		super(pSystem, actualParametersTuple, pattern, Collections.singleton(resultVariable));

+		this.resultVariable = resultVariable;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PConstraint#getDeducedVariables()

+	 */

+	@Override

+	public Set<PVariable> getDeducedVariables() {

+		return Collections.singleton(resultVariable);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicdeferred.PatternCallBasedDeferred#doDoReplaceVariables(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable)

+	 */

+	@Override

+	protected void doDoReplaceVariables(PVariable obsolete, PVariable replacement) {

+		if (resultVariable.equals(obsolete)) resultVariable = replacement;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicdeferred.PatternCallBasedDeferred#getCandidateQuantifiedVariables()

+	 */

+	@Override

+	protected Set<PVariable> getCandidateQuantifiedVariables() {

+		return actualParametersTuple.<PVariable>getDistinctElements();

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.DeferredPConstraint#doCheckOn(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub)

+	 */

+	@Override

+	protected Stub<StubHandle> doCheckOn(Stub<StubHandle> stub) throws RetePatternBuildException {

+		Stub<StubHandle> sideStub = getSideStub();

+		BuildHelper.JoinHelper<StubHandle> joinHelper = getJoinHelper(stub, sideStub);

+		Integer resultPositionLeft = stub.getVariablesIndex().get(resultVariable);

+		TupleMask primaryMask = joinHelper.getPrimaryMask();

+		TupleMask secondaryMask = joinHelper.getSecondaryMask();

+		if (resultPositionLeft == null) {

+			return buildable.buildCounterBetaNode(

+					stub, 

+					sideStub, 

+					primaryMask, 

+					secondaryMask, 

+					joinHelper.getComplementerMask(), 

+					resultVariable);

+		} else {

+			int resultPositionFinal = primaryMask.indices.length; // append to the last position

+			primaryMask = TupleMask.append(primaryMask, TupleMask.selectSingle(resultPositionLeft, primaryMask.sourceWidth));

+			return buildable.buildCountCheckBetaNode(

+					stub, 

+					sideStub, 

+					primaryMask, 

+					secondaryMask, 

+					resultPositionFinal);

+		}

+		

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.BasePConstraint#toStringRest()

+	 */

+	@Override

+	protected String toStringRest() {

+		return pattern.toString() + "@" + actualParametersTuple.toString() + "->" + resultVariable.toString();

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/ConstantValue.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/ConstantValue.java
new file mode 100644
index 0000000..d91b5da
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/ConstantValue.java
@@ -0,0 +1,49 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Buildable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.KeyedEnumerablePConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable; import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class ConstantValue<PatternDescription, StubHandle>

+		extends

+		KeyedEnumerablePConstraint<Object, PatternDescription, StubHandle> {

+

+	/**

+	 * @param buildable

+	 * @param variablesTuple

+	 * @param supplierKey

+	 */

+	public ConstantValue(

+			PSystem<PatternDescription, StubHandle, ?> pSystem,

+			PVariable variable, Object value) 

+	{

+		super(pSystem, new FlatTuple(variable), value);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.EnumerablePConstraint#doCreateStub()

+	 */

+	@Override

+	public Stub<StubHandle> doCreateStub() throws RetePatternBuildException {

+		return buildable.buildStartStub(new Object[]{supplierKey}, this.variablesTuple.getElements());

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/Containment.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/Containment.java
new file mode 100644
index 0000000..ac9d857
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/Containment.java
@@ -0,0 +1,53 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class Containment<PatternDescription, StubHandle> extends CoreModelRelationship<PatternDescription, StubHandle> {

+

+	/**

+	 * @param variablesTuple

+	 */

+	public Containment(

+			PSystem<PatternDescription, StubHandle, ?> pSystem, 

+			PVariable parent, 

+			PVariable child, 

+			boolean transitive) 

+	{

+		super(pSystem, parent, child, transitive);

+	}

+

+	/**

+	 * @return

+	 */

+	@Override

+	protected Stub<StubHandle> doCreateDirectStub() {

+		return buildable.containmentDirectStub(variablesTuple);

+	}

+

+	/**

+	 * @return

+	 */

+	@Override

+	protected Stub<StubHandle> doCreateTransitiveStub() {

+		return buildable.containmentTransitiveStub(variablesTuple);

+	}

+	

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/CoreModelRelationship.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/CoreModelRelationship.java
new file mode 100644
index 0000000..5041dd2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/CoreModelRelationship.java
@@ -0,0 +1,69 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Buildable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.EnumerablePConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable; import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;

+

+/**

+ * @author Bergmann Gábor

+ *

+ * @param <PatternDescription>

+ * @param <StubHandle>

+ */

+public abstract class CoreModelRelationship<PatternDescription, StubHandle>

+		extends EnumerablePConstraint<PatternDescription, StubHandle> {

+

+	protected boolean transitive;

+

+	protected abstract Stub<StubHandle> doCreateTransitiveStub();

+

+	protected abstract Stub<StubHandle> doCreateDirectStub();

+

+	/**

+	 * @param buildable

+	 * @param variablesTuple

+	 */

+	public CoreModelRelationship(

+			PSystem<PatternDescription, StubHandle, ?> pSystem, 

+			PVariable parent, 

+			PVariable child, 

+			boolean transitive) 

+	{

+		super(pSystem, new FlatTuple(parent, child));

+		this.transitive = transitive;

+	}

+

+	@Override

+	public Stub<StubHandle> doCreateStub() throws RetePatternBuildException {

+		return isTransitive() ? 

+				doCreateTransitiveStub() : 

+				doCreateDirectStub();

+	}

+

+	@Override

+	protected String toStringRestRest() {

+		return transitive ? "transitive" : "direct";

+	}

+

+	/**

+	 * @return the transitive

+	 */

+	public boolean isTransitive() {

+		return transitive;

+	}

+

+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/Generalization.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/Generalization.java
new file mode 100644
index 0000000..5306150
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/Generalization.java
@@ -0,0 +1,53 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Buildable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable; import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class Generalization<PatternDescription, StubHandle> extends

+		CoreModelRelationship<PatternDescription, StubHandle> {

+

+	/**

+	 * @param buildable

+	 * @param parent

+	 * @param child

+	 * @param transitive

+	 */

+	public Generalization(

+			PSystem<PatternDescription, StubHandle, ?> pSystem,

+			PVariable parent, PVariable child, boolean transitive) {

+		super(pSystem, parent, child, transitive);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables.CoreModelRelationship#doCreateTransitiveStub()

+	 */

+	@Override

+	protected Stub<StubHandle> doCreateTransitiveStub() {

+		return buildable.generalizationTransitiveStub(variablesTuple);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables.CoreModelRelationship#doCreateDirectStub()

+	 */

+	@Override

+	protected Stub<StubHandle> doCreateDirectStub() {

+		return buildable.generalizationDirectStub(variablesTuple);

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/Instantiation.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/Instantiation.java
new file mode 100644
index 0000000..588bddc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/Instantiation.java
@@ -0,0 +1,53 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Buildable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable; import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class Instantiation<PatternDescription, StubHandle> extends

+		CoreModelRelationship<PatternDescription, StubHandle> {

+

+	/**

+	 * @param buildable

+	 * @param parent

+	 * @param child

+	 * @param transitive

+	 */

+	public Instantiation(

+			PSystem<PatternDescription, StubHandle, ?> pSystem,

+			PVariable parent, PVariable child, boolean transitive) {

+		super(pSystem, parent, child, transitive);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables.CoreModelRelationship#doCreateTransitiveStub()

+	 */

+	@Override

+	protected Stub<StubHandle> doCreateTransitiveStub() {

+		return buildable.instantiationTransitiveStub(variablesTuple);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables.CoreModelRelationship#doCreateDirectStub()

+	 */

+	@Override

+	protected Stub<StubHandle> doCreateDirectStub() {

+		return buildable.instantiationDirectStub(variablesTuple);

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/PositivePatternCall.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/PositivePatternCall.java
new file mode 100644
index 0000000..f626f70
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/PositivePatternCall.java
@@ -0,0 +1,47 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.KeyedEnumerablePConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class PositivePatternCall<PatternDescription, StubHandle>

+		extends

+		KeyedEnumerablePConstraint<PatternDescription, PatternDescription, StubHandle> {

+

+	/**

+	 * @param buildable

+	 * @param variablesTuple

+	 * @param pattern

+	 */

+	public PositivePatternCall(

+			PSystem<PatternDescription, StubHandle, ?> pSystem,

+			Tuple variablesTuple, PatternDescription pattern) {

+		super(pSystem, variablesTuple, pattern);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.EnumerablePConstraint#doCreateStub()

+	 */

+	@Override

+	public Stub<StubHandle> doCreateStub() throws RetePatternBuildException {

+		return buildable.patternCallStub(variablesTuple, supplierKey);

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/TypeBinary.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/TypeBinary.java
new file mode 100644
index 0000000..5b7fd10
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/TypeBinary.java
@@ -0,0 +1,63 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.ITypeInfoProviderConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.KeyedEnumerablePConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class TypeBinary<PatternDescription, StubHandle> 

+	extends KeyedEnumerablePConstraint<Object, PatternDescription, StubHandle> 

+	implements ITypeInfoProviderConstraint

+{

+	private IPatternMatcherContext<PatternDescription> context;

+

+	/**

+	 * @param buildable

+	 * @param variablesTuple

+	 * @param typeKey

+	 */

+	public TypeBinary(

+			PSystem<PatternDescription, StubHandle, ?> pSystem,

+			IPatternMatcherContext<PatternDescription> context,

+			PVariable source, PVariable target, 

+			Object typeKey) {

+		super(pSystem, new FlatTuple(source, target), typeKey);

+		this.context = context;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.EnumerablePConstraint#doCreateStub()

+	 */

+	@Override

+	public Stub<StubHandle> doCreateStub() {

+		return buildable.binaryEdgeTypeStub(variablesTuple, supplierKey);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.ITypeInfoProviderConstraint#getTypeInfo(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable)

+	 */

+	@Override

+	public Object getTypeInfo(PVariable variable) {

+		if (variable.equals(variablesTuple.get(0))) return context.binaryEdgeSourceType(supplierKey);

+		if (variable.equals(variablesTuple.get(1))) return context.binaryEdgeTargetType(supplierKey);

+		return ITypeInfoProviderConstraint.TypeInfoSpecials.NO_TYPE_INFO_PROVIDED;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/TypeTernary.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/TypeTernary.java
new file mode 100644
index 0000000..2295c16
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/TypeTernary.java
@@ -0,0 +1,65 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.ITypeInfoProviderConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.KeyedEnumerablePConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class TypeTernary<PatternDescription, StubHandle> 

+	extends KeyedEnumerablePConstraint<Object, PatternDescription, StubHandle> 

+	implements ITypeInfoProviderConstraint

+{

+	private IPatternMatcherContext<PatternDescription> context;

+

+	/**

+	 * @param buildable

+	 * @param variablesTuple

+	 * @param supplierKey type info

+	 */

+	public TypeTernary(

+			PSystem<PatternDescription, StubHandle, ?> pSystem,

+			IPatternMatcherContext<PatternDescription> context,

+			PVariable edge, PVariable source, PVariable target, 

+			Object supplierKey) {

+		super(pSystem, new FlatTuple(edge, source, target), supplierKey);

+		this.context = context;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.EnumerablePConstraint#doCreateStub()

+	 */

+	@Override

+	public Stub<StubHandle> doCreateStub() {

+		return buildable.ternaryEdgeTypeStub(variablesTuple, supplierKey);

+	}

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.ITypeInfoProviderConstraint#getTypeInfo(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable)

+	 */

+	@Override

+	public Object getTypeInfo(PVariable variable) {

+		if (variable.equals(variablesTuple.get(0))) return ITypeInfoProviderConstraint.TypeInfoSpecials.wrapTernary(supplierKey);

+		if (variable.equals(variablesTuple.get(1))) return ITypeInfoProviderConstraint.TypeInfoSpecials.wrapAny(context.ternaryEdgeSourceType(supplierKey));

+		if (variable.equals(variablesTuple.get(2))) return ITypeInfoProviderConstraint.TypeInfoSpecials.wrapAny(context.ternaryEdgeTargetType(supplierKey));

+		return ITypeInfoProviderConstraint.TypeInfoSpecials.NO_TYPE_INFO_PROVIDED;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/TypeUnary.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/TypeUnary.java
new file mode 100644
index 0000000..89fc824
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/psystem/basicenumerables/TypeUnary.java
@@ -0,0 +1,58 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.ITypeInfoProviderConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.KeyedEnumerablePConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class TypeUnary<PatternDescription, StubHandle> 

+	extends KeyedEnumerablePConstraint<Object, PatternDescription, StubHandle> 

+	implements ITypeInfoProviderConstraint

+{

+	/**

+	 * @param buildable

+	 * @param variable

+	 * @param typeKey

+	 */

+	public TypeUnary(

+			PSystem<PatternDescription, StubHandle, ?> pSystem,

+			PVariable variable, Object typeKey) {

+		super(pSystem, new FlatTuple(variable), typeKey);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.EnumerablePConstraint#doCreateStub()

+	 */

+	@Override

+	public Stub<StubHandle> doCreateStub() {	

+		return buildable.unaryTypeStub(variablesTuple, supplierKey);

+	}

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.ITypeInfoProviderConstraint#getTypeInfo(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable)

+	 */

+	@Override

+	public Object getTypeInfo(PVariable variable) {

+		if (variable.equals(variablesTuple.get(0))) 

+			return ITypeInfoProviderConstraint.TypeInfoSpecials.wrapUnary(supplierKey);

+		return ITypeInfoProviderConstraint.TypeInfoSpecials.NO_TYPE_INFO_PROVIDED;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/quasitree/JoinCandidate.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/quasitree/JoinCandidate.java
new file mode 100644
index 0000000..0362e9e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/quasitree/JoinCandidate.java
@@ -0,0 +1,85 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.quasitree;

+

+import java.util.Collections;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+class JoinCandidate<StubHandle> {

+	Stub<StubHandle> primary;

+	Stub<StubHandle> secondary;

+	

+	Set<Object> varPrimary;

+	Set<Object> varSecondary;

+

+

+	JoinCandidate(Stub<StubHandle> primary, Stub<StubHandle> secondary) {

+		super();

+		this.primary = primary;

+		this.secondary = secondary;

+		

+		varPrimary = getPrimary().getVariablesSet();

+		varSecondary = getSecondary().getVariablesSet();

+

+	}

+	/**

+	 * @return the a

+	 */

+	public Stub<StubHandle> getPrimary() {

+		return primary;

+	}

+	/**

+	 * @return the b

+	 */

+	public Stub<StubHandle> getSecondary() {

+		return secondary;

+	}

+	

+	

+	

+	/* (non-Javadoc)

+	 * @see java.lang.Object#toString()

+	 */

+	@Override

+	public String toString() {

+		return primary.toString() + " |x| " + secondary.toString();

+	}

+	/**

+	 * @return the varPrimary

+	 */

+	public Set<Object> getVarPrimary() {

+		return varPrimary;

+	}

+	/**

+	 * @return the varSecondary

+	 */

+	public Set<Object> getVarSecondary() {

+		return varSecondary;

+	}

+

+	public boolean isTrivial() {

+		return getPrimary().equals(getSecondary()); 

+	}

+	public boolean isCheckOnly() {

+		return varPrimary.containsAll(varSecondary) || varSecondary.containsAll(varPrimary); 

+	}

+	public boolean isDescartes() {

+		return Collections.disjoint(varPrimary, varSecondary); 

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/quasitree/JoinOrderingHeuristics.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/quasitree/JoinOrderingHeuristics.java
new file mode 100644
index 0000000..6bfa529
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/quasitree/JoinOrderingHeuristics.java
@@ -0,0 +1,48 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.quasitree;

+

+import java.util.Comparator;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util.OrderingCompareAgent;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class JoinOrderingHeuristics<PatternDescription, StubHandle, Collector> implements Comparator<JoinCandidate<StubHandle>> {

+

+

+	/* (non-Javadoc)

+	 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)

+	 */

+	@Override

+	public int compare(JoinCandidate<StubHandle> jc1, JoinCandidate<StubHandle> jc2) {

+		return new OrderingCompareAgent<JoinCandidate<StubHandle>>(jc1, jc2) {

+			@Override

+			protected void doCompare() {

+				swallowBoolean(true 

+				&& consider(preferTrue(a.isTrivial(), b.isTrivial()))

+				&& consider(preferTrue(a.isCheckOnly(), b.isCheckOnly()))

+				&& consider(preferFalse(a.isDescartes(), b.isDescartes()))

+				

+				// TODO main heuristic decisions

+				

+				&& consider(preferLess(a.toString(), b.toString()))

+				);

+			}			

+		}.compare();

+		

+	}

+	

+	

+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/quasitree/QuasiTreeLayout.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/quasitree/QuasiTreeLayout.java
new file mode 100644
index 0000000..8e0fe40
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/construction/quasitree/QuasiTreeLayout.java
@@ -0,0 +1,158 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.quasitree;

+

+import java.util.ArrayList;

+import java.util.Collections;

+import java.util.LinkedHashSet;

+import java.util.List;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Buildable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.IReteLayoutStrategy;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.helpers.BuildHelper;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.helpers.LayoutHelper;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.DeferredPConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.EnumerablePConstraint;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util.Options;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class QuasiTreeLayout<PatternDescription, StubHandle, Collector>

+		implements

+		IReteLayoutStrategy<PatternDescription, StubHandle, Collector> {

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.IReteLayoutStrategy#layout(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem)

+	 */

+	@Override

+	public Stub<StubHandle> layout(PSystem<PatternDescription, StubHandle, Collector> pSystem) throws RetePatternBuildException {

+		return new Scaffold(pSystem).run();

+	}

+	

+	public class Scaffold {

+		PSystem<PatternDescription, StubHandle, Collector> pSystem;

+		PatternDescription pattern;

+		IPatternMatcherContext<PatternDescription> context;

+		Buildable<PatternDescription, StubHandle, Collector> buildable;

+

+		Set<DeferredPConstraint> deferredConstraints = null;

+		Set<Stub<StubHandle>> forefront = new LinkedHashSet<Stub<StubHandle>>();

+

+		Scaffold(PSystem<PatternDescription, StubHandle, Collector> pSystem) {

+			this.pSystem = pSystem;

+			pattern = pSystem.getPattern();

+			context = pSystem.getContext();

+			buildable = pSystem.getBuildable();

+		}

+

+		/**

+		 * @return

+		 */

+		public Stub<StubHandle> run() throws RetePatternBuildException {

+			try {

+				context.logDebug(getClass().getSimpleName() + ": patternbody build started");

+				

+				// UNIFICATION AND WEAK INEQUALITY ELMINATION

+				LayoutHelper.unifyVariablesAlongEqualities(pSystem);

+				LayoutHelper.eliminateWeakInequalities(pSystem);

+			

+				// UNARY ELIMINATION WITH TYPE INFERENCE

+				if (Options.calcImpliedTypes) {

+					LayoutHelper.eliminateInferrableUnaryTypes(pSystem, context);

+				}

+				

+				// PREVENTIVE CHECKS

+				LayoutHelper.checkSanity(pSystem);

+				

+				// PROCESS CONSTRAINTS

+				deferredConstraints = pSystem.getConstraintsOfType(DeferredPConstraint.class);

+				Set<EnumerablePConstraint> enumerables = 

+					pSystem.getConstraintsOfType(EnumerablePConstraint.class);

+				for (EnumerablePConstraint<PatternDescription, StubHandle> enumerable : enumerables) {

+					Stub<StubHandle> stub = enumerable.getStub();

+					admitStub(stub);

+				}

+				if (enumerables.isEmpty()) { // EXTREME CASE

+					Stub<StubHandle> stub = buildable.buildStartStub(new Object[]{}, new Object[]{});

+					admitStub(stub);

+				}

+	

+				// JOIN FOREFRONT STUBS WHILE POSSIBLE

+				while (forefront.size() > 1) {

+					// TODO QUASI-TREE TRIVIAL JOINS?

+					

+					List<JoinCandidate<StubHandle>> candidates = generateJoinCandidates();				 

+					JoinOrderingHeuristics<PatternDescription, StubHandle, Collector> ordering = 

+						new JoinOrderingHeuristics<PatternDescription, StubHandle, Collector>();

+					JoinCandidate<StubHandle> selectedJoin = Collections.min(candidates, ordering);

+					doJoin(selectedJoin.getPrimary(), selectedJoin.getSecondary());

+				}

+				

+				// FINAL CHECK, whether all exported variables are present

+				assert(forefront.size() == 1);

+				Stub<StubHandle> finalStub = forefront.iterator().next();

+				LayoutHelper.finalCheck(pSystem, finalStub);

+				

+				context.logDebug(getClass().getSimpleName() + ": patternbody build concluded");

+				return finalStub;

+			} catch (RetePatternBuildException ex) {

+				ex.setPatternDescription(pattern);

+				throw ex;

+			}	

+		}

+

+		public List<JoinCandidate<StubHandle>> generateJoinCandidates() {

+			List<JoinCandidate<StubHandle>> candidates = new ArrayList<JoinCandidate<StubHandle>>();

+			int bIndex = 0;

+			for (Stub<StubHandle> b : forefront) {

+				int aIndex = 0;

+				for (Stub<StubHandle> a : forefront) {

+					if (aIndex++ >= bIndex) break; 

+					candidates.add(new JoinCandidate<StubHandle>(a, b));

+				}	

+				bIndex++;

+			}

+			return candidates;

+		}

+

+

+		private void admitStub(Stub<StubHandle> stub) throws RetePatternBuildException {

+			for (DeferredPConstraint<PatternDescription, StubHandle> deferred : deferredConstraints) {

+				if (!stub.getAllEnforcedConstraints().contains(deferred)) {

+					if (deferred.isReadyAt(stub)) {

+						admitStub(deferred.checkOn(stub));

+						return;

+					}			

+				}

+			}

+			forefront.add(stub);

+		}

+		

+		private void doJoin(Stub<StubHandle> primaryStub, Stub<StubHandle> secondaryStub) throws RetePatternBuildException {

+			Stub<StubHandle> joinedStub = BuildHelper.naturalJoin(buildable, primaryStub, secondaryStub);

+			forefront.remove(primaryStub);

+			forefront.remove(secondaryStub);

+			admitStub(joinedStub);

+		}

+		

+	}

+	

+

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/AggregatorNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/AggregatorNode.java
new file mode 100644
index 0000000..e478a6f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/AggregatorNode.java
@@ -0,0 +1,177 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index;

+

+import java.util.Collection;

+import java.util.Collections;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.StandardNode;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.LeftInheritanceTuple;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;

+

+/**

+ * A special node depending on a projection indexer to aggregate tuple groups with the same projection.

+ * Only propagates the aggregates of non-empty groups. Use the outer indexers to circumvent.

+ * @author Bergmann Gábor

+ *

+ */

+public abstract class AggregatorNode extends StandardNode {

+

+	ProjectionIndexer projection;

+	AggregatorNode me;

+	

+	AggregatorOuterIndexer aggregatorOuterIndexer = null;

+	AggregatorOuterIdentityIndexer[] aggregatorOuterIdentityIndexers = null; 

+

+	/**

+	 * @param reteContainer

+	 * @param projection the projection indexer whose tuple groups should be aggregated

+	 */

+	public AggregatorNode(ReteContainer reteContainer, ProjectionIndexer projection) {

+		super(reteContainer);

+		this.me = this;

+		this.projection = projection;

+		projection.attachListener(new IndexerListener(){

+			

+			public void notifyIndexerUpdate(Direction direction, Tuple updateElement, Tuple signature, boolean change) {

+				aggregateUpdate(direction, updateElement, signature, change);

+			}

+		});		

+	}

+

+	/**

+	 * Aggregates (reduces) a group of tuples.

+	 * The group can be null.

+	 */

+	public abstract Object aggregateGroup(Tuple signature, Collection<Tuple> group);

+

+	/**

+	 * Aggregates (reduces) a group of tuples, while also returning the previous aggregated value (before the update).

+	 * @return an array of length 2: {previousAggregate, currentAggregate}

+	 */	

+	public abstract Object[] aggregateGroupBeforeAndNow(Tuple signature, Collection<Tuple> currentGroup, Direction direction, Tuple updateElement, boolean change);

+

+	

+	protected Tuple aggregateAndPack(Tuple signature, Collection<Tuple> group) {

+		return packResult(signature, aggregateGroup(signature, group));

+	}

+	

+	public AggregatorOuterIndexer getAggregatorOuterIndexer() {

+		if (aggregatorOuterIndexer==null) 

+			aggregatorOuterIndexer = new AggregatorOuterIndexer();

+		return aggregatorOuterIndexer;

+	}	

+	

+	public AggregatorOuterIdentityIndexer getAggregatorOuterIdentityIndexer(int resultPositionInSignature) {

+		if (aggregatorOuterIdentityIndexers==null) 

+			aggregatorOuterIdentityIndexers = new AggregatorOuterIdentityIndexer[projection.getMask().indices.length + 1];

+		if (aggregatorOuterIdentityIndexers[resultPositionInSignature]==null)

+			aggregatorOuterIdentityIndexers[resultPositionInSignature] = new AggregatorOuterIdentityIndexer(resultPositionInSignature);

+		return aggregatorOuterIdentityIndexers[resultPositionInSignature];

+	}	

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier#pullInto(java.util.Collection)

+	 */

+	public void pullInto(Collection<Tuple> collector) {

+		reteContainer.flushUpdates();

+		

+		for (Tuple signature: projection.getSignatures()) {

+			collector.add(aggregateAndPack(signature, projection.get(signature)));

+		}

+	}

+	

+	protected Tuple packResult(Tuple signature, Object result) {

+		Object[] resultArray = {result};

+		return new LeftInheritanceTuple(signature, resultArray);

+	}

+	

+	protected void aggregateUpdate(Direction direction, Tuple updateElement, Tuple signature, boolean change) {

+		Collection<Tuple> currentGroup = projection.get(signature);

+		Object[] aggregatedResults = aggregateGroupBeforeAndNow(signature, currentGroup, direction, updateElement, change);

+		propagate(Direction.REVOKE, packResult(signature, aggregatedResults[0]), signature);

+		propagate(Direction.INSERT, packResult(signature, aggregatedResults[1]), signature);

+	}

+	

+	protected void propagate(Direction direction, Tuple packResult, Tuple signature) {

+		propagateUpdate(direction, packResult);

+		if (aggregatorOuterIndexer!=null) aggregatorOuterIndexer.propagate(direction, packResult, signature);

+		if (aggregatorOuterIdentityIndexers!=null) 

+			for (AggregatorOuterIdentityIndexer aggregatorOuterIdentityIndexer : aggregatorOuterIdentityIndexers)

+				aggregatorOuterIdentityIndexer.propagate(direction, packResult, signature);

+	}

+	

+	/**

+	 * A special non-iterable index that retrieves the aggregated, packed result (signature+aggregate) for the original signature.

+	 * @author Bergmann Gábor

+	 */

+	class AggregatorOuterIndexer extends StandardIndexer {

+		public AggregatorOuterIndexer() {

+			super(me.reteContainer, projection.getMask());

+			this.parent = me.projection.getParent();

+		}

+

+		public Collection<Tuple> get(Tuple signature) {	

+			return Collections.singleton(aggregateAndPack(signature, projection.get(signature)));

+		}

+

+		public void propagate(Direction direction, Tuple packResult, Tuple signature) {

+			propagate(direction, packResult, signature, true);

+		}

+	}

+	/**

+	 * A special non-iterable index that checks a suspected aggregate value for a given signature. 

+	 * The signature for this index is the original signature of the projection index, 

+	 * 	with the suspected result inserted at position resultPositionInSignature.

+	 * @author Bergmann Gábor

+	 */

+	

+	class AggregatorOuterIdentityIndexer extends StandardIndexer {

+		int resultPositionInSignature;

+		TupleMask pruneResult;

+		TupleMask reorder; 

+		

+		public AggregatorOuterIdentityIndexer(int resultPositionInSignature) {

+			super(me.reteContainer, projection.getMask());

+			this.parent = me.projection.getParent();

+			this.resultPositionInSignature = resultPositionInSignature;

+			int sizeWithResult = projection.getMask().indices.length + 1;

+			this.pruneResult = TupleMask.omit(resultPositionInSignature, sizeWithResult);

+			if (resultPositionInSignature == sizeWithResult - 1)

+				this.reorder = null;

+			else 

+				this.reorder = TupleMask.displace(sizeWithResult-1, resultPositionInSignature, sizeWithResult);

+		}

+

+		public Collection<Tuple> get(Tuple signatureWithResult) {

+			Tuple prunedSignature = pruneResult.transform(signatureWithResult);

+			Object result = aggregateGroup(prunedSignature, projection.get(prunedSignature));

+			if (signatureWithResult.get(resultPositionInSignature).equals(result))

+				return Collections.singleton(signatureWithResult);

+			else 

+				return null;

+		}

+

+		public void propagate(Direction direction, Tuple packResult, Tuple signature) {

+			Tuple updateElement;

+			if (reorder == null)

+				updateElement = packResult;

+			else 

+				updateElement = reorder.transform(packResult);

+			propagate(direction, updateElement, updateElement, true);

+		}		

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/CountNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/CountNode.java
new file mode 100644
index 0000000..7b7e2b5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/CountNode.java
@@ -0,0 +1,56 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index;

+

+import java.util.Collection;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+

+/**

+ * An aggregation node that simply count the number of tuples conforming to the signature.

+ * @author Bergmann Gábor

+ *

+ */

+public class CountNode extends AggregatorNode {

+	

+

+	public CountNode(ReteContainer reteContainer, ProjectionIndexer projection) {

+		super(reteContainer, projection);

+	}

+

+

+	int sizeOf(Collection<Tuple> group) {

+		return group==null ? 0 : group.size();

+	}

+

+

+	@Override

+	public Object aggregateGroup(Tuple signature, Collection<Tuple> group) {

+		return sizeOf(group);

+	}

+

+	@Override

+	public Object[] aggregateGroupBeforeAndNow(Tuple signature,

+			Collection<Tuple> currentGroup, Direction direction,

+			Tuple updateElement, boolean change) 

+	{

+		int currentSize = sizeOf(currentGroup);

+		int previousSize = (direction==Direction.INSERT) ? currentSize - 1 : currentSize + 1;

+		Object[] result = {previousSize, currentSize};

+		return result;

+	}

+

+

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/DualInputNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/DualInputNode.java
new file mode 100644
index 0000000..dad526c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/DualInputNode.java
@@ -0,0 +1,201 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index;
+
+import java.util.Collection;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.StandardNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util.Options;
+
+
+/**
+ * Abstract superclass for nodes with two inputs that are matched against each
+ * other.
+ * 
+ * @author Gabor Bergmann
+ */
+public abstract class DualInputNode extends StandardNode /* implements Pullable */{
+
+	/**
+	 * @author Gabor Bergmann
+	 * 
+	 */
+	public enum Side {
+		PRIMARY, SECONDARY;
+
+		public Side opposite() {
+			switch (this) {
+			case PRIMARY:
+				return SECONDARY;
+			case SECONDARY:
+				return PRIMARY;
+			default:
+				return PRIMARY;
+			}
+		}
+	}
+
+	/**
+	 * Holds the primary input slot of this node.
+	 */
+	protected IterableIndexer primarySlot;
+
+	/**
+	 * Holds the secondary input slot of this node.
+	 */
+	protected Indexer secondarySlot;
+
+	/**
+	 * Optional complementer mask
+	 */
+	protected TupleMask complementerSecondaryMask;
+
+	/**
+	 * @param reteContainer
+	 */
+	public DualInputNode(ReteContainer reteContainer, IterableIndexer primarySlot,
+			Indexer secondarySlot, TupleMask complementerSecondaryMask) {
+		super(reteContainer);
+		this.complementerSecondaryMask = complementerSecondaryMask;
+		this.primarySlot = primarySlot;
+		this.secondarySlot = secondarySlot;
+		final DualInputNode me = this;
+		primarySlot.attachListener(new IndexerListener() {
+			public void notifyIndexerUpdate(Direction direction, Tuple updateElement, Tuple signature, boolean change) {
+				notifyUpdate(Side.PRIMARY, direction, updateElement, signature, change);
+			}	
+			@Override
+			public String toString() {
+				return "primary@"+me;
+			}
+		});
+		secondarySlot.attachListener(new IndexerListener() {
+			public void notifyIndexerUpdate(Direction direction, Tuple updateElement, Tuple signature, boolean change) {
+				notifyUpdate(Side.SECONDARY, direction, updateElement, signature, change);
+			}	
+			@Override
+			public String toString() {
+				return "secondary@"+me;
+			}
+		});		
+	}
+
+	
+	// public Indexer createPrimarySlot(TupleMask mask)
+	// {
+	// return accessSlot(mask, Side.PRIMARY);
+	// }
+	//
+	// public Indexer createSecondarySlot(TupleMask mask)
+	// {
+	// return accessSlot(mask, Side.SECONDARY);
+	// }
+	//	
+	// public Indexer accessSlot(TupleMask mask, Side side)
+	// {
+	// Indexer slot = slots.get(side);
+	// if (slot == null)
+	// {
+	// slot = new Indexer(network, mask);
+	// slot.attachListener(this, side);
+	// slots.put(side, slot);
+	// }
+	// return slot;
+	// }
+
+	/**
+	 * Helper: retrieves all stored substitutions from the opposite side memory.
+	 * The results are copied into a new collection; this step has a performance
+	 * penalty, but avoids ConcurrentModificaton Exceptions when loops are
+	 * present.
+	 * 
+	 * @return the collection of opposite substitutions if any, or null if none
+	 */
+	protected Collection<Tuple> retrieveOpposites(Side side, Tuple signature) {
+		Collection<Tuple> opposites = getSlot(side.opposite()).get(signature);
+		return opposites;
+		// if (opposites!=null) return new LinkedList<Tuple>(opposites);
+		// else return null;
+	}
+
+	/**
+	 * Helper: unifies a left and right partial matching.
+	 */
+	protected Tuple unify(Tuple left, Tuple right) {
+//		if (complementerSecondaryMask == null)
+//			return secondarySlot.getMask().combine(left, right,
+//					Options.enableInheritance, false);
+//		else
+			return complementerSecondaryMask.combine(left, right,
+					Options.enableInheritance, true);
+	}
+
+	/**
+	 * Helper: unifies the a substitution from the specifies side with another
+	 * substitution from the other side.
+	 */
+	protected Tuple unify(Side side, Tuple ps, Tuple opposite) {
+		switch (side) {
+		case PRIMARY:
+			return unify(ps, opposite);
+		case SECONDARY:
+			return unify(opposite, ps);
+		default:
+			return null;
+		}
+	}
+
+	/**
+	 * Abstract handler for update event.
+	 * 
+	 * @param side
+	 *            The side on which the event occured.
+	 * @param direction
+	 *            The direction of the update.
+	 * @param updateElement
+	 *            The partial matching that is inserted.
+	 * @param signature
+	 *            Masked signature of updateElement.
+	 * @param change
+	 *            Indicates whether this is/was the first/last instance of this
+	 *            signature in this slot.
+	 */
+	public abstract void notifyUpdate(Side side, Direction direction,
+			Tuple updateElement, Tuple signature, boolean change);
+
+	/**
+	 * Simulates the behaviour of the node for calibration purposes only.
+	 */
+	public abstract Tuple calibrate(Tuple primary, Tuple secondary);
+
+	/**
+	 * @param complementerSecondaryMask
+	 *            the complementerSecondaryMask to set
+	 */
+	public void setComplementerSecondaryMask(
+			TupleMask complementerSecondaryMask) {
+		this.complementerSecondaryMask = complementerSecondaryMask;
+	}
+
+	/**
+	 * Retrieves the slot corresponding to the specified side.
+	 */
+	protected Indexer getSlot(Side side) {
+		if (side==Side.PRIMARY) 
+			return primarySlot;
+		else return secondarySlot;
+	}
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/ExistenceNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/ExistenceNode.java
new file mode 100644
index 0000000..f0c3575
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/ExistenceNode.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index;
+
+import java.util.Collection;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+
+/**
+ * Propagates all substitutions arriving at the PRIMARY slot if and only if (a
+ * matching substitution on the SECONDARY is present) xor (NEGATIVE).
+ * 
+ * The negative parameter specifies whether this node checks for existence or
+ * non-existence.
+ * 
+ * @author Gabor Bergmann
+ */
+public class ExistenceNode extends DualInputNode {
+
+	protected boolean negative;
+
+	/**
+	 * @param reteContainer
+	 * @param primarySlot
+	 * @param secondarySlot
+	 * @param negative
+	 *            if false, act as axistence checker, otherwise a
+	 *            nonexistence-checker
+	 */
+	public ExistenceNode(ReteContainer reteContainer, IterableIndexer primarySlot,
+			Indexer secondarySlot, boolean negative) {
+		super(reteContainer, primarySlot, secondarySlot, null);
+		this.negative = negative;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.DualInputNode#calibrate(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple,
+	 * org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple)
+	 */
+	@Override
+	public Tuple calibrate(Tuple primary, Tuple secondary) {
+		return primary;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.DualInputNode#notifyUpdate(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.DualInputNode.Side,
+	 * org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple, boolean)
+	 */
+	@Override
+	public void notifyUpdate(Side side, Direction direction,
+			Tuple updateElement, Tuple signature, boolean change) {
+		switch (side) {
+		case PRIMARY:
+			if ((retrieveOpposites(side, signature) != null) ^ negative)
+				propagateUpdate(direction, updateElement);
+			break;
+		case SECONDARY:
+			if (change) {
+				Collection<Tuple> opposites = retrieveOpposites(side, signature);
+				if (opposites != null)
+					for (Tuple opposite : opposites) {
+						propagateUpdate((negative ? direction.opposite()
+								: direction), opposite);
+					}
+			}
+			break;
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier#pullInto(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver)
+	 */
+	public void pullInto(Collection<Tuple> collector) {
+		reteContainer.flushUpdates();
+
+		for (Tuple signature : primarySlot.getSignatures()) {
+			Collection<Tuple> primaries = primarySlot.get(signature); // not null due to the contract of IterableIndex.getSignatures()
+			Collection<Tuple> opposites = secondarySlot.get(signature);
+			if ((opposites != null) ^ negative)
+				collector.addAll(primaries);
+		}
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/GenericProjectionIndexer.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/GenericProjectionIndexer.java
new file mode 100644
index 0000000..f54c68c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/GenericProjectionIndexer.java
@@ -0,0 +1,61 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index;

+

+import java.util.Collection;

+import java.util.Iterator;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;

+

+

+/**

+ * A generic Indexer capable of indexing along any valid TupleMask. 

+ * Does not keep track of parents, because will not ever pull parents.

+ * @author Bergmann Gábor

+ *

+ */

+public class GenericProjectionIndexer extends MemoryIndexer implements ProjectionIndexer {

+

+	/**

+	 * @param side

+	 * @param node

+	 */

+	public GenericProjectionIndexer(ReteContainer reteContainer, TupleMask mask) {

+		super(reteContainer, mask);

+	}

+

+	@Override

+	protected void update(Direction direction, Tuple updateElement, Tuple signature, boolean change) {

+		propagate(direction, updateElement,signature, change);

+	}

+

+	public Collection<Tuple> get(Tuple signature) {

+		return memory.get(signature);

+	}

+

+	public Iterator<Tuple> iterator() {

+		return memory.iterator();

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.IterableIndexer#getSignatures()

+	 */

+	 public Collection<Tuple> getSignatures() {

+		return memory.getSignatures();

+	}

+

+	

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/IdentityIndexer.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/IdentityIndexer.java
new file mode 100644
index 0000000..198b93c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/IdentityIndexer.java
@@ -0,0 +1,77 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index;

+

+import java.util.Collection;

+import java.util.Collections;

+import java.util.Iterator;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;

+

+

+/**

+ * Defines a trivial indexer that identically projects the contents of a memory-equipped node, and can therefore save space.

+ * Can only exist in connection with a memory, and must be operated by another node. Do not attach parents directly!

+ * @author Bergmann Gábor

+ */

+

+public class IdentityIndexer extends StandardIndexer implements ProjectionIndexer {

+	Collection<Tuple> memory;

+

+	/**

+	 * @param reteContainer

+	 * @param tupleWidth the width of the tuples of memoryNode

+	 * @param memory the memory whose contents are to be identity-indexed

+	 * @param parent the parent node that owns the memory

+	 */

+	public IdentityIndexer(ReteContainer reteContainer, int tupleWidth, Collection<Tuple> memory, Supplier parent) {

+		super(reteContainer, TupleMask.identity(tupleWidth));

+		this.memory = memory;

+		this.parent = parent;

+	}

+	

+	public Collection<Tuple> get(Tuple signature) {

+		if (memory.contains(signature)) {

+			return Collections.singleton(signature);

+		} else return null;

+	}

+

+	public Collection<Tuple> getSignatures() {

+		return memory;

+	}

+

+	public Iterator<Tuple> iterator() {

+		return memory.iterator();

+	}

+

+

+	public void appendParent(Supplier supplier) {

+		throw new UnsupportedOperationException("An identityIndexer allows no explicit parent nodes");

+	}

+

+	public void removeParent(Supplier supplier) {

+		throw new UnsupportedOperationException("An identityIndexer allows no explicit parent nodes");

+	}

+

+	public void update(Direction direction, Tuple updateElement) {

+		throw new UnsupportedOperationException("An identityIndexer allows no explicit parent nodes");

+	}

+

+	public void propagate(Direction direction, Tuple updateElement) {

+		propagate(direction, updateElement, updateElement, true);	

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/Indexer.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/Indexer.java
new file mode 100644
index 0000000..e184d55
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/Indexer.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index;
+
+import java.util.Collection;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Node;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;
+
+
+/**
+ * A node that indexes incoming Tuples by their signatures as specified by a
+ * TupleMask. Notifies listeners about such update events through the IndexerListener.
+ * 
+ * Signature tuples are created by transforming the update tuples using the mask. 
+ * Tuples stored with the same signature are grouped together. The group or a reduction thereof is retrievable.
+ * @author Gabor Bergmann
+ */
+public interface Indexer extends Node {
+	/**
+	 * @return the mask by which the contents are indexed.
+	 */
+	public TupleMask getMask();
+	
+	/**
+	 * @return the node whose contents are indexed.
+	 */
+	public Supplier getParent();
+	
+	/**
+	 * @return all stored tuples that conform to the specified signature, null if there are none such.
+	 * CONTRACT: do not modify!
+	 */
+	public Collection<Tuple> get(Tuple signature);
+
+	public void attachListener(IndexerListener listener);
+	public void detachListener(IndexerListener listener);
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/IndexerListener.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/IndexerListener.java
new file mode 100644
index 0000000..aee6cf2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/IndexerListener.java
@@ -0,0 +1,32 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+

+/**

+ * A listener for update events concerning an Indexer. 

+ * @author Bergmann Gábor

+ *

+ */

+public interface IndexerListener {

+	/**

+	 * Notifies recipient that the indexer has just received an update. 

+	 * Contract: indexer already reflects the updated state.

+	 * @param direction the direction of the update.

+	 * @param updateElement the tuple that was updated.

+	 * @param signature the signature of the tuple according to the indexer's mask.

+	 * @param change whether this was the first inserted / last revoked update element with this particular signature. 

+	 */

+	void notifyIndexerUpdate(Direction direction, Tuple updateElement, Tuple signature, boolean change);

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/IterableIndexer.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/IterableIndexer.java
new file mode 100644
index 0000000..72bc944
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/IterableIndexer.java
@@ -0,0 +1,31 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index;

+

+import java.util.Collection;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+

+/**

+ * An indexer that allows the iteration of all retrievable tuple groups (or reduced groups).

+ * 

+ * @author Bergmann Gábor

+ *

+ */

+public interface IterableIndexer extends Indexer, Iterable<Tuple> {

+

+	/**

+	 * A collection consisting of exactly those signatures whose tuple group is not empty

+	 * CONTRACT: do not modify

+	 */

+	public Collection<Tuple> getSignatures();

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/JoinNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/JoinNode.java
new file mode 100644
index 0000000..2b64cfb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/JoinNode.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index;
+
+import java.util.Collection;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+
+/**
+ * @author Gabor Bergmann
+ * 
+ */
+public class JoinNode extends DualInputNode {
+
+	/**
+	 * @param reteContainer
+	 * @param primarySlot
+	 * @param secondarySlot
+	 */
+	public JoinNode(ReteContainer reteContainer, IterableIndexer primarySlot,
+			Indexer secondarySlot, TupleMask complementerSecondaryMask) {
+		super(reteContainer, primarySlot, secondarySlot,
+				complementerSecondaryMask);
+		// TODO Auto-generated constructor stub
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.DualInputNode#calibrate(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple,
+	 * org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple)
+	 */
+	@Override
+	public Tuple calibrate(Tuple primary, Tuple secondary) {
+		return unify(primary, secondary);
+	}
+
+//	public static Tuple calibrate(Tuple primary, Tuple secondary,
+//			TupleMask complementerSecondaryMask) {
+//		return complementerSecondaryMask.combine(primary, secondary,
+//				Options.enableInheritance, true);
+//	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.DualInputNode#notifyUpdate(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.DualInputNode.Side,
+	 * org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple, boolean)
+	 */
+	@Override
+	public void notifyUpdate(Side side, Direction direction,
+			Tuple updateElement, Tuple signature, boolean change) {
+		Collection<Tuple> opposites = retrieveOpposites(side, signature);
+		if (opposites != null)
+			for (Tuple opposite : opposites) {
+				propagateUpdate(direction, unify(side, updateElement, opposite));
+			}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier#pullInto(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver)
+	 */
+	public void pullInto(Collection<Tuple> collector) {
+		reteContainer.flushUpdates();
+
+		for (Tuple signature : primarySlot.getSignatures()) {
+			Collection<Tuple> primaries = primarySlot.get(signature); // not null due to the contract of IterableIndex.getSignatures()
+			Collection<Tuple> opposites = secondarySlot.get(signature);
+			if (opposites != null)
+				for (Tuple ps: primaries) for (Tuple opposite : opposites) {
+					collector.add(unify(Side.PRIMARY, ps, opposite));
+				}
+		}
+
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/MemoryIndexer.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/MemoryIndexer.java
new file mode 100644
index 0000000..6eafb50
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/MemoryIndexer.java
@@ -0,0 +1,68 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.MaskedTupleMemory;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public abstract class MemoryIndexer extends StandardIndexer {

+

+	protected MaskedTupleMemory memory;

+

+	/**

+	 * @param reteContainer

+	 * @param mask

+	 */

+	public MemoryIndexer(ReteContainer reteContainer, TupleMask mask) {

+		super(reteContainer, mask);

+		this.memory = new MaskedTupleMemory(mask);

+		reteContainer.registerClearable(memory);		

+	}

+

+	public void update(Direction direction, Tuple updateElement) {

+		Tuple signature = mask.transform(updateElement);

+		boolean change = (direction == Direction.INSERT) ? memory.add(

+				updateElement, signature) : memory.remove(updateElement,

+				signature);

+		update(direction, updateElement,signature, change);

+	}

+

+	/**

+	 * Refined version of update

+	 */

+	protected abstract void update(Direction direction, Tuple updateElement, Tuple signature, boolean change);

+

+	public void appendParent(Supplier supplier) {

+		if (parent == null) 

+			parent = supplier;

+		else

+			throw new UnsupportedOperationException("Illegal RETE edge: " + this + " already has a parent (" +  

+					parent + ") and cannot connect to additional parent (" + supplier + 

+					"). ");

+	}

+

+	public void removeParent(Supplier supplier) {

+		if (parent == supplier) 

+			parent = null;

+		else

+			throw new IllegalArgumentException("Illegal RETE edge removal: the parent of " + this + " is not " + supplier);

+	}

+

+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/NullIndexer.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/NullIndexer.java
new file mode 100644
index 0000000..30b380d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/NullIndexer.java
@@ -0,0 +1,82 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index;

+

+import java.util.Collection;

+import java.util.Collections;

+import java.util.Iterator;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+

+

+/**

+ * Defines a trivial indexer that projects the contents of a memory-equipped node to the empty tuple, and can therefore save space.

+ * Can only exist in connection with a memory, and must be operated by another node. Do not attach parents directly!

+ * @author Bergmann Gábor

+ */

+public class NullIndexer extends StandardIndexer implements ProjectionIndexer {

+

+	Collection<Tuple> memory;

+	static Object[] empty = {};

+	static Tuple nullSignature = new FlatTuple(empty);

+	static Collection<Tuple> nullSingleton = Collections.singleton(nullSignature);

+	static Collection<Tuple> emptySet = Collections.emptySet();

+	

+	/**

+	 * @param reteContainer

+	 * @param tupleWidth the width of the tuples of memoryNode

+	 * @param memory the memory whose contents are to be null-indexed

+	 * @param parent the parent node that owns the memory

+	 */

+	public NullIndexer(ReteContainer reteContainer, int tupleWidth, Collection<Tuple> memory, Supplier parent) {

+		super(reteContainer, TupleMask.linear(0, tupleWidth));

+		this.memory = memory;

+		this.parent = parent;

+	}

+

+	public Collection<Tuple> get(Tuple signature) {

+		if (nullSignature.equals(signature)) return memory.isEmpty()? null :memory;

+		else return null;

+	}

+

+	public Collection<Tuple> getSignatures() {

+		return memory.isEmpty() ? emptySet : nullSingleton;

+	}

+

+	public Iterator<Tuple> iterator() {

+		return memory.iterator();

+	}

+

+

+	public void appendParent(Supplier supplier) {

+		throw new UnsupportedOperationException("A nullIndexer allows no explicit parent nodes");

+	}

+

+	public void removeParent(Supplier supplier) {

+		throw new UnsupportedOperationException("A nullIndexer allows no explicit parent nodes");

+	}

+

+

+	public void update(Direction direction, Tuple updateElement) {

+		throw new UnsupportedOperationException("A nullIndexer allows no explicit parent nodes");

+	}

+

+	public void propagate(Direction direction, Tuple updateElement, boolean change) {

+		propagate(direction, updateElement, nullSignature, change);

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/OnetimeIndexer.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/OnetimeIndexer.java
new file mode 100644
index 0000000..9d457fc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/OnetimeIndexer.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index;
+
+import java.util.Collection;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+
+/**
+ * @author Gabor Bergmann Indexer whose lifetime last until the first get() DO
+ *         NOT connect to nodes!
+ */
+public class OnetimeIndexer extends GenericProjectionIndexer {
+
+	public OnetimeIndexer(ReteContainer reteContainer, TupleMask mask) {
+		super(reteContainer, mask);
+	}
+
+	@Override
+	public Collection<Tuple> get(Tuple signature) {
+		if (org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util.Options.releaseOnetimeIndexers) {
+			reteContainer.unregisterClearable(memory);
+			reteContainer.unregisterNode(this);
+		}
+		return super.get(signature);
+	}
+
+	@Override
+	public void appendParent(Supplier supplier) {
+		throw new UnsupportedOperationException(
+				"onetime indexer cannot have parents");
+	}
+
+	@Override
+	public void attachListener(IndexerListener listener) {
+		throw new UnsupportedOperationException(
+				"onetime indexer cannot have listeners");
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/OuterJoinNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/OuterJoinNode.java
new file mode 100644
index 0000000..f377dc5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/OuterJoinNode.java
@@ -0,0 +1,105 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index;

+

+import java.util.Collection;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;

+

+/**

+ * Performs a left outer join.

+ * 

+ * @author Bergmann Gábor

+ *

+ */

+public class OuterJoinNode extends DualInputNode {

+	final Tuple defaults;

+

+	/**

+	 * @param reteContainer

+	 * @param primarySlot

+	 * @param secondarySlot

+	 * @param complementerSecondaryMask

+	 * @param defaults the default line to use instead of missing elements if a left tuple has no match

+	 * 

+	 */

+	public OuterJoinNode(ReteContainer reteContainer,

+			IterableIndexer primarySlot, Indexer secondarySlot,

+			TupleMask complementerSecondaryMask, Tuple defaults) {

+		super(reteContainer, primarySlot, secondarySlot,

+				complementerSecondaryMask);

+		this.defaults = defaults;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.DualInputNode#calibrate(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple)

+	 */

+	@Override

+	public Tuple calibrate(Tuple primary, Tuple secondary) {

+		return unify(primary, secondary);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.DualInputNode#notifyUpdate(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.DualInputNode.Side, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple, boolean)

+	 */

+	@Override

+	public void notifyUpdate(Side side, Direction direction,

+			Tuple updateElement, Tuple signature, boolean change) {

+		Collection<Tuple> opposites = retrieveOpposites(side, signature);

+		switch (side) {

+		case PRIMARY:

+			if (opposites != null)

+				for (Tuple opposite : opposites) {

+					propagateUpdate(direction, unify(updateElement, opposite));

+				}

+			else 

+				propagateUpdate(direction, unifyWithDefaults(updateElement));

+			break;

+		case SECONDARY:

+			if (opposites != null)

+				for (Tuple opposite : opposites) {

+					propagateUpdate(direction, unify(opposite, updateElement));

+					if (change)

+						propagateUpdate(direction.opposite(), unifyWithDefaults(opposite));

+				}

+			break;

+		}

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier#pullInto(java.util.Collection)

+	 */

+	public void pullInto(Collection<Tuple> collector) {

+		reteContainer.flushUpdates();

+

+		for (Tuple signature : primarySlot.getSignatures()) {

+			Collection<Tuple> primaries = primarySlot.get(signature); // not null due to the contract of IterableIndex.getSignatures()

+			Collection<Tuple> opposites = secondarySlot.get(signature);

+			if (opposites != null)

+				for (Tuple ps: primaries) for (Tuple opposite : opposites) {

+					collector.add(unify(Side.PRIMARY, ps, opposite));

+				}

+			else

+				for (Tuple ps: primaries) {

+					collector.add(unifyWithDefaults(ps));

+				}

+		}

+	}

+

+	private Tuple unifyWithDefaults(Tuple ps) {

+		return unify(ps, defaults);

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/ProjectionIndexer.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/ProjectionIndexer.java
new file mode 100644
index 0000000..6fa8aeb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/ProjectionIndexer.java
@@ -0,0 +1,24 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver;

+

+/**

+ * An iterable indexer that receives updates from a node, and groups received tuples intact, i.e. it does not reduce tuple groups.

+ * 

+ * @author Bergmann Gábor

+ *

+ */

+public interface ProjectionIndexer extends Receiver, IterableIndexer {

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/StandardIndexer.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/StandardIndexer.java
new file mode 100644
index 0000000..1ea475a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/index/StandardIndexer.java
@@ -0,0 +1,103 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index;

+

+import java.util.ArrayList;

+import java.util.List;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+

+

+/**

+ * An abstract standard implementation of the Indexer interface, providing common bookkeeping functionality.

+ * @author Bergmann Gábor

+ *

+ */

+public abstract class StandardIndexer implements Indexer {

+	

+	protected ReteContainer reteContainer;

+	protected long nodeId;

+	protected Object tag;

+	protected Supplier parent;

+	protected List<IndexerListener> listeners;

+	protected TupleMask mask;

+

+	public StandardIndexer(ReteContainer reteContainer, TupleMask mask) {

+		super();

+		this.reteContainer = reteContainer;

+		this.nodeId = reteContainer.registerNode(this);

+		this.parent = null;

+		this.mask = mask;

+		this.listeners = new ArrayList<IndexerListener>();

+	}

+	

+	protected void propagate(Direction direction, Tuple updateElement, Tuple signature, boolean change) {

+		for (IndexerListener listener : listeners) {

+			listener.notifyIndexerUpdate(direction, updateElement, signature, change);

+		}

+	}

+

+	/**

+	 * @return the mask

+	 */

+	public TupleMask getMask() {

+		return mask;

+	}

+

+	public Supplier getParent() {

+		return parent;

+	}

+

+	public void attachListener(IndexerListener listener) {

+		listeners.add(listener);

+	}

+

+	public void detachListener(IndexerListener listener) {

+		listeners.remove(listener);

+	}

+

+	public ReteContainer getContainer() {

+		return reteContainer;

+	}

+

+	public long getNodeId() {

+		return nodeId;

+	}

+

+	/**

+	 * @return the tag

+	 */

+	public Object getTag() {

+		return tag;

+	}

+

+	/**

+	 * @param tag

+	 *            the tag to set

+	 */

+	public void setTag(Object tag) {

+		this.tag = tag;

+	}

+

+	@Override

+	public String toString() {

+		if (tag != null)

+			return "[" + nodeId+ "]" + getClass().getSimpleName() + "("+ parent + "/"+ mask+")" + " [[" + tag.toString() + "]]";

+		else

+			return "[" + nodeId+ "]" + getClass().getSimpleName() + "("+ parent + "/"+ mask+")";

+	};

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/matcher/IPatternMatcherContext.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/matcher/IPatternMatcherContext.java
new file mode 100644
index 0000000..cedd7b6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/matcher/IPatternMatcherContext.java
@@ -0,0 +1,85 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher;

+

+import java.util.Collection;

+

+

+/**

+ * Represents all knowledge of the outside world towards the pattern matcher, 

+ * but without specific run-time or build-time information.

+ * 

+ * @author Bergmann Gábor

+ *

+ * @param <PatternDescription> the type describing a pattern

+ */

+public interface IPatternMatcherContext<PatternDescription> {

+		

+	/**

+	 * @return TERNARY if edges have their own identity, BINARY if they are only pairs of source and target

+	 */

+	EdgeInterpretation edgeInterpretation();

+	public enum EdgeInterpretation {

+		TERNARY /*VPM*/,

+		BINARY /*EMF*/

+	}

+	

+	

+	Object ternaryEdgeTargetType(Object typeObject);	// TODO global supertypes?

+	Object ternaryEdgeSourceType(Object typeObject);	// TODO global supertypes?

+	Object binaryEdgeTargetType(Object typeObject);	// TODO global supertypes?

+	Object binaryEdgeSourceType(Object typeObject);	// TODO global supertypes?

+	

+	

+	/**

+	 * @return the direction in which  sub/supertypes arequeryable

+	 */

+	GeneralizationQueryDirection allowedGeneralizationQueryDirection();

+	public enum GeneralizationQueryDirection {

+		SUPERTYPE_ONLY /*EMF*/,

+		BOTH /*VPM*/

+	}	

+	

+	boolean isUnaryType(Object typeObject);

+	Collection<? extends Object> enumerateDirectUnarySubtypes(Object typeObject);

+	Collection<? extends Object> enumerateDirectUnarySupertypes(Object typeObject);

+	boolean isTernaryEdgeType(Object typeObject);

+	Collection<? extends Object> enumerateDirectTernaryEdgeSubtypes(Object typeObject);

+	Collection<? extends Object> enumerateDirectTernaryEdgeSupertypes(Object typeObject);

+	boolean isBinaryEdgeType(Object typeObject);

+	Collection<? extends Object> enumerateDirectBinaryEdgeSubtypes(Object typeObject);	

+	Collection<? extends Object> enumerateDirectBinaryEdgeSupertypes(Object typeObject);

+	

+	Collection<? extends Object> enumerateDirectSupertypes(Object typeObject);

+	Collection<? extends Object> enumerateDirectSubtypes(Object typeObject);

+

+//	boolean checkBelowContainer(Object container, Object contained);

+//	boolean checkInContainer(Object container, Object contained);

+	

+	void reportPatternDependency(PatternDescription pattern);

+	

+	//Logger getLogger();

+	void logError(String message);

+	void logError(String message, Throwable cause);

+	void logWarning(String message);

+	void logWarning(String message, Throwable cause);

+	void logDebug(String message);

+

+

+

+

+

+

+	

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/matcher/IPatternMatcherRuntimeContext.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/matcher/IPatternMatcherRuntimeContext.java
new file mode 100644
index 0000000..6d4428e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/matcher/IPatternMatcherRuntimeContext.java
@@ -0,0 +1,71 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.IManipulationListener;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.IPredicateTraceListener;

+

+

+

+/**

+ * Represents all knowledge of the outside world, that is needed durin runtime operation, towards the pattern matcher.

+ *  

+ * @author Bergmann Gábor

+ *

+ */

+public interface IPatternMatcherRuntimeContext<PatternDescription> extends

+		IPatternMatcherContext<PatternDescription> {

+

+	// ---------------------------------------------------------------------------------	

+	

+	

+	/**

+	 * @pre: network, framework, boundary, disconnectables initialised

+	 */

+	IManipulationListener subscribePatternMatcherForUpdates(ReteEngine<PatternDescription> engine);

+	/**

+	 * @pre: boundary, disconnectables initialised

+	 */

+	IPredicateTraceListener subscribePatternMatcherForTraceInfluences(ReteEngine<PatternDescription> engine);

+

+	Object ternaryEdgeTarget(Object relation);

+	Object ternaryEdgeSource(Object relation);

+

+	void enumerateAllUnaries(ModelElementCrawler crawler);

+	void enumerateAllTernaryEdges(ModelElementCrawler crawler);

+	void enumerateAllBinaryEdges(ModelElementPairCrawler crawler);	// first=from, second=to

+

+	void enumerateDirectUnaryInstances(Object typeObject, ModelElementCrawler crawler);

+	void enumerateDirectTernaryEdgeInstances(Object typeObject, ModelElementCrawler crawler);

+	void enumerateDirectBinaryEdgeInstances(Object typeObject, ModelElementPairCrawler crawler);	// first=from, second=to	

+

+	void enumerateAllUnaryInstances(Object typeObject, ModelElementCrawler crawler);

+	void enumerateAllTernaryEdgeInstances(Object typeObject, ModelElementCrawler crawler);

+	void enumerateAllBinaryEdgeInstances(Object typeObject, ModelElementPairCrawler crawler);	// first=from, second=to	

+

+	void enumerateAllUnaryContainments(ModelElementPairCrawler crawler);	// first=container, second=contained

+	void enumerateAllInstantiations(ModelElementPairCrawler crawler);	// first=type, second=instance

+	void enumerateAllGeneralizations(ModelElementPairCrawler crawler);	// first=supertype, second=subtype

+

+	void modelReadLock();

+	void modelReadUnLock();

+

+	public abstract void finishCoalescing();

+	public abstract void startCoalescing();

+

+	interface ModelElementCrawler {

+		public void crawl(Object modelElement);

+	}

+	interface ModelElementPairCrawler {

+		public void crawl(Object first, Object second);

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/matcher/IPatternMatcherStringTypedContext.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/matcher/IPatternMatcherStringTypedContext.java
new file mode 100644
index 0000000..77c419b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/matcher/IPatternMatcherStringTypedContext.java
@@ -0,0 +1,36 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+

+/**

+ * 

+ * @author Bergmann Gábor

+ *

+ */

+public interface IPatternMatcherStringTypedContext<PatternDescription> extends

+		IPatternMatcherContext<PatternDescription> {

+

+	//	String retrieveUnaryTypeFQN(Object typeObject);

+	//	String retrieveTernaryEdgeTypeFQN(Object typeObject);	

+	//	String retrieveBinaryEdgeTypeFQN(Object typeObject);

+		

+	Object resolveConstant(String fullyQualifiedName) throws RetePatternBuildException; //Type? Instance? Entity? Relation? Who knows?

+

+	Object retrieveBinaryEdgeType(String fullyQualifiedName) throws RetePatternBuildException;

+

+	Object retrieveTernaryEdgeType(String fullyQualifiedName) throws RetePatternBuildException;

+

+	Object retrieveUnaryType(String fullyQualifiedName) throws RetePatternBuildException;

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/matcher/ReteEngine.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/matcher/ReteEngine.java
new file mode 100644
index 0000000..6f40855
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/matcher/ReteEngine.java
@@ -0,0 +1,473 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.Disconnectable;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.IManipulationListener;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.IPredicateTraceListener;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.ReteBoundary;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.IRetePatternBuilder;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.Indexer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Library;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Network;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Production;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.Address;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;
+
+
+/**
+ * @author Gabor Bergmann
+ * 
+ */
+public class ReteEngine<PatternDescription> {
+
+	protected Network reteNet;
+	protected int reteThreads;
+	protected ReteBoundary<PatternDescription> boundary;
+	
+	protected IPatternMatcherRuntimeContext<PatternDescription> context;
+	
+	protected Collection<Disconnectable> disconnectables;
+	protected IManipulationListener manipulationListener;
+	protected IPredicateTraceListener traceListener;
+	// protected MachineListener machineListener;
+
+	protected Map<PatternDescription, RetePatternMatcher> matchers;
+//	protected Map<GTPattern, Map<Map<Integer, Scope>, RetePatternMatcher>> matchersScoped; // (pattern, scopemap) -> matcher
+	
+	protected IRetePatternBuilder<PatternDescription, Address<? extends Supplier>, Address<? extends Receiver>> builder;
+
+	protected boolean parallelExecutionEnabled; // TRUE if Viatra can go on
+												// while RETE does its job.
+	
+	protected BlockingQueue<Throwable> caughtExceptions;
+	
+	/**
+	 * These runnables will be called after updates by the manipulationListener at its own discretion.
+	 */
+	protected Set<Runnable> afterUpdateCallbacks;
+	
+	/**
+	 * @param context the context of the pattern matcher, conveying all information from the outside world.
+	 * @param reteThreads the number of threads to operate the RETE network with; 
+	 * 	0 means single-threaded operation, 
+	 * 	1 starts an asynchronous thread to operate the RETE net, 
+	 * 	>1 uses multiple RETE containers.
+	 */
+	public ReteEngine(IPatternMatcherRuntimeContext<PatternDescription> context, int reteThreads) {
+		super();
+		this.context = context;
+		this.reteThreads = reteThreads;
+		this.afterUpdateCallbacks = new HashSet<Runnable>();
+		// this.framework = new WeakReference<IFramework>(context.getFramework());
+
+		initEngine();
+
+		this.builder = null;
+	}
+
+	/**
+	 * initializes engine components
+	 */
+	void initEngine() {
+		this.parallelExecutionEnabled = reteThreads > 0;
+		
+		this.disconnectables = new LinkedList<Disconnectable>();
+		this.caughtExceptions = new LinkedBlockingQueue<Throwable>();
+
+		this.reteNet = new Network(reteThreads);
+		this.boundary = new ReteBoundary<PatternDescription>(this); // prerequisite: network
+
+		
+		this.matchers = new HashMap<PatternDescription, RetePatternMatcher>();
+		/*this.matchersScoped = new HashMap<PatternDescription, Map<Map<Integer,Scope>,RetePatternMatcher>>();*/
+		
+				
+		//prerequisite: network, framework, boundary, disconnectables
+		this.manipulationListener = context.subscribePatternMatcherForUpdates(this); 
+		// prerequisite: boundary, disconnectables
+		this.traceListener = context.subscribePatternMatcherForTraceInfluences(this); 
+
+	}
+
+	/**
+	 * deconstructs engine components
+	 */
+	void deconstructEngine() {
+		reteNet.kill();
+
+		for (Disconnectable disc : disconnectables) {
+			disc.disconnect();
+		}
+
+		this.matchers = null;
+		this.disconnectables = null;
+
+		this.reteNet = null;
+		this.boundary = null;
+
+		// this.machineListener = new MachineListener(this); // prerequisite:
+		// framework, disconnectables
+		this.manipulationListener = null;
+		this.traceListener = null;
+
+	}
+
+	/**
+	 * Deconstructs the engine to get rid of it finally
+	 */
+	public void killEngine() {
+		deconstructEngine();
+		// this.framework = null;
+		this.builder = null;
+	}
+
+	/**
+	 * Resets the engine to an after-initialization phase
+	 * 
+	 */
+	public void reset() {
+		deconstructEngine();
+
+		initEngine();
+
+		builder.refresh();
+	}
+
+	/**
+	 * Accesses the patternmatcher for a given pattern, constructs one if
+	 * a matcher is not available yet.
+	 * 
+	 * @pre: builder is set.
+	 * @param gtPattern
+	 *            the pattern to be matched.
+	 * @return a patternmatcher object that can match occurences of the given
+	 *         pattern.
+	 * @throws RetePatternBuildException
+	 *             if construction fails.
+	 */
+	public synchronized RetePatternMatcher accessMatcher(PatternDescription gtPattern) throws RetePatternBuildException {
+		RetePatternMatcher matcher;
+		// String namespace = gtPattern.getNamespace().getName();
+		// String name = gtPattern.getName();
+		// String fqn = namespace + "." + name;
+		matcher = matchers.get(gtPattern);
+		if (matcher == null) {
+			context.modelReadLock();
+			try {
+				if (parallelExecutionEnabled) reteNet.getStructuralChangeLock().lock();
+				context.startCoalescing();
+				try {
+					Address<? extends Production> prodNode;
+					prodNode = boundary.accessProduction(gtPattern);
+
+					matcher = new RetePatternMatcher(this, prodNode);
+					matchers.put(gtPattern, matcher);
+				} finally {
+					context.finishCoalescing();
+					if (parallelExecutionEnabled) reteNet.getStructuralChangeLock().unlock();
+				}
+				settle();
+			} finally {
+				context.modelReadUnLock();
+			}
+			// reteNet.flushUpdates();
+		}
+
+		return matcher;
+	}
+
+	/**
+	 * Constructs RETE pattern matchers for a collection of patterns, if they are not available yet. 
+	 * Model traversal during the whole construction period is coalesced (which may have an effect on performance,
+	 * depending on the matcher context).
+	 * 
+	 * @pre: builder is set.
+	 * @param patterns the patterns to be matched.
+	 * @throws RetePatternBuildException if construction fails.
+	 */
+	public synchronized void buildMatchersCoalesced(Collection<PatternDescription> patterns) throws RetePatternBuildException {
+		context.modelReadLock();
+		try {
+			if (parallelExecutionEnabled) reteNet.getStructuralChangeLock().lock();		
+			context.startCoalescing();
+			try {
+				for (PatternDescription gtPattern : patterns) {
+					boundary.accessProduction(gtPattern);				
+				}
+			} finally {
+				context.finishCoalescing();
+				if (parallelExecutionEnabled) reteNet.getStructuralChangeLock().unlock();
+			}
+			settle();
+		} finally {
+			context.modelReadUnLock();
+		}
+	}	
+	
+//	/**
+//	 * Accesses the patternmatcher for a given pattern with additional scoping, constructs one if
+//	 * a matcher is not available yet.
+//	 * 
+//	 * @param gtPattern
+//	 *            the pattern to be matched.
+//	 * @param additionalScopeMap
+//	 *            additional, optional scopes for the symbolic parameters 
+//	 *            maps the position of the symbolic parameter to its additional scope (if any)
+//	 *            @pre: scope.parent is non-root, i.e. this is a nontrivial constraint
+//	 *            use the static method RetePatternMatcher.buildAdditionalScopeMap() to create from PatternCallSignature
+//	 * @return a patternmatcher object that can match occurences of the given
+//	 *         pattern.
+//	 * @throws PatternMatcherCompileTimeException
+//	 *             if construction fails.
+//	 */
+//	public synchronized RetePatternMatcher accessMatcherScoped(PatternDescription gtPattern, Map<Integer, Scope> additionalScopeMap)
+//			throws PatternMatcherCompileTimeException {
+//		if (additionalScopeMap.isEmpty()) return accessMatcher(gtPattern);		
+//		
+//		RetePatternMatcher matcher;
+//		
+//		Map<Map<Integer, Scope>, RetePatternMatcher> scopes = matchersScoped.get(gtPattern);
+//		if (scopes == null) {
+//			scopes = new HashMap<Map<Integer, Scope>, RetePatternMatcher>();
+//			matchersScoped.put(gtPattern, scopes);
+//		}
+//		
+//		matcher = scopes.get(additionalScopeMap);
+//		if (matcher == null) {
+//			context.modelReadLock();
+//			try {
+//				reteNet.getStructuralChangeLock().lock();
+//				try {
+//					Address<? extends Production> prodNode;
+//					prodNode = boundary.accessProductionScoped(gtPattern, additionalScopeMap);
+//
+//					matcher = new RetePatternMatcher(this, prodNode);
+//					scopes.put(additionalScopeMap, matcher);
+//				} finally {
+//					reteNet.getStructuralChangeLock().unlock();
+//				}
+//			} finally {
+//				context.modelReadUnLock();
+//			}
+//			// reteNet.flushUpdates();
+//		}
+//
+//		return matcher;
+//	}	
+	
+	/**
+	 * Returns an indexer that groups the contents of this Production node by
+	 * their projections to a given mask. Designed to be called by a
+	 * RetePatternMatcher.
+	 * 
+	 * @param production
+	 *            the production node to be indexed.
+	 * @param mask
+	 *            the mask that defines the projection.
+	 * @return the Indexer.
+	 */
+	synchronized Indexer accessProjection(Production production,
+			TupleMask mask) {
+		Library library = reteNet.getHeadContainer().getLibrary();
+		Indexer result = library.peekProjectionIndexer(production, mask);
+		if (result == null) {
+			context.modelReadLock();
+			try {
+				if (parallelExecutionEnabled) reteNet.getStructuralChangeLock().lock();
+				try {
+					result = library.accessProjectionIndexerOnetime(production, mask);
+				} finally {
+					if (parallelExecutionEnabled) reteNet.getStructuralChangeLock().unlock();
+				}
+			} finally {
+				context.modelReadUnLock();
+			}
+		}
+
+		return result;
+	}
+
+	// /**
+	// * Retrieves the patternmatcher for a given pattern fqn, returns null if
+	// the matching network hasn't been constructed yet.
+	// *
+	// * @param fqn the fully qualified name of the pattern to be matched.
+	// * @return the previously constructed patternmatcher object that can match
+	// occurences of the given pattern, or null if it doesn't exist.
+	// */
+	// public RetePatternMatcher getMatcher(String fqn)
+	// {
+	// RetePatternMatcher matcher = matchersByFqn.get(fqn);
+	// if (matcher == null)
+	// {
+	// Production prodNode = boundary.getProduction(fqn);
+	//			
+	// matcher = new RetePatternMatcher(this, prodNode);
+	// matchersByFqn.put(fqn, matcher);
+	// }
+	//		
+	// return matcher;
+	// }
+
+	/**
+	 * Waits until the pattern matcher is in a steady state and output can be
+	 * retrieved.
+	 */
+	public void settle() {
+		reteNet.waitForReteTermination();
+	}
+
+	/**
+	 * Waits until the pattern matcher is in a steady state and output can be
+	 * retrieved. When steady state is reached, a retrieval action is executed
+	 * before the steady state ceases.
+	 * 
+	 * @param action
+	 *            the action to be run when reaching the steady-state.
+	 */
+	public void settle(Runnable action) {
+		reteNet.waitForReteTermination(action);
+	}
+
+//	/**
+//	 * @return the framework
+//	 */
+//	public IFramework getFramework() {
+//		return framework.get();
+//	}
+
+	/**
+	 * @return the reteNet
+	 */
+	public Network getReteNet() {
+		return reteNet;
+	}
+
+	/**
+	 * @return the boundary
+	 */
+	public ReteBoundary<PatternDescription> getBoundary() {
+		return boundary;
+	}
+
+	// /**
+	// * @return the pattern matcher builder
+	// */
+	// public IRetePatternBuilder getBuilder() {
+	// return builder;
+	// }
+
+	/**
+	 * @param builder
+	 *            the pattern matcher builder to set
+	 */
+	public void setBuilder(IRetePatternBuilder<PatternDescription, Address<? extends Supplier>, Address<? extends Receiver>> builder) {
+		this.builder = builder;
+	}
+
+	/**
+	 * @return the manipulationListener
+	 */
+	public IManipulationListener getManipulationListener() {
+		return manipulationListener;
+	}
+
+	/**
+	 * @return the traceListener
+	 */
+	public IPredicateTraceListener geTraceListener() {
+		return traceListener;
+	}
+
+	/**
+	 * @param disc
+	 *            the new Disconnectable adapter.
+	 */
+	public void addDisconnectable(Disconnectable disc) {
+		disconnectables.add(disc);
+	}
+
+	/**
+	 * @return the parallelExecutionEnabled
+	 */
+	public boolean isParallelExecutionEnabled() {
+		return parallelExecutionEnabled;
+	}
+
+
+	/**
+	 * @return the context
+	 */
+	public IPatternMatcherRuntimeContext<PatternDescription> getContext() {
+		return context;
+	}
+
+	public IRetePatternBuilder<PatternDescription, Address<? extends Supplier>, Address<? extends Receiver>> getBuilder() {
+		return builder;
+	}
+
+	/**
+	 * For internal use only: logs exceptions occurring during term evaluation inside the RETE net.
+	 * @param e
+	 */
+	public void logEvaluatorException(Throwable e) {
+		try {
+			caughtExceptions.put(e);
+		} catch (InterruptedException e1) {
+			logEvaluatorException(e);
+		}
+	}
+	/**
+	 * Polls the exceptions caught and logged during term evaluation by this RETE engine.
+	 * Recommended usage: iterate polling until null is returned.
+	 * 
+	 * @return the next caught exception, or null if there are no more.
+	 */
+	public Throwable getNextLoggedEvaluatorException() {
+		return caughtExceptions.poll();
+	}
+	
+	/**
+	 * These runnables will be called after updates by the manipulationListener at its own discretion.
+	 * Can be used e.g. to check delta monitors.
+	 */
+	public Set<Runnable> getAfterUpdateCallbacks() {
+		return afterUpdateCallbacks;
+	}	
+	/**
+	 * The manipulationListener will run this after updates.
+	 * If there are any such, updates are settled before they are run. 
+	 */
+	public void runAfterUpdateCallbacks() {
+		if (!afterUpdateCallbacks.isEmpty()) {
+			settle();
+			for (Runnable runnable : new ArrayList<Runnable>(afterUpdateCallbacks)) {
+				runnable.run();
+			}
+		}
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/matcher/RetePatternMatcher.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/matcher/RetePatternMatcher.java
new file mode 100644
index 0000000..3588d5f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/matcher/RetePatternMatcher.java
@@ -0,0 +1,277 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.ReteBoundary;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.Indexer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Production;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.Address;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.TransformerNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+
+
+/**
+ * @author Gabor Bergmann
+ * 
+ */
+public class RetePatternMatcher extends TransformerNode {
+
+	protected ReteEngine<?> engine;
+	protected ReteBoundary<?> boundary;
+	protected Production productionNode;
+	protected HashMap<Object, Integer> posMapping;
+	protected boolean connected = false; // is rete-wise connected to the
+											// production node?
+
+
+	/**
+	 * @param productionNode
+	 *            a production node that matches this pattern without any
+	 *            parameter bindings 
+	 * @pre: Production must be local to the head
+	 *            container
+	 */
+	public RetePatternMatcher(ReteEngine<?> engine,
+			Address<? extends Production> productionNode) {
+		super(engine.getReteNet().getHeadContainer());
+		this.engine = engine;
+		this.boundary = engine.getBoundary();
+		if (!engine.getReteNet().getHeadContainer().isLocal(productionNode))
+			throw new IllegalArgumentException(
+					"@pre: Production must be local to the head container");
+		this.productionNode = engine.getReteNet().getHeadContainer()
+				.resolveLocal(productionNode);
+		this.posMapping = this.productionNode.getPosMapping();
+	}
+
+	// /**
+	// * @return the productionNode
+	// */
+	// public Production getProductionNode() {
+	// return productionNode;
+	// }
+
+	public Tuple matchOneRandomly(Object[] inputMapping) {
+		ArrayList<Tuple> allMatches = matchAll(inputMapping, null);
+		if (allMatches == null || allMatches.isEmpty()) return null;
+		else return allMatches.get((int)(Math.random() * allMatches.size()));
+	}
+	public ArrayList<Tuple> matchAll(Object[] inputMapping, boolean[] fixed) {
+		// retrieving the projection
+		TupleMask mask = new TupleMask(fixed);
+		Tuple inputSignature = mask.transform(new FlatTuple(inputMapping));
+
+		AllMatchFetcher fetcher = new AllMatchFetcher(engine.accessProjection(
+				productionNode, mask), boundary.wrapTuple(inputSignature));
+		engine.reteNet.waitForReteTermination(fetcher);
+		ArrayList<Tuple> unscopedMatches = fetcher.getMatches();
+
+		// checking scopes
+		if (unscopedMatches == null) return new ArrayList<Tuple>();
+		else return unscopedMatches;
+
+	}
+	public Tuple matchOne(Object[] inputMapping, boolean[] fixed) {
+		// retrieving the projection
+		TupleMask mask = new TupleMask(fixed);
+		Tuple inputSignature = mask.transform(new FlatTuple(inputMapping));
+
+		SingleMatchFetcher fetcher = new SingleMatchFetcher(engine.accessProjection(
+				productionNode, mask), boundary.wrapTuple(inputSignature));
+		engine.reteNet.waitForReteTermination(fetcher);
+		return fetcher.getMatch();
+	}
+	
+	/**
+	 * Counts the number of occurrences of the pattern that match inputMapping
+	 * on positions where fixed is true.
+	 * 
+	 * @return the number of occurrences
+	 */
+	public int count(Object[] inputMapping, boolean[] fixed) {
+		TupleMask mask = new TupleMask(fixed);
+		Tuple inputSignature = mask.transform(new FlatTuple(inputMapping));
+
+		CountFetcher fetcher = new CountFetcher(engine.accessProjection(
+				productionNode, mask), boundary.wrapTuple(inputSignature));
+		engine.reteNet.waitForReteTermination(fetcher);
+
+		return fetcher.getCount();
+	}
+
+	/**
+	 * Connects a new external receiver that will receive update notifications
+	 * from now on. The receiver will practically connect to the production
+	 * node, the added value is unwrapping the updates for external use.
+	 * 
+	 * @param synchronize
+	 *            if true, the contents of the production node will be inserted
+	 *            into the receiver after the connection is established.
+	 */
+	public synchronized void connect(Receiver receiver, boolean synchronize) {
+		if (!connected) { // connect to the production node as a RETE-child
+			reteContainer.connect(productionNode, this);
+			connected = true;
+		}
+		if (synchronize)
+			reteContainer.connectAndSynchronize(this, receiver);
+		else
+			reteContainer.connect(this, receiver);
+	}
+
+	/**
+	 * @return the posMapping
+	 */
+	public HashMap<Object, Integer> getPosMapping() {
+		return posMapping;
+	}
+
+	@Override
+	protected Tuple transform(Tuple input) {
+		return boundary.unwrapTuple(input);
+	}
+
+	abstract class AbstractMatchFetcher implements Runnable { 
+		Indexer indexer;
+		Tuple signature;
+		
+		public AbstractMatchFetcher(Indexer indexer, Tuple signature) {
+			super();
+			this.indexer = indexer;
+			this.signature = signature;
+		}
+		
+		public void run() {
+			fetch(indexer.get(signature));
+		}
+
+		protected abstract void fetch(Collection<Tuple> matches);
+		
+	}
+	
+	class AllMatchFetcher extends AbstractMatchFetcher {
+
+		public AllMatchFetcher(Indexer indexer, Tuple signature) {
+			super(indexer, signature);
+		}
+
+		ArrayList<Tuple> matches = null;
+
+		public ArrayList<Tuple> getMatches() {
+			return matches;
+		}
+
+
+		@Override
+		protected void fetch(Collection<Tuple> matches) {
+			if (matches==null) this.matches = null;
+			else {
+				this.matches = new ArrayList<Tuple>(matches.size());
+				int i=0;
+				for (Tuple t : matches) 
+					this.matches.add(i++, boundary.unwrapTuple(t));
+			}
+			 
+		}
+
+	}
+
+	class SingleMatchFetcher extends AbstractMatchFetcher {
+
+		public SingleMatchFetcher(Indexer indexer, Tuple signature) {
+			super(indexer, signature);
+		}
+
+		Tuple match = null;
+		
+		public Tuple getMatch() {
+			return match;
+		}
+
+		@Override
+		protected void fetch(Collection<Tuple> matches) {
+			if (matches != null && !matches.isEmpty()) 
+				match = boundary.unwrapTuple(matches.iterator().next());
+		}
+
+//		public void run() {
+//			Collection<Tuple> unscopedMatches = indexer.get(signature);
+//
+//			// checking scopes
+//			if (unscopedMatches != null) {
+//				for (Tuple um : /* productionNode */unscopedMatches) {
+//					match = boundary.unwrapTuple(um); 
+//					return;
+//					
+////					Tuple ps = boundary.unwrapTuple(um);
+////					boolean ok = true;
+////					if (!ignoreScope) for (int k = 0; (k < ps.getSize()) && ok; k++) {
+////						if (pcs[k].getParameterMode() == ParameterMode.INPUT) {
+////							// ok = ok && (inputMapping[k]==ps.elements[k]);
+////							// should now be true
+////						} else // ParameterMode.OUTPUT
+////						{
+////							IEntity scopeParent = (IEntity) pcs[k].getParameterScope().getParent();
+////							Integer containmentMode = pcs[k].getParameterScope().getContainmentMode();
+////							if (containmentMode == Scope.BELOW)
+////								ok = ok && ((IModelElement) ps.get(k)).isBelowNamespace(scopeParent);
+////							else
+////								/* case Scope.IN: */
+////								ok = ok && scopeParent.equals(((IModelElement) ps.get(k)).getNamespace());
+////							// note: getNamespace returns null instead of the
+////							// (imaginary) modelspace root entity for top level
+////							// elements;
+////							// this is not a problem here as Scope.IN implies
+////							// scopeParent != root.
+////
+////						}
+////					}
+////
+////					if (ok) {
+////						reteMatching = new ReteMatching(ps, posMapping);
+////						return;
+////					}
+//				}
+//			}
+//
+//		}
+
+	}
+
+	class CountFetcher extends AbstractMatchFetcher {
+
+		public CountFetcher(Indexer indexer, Tuple signature) {
+			super(indexer, signature);
+		}
+		
+		int count = 0;
+
+		public int getCount() {
+			return count;
+		}
+
+		@Override
+		protected void fetch(Collection<Tuple> matches) {
+			count = matches == null ? 0 : matches.size();
+		}
+
+	}
+	
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/misc/Bag.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/misc/Bag.java
new file mode 100644
index 0000000..afe0b80
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/misc/Bag.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.misc;
+
+import java.util.Collection;
+import java.util.LinkedList;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.SingleInputNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+
+/**
+ * @author Gabor Bergmann
+ * 
+ *         A bag is a container that tuples can be dumped into. Does NOT
+ *         propagate updates! Optimized for small contents size OR positive
+ *         updates only.
+ */
+public class Bag extends SingleInputNode {
+
+	public Collection<Tuple> contents;
+
+	public Bag(ReteContainer reteContainer) {
+		super(reteContainer);
+		contents = new LinkedList<Tuple>();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver#update(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple)
+	 */
+	public void update(Direction direction, Tuple updateElement) {
+		if (direction == Direction.INSERT)
+			contents.add(updateElement);
+		else
+			contents.remove(updateElement);
+	}
+
+	public void pullInto(Collection<Tuple> collector) {
+		// IGNORE
+		throw new UnsupportedOperationException("Bag contents cannot be pulled");
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/misc/ConstantNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/misc/ConstantNode.java
new file mode 100644
index 0000000..2933002
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/misc/ConstantNode.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.misc;
+
+import java.util.Collection;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.StandardNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+
+/**
+ * Node that always contains a single constant Tuple
+ * 
+ * @author Gabor Bergmann
+ */
+public class ConstantNode extends StandardNode {
+
+	protected Tuple constant;
+
+	public ConstantNode(ReteContainer reteContainer, Tuple constant) {
+		super(reteContainer);
+		this.constant = constant;
+	}
+
+	public void pullInto(Collection<Tuple> collector) {
+		collector.add(constant);
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/misc/DefaultDeltaMonitor.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/misc/DefaultDeltaMonitor.java
new file mode 100644
index 0000000..ed015a7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/misc/DefaultDeltaMonitor.java
@@ -0,0 +1,48 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.misc;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Network;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+

+/**

+ * Default configuration for DeltaMonitor.

+ * @author Bergmann Gábor

+ *

+ */

+public class DefaultDeltaMonitor extends DeltaMonitor<Tuple> {

+

+	/**

+	 * @param reteContainer

+	 */

+	public DefaultDeltaMonitor(ReteContainer reteContainer) {

+		super(reteContainer);

+	}

+	

+	/**

+	 * @param network

+	 */

+	public DefaultDeltaMonitor(Network network) {

+		super(network.getHeadContainer());

+	}

+

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.misc.DeltaMonitor#statelessConvert(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple)

+	 */

+	@Override

+	public Tuple statelessConvert(Tuple tuple) {

+		return tuple;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/misc/DeltaMonitor.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/misc/DeltaMonitor.java
new file mode 100644
index 0000000..23d3b23
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/misc/DeltaMonitor.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.misc;
+
+import java.util.Collection;
+import java.util.LinkedHashSet;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.SingleInputNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Clearable;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+
+/**
+ * A monitoring object that connects to the rete network as a receiver to
+ * reflect changes since an arbitrary state acknowledged by the client. Match tuples
+ * are represented by a type MatchType.
+ * 
+ * <p><b>Usage</b>. If a new matching is found, it appears in the matchFoundEvents collection,
+ * and disappears when that particular matching cannot be found anymore. If the
+ * event of finding a match has been processed by the client, it can be removed
+ * manually. In this case, when a previously found matching is lost, the Tuple
+ * will appear in the matchLostEvents collection, and disappear upon finding the
+ * same matching again. "Matching lost" events can also be acknowledged by
+ * removing a Tuple from the collection. If the matching is found once again, it
+ * will return to matchFoundEvents.
+ * 
+ * <p><b>Technical notes</b>. Does NOT propagate updates!
+ * 
+ * By overriding statelessConvert(), results can be stored to a MatchType. 
+ * MatchType must provide equals() and hashCode() reflecting its contents.
+ * The default implementation (DefaultDeltaMonitor) uses Tuple as MatchType.
+ * 
+ * By overriding statelessFilter(), some tuples can be filtered. 
+ * 
+ * @author Gabor Bergmann
+ * 
+ */
+public abstract class DeltaMonitor<MatchType> extends SingleInputNode implements Clearable {
+
+	/**
+	 * matches that are newly found
+	 */
+	public Collection<MatchType> matchFoundEvents;
+	/**
+	 * matches that are newly lost
+	 */
+	public Collection<MatchType> matchLostEvents;
+
+	/**
+	 * @param reteContainer
+	 */
+	public DeltaMonitor(ReteContainer reteContainer) {
+		super(reteContainer);
+		matchFoundEvents = new LinkedHashSet<MatchType>();
+		matchLostEvents = new LinkedHashSet<MatchType>();
+		reteContainer.registerClearable(this);
+	}
+	
+//	/**
+//	 * Build a delta monitor into the head container of the network.
+//	 * 
+//	 * @param network
+//	 */
+//	public DeltaMonitor(Network network) {
+//		this(network.getHeadContainer());
+//	}
+	
+	/**
+	 * Disconnects this node from the network. Can be called publicly.
+	 * @pre: child nodes, if any, must already be disconnected.
+	 */
+	public void disconnectFromNetwork() {
+		reteContainer.disconnect(parent, this);
+	}
+	
+	/**
+	 * Override this method to provide a lightweight, stateless filter on the tuples
+	 * @param tuple the occurrence that is to be filtered
+	 * @return true if this tuple should be monitored, false if ignored
+	 */
+	public boolean statelessFilter(Tuple tuple) {
+		return true;		
+	}
+	
+	public abstract MatchType statelessConvert(Tuple tuple);
+
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver#update(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple)
+	 */
+	public void update(Direction direction, Tuple updateElement) {
+		if (statelessFilter(updateElement)) {
+			MatchType match = statelessConvert(updateElement);
+			if (direction == Direction.INSERT) {
+				if (!matchLostEvents.remove(match)) // either had before but
+															// lost
+					matchFoundEvents.add(match); // or brand-new
+			} else // revoke
+			{
+				if (!matchFoundEvents.remove(match)) // either never found
+																// in the first
+																// place
+					matchLostEvents.add(match); // or newly lost
+			}
+		}
+	}
+
+	public void clear() {
+		matchFoundEvents.clear();
+		matchLostEvents.clear();
+	}
+
+	public void pullInto(Collection<Tuple> collector) {
+		// IGNORE
+		throw new UnsupportedOperationException(
+				"DeltaMonitor contents cannot be pulled");
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Direction.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Direction.java
new file mode 100644
index 0000000..ab6a7e6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Direction.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network;
+
+/**
+ * Indicates whether a propagated update event signals the insertion or deletion
+ * of an element
+ * 
+ * @author Gabor Bergmann
+ * 
+ */
+public enum Direction {
+	INSERT, REVOKE;
+
+	public Direction opposite() {
+		switch (this) {
+		case INSERT:
+			return REVOKE;
+		case REVOKE:
+			return INSERT;
+		default:
+			return INSERT;
+		}
+	}
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Library.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Library.java
new file mode 100644
index 0000000..6ba7ae5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Library.java
@@ -0,0 +1,410 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.CountNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.ExistenceNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.GenericProjectionIndexer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.Indexer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.IterableIndexer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.JoinNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.OnetimeIndexer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.ProjectionIndexer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.misc.ConstantNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.Address;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.RemoteReceiver;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.RemoteSupplier;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.DefaultProductionNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.EqualityFilterNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.InequalityFilterNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.TransparentNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.TrimmerNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.UniquenessEnforcerNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.ValueBinderFilterNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util.Options;
+
+
+/**
+ * Stores the internal parts of a rete network. Nodes are stored according to
+ * type and parameters.
+ * 
+ * @author Gabor Bergmann
+ */
+public class Library {
+
+	// boolean activeStorage = true;
+
+	ReteContainer reteContainer;
+
+	Map<Tuple, ProjectionIndexer> projectionIndexers; // Tuple<supplierId, mask>
+	Map<Tuple, CountNode> countNodes; // Tuple<supplierId, mask>
+	Map<Tuple, JoinNode> joinNodes; // Tuple<Indexer primarySlot, Indexer
+									// secondarySlot, TupleMask complementer>
+	Map<Tuple, ExistenceNode> existenceNodes; // Tuple<Indexer primarySlot,
+												// Indexer secondarySlot,
+												// boolean negative>
+	Map<Tuple, InequalityFilterNode> ineqFilters; // Tuple<Supplier parent,
+													// Integer subject,
+													// inequalityMask>
+	Map<Tuple, EqualityFilterNode> eqFilters; // Tuple<Supplier parent,
+												// Tuple~int[] indices>
+	Map<Tuple, ValueBinderFilterNode> valueBinderFilters; // Tuple<supplierId, bindingIndex, bindingValue>
+	Map<Tuple, TrimmerNode> trimmers; // Tuple<supplierId, mask>
+	Map<Supplier, TransparentNode> transparentNodes; // Tuple<supplierId, mask>
+	Map<Tuple, ConstantNode> constantNodes; // Tuple constants
+
+	Map<Supplier, RemoteReceiver> remoteReceivers;
+	Map<Address<? extends Supplier>, RemoteSupplier> remoteSuppliers;
+
+	/**
+	 * @param reteContainer
+	 *            the ReteNet whose interior is to be mapped.
+	 */
+	public Library(ReteContainer reteContainer) {
+		super();
+		this.reteContainer = reteContainer;
+
+		projectionIndexers = new HashMap<Tuple, ProjectionIndexer>();
+		joinNodes = new HashMap<Tuple, JoinNode>();
+		existenceNodes = new HashMap<Tuple, ExistenceNode>();
+		ineqFilters = new HashMap<Tuple, InequalityFilterNode>();
+		eqFilters = new HashMap<Tuple, EqualityFilterNode>();
+		valueBinderFilters = new HashMap<Tuple, ValueBinderFilterNode>();
+		trimmers = new HashMap<Tuple, TrimmerNode>();
+		transparentNodes = new HashMap<Supplier, TransparentNode>();
+		constantNodes = new HashMap<Tuple, ConstantNode>();
+		countNodes = new HashMap<Tuple, CountNode>();
+		
+		remoteReceivers = new HashMap<Supplier, RemoteReceiver>();
+		remoteSuppliers = new HashMap<Address<? extends Supplier>, RemoteSupplier>();
+	}
+
+	synchronized RemoteReceiver accessRemoteReceiver(
+			Address<? extends Supplier> address) {
+		if (!reteContainer.isLocal(address))
+			return address.getContainer().getLibrary().accessRemoteReceiver(
+					address);
+		Supplier localSupplier = reteContainer.resolveLocal(address);
+		RemoteReceiver result = remoteReceivers.get(localSupplier);
+		if (result == null) {
+			result = new RemoteReceiver(reteContainer);
+			reteContainer.connect(localSupplier, result); // stateless node, no
+															// synch required
+
+			if (Options.nodeSharingOption != Options.NodeSharingOption.NEVER)
+				remoteReceivers.put(localSupplier, result);
+		}
+		return result;
+	}
+
+	/**
+	 * @pre: address is NOT local
+	 */
+	synchronized RemoteSupplier accessRemoteSupplier(
+			Address<? extends Supplier> address) {
+		RemoteSupplier result = remoteSuppliers.get(address);
+		if (result == null) {
+			result = new RemoteSupplier(reteContainer, address.getContainer()
+					.getLibrary().accessRemoteReceiver(address));
+			// network.connectAndSynchronize(supplier, result);
+
+			if (Options.nodeSharingOption != Options.NodeSharingOption.NEVER)
+				remoteSuppliers.put(address, result);
+		}
+		return result;
+	}
+
+	/**
+	 * The powerful method for accessing any (supplier) Address as a local
+	 * supplier.
+	 */
+	public Supplier asSupplier(Address<? extends Supplier> address) {
+		if (!reteContainer.isLocal(address))
+			return accessRemoteSupplier(address);
+		else
+			return reteContainer.resolveLocal(address);
+	}
+
+	public Address<ProjectionIndexer> accessProjectionIndexer(
+			Address<? extends Supplier> supplierAddress, TupleMask mask) 
+	{
+		Supplier supplier = asSupplier(supplierAddress);
+		return reteContainer.makeAddress(accessProjectionIndexer(supplier, mask));
+	}
+	public Address<CountNode> accessCountNode(
+			Address<? extends Supplier> supplierAddress, TupleMask mask) 
+	{
+		Supplier supplier = asSupplier(supplierAddress);
+		return reteContainer.makeAddress(accessCountNode(supplier, mask));
+	}
+	public Address<? extends Indexer> accessCountOuterIndexer(
+			Address<? extends Supplier> supplierAddress, TupleMask mask) 
+	{
+		Supplier supplier = asSupplier(supplierAddress);
+		return reteContainer.makeAddress(accessCountNode(supplier, mask).getAggregatorOuterIndexer());
+	}
+	public Address<? extends Indexer> accessCountOuterIdentityIndexer(
+			Address<? extends Supplier> supplierAddress, TupleMask mask,
+			int resultPositionInSignature) 
+	{
+		Supplier supplier = asSupplier(supplierAddress);
+		return reteContainer.makeAddress(
+				accessCountNode(supplier, mask).getAggregatorOuterIdentityIndexer(resultPositionInSignature));
+	}
+	
+	// local version
+	public synchronized ProjectionIndexer accessProjectionIndexer(Supplier supplier,
+			TupleMask mask) {
+		Object[] paramsArray = { supplier.getNodeId(), mask };
+		Tuple params = new FlatTuple(paramsArray);
+		ProjectionIndexer result = projectionIndexers.get(params);
+		if (result == null) {
+			result = new GenericProjectionIndexer(reteContainer, mask);
+			reteContainer.connectAndSynchronize(supplier, result);
+
+			if (Options.nodeSharingOption != Options.NodeSharingOption.NEVER)
+				projectionIndexers.put(params, result);
+		}
+		return result;
+	}
+	// local version
+	public synchronized CountNode accessCountNode(Supplier supplier, TupleMask mask) {
+		Object[] paramsArray = { supplier.getNodeId(), mask };
+		Tuple params = new FlatTuple(paramsArray);
+		CountNode result = countNodes.get(params);
+		if (result == null) {
+			result = new CountNode(reteContainer, accessProjectionIndexer(supplier, mask));
+
+			if (Options.nodeSharingOption != Options.NodeSharingOption.NEVER)
+				countNodes.put(params, result);
+		}
+		return result;
+	}
+	
+	// local version
+	public synchronized ProjectionIndexer accessProjectionIndexerOnetime(Supplier supplier,
+			TupleMask mask) {
+		if (Options.nodeSharingOption != Options.NodeSharingOption.NEVER)
+			return accessProjectionIndexer(supplier, mask);
+
+		reteContainer.flushUpdates();
+		ProjectionIndexer result = new OnetimeIndexer(reteContainer, mask);
+		reteContainer.sendConstructionUpdates(result, Direction.INSERT,
+				reteContainer.pullContents(supplier));
+		reteContainer.flushUpdates();
+
+		return result;
+	}
+
+	// local, read-only version
+	public synchronized Indexer peekProjectionIndexer(Supplier supplier, TupleMask mask) {
+		Object[] paramsArray = { supplier.getNodeId(), mask };
+		Tuple params = new FlatTuple(paramsArray);
+		return projectionIndexers.get(params);
+	}
+
+	/**
+	 * @pre: both projectionIndexers must be local to this container.
+	 */
+	public synchronized Address<JoinNode> accessJoinNode(
+			Address<? extends IterableIndexer> primaryIndexer, 
+			Address<? extends Indexer> secondaryIndexer,
+			TupleMask complementer) {
+		IterableIndexer primarySlot = reteContainer.resolveLocal(primaryIndexer);
+		Indexer secondarySlot = reteContainer.resolveLocal(secondaryIndexer);
+		Object[] paramsArray = { primarySlot.getNodeId(),
+				secondarySlot.getNodeId(), complementer };
+		Tuple params = new FlatTuple(paramsArray);
+		JoinNode result = joinNodes.get(params);
+		if (result == null) {
+			result = new JoinNode(reteContainer, primarySlot, secondarySlot,
+					complementer);
+			// network.connectAndSynchronize(supplier, result);
+
+			if (Options.nodeSharingOption == Options.NodeSharingOption.ALL)
+				joinNodes.put(params, result);
+		}
+		return reteContainer.makeAddress(result);
+	}
+
+	/**
+	 * @pre: both projectionIndexers must be local to this container.
+	 */
+	public synchronized Address<ExistenceNode> accessExistenceNode(
+			Address<? extends IterableIndexer> primaryIndexer, 
+			Address<? extends Indexer> secondaryIndexer,
+			boolean negative) {
+		IterableIndexer primarySlot = reteContainer.resolveLocal(primaryIndexer);
+		Indexer secondarySlot = reteContainer.resolveLocal(secondaryIndexer);
+		Object[] paramsArray = { primarySlot.getNodeId(),
+				secondarySlot.getNodeId(), negative };
+		Tuple params = new FlatTuple(paramsArray);
+		ExistenceNode result = existenceNodes.get(params);
+		if (result == null) {
+			result = new ExistenceNode(reteContainer, primarySlot,
+					secondarySlot, negative);
+			// network.connectAndSynchronize(supplier, result);
+
+			if (Options.nodeSharingOption == Options.NodeSharingOption.ALL)
+				existenceNodes.put(params, result);
+		}
+		return reteContainer.makeAddress(result);
+	}
+
+	public synchronized Address<InequalityFilterNode> accessInequalityFilterNode(
+			Address<? extends Supplier> supplierAddress, int subject,
+			TupleMask inequalityMask) {
+		Supplier supplier = asSupplier(supplierAddress);
+		Object[] paramsArray = { supplier.getNodeId(), subject, inequalityMask };
+		Tuple params = new FlatTuple(paramsArray);
+		InequalityFilterNode result = ineqFilters.get(params);
+		if (result == null) {
+			result = new InequalityFilterNode(reteContainer, subject,
+					inequalityMask);
+			reteContainer.connect(supplier, result); // stateless node, no synch
+														// required
+
+			if (Options.nodeSharingOption == Options.NodeSharingOption.ALL)
+				ineqFilters.put(params, result);
+		}
+		return reteContainer.makeAddress(result);
+	}
+
+	public synchronized Address<ValueBinderFilterNode> accessValueBinderFilterNode(
+			Address<? extends Supplier> supplierAddress, int bindingIndex,
+			Object bindingValue) {
+		Supplier supplier = asSupplier(supplierAddress);
+		Object[] paramsArray = { supplier.getNodeId(), bindingIndex, bindingValue };
+		Tuple params = new FlatTuple(paramsArray);
+		ValueBinderFilterNode result = valueBinderFilters.get(params);
+		if (result == null) {
+			result = new ValueBinderFilterNode(reteContainer, bindingIndex,
+					bindingValue);
+			reteContainer.connect(supplier, result); // stateless node, no synch
+														// required
+
+			if (Options.nodeSharingOption == Options.NodeSharingOption.ALL)
+				valueBinderFilters.put(params, result);
+		}
+		return reteContainer.makeAddress(result);
+	}	
+	
+	public synchronized Address<EqualityFilterNode> accessEqualityFilterNode(
+			Address<? extends Supplier> supplierAddress, int[] indices) {
+		Supplier supplier = asSupplier(supplierAddress);
+		Object[] paramsArray = { supplier.getNodeId(), new FlatTuple(indices) };
+		Tuple params = new FlatTuple(paramsArray);
+		EqualityFilterNode result = eqFilters.get(params);
+		if (result == null) {
+			result = new EqualityFilterNode(reteContainer, indices);
+			reteContainer.connect(supplier, result); // stateless node, no synch
+														// required
+
+			if (Options.nodeSharingOption == Options.NodeSharingOption.ALL)
+				eqFilters.put(params, result);
+		}
+		return reteContainer.makeAddress(result);
+	}
+
+	public synchronized Address<TrimmerNode> accessTrimmerNode(
+			Address<? extends Supplier> supplierAddress, TupleMask mask) {
+		Supplier supplier = asSupplier(supplierAddress);
+		Object[] paramsArray = { supplier.getNodeId(), mask };
+		Tuple params = new FlatTuple(paramsArray);
+		TrimmerNode result = trimmers.get(params);
+		if (result == null) {
+			result = new TrimmerNode(reteContainer, mask);
+			reteContainer.connect(supplier, result); // stateless node, no synch
+														// required
+
+			if (Options.nodeSharingOption == Options.NodeSharingOption.ALL)
+				trimmers.put(params, result);
+		}
+		return reteContainer.makeAddress(result);
+	}
+
+	public synchronized Address<TransparentNode> accessTransparentNode(
+			Address<? extends Supplier> supplierAddress) {
+		Supplier supplier = asSupplier(supplierAddress);
+		Supplier params = supplier;
+		TransparentNode result = transparentNodes.get(params);
+		if (result == null) {
+			result = new TransparentNode(reteContainer);
+			reteContainer.connect(supplier, result); // stateless node, no synch
+														// required
+
+			if (Options.nodeSharingOption == Options.NodeSharingOption.ALL)
+				transparentNodes.put(params, result);
+		}
+		return reteContainer.makeAddress(result);
+	}
+
+	public synchronized Address<ConstantNode> accessConstantNode(Tuple constants) {
+		// Object[] paramsArray = {supplier.getNodeId(), mask};
+		Tuple params = constants;// new FlatTuple(paramsArray);
+		ConstantNode result = constantNodes.get(params);
+		if (result == null) {
+			result = new ConstantNode(reteContainer, constants);
+			// network.connectAndSynchronize(supplier, result)
+
+			if (Options.nodeSharingOption == Options.NodeSharingOption.ALL)
+				constantNodes.put(params, result);
+		}
+		return reteContainer.makeAddress(result);
+	}
+
+	public synchronized void registerSpecializedProjectionIndexer(Node node, ProjectionIndexer indexer) {
+		if (Options.nodeSharingOption != Options.NodeSharingOption.NEVER) {
+			Object[] paramsArray = { node.getNodeId(), indexer.getMask() };
+			Tuple params = new FlatTuple(paramsArray);
+			projectionIndexers.put(params, indexer);
+		}
+	}
+	
+	public synchronized Address<UniquenessEnforcerNode> newUniquenessEnforcerNode(int tupleWidth, Object tag) {
+		UniquenessEnforcerNode node = new UniquenessEnforcerNode(reteContainer, tupleWidth);
+		node.setTag(tag);
+		Address<UniquenessEnforcerNode> address = reteContainer.makeAddress(node);
+		
+		if (Options.employTrivialIndexers) {
+			ProjectionIndexer nullIndexer = node.getNullIndexer();
+			registerSpecializedProjectionIndexer(node, nullIndexer);
+
+			ProjectionIndexer identityIndexer = node.getIdentityIndexer();
+			registerSpecializedProjectionIndexer(node, identityIndexer);
+		}
+		
+		return address;
+	}
+
+	public synchronized Address<? extends Production> newProductionNode(HashMap<Object, Integer> posMapping, Object tag) {
+		DefaultProductionNode node = new DefaultProductionNode(reteContainer, posMapping);
+		node.setTag(tag);
+		Address<? extends Production> address = reteContainer.makeAddress(node);
+		
+		if (Options.employTrivialIndexers) {
+			ProjectionIndexer nullIndexer = node.getNullIndexer();
+			registerSpecializedProjectionIndexer(node, nullIndexer);
+
+			ProjectionIndexer identityIndexer = node.getIdentityIndexer();
+			registerSpecializedProjectionIndexer(node, identityIndexer);
+		}
+		
+		return address;
+	}
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Network.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Network.java
new file mode 100644
index 0000000..943fb69
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Network.java
@@ -0,0 +1,363 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.Address;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util.Options;
+
+
+/**
+ * @author Gabor Bergmann
+ * 
+ */
+public class Network {
+	int threads;
+	
+	protected ArrayList<ReteContainer> containers;
+	ReteContainer headContainer;
+	private int firstContainer = 0;	
+	private int nextContainer = 0;
+
+	// the following fields exist only if threads > 0
+	protected Map<ReteContainer, Long> globalTerminationCriteria = null; 
+	protected Map<ReteContainer, Long> reportedClocks = null;
+	protected Lock updateLock = null; // grab during normal update operations
+	protected Lock structuralChangeLock = null; // grab if the network structure is to
+											// be changed
+
+	/**
+	 * @param threads the number of threads to operate the network with; 
+	 * 	0 means single-threaded operation, 
+	 * 	1 starts an asynchronous thread to operate the RETE net, 
+	 * 	>1 uses multiple RETE containers.
+	 */
+	public Network(int threads) {
+		super();
+		this.threads = threads;
+		
+		containers = new ArrayList<ReteContainer>();
+		firstContainer = (threads > 1) ? Options.firstFreeContainer : 0;
+		nextContainer = firstContainer;
+
+		if (threads > 0) {
+			globalTerminationCriteria = new HashMap<ReteContainer, Long>();
+			reportedClocks = new HashMap<ReteContainer, Long>();
+			ReadWriteLock rwl = new ReentrantReadWriteLock();
+			updateLock = rwl.readLock();
+			structuralChangeLock = rwl.writeLock();
+			for (int i = 0; i < threads; ++i) containers.add(new ReteContainer(this, true));					
+		} else 
+			containers.add(new ReteContainer(this, false));
+
+		headContainer = containers.get(0);
+	}
+
+	/**
+	 * Kills this Network along with all containers and message consumption
+	 * cycles.
+	 */
+	public void kill() {
+		for (ReteContainer container : containers) {
+			container.kill();
+		}
+		containers.clear();
+	}
+
+	/**
+	 * Returns the head container, that is guaranteed to reside in the same JVM
+	 * as the Network object.
+	 * 
+	 * @return
+	 */
+	public ReteContainer getHeadContainer() {
+		return headContainer; 
+	}
+
+	/**
+	 * Returns the next container in round-robin fashion. Configurable not to
+	 * yield head container.
+	 */
+	public ReteContainer getNextContainer() {
+		if (nextContainer >= containers.size())
+			nextContainer = firstContainer;
+		return containers.get(nextContainer++);
+	}
+
+	/**
+	 * Internal message delivery method.
+	 * @pre threads > 0	 
+	 */
+	private void sendUpdate(Address<? extends Receiver> receiver,
+			Direction direction, Tuple updateElement) {
+		ReteContainer affectedContainer = receiver.getContainer();
+		synchronized (globalTerminationCriteria) {
+			long newCriterion = affectedContainer.sendUpdateToLocalAddress(
+					receiver, direction, updateElement);
+			terminationCriterion(affectedContainer, newCriterion);
+		}
+	}
+	
+	/**
+	 * Internal message delivery method for single-threaded operation
+	 * @pre threads == 0	 
+	 */
+	private void sendUpdateSingleThreaded(Address<? extends Receiver> receiver,
+			Direction direction, Tuple updateElement) {
+		ReteContainer affectedContainer = receiver.getContainer();
+		affectedContainer.sendUpdateToLocalAddressSingleThreaded(receiver, direction, updateElement);
+	}
+
+	/**
+	 * Internal message delivery method.
+	 * @pre threads > 0	  
+	 */
+	private void sendUpdates(Address<? extends Receiver> receiver,
+			Direction direction, Collection<Tuple> updateElements) {
+		if (updateElements.isEmpty())
+			return;
+		ReteContainer affectedContainer = receiver.getContainer();
+		synchronized (globalTerminationCriteria) {
+			long newCriterion = affectedContainer.sendUpdatesToLocalAddress(
+					receiver, direction, updateElements);
+			terminationCriterion(affectedContainer, newCriterion);
+		}
+	}
+
+	/**
+	 * Sends an update message to the receiver node, indicating a newly found or
+	 * lost partial matching. The node may reside in any of the containers
+	 * associated with this network. To be called from a user thread during
+	 * normal operation, NOT during construction.
+	 * 
+	 * @return the value of the target container's clock at the time when the
+	 *         message was accepted into its message queue
+	 */
+	public void sendExternalUpdate(Address<? extends Receiver> receiver,
+			Direction direction, Tuple updateElement) {
+		if (threads > 0)
+		{
+			updateLock.lock();
+			sendUpdate(receiver, direction, updateElement);
+			updateLock.unlock();
+		}
+		else {
+			sendUpdateSingleThreaded(receiver, direction, updateElement);
+			//getHeadContainer().
+		}
+	}
+
+	/**
+	 * Sends an update message to the receiver node, indicating a newly found or
+	 * lost partial matching. The node may reside in any of the containers
+	 * associated with this network. To be called from a user thread during
+	 * construction.
+	 * 
+	 * @pre: structuralChangeLock MUST be grabbed by the sequence 
+	 * (but not necessarily this thread, as the sequence may span through network 
+	 * calls, that's why it's not enforced here )
+	 * 
+	 * @return the value of the target container's clock at the time when the
+	 *         message was accepted into its message queue
+	 */
+	public void sendConstructionUpdate(Address<? extends Receiver> receiver,
+			Direction direction, Tuple updateElement) {
+		// structuralChangeLock.lock();
+		if (threads > 0) 
+			sendUpdate(receiver, direction, updateElement);
+		else
+			receiver.getContainer().sendUpdateToLocalAddressSingleThreaded(receiver, direction, updateElement);
+		// structuralChangeLock.unlock();
+	}
+
+	/**
+	 * Sends multiple update messages atomically to the receiver node,
+	 * indicating a newly found or lost partial matching. The node may reside in
+	 * any of the containers associated with this network. To be called from a
+	 * user thread during construction.
+	 * 
+	 * @pre: structuralChangeLock MUST be grabbed by the sequence 
+	 * (but not necessarily this thread, as the sequence may span through network 
+	 * calls, that's why it's not enforced here )
+	 * 
+	 * @return the value of the target container's clock at the time when the
+	 *         message was accepted into its message queue
+	 */
+	public void sendConstructionUpdates(Address<? extends Receiver> receiver,
+			Direction direction, Collection<Tuple> updateElements) {
+		// structuralChangeLock.lock();
+		if (threads > 0)
+			sendUpdates(receiver, direction, updateElements);
+		else
+			receiver.getContainer().sendUpdatesToLocalAddressSingleThreaded(receiver, direction, updateElements);	
+		// structuralChangeLock.unlock();
+	}
+
+	/**
+	 * Establishes connection between a supplier and a receiver node, regardless
+	 * which container they are in. Not to be called remotely, because this
+	 * method enforces the structural lock.
+	 * 
+	 * @param supplier
+	 * @param receiver
+	 * @param synchronise
+	 *            indicates whether the receiver should be synchronised to the
+	 *            current contents of the supplier
+	 */
+	public void connectRemoteNodes(Address<? extends Supplier> supplier,
+			Address<? extends Receiver> receiver, boolean synchronise) {
+		if (threads > 0) structuralChangeLock.lock();
+		receiver.getContainer().connectRemoteNodes(supplier, receiver, synchronise);
+		if (threads > 0) structuralChangeLock.unlock();
+	}
+
+	/**
+	 * Severs connection between a supplier and a receiver node, regardless
+	 * which container they are in. Not to be called remotely, because this
+	 * method enforces the structural lock.
+	 * 
+	 * @param supplier
+	 * @param receiver
+	 * @param desynchronise
+	 *            indicates whether the current contents of the supplier should
+	 *            be subtracted from the receiver
+	 */
+	public void disconnectRemoteNodes(Address<? extends Supplier> supplier,
+			Address<? extends Receiver> receiver, boolean desynchronise) {
+		if (threads > 0) structuralChangeLock.lock();
+		receiver.getContainer().disconnectRemoteNodes(supplier, receiver, desynchronise);
+		if (threads > 0) structuralChangeLock.unlock();
+	}
+
+	/**
+	 * Containers use this method to report whenever they run out of messages in
+	 * their queue.
+	 * 
+	 * To be called from the thread of the reporting container.
+	 * 
+	 * @pre threads > 0.
+	 * @param reportingContainer
+	 *            the container reporting the emptiness of its message queue.
+	 * @param clock
+	 *            the value of the container's clock when reporting.
+	 * @param localTerminationCriteria
+	 *            the latest clock values this container has received from other
+	 *            containers since the last time it reported termination.
+	 */
+	void reportLocalUpdateTermination(ReteContainer reportingContainer,
+			long clock, Map<ReteContainer, Long> localTerminationCriteria) {
+		synchronized (globalTerminationCriteria) {
+			for (ReteContainer affectedContainer : localTerminationCriteria
+					.keySet()) {
+				long newCriterion = localTerminationCriteria
+						.get(affectedContainer);
+
+				terminationCriterion(affectedContainer, newCriterion);
+			}
+
+			reportedClocks.put(reportingContainer, clock);
+			Long criterion = globalTerminationCriteria.get(reportingContainer);
+			if (criterion != null && criterion < clock)
+				globalTerminationCriteria.remove(reportingContainer);
+
+			if (globalTerminationCriteria.isEmpty())
+				globalTerminationCriteria.notifyAll();
+		}
+	}
+
+	/**
+	 * @pre threads > 0
+	 */
+	private void terminationCriterion(ReteContainer affectedContainer,
+			long newCriterion) {
+		synchronized (globalTerminationCriteria) {
+			Long oldCriterion = globalTerminationCriteria
+					.get(affectedContainer);
+			Long oldClock = reportedClocks.get(affectedContainer);
+			long relevantClock = oldClock == null ? 0 : oldClock;
+			if ((relevantClock <= newCriterion)
+					&& (oldCriterion == null || oldCriterion < newCriterion)) {
+				globalTerminationCriteria.put(affectedContainer, newCriterion);
+			}
+		}
+	}
+
+	/**
+	 * Waits until all rete update operations are settled in all containers.
+	 * Returns immediately, if no updates are pending.
+	 * 
+	 * To be called from any user thread.
+	 */
+	public void waitForReteTermination() {
+		if (threads > 0)
+		{
+			synchronized (globalTerminationCriteria) {
+				while (!globalTerminationCriteria.isEmpty()) {
+					try {
+						globalTerminationCriteria.wait();
+					} catch (InterruptedException e) {
+	
+					}
+				}
+			}
+		}
+		else headContainer.messageConsumptionSingleThreaded();
+	}
+
+	/**
+	 * Waits to execute action until all rete update operations are settled in
+	 * all containers. Runs action and returns immediately, if no updates are
+	 * pending. The given action is guaranteed to be run when the terminated
+	 * state still persists.
+	 * 
+	 * @param action
+	 *            the action to be run when reaching the steady-state.
+	 * 
+	 *            To be called from any user thread.
+	 */
+	public void waitForReteTermination(Runnable action) {
+		if (threads > 0)
+		{
+			synchronized (globalTerminationCriteria) {
+				while (!globalTerminationCriteria.isEmpty()) {
+					try {
+						globalTerminationCriteria.wait();
+					} catch (InterruptedException e) {
+	
+					}
+				}
+				action.run();
+			}
+		}
+		else {
+			headContainer.messageConsumptionSingleThreaded();
+			action.run();			
+		}
+
+	}
+
+	/**
+	 * @return the structuralChangeLock
+	 */
+	public Lock getStructuralChangeLock() {
+		return structuralChangeLock;
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Node.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Node.java
new file mode 100644
index 0000000..e65e389
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Node.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network;
+
+/**
+ * A node of a rete network, should be uniquely identified by network and
+ * nodeId. NodeId can be requested by registering at the Network on
+ * construction.
+ * 
+ * @author Gabor Bergmann
+ */
+public interface Node {
+	/**
+	 * @return the network this node belongs to.
+	 */
+	ReteContainer getContainer();
+
+	/**
+	 * @return the identifier unique to this node within the network.
+	 */
+	long getNodeId();
+
+	/**
+	 * Assigns a descriptive tag to the node
+	 */
+	void setTag(Object tag);
+
+	/**
+	 * @return the tag of the node
+	 */
+	Object getTag();
+	
+//	/**
+//	 * The semantics of the tuples contained in this node.
+//	 * @return a tuple of correct size representing the semantics of each position.
+//	 * @post not null
+//	 */
+//	Tuple getSemantics();
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Production.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Production.java
new file mode 100644
index 0000000..6c33698
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Production.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network;
+
+import java.util.HashMap;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+
+/**
+ * Interface intended for nodes containing complete matches.
+ * 
+ * @author Gabor Bergmann
+ */
+public interface Production extends Tunnel, Iterable<Tuple> {
+
+	/**
+	 * @return the position mapping of this particular pattern that maps members
+	 *         of the tuple type to their positions
+	 */
+	HashMap<Object, Integer> getPosMapping();
+
+	// /**
+	// * Removes all parents of the production node,
+	// * making it once independent from the pattern recognition subnet,
+	// * so that a new pattern definition can be applied.
+	// */
+	// void tearOff();
+	//	
+	// /**
+	// * Sets the dirty flag.
+	// */
+	// void setDirty(boolean dirty);
+	//	
+	// /**
+	// * Returns the value of the dirty flag.
+	// * If true, pattern matcher needs to be reconstructed.
+	// */
+	// boolean isDirty();
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Receiver.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Receiver.java
new file mode 100644
index 0000000..9f77c91
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Receiver.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+/**
+ * @author Gabor Bergmann ALL METHODS: FOR INTERNAL USE ONLY; ONLY INVOKE FROM
+ *         org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer
+ */
+public interface Receiver extends Node {
+
+	/**
+	 * updates the receiver with a newly found or lost partial matching
+	 */
+	public void update(Direction direction, Tuple updateElement);
+
+	/**
+	 * appends a parent that will continously send insert and revoke updates to
+	 * this supplier
+	 */
+	void appendParent(Supplier supplier);
+
+	/**
+	 * removes a parent
+	 */
+	void removeParent(Supplier supplier);
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/ReteContainer.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/ReteContainer.java
new file mode 100644
index 0000000..ef956a6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/ReteContainer.java
@@ -0,0 +1,617 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network;
+
+import java.util.ArrayDeque;
+import java.util.Collection;
+import java.util.Deque;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.Map;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.Address;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.SingleInputNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Clearable;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+
+/**
+ * @author Gabor Bergmann
+ * 
+ *         Mutexes: externalMessageLock - enlisting messages into and retrieving from the external message queue
+ */
+public class ReteContainer {
+
+	protected Thread consumerThread = null;
+	protected boolean killed = false;
+	
+	protected Network network;
+
+	protected LinkedList<Clearable> clearables;
+	protected Map<Long, Node> nodesById;
+	protected long nextId = 0;
+	protected Library library;
+
+	protected Deque<UpdateMessage> internalMessageQueue = new ArrayDeque<UpdateMessage>();
+	protected /*volatile*/ Deque<UpdateMessage> externalMessageQueue = new ArrayDeque<UpdateMessage>();
+	protected Object externalMessageLock = new Object();
+	protected Long clock = 1L; // even: steady state, odd: active queue; access
+								// ONLY with messageQueue locked!
+	protected Map<ReteContainer, Long> terminationCriteria = null;
+
+	/**
+	 * @param threaded false if operating in a single-threaded environment
+	 */
+	public ReteContainer(Network network, boolean threaded) {
+		super();
+		this.network = network;
+		nodesById = new HashMap<Long, Node>();
+		clearables = new LinkedList<Clearable>();
+		library = new Library(this);
+		
+		if (threaded)
+		{
+			terminationCriteria = new HashMap<ReteContainer, Long>();
+			consumerThread = new Thread() {
+				@Override
+				public void run() {
+					messageConsumptionCycle();
+				};
+			};
+			consumerThread.start();
+		}
+	}
+
+	/**
+	 * Stops this container. To be called by Network.kill()
+	 */
+	public void kill() {
+		killed = true;
+		if (consumerThread!=null) consumerThread.interrupt();
+	}
+
+	/**
+	 * Establishes connection between a supplier and a receiver node, regardless
+	 * which container they are in. Assumption is that this container is the
+	 * home of the receiver, but it is not strictly necessary.
+	 * 
+	 * @param synchronise
+	 *            indicates whether the receiver should be synchronised to the
+	 *            current contents of the supplier
+	 */
+	public void connectRemoteNodes(Address<? extends Supplier> supplier,
+			Address<? extends Receiver> receiver, boolean synchronise) {
+		if (!isLocal(receiver))
+			receiver.getContainer().connectRemoteNodes(supplier, receiver,
+					synchronise);
+		else {
+			Receiver child = resolveLocal(receiver);
+			connectRemoteSupplier(supplier, child, synchronise);
+		}
+	}
+
+	/**
+	 * Severs connection between a supplier and a receiver node, regardless
+	 * which container they are in. Assumption is that this container is the
+	 * home of the receiver, but it is not strictly necessary.
+	 * 
+	 * @param desynchronise
+	 *            indicates whether the current contents of the supplier should
+	 *            be subtracted from the receiver
+	 */
+	public void disconnectRemoteNodes(Address<? extends Supplier> supplier,
+			Address<? extends Receiver> receiver, boolean desynchronise) {
+		if (!isLocal(receiver))
+			receiver.getContainer().disconnectRemoteNodes(supplier, receiver,
+					desynchronise);
+		else {
+			Receiver child = resolveLocal(receiver);
+			disconnectRemoteSupplier(supplier, child, desynchronise);
+		}
+	}
+
+	/**
+	 * Establishes connection between a remote supplier and a local receiver
+	 * node.
+	 * 
+	 * @param synchronise
+	 *            indicates whether the receiver should be synchronised to the
+	 *            current contents of the supplier
+	 */
+	public void connectRemoteSupplier(Address<? extends Supplier> supplier,
+			Receiver receiver, boolean synchronise) {
+		Supplier parent = library.asSupplier(supplier);
+		if (synchronise)
+			connectAndSynchronize(parent, receiver);
+		else
+			connect(parent, receiver);
+	}
+
+	/**
+	 * Severs connection between a remote supplier and a local receiver node.
+	 * 
+	 * @param desynchronise
+	 *            indicates whether the current contents of the supplier should
+	 *            be subtracted from the receiver
+	 */
+	public void disconnectRemoteSupplier(Address<? extends Supplier> supplier,
+			Receiver receiver, boolean desynchronise) {
+		Supplier parent = library.asSupplier(supplier);
+		if (desynchronise)
+			disconnectAndDesynchronize(parent, receiver);
+		else
+			disconnect(parent, receiver);
+	}
+
+	/**
+	 * Connects a receiver to a supplier
+	 */
+	public void connect(Supplier supplier, Receiver receiver) {
+		supplier.appendChild(receiver);
+		receiver.appendParent(supplier);
+	}
+
+	/**
+	 * Disconnects a receiver from a supplier
+	 */
+	public void disconnect(Supplier supplier, Receiver receiver) {
+		supplier.removeChild(receiver);
+		receiver.removeParent(supplier);
+	}
+
+	/**
+	 * Connects a receiver to a remote supplier, and synchronises it to the
+	 * current contents of the supplier
+	 */
+	public void connectAndSynchronize(Supplier supplier, Receiver receiver) {
+		flushUpdates(); // first, all pending updates should be flushed into the
+						// supplier BEFORE connecting
+		supplier.appendChild(receiver);
+		receiver.appendParent(supplier);
+
+		Collection<Tuple> pulled = pullContents(supplier);
+		sendConstructionUpdates(receiver, Direction.INSERT, pulled);
+
+		flushUpdates(); // deliver the positive updates
+	}
+
+	/**
+	 * Disconnects a receiver from a supplier
+	 */
+	public void disconnectAndDesynchronize(Supplier supplier, Receiver receiver) {
+		flushUpdates(); // first, all pending updates should be flushed into the
+						// supplier BEFORE disconnecting
+
+		supplier.removeChild(receiver);
+		receiver.removeParent(supplier);
+
+		Collection<Tuple> pulled = pullContents(supplier);
+		sendConstructionUpdates(receiver, Direction.REVOKE, pulled);
+
+		flushUpdates(); // deliver the negative updates
+	}
+
+	/**
+	 * Sends an update message to the receiver node, indicating a newly found or
+	 * lost partial matching. They are inserted into the queue atomically.
+	 * Delivery is either synchronous or asynchronous. Designed to be called
+	 * during network construction.
+	 */
+	public void sendConstructionUpdate(Receiver receiver, Direction direction, Tuple updateElement) {
+		if (consumerThread == null) sendUpdateInternal(receiver, direction, updateElement);
+		else network.sendConstructionUpdate(makeAddress(receiver), direction, updateElement);
+	}
+
+	/**
+	 * Sends several update messages atomically to the receiver node, indicating
+	 * a newly found or lost partial matching. They are inserted into the queue
+	 * atomically. Delivery is either synchronous or asynchronous. Designed to
+	 * be called during network construction.
+	 */
+	public void sendConstructionUpdates(Receiver receiver, Direction direction, Collection<Tuple> updateElements) 
+	{
+		if (consumerThread == null) 
+			for (Tuple updateElement : updateElements)
+				sendUpdateInternal(receiver, direction, updateElement);
+		else network.sendConstructionUpdates(makeAddress(receiver), direction, updateElements);
+	}
+
+	/**
+	 * Sends an update message to the receiver node, indicating a newly found or
+	 * lost partial matching. NOT to be called from user threads.
+	 */
+	public void sendUpdateInternal(Receiver receiver, Direction direction,
+			Tuple updateElement) {
+		// sendUpdateExternal(receiver, direction, updateElement);
+		// if (org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util.Options.synchronous) receiver.update(direction,
+		// updateElement);
+		// else {
+		UpdateMessage message = new UpdateMessage(receiver, direction,
+				updateElement);
+		internalMessageQueue.add(message);
+		// synchronized(externalMessageQueue)
+		// {
+		// externalMessageQueue.add(message);
+		// // no notifyAll() needed, since we are in the message consumption
+		// thread
+		// }
+		// }
+		
+	}
+
+	/**
+	 * Sends an update message to the receiver node, indicating a newly found or
+	 * lost partial matching. The receiver is indicated by the Address. Designed
+	 * to be called by the Network, DO NOT use in any other way. @pre:
+	 * address.container == this, e.g. address MUST be local
+	 * 
+	 * @return the value of the container's clock at the time when the message
+	 *         was accepted into the local message queue
+	 */
+	long sendUpdateToLocalAddress(Address<? extends Receiver> address,
+			Direction direction, Tuple updateElement) {
+		long timestamp;
+		Receiver receiver = resolveLocal(address);
+		UpdateMessage message = new UpdateMessage(receiver, direction,
+				updateElement);
+		synchronized (externalMessageLock) {
+			externalMessageQueue.add(message);
+			// messageQueue.add(new UpdateMessage(resolveLocal(address),
+			// direction, updateElement));
+			// this.sendUpdateInternal(resolveLocal(address), direction,
+			// updateElement);
+			timestamp = clock;
+			externalMessageLock.notifyAll();
+		}
+
+		return timestamp;
+		
+	}
+	
+	
+	/**
+	 * Sends multiple update messages atomically to the receiver node,
+	 * indicating a newly found or lost partial matching. The receiver is
+	 * indicated by the Address. Designed to be called by the Network, DO NOT
+	 * use in any other way. @pre: address.container == this, e.g. address MUST
+	 * be local @pre: updateElements is nonempty!
+	 * 
+	 * @return the value of the container's clock at the time when the message
+	 *         was accepted into the local message queue
+	 */
+	long sendUpdatesToLocalAddress(Address<? extends Receiver> address,
+			Direction direction, Collection<Tuple> updateElements) {
+
+		long timestamp;
+		Receiver receiver = resolveLocal(address);
+		// UpdateMessage message = new UpdateMessage(receiver, direction,
+		// updateElement);
+		synchronized (externalMessageLock) {
+			for (Tuple ps : updateElements)
+				externalMessageQueue.add(new UpdateMessage(receiver, direction,
+						ps));
+			// messageQueue.add(new UpdateMessage(resolveLocal(address),
+			// direction, updateElement));
+			// this.sendUpdateInternal(resolveLocal(address), direction,
+			// updateElement);
+			timestamp = clock;
+			externalMessageLock.notifyAll();
+		}
+
+		return timestamp;
+	}
+	
+	/**
+	 * Sends an update message to the receiver node, indicating a newly found or
+	 * lost partial matching. The receiver is indicated by the Address. Designed
+	 * to be called by the Network in single-threaded operation, DO NOT use in any other way. 
+	 */
+	void sendUpdateToLocalAddressSingleThreaded(Address<? extends Receiver> address,
+			Direction direction, Tuple updateElement) {
+		Receiver receiver = resolveLocal(address);
+		UpdateMessage message = new UpdateMessage(receiver, direction,
+				updateElement);
+		internalMessageQueue.add(message);
+	}
+	
+	/**
+	 * Sends multiple update messages to the receiver node, indicating a newly 
+	 * found or lost partial matching. The receiver is indicated by the Address. 
+	 * Designed to be called by the Network in single-threaded operation, DO NOT
+	 * use in any other way. 
+	 * 
+	 * @pre: address.container == this, e.g. address MUST be local 
+	 */
+	void sendUpdatesToLocalAddressSingleThreaded(Address<? extends Receiver> address,
+			Direction direction, Collection<Tuple> updateElements) 
+	{
+		Receiver receiver = resolveLocal(address);
+		for (Tuple ps : updateElements) 
+			internalMessageQueue.add(new UpdateMessage(receiver, direction, ps));
+	}
+	
+	/**
+	 * Sends an update message to a node in a different container. The receiver
+	 * is indicated by the Address. Designed to be called by RemoteReceivers, DO
+	 * NOT use in any other way.
+	 * 
+	 * @return the value of the container's clock at the time when the message
+	 *         was accepted into the local message queue
+	 */
+	public void sendUpdateToRemoteAddress(Address<? extends Receiver> address,
+			Direction direction, Tuple updateElement) {
+		ReteContainer otherContainer = address.getContainer();
+		long otherClock = otherContainer.sendUpdateToLocalAddress(address,
+				direction, updateElement);
+		// Long criterion = terminationCriteria.get(otherContainer);
+		// if (criterion==null || otherClock > criterion)
+		terminationCriteria.put(otherContainer, otherClock);		
+	}
+
+	/**
+	 * Finalises all update sequences and returns. To be called from user
+	 * threads (e.g. network construction).
+	 */
+	public void flushUpdates() {
+		network.waitForReteTermination();
+		// synchronized (messageQueue)
+		// {
+		// while (!messageQueue.isEmpty())
+		// {
+		// try {
+		// UpdateMessage message = messageQueue.take();
+		// message.receiver.update(message.direction, message.updateElement);
+		// } catch (InterruptedException e) {}
+		// }
+		// }
+	}
+
+	/**
+	 * Retrieves a safe copy of the contents of a supplier.
+	 */
+	public Collection<Tuple> pullContents(Supplier supplier) {
+		flushUpdates();
+		Collection<Tuple> collector = new LinkedList<Tuple>();
+		supplier.pullInto(collector);
+		return collector;
+	}
+
+	/**
+	 * Retrieves the contents of a SingleInputNode's parentage.
+	 */
+	public Collection<Tuple> pullPropagatedContents(SingleInputNode supplier) {
+		flushUpdates();
+		Collection<Tuple> collector = new LinkedList<Tuple>();
+		supplier.propagatePullInto(collector);
+		return collector;
+	}
+
+	/**
+	 * Retrieves the contents of a supplier for a remote caller. Assumption is
+	 * that this container is the home of the supplier, but it is not strictly
+	 * necessary.
+	 * 
+	 * @param supplier
+	 *            the address of the supplier to be pulled.
+	 */
+	public Collection<Tuple> remotePull(Address<? extends Supplier> supplier) {
+		if (!isLocal(supplier))
+			return supplier.getContainer().remotePull(supplier);
+		return pullContents(resolveLocal(supplier));
+	}
+
+	/**
+	 * Proxies for the getPosMapping() of Production nodes. 
+	 * Retrieves the posmapping of a remote or local Production to a remote or local caller.
+	 */
+	public HashMap<Object, Integer> remotePosMapping(Address<? extends Production> production) {
+		if (!isLocal(production))
+			return production.getContainer().remotePosMapping(production);
+		return resolveLocal(production).getPosMapping();
+	}		
+	
+	/**
+	 * Continually consumes update messages. Should be run on a dedicated thread.
+	 */
+	void messageConsumptionCycle() {
+		while (!killed) // deliver messages on and on and on....
+		{
+			long incrementedClock = 0;
+			UpdateMessage message = null;
+
+			if (!internalMessageQueue.isEmpty()) // take internal messages first
+				message = internalMessageQueue.removeFirst();
+			else
+				// no internal message, take an incoming message
+				synchronized (externalMessageLock) { // no sleeping allowed,
+														// because external
+														// queue is locked for
+														// precise clocking of
+														// termination point!
+					if (!externalMessageQueue.isEmpty()) { // if external queue
+															// is non-empty,
+															// retrieve the next
+															// message instantly
+						{
+							message = takeExternalMessage();
+						}
+					} else { // if external queue is found empty (and this is
+								// the first time in a row)
+						incrementedClock = ++clock; // local termination point
+						// synchronized(clock){incrementedClock = ++clock;}
+					}
+				}
+
+			if (message == null) // both queues were empty
+			{
+				localUpdateTermination(incrementedClock); // report local
+															// termination point
+				while (message == null) // wait for a message while external
+										// queue is still empty
+				{
+					synchronized (externalMessageLock) {
+						while (externalMessageQueue.isEmpty()) {
+							try {
+								externalMessageLock.wait();
+							} catch (InterruptedException e) {
+								if (killed)
+									return;
+							}
+						}
+						message = takeExternalMessage();
+					}
+
+				}
+			}
+
+			// now we have a message to deliver
+			message.receiver.update(message.direction, message.updateElement);
+		}
+	}
+	
+	/**
+	 * Iteratively consumes update messages until there are none left.
+	 * Requires single-threaded behaviour.
+	 */
+	void messageConsumptionSingleThreaded() {
+		while (!internalMessageQueue.isEmpty()) // deliver messages on and on and on....
+		{
+			UpdateMessage message = internalMessageQueue.removeFirst();
+			message.receiver.update(message.direction, message.updateElement);
+		}
+	}
+
+	private void localUpdateTermination(long incrementedClock) {
+		network.reportLocalUpdateTermination(this, incrementedClock,
+				terminationCriteria);
+		terminationCriteria.clear();
+
+		// synchronized(clock){++clock;} // +1 incrementing for parity and easy
+		// comparison
+	}
+
+	// @pre: externalMessageQueue synchronized && nonempty
+	private UpdateMessage takeExternalMessage() {
+		UpdateMessage message = externalMessageQueue.removeFirst();
+		if (!externalMessageQueue.isEmpty()) { // copy the whole queue over
+													// for speedup
+			Deque<UpdateMessage> temp = externalMessageQueue;
+			externalMessageQueue = internalMessageQueue;
+			internalMessageQueue = temp;
+		}
+		return message;
+	}
+
+	/**
+	 * Provides an external address for the selected node.
+	 * @pre node belongs to this container.
+	 */
+	public <N extends Node> Address<N> makeAddress(N node) {
+		return new Address<N>(node);
+	}
+
+	/**
+	 * Checks whether a certain address points to a node at this container.
+	 */
+	public boolean isLocal(Address<? extends Node> address) {
+		return address.getContainer() == this;
+	}
+
+	/**
+	 * Returns an addressed node at this container. @pre: address.container ==
+	 * this, e.g. address MUST be local, no checks are performed.
+	 */
+	@SuppressWarnings("unchecked")
+	public <N extends Node> N resolveLocal(Address<N> address) {
+		N cached = address.getNodeCache();
+		if (cached != null) 
+			return cached;
+		else {
+			N node = (N) nodesById.get(address.getNodeId());
+			address.setNodeCache(node);
+			return node;
+		}
+	}
+	
+	/**
+	 * Registers a node into the rete network (should be called by constructor).
+	 * Every node MUST be registered by its constructor.
+	 * 
+	 * @return the unique nodeId issued to the node.
+	 */
+	public long registerNode(Node n) {
+		long id = nextId++;
+		nodesById.put(id, n);
+		return id;
+	}
+
+	/**
+	 * Unregisters a node from the rete network. Do NOT call if node is still
+	 * connected to other Nodes, or Adressed or otherwise referenced.
+	 */
+	public void unregisterNode(Node n) {
+		nodesById.remove(n.getNodeId());
+	}
+
+	/**
+	 * Registers a pattern memory into the rete network. Every memory MUST be
+	 * registered by its owner node.
+	 */
+	public void registerClearable(Clearable c) {
+		clearables.addFirst(c);
+	}
+
+	/**
+	 * Unregisters a pattern memory from the rete network.
+	 */
+	public void unregisterClearable(Clearable c) {
+		clearables.remove(c);
+	}
+
+	/**
+	 * Clears all memory contents in the network. Reverts to initial state.
+	 */
+	public void clearAll() {
+		for (Clearable c : clearables) {
+			c.clear();
+		}
+	}
+
+	/**
+	 * @return the library
+	 */
+	public Library getLibrary() {
+		return library;
+	}
+
+	public Network getNetwork() {
+		return network;
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString() {
+		StringBuilder sb = new StringBuilder();
+		String separator = System.getProperty("line.separator");
+		sb.append(super.toString() + "[[[" + separator);
+		java.util.List<Long> keys = new java.util.ArrayList<Long>(nodesById.keySet());
+		java.util.Collections.sort(keys);
+		for (Long key: keys){
+			sb.append(key + " -> " + nodesById.get(key) + separator);
+		}
+		sb.append("]]] of " + network);		
+		return sb.toString();
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/StandardNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/StandardNode.java
new file mode 100644
index 0000000..ea5d1ed
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/StandardNode.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+
+/**
+ * @author Gabor Bergmann
+ * 
+ */
+public abstract class StandardNode implements Supplier {
+	protected ReteContainer reteContainer;
+	protected long nodeId;
+	protected Object tag;
+	protected List<Receiver> children;
+
+	public StandardNode(ReteContainer reteContainer) {
+		this.reteContainer = reteContainer;
+		this.nodeId = reteContainer.registerNode(this);
+		children = new LinkedList<Receiver>();
+	}
+
+	protected void propagateUpdate(Direction direction, Tuple updateElement) {
+		for (Receiver r : children)
+			reteContainer.sendUpdateInternal(r, direction, updateElement);
+	}
+
+	public void appendChild(Receiver receiver) {
+		children.add(receiver);
+	}
+
+	public void removeChild(Receiver receiver) {
+		children.remove(receiver);
+	}
+
+	@Override
+	public String toString() {
+		if (tag != null)
+			return "[" + nodeId+ "]" + getClass().getSimpleName() + "[[" + tag.toString() + "]]";
+		else
+			return "[" + nodeId+ "]" + getClass().getSimpleName();
+	};
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Node#getNetwork()
+	 */
+	public ReteContainer getContainer() {
+		return reteContainer;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Node#getNodeId()
+	 */
+	public long getNodeId() {
+		return nodeId;
+	}
+
+	/**
+	 * @return the tag
+	 */
+	public Object getTag() {
+		return tag;
+	}
+
+	/**
+	 * @param tag
+	 *            the tag to set
+	 */
+	public void setTag(Object tag) {
+		this.tag = tag;
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Supplier.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Supplier.java
new file mode 100644
index 0000000..2a19f45
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Supplier.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network;
+
+import java.util.Collection;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+
+/**
+ * @author Gabor Bergmann
+ * 
+ *         A supplier is an object that can propagate insert or revoke events
+ *         towards receivers.
+ */
+public interface Supplier extends Node {
+
+	/**
+	 * pulls the contents of this object in this particular moment into a target
+	 * collection
+	 */
+	public void pullInto(Collection<Tuple> collector);
+
+	/**
+	 * appends a receiver that will continously receive insert and revoke
+	 * updates from this supplier
+	 */
+	void appendChild(Receiver receiver);
+
+	/**
+	 * removes a receiver
+	 */
+	void removeChild(Receiver receiver);
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Tunnel.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Tunnel.java
new file mode 100644
index 0000000..4c3ccce
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/Tunnel.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network;
+
+/**
+ * @author Gabor Bergmann
+ * 
+ *         A Tunnel is an interface into which elments can be instered and from
+ *         which productions can be extracted.
+ */
+public interface Tunnel extends Supplier, Receiver {
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/UpdateMessage.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/UpdateMessage.java
new file mode 100644
index 0000000..861a15e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/network/UpdateMessage.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+class UpdateMessage {
+	public Receiver receiver;
+	public Direction direction;
+	public Tuple updateElement;
+
+	public UpdateMessage(Receiver receiver, Direction direction,
+			Tuple updateElement) {
+		this.receiver = receiver;
+		this.direction = direction;
+		this.updateElement = updateElement;
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString() {
+		return "M." + direction + ": " + updateElement + " -> " + receiver;
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/remote/Address.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/remote/Address.java
new file mode 100644
index 0000000..56357fe
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/remote/Address.java
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Node;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+
+/**
+ * Remote identifier of a node of type T.
+ * 
+ * @author Gabor Bergmann
+ * 
+ */
+public class Address<T extends Node> {
+	ReteContainer container;
+	Long nodeId;
+	/**
+	 * Feel free to leave null e.g. if node is in a separate JVM.
+	 */
+	T nodeCache; 
+
+	/**
+	 * Address of local node (use only for containers in the same VM!)
+	 */
+	public static <N extends Node> Address<N> of(N node) {
+		return new Address<N>(node);
+	}
+
+	/**
+	 * General constructor.
+	 * @param container
+	 * @param nodeId
+	 */
+	public Address(ReteContainer container, Long nodeId) {
+		super();
+		this.container = container;
+		this.nodeId = nodeId;
+	}	
+	/**
+	 * Local-only constructor. (use only for containers in the same VM!)
+	 * @param T the node to address
+	 */
+	public Address(T node) {
+		super();
+		this.nodeCache = node;
+		this.container = node.getContainer();
+		this.nodeId = node.getNodeId();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#hashCode()
+	 */
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result
+				+ ((container == null) ? 0 : container.hashCode());
+		result = prime * result + ((nodeId == null) ? 0 : nodeId.hashCode());
+		return result;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (!(obj instanceof Address<?>))
+			return false;
+		final Address<?> other = (Address<?>) obj;
+		if (container == null) {
+			if (other.container != null)
+				return false;
+		} else if (!container.equals(other.container))
+			return false;
+		if (nodeId == null) {
+			if (other.nodeId != null)
+				return false;
+		} else if (!nodeId.equals(other.nodeId))
+			return false;
+		return true;
+	}
+
+	/**
+	 * @return the container
+	 */
+	public ReteContainer getContainer() {
+		return container;
+	}
+
+	/**
+	 * @param container
+	 *            the container to set
+	 */
+	public void setContainer(ReteContainer container) {
+		this.container = container;
+	}
+
+	/**
+	 * @return the nodeId
+	 */
+	public Long getNodeId() {
+		return nodeId;
+	}
+
+	/**
+	 * @param nodeId
+	 *            the nodeId to set
+	 */
+	public void setNodeId(Long nodeId) {
+		this.nodeId = nodeId;
+	}
+
+	public T getNodeCache() {
+		return nodeCache;
+	}
+
+	public void setNodeCache(T nodeCache) {
+		this.nodeCache = nodeCache;
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString() {
+		if (nodeCache==null)
+			return "A("+nodeId+" @ "+container+")";
+		else return "A("+nodeCache+")";
+
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/remote/RemoteReceiver.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/remote/RemoteReceiver.java
new file mode 100644
index 0000000..a101cde
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/remote/RemoteReceiver.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.SingleInputNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+
+/**
+ * This node delivers updates to a remote recipient; no updates are propagated
+ * further in this network.
+ * 
+ * @author Gabor Bergmann
+ * 
+ */
+public class RemoteReceiver extends SingleInputNode {
+
+	List<Address<? extends Receiver>> targets;
+
+	public RemoteReceiver(ReteContainer reteContainer) {
+		super(reteContainer);
+		targets = new ArrayList<Address<? extends Receiver>>();
+	}
+
+	public void addTarget(Address<? extends Receiver> target) {
+		targets.add(target);
+	}
+
+	public void pullInto(Collection<Tuple> collector) {
+		propagatePullInto(collector);
+	}
+
+	public Collection<Tuple> remotePull() {
+		return reteContainer.pullContents(this);
+	}
+
+	public void update(Direction direction, Tuple updateElement) {
+		for (Address<? extends Receiver> ad : targets)
+			reteContainer.sendUpdateToRemoteAddress(ad, direction,
+					updateElement);
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/remote/RemoteSupplier.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/remote/RemoteSupplier.java
new file mode 100644
index 0000000..441cc01
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/remote/RemoteSupplier.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote;
+
+import java.util.Collection;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.SingleInputNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+
+/**
+ * This node receives updates from a remote supplier; no local updates are
+ * expected.
+ * 
+ * @author Gabor Bergmann
+ * 
+ */
+public class RemoteSupplier extends SingleInputNode {
+
+	RemoteReceiver counterpart;
+
+	/**
+	 * @param reteContainer
+	 * @param remoteAddress
+	 */
+	public RemoteSupplier(ReteContainer reteContainer,
+			RemoteReceiver counterpart) {
+		super(reteContainer);
+		this.counterpart = counterpart;
+		counterpart.addTarget(reteContainer.makeAddress(this));
+	}
+
+	public void pullInto(Collection<Tuple> collector) {
+		Collection<Tuple> pulled = counterpart.remotePull();
+		collector.addAll(pulled);
+	}
+
+	public void update(Direction direction, Tuple updateElement) {
+		propagateUpdate(direction, updateElement);
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/DefaultProductionNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/DefaultProductionNode.java
new file mode 100644
index 0000000..901c889
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/DefaultProductionNode.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single;
+
+import java.util.HashMap;
+import java.util.Iterator;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Production;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+
+/**
+ * Default implementation of the Production node, based on
+ * UniquenessEnforcerNode
+ * 
+ * @author Gabor Bergmann
+ */
+public class DefaultProductionNode extends UniquenessEnforcerNode implements
+		Production {
+
+	protected HashMap<Object, Integer> posMapping;
+
+	// protected HashMap<TupleMask, Indexer> projections;
+
+	/**
+	 * @param reteContainer
+	 * @param posMapping
+	 */
+	public DefaultProductionNode(ReteContainer reteContainer,
+			HashMap<Object, Integer> posMapping) {
+		super(reteContainer, posMapping.size());
+		this.posMapping = posMapping;
+		// this.projections= new HashMap<TupleMask, Indexer>();
+	}
+
+	/**
+	 * @return the posMapping
+	 */
+	public HashMap<Object, Integer> getPosMapping() {
+		return posMapping;
+	}
+
+	public Iterator<Tuple> iterator() {
+		return memory.iterator();
+	}
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/EqualityFilterNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/EqualityFilterNode.java
new file mode 100644
index 0000000..c6ae354
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/EqualityFilterNode.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+public class EqualityFilterNode extends FilterNode {
+
+	int[] indices;
+	int first;
+
+	/**
+	 * @param reteContainer
+	 * @param indices
+	 *            indices of the Tuple that should hold equal values
+	 */
+	public EqualityFilterNode(ReteContainer reteContainer, int[] indices) {
+		super(reteContainer);
+		this.indices = indices;
+		first = indices[0];
+	}
+
+	@Override
+	public boolean check(Tuple ps) {
+		Object firstElement = ps.get(first);
+		for (int i = 1 /* first is omitted */; i < indices.length; i++) {
+			if (!ps.get(indices[i]).equals(firstElement))
+				return false;
+		}
+		return true;
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/FilterNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/FilterNode.java
new file mode 100644
index 0000000..292ad0d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/FilterNode.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single;
+
+import java.util.Collection;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+
+/**
+ * This node implements a simple filter. A stateless abstract check() predicate
+ * determines whether a matching is allowed to pass.
+ * 
+ * 
+ * 
+ * @author Gabor Bergmann
+ * 
+ */
+public abstract class FilterNode extends SingleInputNode {
+
+	public FilterNode(ReteContainer reteContainer) {
+		super(reteContainer);
+	}
+
+	/**
+	 * Abstract filtering predicate. Expected to be stateless.
+	 * 
+	 * @param ps
+	 *            the matching to be checked.
+	 * @return true if and only if the parameter matching is allowed to pass
+	 *         through this node.
+	 */
+	public abstract boolean check(Tuple ps);
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier#pullInto(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver)
+	 */
+	public void pullInto(Collection<Tuple> collector) {
+		for (Tuple ps : reteContainer.pullPropagatedContents(this)) {
+			if (check(ps))
+				collector.add(ps);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver#update(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple)
+	 */
+	public void update(Direction direction, Tuple updateElement) {
+		if (check(updateElement))
+			propagateUpdate(direction, updateElement);
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/InequalityFilterNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/InequalityFilterNode.java
new file mode 100644
index 0000000..bbe2bb2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/InequalityFilterNode.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+/**
+ * This node filters patterns according to equalities and inequalities of
+ * elements. The 'subject' element is asserted to be different from the elements
+ * given by the inequalityMask.
+ * 
+ * 
+ * @author Gabor Bergmann
+ * 
+ */
+public class InequalityFilterNode extends FilterNode {
+
+	int subjectIndex;
+	TupleMask inequalityMask;
+
+	/**
+	 * @param reteContainer
+	 * @param subjectIndex
+	 *            the index of the element that should be compared.
+	 * @param inequalityMask
+	 *            the indices of elements that should be different from the
+	 *            subjectIndex.
+	 */
+	public InequalityFilterNode(ReteContainer reteContainer, int subject,
+			TupleMask inequalityMask) {
+		super(reteContainer);
+		this.subjectIndex = subject;
+		this.inequalityMask = inequalityMask;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.FilterNode#check(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple)
+	 */
+	@Override
+	public boolean check(Tuple ps) {
+		Object subject = ps.get(subjectIndex);
+		for (int ineq : inequalityMask.indices) {
+			if (subject.equals(ps.get(ineq)))
+				return false;
+		}
+		return true;
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/SingleInputNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/SingleInputNode.java
new file mode 100644
index 0000000..593ed9f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/SingleInputNode.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single;
+
+import java.util.Collection;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.StandardNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Tunnel;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+
+/**
+ * @author Gabor Bergmann
+ * 
+ */
+public abstract class SingleInputNode extends StandardNode implements Tunnel {
+
+	protected Supplier parent;
+
+	/**
+	 * 
+	 */
+	public SingleInputNode(ReteContainer reteContainer) {
+		super(reteContainer);
+		parent = null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver#appendParent(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier)
+	 */
+	public void appendParent(Supplier supplier) {
+		if (parent == null) 
+			parent = supplier;
+		else
+			throw new UnsupportedOperationException("Illegal RETE edge: " + this + " already has a parent (" +  
+					parent + ") and cannot connect to additional parent (" + supplier + 
+					") as it is not a Uniqueness Enforcer Node. ");
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver#removeParent(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier)
+	 */
+	public void removeParent(Supplier supplier) {
+		if (parent == supplier) 
+			parent = null;
+		else
+			throw new IllegalArgumentException("Illegal RETE edge removal: the parent of " + this + " is not " + supplier);
+	}
+
+	/**
+	 * To be called by derived classes and ReteContainer.
+	 */
+	public void propagatePullInto(Collection<Tuple> collector) {
+		if (parent != null) parent.pullInto(collector);
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/TransformerNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/TransformerNode.java
new file mode 100644
index 0000000..440bb16
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/TransformerNode.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single;
+
+import java.util.Collection;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+
+public abstract class TransformerNode extends SingleInputNode {
+
+	public TransformerNode(ReteContainer reteContainer) {
+		super(reteContainer);
+	}
+
+	protected abstract Tuple transform(Tuple input);
+
+	public void pullInto(Collection<Tuple> collector) {
+		for (Tuple ps : reteContainer.pullPropagatedContents(this)) {
+			collector.add(transform(ps));
+		}
+	}
+
+	public void update(Direction direction, Tuple updateElement) {
+		propagateUpdate(direction, transform(updateElement));
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/TransparentNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/TransparentNode.java
new file mode 100644
index 0000000..e5270e7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/TransparentNode.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single;
+
+import java.util.Collection;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+
+/**
+ * Simply propagates everything. Might be used to join or fork.
+ * 
+ * @author Gabor Bergmann
+ */
+public class TransparentNode extends SingleInputNode {
+
+	public TransparentNode(ReteContainer reteContainer) {
+		super(reteContainer);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver#update(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple)
+	 */
+	public void update(Direction direction, Tuple updateElement) {
+		propagateUpdate(direction, updateElement);
+
+	}
+
+	public void pullInto(Collection<Tuple> collector) {
+		propagatePullInto(collector);
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/TrimmerNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/TrimmerNode.java
new file mode 100644
index 0000000..60040a6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/TrimmerNode.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+/**
+ * Trims the matchings as specified by a mask.
+ * 
+ * @author Gabor Bergmann
+ * 
+ */
+public class TrimmerNode extends TransformerNode {
+
+	protected TupleMask mask;
+
+	/**
+	 * @param reteContainer
+	 * @param mask
+	 *            The mask used to trim substitutions.
+	 */
+	public TrimmerNode(ReteContainer reteContainer, TupleMask mask) {
+		super(reteContainer);
+		this.mask = mask;
+	}
+
+	/**
+	 * @param reteContainer
+	 * @param mask
+	 *            The mask used to trim substitutions.
+	 */
+	public TrimmerNode(ReteContainer reteContainer) {
+		super(reteContainer);
+		this.mask = null;
+	}
+
+	/**
+	 * @return the mask
+	 */
+	public TupleMask getMask() {
+		return mask;
+	}
+
+	/**
+	 * @param mask
+	 *            the mask to set
+	 */
+	public void setMask(TupleMask mask) {
+		this.mask = mask;
+	}
+
+	@Override
+	protected Tuple transform(Tuple input) {
+		return mask.transform(input);
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/UniquenessEnforcerNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/UniquenessEnforcerNode.java
new file mode 100644
index 0000000..6aa6c8d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/UniquenessEnforcerNode.java
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.IdentityIndexer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.index.NullIndexer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMemory;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util.Options;
+
+
+/**
+ * Ensures that no identical copies get to the output. Only one replica of each
+ * pattern substitution may traverse this node.
+ * 
+ * @author Gabor Bergmann
+ */
+public class UniquenessEnforcerNode extends SingleInputNode {
+
+	protected Collection<Supplier> parents;
+	protected TupleMemory memory;
+	protected NullIndexer nullIndexer;
+	protected IdentityIndexer identityIndexer;
+	protected int tupleWidth;
+	
+	public UniquenessEnforcerNode(ReteContainer reteContainer, int tupleWidth) {
+		super(reteContainer);
+		parents = new ArrayList<Supplier>();
+		memory = new TupleMemory();
+		this.tupleWidth = tupleWidth;
+		reteContainer.registerClearable(memory);
+		
+		if (Options.employTrivialIndexers) {
+			nullIndexer = new NullIndexer(reteContainer, tupleWidth, memory, this);
+			reteContainer.getLibrary().registerSpecializedProjectionIndexer(this, nullIndexer);
+			identityIndexer = new IdentityIndexer(reteContainer, tupleWidth, memory, this);
+			reteContainer.getLibrary().registerSpecializedProjectionIndexer(this, identityIndexer);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver#update(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple)
+	 */
+	public void update(Direction direction, Tuple updateElement) {
+		boolean change;
+		if (direction == Direction.INSERT) {
+			change = memory.add(updateElement);
+		} else { // REVOKE
+			try {
+				change = memory.remove(updateElement);
+			} catch (java.lang.NullPointerException ex) {
+				// TODO UGLY, but will it find our problems?
+				change = false;
+				System.err
+						.println("Duplicate deletion of " + updateElement + " was detected in UniquenessEnforcer " + this);
+				ex.printStackTrace();
+			}
+		}
+		if (change) {
+			propagateUpdate(direction, updateElement);
+			
+			// trivial projectionIndexers
+			if (Options.employTrivialIndexers) {
+				identityIndexer.propagate(direction, updateElement);
+				boolean radical = (direction==Direction.REVOKE && memory.isEmpty()) || (direction==Direction.INSERT && memory.size()==1);
+				nullIndexer.propagate(direction, updateElement, radical);
+			}
+
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier#pullInto(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver)
+	 */
+	public void pullInto(Collection<Tuple> collector) {
+		collector.addAll(memory);
+	}
+
+	public NullIndexer getNullIndexer() {
+		return nullIndexer;
+	}
+
+	public IdentityIndexer getIdentityIndexer() {
+		return identityIndexer;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.SingleInputNode#appendParent(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier)
+	 */
+	@Override
+	public void appendParent(Supplier supplier) {
+		parents.add(supplier);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.SingleInputNode#removeParent(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier)
+	 */
+	@Override
+	public void removeParent(Supplier supplier) {
+		parents.remove(supplier);
+	}
+	
+	//
+	// public void tearOff() {
+	// for (Supplier parent : new LinkedList<Supplier>(parents) )
+	// {
+	// network.disconnectAndDesynchronize(parent, this);
+	// }
+	// }
+	//
+	// /**
+	// * @return the dirty
+	// */
+	// public boolean isDirty() {
+	// return dirty;
+	// }
+	//
+	// /**
+	// * @param dirty the dirty to set
+	// */
+	// public void setDirty(boolean dirty) {
+	// this.dirty = dirty;
+	// }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/ValueBinderFilterNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/ValueBinderFilterNode.java
new file mode 100644
index 0000000..5599389
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/single/ValueBinderFilterNode.java
@@ -0,0 +1,50 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+

+/**

+ * A filter node that keeps only those tuples that contain a certain value at a certain position.

+ * @author Bergmann G�bor

+ *

+ */

+public class ValueBinderFilterNode extends FilterNode {

+

+	int bindingIndex;

+	Object bindingValue;

+	

+

+	/**

+	 * @param reteContainer

+	 * @param bindingIndex the position in the tuple that should be bound

+	 * @param bindingValue the value to which the tuple has to be bound

+	 */

+	public ValueBinderFilterNode(ReteContainer reteContainer, int bindingIndex,

+			Object bindingValue) {

+		super(reteContainer);

+		this.bindingIndex = bindingIndex;

+		this.bindingValue = bindingValue;

+	}

+

+

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.single.FilterNode#check(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple)

+	 */

+	@Override

+	public boolean check(Tuple ps) {

+		return bindingValue.equals(ps.get(bindingIndex));

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/Clearable.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/Clearable.java
new file mode 100644
index 0000000..468b4b6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/Clearable.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple;
+
+/**
+ * @author Gabor Bergmann
+ * 
+ *         An instance of clearable pattern memory.
+ */
+public interface Clearable {
+	/**
+	 * Clear all partial matchings stored in memory
+	 * 
+	 */
+	void clear();
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/FlatTuple.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/FlatTuple.java
new file mode 100644
index 0000000..d102984
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/FlatTuple.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple;
+
+import java.util.Arrays;
+
+/**
+ * @author Gabor Bergmann Default Tuple implementation
+ */
+public class FlatTuple extends Tuple {
+
+	/**
+	 * Array of substituted values. DO NOT MODIFY! Use Constructor to build a
+	 * new instance instead.
+	 */
+	private final Object[] elements;
+
+	/**
+	 * Creates a Tuple instance, fills it with the given array. @pre: no elements
+	 * are null
+	 * 
+	 * @param elements
+	 *            array of substitution values
+	 */
+	public FlatTuple(Object[] elements) {
+		this.elements = elements;
+		calcHash();
+	}
+
+	/**
+	 * Creates a Tuple instance of size one, fills it with the given object.
+	 * @pre: o!=null
+	 * 
+	 * @param o
+	 *            the single substitution
+	 */
+	public FlatTuple(Object o) {
+		elements = new Object[1];
+		elements[0] = o;
+		calcHash();
+	}
+
+	/**
+	 * Creates a Tuple instance of size two, fills it with the given objects.
+	 * @pre: o1!=null, o2!=null
+	 */
+	public FlatTuple(Object o1, Object o2) {
+		elements = new Object[2];
+		elements[0] = o1;
+		elements[1] = o2;
+		calcHash();
+	}
+
+	/**
+	 * Creates a Tuple instance of size three, fills it with the given objects.
+	 * @pre: o1!=null, o2!=null, o3!=null
+	 */
+	public FlatTuple(Object o1, Object o2, Object o3) {
+		elements = new Object[3];
+		elements[0] = o1;
+		elements[1] = o2;
+		elements[2] = o3;
+		calcHash();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple#get(int)
+	 */
+	@Override
+	public Object get(int index) {
+		return elements[index];
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple#getSize()
+	 */
+	@Override
+	public int getSize() {
+		return elements.length;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple#getElements()
+	 */
+	@Override
+	public Object[] getElements() {
+		return elements;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple#internalEquals(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple)
+	 */
+	@Override
+	protected boolean internalEquals(Tuple other) {
+		if (other instanceof FlatTuple) {
+			return Arrays.equals(elements, ((FlatTuple) other).elements);
+		} else
+			return super.internalEquals(other);
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/LeftInheritanceTuple.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/LeftInheritanceTuple.java
new file mode 100644
index 0000000..44aead8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/LeftInheritanceTuple.java
@@ -0,0 +1,175 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple;
+
+import java.util.Arrays;
+
+/**
+ * 
+ * Tuple that inherits another tuple on the left.
+ * 
+ * @author Gabor Bergmann
+ * 
+ */
+public class LeftInheritanceTuple extends Tuple {
+	/**
+	 * The number of elements that aren't stored locally, but inherited from an
+	 * ancestor Tuple instead.
+	 */
+	private final int inheritedIndex;
+
+	/**
+	 * This object contains the same elements as the ancestor on the first
+	 * inheritedIndex positions
+	 */
+	private final Tuple ancestor;
+
+	/**
+	 * Array of substituted values above inheritedIndex. DO NOT MODIFY! Use
+	 * Constructor to build a new instance instead.
+	 */
+	private final Object[] localElements;
+
+	//
+	// /**
+	// * Creates a Tuple instance, fills it with the given array.
+	// * @pre: no elements are null
+	// * @param elements array of substitution values
+	// */
+	// public Tuple(Object[] elements)
+	// {
+	// this.localElements = elements;
+	// this.ancestor=null;
+	// this.inheritedIndex = 0;
+	// calcHash();
+	// }
+
+	/**
+	 * Creates a Tuple instance, lets it inherit from an ancestor, extends it
+	 * with a given array. @pre: no elements are null
+	 * 
+	 * @param elements
+	 *            array of substitution values
+	 */
+	public LeftInheritanceTuple(Tuple ancestor, Object[] localElements) {
+		this.localElements = localElements;
+		this.ancestor = ancestor;
+		this.inheritedIndex = ancestor.getSize();
+		calcHash();
+	}
+
+	//	
+	// /**
+	// * Creates a Tuple instance of size one, fills it with the given object.
+	// * @pre: o!=null
+	// * @param o the single substitution
+	// */
+	// public Tuple(Object o)
+	// {
+	// localElements = new Object [1];
+	// localElements[0] = o;
+	// this.ancestor=null;
+	// this.inheritedIndex = 0;
+	// calcHash();
+	// }
+	//	
+	// /**
+	// * Creates a Tuple instance of size two, fills it with the given objects.
+	// * @pre: o1!=null, o2!=null
+	// */
+	// public Tuple(Object o1, Object o2)
+	// {
+	// localElements = new Object [2];
+	// localElements[0] = o1;
+	// localElements[1] = o2;
+	// this.ancestor=null;
+	// this.inheritedIndex = 0;
+	// calcHash();
+	// }
+	//	
+	// /**
+	// * Creates a Tuple instance of size three, fills it with the given
+	// objects.
+	// * @pre: o1!=null, o2!=null, o3!=null
+	// */
+	// public Tuple(Object o1, Object o2, Object o3)
+	// {
+	// localElements = new Object [3];
+	// localElements[0] = o1;
+	// localElements[1] = o2;
+	// localElements[2] = o3;
+	// this.ancestor=null;
+	// this.inheritedIndex = 0;
+	// calcHash();
+	// }
+
+	/**
+	 * @return number of elements
+	 */
+	public int getSize() {
+		return inheritedIndex + localElements.length;
+	}
+
+	/**
+	 * @pre: 0 <= index < getSize()
+	 * 
+	 * @return the element at the specified index
+	 */
+	public Object get(int index) {
+		return (index < inheritedIndex) ? ancestor.get(index)
+				: localElements[index - inheritedIndex];
+	}
+
+	/**
+	 * Optimized hash calculation
+	 */
+	@Override
+	void calcHash() {
+		final int PRIME = 31;
+		cachedHash = ancestor.hashCode();
+		for (int i = 0; i < localElements.length; i++) {
+			cachedHash = PRIME * cachedHash;
+			Object element = localElements[i];
+			if (element != null)
+				cachedHash += element.hashCode();
+		}
+	}
+
+	/**
+	 * Optimized equals calculation (prediction: true, since hash values match)
+	 */
+	@Override
+	protected boolean internalEquals(Tuple other) {
+		if (other instanceof LeftInheritanceTuple) {
+			LeftInheritanceTuple lit = (LeftInheritanceTuple) other;
+			if (lit.inheritedIndex == this.inheritedIndex
+					&& this.ancestor.equals(lit.ancestor))
+				return Arrays.equals(this.localElements, lit.localElements);
+		}
+		return super.internalEquals(other);
+	}
+
+	// public int compareTo(Object arg0) {
+	// Tuple other = (Tuple) arg0;
+	//		
+	// int retVal = cachedHash - other.cachedHash;
+	// if (retVal==0) retVal = elements.length - other.elements.length;
+	// for (int i=0; retVal==0 && i<elements.length; ++i)
+	// {
+	// if (elements[i] == null && other.elements[i] != null) retVal = -1;
+	// else if (other.elements[i] == null) retVal = 1;
+	// else retVal = elements[i].compareTo(other.elements[i]);
+	// }
+	// return retVal;
+	// }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/MaskedTuple.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/MaskedTuple.java
new file mode 100644
index 0000000..27c8786
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/MaskedTuple.java
@@ -0,0 +1,55 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple;

+

+/**

+ * A tuple that transparently provides a masked (transformed) view of another tuple.

+ * @author Bergmann Gábor

+ *

+ */

+public class MaskedTuple extends Tuple {

+

+	Tuple wrapped;

+	TupleMask mask;

+	

+	

+	public MaskedTuple(Tuple wrapped, TupleMask mask) {

+		super();

+//		if (wrapped instanceof MaskedTuple) {

+//			MaskedTuple parent = (MaskedTuple)wrapped;

+//			this.wrapped = parent.wrapped;

+//			this.mask = mask.transform(parent.mask);

+//		}

+//		else 

+		{

+			this.wrapped = wrapped;

+			this.mask = mask;

+		}

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple#get(int)

+	 */

+	@Override

+	public Object get(int index) {

+		return wrapped.get(mask.indices[index]);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple#getSize()

+	 */

+	@Override

+	public int getSize() {

+		return mask.indices.length;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/MaskedTupleMemory.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/MaskedTupleMemory.java
new file mode 100644
index 0000000..554a393
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/MaskedTupleMemory.java
@@ -0,0 +1,179 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Set;
+
+/**
+ * @author Gabor Bergmann
+ *
+ *         Indexes a collection of Tuples according to their masks.
+ */
+public class MaskedTupleMemory implements Clearable, Iterable<Tuple> {
+	/**
+	 * Counts the number of occurences of each pattern. Element is deleted if #
+	 * of occurences drops to 0.
+	 */
+	protected Map<Tuple, Collection<Tuple>> matchings;
+
+	/**
+	 * The mask used to index the matchings
+	 */
+	protected TupleMask mask;
+
+	/**
+	 * @param mask
+	 *            The mask used to index the matchings
+	 */
+	public MaskedTupleMemory(TupleMask mask) {
+		super();
+		this.mask = mask;
+		matchings = new HashMap<Tuple, Collection<Tuple>>();
+	}
+
+	/**
+	 * Adds a pattern occurence to the memory
+	 * @param ps
+	 *
+	 * @return true if new signature encountered
+	 */
+	public boolean add(Tuple ps) {
+		Tuple signature = mask.transform(ps);
+		return add(ps, signature);
+	}
+
+	/**
+	 * Adds a pattern occurence to the memory, with given signature
+	 * @param ps
+	 * @param signature
+	 *
+	 * @return true if new signature encountered
+	 */
+	public boolean add(Tuple ps, Tuple signature) {
+		Collection<Tuple> coll = matchings.get(signature);
+		boolean change = (coll == null);
+
+		if (change) {
+			coll = new TupleMemory();
+			matchings.put(signature, coll);
+		}
+		if (!coll.add(ps)) {
+			throw new IllegalStateException();
+		}
+
+		return change;
+	}
+
+	/**
+	 * Removes a pattern occurence from the memory
+	 *
+	 * @return true if this was the the last occurence of the signature
+	 */
+	public boolean remove(Tuple ps) {
+		Tuple signature = mask.transform(ps);
+		return remove(ps, signature);
+	}
+
+	/**
+	 * Removes a pattern occurence from the memory, with given signature
+	 *
+	 * @return true if this was the the last occurence of the signature
+	 */
+	public boolean remove(Tuple ps, Tuple signature) {
+		Collection<Tuple> coll = matchings.get(signature);
+		if (!coll.remove(ps)) {
+			throw new IllegalStateException();
+		}
+
+		boolean change = coll.isEmpty();
+		if (change)
+			matchings.remove(signature);
+
+		return change;
+	}
+
+	/**
+	 * Retrieves entries that have the specified signature
+	 *
+	 * @return collection of matchings found
+	 */
+	public Collection<Tuple> get(Tuple signature) {
+		return matchings.get(signature);
+	}
+
+	public void clear() {
+		matchings.clear();
+	}
+	/**
+	 * Retrieves a read-only collection of exactly those signatures for which at least one tuple is stored
+	 *
+	 * @return collection of significant signatures
+	 */
+	public Collection<Tuple> getSignatures() {
+		return matchings.keySet();
+	}
+	public Iterator<Tuple> iterator() {
+		return new MaskedPatternIterator(this);
+	}
+
+	class MaskedPatternIterator implements Iterator<Tuple> {
+		// private MaskedTupleMemory memory;
+		Iterator<Collection<Tuple>> signatureGroup;
+		Iterator<Tuple> element;
+
+		public MaskedPatternIterator(MaskedTupleMemory memory) {
+			// this.memory = memory;
+			signatureGroup = memory.matchings.values().iterator();
+			Set<Tuple> emptySet = Collections.emptySet();
+			element = emptySet.iterator();
+		}
+
+		public boolean hasNext() {
+			return (element.hasNext() || signatureGroup.hasNext());
+		}
+
+		public Tuple next() throws NoSuchElementException {
+			if (element.hasNext())
+				return element.next();
+			else if (signatureGroup.hasNext()) {
+				element = signatureGroup.next().iterator();
+				return element.next();
+			} else
+				throw new NoSuchElementException();
+		}
+
+		/**
+		 * Not implemented
+		 */
+		public void remove() {
+
+		}
+
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString() {
+		return "MTM<"+mask+"|"+matchings+">";
+	}
+
+
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/Tuple.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/Tuple.java
new file mode 100644
index 0000000..889e11b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/Tuple.java
@@ -0,0 +1,215 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author Gabor Bergmann
+ * 
+ */
+public abstract class Tuple {
+
+	/**
+	 * Caches precalculated hash value
+	 */
+	protected int cachedHash;
+
+	/**
+	 * Creates a Tuple instance Derivatives should call calcHash()
+	 */
+	protected Tuple() {
+		// calcHash();
+	}
+
+	/**
+	 * @return number of elements
+	 */
+	public abstract int getSize();
+
+	/**
+	 * @pre: 0 <= index < getSize()
+	 * 
+	 * @return the element at the specified index
+	 */
+	public abstract Object get(int index);
+
+	/**
+	 * @return the array containing all elements of this Tuple
+	 */
+	public Object[] getElements() {
+		Object[] allElements = new Object[getSize()];
+		for (int i = 0; i < allElements.length; ++i)
+			allElements[i] = get(i);
+		return allElements;
+	}
+	
+	/**
+	 * @return the set containing all distinct elements of this Tuple, cast as type T
+	 */
+	@SuppressWarnings("unchecked")
+	public <T> Set<T> getDistinctElements() {
+		Set<T> result = new HashSet<T>();
+		Object[] elements = getElements();
+		for (Object object : elements) {
+			result.add((T) object);
+		}
+		return result;
+	}
+	/**
+	 * Hash calculation. Overrides should keep semantics.
+	 */
+	void calcHash() {
+		final int PRIME = 31;
+		cachedHash = 1;
+		for (int i = 0; i < getSize(); i++) {
+			cachedHash = PRIME * cachedHash;
+			Object element = get(i);
+			if (element != null)
+				cachedHash += element.hashCode();
+		}
+	}
+
+	/**
+	 * Calculates an inverted index of the elements of this pattern. For each
+	 * element, the index of the (last) occurrence is calculated.
+	 * 
+	 * @return the inverted index mapping each element of this pattern to its
+	 *         index in the array
+	 */
+	public Map<Object, Integer> invertIndex() {
+		Map<Object, Integer> result = new HashMap<Object, Integer>();
+		for (int i = 0; i < getSize(); i++)
+			result.put(get(i), i);
+		return result;
+	}
+	
+	/**
+	 * Calculates an inverted index of the elements of this pattern. For each
+	 * element, the index of all of its occurrences is calculated.
+	 * 
+	 * @return the inverted index mapping each element of this pattern to its
+	 *         index in the array
+	 */
+	public Map<Object, List<Integer>> invertIndexWithMupliplicity() {
+		Map<Object, List<Integer>> result = new HashMap<Object, List<Integer>>();
+		for (int i = 0; i < getSize(); i++) {
+			Object value = get(i);
+			List<Integer> indices = result.get(value);
+			if (indices == null) {
+				indices = new ArrayList<Integer>();
+				result.put(value, indices);
+			}
+			indices.add(i);
+		}
+		return result;
+	}
+	
+	// public int compareTo(Object arg0) {
+	// Tuple other = (Tuple) arg0;
+	//		
+	// int retVal = cachedHash - other.cachedHash;
+	// if (retVal==0) retVal = elements.length - other.elements.length;
+	// for (int i=0; retVal==0 && i<elements.length; ++i)
+	// {
+	// if (elements[i] == null && other.elements[i] != null) retVal = -1;
+	// else if (other.elements[i] == null) retVal = 1;
+	// else retVal = elements[i].compareTo(other.elements[i]);
+	// }
+	// return retVal;
+	// }
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (!(obj instanceof Tuple))
+			return false;
+		final Tuple other = (Tuple) obj;
+		if (cachedHash != other.cachedHash)
+			return false;
+		return internalEquals(other);
+	}
+
+	protected boolean internalEquals(Tuple other) {
+		if (getSize() != other.getSize())
+			return false;
+		for (int i = 0; i < getSize(); ++i) {
+			Object ours = get(i);
+			Object theirs = other.get(i);
+
+			if (ours == null) {
+				if (theirs != null)
+					return false;
+			} else {
+				if (!ours.equals(theirs))
+					return false;
+			}
+		}
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#hashCode()
+	 */
+	@Override
+	public int hashCode() {
+		/*
+		 * final int PRIME = 31; int result = 1; result = PRIME result +
+		 * Arrays.hashCode(elements); return result;
+		 */
+		return cachedHash;
+	}
+
+	@Override
+	public String toString() {
+		StringBuilder s = new StringBuilder();
+		s.append("T(");
+		for (Object o : getElements()) {
+			s.append(o == null ? "null" : o.toString());
+			s.append(';');
+		}
+		s.append(')');
+		return s.toString();
+	}
+
+	/**
+	 * @param obsolete
+	 * @param replacement
+	 * @return
+	 */
+	public Tuple replaceAll(Object obsolete, Object replacement) {
+		Object[] oldElements = getElements();
+		Object[] newElements = new Object[oldElements.length];
+		for (int i=0; i<oldElements.length; ++i) {
+			newElements[i] = obsolete.equals(oldElements[i]) ?
+					replacement :
+					oldElements[i];
+		}
+		return new FlatTuple(newElements);
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/TupleMask.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/TupleMask.java
new file mode 100644
index 0000000..b063e92
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/TupleMask.java
@@ -0,0 +1,306 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * @author Gabor Bergmann
+ * 
+ *         Specifies select indices of a tuple. If viewed through this
+ *         mask, the signature of the pattern will consist of its individual
+ *         substitutions at the given positions, in the exact same order as they
+ *         appear in indices[].
+ * 
+ */
+public class TupleMask {
+	/**
+	 * indices[i] specifies the index of the substitution in the original
+	 * tuple that occupies the i-th place in the masked signature.
+	 */
+	public final int[] indices;
+	/**
+	 * indicesSorted is indices, sorted in ascending order.
+	 */
+	public int[] indicesSorted;
+	/**
+	 * the size of the tuple this mask is applied to
+	 */
+	public int sourceWidth;
+
+	/**
+	 * Creates a TupleMask instance with the given indices array
+	 */
+	public TupleMask(int[] indices, int sourceWidth) {
+		this.sourceWidth = sourceWidth;
+		this.indices = indices;
+		indicesSorted = null;
+	}
+	
+	/**
+	 * Creates a TupleMask instance of the given size that maps the first
+	 * 'size' elements intact
+	 */
+	public static TupleMask linear(int size, int sourceWidth) {
+		int[] indices = new int[size];
+		for (int i=0; i<size; i++) indices[i]=i;
+		return new TupleMask(indices, sourceWidth);
+	}
+
+	/**
+	 * Creates a TupleMask instance of the given size that maps every single
+	 * element intact
+	 */
+	public static TupleMask identity(int size) {
+		return linear(size, size);
+	}
+	
+	/**
+	 * Creates a TupleMask instance of the given size that does not emit output.
+	 */
+	public static TupleMask empty(int sourceWidth) {
+		return linear(0, sourceWidth);
+	}
+	
+	/**
+	 * Creates a TupleMask instance that maps the tuple intact save for a single element at the specified index which is omitted 
+	 */
+	public static TupleMask omit(int omission, int sourceWidth) {
+		int size = sourceWidth-1;
+		int[] indices = new int[size];
+		for (int i=0; i<omission; i++) indices[i]=i;
+		for (int i=omission; i<size; i++) indices[i]=i+1;
+		return new TupleMask(indices, sourceWidth);
+	}
+
+	/**
+	 * Creates a TupleMask instance that discards positions where keep is true
+	 */
+	public TupleMask(boolean[] keep) {
+		this.sourceWidth = keep.length;
+		int size = 0;
+		for (int k = 0; k < keep.length; ++k)
+			if (keep[k])
+				size++;
+		this.indices = new int[size];
+		int l = 0;
+		for (int k = 0; k < keep.length; ++k)
+			if (keep[k])
+				indices[l++] = k;
+		indicesSorted = null;
+	}
+	
+	/**
+	 * Creates a TupleMask instance that moves an element from one index to other, shifting the others if neccessary.
+	 */
+	public static TupleMask displace(int from, int to, int sourceWidth) {
+		int[] indices = new int[sourceWidth];
+		for (int i=0; i<sourceWidth; i++) 
+			if (i==to) indices[i]=from;
+			else if (i>=from && i<to) indices[i]=i+1;
+			else if (i>to && i<=from) indices[i]=i-1;
+			else indices[i]=i;
+		return new TupleMask(indices, sourceWidth);
+	}
+	/**
+	 * Creates a TupleMask instance that selects a single element of the tuple.
+	 */
+	public static TupleMask selectSingle(int selected, int sourceWidth) {
+		int[] indices = {selected};
+		return new TupleMask(indices, sourceWidth);
+	}
+	/**
+	 * Creates a TupleMask instance that selects whatever is selected by left, and appends whatever is selected by right.
+	 * PRE: left and right have the same sourcewidth
+	 */
+	public static TupleMask append(TupleMask left, TupleMask right) {
+		int leftLength = left.indices.length;
+		int rightLength = right.indices.length;
+		int[] indices = new int[leftLength + rightLength];
+		for (int i=0; i<leftLength; ++i) indices[i] = left.indices[i];
+		for (int i=0; i<rightLength; ++i) indices[i+leftLength] = right.indices[i];
+		return new TupleMask(indices, left.sourceWidth);
+	}
+
+	/**
+	 * Generates indicesSorted from indices
+	 * 
+	 */
+	public void sort() {
+		indicesSorted = new int[indices.length];
+		List<Integer> list = new LinkedList<Integer>();
+		for (int i = 0; i < indices.length; ++i)
+			list.add(indices[i]);
+		java.util.Collections.sort(list);
+		int i = 0;
+		for (Integer a : list)
+			indicesSorted[i++] = a;
+	}
+
+	/**
+	 * Generates a masked view of the original pattern.
+	 */
+	public Tuple transform(Tuple original) {
+		Object signature[] = new Object[indices.length];
+		for (int i = 0; i < indices.length; ++i)
+			signature[i] = original.get(indices[i]);
+		return new FlatTuple(signature);
+	}
+	
+	/**
+	 * Transforms a given mask directly, instead of transforming tuples that were transformed by the other mask.
+	 * @return a mask that cascades the effects this mask after the mask provided as parameter.
+	 */
+	public TupleMask transform(TupleMask mask) {
+		int[] cascadeIndices = new int[indices.length];
+		for (int i = 0; i < indices.length; ++i)
+			cascadeIndices[i] = mask.indices[indices[i]];
+		return new TupleMask(cascadeIndices, mask.sourceWidth);
+	}	
+
+	// /**
+	// * Generates a complementer mask that maps those elements that were
+	// untouched by the original mask.
+	// * Ordering is left intact.
+	// * A Tuple is used for reference concerning possible equalities among
+	// elements.
+	// */
+	// public TupleMask complementer(Tuple reference)
+	// {
+	// HashSet<Object> touched = new HashSet<Object>();
+	// LinkedList<Integer> untouched = new LinkedList<Integer>();
+	//		
+	// for (int index : indices) touched.add(reference.get(index));
+	// for (int index=0; index<reference.getSize(); ++index)
+	// {
+	// if (touched.add(reference.get(index))) untouched.addLast(index);
+	// }
+	//		
+	// int[] complementer = new int[untouched.size()];
+	// int k = 0;
+	// for (Integer integer : untouched) complementer[k++] = integer;
+	// return new TupleMask(complementer, reference.getSize());
+	// }
+
+	/**
+	 * Combines two substitutions. The new pattern will contain all
+	 * substitutions of masked and unmasked, assuming that the elements of
+	 * masked indicated by this mask are already matched against unmasked.
+	 * 
+	 * POST: the result will start with an exact copy of unmasked
+	 * 
+	 * @param unmasked
+	 *            primary pattern substitution that is left intact.
+	 * @param masked
+	 *            secondary pattern substitution that is transformed to the end
+	 *            of the result.
+	 * @param useInheritance
+	 *            whether to use inheritance or copy umasked into result
+	 *            instead.
+	 * @param asComplementer
+	 *            whether this mask maps from the masked Tuple to the tail of
+	 *            the result or to the unmasked one.
+	 * @return new pattern that is a combination of unmasked and masked.
+	 */
+	public Tuple combine(Tuple unmasked, Tuple masked, boolean useInheritance, boolean asComplementer) {
+
+		int combinedLength = asComplementer ? indices.length : masked.getSize()
+				- indices.length;
+		if (!useInheritance)
+			combinedLength += unmasked.getSize();
+		Object combined[] = new Object[combinedLength];
+
+		int cPos = 0;
+		if (!useInheritance) {
+			for (int i = 0; i < unmasked.getSize(); ++i)
+				combined[cPos++] = unmasked.get(i);
+		}
+
+		if (asComplementer) {
+			for (int i = 0; i < indices.length; ++i)
+				combined[cPos++] = masked.get(indices[i]);
+		} else {
+			if (indicesSorted == null)
+				sort();
+			int mPos = 0;
+			for (int i = 0; i < masked.getSize(); ++i)
+				if (mPos < indicesSorted.length && i == indicesSorted[mPos])
+					mPos++;
+				else
+					combined[cPos++] = masked.get(i);
+		}
+
+		return useInheritance ? new LeftInheritanceTuple(unmasked, combined)
+				: new FlatTuple(combined);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#hashCode()
+	 */
+	@Override
+	public int hashCode() {
+		final int PRIME = 31;
+		int result = sourceWidth;
+		for (int i : indices)
+			result = PRIME * result + i;
+		return result;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		final TupleMask other = (TupleMask) obj;
+		if (sourceWidth != other.sourceWidth)
+			return false;
+		if (indices.length != other.indices.length)
+			return false;
+		for (int k = 0; k < indices.length; k++)
+			if (indices[k] != other.indices[k])
+				return false;
+		return true;
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString() {
+		StringBuilder s = new StringBuilder();
+		s.append("M("+sourceWidth+"->");
+		for (int i : indices) {
+			s.append(i);
+			s.append(',');
+		}
+		s.append(')');
+		return s.toString();
+	}
+
+
+
+
+
+
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/TupleMemory.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/TupleMemory.java
new file mode 100644
index 0000000..228acf6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/tuple/TupleMemory.java
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * Multiset for tuples. Can contain duplicate occurrences of the same matching.
+ * 
+ * @author Gabor Bergmann.
+ * 
+ */
+public class TupleMemory implements Clearable, Collection<Tuple> {
+	/**
+	 * Counts the number of occurences of each pattern. Element is deleted if #
+	 * of occurences drops to 0.
+	 */
+	protected Map<Tuple, Integer> occurences;
+
+	/**
+	 * 
+	 */
+	public TupleMemory() {
+		super();
+		occurences = new HashMap<Tuple, Integer>();
+	}
+
+	/**
+	 * Adds a pattern occurence to the memory
+	 * 
+	 * @return true if a new pattern is entered
+	 */
+	public boolean add(Tuple ps) {
+		boolean exists = occurences.containsKey(ps);
+
+		if (exists)
+			occurences.put(ps, occurences.get(ps) + 1);
+		else
+			occurences.put(ps, 1);
+
+		return !exists;
+	}
+
+	/**
+	 * Removes a pattern occurence from the memory
+	 * 
+	 * @return true if this was the the last occurence of pattern
+	 */
+	public boolean remove(Tuple ps) {
+		int rest = occurences.get(ps) - 1;
+		boolean empty = rest == 0;
+
+		if (!empty)
+			occurences.put(ps, rest);
+		else
+			occurences.remove(ps);
+
+		return empty;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Clearable#clear()
+	 */
+	public void clear() {
+		occurences.clear();
+
+	}
+
+	public Iterator<Tuple> iterator() {
+		return occurences.keySet().iterator();
+	}
+
+	public boolean addAll(Collection<? extends Tuple> arg0) {
+		boolean change = false;
+		for (Tuple ps : arg0)
+			change |= add(ps);
+		return change;
+	}
+
+	public boolean contains(Object arg0) {
+		return occurences.containsKey(arg0);
+	}
+
+	public boolean containsAll(Collection<?> arg0) {
+		return occurences.keySet().containsAll(arg0);
+//		for (Object o : arg0)
+//			if (!occurences.containsKey(o))
+//				return false;
+//		return true;
+	}
+
+	public boolean isEmpty() {
+		return occurences.isEmpty();
+	}
+
+	public boolean remove(Object arg0) {
+		return remove((Tuple) arg0);
+	}
+
+	public boolean removeAll(Collection<?> arg0) {
+		boolean change = false;
+		for (Object o : arg0)
+			change |= remove(o);
+		return change;
+	}
+
+	public boolean retainAll(Collection<?> arg0) {
+		return occurences.keySet().retainAll(arg0);
+//		HashSet<Tuple> obsolete = new HashSet<Tuple>();
+//		for (Tuple key : occurences.keySet())
+//			if (!arg0.contains(key))
+//				obsolete.add(key);
+//		for (Tuple key : obsolete)
+//			occurences.remove(key);
+//		return !obsolete.isEmpty();
+	}
+
+	public int size() {
+//		int sum = 0;
+//		for (Integer count : occurences.values())
+//			sum += count;
+//		return sum;
+		return occurences.size();
+	}
+
+	public Object[] toArray() {
+		return toArray(new Object[0]);
+	}
+
+//	@SuppressWarnings("unchecked")
+	public <T> T[] toArray(T[] arg0) {
+		return occurences.keySet().toArray(arg0);
+//		int length = size();
+//		T[] result = (T[]) java.lang.reflect.Array.newInstance(arg0.getClass()
+//				.getComponentType(), length);
+//		int next = 0;
+//		for (Tuple key : occurences.keySet()) {
+//			for (int counter = occurences.get(key); counter > 0; --counter)
+//				result[next++] = (T) key;
+//		}
+//		return result;
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString() {
+		return "TM"+occurences.keySet();
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/util/Options.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/util/Options.java
new file mode 100644
index 0000000..19ba4e8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/util/Options.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.IReteLayoutStrategy;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.basiclinear.BasicLinearLayout;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.quasitree.QuasiTreeLayout;
+
+public class Options {
+
+	public enum NodeSharingOption {
+		NEVER, // not recommended, patternmatcher leaks possible
+		INDEXER_AND_REMOTEPROXY, ALL
+	}
+
+	public final static NodeSharingOption nodeSharingOption = NodeSharingOption.ALL;
+	public static final boolean releaseOnetimeIndexers = true; // effective only
+																// with
+																// nodesharing
+																// ==NEVER
+
+	public enum InjectivityStrategy {
+		EAGER, LAZY
+	}
+
+	public final static InjectivityStrategy injectivityStrategy = InjectivityStrategy.EAGER;
+
+	public final static boolean enableInheritance = true;
+
+	//public final static boolean useComplementerMask = true;
+	
+	public static final boolean calcImpliedTypes = true; // if true, shrinks the net by avoiding unnecessary typechecks
+	public static final boolean employTrivialIndexers = true;
+
+
+	// public final static boolean synchronous = false;
+
+	public final static int numberOfLocalContainers = 1;
+	public final static int firstFreeContainer = 0; // 0 if head container is
+													// free to contain pattern
+													// bodies, 1 otherwise
+	
+	public enum BuilderMethod {
+		LEGACY, // ONLY with GTASM
+		PSYSTEM_BASIC_LINEAR,
+		PSYSTEM_QUASITREE;
+		public <PatternDescription, StubHandle, Collector> IReteLayoutStrategy<PatternDescription, StubHandle, Collector> layoutStrategy() {
+			switch (this) {
+			case PSYSTEM_BASIC_LINEAR:
+				return new BasicLinearLayout<PatternDescription, StubHandle, Collector>();
+			case PSYSTEM_QUASITREE:
+				return new QuasiTreeLayout<PatternDescription, StubHandle, Collector>();
+			default:
+				return null;
+			}
+		}
+	}
+	public final static BuilderMethod builderMethod = BuilderMethod.PSYSTEM_BASIC_LINEAR;
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/util/OrderingCompareAgent.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/util/OrderingCompareAgent.java
new file mode 100644
index 0000000..f21fcc4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/util/OrderingCompareAgent.java
@@ -0,0 +1,78 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util;

+

+/**

+ * Comparing agent for an ordering.

+ * Terminology: the "preferred" item will register as LESS.

+ * @author Bergmann Gábor

+ *

+ */

+public abstract class OrderingCompareAgent<T> {

+	protected T a;

+	protected T b;

+	

+	/**

+	 * @param a

+	 * @param b

+	 */

+	public OrderingCompareAgent(T a, T b) {

+		super();

+		this.a = a;

+		this.b = b;

+	}

+

+	int result = 0;

+	

+	

+	protected abstract void doCompare();

+	/**

+	 * @return the result

+	 */

+	public int compare() {

+		doCompare();

+		return result;

+	}	

+	

+	// COMPARISON HELPERS

+	protected boolean unknown() {

+		return result == 0;

+	}

+	/**

+	 * @pre result == 0

+	 */

+	protected boolean consider(int partial) {

+		if (unknown()) result = partial;

+		return unknown();

+	}	

+

+	protected boolean swallowBoolean(boolean x) {return x;}

+	

+	// PREFERENCE FUNCTIONS

+	protected static int preferTrue(boolean b1, boolean b2) {

+		return (b1^b2) ? (b1 ? -1: +1) : 0; 

+	}

+	protected static int preferFalse(boolean b1, boolean b2) {

+		return (b1^b2) ? (b2 ? -1: +1) : 0; 

+	}

+	protected static <U> int preferLess(Comparable<U> c1, U c2) {

+		return c1.compareTo(c2); 

+	}

+	protected static <U> int preferMore(Comparable<U> c1, U c2) {

+		return -c1.compareTo(c2); 

+	}

+

+

+	

+	

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/util/UnionFind.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/util/UnionFind.java
new file mode 100644
index 0000000..bd1be17
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/rete/util/UnionFind.java
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author Gabor Bergmann
+ * 
+ */
+public class UnionFind<T> implements Map<T, T> {
+	class Node {
+		public T value;
+		public Node parent;
+		public int rank;
+
+		public Node(T value) {
+			this.value = value;
+			parent = this;
+			rank = 0;
+		}
+	}
+
+	protected HashMap<T, Node> nodes;
+
+	public UnionFind() {
+		nodes = new HashMap<T, Node>();
+	}
+
+	protected Node find(Node n) {
+		if (n.parent == n)
+			return n;
+		n.parent = find(n.parent);
+		return n.parent;
+	}
+
+	public T find(T x) {
+		Node node = nodes.get(x);
+		if (node == null)
+			return x;
+		else
+			return find(node).value;
+	}
+
+	public boolean isRoot(T x) {
+		Node node = nodes.get(x);
+		if (node == null)
+			return true;
+		else
+			return node == node.parent;
+	}
+
+	protected Node retrieveOrCreate(T x) {
+		Node node = nodes.get(x);
+		if (node == null) {
+			node = new Node(x);
+			nodes.put(x, node);
+			return node;
+		} else
+			return find(node);
+	}
+
+	public void unite(T a, T b) {
+		Node aRoot = retrieveOrCreate(a);
+		Node bRoot = retrieveOrCreate(b);
+
+		if (aRoot.rank > bRoot.rank)
+			bRoot.parent = aRoot;
+		else if (aRoot.rank < bRoot.rank)
+			aRoot.parent = bRoot;
+		else if (aRoot != bRoot) {
+			bRoot.parent = aRoot;
+			aRoot.rank++;
+		}
+
+	}
+
+	public void clear() {
+		nodes.clear();
+	}
+
+	@SuppressWarnings("unchecked")
+	public T get(Object key) {
+		return find((T)key);
+	}
+	
+	public boolean containsKey(Object key) {
+		throw new UnsupportedOperationException();
+	}
+	public boolean containsValue(Object value) {
+		throw new UnsupportedOperationException();
+	}
+	public Set<java.util.Map.Entry<T, T>> entrySet() {
+		throw new UnsupportedOperationException();
+	}
+	public boolean isEmpty() {
+		throw new UnsupportedOperationException();
+	}
+	public Set<T> keySet() {
+		throw new UnsupportedOperationException();
+	}
+	public T put(T key, T value) {
+		throw new UnsupportedOperationException();
+	}
+	public void putAll(Map<? extends T, ? extends T> m) {
+		throw new UnsupportedOperationException();		
+	}
+	public T remove(Object key) {
+		throw new UnsupportedOperationException();
+	}
+	public int size() {
+		throw new UnsupportedOperationException();
+	}
+	public Collection<T> values() {
+		throw new UnsupportedOperationException();
+	}
+
+	
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/.classpath b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/.classpath
new file mode 100644
index 0000000..ad32c83
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/.cvsignore b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/.cvsignore
new file mode 100644
index 0000000..320725f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/.cvsignore
@@ -0,0 +1 @@
+ReteBlockRuleInterpreter.java.old.txt
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/.project b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/.project
new file mode 100644
index 0000000..aaa808c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.viatra2.gtasm.patternmatcher.incremental</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..f9348bc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Wed Jan 12 11:21:22 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.6
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..098ad08
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,3 @@
+#Mon Aug 13 15:34:54 CEST 2007
+eclipse.preferences.version=1
+internal.default.compliance=default
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000..e7ec537
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Mon Jul 09 13:43:36 GMT+02:00 2007
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
+eclipse.preferences.version=1
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/META-INF/MANIFEST.MF b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..9c20a14
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: VIATRA2 R3 Incremental Pattern matcher
+Bundle-SymbolicName: org.eclipse.viatra2.gtasm.patternmatcher.incremental;singleton:=true
+Bundle-Version: 3.3.0.qualifier
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.viatra2.core2,
+ org.eclipse.viatra2.gtasm.patternmatcher,
+ org.eclipse.viatra2.gtasm.model,
+ org.eclipse.viatra2.gtasm.interpreter,
+ org.eclipse.viatra2.gtasm.patternmatcher.impl,
+ org.eclipse.viatra2.gtasm.interpreter.term,
+ org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete;bundle-version="3.0.0";visibility:=reexport,
+ org.eclipse.viatra2.gtasm.support;bundle-version="3.2.0"
+Export-Package: org.eclipse.viatra2.gtasm.patternmatcher.incremental,
+ org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters,
+ org.eclipse.viatra2.gtasm.patternmatcher.incremental.simple
+Bundle-Vendor: BUTE-FTSRG / Bergmann Gabor
+Bundle-ClassPath: .
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/build.properties b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/build.properties
new file mode 100644
index 0000000..9748489
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/build.properties
@@ -0,0 +1,6 @@
+output.. = bin/
+bin.includes = plugin.xml,\
+               META-INF/,\
+               .
+
+source.. = src/
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/plugin.xml b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/plugin.xml
new file mode 100644
index 0000000..aecf3bb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/plugin.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+   <extension
+         point="org.eclipse.viatra2.gtasm.patternmatcher.patternmatcher">
+      <matcherfactory
+            annotation_name="incremental"
+            class="org.eclipse.viatra2.gtasm.patternmatcher.incremental.RetePatternMatcherFactory"
+            id="org.eclipse.viatra2.patternmatcher.incremental_rete"
+            name="RETE Pattern Matcher Factory - Parallel Engine"/>
+   </extension>
+   <extension
+         point="org.eclipse.viatra2.core2.properties">
+      <propertyprovider
+            class="org.eclipse.viatra2.gtasm.patternmatcher.incremental.IncrementalPMPropertyProvider">
+      </propertyprovider>
+   </extension>
+</plugin>
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/EngineManager.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/EngineManager.java
new file mode 100644
index 0000000..236e7a1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/EngineManager.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental;
+
+import java.util.Map;
+import java.util.WeakHashMap;
+
+import org.eclipse.viatra2.framework.FrameworkManager;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.framework.IFrameworkListChangedListener;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters.MachineListener;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.ReteEngine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+
+
+
+/**
+ * @author Gabor Bergmann
+ * 
+ */
+public class EngineManager implements IFrameworkListChangedListener {
+
+	private static EngineManager instance = new EngineManager();
+
+	/**
+	 * @return the instance
+	 */
+	public static EngineManager getInstance() {
+		return instance;
+	}
+
+	// Map<IFramework, ReteEngine> engines = new HashMap<IFramework,
+	// ReteEngine>();
+	Map<IFramework, MachineListener> machineListeners;
+
+	public EngineManager() {
+		super();
+		this.machineListeners = new WeakHashMap<IFramework, MachineListener>();
+		FrameworkManager.getInstance().addFrameworkListChangedListener(this);
+	}
+
+	public ReteEngine<GTPattern> getReteEngine(IFramework framework) {
+		// ReteEngine engine = engines.get(framework);
+		// if (engine==null)
+		// {
+		// engine = new ReteEngine(framework);
+		// engines.put(framework, engine);
+		// }
+
+		return getMachineListener(framework).getEngine();
+	}
+	
+	public MachineListener getMachineListener(IFramework framework) {
+		MachineListener l = machineListeners.get(framework);
+		if (l == null) {
+			l = new MachineListener(framework);
+			machineListeners.put(framework, l);
+		}
+		return l;
+	}
+
+	public void frameworkAdded(IFramework f) {
+
+	}
+
+	public void frameworkRemoved(IFramework f) {
+		MachineListener m = machineListeners.get(f);
+		if (m != null)
+			m.kill();
+		machineListeners.remove(f);
+	}
+	
+//	private int threads(GTPattern samplePattern) {
+//		Machine machine = samplePattern.getNamespace();
+//		machine.g
+//		return 0;
+//	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/IncrementalPMPropertyProvider.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/IncrementalPMPropertyProvider.java
new file mode 100644
index 0000000..cb812e0
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/IncrementalPMPropertyProvider.java
@@ -0,0 +1,67 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental;

+

+import org.eclipse.viatra2.framework.properties.VIATRAPropertyKind;

+import org.eclipse.viatra2.framework.properties.providers.DefaultPropertyProvider;

+

+public class IncrementalPMPropertyProvider extends DefaultPropertyProvider {

+

+	public final static String VIATRA_INCREMENTAL_PROVIDER_ID = "Incremental Pattern Matcher";

+	public final static String PROP_THREADS = "Number of parallel threads";// (0: single-threaded; 1: asynchronous PM; n>1: n parallel containers; auto: adjust to resources)";

+	

+	public IncrementalPMPropertyProvider() {

+		super(VIATRA_INCREMENTAL_PROVIDER_ID);

+	}

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.framework.properties.providers.DefaultPropertyProvider#init()

+	 */

+	@Override

+	public void init() {

+		allids.add(PROP_THREADS);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.framework.properties.IViatraPropertyProvider#getDefaultPropertyValue(java.lang.String)

+	 */

+	public String getDefaultPropertyValue(String id) {

+		if (id.equals(PROP_THREADS)) return "0"; 

+		else return "default";

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.framework.properties.IViatraPropertyProvider#getPropertyKind(java.lang.String)

+	 */

+	public VIATRAPropertyKind getPropertyKind(String id) {

+		return VIATRAPropertyKind.STRING;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.framework.properties.IViatraPropertyProvider#isActive()

+	 */

+	public boolean isActive() {

+		return true;

+	}

+

+	public static Integer interpretThreads(String threadStr) {

+		Integer threads = null;

+		try {

+			threads = Integer.parseInt(threadStr);

+		} catch (NumberFormatException e) {

+			String lcThreads = threadStr.toLowerCase();

+			if ("true".equals(lcThreads) || "parallel".equals(lcThreads)) threads = 1;

+			if ("auto".equals(lcThreads)) threads = Runtime.getRuntime().availableProcessors();

+			// default to null

+		}

+		return threads;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/ReteGTASMPatternMatcher.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/ReteGTASMPatternMatcher.java
new file mode 100644
index 0000000..b2c87a5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/ReteGTASMPatternMatcher.java
@@ -0,0 +1,218 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2009 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental;

+

+import java.util.ArrayList;

+import java.util.Collection;

+import java.util.Collections;

+import java.util.HashMap;

+import java.util.LinkedHashSet;

+import java.util.Map;

+import java.util.Random;

+import java.util.Set;

+

+import org.eclipse.viatra2.core.IEntity;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.gtasm.patternmatcher.ExecutionMode;

+import org.eclipse.viatra2.gtasm.patternmatcher.IMatching;

+import org.eclipse.viatra2.gtasm.patternmatcher.ParameterMode;

+import org.eclipse.viatra2.gtasm.patternmatcher.PatternCallSignature;

+import org.eclipse.viatra2.gtasm.patternmatcher.Scope;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.RetePatternMatcher;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;

+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IPatternMatcher;

+

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class ReteGTASMPatternMatcher implements IPatternMatcher {

+

+	RetePatternMatcher matcher;

+	Random random = null;

+    

+

+	/**

+	 * @param matcher the GTASM-ignorant RetePatternMatcher to wrap

+	 */

+	public ReteGTASMPatternMatcher(RetePatternMatcher matcher) {

+		super();

+		this.matcher = matcher;

+	}

+

+	/**

+	 * @param inputMapping quantification indicated by org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind.UNDEF_LITERAL

+	 */

+	public boolean match(Object[] inputMapping) {

+		boolean[] fixed = new boolean[inputMapping.length];

+		for (int i = 0; i < inputMapping.length; ++i) {

+			fixed[i] = !org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind.UNDEF_LITERAL

+					.equals(inputMapping[i]);

+		}

+		return matcher.count(inputMapping, fixed) != 0;

+	}

+

+	public IMatching match(Object[] inputMapping, PatternCallSignature[] signature) {

+		boolean ignoreScope = isScopeIgnorable(signature);

+		if (!ignoreScope)  // there needs to be scope checking, which is deadlock-prone to do in a matchfetcher!

+		{

+			ArrayList<IMatching> result = matchAll(inputMapping, signature, null);

+			return result.isEmpty() ? null : result.iterator().next();

+		} else

+		{

+			boolean[] fixed = new boolean[inputMapping.length];

+			for (int i = 0; i < inputMapping.length; ++i) {

+				fixed[i] = (signature[i].getParameterMode() == ParameterMode.INPUT);

+			}

+

+			// retrieving the projection

+			Tuple match = matcher.matchOne(inputMapping, fixed);

+			return match==null? null : new ReteMatching(match, matcher.getPosMapping());

+		}

+	

+	}

+	

+	public ArrayList<IMatching> matchAll(Object[] inputMapping, PatternCallSignature[] signature, Integer[] quantificationOrder) {

+	

+		// analyzing the execution mode (quantification, bound variables)

+		boolean[] fixed = new boolean[inputMapping.length];

+		boolean[] quantified = new boolean[inputMapping.length];

+		boolean hasExistential = false; // there are variables neither universally quantified not bound

+		boolean hasUniversal = false;

+		for (int i = 0; i < inputMapping.length; ++i) {

+			fixed[i] = (signature[i].getParameterMode() == ParameterMode.INPUT);

+			quantified[i] = (signature[i].getParameterMode() == ParameterMode.OUTPUT 

+					&& signature[i].getExecutionMode() == ExecutionMode.MULTIPLE_RESULTS);

+			if (!fixed[i]) {

+				hasUniversal = hasUniversal || quantified[i];

+				hasExistential = hasExistential || !quantified[i];

+			}

+		}

+		boolean ignoreScope = isScopeIgnorable(signature);

+		

+		// default to single matching

+		if (!hasUniversal && ignoreScope) {

+			Tuple match = matcher.matchOne(inputMapping, fixed);

+			return match==null? new ArrayList<IMatching>() :

+				new ArrayList<IMatching>(Collections.singleton(new ReteMatching(match, matcher.getPosMapping())));

+		}

+		

+		// retrieving the projection

+		Collection<Tuple> unscopedMatches = matcher.matchAll(inputMapping, fixed);

+	

+		// processing matches, checking scopes

+		if (unscopedMatches == null) return new ArrayList<IMatching>();

+		ArrayList<IMatching> matchings = new ArrayList<IMatching>(unscopedMatches.size());

+		TupleMask quantifiedMask = null;

+		Set<Tuple> quantifiedProjections = null; 

+		if (hasExistential) {

+			quantifiedMask = new TupleMask(quantified);

+			quantifiedProjections = new LinkedHashSet<Tuple>();

+		}

+		for (Tuple ps : /* productionNode */unscopedMatches) {

+			//Tuple ps = boundary.unwrapTuple(um);

+			Tuple quantifiedPart = null;

+			if (hasExistential) {

+				quantifiedPart = quantifiedMask.transform(ps);

+				if (quantifiedProjections.contains(quantifiedPart)) continue; // not the first occurrence

+			}

+			boolean ok = true;

+			if (!ignoreScope) for (int k = 0; (k < ps.getSize()) && ok; k++) {

+				if (signature[k].getParameterMode() == ParameterMode.INPUT) {

+					// ok = ok && (inputMapping[k]==ps.elements[k]);

+					// should now be true

+				} else // ParameterMode.OUTPUT

+				{

+					IEntity scopeParent = (IEntity) signature[k]

+							.getParameterScope().getParent();

+					Integer containmentMode = signature[k]

+							.getParameterScope().getContainmentMode();

+					if (containmentMode == Scope.BELOW) {

+						// ok = ok &&

+						// scopeParent.getAllComponents().contains

+						// (ps.elements[k]);

+						ok = ok

+								&& ((IModelElement) ps.get(k))

+										.isBelowNamespace(scopeParent);

+					} else /* case Scope.IN: */

+					{

+						ok = ok

+								&& scopeParent.equals(((IModelElement) ps

+										.get(k)).getNamespace());

+						// note: getNamespace returns null instead of the

+						// (imaginary) modelspace root entity for top level

+						// elements;

+						// this is not a problem here as Scope.IN implies

+						// scopeParent != root.

+					}

+	

+				}

+			}

+	

+			

+			if (ok) {

+				if (hasExistential) quantifiedProjections.add(quantifiedPart); 

+				matchings.add(new ReteMatching(ps, matcher.getPosMapping()));

+			}		

+		}

+		

+		return matchings;

+	}

+

+	public IMatching matchRandomly(Object[] inputMapping, PatternCallSignature[] signature) {

+		if(random == null){

+			random = new Random();

+		}

+		// all unbounded parameters are set to return multiple results

+		for(int j = 0; j < signature.length; j++)

+		{

+			// output parameters are in the front of the array

+			if(signature[j].getParameterMode() == ParameterMode.OUTPUT)

+				signature[j].setExecutionMode(ExecutionMode.MULTIPLE_RESULTS);

+		}

+		ArrayList<IMatching> allMatches = matchAll(inputMapping, signature, null);

+		if (allMatches == null || allMatches.isEmpty()) return null;

+		else return allMatches.get(random.nextInt(allMatches.size()));

+	}

+

+	boolean isScopeIgnorable(PatternCallSignature[] signature) {

+		for (PatternCallSignature sig : signature) {

+			if (sig.getParameterMode() == ParameterMode.OUTPUT) {

+				Scope scope = sig.getParameterScope();

+				if (scope.getContainmentMode() != Scope.BELOW || scope.getParent() != Scope.DEFAULT_PARENT)

+					return false;

+			}

+		}

+		return true;

+	}

+

+	/**

+	 * Builds a mapping between parameter indices and scopes.

+	 * @param signatures PatternCallSignature array, as present in an IPatternMatcher query

+	 * @return a scope map suitable for ReteEngine.accessMatcherScoped()

+	 */

+	public static Map<Integer, Scope> buildAdditionalScopeMap(PatternCallSignature[] signatures) {

+		Map<Integer, Scope> scopeMap = new HashMap<Integer, Scope>();

+		for (int i=0; i<signatures.length; ++i) {

+			PatternCallSignature signature = signatures[i];

+			if (signature.getParameterMode().equals(ParameterMode.OUTPUT) && 

+					! signature.getParameterScope().getParent().equals(Scope.DEFAULT_PARENT))

+			{

+				scopeMap.put(i, signature.getParameterScope());

+			}

+		}

+		return scopeMap;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/ReteMatcherHelper.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/ReteMatcherHelper.java
new file mode 100644
index 0000000..c909514
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/ReteMatcherHelper.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2010, Gabor Bergmann, Zoltan Ujhelyi and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental;
+
+import java.util.Collection;
+import java.util.Map;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.ReteEngine;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.RetePatternMatcher;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable;
+
+/**
+ * A helper class for more simple handling of the incremental matcher
+ * @author Zoltan Ujhelyi
+ */
+public class ReteMatcherHelper {
+
+	/**
+	 * Returns all matches for a selected pattern in the selected framework with
+	 * all parameters considered as unbounded.
+	 * @param fw
+	 * @param pattern
+	 * @return the matches of the pattern
+	 * @throws RetePatternBuildException
+	 */
+	public static Collection<Tuple> getMatchSet(IFramework fw, GTPattern pattern)
+			throws RetePatternBuildException {
+		int size = pattern.getSymParameters().size();
+		Object[] inputMapping = new Object[size];
+		boolean[] fixed = new boolean[size];
+		for (int i = 0; i < size; i++) {
+			inputMapping[i] = null;
+			fixed[i] = false;
+		}
+
+		return getMatchSet(fw, pattern, inputMapping, fixed);
+	}
+
+	/**
+	 * Returns all matches for a selected pattern in the selected framework with
+	 * all non-null parameters considered as bounded.
+	 * @param fw
+	 * @param pattern
+	 * @param parameters
+	 *            The parameter types are typically IModelElements
+	 * @return the matches of the pattern
+	 * @throws RetePatternBuildException
+	 */
+	public static Collection<Tuple> getMatchSet(IFramework fw,
+			GTPattern pattern, Object[] parameters)
+			throws RetePatternBuildException {
+		int size = parameters.length;
+		boolean[] fixed = new boolean[size];
+		for (int i = 0; i < size; i++) {
+			fixed[i] = parameters[i] != null;
+		}
+		return getMatchSet(fw, pattern, parameters, fixed);
+	}
+
+	/**
+	 * Returns all matches for a selected pattern in the selected framework with
+	 * the bound parameters described as a name-value map.
+	 * @param fw
+	 * @param pattern
+	 * @param parameters
+	 *            the bound parameters are written as name-value pairs - the
+	 *            unbounded should not be present in the map.
+	 * @return the matches of the pattern
+	 * @throws RetePatternBuildException
+	 */
+	public static Collection<Tuple> getMatchSet(IFramework fw,
+			GTPattern pattern, Map<String, Object> parameters)
+			throws RetePatternBuildException {
+		EList<PatternVariable> symParameters = pattern.getSymParameters();
+		int size = symParameters.size();
+		Object[] inputMapping = new Object[size];
+		boolean[] fixed = new boolean[size];
+		for (int i = 0; i < size; i++) {
+			String key = symParameters.get(i).getName();
+			fixed[i] = parameters.containsKey(key);
+			if (fixed[i]) {
+				inputMapping[i] = parameters.get(key);
+			} else {
+				inputMapping[i] = null;
+			}
+		}
+		return getMatchSet(fw, pattern, inputMapping, fixed);
+	}
+
+	private static Collection<Tuple> getMatchSet(IFramework fw,
+			GTPattern pattern, Object[] inputMapping, boolean[] fixed)
+			throws RetePatternBuildException {
+		ReteEngine<GTPattern> reteEngine = EngineManager.getInstance()
+				.getReteEngine(fw);
+		RetePatternMatcher patternMatcher = reteEngine.accessMatcher(pattern);
+		return patternMatcher.matchAll(inputMapping, fixed);
+	}
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/ReteMatching.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/ReteMatching.java
new file mode 100644
index 0000000..2de7dbb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/ReteMatching.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental;
+
+import java.util.HashMap;
+
+
+import org.eclipse.viatra2.gtasm.patternmatcher.IMatching;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+
+/**
+ * @author Gabor Bergmann
+ * 
+ */
+class ReteMatching implements IMatching {
+	private Tuple substitutions;
+	private HashMap<Object, Integer> positionMapping;
+
+	/**
+	 * @param substitutions
+	 * @param positionMapping
+	 */
+	public ReteMatching(Tuple substitutions,
+			HashMap<Object, Integer> positionMapping) {
+		super();
+		this.substitutions = substitutions;
+		this.positionMapping = positionMapping;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.IMatching#lookup(int)
+	 */
+	public Object lookup(int position) {
+		return substitutions.get(position);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.viatra2.gtasm.patternmatcher.IMatching#lookup(hu.bme.mit.viatra.gtasmmodel.gtasm
+	 * .metamodel.asm.definitions.Variable)
+	 */
+	public Object lookup(Variable variable) {
+		return substitutions.get(positionMapping.get(variable));
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString() {
+		return "Matching: " + substitutions.toString();
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/RetePatternMatcherFactory.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/RetePatternMatcherFactory.java
new file mode 100644
index 0000000..50bd2a2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/RetePatternMatcherFactory.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental;
+
+
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherCompileTimeException;
+import org.eclipse.viatra2.gtasm.patternmatcher.extension.IPatternMatcherFactory;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IPatternMatcher;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+
+
+/**
+ * @author Bergmann Gábor
+ *
+ */
+public class RetePatternMatcherFactory implements IPatternMatcherFactory {
+
+	public IPatternMatcher getPatternMatcher(IExecutionEnvironment env,
+			GTPattern pattern) throws ViatraTransformationException {
+		try {
+			return new ReteGTASMPatternMatcher(
+					EngineManager.getInstance()
+					.getReteEngine(env.getFramework())
+					.accessMatcher(pattern)
+					);
+		} catch (RetePatternBuildException e) {
+			String templateMessage = e.getTemplateMessage();
+			String[] templateContext = e.getTemplateContext();
+			Object patternDescription = e.getPatternDescription();
+			if (patternDescription!=null && patternDescription instanceof GTPattern && !patternDescription.equals(pattern)) 
+				throw new PatternMatcherCompileTimeException(templateMessage, templateContext, 
+						(GTPattern) patternDescription, e).addNewStackElement(pattern);
+			else throw new PatternMatcherCompileTimeException(templateMessage, templateContext, pattern, e);
+		}
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/ASMFunctionListener.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/ASMFunctionListener.java
new file mode 100644
index 0000000..f2b4c3e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/ASMFunctionListener.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.ASMFunctionContent;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.ASMFunctionContentChangeListener;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.IPredicateTraceListener;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.PredicateEvaluatorNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.ReteBoundary;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.ReteEngine;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+
+
+/**
+ * Registering/unregistering is synchronized, as well as change notification
+ * sending. Reason: thread safety of Registering/unregistering and message
+ * sending to registered ones
+ * 
+ * @author Gabor Bergmann
+ * 
+ */
+public class ASMFunctionListener implements ASMFunctionContentChangeListener, IPredicateTraceListener {
+	// each registered tuple consists of (a) the ASM function (b) the actual
+	// parameter sequence
+	protected Map<Tuple, Set<PredicateEvaluatorNode>> asmSensitiveTerms;
+	protected ReteEngine<?> engine;
+	protected ReteBoundary<?> boundary;
+
+	/**
+	 * Prerequisite: disconnectables
+	 * 
+	 * @param engine
+	 */
+	public ASMFunctionListener(ReteEngine<?> engine) {
+		this.engine = engine;
+		this.boundary = engine.getBoundary();
+		this.asmSensitiveTerms = new HashMap<Tuple, Set<PredicateEvaluatorNode>>();
+		ASMFunctionContent.getInstance().addListener(null, this);
+		engine.addDisconnectable(this);
+	}
+
+	public void disconnect() {
+		asmSensitiveTerms.clear();
+		ASMFunctionContent.getInstance().removeListener(null, this);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters.IPredicateTraceListener#registerASMSensitiveTerm(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple, org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters.PredicateEvaluatorNode)
+	 */
+	public synchronized void registerSensitiveTrace(Tuple trace,
+			PredicateEvaluatorNode node) {
+		Set<PredicateEvaluatorNode> nodes = asmSensitiveTerms.get(trace);
+		if (nodes == null) {
+			nodes = new HashSet<PredicateEvaluatorNode>();
+			asmSensitiveTerms.put(trace, nodes);
+		}
+		nodes.add(node);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters.IPredicateTraceListener#unregisterASMSensitiveTerm(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple, org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters.PredicateEvaluatorNode)
+	 */
+	public synchronized void unregisterSensitiveTrace(Tuple trace,
+			PredicateEvaluatorNode node) {
+		Set<PredicateEvaluatorNode> nodes = asmSensitiveTerms.get(trace);
+		nodes.remove(node);
+		if (nodes.isEmpty()) {
+			asmSensitiveTerms.remove(trace);
+		}
+	}
+
+	public void valueChanged(ASMFunction f, EList<Object> key, Object newValue) {
+		//System.out.println("value changed for key:"+key.toString()+", value: "
+		// +newValue.toString());
+
+		Object[] traceElements = new Object[key.size() + 1];
+		int k = 0;
+		traceElements[k++] = f;
+		for (Object o : key)
+			traceElements[k++] = o;
+		Tuple trace = new FlatTuple(traceElements);
+
+		synchronized (this) {
+			Set<PredicateEvaluatorNode> nodes = asmSensitiveTerms.get(trace);
+			if (nodes != null) {
+				// copy to avoid concurrency exceptions
+				LinkedList<PredicateEvaluatorNode> nodesCopy = new LinkedList<PredicateEvaluatorNode>(
+						nodes);
+
+				for (PredicateEvaluatorNode node : nodesCopy) {
+					boundary.notifyEvaluator(
+							node.getAsmFunctionTraceNotifier(), trace);
+				}
+			}
+		}
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/CodegenRecorderGTASMBuildable.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/CodegenRecorderGTASMBuildable.java
new file mode 100644
index 0000000..11d7939
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/CodegenRecorderGTASMBuildable.java
@@ -0,0 +1,98 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters;

+

+import java.util.Map;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.CodegenRecorderBuildable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.CodegenRecordingCoordinator;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable;

+

+

+

+/**

+ * 

+ * @author Bergmann Gábor

+ *

+ */

+public abstract class CodegenRecorderGTASMBuildable extends

+		CodegenRecorderBuildable<GTPattern> implements GTASMBuildable<String, String> {

+

+

+	public CodegenRecorderGTASMBuildable(CodegenRecordingCoordinator<GTPattern> coordinator,

+			GTPattern effort, String indent, String baseName, String instanceSuffix)  

+	{

+		super(coordinator, effort, indent, baseName, instanceSuffix);

+	}

+

+	public Stub<String> buildGTASMTermChecker(Term term,

+			Map<String, Integer> variableIndices,

+			Map<String, String> variableEquivalence, Integer rhsIndex, Stub<String> stub)

+			throws RetePatternBuildException 

+	{

+		int[] affectedIndices = new int[variableIndices.values().size()];

+		int k = 0;

+		for (Integer index : variableIndices.values()) affectedIndices[k++] = index;	

+		

+//		Map<String, String> variableGen = new HashMap<String, String>();

+//		for (term.)

+//			UnionFind<String> a; a.

+		

+		StringBuilder innerClass = new StringBuilder();

+		innerClass.append("new AbstractEvaluator(){ \n");

+		innerClass.append(indent + "\t@Override \n");

+		innerClass.append(indent + "\tpublic Object doEvaluate(Tuple tuple) throws Exception { \n");

+		generateTermEvalCode(innerClass, indent+"\t\t", term, variableIndices,variableEquivalence );

+		//innerClass.append(indent + "\treturn null");

+		innerClass.append(indent + "\t}\n");

+		innerClass.append(indent + "}");

+		String evaluator = declareNewValue("AbstractEvaluator", innerClass.toString());

+

+		String[] arguments = {

+			evaluator, gen(rhsIndex),

+			gen(affectedIndices), gen(stub)

+		};

+		String resultVar = emitFunctionCall(coordinator.stubType, "buildPredicateChecker", arguments);

+		

+		return new Stub<String>(stub, resultVar);

+

+		

+	}

+	

+	

+	public abstract void generateTermEvalCode(StringBuilder innerClass, String indent,

+			Term term, Map<String, Integer> variableIndices,

+			Map<String, String> variableEquivalence) throws RetePatternBuildException;

+

+	public String gen(PatternVariable variable) {

+		return "\"" + variable.getName() + "\"";

+	}

+	

+	@Override

+	public String genPattern(GTPattern desc) {

+		return "\"" + desc.getFqn() + "\"";

+	}

+//	@Override

+//	public String genPosMap(GTPattern desc) {

+//		String resultVar = declareNewValue("HashMap<Object, Integer>", "new HashMap<Object, Integer>()");

+//		Integer k=0;

+//		for (Object o : desc.getSymParameters()) {

+//			emitLine(resultVar + ".put(" + gen((PatternVariable)o) + ", " + k++ + ");");

+//		}

+//		return resultVar;

+//	}

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/GTASMBuildable.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/GTASMBuildable.java
new file mode 100644
index 0000000..c309fa7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/GTASMBuildable.java
@@ -0,0 +1,37 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters;

+

+import java.util.Map;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Buildable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;

+

+

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public interface GTASMBuildable<StubHandle, Collector> extends Buildable<GTPattern, StubHandle, Collector> {

+	public Stub<StubHandle> buildGTASMTermChecker(Term term, 

+			Map<String, Integer> variableIndices, 

+			Map<String, String> variableEquivalence, 

+			Integer rhsIndex, 

+			Stub<StubHandle> stub) throws RetePatternBuildException;

+	

+	public GTASMBuildable<StubHandle, Collector> getNextContainer();

+	public GTASMBuildable<StubHandle, Collector> putOnTab(GTPattern effort);

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/GTASMTermEvaluatorNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/GTASMTermEvaluatorNode.java
new file mode 100644
index 0000000..6fbe5b6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/GTASMTermEvaluatorNode.java
@@ -0,0 +1,199 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.Vector;
+import java.util.Map.Entry;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.ASMFunctionContent;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.term.rules.TermEvaluator;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.AbstractEvaluator;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.PredicateEvaluatorNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.ReteEngine;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+
+
+/**
+ * @author Gabor Bergmann
+ * 
+ *         Permits the traversal of update notifications if a given Term (with
+ *         variables mapped to given positions in the Tuple) equals a
+ *         right-hand-side (also mapped to a given position). If right-hand-side
+ *         is omitted, the Term should evaluate to true.
+ * 
+ *         The Term is reevaluated on the Tuple each time an element affected by
+ *         the term experiences a move, name or value change. Furthermore, it is
+ *         also reevaluated if any ASMfunctions called at the previous
+ *         evaluation are changed at the positions that were used.
+ * 
+ *         Uses unwrapped tuples. In distributed environments, TermEvaluatorNodes 
+ *         are always be built on the head container, because they need access to Viatra.
+ * 
+ */
+public class GTASMTermEvaluatorNode extends PredicateEvaluatorNode {
+	Map<String, Integer> variableIndices;
+	
+	/**
+	 * @param term
+	 *            the GTASM Term that should be evaluated on all inserted
+	 *            tuples.
+	 * @param rhsIndex
+	 *            the index of the element in the Tuple that should equals the
+	 *            result of the term; if null, the right-hand-side will be the
+	 *            Boolean true.
+	 * @param variableIndices
+	 *            maps variable names to values.
+	 */
+	public GTASMTermEvaluatorNode(ReteEngine<?> engine, ReteContainer container, Term term,
+			Integer rhsIndex, Map<String, Integer> variableIndices,
+			Map<String, String> variableEquivalence,
+			int[] affectedIndices, int tupleWidth) 
+	{
+		super(engine, container, rhsIndex, affectedIndices, tupleWidth,
+				new GTASMTermEvaluator(engine.getContext(), term, variableIndices, variableEquivalence));
+		this.variableIndices = variableIndices;
+	}
+	
+	@Override
+	protected String prettyPrintTuple(Tuple ps) {
+		StringBuilder sb = new StringBuilder();
+		sb.append("{ ");
+		for (Entry<String, Integer> ent : variableIndices.entrySet()) {
+			sb.append(" '" + ent.getKey() + "'=" + ps.get(ent.getValue()).toString());
+		}
+		sb.append("}");
+		return sb.toString();
+	}
+
+}
+
+class GTASMTermEvaluator extends AbstractEvaluator {
+
+	protected Term term;
+	protected IPatternMatcherContext<?> context;
+	protected Map<String, Integer> variableIndices;
+	protected Map<String, String> variableEquivalence;
+
+	public GTASMTermEvaluator(IPatternMatcherContext<?> context,
+			Term term, Map<String, Integer> variableIndices,
+			Map<String, String> variableEquivalence) {
+		super();
+		this.context = context;
+		this.term = term;
+		this.variableEquivalence = variableEquivalence;
+		this.variableIndices = variableIndices;
+	}
+
+	@Override
+	public Object doEvaluate(Tuple tuple) throws ViatraTransformationException{
+		TermCheckExecutionEnvironment env = new TermCheckExecutionEnvironment(this, tuple);
+		return TermEvaluator.getInstance().evaluate(env, term);
+	}
+	
+	public int findVariableIndexByName(String name) {
+		String equivalentName = variableEquivalence.get(name);
+		Integer integer = variableIndices.get(equivalentName);
+		return integer;
+	}
+
+	public IPatternMatcherContext<?> getContext() {
+		return context;
+	}
+	
+
+	class TermCheckExecutionEnvironment implements IExecutionEnvironment {
+		IFramework framework;
+		GTASMTermEvaluator evaluator;
+		Tuple ps;
+		Set<Tuple> traces;
+
+		public TermCheckExecutionEnvironment(GTASMTermEvaluator evaluator, Tuple ps) {
+			this.framework = (((VPMContext<?>)evaluator.getContext()).getFramework()); // FIXME
+			this.evaluator = evaluator;
+			this.ps = ps;
+
+			this.traces = new HashSet<Tuple>();
+		}
+
+		public Object getValueOfASMFunction(ASMFunction asmFunction,
+				EList<Object> location) {
+			Object[] traceElements = new Object[location.size() + 1];
+			int k = 0;
+			traceElements[k++] = asmFunction;
+			for (Object o : location)
+				traceElements[k++] = o;
+			Tuple trace = new FlatTuple(traceElements);
+			traces.add(trace);
+
+			HashMap<EList<Object>, Object> af = 
+				ASMFunctionContent.getInstance().get(asmFunction);
+			if (af == null)
+				return null;
+			return af.get(location);
+		};
+
+		public Object getVariableValue(Variable variable) {
+			String varName = variable.getName();
+			int index = evaluator.findVariableIndexByName(varName);
+			return ps.get(index);
+		}
+
+		/**
+		 * Each ASMFunction invocation is recorded as a trace Tuple. Each trace
+		 * tuple contains the ASMFunction as the first element, followed by the
+		 * parameter sequence ("location").
+		 * 
+		 * @return the traces
+		 */
+		public Set<Tuple> getTraces() {
+			return traces;
+		}
+		public void addVariable(Variable key, Object value) throws ViatraTransformationException {
+			throw new UnsupportedOperationException();
+		}
+
+		public void fetchVariableVariations(HashMap<Variable, Vector<Object>> possibleVariableValues, Term termToBeEvaluated) {
+			throw new UnsupportedOperationException();
+		}
+
+		public IFramework getFramework() {
+			return framework;
+		}
+
+		public Map<Variable, Object> getVariableValues() {
+			throw new UnsupportedOperationException();
+		}
+
+		public void setVariableValue(Variable variable, Object value) throws ViatraTransformationException {
+			throw new UnsupportedOperationException();
+		}
+
+		public void updateASMFunction(ASMFunction asmFunction, EList<Object> location, Object value) throws ViatraTransformationException {
+			throw new UnsupportedOperationException();
+		}
+
+	}
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/GlobalModelspaceListener.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/GlobalModelspaceListener.java
new file mode 100644
index 0000000..7c1cc3d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/GlobalModelspaceListener.java
@@ -0,0 +1,362 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters;
+
+import java.lang.ref.WeakReference;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.viatra2.core.ICoreNotificationListener;
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateEntity;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateInstanceOf;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateRelation;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectCreateSupertypeOf;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteContainment;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteEntity;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteInstanceOf;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteRelation;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectDeleteSupertypeOf;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectMoveTo;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetName;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetRelationFrom;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetRelationTo;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObjectSetValue;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.IManipulationListener;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.PredicateEvaluatorNode;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.ReteBoundary;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.ReteEngine;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Direction;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Tunnel;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.Address;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+
+/**
+ * Registering/unregistering is synchronized, as well as notification
+ * processing. Reason: thread safety of Registering/unregistering and message
+ * sending and action notifications
+ * 
+ * @author Gabor Bergmann
+ * 
+ */
+public class GlobalModelspaceListener implements ICoreNotificationListener,
+		IManipulationListener {
+
+	protected WeakReference<IFramework> framework;
+	protected ReteEngine<?> engine;
+	protected ReteBoundary<?> boundary;
+	protected ReteContainer headContainer;
+
+	// TermEvaluatorNodes that have to be notified on changes affecting a given ModelElement
+	protected Map<Object, Set<PredicateEvaluatorNode>> sensitiveTerms;
+
+	/**
+	 * Prerequisite: engine has its network, framework and boundary fields
+	 * initialized
+	 * 
+	 * @param engine
+	 */
+	public GlobalModelspaceListener(ReteEngine<?> engine, IFramework framework) {
+		super();
+		this.engine = engine;
+		this.boundary = engine.getBoundary();
+		this.headContainer = engine.getReteNet().getHeadContainer();
+
+		this.sensitiveTerms = new HashMap<Object, Set<PredicateEvaluatorNode>>();
+
+		this.framework = new WeakReference<IFramework>(framework);
+		framework.getTopmodel().getNotificationManager()
+				.addAllListener(this);
+		engine.addDisconnectable(this);
+	}
+
+	public synchronized void actionPerformed(
+			ICoreNotificationObject notification) {
+		//System.out.println("Core notification: "+notification.getActionType())
+		// ;
+
+		// if (notification.getActionType().equals(ICoreNotificationObject.
+		// TA_TRANSACTION_BEGIN))
+		// {
+		// inTransaction = true;
+		// return;
+		// }
+		// else if (notification.getActionType().equals(ICoreNotificationObject.
+		// TA_UNDOABLE_TRANSACTION_BEGIN))
+		// {
+		// return;
+		// }
+		// else if (notification.getActionType().equals(ICoreNotificationObject.
+		// TA_TRANSACTION_END))
+		// {
+		// inTransaction = false;
+		// iTreeViewer.refresh();
+		// iContentProvider.setDirty(); // notify editor that the model has
+		// changed
+		// return;
+		// }
+		// if (inTransaction)
+		// return;
+		//		 
+
+		switch(notification.getActionTypeEnum()){
+		case ACTION_SET_NAME:
+			ICoreNotificationObjectSetName n = (ICoreNotificationObjectSetName) notification;
+			notifyElementChange(n.getElement());
+			break;
+		case ACTION_SET_VALUE:
+			ICoreNotificationObjectSetValue n1 = (ICoreNotificationObjectSetValue) notification;
+			notifyElementChange(n1.getEntity());
+			break;
+		case ACTION_CREATE_INSTANCEOF:
+			ICoreNotificationObjectCreateInstanceOf n2 = (ICoreNotificationObjectCreateInstanceOf) notification;
+
+			IModelElement instance = n2.getInstance();
+			if (instance instanceof IEntity)
+				boundary.updateUnary(Direction.INSERT, instance, n2.getType());
+			else if (instance instanceof IRelation) {
+				IRelation relation = (IRelation) instance;
+				boundary.updateTernaryEdge(Direction.INSERT, relation,
+						relation.getFrom(), relation.getTo(), n2.getType());
+			}
+			boundary.updateInstantiation(Direction.INSERT, n2.getType(),
+					n2.getInstance());
+			break;
+		case ACTION_DELETE_INSTANCEOF:
+			ICoreNotificationObjectDeleteInstanceOf n3 = (ICoreNotificationObjectDeleteInstanceOf) notification;
+
+			instance = n3.getInstance();
+			if (instance instanceof IEntity)
+				boundary.updateUnary(Direction.REVOKE, instance, n3.getType());
+			else if (instance instanceof IRelation) {
+				IRelation relation = (IRelation) instance;
+				boundary.updateTernaryEdge(Direction.REVOKE, relation,
+						relation.getFrom(), relation.getTo(), n3.getType());
+			}
+			boundary.updateInstantiation(Direction.REVOKE, n3.getType(),
+					n3.getInstance());
+			break;
+		case ACTION_CREATE_SUPERTYPEOF:
+			ICoreNotificationObjectCreateSupertypeOf n4 = (ICoreNotificationObjectCreateSupertypeOf) notification;
+
+			IModelElement superElement = n4.getSuper();
+			IModelElement subElement = n4.getSub();
+			boundary.updateGeneralization(Direction.INSERT, superElement,
+					subElement);
+			if (superElement instanceof IEntity) {
+				Address<? extends Tunnel> superRoot = boundary
+						.getUnaryRoot(superElement);
+				if (superRoot != null) // only if we have to keep track of the
+										// supertype
+				{
+					Address<? extends Tunnel> subRoot = boundary
+							.accessUnaryRoot(subElement);
+					engine.getReteNet().connectRemoteNodes(subRoot, superRoot,
+							true);
+				}
+			} else if (superElement instanceof IRelation) {
+				Address<? extends Tunnel> superRoot = boundary
+						.getTernaryEdgeRoot(superElement);
+				if (superRoot != null) // only if we have to keep track of the
+										// supertype
+				{
+					Address<? extends Tunnel> subRoot = boundary
+							.accessTernaryEdgeRoot(subElement);
+					engine.getReteNet().connectRemoteNodes(subRoot, superRoot,
+							true);
+				}
+			}
+			break;
+		case ACTION_DELETE_SUPERTYPEOF:
+			ICoreNotificationObjectDeleteSupertypeOf n5 = (ICoreNotificationObjectDeleteSupertypeOf) notification;
+
+			superElement = n5.getSuper();
+			subElement = n5.getSub();
+			boundary.updateGeneralization(Direction.REVOKE, superElement,
+					subElement);
+			if (superElement instanceof IEntity) {
+				Address<? extends Tunnel> superRoot = boundary
+						.getUnaryRoot(superElement);
+				if (superRoot != null) // only if we have to keep track of the
+										// supertype
+				{
+					Address<? extends Tunnel> subRoot = boundary
+							.accessUnaryRoot(subElement);
+					engine.getReteNet().disconnectRemoteNodes(subRoot,
+							superRoot, true);
+				}
+			} else if (superElement instanceof IRelation) {
+				Address<? extends Tunnel> superRoot = boundary
+						.getTernaryEdgeRoot(superElement);
+				if (superRoot != null) // only if we have to keep track of the
+										// supertype
+				{
+					Address<? extends Tunnel> subRoot = boundary
+							.accessTernaryEdgeRoot(subElement);
+					engine.getReteNet().disconnectRemoteNodes(subRoot,
+							superRoot, true);
+				}
+			}
+			break;
+		// case ACTION_SET_VIEW_INFO:
+		// ICoreNotificationObjectSetViewInfo n =
+		// (ICoreNotificationObjectSetViewInfo)notification;
+		// iTreeViewer.update(n.getElement(), new String[]{"name"});
+		// break;
+		case ACTION_CREATE_ENTITY:
+			ICoreNotificationObjectCreateEntity n6 = (ICoreNotificationObjectCreateEntity) notification;
+
+			IEntity entity = n6.getCreated();
+			// for (IModelElement type : entity.getTypes())
+			// boundary.updateEntity(Direction.INSERT, entity,
+			// type.getFullyQualifiedName());
+			boundary.updateUnary(Direction.INSERT, entity, null);
+			boundary.updateContainment(Direction.INSERT, n6.getContainer(),
+					entity);
+			break;
+		case ACTION_CREATE_RELATION:
+			ICoreNotificationObjectCreateRelation n7 = (ICoreNotificationObjectCreateRelation) notification;
+
+			IRelation relation = n7.getNewRelation();
+			// for (IModelElement type : relation.getTypes())
+			// boundary.updateRelation(Direction.INSERT, relation,
+			// relation.getFrom(), relation.getTo(),
+			// type.getFullyQualifiedName());
+			boundary.updateTernaryEdge(Direction.INSERT, relation,
+					n7.getFrom(), n7.getTo(), null);
+			break;
+		case ACTION_MOVE_ELEMENT_TO:
+			ICoreNotificationObjectMoveTo n8 = (ICoreNotificationObjectMoveTo) notification;
+
+			IEntity element = n8.getElement();
+			boundary.updateContainment(Direction.REVOKE, n8.getOldContainer(),
+					element);
+			boundary.updateContainment(Direction.INSERT, n8.getNewContainer(),
+					element);
+
+			notifyElementChange(n8.getElement());
+			break;
+		case ACTION_DELETE_ENTITY:
+			ICoreNotificationObjectDeleteEntity n9 = (ICoreNotificationObjectDeleteEntity) notification;
+
+			entity = n9.getDeleted();
+			// for (IModelElement type : entity.getTypes())
+			// boundary.updateEntity(Direction.REVOKE, entity,
+			// type.getFullyQualifiedName());
+			boundary.updateUnary(Direction.REVOKE, entity, null);
+			// boundary.revokeRelation(n.getParent(), entity,
+			// ReteBoundary.containmentLabel);
+			break;
+		case ACTION_DELETE_RELATION:
+			ICoreNotificationObjectDeleteRelation n10 = (ICoreNotificationObjectDeleteRelation) notification;
+
+			relation = n10.getDeleted();
+			// for (IModelElement type : relation.getTypes())
+			// boundary.updateRelation(Direction.REVOKE, relation,
+			// relation.getFrom(), relation.getTo(),
+			// type.getFullyQualifiedName());
+			boundary.updateTernaryEdge(Direction.REVOKE, relation,
+					n10.getFrom(), n10.getTo(), null);
+			break;
+		case ACTION_DELETE_CONTAINMENT:
+			ICoreNotificationObjectDeleteContainment n11 = (ICoreNotificationObjectDeleteContainment) notification;
+			boundary.updateContainment(Direction.REVOKE, n11.getParent(),
+					n11.getChild());
+			break;
+		case ACTION_SET_RELATION_FROM:
+			ICoreNotificationObjectSetRelationFrom n12 = (ICoreNotificationObjectSetRelationFrom) notification;
+
+			relation = n12.getRelation();
+			for (IModelElement type : relation.getTypes()) {
+				boundary.updateTernaryEdge(Direction.REVOKE, relation,
+						n12.getOldFrom(), relation.getTo(), type);
+				boundary.updateTernaryEdge(Direction.INSERT, relation,
+						n12.getNewFrom(), relation.getTo(), type);
+			}
+			boundary.updateTernaryEdge(Direction.REVOKE, relation,
+					n12.getOldFrom(), relation.getTo(), null);
+			boundary.updateTernaryEdge(Direction.INSERT, relation,
+					n12.getNewFrom(), relation.getTo(), null);
+			notifyElementChange(relation);
+			break;
+		case ACTION_SET_RELATION_TO:
+			ICoreNotificationObjectSetRelationTo n13 = (ICoreNotificationObjectSetRelationTo) notification;
+
+			relation = n13.getRelation();
+			for (IModelElement type : relation.getTypes()) {
+				boundary.updateTernaryEdge(Direction.REVOKE, relation,
+						relation.getFrom(), n13.getOldTo(), type);
+				boundary.updateTernaryEdge(Direction.INSERT, relation,
+						relation.getFrom(), n13.getNewTo(), type);
+			}
+			boundary.updateTernaryEdge(Direction.REVOKE, relation,
+					relation.getFrom(), n13.getOldTo(), null);
+			boundary.updateTernaryEdge(Direction.INSERT, relation,
+					relation.getFrom(), n13.getNewTo(), null);
+			notifyElementChange(relation);
+			break;
+		case TA_TRANSACTION_END:
+			engine.runAfterUpdateCallbacks();
+			break;
+		}
+		
+	}
+
+	protected void notifyElementChange(Object element) {
+		synchronized (sensitiveTerms) {
+			Set<PredicateEvaluatorNode> nodes = sensitiveTerms.get(element);
+			if (nodes != null) {
+				Tuple tuple = new FlatTuple(element);
+				for (PredicateEvaluatorNode node : nodes)
+					boundary.notifyEvaluator(node.getElementChangeNotifier(), tuple);
+			}
+		}
+	}
+
+	public void registerSensitiveTerm(Object element, PredicateEvaluatorNode node) {
+		synchronized (sensitiveTerms) {
+			Set<PredicateEvaluatorNode> nodes = sensitiveTerms.get(element);
+			if (nodes == null) {
+				nodes = new HashSet<PredicateEvaluatorNode>();
+				sensitiveTerms.put(element, nodes);
+			}
+			nodes.add(node);
+		}
+	}
+
+	public void unregisterSensitiveTerm(Object element, PredicateEvaluatorNode node) {
+		synchronized (sensitiveTerms) {
+			Set<PredicateEvaluatorNode> nodes = sensitiveTerms.get(element);
+			nodes.remove(node);
+			if (nodes.isEmpty()) sensitiveTerms.remove(element);
+		}
+	}
+
+	public int getListenerCategory() {
+		// TODO Auto-generated method stub
+		return 0;
+	}
+
+	public void disconnect() {
+		framework.get().getTopmodel().getNotificationManager()
+				.removeAllListener(this);
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/MachineListener.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/MachineListener.java
new file mode 100644
index 0000000..c6a0e92
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/MachineListener.java
@@ -0,0 +1,146 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters;
+
+import java.lang.ref.WeakReference;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.framework.IMachineSetChangedListener;
+import org.eclipse.viatra2.framework.properties.IViatraPropertyChangedListener;
+import org.eclipse.viatra2.framework.properties.IViatraPropertyProvider;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.IncrementalPMPropertyProvider;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.ReteEngine;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.Address;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.simple.SimpleReteBuilder;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+
+
+public class MachineListener implements IMachineSetChangedListener// Disconnectable																
+{
+	WeakReference<IFramework> fw;
+	ReteEngine<GTPattern> engine = null;
+	Set<Machine> sensitiveMachines;
+	int reteThreads;
+
+	// public MachineListener(ReteEngine engine) {
+	public MachineListener(IFramework framework) {
+		this.fw = new WeakReference<IFramework>(framework);
+		this.sensitiveMachines = new HashSet<Machine>();
+				
+		IViatraPropertyProvider provider = framework.getProperties()
+			.getProvider(IncrementalPMPropertyProvider.VIATRA_INCREMENTAL_PROVIDER_ID);
+		String threadStr = provider.getProperty(IncrementalPMPropertyProvider.PROP_THREADS);
+		setThreads(threadStr);
+		provider.addListener(new IViatraPropertyChangedListener() {
+			public void propertyChanged(String providerID, String propertyID, String oldVal, String newVal) {
+				if (providerID.equals(IncrementalPMPropertyProvider.VIATRA_INCREMENTAL_PROVIDER_ID) &&
+						propertyID.equals(IncrementalPMPropertyProvider.PROP_THREADS))
+					setThreads(newVal);
+			}			
+		});
+		
+		framework.addMachineSetListener(this);
+		for (Object machine : framework.getMachines())
+			if (machine instanceof Machine)
+				processMachine((Machine)machine);
+		// engine.addDisconnectable(this);
+	}
+
+
+
+	private void setThreads(String threadStr) {
+		// reteThreads option can only be influenced until the engine is created		
+		if (engine == null) {
+			Integer threads = IncrementalPMPropertyProvider.interpretThreads(threadStr);
+			reteThreads = threads==null? 0 : threads;
+		}
+	}
+	
+
+
+	// public void disconnect() {
+	// fw.removeMachineSetListener(this); //<-- problematic b/c it is called in
+	// chain with machineRemoved()
+	// machineRemoved() -> engine.reset() -> disconnect() --> causes
+	// ConcurrentModificationException
+	// }
+
+	public void registerPattern(GTPattern gtPattern) {
+		sensitiveMachines.add(gtPattern.getNamespace());
+	}
+
+	public void machineAdded(Object machine) {
+		// reteThreads option can only be influenced until the engine is created
+		if (engine == null && machine instanceof Machine) { 
+			processMachine((Machine)machine);
+		}
+	}
+
+
+
+	private void processMachine(Machine machine) {
+		for (Object annot: machine.getRuntimeAnnotations())
+		{
+			RuntimeAnnotation runtimeAnnotation = (RuntimeAnnotation) annot;
+			if ("@incremental".equals(runtimeAnnotation.getAnnotationName().toLowerCase()))
+			for (Object el : runtimeAnnotation.getElements()) {
+				RuntimeAnnotationElement runtimeAnnotationElement = (RuntimeAnnotationElement)el;
+				String key = runtimeAnnotationElement.getKey().toLowerCase();
+				if ("parallel".equals(key) || "threads".equals(key)	) {
+					String value = runtimeAnnotationElement.getValue();
+					Integer threads = IncrementalPMPropertyProvider.interpretThreads(value);
+					if (threads != null) fw.get().getProperties().setRuntimeProperty(
+						IncrementalPMPropertyProvider.VIATRA_INCREMENTAL_PROVIDER_ID, 
+						IncrementalPMPropertyProvider.PROP_THREADS, 
+						value);
+				}
+			}	
+		}
+	}
+
+	public void machineRemoved(Object machine) {
+		// if our machine is removed, reset all RETEEngines
+		if (sensitiveMachines.contains(machine)) {
+			sensitiveMachines.remove(machine);		
+			if (engine !=null) engine.reset();
+			//initBuilder();		
+		}
+	}
+
+	private void initEngine() {
+		IFramework framework = fw.get();
+		VPMGTASMContext context = new VPMGTASMContext(framework);
+		this.engine = new ReteEngine<GTPattern>(context, reteThreads);
+
+		ReteContainerGTASMBuildable buildable = new ReteContainerGTASMBuildable(engine, engine.getReteNet().getHeadContainer());// prerequisite: network, boundary
+		engine.setBuilder(new SimpleReteBuilder<Address<? extends Supplier>, Address<? extends Receiver>>(buildable, context)); 		// this.fw = engine.getFramework();
+	}
+
+	public ReteEngine<GTPattern> getEngine() {
+		if (engine ==null) initEngine();
+		return engine;
+	}
+
+	public void kill() {
+		if (engine !=null) engine.killEngine();
+		fw = null;
+		sensitiveMachines = null;
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/ReteContainerGTASMBuildable.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/ReteContainerGTASMBuildable.java
new file mode 100644
index 0000000..1e7dd32
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/ReteContainerGTASMBuildable.java
@@ -0,0 +1,79 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters;

+

+import java.util.Map;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.PredicateEvaluatorNode;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.ReteContainerBuildable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.ReteEngine;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Receiver;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.ReteContainer;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.network.Supplier;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.remote.Address;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;

+

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class ReteContainerGTASMBuildable extends ReteContainerBuildable<GTPattern> implements GTASMBuildable<Address<? extends Supplier>, Address<? extends Receiver>> {

+

+	/**

+	 * @param engine

+	 * @param targetContainer

+	 */

+	public ReteContainerGTASMBuildable(ReteEngine<GTPattern> engine, ReteContainer targetContainer) {

+		super(engine, targetContainer);

+	}

+

+	public Stub<Address<? extends Supplier>> buildGTASMTermChecker(

+			Term term, 

+			Map<String, Integer> variableIndices, 

+			Map<String, String> variableEquivalence, 

+			Integer rhsIndex, 

+			Stub<Address<? extends Supplier>> stub

+		) throws RetePatternBuildException 

+	{

+		int[] affectedIndices = new int[variableIndices.values().size()];

+		int k = 0;

+		for (Integer index : variableIndices.values()) affectedIndices[k++] = index;	

+		

+		PredicateEvaluatorNode ten = new GTASMTermEvaluatorNode(engine,

+				targetContainer, term, rhsIndex, variableIndices,

+				variableEquivalence, affectedIndices, stub.getVariablesTuple().getSize());

+		Address<PredicateEvaluatorNode> checker = Address.of(ten);

+		

+		reteNet.connectRemoteNodes(stub.getHandle(), checker, true);

+		

+		Stub<Address<? extends Supplier>> result = new Stub<Address<? extends Supplier>>(stub, checker);

+		

+		return result;

+	}	

+

+	@Override

+	public ReteContainerGTASMBuildable getNextContainer() {

+		return new ReteContainerGTASMBuildable(engine, engine.getReteNet().getNextContainer());

+	}

+	

+	/**

+	 * No need to distinguish

+	 */

+	@Override

+	public ReteContainerGTASMBuildable putOnTab(GTPattern effort) {

+		return this;

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/VPMContext.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/VPMContext.java
new file mode 100644
index 0000000..35b8994
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/VPMContext.java
@@ -0,0 +1,298 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters;

+

+import java.lang.ref.WeakReference;

+import java.util.Collection;

+

+import org.eclipse.viatra2.core.IEntity;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.core.IModelManager;

+import org.eclipse.viatra2.core.IRelation;

+import org.eclipse.viatra2.framework.IFramework;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.IManipulationListener;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherStringTypedContext;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherRuntimeContext;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.ReteEngine;

+import org.eclipse.viatra2.logger.Logger;

+

+

+

+public abstract class VPMContext<PatternDescription> 

+	implements IPatternMatcherStringTypedContext<PatternDescription>,

+		IPatternMatcherRuntimeContext<PatternDescription>

+{

+	WeakReference<IFramework> framework;

+	IModelManager manager; 

+	/**

+	 * @param framework

+	 */

+	public VPMContext(IFramework framework) {

+		super();

+		this.framework = new WeakReference<IFramework>(framework);

+		this.manager = framework.getTopmodel().getModelManager();

+	}

+

+	public EdgeInterpretation edgeInterpretation() {

+		return EdgeInterpretation.TERNARY;

+	}

+

+	public GeneralizationQueryDirection allowedGeneralizationQueryDirection() {

+		return GeneralizationQueryDirection.BOTH;

+	};

+	

+	public void enumerateAllUnaries(final ModelElementCrawler crawler) {

+		for (IEntity entity : manager.getEntities()) crawler.crawl(entity);

+	}

+

+	public void enumerateAllBinaryEdges(final ModelElementPairCrawler crawler) {

+		throw new UnsupportedOperationException();

+	}

+

+	public void enumerateAllTernaryEdges(final ModelElementCrawler crawler) {

+		for (IRelation relation : manager.getRelations()) {

+			crawler.crawl(relation);

+		}

+	}

+	

+	public Collection<? extends Object> enumerateDirectSupertypes(Object typeObject) {

+		return ((IModelElement)typeObject).getSupertypes();

+	}

+	

+	public Collection<? extends Object> enumerateDirectSubtypes(Object typeObject) {

+		return ((IModelElement)typeObject).getSubtypes();

+	}

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext#isUnaryType(java.lang.Object)

+	 */

+	@Override

+	public boolean isUnaryType(Object typeObject) {

+		return typeObject instanceof IEntity;

+	}

+	public void enumerateDirectUnaryInstances(Object typeObject, final ModelElementCrawler crawler) {

+		for (IModelElement modelElement : ((IEntity)typeObject).getInstances()) crawler.crawl(modelElement);

+	}

+	public void enumerateAllUnaryInstances(Object typeObject, final ModelElementCrawler crawler) {

+		for (IModelElement modelElement : ((IEntity)typeObject).getAllInstances()) crawler.crawl(modelElement);

+	}

+

+	public Collection<? extends Object> enumerateDirectUnarySubtypes(Object typeObject) {

+		return ((IEntity)typeObject).getSubtypes();

+	}	

+	public Collection<? extends Object> enumerateDirectUnarySupertypes(Object typeObject) {

+		return ((IEntity)typeObject).getSupertypes();

+	}

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext#isBinaryType(java.lang.Object)

+	 */

+	@Override

+	public boolean isBinaryEdgeType(Object typeObject) {

+		return false;

+	}

+	public void enumerateDirectBinaryEdgeInstances(Object typeObject, final ModelElementPairCrawler crawler) {

+		throw new UnsupportedOperationException();

+	}

+	public void enumerateAllBinaryEdgeInstances(Object typeObject, final ModelElementPairCrawler crawler) {

+		throw new UnsupportedOperationException();

+	}

+	public Collection<? extends Object> enumerateDirectBinaryEdgeSubtypes(Object typeObject) {

+		throw new UnsupportedOperationException();

+	}

+	public Collection<? extends Object> enumerateDirectBinaryEdgeSupertypes(Object typeObject) {

+		throw new UnsupportedOperationException();

+	}

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext#isTernaryType(java.lang.Object)

+	 */

+	@Override

+	public boolean isTernaryEdgeType(Object typeObject) {

+		return typeObject instanceof IRelation;

+	}

+	public void enumerateDirectTernaryEdgeInstances(Object typeObject, final ModelElementCrawler crawler) {

+		for (IModelElement modelElement : ((IRelation)typeObject).getInstances()) crawler.crawl(modelElement);

+	}

+	public void enumerateAllTernaryEdgeInstances(Object typeObject, final ModelElementCrawler crawler) {

+		for (IModelElement modelElement : ((IRelation)typeObject).getAllInstances()) crawler.crawl(modelElement);

+	}

+	public Collection<? extends Object> enumerateDirectTernaryEdgeSubtypes(Object typeObject) {

+		return ((IRelation)typeObject).getSubtypes();

+	}

+	public Collection<? extends Object> enumerateDirectTernaryEdgeSupertypes(Object typeObject) {

+		return ((IRelation)typeObject).getSupertypes();

+	}

+	

+	public IFramework getFramework() {

+		return framework.get();

+	}

+

+	public boolean inputConstructionEmbargo() {

+		return false;

+	}

+

+	public Object ternaryEdgeSource(Object relation) {

+		return ((IRelation)relation).getFrom();

+	}

+

+	public Object ternaryEdgeTarget(Object relation) {

+		return ((IRelation)relation).getTo();

+	}

+

+	public Object ternaryEdgeSourceType(Object typeObject) {

+		IRelation relation = (IRelation)typeObject;

+		return relation == null || relation.getIsAnyFrom() ? null : relation.getFrom();

+

+	}

+

+	public Object ternaryEdgeTargetType(Object typeObject) {

+		IRelation relation = (IRelation)typeObject;

+		return relation == null || relation.getIsAnyTo() ? null : relation.getTo();

+

+	}

+	

+	public Object binaryEdgeSourceType(Object typeObject) {

+		throw new UnsupportedOperationException();

+	}

+

+	public Object binaryEdgeTargetType(Object typeObject) {

+		throw new UnsupportedOperationException();

+	}

+

+	

+	public Object retrieveUnaryType(String fullyQualifiedName) {

+		return manager.getElementByName(fullyQualifiedName);

+	}

+

+	public Object retrieveBinaryEdgeType(String fullyQualifiedName) {

+		throw new UnsupportedOperationException(); // no references over VPM

+		//return framework.get().getTopmodel().getModelManager().getElementByName(fullyQualifiedName);

+	}

+

+	public Object retrieveTernaryEdgeType(String fullyQualifiedName) {

+		return manager.getElementByName(fullyQualifiedName);

+	}

+

+	

+	public String retrieveUnaryTypeFQN(Object typeObject) {

+		return ((IEntity)typeObject).getFullyQualifiedName();

+	}

+

+	public String retrieveBinaryEdgeTypeFQN(Object typeObject) {

+		throw new UnsupportedOperationException(); // no references over VPM

+	}

+

+	public String retrieveTernaryEdgeTypeFQN(Object typeObject) {

+		return ((IRelation)typeObject).getFullyQualifiedName();

+	}

+

+	public Object resolveConstant(String fullyQualifiedName) {

+		return manager.getElementByName(fullyQualifiedName);

+	}

+

+	public void enumerateAllUnaryContainments(final ModelElementPairCrawler crawler) {

+		for (IEntity container : framework.get().getTopmodel()

+				.getModelManager().getEntities()) 

+			for (IModelElement element : container.getContents())

+				if (element instanceof IEntity)

+					crawler.crawl(container, element);

+	}

+

+	public void enumerateAllInstantiations(final ModelElementPairCrawler crawler) {

+		for (IModelElement type : framework.get().getTopmodel()

+				.getModelManager().getElements()) {

+			for (IModelElement instance : type.getInstances()) {

+				crawler.crawl(type, instance);

+			}

+		}

+	}

+

+	public void enumerateAllGeneralizations(final ModelElementPairCrawler crawler) {

+		for (IModelElement superType : framework.get().getTopmodel()

+				.getModelManager().getElements()) {

+			for (IModelElement subType : superType.getSubtypes()) {

+				crawler.crawl(superType, subType);

+			}

+		}

+	}

+

+

+	public void modelReadLock() {

+		framework.get().getTopmodel().getModelManager().getLock().readLock().lock();

+	}

+

+	public void modelReadUnLock() {

+		framework.get().getTopmodel().getModelManager().getLock().readLock().unlock();

+	}

+

+	public IManipulationListener subscribePatternMatcherForUpdates(ReteEngine<PatternDescription> engine) {

+		return new GlobalModelspaceListener(engine, framework.get());

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext#logDebug(java.lang.String)

+	 */

+	public void logDebug(String message) {

+		framework.get().getLogger().debug(message);

+	}

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext#logError(java.lang.String)

+	 */

+	public void logError(String message) {

+		framework.get().getLogger().error(message);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext#logError(java.lang.String, java.lang.Throwable)

+	 */

+	public void logError(String message, Throwable cause) {

+		framework.get().getLogger().message(Logger.ERROR, message, cause);

+	}

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext#logWarning(java.lang.String)

+	 */

+	public void logWarning(String message) {

+		framework.get().getLogger().warning(message);		

+	}

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext#logWarning(java.lang.String, java.lang.Throwable)

+	 */

+	public void logWarning(String message, Throwable cause) {

+		framework.get().getLogger().message(Logger.WARNING, message, cause);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherRuntimeContext#stopCoalescing()

+	 */

+	public void finishCoalescing() {

+		// NO-OP over VPM

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherRuntimeContext#startCoalescing()

+	 */

+	public void startCoalescing() {

+		// NO-OP over VPM

+	}

+	

+//	public boolean checkBelowContainer(Object container, Object contained) {

+//		return ((IModelElement)contained).isBelowNamespace((IModelElement)container);

+//	}

+//

+//

+//	public boolean checkInContainer(Object container, Object contained) {

+//		return container.equals(((IModelElement) contained).getNamespace());

+//	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/VPMGTASMContext.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/VPMGTASMContext.java
new file mode 100644
index 0000000..d07aba6
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/adapters/VPMGTASMContext.java
@@ -0,0 +1,46 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters;

+

+import org.eclipse.viatra2.framework.IFramework;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.EngineManager;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.boundary.IPredicateTraceListener;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.ReteEngine;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;

+

+

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class VPMGTASMContext extends VPMContext<GTPattern> {

+	/**

+	 * @param framework

+	 */

+	public VPMGTASMContext(IFramework framework) {

+		super(framework);

+	}

+

+	public void reportPatternDependency(GTPattern gtPattern) {

+		EngineManager.getInstance().getMachineListener(framework.get()).registerPattern(gtPattern);		

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.IPatternMatcherRuntimeContext#subscribePatternMatcherForTraceInfluences(org.eclipse.viatra2.gtasm.patternmatcher.incremental.ReteEngine)

+	 */

+	public IPredicateTraceListener subscribePatternMatcherForTraceInfluences(ReteEngine<GTPattern> engine) {

+		return new ASMFunctionListener(engine);

+	}

+	

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/hardwired/HardwiredDirectInstantiation.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/hardwired/HardwiredDirectInstantiation.java
new file mode 100644
index 0000000..e5b184b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/hardwired/HardwiredDirectInstantiation.java
@@ -0,0 +1,74 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.hardwired;

+

+import org.eclipse.emf.common.util.EList;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters.GTASMBuildable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable;

+

+/**

+ * Hardwired pattern matcher for direct instantiation.

+ * Enumerates type-instance pairs for direct instanceOf relationships, i.e. subtyping is ignored.

+ * 

+ * Usage:

+ * @Incremental('reinterpret'='directInstantiation')

+ * pattern immediateInstanceOf(Type, Instance) = {}

+ * 

+ * @author Bergmann Gábor

+ *

+ */

+public class HardwiredDirectInstantiation<StubHandle, Collector> {

+	protected GTASMBuildable<StubHandle, Collector> buildable;

+	protected IPatternMatcherContext<GTPattern> context;

+	protected GTPattern gtPattern;

+	protected Collector prodNode;

+	/**

+	 * @param buildable

+	 * @param context

+	 * @param gtPattern

+	 * @param prodNode

+	 */

+	public HardwiredDirectInstantiation(

+			GTASMBuildable<StubHandle, Collector> buildable,

+			IPatternMatcherContext<GTPattern> context,

+			GTPattern gtPattern, Collector prodNode) {

+		super();

+		this.buildable = buildable.putOnTab(gtPattern);

+		this.context = context;

+		this.gtPattern = gtPattern;

+		this.prodNode = prodNode;

+	}

+	/**

+	 * @return

+	 */

+	public Collector run() throws RetePatternBuildException {

+		EList<PatternVariable> symParameters = gtPattern.getSymParameters();

+		if (symParameters.size() != 2) {

+			throw new RetePatternBuildException(

+					"Pattern {1} is annotated as directInstatiation, should have two arguments", 

+					new String[]{gtPattern.getFqn()}, gtPattern);

+		}

+		// TODO nicer Variable name

+		Stub<StubHandle> instantiationDirect = 

+			buildable.instantiationDirectStub(new FlatTuple(symParameters.toArray()));

+		buildable.buildConnection(instantiationDirect, prodNode);

+		return prodNode;

+	}

+	

+	

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/hardwired/HardwiredTransitiveClosure.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/hardwired/HardwiredTransitiveClosure.java
new file mode 100644
index 0000000..4f6c704
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/hardwired/HardwiredTransitiveClosure.java
@@ -0,0 +1,83 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.hardwired;

+

+import org.eclipse.emf.common.util.EList;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters.GTASMBuildable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable;

+

+/**

+ * Hardwired pattern matcher for transitive closure.

+ * Enumerates transitive closure of a binary pattern referred to as 'ofPattern'.

+ * 

+ * The 'ofPattern' must belong to the same machine (more precisely, they have to be siblings). 

+ * Therefore it is only referred by its name, not the FQN.

+ * 

+ * Usage:

+ * @Incremental('reinterpret'='transitiveClosure', 'ofPattern'='someSiblingPattern')

+ * pattern transitiveClosureOfSomeSiblingPattern(Source, Target) = {}

+ * 

+ * @author Bergmann Gábor

+ *

+ */

+public class HardwiredTransitiveClosure<StubHandle, Collector> {

+	protected GTASMBuildable<StubHandle, Collector> buildable;

+	protected IPatternMatcherContext<GTPattern> context;

+	protected GTPattern gtPattern;

+	protected GTPattern ofPattern;

+	protected Collector prodNode;

+	/**

+	 * @param buildable

+	 * @param context

+	 * @param gtPattern

+	 * @param prodNode

+	 */

+	public HardwiredTransitiveClosure(

+			GTASMBuildable<StubHandle, Collector> buildable,

+			IPatternMatcherContext<GTPattern> context,

+			GTPattern gtPattern, GTPattern ofPattern, Collector prodNode) {

+		super();

+		this.buildable = buildable.putOnTab(gtPattern);

+		this.context = context;

+		this.gtPattern = gtPattern;

+		this.prodNode = prodNode;

+	}

+	/**

+	 * @return

+	 */

+	public Collector run() throws RetePatternBuildException {

+		EList<PatternVariable> symParameters = gtPattern.getSymParameters();

+		if (symParameters.size() != 2) {

+			throw new RetePatternBuildException(

+					"Pattern {1} is annotated as transitiveClosure, should have two arguments", 

+					new String[]{gtPattern.getFqn()}, gtPattern);

+		}

+		if (ofPattern.getSymParameters().size() != 2) {

+			throw new RetePatternBuildException(

+					"Pattern {1} is annotated as transitiveClosure, 'ofPattern' [2] have two arguments", 

+					new String[]{gtPattern.getFqn(), ofPattern.getFqn()}, gtPattern);

+		}

+		Stub<StubHandle> ofPatternStub = buildable.patternCallStub(new FlatTuple(symParameters.toArray()), ofPattern);

+		Stub<StubHandle> transitiveClosure = buildable.buildTransitiveClosure(ofPatternStub);

+		buildable.buildConnection(transitiveClosure, prodNode);

+		return prodNode;

+	}

+	

+	

+

+}

+

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/GTASMCheckConditionPConstraint.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/GTASMCheckConditionPConstraint.java
new file mode 100644
index 0000000..2e8ed4b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/GTASMCheckConditionPConstraint.java
@@ -0,0 +1,142 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.simple;

+

+import java.util.ArrayList;

+import java.util.HashMap;

+import java.util.HashSet;

+import java.util.LinkedList;

+import java.util.Map;

+import java.util.Set;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters.GTASMBuildable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicdeferred.BaseTypeSafePredicateCheck;

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class GTASMCheckConditionPConstraint<StubHandle> extends

+		BaseTypeSafePredicateCheck<GTPattern, StubHandle> {

+	private Term topTerm;

+	private GTPatternBodyToPSystem<StubHandle, ?> pGraph;

+	private GTASMBuildable<StubHandle, ?> gtBuildable;

+

+	/**

+	 * @param pSystem

+	 * @param affectedVariables

+	 * @throws RetePatternBuildException 

+	 */

+	public GTASMCheckConditionPConstraint(

+			GTPatternBodyToPSystem<StubHandle, ?> pGraph, GTASMBuildable<StubHandle, ?> gtBuildable,

+			Term topTerm) throws RetePatternBuildException {

+		super(pGraph.pSystem, extractAffectedVariables(pGraph, topTerm));

+		this.pGraph = pGraph;

+		this.topTerm = topTerm;

+		this.gtBuildable = gtBuildable;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.DeferredPConstraint#doCheckOn(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub)

+	 */

+	@Override

+	protected Stub<StubHandle> doCheckOn(Stub<StubHandle> stub)

+			throws RetePatternBuildException {

+		Map<String, Integer> variableIndices = new HashMap<String, Integer>();

+		Map<String, String> variableEquivalence = new HashMap<String, String>();

+		Set<String> variableNames = extractAffectedVariableNames(pGraph, topTerm);

+		for (String name : variableNames) {

+			PVariable pNode = pGraph.getPNode(name);

+			variableEquivalence.put(name, pNode.getName());

+			variableIndices.put(pNode.getName(), stub.getVariablesIndex().get(pNode));

+		}

+		return gtBuildable.buildGTASMTermChecker(topTerm, variableIndices, variableEquivalence, null, stub);

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.BasePConstraint#toStringRest()

+	 */

+	@Override

+	protected String toStringRest() {

+		return new FlatTuple(new ArrayList<PVariable>(getAffectedVariables()).toArray()).toString() + "|=" + topTerm.toString();

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.BasePConstraint#doReplaceVariable(org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable, org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable)

+	 */

+	@Override

+	protected void doReplaceVariable(PVariable obsolete, PVariable replacement) {}

+	

+	private static <StubHandle> Set<PVariable> extractAffectedVariables(GTPatternBodyToPSystem<StubHandle, ?> pGraph, Term topTerm) 

+		throws RetePatternBuildException 

+	{

+		HashSet<PVariable> affected = new HashSet<PVariable>();

+		Set<String> variableNames = extractAffectedVariableNames(pGraph, topTerm);

+		for (String name : variableNames) {

+			PVariable termNode = pGraph.getPNode(name);

+			affected.add(termNode);

+		}

+		return affected;		

+	}

+	

+	private static <StubHandle> Set<String> extractAffectedVariableNames(GTPatternBodyToPSystem<StubHandle, ?> pGraph, Term topTerm) 

+		throws RetePatternBuildException 

+	{

+		HashSet<String> affected = new HashSet<String>();

+		LinkedList<Term> termQueue = new LinkedList<Term>();	

+		termQueue.add(topTerm);

+		while (termQueue.size() > 0) {

+			Term term = termQueue.removeFirst();

+

+			if (term instanceof VariableReference) {

+				VariableReference termVar = (VariableReference) term;

+				affected.add(termVar.getVariable().getName());

+			} else if (term instanceof FunctionInvocation) {

+				FunctionInvocation fi = (FunctionInvocation) term;

+				for (Term paramTerm : fi.getActualParameters()) {

+					termQueue.addFirst(paramTerm);

+				}

+			} else if (term instanceof ModelElementQuery) {

+				ModelElementQuery meq = (ModelElementQuery) term;

+				termQueue.addFirst(meq.getArgument());

+			} else if (term instanceof GTPatternCall) {

+				GTPatternCall pc = (GTPatternCall) term;

+				

+				String[] errorData = {pc.getCalledPattern().getFqn(), pGraph.gtPattern.getFqn()};

+				String message = 

+					"Offending call to pattern {1} in enclosing pattern {2}. " +

+					"The incremental pattern matcher does not support GT Pattern calls in checks and expressions embedded into GT Patterns;" +

+					" please use a 'find' clause directly in the pattern body.";

+				//pGraph.builder.logger.error(message);

+				throw new RetePatternBuildException(message, errorData, pGraph.gtPattern);

+

+//				If we did want to handle this case

+//				for (Object o : pc.getActualParameters()) {

+//					termQueue.addFirst((Term) o);

+//				}

+			}

+		}

+		

+		return affected;		

+	

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/GTPatternBodyToPSystem.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/GTPatternBodyToPSystem.java
new file mode 100644
index 0000000..a0ef9be
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/GTPatternBodyToPSystem.java
@@ -0,0 +1,761 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.simple;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Queue;
+import java.util.Set;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters.GTASMBuildable;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.helpers.LayoutHelper;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PSystem;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.PVariable;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicdeferred.Equality;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicdeferred.Inequality;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicdeferred.NegativePatternCall;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicdeferred.PatternMatchCounter;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables.Containment;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables.Generalization;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables.Instantiation;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables.PositivePatternCall;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables.TypeBinary;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables.TypeTernary;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.psystem.basicenumerables.TypeUnary;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext.EdgeInterpretation;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ContainmentMode;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.NonInjectivityConstraint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableAssignment;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.ElementReference;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.SupertypeOf;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.TypeOf;
+
+
+
+class GTPatternBodyToPSystem<StubHandle, Collector> {
+
+	protected GTPattern gtPattern;
+	protected GTPatternBody body;
+	protected SimpleReteBuilder<StubHandle, Collector> builder;
+	protected GTASMBuildable<StubHandle, Collector> buildable;
+	protected Entity graphEntity;
+	
+	protected PSystem<GTPattern, StubHandle, Collector> pSystem;
+
+//	/**
+//	 * pNodes are pattern variables, indexed by their names.
+//	 *
+//	 * VariableAssignments are already taken care of by variableEquivalence,
+//	 * pNodes are equivalence groups.
+//	 */
+//	protected Map<String, PVariable> pNodeByName = new HashMap<String, PVariable>();
+//	//protected Map<String, PatternEdge> pEdgeByName = new HashMap<String, PatternEdge>();
+//	/**
+//	 * pEdges are the pattern constraints / hyperedges
+//	 */
+//	protected Collection<PatternEdge> pEdges = new LinkedList<PatternEdge>();
+//	protected Map<PVariable, Collection<PatternEdge>> edgeList = new HashMap<PVariable, Collection<PatternEdge>>();
+//	// protected Set<PVariable> boundNodes = new HashSet<PVariable>();
+//
+//	protected int nextVirtualNodeID = 0;
+//
+//	/**
+//	 * contains the equivalence classes induced by variableassignments the
+//	 * factor set corresponds to the set of pNodes pNodes are named after
+//	 * equivalence class representatives
+//	 */
+//	protected UnionFind<String> variableEquivalence = new UnionFind<String>();
+
+//	/**
+//	 * Valid in shareable patterns.
+//	 *
+//	 * For each pNode, this structure contains the set of pNodes against which
+//	 * it is explicitly tested for inequality during the injectivity check phase.
+//	 *
+//	 * For virtual nodes, it should always contain null, reflecting that
+//	 * virtual nodes are permitted to be equal with anything.
+//	 *
+//	 * For regular nodes, it symmetrically gathers explicity inequality assertions.
+//	 */
+//	protected Map<PVariable, Set<PVariable>> explicitInequality = new HashMap<PVariable, Set<PVariable>>();
+//
+//	/**
+//	 * For each pNode, this structure contains the set of pNodes against which
+//	 * it is NOT tested for inequality during the injectivity check phase.
+//	 *
+//	 * For injective (distinct) patterns, it overrides the default injectivity check.
+//	 * For shareable patterns, it overrides explicit inequality checking.
+//	 *
+//	 * For virtual nodes, it should always contain null, reflecting that
+//	 * virtual nodes are permitted to be equal with anything.
+//	 *
+//	 * For regular nodes, it always contains identity.
+//	 * Furthermore, parameters of a positive pattern call of an injective pattern
+//	 * 		MAY be included in each others permittableEquality sets to avoid double-checking,
+//	 * 		but only under conditions that if it is safe.
+//	 */
+//	protected Map<PVariable, Set<PVariable>> permittableEquality = new HashMap<PVariable, Set<PVariable>>();
+
+
+	/**
+	 * contains the values of constant nodes
+	 */
+	protected Map<PVariable, Object> constantValues = new HashMap<PVariable, Object>();
+	/**
+	 * contains the edit models in the pattern graph
+	 */
+	protected Map<PVariable, Set<ModelElement>> sourceEditModelElements = new HashMap<PVariable, Set<ModelElement>>();
+	
+	/**
+	 * @param gtPattern
+	 * @param body
+	 */
+	public GTPatternBodyToPSystem(GTPattern gtPattern, GTPatternBody body,
+			SimpleReteBuilder<StubHandle, Collector> builder,
+			GTASMBuildable<StubHandle, Collector> buildable) {
+		super();
+		this.gtPattern = gtPattern;
+		this.body = body;
+		this.builder = builder;
+		this.buildable = buildable;
+		graphEntity = body.getPatternGraph();
+	}
+
+
+	public PSystem<GTPattern, StubHandle, Collector> toPSystem() throws RetePatternBuildException {
+		if (this.pSystem == null) {
+			this.pSystem = new PSystem<GTPattern, StubHandle, Collector>(builder.getContext(), buildable, gtPattern);
+			
+			preProcessAssignments();
+			preProcessPVariables();
+			gatherInequalityAssertions();
+			gatherContainmentConstraints();
+			gatherRelationsAndContainments();
+			gatherRelationships();
+			gatherPositivePatternCalls();
+			gatherCheckExpressions();
+//			expressTypeChecks();
+			gatherNegativePatternCalls(); // should go last to have node.isTouched
+											// ready
+			//touchQuantifiedVariables();
+//			connectPEdges();
+//			countTypeRestrictions();
+		}
+		return pSystem;
+	}
+
+	public PVariable[] symbolicParameterArray() throws RetePatternBuildException {
+		toPSystem();
+		
+		EList<PatternVariable> symParameters = gtPattern.getSymParameters();
+		int arity = symParameters.size();
+		PVariable[] result = new PVariable[arity];
+		for (int i=0; i<arity; ++i) result[i] = getPNode(symParameters.get(i));
+		return result;
+	}
+
+
+
+
+
+	protected PVariable getPNode(String name) {
+		return pSystem.getOrCreateVariableByName(name);
+	}
+
+	protected PVariable getPNode(Variable variable) {
+		return getPNode(variable.getName());
+	}
+
+	protected PVariable getPNode(ModelElement element) {
+		return getPNode(element.getName());
+	}
+
+	/**
+	 * @return the graphEntity
+	 */
+	protected Entity getGraphEntity() {
+		return graphEntity;
+	}
+	
+	/**
+	 * @return true iff correspondence is new
+	 */
+	protected boolean traceVariableToEditModel(PVariable pVar, ModelElement editModelElement) {
+		Set<ModelElement> sources = sourceEditModelElements.get(pVar);
+		if (sources == null) {
+			sources = new HashSet<ModelElement>();
+			sourceEditModelElements.put(pVar, sources);
+		}
+		return sources.add(editModelElement);
+	}
+	protected Set<ModelElement> traceBackVariable(PVariable pVar) {
+		Set<ModelElement> sources = sourceEditModelElements.get(pVar);
+		if (sources == null) return Collections.emptySet();
+		else return sources;
+	}	
+
+	protected void preProcessAssignments() {
+		for (Object o : body.getVariableAssignments()) {
+			PatternVariableAssignment assignment = (PatternVariableAssignment) o;
+			String lName = assignment.getLeftValue().getVariable().getName();
+			String rName = assignment.getRightValue().getVariable().getName();
+			new Equality<GTPattern, StubHandle>(pSystem, getPNode(lName), getPNode(rName));
+		}
+		LayoutHelper.unifyVariablesAlongEqualities(pSystem);
+	}
+
+	protected void preProcessPVariables()
+			throws RetePatternBuildException {
+		for (PatternVariable o : gtPattern.getSymParameters()) {
+			preProcessPVariableVariables(o);
+			new ExportedParameter<GTPattern, StubHandle>(pSystem, getPNode(o), o.getName());
+		}
+		for (PatternVariable o : body.getLocalVariables()) {  
+			preProcessPVariableVariables(o);
+		}
+		preProcessPVariableEntities(graphEntity.getComponents());
+	}
+
+	protected void preProcessPVariableVariables(PatternVariable variable) {
+		// makes sure the PVariable is created 
+		getPNode(variable);
+		
+		/*
+		 * Collection elements = variable.getElementInPattern(); boolean
+		 * isRelation = (!elements.isEmpty() && elements.iterator().next()
+		 * instanceof Relation);
+		 */
+
+//		String name = variable.getName();
+		
+////		if (pNode.getDirectUnifiedInto() == null) // only if this is the
+////												// representative of an
+////												// equivalence class
+//		// THERE WILL BE DUPLICATES BECAUSE OF UNIFICATION? BUT THIS PART IS IDEMPOTENT
+//		{
+//			
+////			pNodeByName.put(name, pNode);
+////
+////			edgeList.put(pNode, new LinkedList<PatternEdge>());
+//
+//			HashSet<PVariable> permitted = new HashSet<PVariable>();
+//			permitted.add(pNode);
+//			permittableEquality.put(pNode, permitted);
+//			explicitInequality.put(pNode, new HashSet<PVariable>());
+//		}
+	}
+
+	protected void preProcessPVariableEntities(Collection<Entity> entities)
+			throws RetePatternBuildException {
+		for (Entity entity : entities) {
+			String name = entity.getName();
+			PVariable pNode = getPNode(name);
+			traceVariableToEditModel(pNode, entity);
+			// new PatternEdge(this, entity);
+			preProcessPVariableEntities(entity.getComponents());
+		}
+	}
+
+
+
+
+	protected PVariable newConstant(Constant constant) throws RetePatternBuildException {
+		Object value;
+		if (constant.getKind().getValue() == ValueKind.MODELELEMENT) {
+			value = builder.context.resolveConstant(constant.getValue());
+		} else
+			value = constant.getValue();
+
+		return pSystem.newConstantVariable(value);
+	}
+
+	protected PVariable newConstant(ElementReference reference) throws RetePatternBuildException {
+		String fqn = ((Constant) reference.getArgument()).getValue();
+		return newConstant(fqn);
+	}
+
+	protected PVariable newConstant(String fqn) throws RetePatternBuildException {
+		Object value = builder.context.resolveConstant(fqn);
+		return pSystem.newConstantVariable(value);
+	}
+
+//	public PVariable substituteTerm(Term term)
+//			throws RetePatternBuildException {
+//		PVariable pNode = pSystem.newVirtualVariable();
+//		pEdges.add(new PatternEdge(this, term, pNode));
+//		return pNode;
+//	}
+
+//	protected void instantiationIndirect(PVariable type, PVariable instance) {
+//		PVariable virtual = pSystem.newVirtualVariable();
+//		new Generalization<GTPattern, StubHandle>(pSystem, type, virtual, true);
+//		new Instantiation<GTPattern, StubHandle>(pSystem, virtual, instance, false);
+////		pEdges.add(new PatternEdge(this, type, virtual,
+////				HyperEdgeClass.GENERALIZATION_TRANSITIVE));
+////		pEdges.add(new PatternEdge(this, virtual, instance,
+////				HyperEdgeClass.INSTANTIATION_DIRECT));
+//	}
+
+//	void touchQuantifiedVariables() {
+//		for (Object o : gtPattern.getSymParameters())
+//			getPNode((PatternVariable) o).isTouched = true;
+//		for (PatternEdge edge : pEdges)
+//			edge.touchQuantifiedNodes();
+//	}
+	//PRE: quantified nodes have been touched
+//	void connectPEdges() {
+//		for (PatternEdge edge : pEdges)
+//			edge.connectNodes();
+//	}
+
+	/**
+	 * PRE: there are no virtual PVariables yet.
+	 * @throws RetePatternBuildException 
+	 */
+	protected void gatherInequalityAssertions() throws RetePatternBuildException {
+		if (gtPattern.isDistinctMatching())	{
+			/**
+			 * For each pNode, this structure contains the set of pNodes against which
+			 * it is NOT tested for inequality during the injectivity check phase.
+			 *
+			 * // For virtual nodes, it should always contain null, reflecting that
+			 * // virtual nodes are permitted to be equal with anything.
+			 *
+			 * For regular nodes, it always contains identity.
+			 * Furthermore, parameters of a positive pattern call of an injective pattern
+			 * 		MAY be included in each others permittableEquality sets to avoid double-checking,
+			 * 		but only if called pattern never asserts explicit equality between them.
+			 * Finally, scalar values (results of match counting) are completely exempt.
+			 */
+			Map<PVariable, Set<PVariable>> permittableEquality = new HashMap<PVariable, Set<PVariable>>();
+			Set<PVariable> uniqueVariables = pSystem.getUniqueVariables();
+			for (PVariable pNode : uniqueVariables) {
+				permittableEquality.put(pNode, new HashSet<PVariable>(Collections.singleton(pNode)));
+			}
+			for (GTPatternCall call : body.getCalledPatterns()) {
+				GTMatchCounter matchCounter = call.getMatchCounter();
+				if (matchCounter == null && call.getCalledPattern().isDistinctMatching()) {
+					PVariable[] parameters = extractPatternCallParameterArray(call);
+					HashMap<PatternVariable, PVariable> symParamToPVariable = new HashMap<PatternVariable, PVariable>();
+					int k = 0;
+					for (PatternVariable variable : call.getCalledPattern().getSymParameters())
+						symParamToPVariable.put(variable, parameters[k++]);
+						
+					Map<PVariable, Set<PVariable>> localPermittableEquality = new HashMap<PVariable, Set<PVariable>>();
+					for (PVariable pNode : parameters) {
+						localPermittableEquality.put(pNode, new HashSet<PVariable>(Arrays.asList(parameters)));
+					}
+					for (GTPatternBody body: call.getCalledPattern().getPatternBodies()) {
+						for (PatternVariableAssignment varAss: body.getVariableAssignments()) {
+							PVariable left = symParamToPVariable.get(varAss.getLeftValue().getVariable());
+							PVariable right = symParamToPVariable.get(varAss.getRightValue().getVariable());
+							if (left != null && right != null) {
+								localPermittableEquality.get(left).remove(right);
+								localPermittableEquality.get(right).remove(left);	
+							}
+						}
+					}
+					for (PVariable pNode : parameters) {
+						permittableEquality.get(pNode).addAll(localPermittableEquality.get(pNode));
+					}
+				}
+				if (matchCounter != null) {
+					PVariable resultVar = getPNode(matchCounter.getVariableReference().getVariable());
+					permittableEquality.get(resultVar).addAll(uniqueVariables);
+					for (PVariable pNode : uniqueVariables) permittableEquality.get(pNode).add(resultVar);
+				}
+			}
+			for (PVariable pNode1 : uniqueVariables) if (!pNode1.isVirtual()) {
+				for (PVariable pNode2 : uniqueVariables) {
+					if (
+							!pNode2.isVirtual() && 
+							!permittableEquality.get(pNode1).contains(pNode2) && 
+							pNode1.getName().compareTo(pNode2.getName()) < 0 // avoid asserting symmetric inequalities
+						) new Inequality<GTPattern, StubHandle>(pSystem, pNode1, pNode2, true); // WEAK
+				}
+			}
+		} 
+		// else // practically in case of shareable patterns
+		for(Object o: body.getNonInjectivityConstraints()) {
+			NonInjectivityConstraint nic = (NonInjectivityConstraint)o;
+			PVariable left = getPNode(nic.getLeftValue().getVariable());
+			PVariable right = getPNode(nic.getRightValue().getVariable());
+			new Inequality<GTPattern, StubHandle>(pSystem, left, right); // STRONG
+		}
+	}
+
+	protected void gatherRelationsAndContainments() {
+		// using queue to protect against concurrentModificationException for created virtual nodes +
+		// Relations can be added back after being gathered
+		LinkedList<PVariable> nodeQueue = new LinkedList<PVariable>(pSystem.getUniqueVariables());
+		//Set<PVariable> processed = new HashSet<PVariable>();
+		for (Object rel : body.getDanglingRelations()) // dangling relations cannot be collected otherwise
+			gatherRelation((Relation) rel, nodeQueue);
+
+		while (!nodeQueue.isEmpty()) {
+			PVariable pNode = nodeQueue.removeFirst();
+			//if (!processed.add(pNode)) continue; // skip if already processed
+			
+			for (ModelElement source : traceBackVariable(pNode)) {
+
+				for (Object o : source.getRelationsFrom()) {
+					Relation rel = (Relation) o;
+					gatherRelation(rel, nodeQueue);
+				}
+				for (Object o : source.getRelationsTo()) {
+					Relation rel = (Relation) o;
+					gatherRelation(rel, nodeQueue);
+				}
+				if (source instanceof Entity) {
+					Entity entity = (Entity) source;
+					for (Object o : entity.getComponents()) {
+						new Containment<GTPattern, StubHandle>(pSystem, pNode, getPNode((Entity) o), false);
+					}
+				}
+
+			}
+		}
+	}
+	// idempotent
+	protected void gatherRelation(Relation rel, Queue<PVariable> nodeQueue) {
+		PVariable pNode = getPNode(rel);
+		if (traceVariableToEditModel(pNode, rel)) {
+			// new PatternEdge(this, rel);
+			nodeQueue.add(pNode);
+		}
+	}
+	
+
+	protected void gatherRelationships()
+			throws RetePatternBuildException {
+		// against concurrentModificationException for created virtual nodes
+		//Collection<PVariable> nodes = new ArrayList<PVariable>(pNodeByName.values());
+		Collection<Relationship> relationships = new LinkedHashSet<Relationship>(body.getDanglingRelationships());
+
+		try {
+			for (PVariable pNode : pSystem.getUniqueVariables()) {
+				for (ModelElement source : traceBackVariable(pNode)) {
+					List<String> typeNames = new ArrayList<String>();
+					for (Object o : source.getSubRelationships()) relationships.add((Relationship) o);
+					for (Object o : source.getSuperRelationships()) {
+						Relationship rship = (Relationship) o;
+						if (rship instanceof TypeOf
+								&& rship.getSupplier()!=null
+								&& rship.getSupplier().getRealElement() != null
+								&& !rship.getSupplier().getRealElement().equals(""))
+						{
+							//String supplierName = rship.getSupplier().getName(); // LOL what a coincidence
+							String supplierName = rship.getSupplier().getRealElement();
+							typeNames.add(supplierName);
+						}
+						else relationships.add(rship);
+					}
+					if (typeNames.isEmpty()) typeNames.add(null); // default entity / relation global supertype
+					expressTypesOnPNode(pNode, source, typeNames);
+				}
+			}
+			for (Relationship rship : relationships) gatherRelationship(rship);
+		} catch (RetePatternBuildException e) {
+			e.setPatternDescription(gtPattern);
+			throw e;
+		}
+
+	}
+
+	protected void expressTypesOnPNode(PVariable pNode, ModelElement source,
+			List<String> typeNames) throws RetePatternBuildException {
+		if (source instanceof Relation) {
+			Relation relation = (Relation) source;
+			PVariable fromPNode = getPNode(relation.getFromStr());
+			PVariable toPNode = getPNode(relation.getToStr());
+			if (builder.context.edgeInterpretation() == EdgeInterpretation.TERNARY) {
+				for (String supplierName : typeNames) {
+					Object typeObject = supplierName == null ? null : builder.context.retrieveTernaryEdgeType(supplierName);
+					new TypeTernary<GTPattern, StubHandle>(pSystem, builder.getContext(), pNode, fromPNode, toPNode, typeObject);
+				}
+			} else {
+				for (String supplierName : typeNames) {
+					Object typeObject = supplierName == null ? null : builder.context.retrieveBinaryEdgeType(supplierName);
+					new TypeBinary<GTPattern, StubHandle>(pSystem, builder.getContext(), fromPNode, toPNode, typeObject);
+				}
+			}
+		} else { // source instanceof Entity
+			for (String supplierName : typeNames) {
+				Object typeObject = supplierName == null ? null : builder.context.retrieveUnaryType(supplierName);
+				new TypeUnary<GTPattern, StubHandle>(pSystem, pNode, typeObject);
+			}
+		}
+	}
+
+	// not idempotent, unique invocation required
+	protected void gatherRelationship(Relationship rship) throws RetePatternBuildException {
+		String clientName = rship.getClientStr();
+		PVariable clientNode = getPNode(clientName);
+		if (clientNode == null) clientNode = newConstant(clientName);
+
+		String supplierName = rship.getSupplierStr();
+		PVariable supplierNode = getPNode(supplierName);
+		if (supplierNode == null) {
+			//if (rship instanceof TypeOf)
+			supplierNode = newConstant(supplierName);
+		}
+
+//		HyperEdgeClass edgeClass;
+		if (rship instanceof TypeOf) {
+//			instantiationIndirect(supplierNode, clientNode);
+			new Instantiation<GTPattern, StubHandle>(pSystem, supplierNode, clientNode, true);
+		} else if (rship instanceof SupertypeOf) {
+			new Generalization<GTPattern, StubHandle>(pSystem, supplierNode, clientNode, true);		
+		} else {
+			String[] args = {rship.eClass().getName(), supplierName, clientName, gtPattern.getFqn()};
+			String msg = "Unsupported VPM Relationship type: {1} encountered between {2} and {3} in pattern {4}";
+			throw new RetePatternBuildException(msg, args, gtPattern);
+		}
+	}
+
+//	/**
+//	 * Implies that relation type typeObj and all supertypes are implicitly checked for the owner pNode of impliedTypes
+//	 * @param typeObj
+//	 * @param impliedTypes
+//	 */
+//	private void implyTypes(Object typeObj, Set<Object> impliedTypes) {
+//		if (Options.calcImpliedTypes && typeObj!=null && impliedTypes.add(typeObj)) {
+//			for (Object superType: builder.context.enumerateDirectSupertypes(typeObj)) {
+//				implyTypes(superType, impliedTypes);
+//			}
+//		}
+//	}
+
+//	/**
+//	 * Implies that relation type typeObj and all supertypes are implicitly checked for the owner pNode of impliedTypes
+//	 * @param typeObj
+//	 * @param impliedTypes
+//	 */
+//	private void implyRelationTypes(Object typeObj, Set<Object> impliedTypes) {
+//		if (impliedTypes.add(typeObj)) {
+//			for (Object superType: builder.context.enumerateDirectRelationSupertypes(typeObj)) {
+//				implyRelationTypes(superType, impliedTypes);
+//			}
+//		}
+//	}
+//	/**
+//	 * Implies that reference type typeObj and all supertypes are implicitly checked for the owner pNode of impliedTypes
+//	 * @param typeObj
+//	 * @param impliedTypes
+//	 */
+//	private void implyReferenceTypes(Object typeObj, Set<Object> impliedTypes) {
+//		if (impliedTypes.add(typeObj)) {
+//			for (Object superType: builder.context.enumerateDirectReferenceSupertypes(typeObj)) {
+//				implyReferenceTypes(superType, impliedTypes);
+//			}
+//		}
+//	}
+
+
+
+//	protected void expressTypeChecks() {
+//		for (PVariable pNode : pSystem.getUniqueVariables()) {
+//			for (Object assertedType: pNode.assertedTypes) {
+//				if (pNode.source instanceof Relation)
+//					pEdges.add(new PatternEdge(this, (Relation) pNode.source, assertedType));
+//				// entity optimization by implied types
+//				else if (assertedType==null && pNode.impliedTypes.isEmpty() ||
+//						assertedType!=null && !pNode.impliedTypes.contains(assertedType))
+//					pEdges.add(new PatternEdge(this, (Entity) pNode.source, assertedType));
+//				else {
+//					// Object o = 2*15; // No need to assert type, already implied!
+//				}
+//			}
+//		}
+//	}
+	protected void gatherContainmentConstraints()
+			throws RetePatternBuildException 
+	{
+		for (Object o : body.getContainmentConstraints()) {
+			ContainmentConstraint cc = (ContainmentConstraint) o;
+			PVariable child = getPNode(cc.getVariable());
+			boolean transitive = cc.getMode().equals(ContainmentMode.BELOW_LITERAL);
+//			HyperEdgeClass relationshipClass = transitive ? HyperEdgeClass.CONTAINMENT_TRANSITIVE
+//					: HyperEdgeClass.CONTAINMENT_DIRECT;
+
+			PVariable parent;
+			if (cc.getParent() instanceof VariableReference) {
+				VariableReference parentVar = (VariableReference) cc.getParent();
+				parent = getPNode(parentVar.getVariable());
+			} else if (cc.getParent() instanceof Constant) {
+				parent = newConstant((Constant) cc.getParent());
+			} else if (cc.getParent() instanceof ElementReference) {
+				parent = newConstant((ElementReference) cc.getParent());
+			} else {
+				// parent = substituteTerm(cc.getParent());
+				throw new RetePatternBuildException(
+						"Incremental matcher incompatible with containment parent {1} of {2}.", 
+						new String[]{cc.getParent().toString(), child.toString()}, gtPattern);
+				// // ???
+				// hu.bme.mit.viatra.gtasmmodel.gtasm.metamodel.modelmanagement
+				// .queryFunctions.impl.ElementReferenceImpl
+				//
+				// builder.logger.warning(
+				// "ContainmentConstraint parent must be a variable or constant or element reference instead of "
+				// + cc.getParent().toString() );
+				// //throw new RetePatternBuildException();
+			}
+			new Containment<GTPattern, StubHandle>(pSystem, parent, child, transitive);
+		}
+
+	}
+
+	protected void gatherPositivePatternCalls() throws RetePatternBuildException {
+		for (Object o : body.getCalledPatterns()) {
+			GTPatternCall call = (GTPatternCall) o;
+			GTPattern calledPattern = call.getCalledPattern();	
+			Tuple parameters = extractPatternCallParameterTuple(call);
+
+			GTMatchCounter matchCounter = call.getMatchCounter();
+			if (matchCounter == null) { 
+				new PositivePatternCall<GTPattern, StubHandle>(pSystem, parameters, calledPattern);
+			} else {
+				PVariable resultVariable = getPNode(matchCounter.getVariableReference().getVariable());
+				new PatternMatchCounter<GTPattern, StubHandle>(pSystem, parameters, calledPattern, resultVariable);
+			}
+		}
+	}
+	
+	protected void gatherNegativePatternCalls() throws RetePatternBuildException {
+		for (Object o : body.getNegativePatterns()) {
+			GTPatternCall call = (GTPatternCall) o;
+			GTPattern calledPattern = call.getCalledPattern();
+			Tuple parameters = extractPatternCallParameterTuple(call);
+			
+			new NegativePatternCall<GTPattern, StubHandle>(pSystem, parameters, calledPattern);
+		}
+	}
+
+	/**
+	 * @param call
+	 * @return
+	 * @throws RetePatternBuildException
+	 */
+	protected Tuple extractPatternCallParameterTuple(GTPatternCall call)
+			throws RetePatternBuildException {
+		PVariable[] nodes = extractPatternCallParameterArray(call);
+		Tuple parameters = new FlatTuple(nodes);
+		return parameters;
+	}
+
+
+	/**
+	 * @param call
+	 * @return
+	 * @throws RetePatternBuildException
+	 */
+	protected PVariable[] extractPatternCallParameterArray(GTPatternCall call)
+			throws RetePatternBuildException {
+		int paramNum = call.getActualParameters().size();
+		PVariable[] nodes = new PVariable[paramNum];
+		for (int i = 0; i < paramNum; ++i) {
+			Object actualParam = call.getActualParameters().get(i);
+			if (actualParam instanceof VariableReference) {
+				VariableReference paramVar = (VariableReference) actualParam;
+				PVariable paramNode = getPNode(paramVar.getVariable());
+
+				nodes[i] = paramNode;
+			} else if (actualParam instanceof Constant) {
+				Constant constant = (Constant) actualParam;
+				PVariable paramNode = newConstant(constant);
+
+				nodes[i] = paramNode;
+			} else if (actualParam instanceof ElementReference) {
+				ElementReference reference = (ElementReference) actualParam;
+				PVariable paramNode = newConstant(reference);
+
+				nodes[i] = paramNode;
+			} else {
+				throw new RetePatternBuildException(
+					"Incremental matcher incompatible with parameter {3} of the pattern call of {2}: unsupported expression term {1}.", 
+					new String[]{actualParam.toString(), call.getCalledPattern().getFqn(), Integer.toString(i)}, gtPattern);
+//					Term term = (Term) actualParam;
+//					PVariable paramNode = substituteTerm(term);
+//
+//					nodes[i] = paramNode;
+			}
+		}
+		return nodes;
+	}
+
+
+	protected void gatherCheckExpressions()
+			throws RetePatternBuildException {
+		for (Object o : body.getCheckExpressions()) {
+			final Term topTerm = (Term) o;
+			
+
+			new GTASMCheckConditionPConstraint<StubHandle>(this, buildable, topTerm);
+		}
+
+	}
+
+//	public void countTypeRestrictions() {
+//		for (PatternEdge e: pEdges)
+//			for (int index : e.conveysTypeInformationIndices()) {
+//				PVariableBase node = e.nodes.get(index);
+//				node.lingeringTypeInfoCounter++;
+//				for (PatternEdge f: edgeList.get(node))
+//					f.totalLingeringTypeInfoCounter++;
+//			}
+//
+//	}
+
+	// protected void addEdge(PatternEdge edge)
+	// {
+	// if (edge.relMe!=null)
+	// {
+	// String name = edge.relMe.getName();
+	// PVariable pNode = pNodeByName.get(name);
+	// if (pNode != null)
+	// {
+	// //pNodeByName.remove(name);
+	// edgeList.remove(pNode);
+	// pEdgeByName.put(name, edge);
+	// }
+	// }
+	// }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/PatternScaffold.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/PatternScaffold.java
new file mode 100644
index 0000000..42c0e17
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/PatternScaffold.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.simple;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters.GTASMBuildable;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.helpers.BuildHelper;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util.Options;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util.Options.BuilderMethod;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.simple.legacy.BodyScaffold;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody;
+
+
+
+public class PatternScaffold<StubHandle, Collector> {
+	protected SimpleReteBuilder<StubHandle, Collector> baseBuilder;
+	protected GTASMBuildable<StubHandle, Collector> baseBuildable;
+
+	protected GTPattern gtPattern;
+	protected Collector prodNode; // FIXME
+
+	/**
+	 * @param baseBuilder
+	 * @param pattern
+	 */
+	public PatternScaffold(SimpleReteBuilder<StubHandle, Collector> builder, GTPattern gtPattern,
+			Collector production) {
+		super();
+		this.baseBuilder = builder;
+		this.baseBuildable = builder.baseBuildable; // TODO select container?
+		this.gtPattern = gtPattern;
+		this.prodNode = production;
+	}
+
+	public Collector run() throws RetePatternBuildException {
+		baseBuilder.context.logDebug(
+				"SimpleReteBuilder starts construction of: " + gtPattern.getName());
+
+		// Production prodNode = baseBuilder.boundary.accessProduction(gtPattern);
+
+		Collector collector = prodNode; 
+		// if (false /*gtPattern.isDistinctMatching()*/)
+		// {
+		// UniquenessEnforcerNode uen = new
+		// UniquenessEnforcerNode(baseBuilder.reteNet);
+		// baseBuilder.reteNet.connect(uen,collector);
+		// collector = uen;
+		// }
+
+		for (GTPatternBody body : gtPattern.getPatternBodies()) {
+			// select container
+			GTASMBuildable<StubHandle, Collector> currentBuildable = baseBuildable.getNextContainer().putOnTab(gtPattern);
+			
+			if (Options.builderMethod == BuilderMethod.LEGACY) {
+				new BodyScaffold<StubHandle, Collector>(baseBuilder, currentBuildable, this, body, collector).run();
+			} else { 
+				GTPatternBodyToPSystem<StubHandle, Collector> converter = 
+					new GTPatternBodyToPSystem<StubHandle, Collector>(gtPattern, body, baseBuilder, currentBuildable);
+				Stub<StubHandle> bodyFinal = 
+					Options.builderMethod.<GTPattern,StubHandle,Collector>layoutStrategy().layout(converter.toPSystem());
+				BuildHelper.projectIntoCollector(currentBuildable, bodyFinal, collector, converter.symbolicParameterArray());
+			}
+		}
+
+		return prodNode;
+
+	}
+
+//	/**
+//	 * @return the baseBuilder
+//	 */
+//	public SimpleReteBuilder<StubHandle, Collector> getBuilder() {
+//		return baseBuilder;
+//	}
+
+//	/**
+//	 * @return the baseBuildable
+//	 */
+//	public GTASMBuildable<StubHandle, Collector> getBuildable() {
+//		return baseBuildable;
+//	}
+
+	/**
+	 * @return the gtPattern
+	 */
+	public GTPattern getGtPattern() {
+		return gtPattern;
+	}
+	
+	
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/SimpleReteBuilder.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/SimpleReteBuilder.java
new file mode 100644
index 0000000..9f79979
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/SimpleReteBuilder.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.simple;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters.GTASMBuildable;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.hardwired.HardwiredDirectInstantiation;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.hardwired.HardwiredTransitiveClosure;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.IRetePatternBuilder;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherStringTypedContext;
+import org.eclipse.viatra2.gtasm.support.helper.GTASMHelper;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+
+
+
+// import org.eclipse.viatra2.gtasm.patternmatcher.term.TermHandler;
+
+/**
+ * @author Gabor Bergmann
+ * 
+ */
+public class SimpleReteBuilder<StubHandle, Collector> implements IRetePatternBuilder<GTPattern, StubHandle, Collector> {
+	protected GTASMBuildable<StubHandle, Collector> baseBuildable;
+	protected IPatternMatcherStringTypedContext<GTPattern> context;
+
+	/**
+	 * Prerequisite: engine has its network and boundary fields initialized
+	 * 
+	 * @param logger
+	 */
+	public SimpleReteBuilder(GTASMBuildable<StubHandle, Collector> baseBuildable, IPatternMatcherStringTypedContext<GTPattern> context) {
+		super();
+		this.baseBuildable = baseBuildable;
+		this.context = context;
+		//refresh();
+	}
+
+	public void refresh() {
+		baseBuildable.reinitialize();
+//		this.context = engine.getContext();		
+//		this.reteNet = engine.getReteNet();
+//		this.headContainer = reteNet.getHeadContainer();
+//		this.boundary = engine.getBoundary();
+	}
+
+	public Collector construct(GTPattern gtPattern) throws RetePatternBuildException {
+		Collector production = baseBuildable.putOnTab(gtPattern).patternCollector(gtPattern);
+		Map<String, String> incrementalAnnotation = GTASMHelper.extractLowerCaseRuntimeAnnotation(gtPattern, "@Incremental");
+		if (incrementalAnnotation!=null && incrementalAnnotation.get("reinterpret")!=null) {
+			if (incrementalAnnotation.get("reinterpret").equals("directInstantiation")) {
+				return new HardwiredDirectInstantiation<StubHandle, Collector>(baseBuildable, context, gtPattern, production).run();
+			} else if (incrementalAnnotation.get("reinterpret").equals("transitiveClosure")) {
+				String ofPatternName = incrementalAnnotation.get("ofPattern");
+				EList<GTPattern> gtPatternDefinitions = gtPattern.getContainer().getGtPatternDefinitions();
+				for (GTPattern ofPattern : gtPatternDefinitions) {
+					if (ofPattern.getName().equals(ofPatternName))
+						return new HardwiredTransitiveClosure<StubHandle, Collector>(
+								baseBuildable, context, gtPattern, ofPattern, production).run();
+				}
+				throw new RetePatternBuildException(
+						"Sibling pattern not found: {1}", 
+						new String[]{ofPatternName}, gtPattern);
+			} else {
+				throw new RetePatternBuildException(
+						"Unsupported reinterpret annotation: {1}", 
+						new String[]{incrementalAnnotation.get("reinterpret")}, gtPattern);
+			}
+		} else return new PatternScaffold<StubHandle, Collector>(this, gtPattern, production).run();
+	}
+
+//	public Address<? extends Production> constructScoper(
+//			Collector unscopedProduction,
+//			Map<Integer, Scope> additionalScopeMap,
+//			Collector production)
+//			throws PatternMatcherCompileTimeException {
+//
+//		return new ScopeExtensionScaffold(this, unscopedProduction, additionalScopeMap, production).run();
+//	}
+
+	public HashMap<Object, Integer> getPosMapping(GTPattern gtPattern) {
+		HashMap<Object, Integer> posMapping = new HashMap<Object, Integer>();
+		int l = 0;
+		for (Object o : gtPattern.getSymParameters()) {
+			posMapping.put(o, l++);
+		}
+		return posMapping;
+	}
+
+//	/* (non-Javadoc)
+//	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.IRetePatternBuilder#getBuildable()
+//	 */
+//	@Override
+//	public GTASMBuildable<StubHandle, Collector> getBuildable() {
+//		return baseBuildable;
+//	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.IRetePatternBuilder#getContext()
+	 */
+	@Override
+	public IPatternMatcherStringTypedContext<GTPattern> getContext() {
+		return context;
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/legacy/BodyScaffold.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/legacy/BodyScaffold.java
new file mode 100644
index 0000000..8ff2a91
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/legacy/BodyScaffold.java
@@ -0,0 +1,403 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.simple.legacy;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.adapters.GTASMBuildable;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.Stub;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.FlatTuple;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.TupleMask;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util.Options;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.simple.PatternScaffold;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.simple.SimpleReteBuilder;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable;
+
+
+public class BodyScaffold<StubHandle, Collector> {
+	protected SimpleReteBuilder<StubHandle, Collector> builder;
+	protected GTASMBuildable<StubHandle, Collector> buildable;
+	protected PatternScaffold<StubHandle, Collector> patternScaffold;
+	protected GTPatternBody body;
+	protected Collector collector;
+
+	protected PatternGraph pGraph;
+
+	protected Set<PatternNode> visitedNodes = new HashSet<PatternNode>();
+	protected Set<PatternEdge> visitedEdges = new HashSet<PatternEdge>();
+	protected Set<PatternEdge> edgeQueue = new TreeSet<PatternEdge>();
+	/**
+	 * @param builder
+	 * @param patternScaffold
+	 * @param body
+	 */
+	public BodyScaffold(SimpleReteBuilder<StubHandle, Collector> builder,
+			GTASMBuildable<StubHandle, Collector> buildable,
+			PatternScaffold<StubHandle, Collector> patternScaffold, GTPatternBody body,
+			Collector collector) {
+		super();
+		this.builder = builder;
+		// TODO select container?
+		this.buildable = buildable; 
+		this.patternScaffold = patternScaffold;
+		this.body = body;
+		this.collector = collector;
+	}
+
+	public void run() throws RetePatternBuildException {
+		builder.getContext().logDebug("patternbody build started");
+
+		pGraph = new PatternGraph(patternScaffold.getGtPattern(), body, builder);
+
+		// put all edges into the queue
+		for (PatternEdge edge : pGraph.pEdges)
+			edgeQueue.add(edge);
+
+		// extracting constants
+		int constants = pGraph.getConstantValues().size();
+		Object[] constantValues = new Object[constants];
+		PatternNode[] constantNames = new PatternNode[constants];
+		int currentConstant = 0;
+		for (Map.Entry<PatternNode, Object> entry : pGraph.getConstantValues()
+				.entrySet()) {
+			constantNames[currentConstant] = entry.getKey();
+			constantValues[currentConstant] = entry.getValue();
+			currentConstant++;
+		}
+		for (PatternNode constant : constantNames)
+			bindPNode(constant);
+		// stub initialization
+		
+		
+		Stub<StubHandle> stub = buildable.buildStartStub(constantValues, constantNames);
+
+
+		while (!edgeQueue.isEmpty()) {
+			PatternEdge edge = edgeQueue.iterator().next();
+			edgeQueue.remove(edge);
+			visitedEdges.add(edge);
+			
+			// negative patterns that are not completely bound are not to be
+			// checked
+			if (edge.isUnsafeQuantification()) {
+				String[] args = {edge.originText, patternScaffold.getGtPattern().getName()};
+				String msg = "The incremental engine currently does not support unresolvable variables. " + 
+					"Keep also in mind that certain constructs (e.g. negative patterns or check expressions) cannot output symbolic parameters - [{1}] in [{2}]";
+				throw new RetePatternBuildException(msg, args, patternScaffold.getGtPattern());
+			}			
+			// check expressions are not to be checked before without matching the types of nodes
+			if (edge.isUnsafeTypeless()) {
+				String[] args = {edge.originText, patternScaffold.getGtPattern().toString()};
+				String msg = "[INTERNAL ERROR] Non-typesafe check operation attempted by incremental pattern matcher without matching types - [{1}] in [{2}]";
+				throw new RetePatternBuildException(msg, args, patternScaffold.getGtPattern());
+			}
+			
+			// account for expressed type information on affected nodes 
+			for (int index : edge.conveysTypeInformationIndices())
+				expressTypeOnPNode(edge.nodes.get(index));
+
+			if (edge.edgeClass.isJoinBased()) {
+				int oldCalibrationSize = stub.getVariablesTuple().getSize();
+
+				/* pNode correspondence */
+				int oldNodes = /* edge.boundNodes.size() */edge.degreeOfBindingWithMultiplicity;
+				int[] primaryIndices = new int[oldNodes];
+				final int[] sideIndices = new int[oldNodes];
+				int k = 0;
+				for (int i = 0; i < edge.nodes.size(); ++i) {
+					PatternNodeBase oldNode = edge.nodes.get(i);
+					if (edge.boundNodes.contains(oldNode)) {
+						primaryIndices[k] = stub.getVariablesIndex().get(oldNode);
+						sideIndices[k] = i;
+						k++;
+					}
+				}
+				int derivedValueIndex = (edge.edgeClass==HyperEdgeClass.COUNT_PATTERN_CALL) ? edge.nodes.size()-1 : -1;
+
+				/* side processing STARTS HERE */
+
+				Stub<StubHandle> sideStub = extractSideStub(edge);
+				
+				/* complementer mask and equalities */
+				/*
+				 * Generates a complementer mask that maps those elements that
+				 * were NOT mapped by the original sideIndices mask.
+				 */
+				HashSet<Object> mapped = new HashSet<Object>();
+				LinkedList<Integer> unmapped = new LinkedList<Integer>();
+				Map<PatternNode, LinkedList<Integer>> occurences = new HashMap<PatternNode, LinkedList<Integer>>();
+
+				for (int index : sideIndices)
+					mapped.add(edge.nodes.get(index));
+				for (int index = 0; index < edge.nodes.size(); ++index) {
+					PatternNode newNode = edge.nodes.get(index);
+
+					if (newNode.isTouched && mapped.add(newNode))
+						unmapped.addLast(index); // for the complementer
+
+					// for the equality check
+					LinkedList<Integer> indices;
+					indices = occurences.get(newNode);
+					if (indices == null) {
+						indices = new LinkedList<Integer>();
+						occurences.put(newNode, indices);
+					}
+					indices.add(index); // reverse order
+				}
+
+				int[] complementerIndices = new int[unmapped.size()];
+				int l = 0;
+				for (Integer integer : unmapped)
+					complementerIndices[l++] = integer;
+				TupleMask complementer = new TupleMask(complementerIndices,
+						edge.nodes.size());
+
+				/* equality checker(s) */
+				/* asserts equalities among side pNodes */
+				for (Collection<Integer> toBeChecked : occurences.values()) {
+					if (toBeChecked.size() > 1 && toBeChecked.contains(derivedValueIndex)) {
+						toBeChecked.remove(derivedValueIndex);
+						// EQUALITY solved by the join
+//						int other = toBeChecked.iterator().next(); 
+//						// the result of the aggregation can only be equality-checked after the count-join
+//						int[] indices = {derivedValueIndex, other -- LOOKUP TODO}; 
+//						postponedEqualityCheckIndices = new int[2];
+//						for (int i=0; i<sideIndices.length; i++) 
+//							if (sideIndices[i])
+					}
+					if (toBeChecked.size() > 1) // there really is an equality among a priori checkable nodes
+					{
+						int[] indices = new int[toBeChecked.size()];
+						int m = 0;
+						for (Integer index : toBeChecked)
+							indices[m++] = index;
+
+						sideStub = buildable.buildEqualityChecker(sideStub, indices); 
+					}
+				}
+
+				/* side processing ENDS HERE */
+
+				/* the actual pEdge checker */
+				
+				TupleMask primaryMask = new TupleMask(primaryIndices, stub.getVariablesTuple().getSize());
+				TupleMask effectiveSideMask = new TupleMask(sideIndices, edge.nodes.size()); 
+				if (edge.edgeClass!=HyperEdgeClass.COUNT_PATTERN_CALL)
+					stub = buildable.buildBetaNode(
+						stub,
+						sideStub,
+						primaryMask,
+						effectiveSideMask, 
+						complementer,
+						(edge.edgeClass == HyperEdgeClass.NEGATIVE_PATTERN_CALL));
+				else {
+					//PatternNode aggregate = edge.nodes[derivedValueIndex];
+					Integer resultPositionInSignature = null;
+					for (int i=sideIndices.length-1; i>=0; i--) 
+						if (sideIndices[i]==derivedValueIndex) {
+							resultPositionInSignature = i;
+							break;
+						}
+					TupleMask originalSideMask = (resultPositionInSignature==null) ? effectiveSideMask : 
+						TupleMask.omit(resultPositionInSignature, effectiveSideMask.indices.length).transform(effectiveSideMask);
+					if (resultPositionInSignature!=null)
+						stub = buildable.buildCountCheckBetaNode(
+								stub, 
+								sideStub, 
+								primaryMask, 
+								originalSideMask, 
+								resultPositionInSignature);
+						else 
+							stub = buildable.buildCounterBetaNode(
+								stub, 
+								sideStub, 
+								primaryMask, 
+								originalSideMask, 
+								complementer, 
+								edge.nodes.get(edge.nodes.size()-1));		
+				}
+
+				
+				/* marking new nodes as bound */
+				Collection<PatternNode> newNodes = new LinkedList<PatternNode>(
+						edge.unboundNodes);
+				for (PatternNode currentNode : newNodes) // iterating a clone =>
+															// no concurrency!
+				{
+					// account for binding of node variable
+					bindPNode(currentNode);
+				}
+
+				/* eager injectivity check */
+				if (Options.injectivityStrategy == Options.InjectivityStrategy.EAGER)
+					stub = constructInjectivityCheckers(stub, oldCalibrationSize);
+			} else // pEdge is not join-based, ie. CHECK_EXPRESSION
+			{
+				Map<String, Integer> variableIndices = new HashMap<String, Integer>();
+				for (PatternNodeBase pNode : edge.nodes) {
+					Integer index = stub.getVariablesIndex().get(pNode);
+					variableIndices.put(pNode.name, index);
+				}
+				Integer rhsIndex = (edge.extra == null) ? null : stub.getVariablesIndex().get(edge.extra);
+				stub = buildable.buildGTASMTermChecker((Term)edge.supplierKey, 
+						variableIndices, pGraph.variableEquivalence, rhsIndex, stub);
+			}
+			
+			/* postponed equality check */
+
+
+		}
+
+		/* lazy injectivity check */
+		if (Options.injectivityStrategy == Options.InjectivityStrategy.LAZY)
+			stub = constructInjectivityCheckers(stub, 0);
+
+		// last check
+		for (PatternNodeBase node : pGraph.pNodeByName.values())
+			if (!visitedNodes.contains(node) && node.isTouched) {
+				String[] args = {node.name, patternScaffold.getGtPattern().getName()};
+				String msg = "Pattern Graph Search terminated incompletely, "
+					+ "pattern variable {1} in pattern {2} could not be reached";
+				throw new RetePatternBuildException(msg, args, patternScaffold.getGtPattern());
+			}
+
+		// output
+		int paramNum = patternScaffold.getGtPattern().getSymParameters().size();
+		int[] tI = new int[paramNum];
+		int tiW = stub.getVariablesTuple().getSize();
+		for (int i = 0; i < paramNum; i++) {
+			PatternVariable variable = patternScaffold.getGtPattern().getSymParameters().get(i);
+			// for (Object o : variable.getElementInPattern()) // in all bodies
+			// {
+			PatternNodeBase pNode = pGraph.getPNode(variable);
+			// if (stub.calibrationIndex.containsKey(pNode))
+			tI[i] = stub.getVariablesIndex().get(pNode);
+			// }
+		}
+		TupleMask trim = new TupleMask(tI, tiW);
+		Stub<StubHandle> trimmer = buildable.buildTrimmer(stub, trim);
+		buildable.buildConnection(trimmer, collector);
+	}
+
+	protected Stub<StubHandle> constructInjectivityCheckers(Stub<StubHandle> stub,
+			int oldCalibrationSize) {
+		int newCalibrationSize = stub.getVariablesTuple().getSize();
+
+		Stub<StubHandle> accumulator = stub;
+
+		for (int subject = oldCalibrationSize; subject < newCalibrationSize; subject++) {
+			PatternNodeBase newNode = (PatternNodeBase) stub.getVariablesTuple()
+					.get(subject);
+			if (!newNode.isExemptFromInjectivity()) {
+				boolean injective = patternScaffold.getGtPattern().isDistinctMatching();
+				Set<PatternNode> explicit = pGraph.explicitInequality.get(newNode);				
+				Set<PatternNode> toBeOmitted = pGraph.permittableEquality.get(newNode);
+				LinkedList<Integer> toBeChecked = new LinkedList<Integer>();
+				for (int j = 0; j < subject; j++) {
+					PatternNodeBase oldNode = (PatternNodeBase) stub.getVariablesTuple().get(j);
+					if (!oldNode.isVirtual() &&!toBeOmitted.contains(oldNode)
+							&& (injective || explicit.contains(oldNode))) toBeChecked.add(j);
+				}
+				if (!toBeChecked.isEmpty()) { 
+					int[] indices = new int[toBeChecked.size()];
+					int l = 0;
+					for (Integer index : toBeChecked)
+						indices[l++] = index;
+
+					accumulator = buildable.buildInjectivityChecker(accumulator, subject, indices);
+				}
+			}
+		}
+
+		return accumulator;
+	}
+
+	protected Stub<StubHandle> extractSideStub(PatternEdge edge) throws RetePatternBuildException 
+	{
+		Tuple nodes = new FlatTuple(edge.nodes.toArray());
+		Object supplierKey = edge.supplierKey;
+
+		switch (edge.edgeClass) {
+
+		case TYPE_UNARY:
+			return buildable.unaryTypeStub(nodes, supplierKey);
+		case TYPE_TERNARY_EDGE:
+			return buildable.ternaryEdgeTypeStub(nodes, supplierKey);
+		case TYPE_BINARY_EDGE:
+			return buildable.binaryEdgeTypeStub(nodes, supplierKey);
+		case CONTAINMENT_DIRECT:
+			return buildable.containmentDirectStub(nodes);
+		case CONTAINMENT_TRANSITIVE:
+			return buildable.containmentTransitiveStub(nodes);
+		case GENERALIZATION_DIRECT:
+			return buildable.generalizationDirectStub(nodes);
+		case GENERALIZATION_TRANSITIVE:
+			return buildable.generalizationTransitiveStub(nodes);
+		case INSTANTIATION_DIRECT:
+			return buildable.instantiationDirectStub(nodes);
+		case INSTANTIATION_TRANSITIVE:
+			return buildable.instantiationTransitiveStub(nodes);
+
+		case COUNT_PATTERN_CALL:
+		case NEGATIVE_PATTERN_CALL: // fall-through intentional
+		case PATTERN_CALL:
+			return buildable.patternCallStub(nodes, (GTPattern) supplierKey);
+		
+
+		case CHECK_EXPRESSION:
+			String[] args = {edge.edgeClass.toString()}; // internal error
+			String msg = "Cannot build standard checker, no supplier for this edge class: {1}";
+			throw new RetePatternBuildException(msg, args, patternScaffold.getGtPattern());
+		default:
+			String[] args1 = {edge.edgeClass.toString()}; // internal error			
+			String msg1 = "No such HyperEdgeClass: {1}";
+			throw new RetePatternBuildException(msg1, args1, patternScaffold.getGtPattern());
+		}
+	}
+
+	protected void bindPNode(PatternNode currentNode) {
+		if (!visitedNodes.contains(currentNode)) {
+			visitedNodes.add(currentNode);
+			for (PatternEdge e : pGraph.getEdgeList(currentNode)) {
+				edgeQueue.remove(e);
+				e.bindNode(currentNode);
+				if (!visitedEdges.contains(e)) {
+					edgeQueue.add(e);
+				}
+			}
+		}
+	}
+	protected void expressTypeOnPNode(PatternNodeBase currentNode) {
+		currentNode.lingeringTypeInfoCounter--;
+		for (PatternEdge e : pGraph.getEdgeList(currentNode)) {
+			if (e.isUnsafeTypeless()) {
+				edgeQueue.remove(e);
+				e.totalLingeringTypeInfoCounter--;
+				if (!visitedEdges.contains(e)) {
+					edgeQueue.add(e);
+				}
+			}
+		}
+	}
+	
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/legacy/PatternEdge.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/legacy/PatternEdge.java
new file mode 100644
index 0000000..3f40c1e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/legacy/PatternEdge.java
@@ -0,0 +1,647 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.simple.legacy;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext.EdgeInterpretation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.ElementReference;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation;
+
+
+
+enum HyperEdgeClass {
+	TYPE_UNARY, // pipa
+	TYPE_TERNARY_EDGE, // has an identity of itself  // pipa
+	TYPE_BINARY_EDGE, // no identity, arity=2  // pipa
+	CONTAINMENT_DIRECT,   // pipa
+	CONTAINMENT_TRANSITIVE,  // pipa 
+	INSTANTIATION_DIRECT,   // pipa
+	INSTANTIATION_TRANSITIVE,   // pipa
+	GENERALIZATION_DIRECT,   // pipa
+	GENERALIZATION_TRANSITIVE,   // pipa
+	PATTERN_CALL,  // pipa
+	NEGATIVE_PATTERN_CALL,  // pipa 
+	COUNT_PATTERN_CALL,  // pipa 
+	CHECK_EXPRESSION;  // ~pipa 
+	// EQUALITY/UNIFICATION, (special: unionfind)   // pipa
+	// EQUALITY @ side stubs (feature of EnumerablePConstraint & PatternCallBased?)   // pipa
+	// INEQUALITY (vdeferred, foldable),  // pipa, no foldable 
+	// CONSTANT (enumerable, foldable?)  // pipa, no foldable
+
+	boolean allTypeInfoRequired() // check only after all type information is asserted on the variables
+	{
+		return (this == CHECK_EXPRESSION);
+	}
+	
+	boolean isJoinBased() // true if joins a Supplier specified under
+							// supplierLabel
+	{
+		return (this != CHECK_EXPRESSION);
+	}
+	
+	boolean touchSensitive() // true if ignores untouched nodes
+	{
+		return (this == NEGATIVE_PATTERN_CALL || this == COUNT_PATTERN_CALL);
+	}
+	
+	static int[] iEmpty = {};
+	static int[] iFirst = {0};
+	static int[] iSecond = {1};
+	static int[] iFirstTwo = {0, 1};
+	static int[] iFirstThree = {0, 1, 2};
+	/**
+	 * @return index array containing all indices up to length
+	 */
+	public static int[] iAll(int length) {
+		int[] all = new int[length];
+		for (int i=0; i<length; i++) all[i] = i;
+		return all;
+	}
+	public static int[] iOne(int position) {
+		int[] one = {position};
+		return one;
+	}	
+	public static int[] iAllButOne(int length, int position) {
+		int[] all = new int[length-1];
+		int k=0;
+		for (int i=0; i<length; i++) if (i!=position) all[k++] = i;
+		return all;
+	}
+}
+
+/**
+ * Hyperedge, actually.
+ * 
+ * @author Gabor Bergmann
+ */
+class PatternEdge implements Comparable<PatternEdge> {
+	public PatternGraph pGraph;
+
+	public String originText;
+	public Object extra; // used for term evaluator. Contains the PVar of the result, or null if must be true
+
+	public List<PatternNode> nodes;
+	// public int weight = 0; // heuristical estimate of the join cost
+	public Map<PatternNode, Integer> multiplicity; /*
+													 * NOT PART OF KEY, will not
+													 * be compared or hashed
+													 */
+	public Set<PatternNode> boundNodes; /*
+										 * NOT PART OF KEY, will not be compared
+										 * or hashed
+										 */
+	public Set<PatternNode> unboundNodes; /*
+										 * NOT PART OF KEY, will not be compared
+										 * or hashed
+										 */
+	public int degreeOfFreedom; /*
+								 * pNodes having multiple instances in nodes[]
+								 * are counted only once
+								 *//*
+									 * NOT PART OF KEY, will not be compared or
+									 * hashed
+									 */
+	public int degreeOfFreedomWithMultiplicity; /*
+												 * NOT PART OF KEY, will not be
+												 * compared or hashed
+												 */
+	public int degreeOfBinding; /*
+								 * NOT PART OF KEY, will not be compared or
+								 * hashed
+								 */
+	public int degreeOfBindingWithMultiplicity; /*
+												 * NOT PART OF KEY, will not be
+												 * compared or hashed
+												 */
+	public int totalLingeringTypeInfoCounter; 	/*
+												 * NOT PART OF KEY, will not be
+												 * compared or hashed
+												 */
+	
+	public Map<PatternNode, Integer> invertedIndex; /*
+													 * NOT PART OF KEY, will not
+													 * be compared or hashed
+													 */
+
+	/*
+	 * note: for negative calls, untouched variables are NOT to be bound and
+	 * will not be considered unbound, will not contribute to DoF
+	 */
+
+	public HyperEdgeClass edgeClass;
+	public Object supplierKey;
+
+
+	public PatternEdge(PatternGraph pGraph, Entity entity, Object typeObj) {
+		this.pGraph = pGraph;
+		originText = entity.toString();
+		extra = null;		
+		this.supplierKey = typeObj;
+
+
+		edgeClass = HyperEdgeClass.TYPE_UNARY;
+
+		PatternNode[] nodes = { pGraph.getPNode(entity) };
+		this.nodes = Arrays.asList(nodes);
+	}
+
+	public PatternEdge(PatternGraph pGraph, Relation rel, Object typeObj) {
+		this.pGraph = pGraph;
+		originText = rel.toString();
+		extra = null;
+		
+		this.supplierKey = typeObj;
+		if (pGraph.builder.getContext().edgeInterpretation() == EdgeInterpretation.TERNARY)
+		{
+			edgeClass = HyperEdgeClass.TYPE_TERNARY_EDGE;
+			PatternNode[] nodes = { pGraph.getPNode(rel),
+					pGraph.getPNode(rel.getFromStr()), pGraph.getPNode(rel.getToStr()) };
+			this.nodes = Arrays.asList(nodes);
+		} else {
+			edgeClass = HyperEdgeClass.TYPE_BINARY_EDGE;
+			PatternNode[] nodes = { 
+					pGraph.getPNode(rel.getFromStr()), pGraph.getPNode(rel.getToStr()) };
+			this.nodes = Arrays.asList(nodes);			
+		}
+
+	}
+
+	// use only for Relationship constraints
+	public PatternEdge(PatternGraph pGraph, PatternNode parent,
+			PatternNode child, HyperEdgeClass relationshipClass) {
+		this.pGraph = pGraph;
+		originText = relationshipClass.toString();
+		extra = null;
+
+		edgeClass = relationshipClass;
+		supplierKey = ""; /*
+							 * transitive?
+							 * ReteBoundary.containmentTransitiveLabel :
+							 * ReteBoundary.containmentLabel;
+							 */
+
+		PatternNode[] nodes = { parent, child };
+		this.nodes = Arrays.asList(nodes);			
+
+	}
+
+	public PatternEdge(PatternGraph pGraph, GTPatternCall call, boolean negative)
+			throws RetePatternBuildException { 
+		this.pGraph = pGraph;
+		originText = call.toString();
+		boolean count = call.getMatchCounter()!=null;
+		if (!count)
+		{
+			edgeClass = negative ? HyperEdgeClass.NEGATIVE_PATTERN_CALL
+				: HyperEdgeClass.PATTERN_CALL;
+			extra = null;
+		}
+		else if (!negative) {
+			edgeClass = HyperEdgeClass.COUNT_PATTERN_CALL;
+			extra = call.getMatchCounter().getVariableReference().getVariable();
+		}
+		else {
+			String[] context = {call.getCalledPattern().getName(), pGraph.gtPattern.getName(), 
+					call.getMatchCounter().getVariableReference().getVariable().getName()};
+			throw new RetePatternBuildException("Negative pattern calls cannot count matches: " 
+					+ "incomprehensible negative call to pattern {1} in the body of pattern {2} with matches accumulated in {3}", 
+					context, pGraph.gtPattern);
+		}
+		
+		supplierKey = call.getCalledPattern();
+
+		int paramNum = call.getActualParameters().size();
+		PatternNode[] nodes = new PatternNode[count? paramNum+1 : paramNum];
+		for (int i = 0; i < paramNum; ++i) {
+			Object actualParam = call.getActualParameters().get(i);
+			if (actualParam instanceof VariableReference) {
+				VariableReference paramVar = (VariableReference) actualParam;
+				PatternNode paramNode = pGraph.getPNode(paramVar.getVariable());
+
+				nodes[i] = paramNode;
+			} else if (actualParam instanceof Constant) {
+				Constant constant = (Constant) actualParam;
+				PatternNode paramNode = pGraph.newConstant(constant);
+
+				nodes[i] = paramNode;
+			} else if (actualParam instanceof ElementReference) {
+				ElementReference reference = (ElementReference) actualParam;
+				PatternNode paramNode = pGraph.newConstant(reference);
+
+				nodes[i] = paramNode;
+			} else {
+				Term term = (Term) actualParam;
+				PatternNode paramNode = pGraph.substituteTerm(term);
+
+				nodes[i] = paramNode;
+			}
+		}
+		if (count) nodes[paramNum] = pGraph.getPNode((Variable)extra);
+
+		// skip injectivity check if already performed in positive, injective pattern call
+		if (!negative && !count && call.getCalledPattern().isDistinctMatching()) {
+			boolean safe = true;
+			for (Object o: call.getCalledPattern().getPatternBodies()) {
+				safe = safe && ((GTPatternBody)o).getVariableAssignments().isEmpty();
+			}
+			if (safe) for (PatternNodeBase pNode : nodes)
+				pGraph.permittableEquality.get(pNode).addAll(
+						Arrays.asList(nodes));
+		}
+		// skip injectivity check for scalars
+		if (count) {
+			nodes[nodes.length-1].makeExemptFromInjectivity();
+		}
+		this.nodes = Arrays.asList(nodes);
+	}
+	
+
+	
+	/**
+	 * if equalsTo!=null check that eval(expression) = equalsTo, if
+	 * equalsTo==null check that eval(expression) = true
+	 * 
+	 * @throws RetePatternBuildException
+	 */
+	public PatternEdge(PatternGraph pGraph, Term expression,
+			PatternNode equalsTo) throws RetePatternBuildException {
+		this.pGraph = pGraph;
+		originText = expression.toString();
+		extra = equalsTo;
+
+		edgeClass = HyperEdgeClass.CHECK_EXPRESSION;
+		supplierKey = expression;
+
+		// extracting affected variables with a depth-first-search method
+		HashSet<PatternNode> affected = new HashSet<PatternNode>();
+		LinkedList<Term> termQueue = new LinkedList<Term>();
+		termQueue.add(expression);
+		while (termQueue.size() > 0) {
+			Term term = termQueue.removeFirst();
+
+			if (term instanceof VariableReference) {
+				VariableReference termVar = (VariableReference) term;
+				PatternNode termNode = pGraph.getPNode(termVar.getVariable());
+				affected.add(termNode);
+			} else if (term instanceof FunctionInvocation) {
+				FunctionInvocation fi = (FunctionInvocation) term;
+				for (Object o : fi.getActualParameters()) {
+					termQueue.addFirst((Term) o);
+				}
+			} else if (term instanceof ModelElementQuery) {
+				ModelElementQuery meq = (ModelElementQuery) term;
+				termQueue.addFirst(meq.getArgument());
+			} else if (term instanceof GTPatternCall) {
+				GTPatternCall pc = (GTPatternCall) term;
+				
+				String[] errorData = {pc.getCalledPattern().getFqn(), pGraph.gtPattern.getFqn()};
+				String message = "Offending call to pattern {1} in enclosing pattern {2}. The incremental pattern matcher does not support GT Pattern calls in terms embedded into GT Patterns; please use a 'find' clause directly in the pattern body.";
+				//pGraph.builder.logger.error(message);
+				throw new RetePatternBuildException(message, errorData, term);
+
+//				If we did want to handle this case
+//				for (Object o : pc.getActualParameters()) {
+//					termQueue.addFirst((Term) o);
+//				}
+			}
+		}
+		if (equalsTo != null)
+			affected.add(equalsTo);
+		int nodeNum = affected.size();
+		PatternNode[] nodes = new PatternNode[nodeNum];
+		for (PatternNode pNode : affected) {
+			nodes[--nodeNum] = pNode;
+		}
+		this.nodes = Arrays.asList(nodes);
+	}
+
+	// void findWeight() throws RetePatternBuildException {
+	// Supplier mySupplier = extractSupplier();
+	// if (mySupplier != null) {
+	// Bag b = new Bag();
+	// mySupplier.pullInto(b);
+	// pGraph.builder.reteNet.flushUpdates();
+	//			
+	// weight = b.contents.size();
+	// }
+	// }
+
+	public void touchQuantifiedNodes() {
+		for (int i : touchingIndices())
+			nodes.get(i).isTouched = true;	
+	}
+	public void connectNodes() {
+		boundNodes = new HashSet<PatternNode>();
+		unboundNodes = new HashSet<PatternNode>();
+		multiplicity = new HashMap<PatternNode, Integer>();
+		degreeOfFreedom = 0; // will be counted soon
+		degreeOfFreedomWithMultiplicity = 0; // will be counted soon
+		degreeOfBinding = 0;
+		degreeOfBindingWithMultiplicity = 0;
+		invertedIndex = new HashMap<PatternNode, Integer>();
+
+		for (int i = 0; i < nodes.size(); ++i) {
+			PatternNode node = nodes.get(i);
+			invertedIndex.put(node, i);
+
+			pGraph.edgeList.get(node).add(this);
+
+			if (!multiplicity.containsKey(node))
+				multiplicity.put(node, 0);
+			multiplicity.put(node, multiplicity.get(node) + 1);
+
+			// if (!pGraph.bindedNodes.contains(node))
+			// {
+			// unboundNodes.add(node);
+			// degreeOfFreedom++;
+			// }
+			if (!edgeClass.touchSensitive() || node.isTouched) {
+				degreeOfFreedomWithMultiplicity++;
+				if (unboundNodes.add(node))
+					degreeOfFreedom++;
+			}
+		}
+	}
+
+	public void bindNode(PatternNode node) {
+		if (unboundNodes.contains(node)) {
+			boundNodes.add(node);
+			unboundNodes.remove(node);
+			degreeOfFreedom--;
+			degreeOfFreedomWithMultiplicity -= multiplicity.get(node);
+			degreeOfBinding++;
+			degreeOfBindingWithMultiplicity += multiplicity.get(node);
+		}
+	}
+
+	/**
+	 * an edge is bound if all its node variables are bound
+	 */
+	public boolean isBound() {
+		return (degreeOfFreedom == 0);
+	}
+	/**
+	 * @return true if all type information on all nodes has been expressed
+	 */
+	private boolean isFullyTyped() {
+		return (totalLingeringTypeInfoCounter == 0);
+	}
+	
+	/**
+	 * unsafe to be checked for some reason
+	 */
+	public boolean isUnsafe() {
+		return isUnsafeQuantification() || isUnsafeTypeless();
+	}
+	
+	/**
+	 * negative patterns or check expressions that are not completely bound are
+	 * not to be checked
+	 */
+	public boolean isUnsafeQuantification() {
+		for (int i : bindRequiredIndices())
+			if (unboundNodes.contains(nodes.get(i)))
+				return true;
+		return false;
+	}
+	/**
+	 * check expressions are not to be checked before without matching the types of nodes 
+	 */
+	public boolean isUnsafeTypeless() {
+		return (edgeClass.allTypeInfoRequired() && !isFullyTyped());
+	}
+
+
+	/**
+	 * true if a standard DualInputNode-based checker is required
+	 */
+	public boolean isJoinBased() {
+		return edgeClass.isJoinBased();
+	}
+	
+	// returns the indices of touched (quantifies) nodes
+	int[] touchingIndices() 
+	{
+		switch(edgeClass) {
+		case CHECK_EXPRESSION: // fall-through
+		case NEGATIVE_PATTERN_CALL: return HyperEdgeClass.iEmpty;
+		case COUNT_PATTERN_CALL: return HyperEdgeClass.iOne(nodes.size() - 1);
+		default: return HyperEdgeClass.iAll(nodes.size());
+		}
+	}
+	
+	int[] bindRequiredIndices()
+	{
+		switch(edgeClass) {
+		case CHECK_EXPRESSION: // fall-through
+		case NEGATIVE_PATTERN_CALL: return HyperEdgeClass.iAll(nodes.size());
+		case COUNT_PATTERN_CALL: return HyperEdgeClass.iAll(nodes.size() - 1);
+		default: return HyperEdgeClass.iEmpty;
+		}	
+	}
+	
+	/**
+	 * Indices for which type information is conveyed
+	 * @return array containing indices of type-restricted nodes in this.nodes; null means ALL
+	 */
+	public int[] conveysTypeInformationIndices() 
+	{
+		switch(edgeClass) {
+		case TYPE_UNARY: 
+		case TYPE_BINARY_EDGE: 
+		case TYPE_TERNARY_EDGE: 
+		case PATTERN_CALL: return HyperEdgeClass.iAll(nodes.size());
+		case INSTANTIATION_DIRECT:
+		case INSTANTIATION_TRANSITIVE: return HyperEdgeClass.iSecond;
+		default: return HyperEdgeClass.iEmpty;
+		}
+	}
+
+	@Override
+	public boolean equals(Object arg0) {
+		if (arg0 == null)
+			return false;
+		if (arg0 instanceof PatternEdge) {
+			PatternEdge other = (PatternEdge) arg0;
+			if (edgeClass != other.edgeClass)
+				return false;
+			if (originText != null)
+				return originText.equals(other.originText);
+			return (nodes.equals(other.nodes) && supplierKey
+					.equals(other.supplierKey));
+		} else
+			return false;
+	}
+
+	@SuppressWarnings("unchecked")
+	public int compareTo(PatternEdge other) {
+
+		if (isUnsafe() ^ other.isUnsafe()) {
+			// exactly one of them is unsafe, safe edge is preferred
+			if (isUnsafe())
+				return 1;
+			else
+				return -1;
+		}
+		// both edges safe or both unsafe
+		if (isBound() ^ other.isBound()) {
+			// exactly one of them is bound, bound edge is preferred
+			if (isBound())
+				return -1;
+			else
+				return +1;
+		}
+		// both edges bound or both unbound
+		if (degreeOfBinding != other.degreeOfBinding)
+			return -1 * (degreeOfBinding - other.degreeOfBinding); // edges with
+																	// more
+																	// bound
+																	// variables
+																	// are
+																	// preferred
+			// if (weight != other.weight)
+			// return (weight - other.weight); // edges with smaller weight are
+			// preferred
+		if (degreeOfFreedom != other.degreeOfFreedom)
+			return degreeOfFreedom - other.degreeOfFreedom; // lower DOF
+															// preferred
+		if (nodes.size() != other.nodes.size())
+			return -1 * (nodes.size() - other.nodes.size());
+		for (int i = 0; i < nodes.size(); ++i)
+			if (!nodes.get(i).equals(other.nodes.get(i)))
+				return nodes.get(i).compareTo(other.nodes.get(i));
+		if (edgeClass != other.edgeClass)
+			return edgeClass.ordinal() - other.edgeClass.ordinal();
+		if ((extra == null) ^ (other.extra == null)) {
+			// exactly one of them is null, null is preferred
+			if (extra == null)
+				return -1;
+			else
+				return +1;
+		}
+		if (extra != null) {
+			if (!extra.toString().equals(other.extra.toString()))
+				return extra.toString().compareTo(other.extra.toString());
+		}
+		if ((supplierKey == null) ^ (other.supplierKey == null)) {
+			// exactly one of them is null, null is preferred
+			if (supplierKey == null)
+				return -1;
+			else
+				return +1;
+		}
+		if (supplierKey != null) {
+			if (supplierKey instanceof Comparable)
+				return ((Comparable<Object>) supplierKey)
+						.compareTo(other.supplierKey);
+			else
+				return supplierKey.toString().compareTo(
+						other.supplierKey.toString());
+		}
+		return 0; // both are null
+
+	}
+
+
+
+
+//	public Address<? extends Supplier> extractSupplier()
+//			throws RetePatternBuildException {
+//		Address<? extends Supplier> mySupplier;
+//
+//		switch (edgeClass) {
+//
+//		case TYPE_UNARY:
+//			mySupplier = pGraph.builder.boundary
+//					.accessEntityRoot(supplierKey);
+//			break;
+//
+//		case TYPE_TERNARY_EDGE:
+//			mySupplier = pGraph.builder.boundary
+//					.accessRelationRoot(supplierKey);
+//			break;
+//		case TYPE_BINARY_EDGE:
+//			mySupplier = pGraph.builder.boundary
+//					.accessReferenceRoot(supplierKey);
+//			break;			
+//		case CONTAINMENT_DIRECT:
+//			mySupplier = pGraph.builder.boundary.accessContainmentRoot();
+//			break;
+//		case CONTAINMENT_TRANSITIVE:
+//			mySupplier = pGraph.builder.boundary
+//					.accessContainmentTransitiveRoot();
+//			break;
+//		case GENERALIZATION_DIRECT:
+//			mySupplier = pGraph.builder.boundary.accessGeneralizationRoot();
+//			break;
+//		case GENERALIZATION_TRANSITIVE:
+//			mySupplier = pGraph.builder.boundary
+//					.accessGeneralizationTransitiveRoot();
+//			break;
+//		case INSTANTIATION_DIRECT:
+//			mySupplier = pGraph.builder.boundary.accessInstantiationRoot();
+//			break;
+//		case INSTANTIATION_TRANSITIVE:
+//			mySupplier = pGraph.builder.boundary
+//					.accessInstantiationTransitiveRoot();
+//			break;
+//
+//		case NEGATIVE_PATTERN_CALL: // fall-through intentional
+//		case PATTERN_CALL:
+//			mySupplier = pGraph.builder.boundary
+//					.accessProduction((GTPattern) supplierKey);
+//			break;
+//
+//		case CHECK_EXPRESSION:
+//			mySupplier = null;
+//			break;
+//		default:
+//			pGraph.builder.logger.error("No such HyperEdgeClass"
+//					+ edgeClass.toString());
+//			throw new RetePatternBuildException();
+//		}
+//
+//		return mySupplier;
+//	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString() {
+		String s = "PatternEdge[" + edgeClass + "](";
+		for (PatternNodeBase n : nodes)
+			s += n.toString() + ";";
+		s += ")";
+		return s;
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/legacy/PatternGraph.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/legacy/PatternGraph.java
new file mode 100644
index 0000000..1515ddf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/legacy/PatternGraph.java
@@ -0,0 +1,597 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.simple.legacy;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.construction.RetePatternBuildException;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.IPatternMatcherContext.EdgeInterpretation;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util.Options;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.util.UnionFind;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.simple.SimpleReteBuilder;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ContainmentMode;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.NonInjectivityConstraint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableAssignment;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.ElementReference;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.SupertypeOf;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.TypeOf;
+
+
+
+class PatternGraph {
+
+	protected GTPattern gtPattern;
+	protected GTPatternBody body;
+	protected SimpleReteBuilder<?, ?> builder;
+	protected Entity graphEntity;
+
+	/**
+	 * pNodes are pattern variables, indexed by their names.
+	 *
+	 * VariableAssignments are already taken care of by variableEquivalence,
+	 * pNodes are equivalence groups.
+	 */
+	protected Map<String, PatternNode> pNodeByName = new HashMap<String, PatternNode>();
+	//protected Map<String, PatternEdge> pEdgeByName = new HashMap<String, PatternEdge>();
+	/**
+	 * pEdges are the pattern constraints / hyperedges
+	 */
+	protected Collection<PatternEdge> pEdges = new LinkedList<PatternEdge>();
+	protected Map<PatternNode, Collection<PatternEdge>> edgeList = new HashMap<PatternNode, Collection<PatternEdge>>();
+	// protected Set<PatternNode> boundNodes = new HashSet<PatternNode>();
+
+	protected int nextVirtualNodeID = 0;
+
+	/**
+	 * contains the equivalence classes induced by variableassignments the
+	 * factor set corresponds to the set of pNodes pNodes are named after
+	 * equivalence class representatives
+	 */
+	protected UnionFind<String> variableEquivalence = new UnionFind<String>();
+
+	/**
+	 * Valid in shareable patterns.
+	 *
+	 * For each pNode, this structure contains the set of pNodes against which
+	 * it is explicitly tested for inequality during the injectivity check phase.
+	 *
+	 * For virtual nodes, it should always contain null, reflecting that
+	 * virtual nodes are permitted to be equal with anything.
+	 *
+	 * For regular nodes, it symmetrically gathers explicity inequality assertions.
+	 */
+	protected Map<PatternNode, Set<PatternNode>> explicitInequality = new HashMap<PatternNode, Set<PatternNode>>();
+
+	/**
+	 * For each pNode, this structure contains the set of pNodes against which
+	 * it is NOT tested for inequality during the injectivity check phase.
+	 *
+	 * For injective (distinct) patterns, it overrides the default injectivity check.
+	 * For shareable patterns, it overrides explicit inequality checking.
+	 *
+	 * For virtual nodes, it should always contain null, reflecting that
+	 * virtual nodes are permitted to be equal with anything.
+	 *
+	 * For regular nodes, it always contains identity.
+	 * Furthermore, parameters of a positive pattern call of an injective pattern
+	 * 		MAY be included in each others permittableEquality sets to avoid double-checking,
+	 * 		but only under conditions that if it is safe.
+	 */
+	protected Map<PatternNode, Set<PatternNode>> permittableEquality = new HashMap<PatternNode, Set<PatternNode>>();
+
+
+	/**
+	 * contains the values of constant nodes
+	 */
+	protected Map<PatternNode, Object> constantValues = new HashMap<PatternNode, Object>();
+
+	/**
+	 * @param gtPattern
+	 * @param body
+	 */
+	public PatternGraph(GTPattern gtPattern, GTPatternBody body,
+			SimpleReteBuilder<?, ?> builder)
+			throws RetePatternBuildException {
+		super();
+		this.gtPattern = gtPattern;
+		this.body = body;
+		this.builder = builder;
+		graphEntity = body.getPatternGraph();
+
+		preProcessAssignments();
+		preProcessPatternNodes();
+		gatherInequalityAssertions();
+		gatherContainmentConstraints();
+		gatherRelationsAndContainments();
+		gatherRelationships();
+		gatherPositivePatternCalls();
+		gatherCheckExpressions();
+		expressTypeChecks();
+		gatherNegativePatternCalls(); // should go last to have node.isTouched
+										// ready
+		touchQuantifiedVariables();
+		connectPEdges();
+		countTypeRestrictions();
+	}
+
+
+
+
+
+
+
+
+
+
+	public PatternNode getPNode(String name) {
+		return pNodeByName.get(variableEquivalence.find(name));
+	}
+
+	public PatternNode getPNode(Variable variable) {
+		return getPNode(variable.getName());
+	}
+
+	public PatternNode getPNode(ModelElement element) {
+		return getPNode(element.getName());
+	}
+
+	public Collection<PatternEdge> getEdgeList(PatternNodeBase pNode) {
+		return edgeList.get(pNode);
+	}
+
+	/**
+	 * @return the constantValues
+	 */
+	public Map<PatternNode, Object> getConstantValues() {
+		return constantValues;
+	}
+
+	/**
+	 * @return the graphEntity
+	 */
+	public Entity getGraphEntity() {
+		return graphEntity;
+	}
+
+	protected void preProcessAssignments() {
+		for (Object o : body.getVariableAssignments()) {
+			PatternVariableAssignment assignment = (PatternVariableAssignment) o;
+			String lName = assignment.getLeftValue().getVariable().getName();
+			String rName = assignment.getRightValue().getVariable().getName();
+			variableEquivalence.unite(lName, rName);
+		}
+	}
+
+	protected void preProcessPatternNodes()
+			throws RetePatternBuildException {
+		for (Object o : gtPattern.getSymParameters())
+			preProcessPatternNodeVariables((PatternVariable) o);
+		for (Object o : body.getLocalVariables())
+			preProcessPatternNodeVariables((PatternVariable) o);
+		preProcessPatternNodeEntities(graphEntity.getComponents());
+	}
+
+	protected void preProcessPatternNodeVariables(PatternVariable variable) {
+		/*
+		 * Collection elements = variable.getElementInPattern(); boolean
+		 * isRelation = (!elements.isEmpty() && elements.iterator().next()
+		 * instanceof Relation);
+		 */
+
+		String name = variable.getName();
+		if (variableEquivalence.isRoot(name)) // only if this is the
+												// representative of an
+												// equivalence class
+		{
+			PatternNode pNode = new PatternNode(variable/* , !isRelation */);
+			pNodeByName.put(name, pNode);
+
+			edgeList.put(pNode, new LinkedList<PatternEdge>());
+
+			HashSet<PatternNode> permitted = new HashSet<PatternNode>();
+			permitted.add(pNode);
+			permittableEquality.put(pNode, permitted);
+			explicitInequality.put(pNode, new HashSet<PatternNode>());
+		}
+	}
+
+	protected void preProcessPatternNodeEntities(Collection<Entity> entities)
+			throws RetePatternBuildException {
+		for (Entity entity : entities) {
+			String name = entity.getName();
+			getPNode(name).setSource(entity);
+			// new PatternEdge(this, entity);
+			preProcessPatternNodeEntities(entity.getComponents());
+		}
+	}
+
+	public PatternNode newConstant(Constant constant) throws RetePatternBuildException {
+		Object value;
+		if (constant.getKind().getValue() == ValueKind.MODELELEMENT) {
+			value = builder.getContext().resolveConstant(constant.getValue());
+		} else
+			value = constant.getValue();
+
+		return newConstantValue(value);
+	}
+
+	public PatternNode newConstant(ElementReference reference) throws RetePatternBuildException {
+		String fqn = ((Constant) reference.getArgument()).getValue();
+		return newConstant(fqn);
+	}
+
+	public PatternNode newConstant(String fqn) throws RetePatternBuildException {
+		Object value = builder.getContext().resolveConstant(fqn);
+		return newConstantValue(value);
+	}
+
+	public PatternNode substituteTerm(Term term)
+			throws RetePatternBuildException {
+		PatternNode pNode = newVirtualNode();
+		pEdges.add(new PatternEdge(this, term, pNode));
+		return pNode;
+	}
+
+	public void instantiationIndirect(PatternNode type, PatternNode instance) {
+		PatternNode virtual = newVirtualNode();
+		pEdges.add(new PatternEdge(this, type, virtual,
+				HyperEdgeClass.GENERALIZATION_TRANSITIVE));
+		pEdges.add(new PatternEdge(this, virtual, instance,
+				HyperEdgeClass.INSTANTIATION_DIRECT));
+	}
+
+	PatternNode newConstantValue(Object value) {
+		PatternNode pNode = newVirtualNode();
+		constantValues.put(pNode, value);
+		return pNode;
+	}
+
+	PatternNode newVirtualNode() {
+		int newId = nextVirtualNodeID++;
+
+		PatternNode pNode = new PatternNode(newId);
+		pNodeByName.put(pNode.name, pNode);
+		edgeList.put(pNode, new LinkedList<PatternEdge>());
+		// permittedEqualities = null
+
+		return pNode;
+	}
+
+	void touchQuantifiedVariables() {
+		for (Object o : gtPattern.getSymParameters())
+			getPNode((PatternVariable) o).isTouched = true;
+		for (PatternEdge edge : pEdges)
+			edge.touchQuantifiedNodes();
+	}
+	//PRE: quantified nodes have been touched
+	void connectPEdges() {
+		for (PatternEdge edge : pEdges)
+			edge.connectNodes();
+	}
+
+	protected void gatherInequalityAssertions() {
+		for(Object o: body.getNonInjectivityConstraints()) {
+			NonInjectivityConstraint nic = (NonInjectivityConstraint)o;
+			PatternNode left = getPNode(nic.getLeftValue().getVariable());
+			PatternNode right = getPNode(nic.getRightValue().getVariable());
+			explicitInequality.get(left).add(right);
+			explicitInequality.get(right).add(left);
+		}
+	}
+
+	protected void gatherRelationsAndContainments() {
+		// using queue to protect against concurrentModificationException for created virtual nodes +
+		// Relations can be added back after being gathered
+		TreeSet<PatternNode> nodeQueue = new TreeSet<PatternNode>(pNodeByName.values());
+		for (Object rel : body.getDanglingRelations()) // dangling relations cannot be collected otherwise
+			gatherRelation((Relation) rel, nodeQueue);
+
+		while (!nodeQueue.isEmpty()) {
+			PatternNode pNode = nodeQueue.first();
+			nodeQueue.remove(pNode);
+			if (pNode.source != null) {
+
+				for (Object o : pNode.source.getRelationsFrom()) {
+					Relation rel = (Relation) o;
+					gatherRelation(rel, nodeQueue);
+				}
+				for (Object o : pNode.source.getRelationsTo()) {
+					Relation rel = (Relation) o;
+					gatherRelation(rel, nodeQueue);
+				}
+				if (pNode.source instanceof Entity) {
+					Entity entity = (Entity) pNode.source;
+					for (Object o : entity.getComponents()) {
+						pEdges.add(new PatternEdge(this, pNode, getPNode((Entity) o),
+								HyperEdgeClass.CONTAINMENT_DIRECT));
+					}
+				}
+
+			}
+		}
+	}
+	// idempotent
+	protected void gatherRelation(Relation rel, Set<PatternNode> nodeQueue) {
+		PatternNode pNode = getPNode(rel);
+		if (pNode.source == null) {
+			pNode.setSource(rel);
+			// new PatternEdge(this, rel);
+			if (!nodeQueue.contains(pNode))
+				nodeQueue.add(pNode);
+		}
+	}
+
+	protected void gatherRelationships()
+			throws RetePatternBuildException {
+		// against concurrentModificationException for created virtual nodes
+		Collection<PatternNode> nodes = new ArrayList<PatternNode>(pNodeByName.values());
+		Collection<Relationship> relationships = new LinkedHashSet<Relationship>(body.getDanglingRelationships());
+
+		for (PatternNode pNode : nodes) {
+			if (pNode.source != null) {
+				boolean typed = false;
+
+				for (Object o : pNode.source.getSuperRelationships()) {
+					Relationship rship = (Relationship) o;
+					if (rship instanceof TypeOf
+							&& rship.getSupplier()!=null
+							&& rship.getSupplier().getRealElement() != null
+							&& !rship.getSupplier().getRealElement().equals(""))
+					{
+						typed = true;
+						//String supplierName = rship.getSupplier().getName(); // LOL what a coincidence
+						String supplierName = rship.getSupplier().getRealElement();
+						if (pNode.source instanceof Relation) {
+							Relation relation = (Relation) pNode.source;
+							if (builder.getContext().edgeInterpretation() == EdgeInterpretation.TERNARY) {
+								Object typeObject = builder.getContext().retrieveTernaryEdgeType(supplierName);
+								pNode.assertedTypes.add(typeObject);
+								if (typeObject != null)
+								{
+									Object srcType = builder.getContext().ternaryEdgeSourceType(typeObject);
+									Object trgType = builder.getContext().ternaryEdgeTargetType(typeObject);
+									implyTypes(srcType, getPNode(relation.getFromStr()).impliedTypes);
+									implyTypes(trgType, getPNode(relation.getToStr()).impliedTypes);
+								}
+							} else {
+								Object typeObject;
+								try {
+									typeObject = builder.getContext().retrieveBinaryEdgeType(supplierName);
+								} catch (RetePatternBuildException e) {
+									throw new RetePatternBuildException(e.getMessage(), e.getTemplateContext(), gtPattern);
+								}
+								pNode.assertedTypes.add(typeObject);
+								if (typeObject != null)
+								{
+									Object srcType = builder.getContext().binaryEdgeSourceType(typeObject);
+									Object trgType = builder.getContext().binaryEdgeTargetType(typeObject);
+									implyTypes(srcType, getPNode(relation.getFromStr()).impliedTypes);
+									implyTypes(trgType, getPNode(relation.getToStr()).impliedTypes);
+								}
+							}
+						} else { // pNode.source instanceof Entity
+							Object typeObject = builder.getContext().retrieveUnaryType(supplierName);
+							pNode.assertedTypes.add(typeObject);
+						}
+
+					}
+					else relationships.add(rship);
+				}
+				if (!typed) // manually add entity(A), relation(B, C, D) edges
+				{
+					pNode.assertedTypes.add(null);
+				}
+
+				for (Object o : pNode.source.getSubRelationships()) relationships.add((Relationship) o);
+			}
+		}
+		for (Relationship rship : relationships) gatherRelationship(rship);
+	}
+
+	// not idempotent, unique invocation required
+	protected void gatherRelationship(Relationship rship) throws RetePatternBuildException {
+		String clientName = rship.getClientStr();
+		PatternNode clientNode = getPNode(clientName);
+		if (clientNode == null) clientNode = newConstant(clientName);
+
+		String supplierName = rship.getSupplierStr();
+		PatternNode supplierNode = getPNode(supplierName);
+		if (supplierNode == null) {
+			//if (rship instanceof TypeOf)
+			supplierNode = newConstant(supplierName);
+		}
+
+		HyperEdgeClass edgeClass;
+		if (rship instanceof TypeOf) edgeClass = HyperEdgeClass.INSTANTIATION_TRANSITIVE;
+		else if (rship instanceof SupertypeOf) edgeClass = HyperEdgeClass.GENERALIZATION_TRANSITIVE;
+		else {
+			String[] args = {rship.eClass().getName(), supplierName, clientName, gtPattern.getFqn()};
+			String msg = "Unsupported VPM Relationship type: {1} encountered between {2} and {3} in pattern {4}";
+			throw new RetePatternBuildException(msg, args, gtPattern);
+		}
+
+		pEdges.add(new PatternEdge(this, supplierNode, clientNode, edgeClass));
+	}
+
+	/**
+	 * Implies that relation type typeObj and all supertypes are implicitly checked for the owner pNode of impliedTypes
+	 * @param typeObj
+	 * @param impliedTypes
+	 */
+	private void implyTypes(Object typeObj, Set<Object> impliedTypes) {
+		if (Options.calcImpliedTypes && typeObj!=null && impliedTypes.add(typeObj)) {
+			for (Object superType: builder.getContext().enumerateDirectSupertypes(typeObj)) {
+				implyTypes(superType, impliedTypes);
+			}
+		}
+	}
+
+//	/**
+//	 * Implies that relation type typeObj and all supertypes are implicitly checked for the owner pNode of impliedTypes
+//	 * @param typeObj
+//	 * @param impliedTypes
+//	 */
+//	private void implyRelationTypes(Object typeObj, Set<Object> impliedTypes) {
+//		if (impliedTypes.add(typeObj)) {
+//			for (Object superType: builder.getContext().enumerateDirectRelationSupertypes(typeObj)) {
+//				implyRelationTypes(superType, impliedTypes);
+//			}
+//		}
+//	}
+//	/**
+//	 * Implies that reference type typeObj and all supertypes are implicitly checked for the owner pNode of impliedTypes
+//	 * @param typeObj
+//	 * @param impliedTypes
+//	 */
+//	private void implyReferenceTypes(Object typeObj, Set<Object> impliedTypes) {
+//		if (impliedTypes.add(typeObj)) {
+//			for (Object superType: builder.getContext().enumerateDirectReferenceSupertypes(typeObj)) {
+//				implyReferenceTypes(superType, impliedTypes);
+//			}
+//		}
+//	}
+
+
+
+	protected void expressTypeChecks() {
+		for (PatternNode pNode : pNodeByName.values()) {
+			for (Object assertedType: pNode.assertedTypes) {
+				if (pNode.source instanceof Relation)
+					pEdges.add(new PatternEdge(this, (Relation) pNode.source, assertedType));
+				// entity optimization by implied types
+				else if (assertedType==null && pNode.impliedTypes.isEmpty() ||
+						assertedType!=null && !pNode.impliedTypes.contains(assertedType))
+					pEdges.add(new PatternEdge(this, (Entity) pNode.source, assertedType));
+				else {
+					// Object o = 2*15; // No need to assert type, already implied!
+				}
+			}
+		}
+	}
+	protected void gatherContainmentConstraints()
+			throws RetePatternBuildException {
+		for (Object o : body.getContainmentConstraints()) {
+			ContainmentConstraint cc = (ContainmentConstraint) o;
+			PatternNode child = getPNode(cc.getVariable());
+			boolean transitive = cc.getMode().equals(
+					ContainmentMode.BELOW_LITERAL);
+			HyperEdgeClass relationshipClass = transitive ? HyperEdgeClass.CONTAINMENT_TRANSITIVE
+					: HyperEdgeClass.CONTAINMENT_DIRECT;
+
+			if (cc.getParent() instanceof VariableReference) {
+				VariableReference parentVar = (VariableReference) cc
+						.getParent();
+				PatternNode parent = getPNode(parentVar.getVariable());
+
+				pEdges.add(new PatternEdge(this, parent, child, relationshipClass));
+			} else if (cc.getParent() instanceof Constant) {
+				PatternNode parent = newConstant((Constant) cc.getParent());
+
+				pEdges.add(new PatternEdge(this, parent, child, relationshipClass));
+
+			} else if (cc.getParent() instanceof ElementReference) {
+				PatternNode parent = newConstant((ElementReference) cc
+						.getParent());
+
+				pEdges.add(new PatternEdge(this, parent, child, relationshipClass));
+
+			} else {
+				PatternNode parent = substituteTerm(cc.getParent());
+
+				pEdges.add(new PatternEdge(this, parent, child, relationshipClass));
+				// // ???
+				// hu.bme.mit.viatra.gtasmmodel.gtasm.metamodel.modelmanagement
+				// .queryFunctions.impl.ElementReferenceImpl
+				//
+				// builder.logger.warning(
+				// "ContainmentConstraint parent must be a variable or constant or element reference instead of "
+				// + cc.getParent().toString() );
+				// //throw new RetePatternBuildException();
+			}
+		}
+
+	}
+
+	protected void gatherPositivePatternCalls()
+			throws RetePatternBuildException {
+		for (Object o : body.getCalledPatterns()) {
+			GTPatternCall call = (GTPatternCall) o;
+			pEdges.add(new PatternEdge(this, call, false));
+		}
+	}
+
+	protected void gatherNegativePatternCalls()
+			throws RetePatternBuildException {
+		for (Object o : body.getNegativePatterns()) {
+			GTPatternCall call = (GTPatternCall) o;
+			pEdges.add(new PatternEdge(this, call, true));
+		}
+	}
+
+	protected void gatherCheckExpressions()
+			throws RetePatternBuildException {
+		for (Object o : body.getCheckExpressions()) {
+			Term term = (Term) o;
+			pEdges.add(new PatternEdge(this, term, null/* equals true */));
+		}
+
+	}
+
+	public void countTypeRestrictions() {
+		for (PatternEdge e: pEdges)
+			for (int index : e.conveysTypeInformationIndices()) {
+				PatternNodeBase node = e.nodes.get(index);
+				node.lingeringTypeInfoCounter++;
+				for (PatternEdge f: edgeList.get(node))
+					f.totalLingeringTypeInfoCounter++;
+			}
+
+	}
+
+	// protected void addEdge(PatternEdge edge)
+	// {
+	// if (edge.relMe!=null)
+	// {
+	// String name = edge.relMe.getName();
+	// PatternNode pNode = pNodeByName.get(name);
+	// if (pNode != null)
+	// {
+	// //pNodeByName.remove(name);
+	// edgeList.remove(pNode);
+	// pEdgeByName.put(name, edge);
+	// }
+	// }
+	// }
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/legacy/PatternNode.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/legacy/PatternNode.java
new file mode 100644
index 0000000..a56d5b4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/legacy/PatternNode.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Gabor Bergmann and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.simple.legacy;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;
+
+class PatternNode extends PatternNodeBase implements Comparable<PatternNode> {
+	/**
+	 * An editmodel element corresponding to this variable, if there are any.
+	 */
+	public ModelElement source; 
+
+	/*
+	 * public PatternNode(Entity entity) { this(entity.getName(), null, true,
+	 * false, false); entities.add(entity); }
+	 */
+
+	public PatternNode(Variable variable/* , boolean isEntity */) {
+		super(variable.getName()/* , isEntity */);
+	}
+
+	// virtual variable: constant or term substitution
+	public PatternNode(int newId) {
+		super(".virtual{" + newId + "}", /* false, */true, true /*
+																 * virtual nodes
+																 * are
+																 * considered
+																 * touched
+																 */);
+		// this.entities = new LinkedList<Entity>();
+		// this.isEntity = false;
+	}
+
+	/**
+	 * @param entity
+	 *            the entity to set
+	 */
+	public void setSource(ModelElement source) {
+		this.source = source;
+	}
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/legacy/PatternNodeBase.java b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/legacy/PatternNodeBase.java
new file mode 100644
index 0000000..4d4222b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher.incremental/src/org/eclipse/viatra2/gtasm/patternmatcher/incremental/simple/legacy/PatternNodeBase.java
@@ -0,0 +1,123 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.incremental.simple.legacy;

+

+import java.util.HashSet;

+import java.util.LinkedList;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class PatternNodeBase {

+

+	/**

+	 * The name of the pattern variable. This is the unique key of the pattern node.

+	 */

+	public String name;

+	/**

+	 * if a node is not a symbolic parameter nor is it touched (quantified) by any

+	 * nonnegative constraints, it should be inversely quantified

+	 */

+	public boolean isTouched;

+	/**

+	 * virtual pNodes are nodes that do not correspond to actual pattern

+	 * variables; they represent constants or Term substitutes

+	 */

+	public boolean isVirtual;

+	/**

+	 * true if node is explicitly made exempt from injectivity

+	 */

+	public boolean isExemptFromInjectivity = false;

+	/**

+	 * Counts the number of hitherto unmatched constraints that can restrict the type of the node

+	 */

+	public int lingeringTypeInfoCounter;

+	/**

+	 * types explicitly asserted of this node

+	 */

+	public LinkedList<Object> assertedTypes;

+	/**

+	 * types automatically implied by other constraints

+	 */

+	public HashSet<Object> impliedTypes;

+

+

+	/**

+	 * @param name

+	 * @param isTouched

+	 * @param isVirtual

+	 */

+	public PatternNodeBase(String name, boolean isTouched, boolean isVirtual) {

+		super();

+		this.name = name;

+		this.isTouched = isTouched;

+		this.isVirtual = isVirtual;

+		

+		this.assertedTypes = new LinkedList<Object>();

+		this.impliedTypes = new HashSet<Object>();

+		this.lingeringTypeInfoCounter = 0;

+		

+	}

+

+	public PatternNodeBase(String name) {

+		this(name, false, false);

+	}

+	

+

+	public boolean isVirtual() {

+		return isVirtual;

+	}

+

+	public boolean isExemptFromInjectivity() {

+		return isVirtual || isExemptFromInjectivity;

+	}

+

+	public void makeExemptFromInjectivity() {

+		isExemptFromInjectivity = true;

+	}

+

+	@Override

+	public int hashCode() {

+		final int PRIME = 31;

+		int result = 1;

+		result = PRIME * result + ((name == null) ? 0 : name.hashCode());

+		return result;

+	}

+

+	@Override

+	public boolean equals(Object obj) {

+		if (this == obj)

+			return true;

+		if (obj == null)

+			return false;

+		if (getClass() != obj.getClass())

+			return false;

+		final PatternNode other = (PatternNode) obj;

+		if (name == null) {

+			if (other.name != null)

+				return false;

+		} else if (!name.equals(other.name))

+			return false;

+		return true;

+	}

+

+	public int compareTo(PatternNode arg0) {

+		return name.compareTo(arg0.name);

+	}

+

+	@Override

+	public String toString() {

+		return name;// + ":PatternNode";

+	}

+

+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/.classpath b/org.eclipse.viatra2.gtasm.patternmatcher/.classpath
new file mode 100644
index 0000000..ad32c83
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/.project b/org.eclipse.viatra2.gtasm.patternmatcher/.project
new file mode 100644
index 0000000..05c83c4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.viatra2.gtasm.patternmatcher</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra2.gtasm.patternmatcher/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..e29991e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Wed Jan 12 11:20:28 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/META-INF/MANIFEST.MF b/org.eclipse.viatra2.gtasm.patternmatcher/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..56ba43b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: VIATRA2 R3 Pattern matcher
+Bundle-SymbolicName: org.eclipse.viatra2.gtasm.patternmatcher;singleton:=true
+Bundle-Version: 3.3.0.qualifier
+Bundle-ClassPath: .
+Export-Package: org.eclipse.viatra2.gtasm.patternmatcher,
+ org.eclipse.viatra2.gtasm.patternmatcher.exceptions,
+ org.eclipse.viatra2.gtasm.patternmatcher.extension,
+ org.eclipse.viatra2.gtasm.patternmatcher.patterns
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.viatra2.core2,
+ org.eclipse.viatra2.gtasm.model,
+ org.eclipse.viatra2.gtasm.interpreter,
+ org.eclipse.viatra2.gtasm.support;bundle-version="3.2.0"
+Bundle-Vendor: BUTE-FTSRG
+Bundle-ActivationPolicy: lazy
+Bundle-Activator: org.eclipse.viatra2.gtasm.patternmatcher.extension.ViatraGTASMPatternMatcherPlugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/about.html b/org.eclipse.viatra2.gtasm.patternmatcher/about.html
new file mode 100644
index 0000000..1262b8c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/about.html
@@ -0,0 +1,28 @@
+<!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>About</title>

+</head>

+<body lang="EN-US">

+<h2>About This Content</h2>

+ 

+<p>July 4th, 2008</p>	

+<h3>License</h3>

+

+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 

+indicated below, the Content 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 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>If you did not receive this Content directly from the Eclipse Foundation, the Content is 

+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may

+apply to your use of any object code in the Content.  Check the Redistributor's license that was 

+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise

+indicated below, the terms and conditions of the EPL still apply to any source code in the Content

+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>

+

+</body>

+</html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/build.properties b/org.eclipse.viatra2.gtasm.patternmatcher/build.properties
new file mode 100644
index 0000000..9399852
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/build.properties
@@ -0,0 +1,6 @@
+bin.includes = META-INF/,\
+               plugin.xml,\
+               .,\
+               schema/
+source.. = src/
+src.includes = schema/
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/plugin.xml b/org.eclipse.viatra2.gtasm.patternmatcher/plugin.xml
new file mode 100644
index 0000000..4b84002
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/plugin.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+   <extension-point id="patternmatcher" name="Pattern matcher" schema="schema/org.eclipse.viatra2.gtasm.patternmatcher.patternmatcher.exsd"/>
+   <extension-point id="gtrulematcher" name="GT Rule matcher" schema="schema/org.eclipse.viatra2.gtasm.patternmatcher.gtrulematcher.exsd"/>
+</plugin>
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/schema/org.eclipse.viatra2.gtasm.patternmatcher.gtrulematcher.exsd b/org.eclipse.viatra2.gtasm.patternmatcher/schema/org.eclipse.viatra2.gtasm.patternmatcher.gtrulematcher.exsd
new file mode 100644
index 0000000..c0665f9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/schema/org.eclipse.viatra2.gtasm.patternmatcher.gtrulematcher.exsd
@@ -0,0 +1,122 @@
+<?xml version='1.0' encoding='UTF-8'?>

+<!-- Schema file written by PDE -->

+<schema targetNamespace="org.eclipse.viatra2.gtasm.patternmatcher">

+<annotation>

+      <appInfo>

+         <meta.schema plugin="org.eclipse.viatra2.gtasm.patternmatcher" id="gtrulematcher" name="GT Rule matcher"/>

+      </appInfo>

+      <documentation>

+         Plugins can provide a gt rule applier instance conforming to the IGTRuleMatcherFactory interface

+

+The ID must be  set to the name that will be used later (propably as an annotation) to indicate which pattern matcher to use.

+The already used ones are &quot;org.eclipse.viatra2.local_search&quot; and &quot;org.eclipse.viatra2.incremental_rete&quot;!

+      </documentation>

+   </annotation>

+

+   <element name="org.eclipse.viatra2.gtasm.patternmatcher.extension">

+      <complexType>

+         <sequence minOccurs="1" maxOccurs="unbounded">

+            <element ref="gtmatcherfactory"/>

+         </sequence>

+         <attribute name="point" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appInfo>

+                  <meta.attribute translatable="true"/>

+               </appInfo>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <element name="gtmatcherfactory">

+      <complexType>

+         <attribute name="class" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appInfo>

+                  <meta.attribute kind="java" basedOn=":org.eclipse.viatra2.gtasm.patternmatcher.extension.IGTRuleMatcherFactory"/>

+               </appInfo>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string" use="required">

+            <annotation>

+               <documentation>

+                  This must be set to the name that will be used later (propably as an annotation) to indicate which gt rule matcher to use.

+               </documentation>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="since"/>

+      </appInfo>

+      <documentation>

+         [Enter the first release in which this org.eclipse.viatra2.gtasm.patternmatcher.extension point appears.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="examples"/>

+      </appInfo>

+      <documentation>

+         [Enter org.eclipse.viatra2.gtasm.patternmatcher.extension point usage example here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="apiInfo"/>

+      </appInfo>

+      <documentation>

+         [Enter API information here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="implementation"/>

+      </appInfo>

+      <documentation>

+         [Enter information about supplied implementation of this org.eclipse.viatra2.gtasm.patternmatcher.extension point.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="copyright"/>

+      </appInfo>

+      <documentation>

+         

+      </documentation>

+   </annotation>

+

+</schema>

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/schema/org.eclipse.viatra2.gtasm.patternmatcher.patternmatcher.exsd b/org.eclipse.viatra2.gtasm.patternmatcher/schema/org.eclipse.viatra2.gtasm.patternmatcher.patternmatcher.exsd
new file mode 100644
index 0000000..7a1d83d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/schema/org.eclipse.viatra2.gtasm.patternmatcher.patternmatcher.exsd
@@ -0,0 +1,122 @@
+<?xml version='1.0' encoding='UTF-8'?>

+<!-- Schema file written by PDE -->

+<schema targetNamespace="org.eclipse.viatra2.gtasm.patternmatcher" xmlns="http://www.w3.org/2001/XMLSchema">

+<annotation>

+      <appInfo>

+         <meta.schema plugin="org.eclipse.viatra2.gtasm.patternmatcher" id="patternmatcher" name="Pattern matcher"/>

+      </appInfo>

+      <documentation>

+         Plugins can provide an pattern matcher instance conforming to the IPatternMatcherFactory interface

+

+The ID must be  set to the name that will be used later (propably as an annotation) to indicate which pattern matcher to use.

+The already used ones are &quot;org.eclipse.viatra2.local_search&quot; and &quot;org.eclipse.viatra2.incremental_rete&quot;!

+      </documentation>

+   </annotation>

+

+   <element name="org.eclipse.viatra2.gtasm.patternmatcher.extension">

+      <complexType>

+         <sequence minOccurs="1" maxOccurs="unbounded">

+            <element ref="matcherfactory"/>

+         </sequence>

+         <attribute name="point" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appInfo>

+                  <meta.attribute translatable="true"/>

+               </appInfo>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <element name="matcherfactory">

+      <complexType>

+         <attribute name="class" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appInfo>

+                  <meta.attribute kind="java" basedOn="org.eclipse.viatra2.gtasm.patternmatcher.extension.IPatternMatcherFactory"/>

+               </appInfo>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string" use="required">

+            <annotation>

+               <documentation>

+                  This must be set to the name that will be used later (propably as an annotation) to indicate which pattern matcher to use.

+The already used ones are &quot;local_search&quot; and &quot;incremental_rete&quot;.

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="annotation_name" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="since"/>

+      </appInfo>

+      <documentation>

+         [Enter the first release in which this org.eclipse.viatra2.gtasm.patternmatcher.extension point appears.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="examples"/>

+      </appInfo>

+      <documentation>

+         [Enter org.eclipse.viatra2.gtasm.patternmatcher.extension point usage example here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="apiInfo"/>

+      </appInfo>

+      <documentation>

+         [Enter API information here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appInfo>

+         <meta.section type="implementation"/>

+      </appInfo>

+      <documentation>

+         [Enter information about supplied implementation of this org.eclipse.viatra2.gtasm.patternmatcher.extension point.]

+      </documentation>

+   </annotation>

+

+

+</schema>

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/ExecutionMode.java b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/ExecutionMode.java
new file mode 100644
index 0000000..ac6e7e2
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/ExecutionMode.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher;

+

+/**

+ * The enumeration of execution modes of a pattern variable.

+ */

+public enum ExecutionMode {

+	/**

+     * Only a single value for a given variable has to be found.

+	 */

+	SINGLE_RESULT,

+	/**

+     * All possible values for a given variable must be found.

+	 */

+	MULTIPLE_RESULTS

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/IMatching.java b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/IMatching.java
new file mode 100644
index 0000000..dc74239
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/IMatching.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher;

+

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;

+

+/*

+ * TODO The interpreted engine uses the following mappings:

+ * VariableType => PatternVariable

+ * ValueType    => AnyModelElement

+ */

+

+/**

+ * The matching interface. A matching consists of bindings of pattern variables 

+ * to model elements.

+ * 

+ * @author Gergely Varro

+ */

+public interface IMatching {

+

+    /**

+     * Returns the model element to which this matching binds the specified 

+     * variable.

+     * @param variable  variable whose associated model element is to be 

+     * returned.

+     * @return  the model element to which this matching binds the specified

+     * key.

+     * @throws NullPointerException if the variable is <code>null</code>.

+     */

+	public Object lookup(Variable variable);

+    

+    public Object lookup(int position);

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/ParameterMode.java b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/ParameterMode.java
new file mode 100644
index 0000000..3b1df85
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/ParameterMode.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher;

+

+public enum ParameterMode {

+	/**

+     * The pattern variable is an input parameter.

+	 */

+	INPUT,

+	/**

+     * The pattern variable is an output parameter.

+	 */

+	OUTPUT

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/PatternCallSignature.java b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/PatternCallSignature.java
new file mode 100644
index 0000000..ed2884e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/PatternCallSignature.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher;

+

+

+/**

+ * A PatternSignature identifies the run-time settings of

+ * a given (interface) variable. Settings include (i) a 

+ * parameter mode (INPUT/OUTPUT), which defines whether 

+ * the variable has been fixed by the caller, (ii) an 

+ * execution mode, which specifies the cardinality of values 

+ * (SINGLE_RESULT/MULTIPLE_RESULTS) to which the variable 

+ * must be fixed, and (iii) a parameter scope (IN/BELOW).

+ */

+public class PatternCallSignature {

+	private ParameterMode parameterMode;

+	private ExecutionMode executionMode;

+	private Scope parameterScope;

+    

+    public ParameterMode getParameterMode() {

+        return parameterMode;

+    }

+    

+    public ExecutionMode getExecutionMode() {

+        return executionMode;

+    }

+    

+    

+	public Scope getParameterScope() {

+		return parameterScope;

+	}

+

+	public void setParameterScope(Scope parameterScope) {

+		this.parameterScope = parameterScope;

+	}

+

+	public void setExecutionMode(ExecutionMode executionMode) {

+		this.executionMode = executionMode;

+	}

+

+	public void setParameterMode(ParameterMode parameterMode) {

+		this.parameterMode = parameterMode;

+	}

+	

+	/** Clones the PatternCallSignature, have to take into consideration that the Scope parameter is not scoped

+	 * 

+	 **/

+	public PatternCallSignature clone()

+	{

+		PatternCallSignature clone = new PatternCallSignature();

+		clone.setParameterMode(parameterMode);

+		clone.setExecutionMode(executionMode);

+		clone.setParameterScope(parameterScope);

+		return clone;

+		

+		

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/PatternMatcherParameters.java b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/PatternMatcherParameters.java
new file mode 100644
index 0000000..2bdb857
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/PatternMatcherParameters.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher;

+

+/**

+ * Holds the parameter of a pattern call context,

+ * PatternCallSignature,

+ * 

+ * @author Akos Horvath

+ *

+ */

+public class PatternMatcherParameters {

+	

+	PatternCallSignature[] callSignature;

+	Object[]	inputMapping;

+	Integer[] quantificationOrder;

+

+	/** Pattern invocation context information

+	 * @param signatures PatternCall signature of the invocation

+	 * @param inputMapping The actual value of the input parameters

+	 * @param quantific Quantification order of the input variables

+	 */

+	public PatternMatcherParameters(PatternCallSignature[] signatures, Object[] inputMapping, Integer[] quantific)

+	{	

+		this.inputMapping = inputMapping;

+		this.callSignature = signatures;

+		this.quantificationOrder = quantific;

+	}

+

+	/**

+	 * @return the callSignature

+	 */

+	public PatternCallSignature[] getCallSignature() {

+		return callSignature;

+	}

+

+	/**

+	 * @param callSignature the callSignature to set

+	 */

+	public void setCallSignature(PatternCallSignature[] callSignature) {

+		this.callSignature = callSignature;

+	}

+

+	/**

+	 * @return the inputMapping

+	 */

+	public Object[] getInputMapping() {

+		return inputMapping;

+	}

+

+	/**

+	 * @param inputMapping the inputMapping to set

+	 */

+	public void setInputMapping(Object[] inputMapping) {

+		this.inputMapping = inputMapping;

+	}

+

+	/**

+	 * @return the quantificationOrder

+	 */

+	public Integer[] getQuantificationOrder() {

+		return quantificationOrder;

+	}

+

+	/**

+	 * @param quantificationOrder the quantificationOrder to set

+	 */

+	public void setQuantificationOrder(Integer[] quantificationOrder) {

+		this.quantificationOrder = quantificationOrder;

+	}

+

+	

+

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/Scope.java b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/Scope.java
new file mode 100644
index 0000000..75df4eb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/Scope.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.patternmatcher;

+

+import org.eclipse.viatra2.core.IModelElement;

+

+/**

+ * The enumeration of scopes.

+ */

+public class Scope {

+    //TODO: have to change it to EdgeType!! (in this case the ChuiEdmonds needed to be overviewed

+	public static Integer BELOW = 1;

+    public static Integer IN = 0;

+

+    public static Integer DEFAULT_MODE = BELOW;

+    public static IModelElement DEFAULT_PARENT; // = root;

+

+    private int containmentMode;

+    protected IModelElement parent;

+

+    public Scope() {

+        this(DEFAULT_MODE, DEFAULT_PARENT);

+    }

+    

+    public Scope(Integer mode, IModelElement parent) {

+        this.containmentMode = (mode == null ? DEFAULT_MODE : mode);

+        this.parent = (parent == null ? DEFAULT_PARENT : parent);

+    }

+    

+    public Integer getContainmentMode() {

+        return containmentMode;

+    }

+    

+    public IModelElement getParent() {

+        return parent;

+    }
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + containmentMode;
+		result = prime * result + ((parent == null) ? 0 : parent.hashCode());
+		return result;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		Scope other = (Scope) obj;
+		if (containmentMode != other.containmentMode)
+			return false;
+		if (parent == null) {
+			if (other.parent != null)
+				return false;
+		} else if (!parent.equals(other.parent))
+			return false;
+		return true;
+	}
+    
+    

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/exceptions/PatternMatcherCompileTimeException.java b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/exceptions/PatternMatcherCompileTimeException.java
new file mode 100644
index 0000000..77df11d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/exceptions/PatternMatcherCompileTimeException.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.exceptions;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+
+public class PatternMatcherCompileTimeException extends PatternMatcherException {
+	private static final long serialVersionUID = -3332378474994166891L;
+
+	public PatternMatcherCompileTimeException(String msg, String[] values, AnnotatedElement element) {
+		super(msg, values, element);
+	}
+	
+	public PatternMatcherCompileTimeException(String msg, String[] values, AnnotatedElement element, Throwable cause) {
+		super(msg, values, element, cause);
+	}
+	
+	@Override
+	public PatternMatcherCompileTimeException addNewStackElement(EObject element) {
+	    	if(element != null && element instanceof AnnotatedElement)
+	    		{
+	    		StackTraceElement _ste = createStackTraceElement((AnnotatedElement)element);
+	    		interpreterStackTrace.add(_ste);
+	    		}
+	    	return this;
+	}
+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/exceptions/PatternMatcherException.java b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/exceptions/PatternMatcherException.java
new file mode 100644
index 0000000..ed68b0a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/exceptions/PatternMatcherException.java
@@ -0,0 +1,32 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Akos Horvath, Gergely Varro - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.patternmatcher.exceptions;

+

+import org.eclipse.viatra2.gtasm.interpreter.exception.GTASMException;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;

+

+

+public abstract class PatternMatcherException extends GTASMException {

+    //public PatternMatcherException(String string) {

+    //	super(string);

+	//}

+	private static final long serialVersionUID = 2203761737660448809L;

+	

+    public PatternMatcherException(String msg, String[] context, AnnotatedElement element) {

+    	super(msg,context);

+		addNewStackElement(element);

+   }    

+    public PatternMatcherException(String msg, String[] context, AnnotatedElement element, Throwable cause) {

+    	super(msg,context,cause);

+		addNewStackElement(element);

+   }

+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/exceptions/PatternMatcherRuntimeException.java b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/exceptions/PatternMatcherRuntimeException.java
new file mode 100644
index 0000000..d70b0a7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/exceptions/PatternMatcherRuntimeException.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Akos Horvath, Gergely Varro - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.exceptions;
+
+import java.util.ArrayList;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.viatra2.gtasm.interpreter.exception.GTASMException;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+
+/**Runtime exception for the pattern matcher
+ * @author Akos Horvath
+ *
+ */
+public class PatternMatcherRuntimeException extends PatternMatcherException {
+   
+	private static final long serialVersionUID = 1232944439371423778L;
+	
+	public PatternMatcherRuntimeException(String msg, String[] context, AnnotatedElement element) {
+			super(msg, context, element);
+	}
+	
+	public PatternMatcherRuntimeException(ViatraTransformationException e,AnnotatedElement element) {
+		super(e.getMessage(),null,null);
+		if(e instanceof GTASMException)
+			{
+			GTASMException exception = (GTASMException)e;
+			ArrayList<StackTraceElement> trace = new ArrayList<StackTraceElement>(exception.getStackTraceCollection());
+			this.interpreterStackTrace.addAll(trace);
+			}
+	}
+
+	@Override
+	public PatternMatcherRuntimeException addNewStackElement(EObject element) {
+	    	if(element != null && element instanceof AnnotatedElement)
+	    		{
+	    		StackTraceElement _ste = createStackTraceElement((AnnotatedElement)element);
+	    		interpreterStackTrace.add(_ste);
+	    		}
+	    	return this;
+	}
+}

diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/extension/IGTRuleMatcherFactory.java b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/extension/IGTRuleMatcherFactory.java
new file mode 100644
index 0000000..d5ae895
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/extension/IGTRuleMatcherFactory.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.extension;
+
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.patternmatcher.PatternMatcherParameters;
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IGTRuleMatcher;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;
+
+
+/**
+ * The org.eclipse.viatra2.gtasm.patternmatcher.extension point for the GT matcher
+ * 
+ * @author Akos Horvath
+ * 
+ */
+public interface IGTRuleMatcherFactory {
+
+	/**
+	 * Returns a GT rule matcher to work with
+	 * 
+	 * @param gtEnviroment
+	 *            The execution environment on which the TERMs are evaluated
+	 * @param gtRule
+	 *            The invoked GT rule
+	 * @param mp
+	 *            The invocation context of the GT rule
+	 * @return a gt rule matcher for the gtRule
+	 * @throws ViatraTransformationException
+	 */
+	public IGTRuleMatcher getGTMatcher(IExecutionEnvironment gtEnviroment,
+			GTRule gtRule, PatternMatcherParameters mp)
+			throws ViatraTransformationException;
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/extension/IPatternMatcherFactory.java b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/extension/IPatternMatcherFactory.java
new file mode 100644
index 0000000..3bf6fa3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/extension/IPatternMatcherFactory.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.extension;
+
+
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.patternmatcher.patterns.IPatternMatcher;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+
+/**
+ * Extension point for the pattern matcher
+ * 
+ * @author Akos Horvath
+ * 
+ */
+public interface IPatternMatcherFactory {
+
+	/**
+	 * Returns a pattern matcher for the input GTPattern
+	 * 
+	 * @param env
+	 *            the execution environment representing the context
+	 * @param pattern
+	 *            The patter for which the matcher is created
+	 * @return IPatternMatcher
+	 * @throws ViatraTransformationException
+	 */
+	public IPatternMatcher getPatternMatcher(IExecutionEnvironment env,
+			GTPattern pattern) throws ViatraTransformationException;
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/extension/ViatraGTASMPatternMatcherPlugin.java b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/extension/ViatraGTASMPatternMatcherPlugin.java
new file mode 100644
index 0000000..61c9bae
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/extension/ViatraGTASMPatternMatcherPlugin.java
@@ -0,0 +1,205 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.extension;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ * 
+ * @author Akos Horvath
+ */
+public class ViatraGTASMPatternMatcherPlugin extends Plugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.eclipse.viatra2.gtasm.interpreter";
+	// Extension points
+	public static final String PATTERN_MATCHER_EXT_ID = "org.eclipse.viatra2.gtasm.patternmatcher.patternmatcher";
+	public static final String GT_MATCHER_EXT_ID = "org.eclipse.viatra2.gtasm.patternmatcher.gtrulematcher";
+	// Pattern IDs
+	public static final String INCREMENTAL_PM_FACTORY_ID = "org.eclipse.viatra2.patternmatcher.incremental_rete";
+	//public static final String INCREMENTAL_PARALLEL_PM_FACTORY_ID = "org.eclipse.viatra2.patternmatcher.incremental_rete_parallel";
+	public static final String LOCAL_PM_FACTORY_ID = "org.eclipse.viatra2.patternmatcher.local_search";
+	public static final String DEFAULT_PM_FACTORY_ID = LOCAL_PM_FACTORY_ID;
+	// public static final String DEFAULT_PM_FACTORY_ID =
+	// INCREMENTAL_PM_FACTORY_ID;
+	// GT rule ID-s
+	public static final String LOCAL_GT_FACTORY_ID = "org.eclipse.viatra2.gtmatcher.local_search";
+//	public static final String ALTERNATIVE_PATTERN_MATCHER_FOR_GT_FACTORY_ID = "org.eclipse.viatra2.gtmatcher.alternative";
+	public static final String DEFAULT_GT_FACTORY_ID = LOCAL_GT_FACTORY_ID;
+
+	// The shared instance
+	private static ViatraGTASMPatternMatcherPlugin plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public ViatraGTASMPatternMatcherPlugin() {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	@Override
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	@Override
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance
+	 * 
+	 * @return the shared instance
+	 */
+	public static ViatraGTASMPatternMatcherPlugin getDefault() {
+		return plugin;
+	}
+
+	/** PATTERN MATCHER FACTORIES */
+	private Map<String, IPatternMatcherFactory> patternMatcherFactories;
+
+	public Map<String, IPatternMatcherFactory> getPatternMatcherFactories() {
+		if (patternMatcherFactories == null) {
+			patternMatcherFactories = initPatternMatcherFactories();
+		}
+		return patternMatcherFactories;
+	}
+	
+	/** PATTERN MATCHER IDS INDEXED BY ANNOTATION NAME */
+	private Map<String, String> patternMatcherIDbyAnnotationName;
+	
+	public Map<String, String> getPatternMatcherIDbyAnnotationName() {
+		if (patternMatcherIDbyAnnotationName == null) {
+			initPatternMatcherFactories();
+		}
+		return patternMatcherIDbyAnnotationName;
+	}
+
+	/**
+	 * Returns the pattern matcher registered with the input id
+	 * 
+	 * @param id
+	 *            The id of the registered patternMatcher plugin id
+	 * @return the IPatternMatcherFactory for the patternMatcher
+	 */
+	public IPatternMatcherFactory getPatternMatcherFactory(String id) {
+		if (patternMatcherFactories == null) {
+			patternMatcherFactories = initPatternMatcherFactories();
+		}
+		return patternMatcherFactories.containsKey(id) ? patternMatcherFactories
+				.get(id)
+				: patternMatcherFactories.get(DEFAULT_PM_FACTORY_ID);
+	}
+
+	private Map<String, IPatternMatcherFactory> initPatternMatcherFactories() {
+		IExtensionRegistry reg = Platform.getExtensionRegistry();
+		IExtensionPoint poi = reg.getExtensionPoint(PATTERN_MATCHER_EXT_ID);
+		HashMap<String, IPatternMatcherFactory> r = new HashMap<String, IPatternMatcherFactory>();
+		Map<String, String> annotMap = new HashMap<String, String>();
+
+		if (poi == null)
+			return r;
+		IExtension[] exts = poi.getExtensions();
+		for (int i = 0; i < exts.length; i++) {
+			IConfigurationElement[] el = exts[i].getConfigurationElements();
+			for (int j = 0; j < el.length; j++) {
+				try {
+					Object o = el[j].createExecutableExtension("class");
+					if (o instanceof IPatternMatcherFactory) {
+						String id = el[j].getAttribute("id");
+						r.put(id, (IPatternMatcherFactory) o);
+						
+						String annotationName = el[j].getAttribute("annotation_name");
+						annotMap.put(annotationName, id);
+					}
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+			}
+		}
+		patternMatcherIDbyAnnotationName = Collections.unmodifiableMap(annotMap);		
+		return r;
+	}
+
+	/** GT MATCHER FACTORIES */
+	private Map<String, IGTRuleMatcherFactory> gtMatcherFactories;
+
+	public Map<String, IGTRuleMatcherFactory> getgtMatcherFactories() {
+		if (gtMatcherFactories == null) {
+			gtMatcherFactories = initgtMatcherFactories();
+		}
+		return gtMatcherFactories;
+	}
+
+	/**
+	 * Returns the gt matcher registered with the input id
+	 * 
+	 * @param id
+	 *            The id of the registered patternMatcher plugin id
+	 * @return the IPatternMatcherFactory for the patternMatcher
+	 */
+	public IGTRuleMatcherFactory getGTMatcherFactory(String id) {
+		if (gtMatcherFactories == null) {
+			gtMatcherFactories = initgtMatcherFactories();
+		}
+		return gtMatcherFactories.containsKey(id) ? gtMatcherFactories.get(id)
+				: gtMatcherFactories.get(DEFAULT_GT_FACTORY_ID);
+	}
+
+	private Map<String, IGTRuleMatcherFactory> initgtMatcherFactories() {
+		IExtensionRegistry reg = Platform.getExtensionRegistry();
+		IExtensionPoint poi = reg.getExtensionPoint(GT_MATCHER_EXT_ID);
+		HashMap<String, IGTRuleMatcherFactory> r = new HashMap<String, IGTRuleMatcherFactory>();
+		if (poi == null)
+			return r;
+		IExtension[] exts = poi.getExtensions();
+		for (int i = 0; i < exts.length; i++) {
+			IConfigurationElement[] el = exts[i].getConfigurationElements();
+			for (int j = 0; j < el.length; j++) {
+				try {
+					Object o = el[j].createExecutableExtension("class");
+					if (o instanceof IGTRuleMatcherFactory) {
+						String id = el[j].getAttribute("id");
+						r.put(id, (IGTRuleMatcherFactory) o);
+					}
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+			}
+		}
+		return r;
+	}
+	
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/patterns/IGTRuleMatcher.java b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/patterns/IGTRuleMatcher.java
new file mode 100644
index 0000000..be6c89e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/patterns/IGTRuleMatcher.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.patterns;
+
+import java.util.Collection;
+
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.patternmatcher.IMatching;
+import org.eclipse.viatra2.gtasm.patternmatcher.PatternCallSignature;
+
+
+/**
+ * The runtime representation of a GT rule, which can execute gt rule
+ * application in an interpreted way. This interface is used by the ASM
+ * interpreter for performing gt rule application.
+ * 
+ * @author Gergely Varro, Akos Horvath
+ */
+public interface IGTRuleMatcher {
+
+	/**
+	 * Initialize the gtRule matcher with the actual invocation context
+	 * 
+	 * @param actualEnviroment
+	 *            the Execution environment of the gt rule
+	 * @throws ViatraTransformationException
+	 */
+	public void initGTRule(IExecutionEnvironment actualEnviroment)
+			throws ViatraTransformationException;
+
+	/**
+	 * Returns the parameters of the rule after applying the rule.
+	 * 
+	 * @param symSignatures
+	 *            The additional (e.g., containment) constraints of the input
+	 *            parameters
+	 * @param symInputMapping
+	 *            The values of the input parameter mapping
+	 * @return the values of the gt rule's parameters
+	 * @throws ViatraTransformationException
+	 */
+	public Object[] match(PatternCallSignature[] symSignatures,
+			Object[] symInputMapping) throws ViatraTransformationException;
+
+	/**
+	 * Returns all valid matchings of the LHS of the gt rule
+	 * 
+	 * @param symSignatures
+	 *            The additional (e.g., containment) constraints of the input
+	 *            parameters
+	 * @param symInputMapping
+	 *            The values of the input parameter mapping
+	 * @param quantificationOrder
+	 * @return The collection of the matchings
+	 * @throws ViatraTransformationException
+	 */
+	public Collection<IMatching> initMatchAll(
+			PatternCallSignature[] symSignatures, Object[] symInputMapping,
+			Integer[] quantificationOrder) throws ViatraTransformationException;
+
+	/**
+	 * Returns the parameters of the rule after applying the rule once!
+	 * 
+	 * @param LHSMatching
+	 *            one matching of the LHS side
+	 * @param symSignatures
+	 *            The additional (e.g., containment) constraints of the input
+	 *            parameters
+	 * @param symInputMapping
+	 *            The values of the input parameter mapping
+	 * @return the values of the gt rule's parameters
+	 * @throws ViatraTransformationException
+	 */
+	public Object[] matchAll(IMatching LHSMatching,
+			PatternCallSignature[] symSignatures, Object[] symInputMapping)
+			throws ViatraTransformationException;
+
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/patterns/IPatternMatcher.java b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/patterns/IPatternMatcher.java
new file mode 100644
index 0000000..ddff353
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/patterns/IPatternMatcher.java
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.patterns;
+
+import java.util.Collection;
+
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.patternmatcher.IMatching;
+import org.eclipse.viatra2.gtasm.patternmatcher.PatternCallSignature;
+
+
+/*
+ * TODO The interpreted engine uses the following mappings: VariableType =>
+ * PatternVariable ValueType => AnyModelElement
+ */
+
+/**
+ * The runtime representation of a pattern, which can execute pattern matching
+ * in interpreted mode. This interface is used by the ASM interpreter for
+ * performing pattern matching.
+ * 
+ * @author Gergely Varro
+ */
+public interface IPatternMatcher {
+	/**
+	 * Returns <code>true</code> if this pattern matcher is able to find a
+	 * matching for the pattern it represents by taking into account all the
+	 * initial mapping and pattern scope restrictions.
+	 * 
+	 * @param inputMapping
+	 *            the array of model elements that constitute the input mapping.
+	 *            The position of a binding for a given pattern variable is
+	 *            defined by the position of the same pattern variable in the
+	 *            pattern declaration.
+	 * @return <code>true</code> if this pattern matcher is able to find a
+	 *         matching for the pattern it represents.
+	 * @throws ViatraTransformationException 
+	 */
+	public boolean match(Object[] inputMapping)
+			throws ViatraTransformationException;
+
+	/*
+	 * TODO If any of the variables is called in forall mode an exception is
+	 * thrown.
+	 */
+	/**
+	 * Returns a matching being found by this pattern matcher by using the
+	 * invocation mode specified by the pattern call signature during the
+	 * execution and by taking into account all the initial mapping and pattern
+	 * scope restrictions.
+	 * 
+	 * @param inputMapping
+	 *            the array of model elements that constitute the input mapping.
+	 *            The position of a binding for a given pattern variable is
+	 *            defined by the position of the same pattern variable in the
+	 *            pattern declaration.
+	 * @param signature
+	 *            the array of variable signatures. The order of signatures
+	 *            should be the same as the order of pattern variables in the
+	 *            pattern declaration from which this pattern matcher has been
+	 *            derived.
+	 * @return the matching that has been found by this pattern matcher.
+	 * @throws ViatraTransformationException 
+	 */
+	public IMatching match(Object[] inputMapping,
+			PatternCallSignature[] signature) throws ViatraTransformationException;
+	/*
+	 * TODO If any of the variables is called in forall mode an exception is
+	 * thrown.
+	 */
+	/**
+	 * Returns a matching being found by this pattern matcher by using the
+	 * invocation mode specified by the pattern call signature during the
+	 * execution and by taking into account all the initial mapping and pattern
+	 * scope restrictions.
+	 * 
+	 * In case of multiple pattern matchings, true pseudorandom choice is mandatory.
+	 * 
+	 * @param inputMapping
+	 *            the array of model elements that constitute the input mapping.
+	 *            The position of a binding for a given pattern variable is
+	 *            defined by the position of the same pattern variable in the
+	 *            pattern declaration.
+	 * @param signature
+	 *            the array of variable signatures. The order of signatures
+	 *            should be the same as the order of pattern variables in the
+	 *            pattern declaration from which this pattern matcher has been
+	 *            derived.
+	 * @return the matching that has been found by this pattern matcher.
+	 * @throws ViatraTransformationException 
+	 */
+	public IMatching matchRandomly(Object[] inputMapping,
+			PatternCallSignature[] signature) throws ViatraTransformationException;
+	
+	/**
+	 * Returns the collection of matchings being found by this pattern matcher
+	 * by using the invocation mode specified by the pattern call signature
+	 * during the execution and by taking into account all the initial mapping
+	 * and pattern scope restrictions.
+	 * 
+	 * @param inputMapping
+	 *            the array of model elements that constitute the input mapping.
+	 *            The position of a binding for a given pattern variable is
+	 *            defined by the position of the same pattern variable in the
+	 *            pattern declaration from which this pattern matcher has been
+	 *            derived.
+	 * @param signature
+	 *            the array of variable signatures. The order of signatures
+	 *            should be the same as the order of pattern variables in the
+	 *            pattern declaration from which this pattern matcher has been
+	 *            derived.
+	 * @param quantificationOrder
+	 * @return the collection of matchings that have been found by this pattern
+	 *         matcher.
+	 * @throws ViatraTransformationException 
+	 */
+	public Collection<IMatching> matchAll(Object[] inputMapping,
+			PatternCallSignature[] signature, Integer[] quantificationOrder)
+			throws ViatraTransformationException;
+}
diff --git a/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/patterns/PatternMatcherProvider.java b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/patterns/PatternMatcherProvider.java
new file mode 100644
index 0000000..2647194
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.patternmatcher/src/org/eclipse/viatra2/gtasm/patternmatcher/patterns/PatternMatcherProvider.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.patternmatcher.patterns;
+
+
+import java.util.Map;
+
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.patternmatcher.PatternMatcherParameters;
+import org.eclipse.viatra2.gtasm.patternmatcher.extension.ViatraGTASMPatternMatcherPlugin;
+import org.eclipse.viatra2.gtasm.support.helper.GTASMHelper;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;
+
+
+public class PatternMatcherProvider {
+
+	private static PatternMatcherProvider _instance = new PatternMatcherProvider();
+	private static String patternMathcerIDToUse = ViatraGTASMPatternMatcherPlugin.DEFAULT_PM_FACTORY_ID;
+	private static String gtRuleMathcerIDToUse = ViatraGTASMPatternMatcherPlugin.DEFAULT_GT_FACTORY_ID;
+
+	public static PatternMatcherProvider getInstance() {
+		return _instance;
+	}
+
+	public static void setPatternMatcherIDToUse(String id) {
+		patternMathcerIDToUse = id;
+	}
+
+	public static String getPatternMatcherIDToUse() {
+		return patternMathcerIDToUse;
+	}
+
+	public static String getGTRuleMathcerIDToUse() {
+		return gtRuleMathcerIDToUse;
+	}
+
+	public static void setGTRuleMathcerIDToUse(String ruleMathcerIDToUse) {
+		gtRuleMathcerIDToUse = ruleMathcerIDToUse;
+	}
+
+	/**
+	 * Returns a pattern matcher to work with
+	 *
+	 * @param executionEnvironment
+	 *            the execution environment of the invocation context
+	 * @param gtPattern
+	 *            the invoked pattern
+	 * @return a patternMatcher for the pattern
+	 * @throws ViatraTransformationException
+	 */
+	public IPatternMatcher getPatternMatcher(
+			IExecutionEnvironment executionEnvironment, GTPattern gtPattern)
+			throws ViatraTransformationException {
+		Map<String, String> patternMatcherIDbyAnnotationName = 
+			ViatraGTASMPatternMatcherPlugin.getDefault().getPatternMatcherIDbyAnnotationName();
+		for (Map.Entry<String, String> entry : patternMatcherIDbyAnnotationName.entrySet()) {
+			Map<String, String> runtimeAnnotation = 
+				GTASMHelper.extractLowerCaseRuntimeAnnotation(gtPattern, "@" + entry.getKey());
+			if (runtimeAnnotation != null) {
+				return ViatraGTASMPatternMatcherPlugin.getDefault()
+						.getPatternMatcherFactory(entry.getValue())
+						.getPatternMatcher(executionEnvironment, gtPattern);
+			}
+		}
+		return ViatraGTASMPatternMatcherPlugin.getDefault()
+				.getPatternMatcherFactory(patternMathcerIDToUse)
+				.getPatternMatcher(executionEnvironment, gtPattern);
+	}
+
+	/**
+	 * Returns a GT rule matcher to work with
+	 *
+	 * @param gtEnviroment
+	 *            The execution environment on which the TERMs are evaluated
+	 * @param gtRule
+	 *            The invoked GT rule
+	 * @param mp
+	 *            The invocation context of the GT rule
+	 * @return a GT rule matcher for the rule
+	 * @throws ViatraTransformationException
+	 */
+	public IGTRuleMatcher getGtRuleMatcher(IExecutionEnvironment gtEnviroment,
+			GTRule gtRule, PatternMatcherParameters mp)
+			throws ViatraTransformationException {
+		return ViatraGTASMPatternMatcherPlugin
+				.getDefault()
+				.getGTMatcherFactory(
+						ViatraGTASMPatternMatcherPlugin.DEFAULT_GT_FACTORY_ID)
+				.getGTMatcher(gtEnviroment, gtRule, mp);
+	}
+
+	/**
+	 *  Sets the pattern matcher provider to the default pattern and GT matcher
+	 */
+	public static void resetPatternMatcher() {
+		setPatternMatcherIDToUse(ViatraGTASMPatternMatcherPlugin.DEFAULT_PM_FACTORY_ID);
+		setGTRuleMathcerIDToUse(ViatraGTASMPatternMatcherPlugin.DEFAULT_GT_FACTORY_ID);
+	}
+}
diff --git a/org.eclipse.viatra2.gtasm.support/.classpath b/org.eclipse.viatra2.gtasm.support/.classpath
new file mode 100644
index 0000000..8a8f166
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.support/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<classpath>

+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>

+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>

+	<classpathentry kind="src" path="src"/>

+	<classpathentry kind="output" path="bin"/>

+</classpath>

diff --git a/org.eclipse.viatra2.gtasm.support/.project b/org.eclipse.viatra2.gtasm.support/.project
new file mode 100644
index 0000000..05a07cb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.support/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<projectDescription>

+	<name>org.eclipse.viatra2.gtasm.support</name>

+	<comment></comment>

+	<projects>

+	</projects>

+	<buildSpec>

+		<buildCommand>

+			<name>org.eclipse.jdt.core.javabuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+		<buildCommand>

+			<name>org.eclipse.pde.ManifestBuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+		<buildCommand>

+			<name>org.eclipse.pde.SchemaBuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+	</buildSpec>

+	<natures>

+		<nature>org.eclipse.pde.PluginNature</nature>

+		<nature>org.eclipse.jdt.core.javanature</nature>

+	</natures>

+</projectDescription>

diff --git a/org.eclipse.viatra2.gtasm.support/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra2.gtasm.support/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..b7be632
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.support/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Thu Sep 23 16:34:30 CEST 2010

+eclipse.preferences.version=1

+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled

+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6

+org.eclipse.jdt.core.compiler.compliance=1.6

+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error

+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error

+org.eclipse.jdt.core.compiler.source=1.6

diff --git a/org.eclipse.viatra2.gtasm.support/META-INF/MANIFEST.MF b/org.eclipse.viatra2.gtasm.support/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..13ee02b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.support/META-INF/MANIFEST.MF
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: VIATRA2 R3 GTASM Support
+Bundle-SymbolicName: org.eclipse.viatra2.gtasm.support
+Bundle-Version: 3.3.0.qualifier
+Bundle-Activator: org.eclipse.viatra2.gtasm.support.Activator
+Bundle-Vendor: BUTE-FTSRG
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.viatra2.gtasm.model;bundle-version="3.2.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.viatra2.gtasm.support.helper
diff --git a/org.eclipse.viatra2.gtasm.support/build.properties b/org.eclipse.viatra2.gtasm.support/build.properties
new file mode 100644
index 0000000..41eb6ad
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.support/build.properties
@@ -0,0 +1,4 @@
+source.. = src/

+output.. = bin/

+bin.includes = META-INF/,\

+               .

diff --git a/org.eclipse.viatra2.gtasm.support/src/org/eclipse/viatra2/gtasm/support/Activator.java b/org.eclipse.viatra2.gtasm.support/src/org/eclipse/viatra2/gtasm/support/Activator.java
new file mode 100644
index 0000000..03f6f69
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.support/src/org/eclipse/viatra2/gtasm/support/Activator.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2010, Gabor Bergmann
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.support;

+

+import org.osgi.framework.BundleActivator;

+import org.osgi.framework.BundleContext;

+

+public class Activator implements BundleActivator {

+

+	private static BundleContext context;

+

+	static BundleContext getContext() {

+		return context;

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)

+	 */

+	public void start(BundleContext bundleContext) throws Exception {

+		Activator.context = bundleContext;

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)

+	 */

+	public void stop(BundleContext bundleContext) throws Exception {

+		Activator.context = null;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.support/src/org/eclipse/viatra2/gtasm/support/helper/GTASMHelper.java b/org.eclipse.viatra2.gtasm.support/src/org/eclipse/viatra2/gtasm/support/helper/GTASMHelper.java
new file mode 100644
index 0000000..73d82ef
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.support/src/org/eclipse/viatra2/gtasm/support/helper/GTASMHelper.java
@@ -0,0 +1,166 @@
+/*******************************************************************************

+ * Copyright (c) 2004-2010 Gabor Bergmann and Daniel Varro

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Gabor Bergmann - initial API and implementation

+ *******************************************************************************/

+

+package org.eclipse.viatra2.gtasm.support.helper;

+

+import java.util.ArrayList;

+import java.util.HashMap;

+import java.util.List;

+import java.util.Map;

+

+import org.eclipse.emf.common.util.EList;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;

+

+/**

+ * @author Bergmann Gábor

+ *

+ */

+public class GTASMHelper {

+	/**

+	 * An annotation identifier to return the location in a human readable format (row/column numbers)

+	 */

+	public static final String NODE_INFORMATION = "node_info";

+	/**

+	 * An annotation identifier to return the location in a processable format (start/end offsets)

+	 */

+	public static final String NODE_OFFSET = "node_offset";

+	

+	/**

+	 * Finds whether a given GTASM element has an annotation with the given name (case insensitive).

+	 * If yes, provides a key-value map from the annotation elements, with the keys in lower case.

+	 * Null as a return value indicates that the annotation is missing.

+	 * An empty map indicates that the annotation is present, but without key-value elements.

+	 * @param element GTASM element to extract annotations from

+	 * @param annotationName an annotation name to extract (<strong>case insensitive</strong>, but must start with '@')

+	 * @return a map of key-value pairs (with <strong>lower case keys</strong>) of the annotation of the given name if it exists, or null if no such annotation exists

+	 */

+	public static Map<String, String> extractLowerCaseRuntimeAnnotation(GTASMElement element, String annotationName) {

+		for (RuntimeAnnotation annotation : element.getRuntimeAnnotations()) {

+			if (annotation.getAnnotationName().toLowerCase().equals(annotationName.toLowerCase())) {

+				return processAnnotationParameters(annotation);

+			}

+		}

+		return null;

+	}

+	/**

+	 * Provides a key-value map from the annotation elements, with the keys in lower case.

+	 * An empty map indicates that the annotation is present, but without key-value elements.

+	 * @param annotation annotation to extract parameters from

+	 * @return a map of key-value pairs (with <strong>lower case keys</strong>) of the annotation

+	 */

+	public static Map<String, String> processAnnotationParameters(RuntimeAnnotation annotation) {

+		Map<String, String> result = new HashMap<String, String>();

+		for (RuntimeAnnotationElement annotationElement : annotation.getElements()) {

+			result.put(annotationElement.getKey().toLowerCase(), annotationElement.getValue());

+		}

+		return result;

+	}

+	/**

+	 * Finds whether a given GTASM element has annotations with the given name (case insensitive).

+	 * If yes, provides a list of annotation elements.

+	 * An empty list indicates that the annotation is missing.

+	 * @param element GTASM element to extract annotations from

+	 * @param annotationName an annotation name to extract (<strong>case insensitive</strong>, but must start with '@')

+	 * @return a list of annotations of the given name if they exist, or empty list if no such annotation exists

+	 */

+	public static List<RuntimeAnnotation> extractLowerCaseRuntimeAnnotations(GTASMElement element, String annotationName) {

+		List<RuntimeAnnotation> annotations = new ArrayList<RuntimeAnnotation>();

+		for (RuntimeAnnotation annotation : element.getRuntimeAnnotations()) {

+			if (annotation.getAnnotationName().toLowerCase().equals(annotationName.toLowerCase())) {

+				annotations.add(annotation);

+			}

+		}

+		return annotations;

+	}

+	

+	/**

+	 * Finds the GTASM annotation with the given key (case insensitive) for a given Annotated element.

+	 * Not to be confused with RuntimeAnnotations, see {@link #extractLowerCaseRuntimeAnnotation(GTASMElement, String)}.

+	 * @param element GTASM element to extract annotations from

+	 * @param annotationKey the string key of the annotation (<strong>case insensitive</strong>)

+	 * @return the annotation value if it is present, or an empty string if no such annotation exists

+	 */

+	public static String extractAnnotation(AnnotatedElement element, String annotationKey) {

+		for (Annotation annotation : element.getAnnotations()) {

+			if (annotation.getKey().toLowerCase().equals(annotationKey.toLowerCase())) {

+				return annotation.getValue();

+			}

+		}

+		return "";

+	}

+

+	/**

+	 * Selects a pattern from a machine by name

+	 * @param machine

+	 * @param name

+	 * @return the found pattern, or null, if no pattern is available

+	 */

+	public static GTPattern getPatternByName(Machine machine, String name) {

+		EList<GTPattern> patterns = machine.getGtPatternDefinitions();

+

+        for (GTPattern pattern: patterns)

+        {

+            if (pattern.getName().equals(name))

+                return pattern;

+        }

+        return null;

+	}

+

+	/**

+	 * Selects a GT rule from a machine by name

+	 * @param machine

+	 * @param name

+	 * @return the found GT rule, or null, if the rule is not available

+	 */

+	public static GTRule getGTRuleByName(Machine machine, String name) {

+		EList<GTRule> rules = machine.getGtRuleDefinitions();

+		for (GTRule rule : rules) {

+			if (rule.getName().equals(name)) {

+				return rule;

+			}

+		}

+		return null;

+	}

+

+	/**

+	 * Selects an ASM rule from a machine by name

+	 * @param machine

+	 * @param name

+	 * @return the found ASM rule, or null, if the rule is not available

+	 */

+	public static Rule getASMRuleByName(Machine machine, String name) {

+		EList<Rule> rules = machine.getAsmRuleDefinitions();

+		for (Rule rule : rules) {

+			if (rule.getName().equals(name)) {

+				return rule;

+			}

+		}

+		return null;

+	}

+	

+	/**

+	 * Returns the location of a GTASM element in a startoffset:endoffset format. Used by various textual representations.

+	 * @param element

+	 * @return the location object of the selected model element

+	 */

+	public static LocationOffset getLocation(AnnotatedElement element) {

+		String offsetStr = GTASMHelper.extractAnnotation(element, GTASMHelper.NODE_OFFSET);

+		return new LocationOffset(offsetStr);

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.support/src/org/eclipse/viatra2/gtasm/support/helper/LocationOffset.java b/org.eclipse.viatra2.gtasm.support/src/org/eclipse/viatra2/gtasm/support/helper/LocationOffset.java
new file mode 100644
index 0000000..558afcf
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.support/src/org/eclipse/viatra2/gtasm/support/helper/LocationOffset.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2012, Gabor Bergmann
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Gabor Bergmann - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.support.helper;
+
+import java.util.StringTokenizer;
+
+public class LocationOffset {
+
+	final int startOffset, endOffset;
+
+	/**
+	 * Initializes a location offset from a numeric start- and endoffsets.
+	 * @param startOffset
+	 * @param endOffset
+	 */
+	public LocationOffset(int startOffset, int endOffset) {
+		this.startOffset = startOffset;
+		this.endOffset = endOffset;
+	}
+
+	/**
+	 * Initializes a location offset from a string of the format
+	 * "startOffset:endOffset", where both startOffset and endOffset are integer
+	 * numbers.
+	 * @param offsetString
+	 */
+	public LocationOffset(String offsetString) {
+		StringTokenizer tokenizer = new StringTokenizer(offsetString, ":");
+		if (offsetString != "") {
+			startOffset = Integer.parseInt(tokenizer.nextToken());
+			endOffset = Integer.parseInt(tokenizer.nextToken());
+		} else {
+			startOffset = 0;
+			endOffset = 0;
+		}
+	}
+
+	@Override
+	public String toString() {
+		StringBuilder builder = new StringBuilder();
+		builder.append(startOffset);
+		builder.append(":");
+		builder.append(endOffset);
+		return builder.toString();
+	}
+
+	/**
+	 * @return the start offset number
+	 */
+	public int getStartOffset() {
+		return startOffset;
+	}
+
+	/**
+	 * @return the end offset number
+	 */
+	public int getEndOffset() {
+		return endOffset;
+	}
+	
+	/**
+	 * Returns the length of the location offset
+	 * @return the length of the offset
+	 */
+	public int getLength() {
+		return endOffset - startOffset + 1;
+	}
+}
diff --git a/org.eclipse.viatra2.gtasm.trigger/.classpath b/org.eclipse.viatra2.gtasm.trigger/.classpath
new file mode 100644
index 0000000..ad32c83
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.viatra2.gtasm.trigger/.project b/org.eclipse.viatra2.gtasm.trigger/.project
new file mode 100644
index 0000000..862eecc
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.viatra2.gtasm.trigger</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.viatra2.gtasm.trigger/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra2.gtasm.trigger/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..40a93d3
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Wed Jan 12 11:22:52 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.6
diff --git a/org.eclipse.viatra2.gtasm.trigger/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.viatra2.gtasm.trigger/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..017c64e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,3 @@
+#Wed Oct 17 17:50:23 CEST 2007
+eclipse.preferences.version=1
+internal.default.compliance=default
diff --git a/org.eclipse.viatra2.gtasm.trigger/META-INF/MANIFEST.MF b/org.eclipse.viatra2.gtasm.trigger/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..8c8daf1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Viatra2 R3 GTASM Trigger Execution Support Plug-in
+Bundle-SymbolicName: org.eclipse.viatra2.gtasm.trigger;singleton:=true
+Bundle-Version: 3.3.0.qualifier
+Bundle-Activator: org.eclipse.viatra2.gtasm.trigger.Activator
+Bundle-Vendor: BUTE-FTSRG / Okros Andras
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.viatra2.core2,
+ org.eclipse.viatra2.gtasm.model,
+ org.eclipse.viatra2.gtasm.interpreter,
+ org.eclipse.viatra2.gtasm.patternmatcher,
+ org.eclipse.viatra2.gui,
+ org.eclipse.ui,
+ org.eclipse.ui.views,
+ org.eclipse.viatra2.gtasm.interpreter.term,
+ org.eclipse.viatra2.gtasm.interpreter.impl,
+ org.eclipse.viatra2.gtasm.patternmatcher.incremental;bundle-version="3.0.0"
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.viatra2.gtasm.trigger,
+ org.eclipse.viatra2.gtasm.trigger.engine,
+ org.eclipse.viatra2.gtasm.trigger.model,
+ org.eclipse.viatra2.gtasm.trigger.natives,
+ org.eclipse.viatra2.gtasm.trigger.view
+Bundle-ClassPath: .
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/org.eclipse.viatra2.gtasm.trigger/about.html b/org.eclipse.viatra2.gtasm.trigger/about.html
new file mode 100644
index 0000000..1262b8c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/about.html
@@ -0,0 +1,28 @@
+<!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>About</title>

+</head>

+<body lang="EN-US">

+<h2>About This Content</h2>

+ 

+<p>July 4th, 2008</p>	

+<h3>License</h3>

+

+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 

+indicated below, the Content 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 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>If you did not receive this Content directly from the Eclipse Foundation, the Content is 

+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may

+apply to your use of any object code in the Content.  Check the Redistributor's license that was 

+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise

+indicated below, the terms and conditions of the EPL still apply to any source code in the Content

+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>

+

+</body>

+</html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gtasm.trigger/build.properties b/org.eclipse.viatra2.gtasm.trigger/build.properties
new file mode 100644
index 0000000..0aefb73
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               icons/
+
+src.includes = icons/
diff --git a/org.eclipse.viatra2.gtasm.trigger/icons/refresh.png b/org.eclipse.viatra2.gtasm.trigger/icons/refresh.png
new file mode 100644
index 0000000..a3884fb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/icons/refresh.png
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.trigger/icons/terminate.png b/org.eclipse.viatra2.gtasm.trigger/icons/terminate.png
new file mode 100644
index 0000000..b8ab069
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/icons/terminate.png
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.trigger/icons/thread_pause.png b/org.eclipse.viatra2.gtasm.trigger/icons/thread_pause.png
new file mode 100644
index 0000000..9cda180
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/icons/thread_pause.png
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.trigger/icons/thread_start.png b/org.eclipse.viatra2.gtasm.trigger/icons/thread_start.png
new file mode 100644
index 0000000..8239a4b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/icons/thread_start.png
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.trigger/icons/trigger_loaded.png b/org.eclipse.viatra2.gtasm.trigger/icons/trigger_loaded.png
new file mode 100644
index 0000000..483b657
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/icons/trigger_loaded.png
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.trigger/icons/trigger_running.png b/org.eclipse.viatra2.gtasm.trigger/icons/trigger_running.png
new file mode 100644
index 0000000..abfd076
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/icons/trigger_running.png
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.trigger/icons/trigger_stopped.png b/org.eclipse.viatra2.gtasm.trigger/icons/trigger_stopped.png
new file mode 100644
index 0000000..88254e1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/icons/trigger_stopped.png
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.trigger/icons/trigger_transparent.png b/org.eclipse.viatra2.gtasm.trigger/icons/trigger_transparent.png
new file mode 100644
index 0000000..570c661
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/icons/trigger_transparent.png
Binary files differ
diff --git a/org.eclipse.viatra2.gtasm.trigger/plugin.xml b/org.eclipse.viatra2.gtasm.trigger/plugin.xml
new file mode 100644
index 0000000..5733c76
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/plugin.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+   <extension
+         point="org.eclipse.viatra2.core2.nativefunction">
+      <function
+            class="org.eclipse.viatra2.gtasm.trigger.natives.StartTriggerFunction"></function>
+      <function
+            class="org.eclipse.viatra2.gtasm.trigger.natives.StopTriggerFunction"></function>
+   </extension>
+   <extension
+         point="org.eclipse.viatra2.gui.content">
+      <content_provider class="org.eclipse.viatra2.gtasm.trigger.view.FrameworkViewExtension"/>
+   </extension>
+
+</plugin>
diff --git a/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/Activator.java b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/Activator.java
new file mode 100644
index 0000000..e338e1a
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/Activator.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Okros, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Okros - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.trigger;

+

+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+

+/**

+ * The activator class controls the plug-in life cycle

+ */

+public class Activator extends AbstractUIPlugin {

+

+	// The plug-in ID

+	public static final String PLUGIN_ID = "org.eclipse.viatra2.gtasm.trigger";

+

+	// The shared instance

+	private static Activator plugin;

+	

+	/**

+	 * The constructor

+	 */

+	public Activator() {

+		plugin = this;

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)

+	 */

+	@Override
+	public void start(BundleContext context) throws Exception {

+		super.start(context);

+	}

+

+	/*

+	 * (non-Javadoc)

+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)

+	 */

+	@Override
+	public void stop(BundleContext context) throws Exception {

+		plugin = null;

+		super.stop(context);

+	}

+

+	/**

+	 * Returns the shared instance

+	 *

+	 * @return the shared instance

+	 */

+	public static Activator getDefault() {

+		return plugin;

+	}

+

+	/**

+	 * Returns an image descriptor for the image file at the given

+	 * plug-in relative path

+	 *

+	 * @param path the path

+	 * @return the image descriptor

+	 */

+	public static ImageDescriptor getImageDescriptor(String path) {

+		return imageDescriptorFromPlugin(PLUGIN_ID, path);

+	}

+}

diff --git a/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/engine/ITriggerSetChangedListener.java b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/engine/ITriggerSetChangedListener.java
new file mode 100644
index 0000000..428b397
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/engine/ITriggerSetChangedListener.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Okros, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Okros - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.trigger.engine;

+

+/**

+ * A listener interface for trigger set changes.

+ * Whenever a trigger is loaded or dropped, listeners will be notified. 

+ * @author Andr�s �kr�s

+ */

+public interface ITriggerSetChangedListener {

+

+	public void triggerAdded(Object trigger);

+	public void triggerRemoved(Object trigger);

+	public void triggerRefreshed(Object trigger);

+	

+}

diff --git a/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/engine/TriggerAnnotationObject.java b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/engine/TriggerAnnotationObject.java
new file mode 100644
index 0000000..935d2a1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/engine/TriggerAnnotationObject.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Okros, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Okros - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.trigger.engine;

+

+// TODO ?

+public interface TriggerAnnotationObject {

+

+	public static final String TRIGGER_MODE_ALWAYS="always";

+	public static final String TRIGGER_MODE_ONCE="once";

+	//...

+

+}

diff --git a/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/engine/TriggerEngineManager.java b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/engine/TriggerEngineManager.java
new file mode 100644
index 0000000..10b7702
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/engine/TriggerEngineManager.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Okros, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Okros - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.trigger.engine;

+

+import java.util.HashMap;

+import java.util.Map;

+

+import org.eclipse.viatra2.framework.FrameworkManager;

+import org.eclipse.viatra2.framework.IFramework;

+import org.eclipse.viatra2.framework.IFrameworkListChangedListener;

+

+/**

+ * A singleton manager class for managing the framework - trigger execution engine associations.

+ * @author Andr�s �kr�s

+ */

+public class TriggerEngineManager implements IFrameworkListChangedListener

+{

+	

+	private static TriggerEngineManager _instance = new TriggerEngineManager();

+	private Map<IFramework, TriggerExecutionEngine> engines = new HashMap<IFramework, TriggerExecutionEngine>();

+	

+	public static TriggerEngineManager getInstance() {

+		return _instance;

+	}

+	

+	private TriggerEngineManager() 

+	{

+		FrameworkManager.getInstance().addFrameworkListChangedListener(this);

+	}

+	

+	public TriggerExecutionEngine getTriggerEngine(IFramework fw)

+	{

+		if (!engines.containsKey(fw))

+		{

+			TriggerExecutionEngine engine = new TriggerExecutionEngine(fw);

+			engines.put(fw, engine);

+			return engine;

+		} else {

+			TriggerExecutionEngine engine = engines.get(fw);

+			return engine;

+		}

+	}

+

+//	//Framework Listener

+//	public void frameworkAdded(IFramework fw) {

+//		if (!engines.containsKey(fw)) 

+//		{

+//			TriggerExecutionEngine engine = new TriggerExecutionEngine(fw);

+//			engines.put(fw, engine);

+//		}

+//	}

+	

+	//Framework Listener

+	public void frameworkAdded(IFramework f) {

+		

+	}

+	

+	//Framework Listener

+	public void frameworkRemoved(IFramework fw) {

+		if (engines.containsKey(fw)) 

+		{

+			engines.remove(fw);

+		}

+	}

+

+

+		

+}

diff --git a/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/engine/TriggerExecutionEngine.java b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/engine/TriggerExecutionEngine.java
new file mode 100644
index 0000000..7d5f03d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/engine/TriggerExecutionEngine.java
@@ -0,0 +1,549 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Okros, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Okros - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.trigger.engine;

+

+import java.util.HashMap;
+import java.util.HashSet;
+
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.viatra2.core.ICoreNotificationListener;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;
+import org.eclipse.viatra2.core.simple.notification.NotificationObjectTransactionEnd;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.framework.IMachineSetChangedListener;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.ASMFunctionContent;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasm.interpreter.impl.rules.RuleInterpreter;
+import org.eclipse.viatra2.gtasm.interpreter.term.rules.TermEvaluator;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.EngineManager;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.ReteEngine;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.RetePatternMatcher;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.misc.DefaultDeltaMonitor;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.misc.DeltaMonitor;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+import org.eclipse.viatra2.gtasm.trigger.model.Trigger;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;
+import org.eclipse.viatra2.logger.Logger;
+

+

+/**

+ * Trigger Execution Engine; handles the proper execution of the trigger's action-sequences.

+ * @author Andr�s �kr�s

+ */

+public class TriggerExecutionEngine implements ICoreNotificationListener, IMachineSetChangedListener

+{

+

+	protected IFramework fw;

+	protected ReteEngine<GTPattern> re = null;

+	protected HashSet<Trigger> triggers;

+	protected HashSet<ITriggerSetChangedListener> trigger_set_listeners;

+	protected boolean trigger_running_flag;

+	protected boolean serialExecutionMode; // if false > parallel mode

+

+	public TriggerExecutionEngine(IFramework afw)

+	{

+		fw = afw;

+		//getReteEngine();

+		triggers = new HashSet<Trigger>();

+		trigger_set_listeners = new HashSet<ITriggerSetChangedListener>();

+		fw.getTopmodel().getNotificationManager().addAllListener(this);

+		fw.addMachineSetListener(this);

+		trigger_running_flag = false;

+		serialExecutionMode = true;

+	}
+
+	private ReteEngine<GTPattern> getReteEngine() {
+		if (re==null) re = EngineManager.getInstance().getReteEngine(fw);
+		return re;
+	}

+

+	public void initTrigger(Machine current)

+	{

+		EList<GTRule> gtrules;

+		boolean anyImport=false;

+		gtrules = current.getGtRuleDefinitions();

+		for (Object obj: gtrules)

+		{

+			GTRule gtrule = (GTRule) obj;

+			EList<RuntimeAnnotation> runtimeAnnotations = gtrule.getRuntimeAnnotations();

+			for (Object obj1: runtimeAnnotations)

+			{

+				RuntimeAnnotation ran = (RuntimeAnnotation) obj1;

+				if (ran.getAnnotationName().equalsIgnoreCase("@Trigger")) {

+					Trigger input = new Trigger(gtrule.getName());

+					anyImport=true;

+					input.setMachine(current);

+					input.setGtrule(gtrule);

+					boolean isRunnable = false;

+					EList<RuntimeAnnotationElement> annotations = ran.getElements();

+					for (Object obj2: annotations) {

+						RuntimeAnnotationElement ranElement = (RuntimeAnnotationElement) obj2;

+						String key = ranElement.getKey();

+						String value = ranElement.getValue();

+						if (key.equals("priority"))

+						{

+							try {

+								int p = Integer.parseInt(value);

+								input.setPriority(p); // default priority: 0

+							}

+							catch (NumberFormatException nfe) {

+								fw.getLogger().info("Trigger engine: the " + input.getName() + " trigger's priority annotation is not a valid integer number.");

+							}

+						}

+						if (key.equals("mode"))

+						{

+							if (value.equals("always")) input.setMode("always"); // default

+							if (value.equals("once")) input.setMode("once");

+						}

+						if (key.equals("sensitivity"))

+						{

+							if (value.equals("rise")) input.setSensitivity("rise"); // default

+							if (value.equals("fall")) input.setSensitivity("fall");
+							if (value.equals("both")) input.setSensitivity("both");

+						}

+						if (key.equals("startup"))

+						{

+							if (value.equals("active")) input.setStartup("active"); // default

+							if (value.equals("passive")) input.setStartup("passive");

+						}

+						if (key.equals("execution"))

+						{

+							if (value.equals("forall")) input.setExecution("forall"); // default

+							if (value.equals("iterate")) input.setExecution("iterate");
+							if (value.equals("choose")) input.setExecution("choose");

+						}

+						if (key.equals("autoStart"))

+						{

+							if (value.equals("true")) isRunnable=true;

+						}

+					}

+

+					addTrigger(input);

+

+					if (isRunnable) startTrigger(input);

+				}

+			}

+		}

+		if (anyImport) actionPerformed(new NotificationObjectTransactionEnd());

+	}

+

+

+	public void initTriggerRete (Trigger input)

+	{

+		//Setup a new RetePatternMatcher for the current trigger

+		RetePatternMatcher rpm = null;

+		try	{

+			rpm=getReteEngine().accessMatcher(input.getGtrule().getPrecondition().getCalledPattern());

+		}

+		catch (Exception e) {//XXX Better exception handling needed
+			e.printStackTrace();
+		}

+		//Setup a DeltaMontior Receiver for the pattern matcher

+		DeltaMonitor<Tuple> dm = new DefaultDeltaMonitor(re.getReteNet());

+		if (input.getStartup().equals("active")) {

+			rpm.connect(dm, true);

+		} else {

+			rpm.connect(dm, false);

+		}

+		input.setReceiver(dm);

+		input.setRetepatternmatcher(rpm);

+		input.setReteEngineSet(true);

+	}

+

+	public void initTriggerASMFunctions(Trigger input)

+	{

+		IExecutionEnvironment ee = new TriggerExecutionEnvironment(fw);

+		for (Object o : input.getMachine().getAsmFunctionDefinitions())

+		{

+			ASMFunction fun =(ASMFunction)o;

+			HashMap<EList<Object>,Object> map= new HashMap<EList<Object>, Object>();

+			for (Object o2 : fun.getInitialValues())

+			{

+				InitialValue initialValue =(InitialValue)o2;

+				try {

+					EList<Object> locationsList= new BasicEList<Object>();

+					for (Object o3 : initialValue.getLocations())

+					{

+						Term locationsTerm=(Term)o3;

+						locationsList.add(TermEvaluator.getInstance().evaluate(ee, locationsTerm));

+					}

+					map.put(locationsList,TermEvaluator.getInstance().evaluate(ee,initialValue.getValue()));

+				} catch (ViatraTransformationException e) {	e.printStackTrace(); }

+			}

+			if (!ASMFunctionContent.getInstance().containsKey(fun))	ASMFunctionContent.getInstance().put(fun, map);

+		}

+		input.setASMFunctionsSet(true);

+	}

+

+	public void startTrigger(Trigger input)

+	{

+		if (!input.isReteEngineSet())

+			initTriggerRete(input);

+		input.setRunning(true);

+		for (ITriggerSetChangedListener tsl: trigger_set_listeners) {

+			tsl.triggerRefreshed(input);

+			}

+	}

+

+	public void startTriggerWithCommit(Trigger input)

+	{

+		startTrigger(input);

+		actionPerformed(new NotificationObjectTransactionEnd());

+	}

+

+	public void stopTrigger(Trigger input)

+	{

+		input.setRunning(false);

+		for (ITriggerSetChangedListener tsl: trigger_set_listeners) {

+			tsl.triggerRefreshed(input);

+			}

+	}

+

+	public void addTrigger(Trigger input)

+	{

+		// Remove the previous version

+		for (Trigger trigger : triggers) {

+			if (trigger.getName().equals(input.getName())){

+				deleteTrigger(trigger);
+				break;
+			}

+		}

+

+		triggers.add(input);

+		for (ITriggerSetChangedListener tsl: trigger_set_listeners) {

+			tsl.triggerAdded(input);

+			}

+		fw.getLogger().info("Trigger engine: the " + input.getName() + " trigger has been imported.");

+	}

+

+

+	public void deleteTrigger(Trigger input)

+	{

+		triggers.remove(input);

+		for (ITriggerSetChangedListener tsl: trigger_set_listeners) {

+			tsl.triggerRemoved(input);

+			}

+		fw.getLogger().info("Trigger engine: the " + input.getName() + " trigger has been removed.");

+	}

+

+

+	//Run the trigger's action sequence with the correct variable settings.

+	public void runTriggerAction(IFramework fw, final Trigger input, Tuple ps)

+	{

+		IExecutionEnvironment ee = new TriggerExecutionEnvironment(fw);

+		HashMap <Object,Integer> params = input.getRetepatternmatcher().getPosMapping();

+

+

+		try {
+			// sym parameters

+			for (SymbolicRuleParameter param: input.getGtrule().getSymParameters()) {
+				ee.addVariable(param.getVariable(), ValueKind.UNDEF_LITERAL);
+			}
+			// the actual parameters of the precondition are used
+			EList<Term> actpars = input.getGtrule().getPrecondition().getActualParameters();

+			int pos=0;
+			for (Object _o : actpars)

+			{
+				Object value = ps.get(pos++);

+				VariableReference ref = (VariableReference) _o;

+				Variable var = ref.getVariable(); // "asm" variable

+				if (!ee.getVariableValues().keySet().contains(var)) // only add if not added yet

+					ee.addVariable(var, value);
+				else
+					ee.setVariableValue(var, value);

+			}
+
+			ASMRuleInvocation asmri = input.getGtrule().getAction();
+			RuleInterpreter.initInterpreters(fw.getLogger(), fw.getCodeOutput());
+
+			//trigger_running_flag = true;
+			fw.getTopmodel().getTransactionManager().beginTransaction();
+			try {
+				RuleInterpreter.getInstance().interpretRule(ee, asmri,null);
+			} finally {
+				fw.getTopmodel().getTransactionManager().commitTransaction();
+			}
+
+			//trigger_running_flag = false;

+		}

+		catch (final ViatraTransformationException e) {
+			fw.getLogger().message(Logger.ERROR, e.getMessage(), e);
+			Display.getDefault().syncExec(new Runnable(){
+				public void run() {
+					MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+						"VIATRA2 R3",
+						"Error executing trigger "+ input.getName() +": " +
+							e.getMessage() + " (see the Error Log view for details)");
+					}
+				});
+		}

+

+	}

+

+

+	// Runs the trigger with the correct execution semantics and sensitivity settings

+	public void runTrigger(Trigger triggertorun)

+	{

+		// This is default execution semantics; the forall semantics > executes all of the possible matchings

+		if (triggertorun.getExecution().equals("forall"))

+		{

+			if (triggertorun.getSensitivity().equals("rise") || triggertorun.getSensitivity().equals("both"))

+			{

+				while (triggertorun.getReceiver().matchFoundEvents.iterator().hasNext())

+				{

+					Tuple ps = triggertorun.getReceiver().matchFoundEvents.iterator().next();

+					triggertorun.getReceiver().matchFoundEvents.remove(ps);

+					runTriggerAction(fw, triggertorun, ps);

+				}

+			}

+			if (triggertorun.getSensitivity().equals("fall") || triggertorun.getSensitivity().equals("both"))

+			{

+				while (triggertorun.getReceiver().matchLostEvents.iterator().hasNext())

+				{

+					Tuple ps = triggertorun.getReceiver().matchLostEvents.iterator().next();

+					triggertorun.getReceiver().matchLostEvents.remove(ps);

+					runTriggerAction(fw, triggertorun, ps);

+				}

+			}

+		} else if (triggertorun.getExecution().equals("iterate"))

+		// the iterate semantics > only executes one matching of the trigger

+		{

+			if (triggertorun.getSensitivity().equals("rise") || triggertorun.getSensitivity().equals("both"))

+			{

+				if (triggertorun.getReceiver().matchFoundEvents.iterator().hasNext())

+				{

+					Tuple ps = triggertorun.getReceiver().matchFoundEvents.iterator().next();

+					triggertorun.getReceiver().matchFoundEvents.remove(ps);

+					runTriggerAction(fw, triggertorun, ps);

+				}

+			}

+			if (triggertorun.getSensitivity().equals("fall") || triggertorun.getSensitivity().equals("both"))

+			{

+				if (triggertorun.getReceiver().matchLostEvents.iterator().hasNext())

+				{

+					Tuple ps = triggertorun.getReceiver().matchLostEvents.iterator().next();

+					triggertorun.getReceiver().matchLostEvents.remove(ps);

+					runTriggerAction(fw, triggertorun, ps);

+				}

+			}

+		} else if (triggertorun.getExecution().equals("choose"))
+		// the choose semantics > only executes one matching of the trigger, and terminates
+		{
+			if (triggertorun.getSensitivity().equals("rise") || triggertorun.getSensitivity().equals("both"))
+			{
+				if (triggertorun.getReceiver().matchFoundEvents.iterator().hasNext())
+				{
+					Tuple ps = triggertorun.getReceiver().matchFoundEvents.iterator().next();
+					//triggertorun.getReceiver().matchFoundEvents.remove(ps);
+					triggertorun.getReceiver().matchFoundEvents.clear();
+					runTriggerAction(fw, triggertorun, ps);
+				}
+			}
+			if (triggertorun.getSensitivity().equals("fall") || triggertorun.getSensitivity().equals("both"))
+			{
+				if (triggertorun.getReceiver().matchLostEvents.iterator().hasNext())
+				{
+					Tuple ps = triggertorun.getReceiver().matchLostEvents.iterator().next();
+					//triggertorun.getReceiver().matchLostEvents.remove(ps);
+					triggertorun.getReceiver().matchLostEvents.clear();
+					runTriggerAction(fw, triggertorun, ps);
+				}
+			}
+		}

+	}

+

+

+	public void execute_serial()

+	{

+		// This trigger will be the one to run in this "procession-round"

+		Trigger triggertorun = null;

+

+		// Find the max priority trigger to run first

+		// Note: the action sequence of that trigger will make a new TA_TRANSACTION_END (which starts the trigger execution engine)

+		for (Trigger tr :triggers)

+		{

+			if (tr.isRunning())

+			{

+				if (!tr.getReceiver().matchFoundEvents.isEmpty() && (tr.getSensitivity().equals("rise") || tr.getSensitivity().equals("both")))

+				{

+					if (triggertorun==null)	{ triggertorun = tr; }

+					else if (tr.getPriority()>triggertorun.getPriority())

+					{ triggertorun = tr; }

+				}

+				if (!tr.getReceiver().matchLostEvents.isEmpty() && (tr.getSensitivity().equals("fall") || tr.getSensitivity().equals("both")))

+				{

+					if (triggertorun==null)	{ triggertorun = tr; }

+					else if (tr.getPriority()>triggertorun.getPriority())

+					{ triggertorun = tr; }

+				}

+			}

+		}

+

+		if (triggertorun != null)

+		{

+			// Set up the ASMFunctions before the first run of the trigger.

+			if (!triggertorun.isASMFunctionsSet()) {

+				initTriggerASMFunctions(triggertorun);

+			}

+

+			runTrigger(triggertorun);

+

+			// Drop the trigger if it had a "once" mode

+			if (triggertorun.getMode().equals("once"))

+			{

+				// Drop the trigger from the engine.

+				deleteTrigger(triggertorun);

+			}

+		}

+	}

+

+

+	public void execute_parallel()

+	{

+		// All of the triggers on the list will be executed

+		HashSet<Trigger> triggertorunlist;

+		triggertorunlist = new HashSet<Trigger>();

+		for (Trigger tr :triggers)

+		{

+			if (tr.isRunning())

+			{

+				if (!tr.getReceiver().matchFoundEvents.isEmpty() && (tr.getSensitivity().equals("rise") || tr.getSensitivity().equals("both")))

+				{

+					triggertorunlist.add(tr);

+				}

+				if (!tr.getReceiver().matchLostEvents.isEmpty() && (tr.getSensitivity().equals("fall") || tr.getSensitivity().equals("both")))

+				{

+					triggertorunlist.add(tr);

+				}

+			}

+		}

+

+		for (Trigger triggertorun :triggertorunlist)

+		{

+			// Set up the ASMFunctions before the first run of the trigger.

+			if (!triggertorun.isASMFunctionsSet()) {

+				initTriggerASMFunctions(triggertorun);

+			}

+

+			runTrigger(triggertorun);

+

+			// Drop the trigger if it had a "once" mode

+			if (triggertorun.getMode().equals("once"))

+			{

+				// Drop the trigger from the engine.

+				deleteTrigger(triggertorun);

+			}

+		}

+	}

+

+

+	// Listeners for tracking transactions.
+	public void actionPerformed(ICoreNotificationObject notification) {
+
+		switch (notification.getActionTypeEnum()) {
+		case TA_TRANSACTION_BEGIN:
+		case TA_UNDOABLE_TRANSACTION_BEGIN:
+			if (trigger_running_flag == false) {
+				for (Trigger tr : triggers) {
+					if (tr.isRunning())
+						tr.getReceiver().clear();
+				}
+				fw.getLogger().info("Trigger engine: Receiver cleared.");
+			}
+			break;
+		case TA_TRANSACTION_END:
+		case TA_UNDO_END:
+			fw.getLogger()
+					.info("Trigger engine: A transactional operation ended in the system.");
+
+			if (!triggers.isEmpty()) {
+				getReteEngine().settle();
+				trigger_running_flag = true;
+				if (serialExecutionMode) {
+					execute_serial();
+				} else {
+					execute_parallel();
+				}
+				trigger_running_flag = false;
+			}
+			break;
+		}
+	}

+

+	public int getListenerCategory() {

+		return 0;

+	}

+

+

+	public HashSet<Trigger> getTriggers() {

+		return triggers;

+	}

+

+

+	public void addTriggerSetListener(ITriggerSetChangedListener l)

+	{

+		if (!trigger_set_listeners.contains(l)) trigger_set_listeners.add(l);

+	}

+

+

+	public void removeTriggerSetListener(ITriggerSetChangedListener l)

+	{

+		trigger_set_listeners.remove(l);

+	}

+

+

+	public boolean isSerialExecutionMode() {

+		return serialExecutionMode;

+	}

+

+

+	public void setSerialExecutionMode(boolean serialExecutionMode) {

+		this.serialExecutionMode = serialExecutionMode;

+	}

+

+

+	public boolean isTrigger_running_flag() {

+		return trigger_running_flag;

+	}

+

+

+	public void machineAdded(Object objMachine) {

+		Machine machine = (Machine) objMachine;

+		fw.getLogger().info("Trigger engine: The " + machine.getName() + " machine has been added to the system.");

+		initTrigger(machine);

+	}

+

+

+	public void machineRemoved(Object objMachine) {

+		Machine machine = (Machine) objMachine;

+		fw.getLogger().info("Trigger engine: The " + machine.getName() + " machine has been removed from the system.");

+	}

+

+

+}

diff --git a/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/engine/TriggerExecutionEnvironment.java b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/engine/TriggerExecutionEnvironment.java
new file mode 100644
index 0000000..88c4d80
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/engine/TriggerExecutionEnvironment.java
@@ -0,0 +1,331 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Peter Pasztor, Akos Horvath, Gergely Varro, Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gtasm.trigger.engine;
+
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.Vector;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.gtasm.interpreter.exception.ViatraTransformationException;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.ASMFunctionContent;
+import org.eclipse.viatra2.gtasm.interpreter.executionEnvironment.IExecutionEnvironment;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+
+
+public class TriggerExecutionEnvironment implements IExecutionEnvironment {
+	/**
+	 * This class is used to handle the execution environment when running an
+	 * ASM
+	 * 
+	 * If the TermEvaluator creates a sub-execution environment (stack) for its
+	 * operation for example at a function call, the values may change, the
+	 * variables and everything that changed needs to be refreshed
+	 * 
+	 * @author Peter Pasztor
+	 * 
+	 */
+	protected IExecutionEnvironment parentExecutionEnvironment;
+	protected IFramework framework;
+
+	/*
+	 * protected TermHandler termHandler; protected PatternBuilder
+	 * patternBuilder;
+	 */
+
+	// protected SimpleModelSpace modelSpace;
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see executionEnvironment.IExecutionEnvironment#getFramework()
+	 */
+	public IFramework getFramework() {
+		return framework;
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see executionEnvironment.IExecutionEnvironment#onBegin(java.util.Map)
+	 */
+	public void onBegin(Map<Variable, Object> variables) {
+		;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see executionEnvironment.IExecutionEnvironment#onTerminate()
+	 */
+	public Map<Variable, Object> onTerminate() {
+		return null;
+	}
+
+	// protected Hashtable<Variable, Object> variableValues;
+	protected Map<Variable, Object> variableValues;
+
+	protected ASMFunctionContent ASMFunctionValues;
+
+	public TriggerExecutionEnvironment(IFramework framework) {
+		parentExecutionEnvironment = null;
+
+		// variableValues = new Hashtable<Variable, Object>();
+		variableValues = new TreeMap<Variable, Object>(
+				new Comparator<Variable>() {
+
+					/*
+					 * XXX Istvan: is it valid to compare variables in an
+					 * executionenvironment by their name?
+					 */
+
+					public int compare(Variable o1, Variable o2) {
+						// if (o1 instanceof PatternVariable || o2 instanceof
+						// PatternVariable)
+						// return o1.getName().compareTo(o2.getName());
+						// else
+						{
+							int h_o1 = o1.hashCode();
+							int h_o2 = o2.hashCode();
+							if (h_o1 == h_o2)
+								return 0;
+							else if (h_o1 > h_o2)
+								return 1;
+							else
+								return -1;
+						}
+
+					}
+
+				});
+		ASMFunctionValues = ASMFunctionContent.getInstance();
+
+		this.framework = framework;
+	}
+
+	public TriggerExecutionEnvironment(IExecutionEnvironment parent) {
+		parentExecutionEnvironment = parent;
+
+		variableValues = new Hashtable<Variable, Object>(parent
+				.getVariableValues());
+		ASMFunctionValues = ASMFunctionContent.getInstance();
+		framework = parent.getFramework();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see executionEnvironment.IExecutionEnvironment#getValueOfASMFunction(org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction,
+	 *      org.eclipse.emf.common.util.EList)
+	 */
+	public Object getValueOfASMFunction(ASMFunction asmFunction, EList<Object> location) {
+		HashMap<EList<Object>, Object> af = ASMFunctionContent.getInstance().get(
+				asmFunction);
+		if (af == null)
+			return null;
+		return af.get(location);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see executionEnvironment.IExecutionEnvironment#updateASMFunction(org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction,
+	 *      org.eclipse.emf.common.util.EList, java.lang.Object)
+	 */
+	public void updateASMFunction(ASMFunction asmFunction, EList<Object> location,
+			Object value) throws ViatraTransformationException {
+		if (ASMFunctionValues.get(asmFunction) != null) {
+			ASMFunctionValues.get(asmFunction).put(location, value);
+			// notify value listeners
+			ASMFunctionValues.notifyListeners(asmFunction, location, value);
+		} else {
+			// ASMFunctionValues.(asmFunction).put(location, value);
+			// TODO: What to do???
+//			throw new ASMInterpreterException(
+//					ErrorStrings.UPDATE_NONEXISTENT_ASMFUNCTION
+//							+ asmFunction.getName(), asmFunction);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see executionEnvironment.IExecutionEnvironment#addVariable(org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable,
+	 *      java.lang.Object)
+	 */
+	public void addVariable(Variable key, Object value)
+			throws ViatraTransformationException {
+		if (variableValues.containsKey(key)) {
+//			throw new ASMInterpreterException(ErrorStrings.ADD_EXISTING_VAR
+//					+ key.getName() + "\"!", key);
+		} else {
+			variableValues.put(key, value);
+		}
+	}
+
+	// This is necessary when returning from another ExecutionEnvironment
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see executionEnvironment.IExecutionEnvironment#updateVariables(java.util.Map)
+	 */
+	public void updateVariables(Map<Variable, Object> changedVariables) {
+		variableValues.putAll(changedVariables);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see executionEnvironment.IExecutionEnvironment#getVariableValue(org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable)
+	 */
+	public Object getVariableValue(Variable variable)
+			throws ViatraTransformationException {
+		// The local variables are more likely to be accessed, and are not so
+		// many as the global ones
+		if (variableValues.containsKey(variable))
+			return variableValues.get(variable);
+		else {
+			// This line has temporarily added
+			return null;
+//			throw new ASMInterpreterException(
+//					ErrorStrings.VALUE_OF_NOT_EXISTING_VAR + variable.getName(),
+//					variable);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see executionEnvironment.IExecutionEnvironment#setVariableValue(org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable,
+	 *      java.lang.Object)
+	 */
+	public void setVariableValue(Variable variable, Object value)
+			throws ViatraTransformationException { // The Variable itself doesn't
+												// change, just the value
+		if (variableValues.containsKey(variable)) {
+			// This is the easy case, just modify the value
+			variableValues.put(variable, value);
+		} else {
+//			throw new ASMInterpreterException(
+//					ErrorStrings.SET_VALUE_NOT_EXISTING_VAR
+//							+ variable.getName(), variable);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see executionEnvironment.IExecutionEnvironment#getVariableValues()
+	 */
+	public Map<Variable, Object> getVariableValues() {
+		return variableValues;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see executionEnvironment.IExecutionEnvironment#fetchVariableVariations(java.util.HashMap,
+	 *      org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term)
+	 */
+	public void fetchVariableVariations(
+			HashMap<Variable, Vector<Object>> possibleVariableValues,
+			Term termToBeEvaluated) {
+		Integer index;
+		Set<EList<Object>> keys;
+
+		Set<Variable> variables = possibleVariableValues.keySet();
+		if (termToBeEvaluated instanceof FunctionInvocation) {
+			// Get into the parameters only
+			if (termToBeEvaluated instanceof ASMFunctionInvocation) {
+
+				// Here happens the real fetching of possibly good variable
+				// values
+				((ASMFunctionInvocation) termToBeEvaluated)
+						.getActualParameters();
+				for (Object parameter : ((ASMFunctionInvocation) termToBeEvaluated)
+						.getActualParameters()) {
+
+					// For every parameter, we check whether it's a variable
+					// from the list, or not.
+					if (parameter instanceof VariableReference) {
+						if (variables.contains(((VariableReference) parameter)
+								.getVariable())) {
+
+							// We found one. Now we must get the possible
+							// values.
+							// (parameter is now an instance of type Variable!)
+
+							index = ((ASMFunctionInvocation) termToBeEvaluated)
+									.getActualParameters().indexOf(parameter);
+
+							keys = this.ASMFunctionValues.get(
+									((ASMFunctionInvocation) termToBeEvaluated)
+											.getCalledFunction()).keySet();
+
+							for (EList<Object> key : keys) {
+
+								// Now we get a possible value (parameter holds
+								// the Variable!)
+								// Only one appearance allowed, hence the check
+								// It wastes time, but
+								// wastes much less time than having to
+								// re-evaluate the term again
+								// and again for the same parameters
+
+								if (!possibleVariableValues.get(
+										((VariableReference) parameter)
+												.getVariable()).contains(
+										key.get(index)))
+									possibleVariableValues.get(
+											((VariableReference) parameter)
+													.getVariable()).add(
+											key.get(index));
+							}
+						}
+					} else if (parameter instanceof FunctionInvocation) {
+						// It might be nested. Further investigation required.
+						fetchVariableVariations(possibleVariableValues,
+								((Term) parameter));
+					}
+				}
+			} // end of ASMFunctionInvocation
+			else {
+				// Other function invocations -- like operations etc.
+				// We must look at the operands, the operation itself is not
+				// important,
+				// the term evaluator will take care of that. It might be
+				// necessary to
+				// recursively process them, to be able to process not trivial
+				// conditions.
+				for (Object parameter : ((FunctionInvocation) termToBeEvaluated)
+						.getActualParameters()) {
+					this.fetchVariableVariations(possibleVariableValues,
+							((Term) parameter));
+				}
+			}
+		} else {
+			// There is a problem here, since only FunctionInvocations are
+			// allowed...
+
+		}
+	}
+}
diff --git a/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/model/Trigger.java b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/model/Trigger.java
new file mode 100644
index 0000000..ab5e90c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/model/Trigger.java
@@ -0,0 +1,161 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Okros, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Okros - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.trigger.model;

+

+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.matcher.RetePatternMatcher;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.misc.DeltaMonitor;
+import org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete.tuple.Tuple;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;
+

+/**

+ * Model class for triggers.

+ * @author Andr�s �kr�s

+ */

+public class Trigger 

+{

+	protected String name;

+	protected int priority;

+	protected String mode;  // always (default) | once

+	protected String sensitivity; // rise (default) | fall

+	protected String startup; // active (default)  | passive

+	protected String execution; // forall (default) | iterate | choose

+	protected Machine machine;

+	protected GTRule gtrule;

+	protected RetePatternMatcher retepatternmatcher;

+	protected DeltaMonitor<Tuple> receiver;

+	protected boolean isRunning;

+	protected boolean isASMFunctionsSet;

+	protected boolean isReteEngineSet;

+		

+	public Trigger(String aName)

+	{

+		// Set the trigger's name:

+		name = aName;

+		

+		// Initialize the default settings for the trigger:

+		priority = 0;			// Other option: any integer number

+		mode = "always";		// Other option: once

+		sensitivity = "rise";	// Other option: fall

+		startup = "active";		// Other option: passive

+		execution = "forall";	// Other option: iterate

+		isASMFunctionsSet = false;

+		isReteEngineSet = false;

+		isRunning = false;

+	}

+	

+	//Getters & Setters:

+	public String getName() {

+		return name;

+	}

+

+	public void setName(String name) {

+		this.name = name;

+	}

+

+	public GTRule getGtrule() {

+		return gtrule;

+	}

+

+	public void setGtrule(GTRule gtrule) {

+		this.gtrule = gtrule;

+	}

+

+	public Machine getMachine() {

+		return machine;

+	}

+

+	public void setMachine(Machine machine) {

+		this.machine = machine;

+	}

+

+	public String getMode() {

+		return mode;

+	}

+

+	public void setMode(String mode) {

+		this.mode = mode;

+	}

+

+	public int getPriority() {

+		return priority;

+	}

+

+	public void setPriority(int priority) {

+		this.priority = priority;

+	}

+

+	public String getSensitivity() {

+		return sensitivity;

+	}

+

+	public void setSensitivity(String sensitivity) {

+		this.sensitivity = sensitivity;

+	}

+

+	public String getStartup() {

+		return startup;

+	}

+

+	public void setStartup(String startup) {

+		this.startup = startup;

+	}

+

+	public RetePatternMatcher getRetepatternmatcher() {

+		return retepatternmatcher;

+	}

+

+	public void setRetepatternmatcher(RetePatternMatcher retepatternmatcher) {

+		this.retepatternmatcher = retepatternmatcher;

+	}

+

+	public DeltaMonitor<Tuple> getReceiver() {

+		return receiver;

+	}

+

+	public void setReceiver(DeltaMonitor<Tuple> receiver) {

+		this.receiver = receiver;

+	}

+

+	public boolean isASMFunctionsSet() {

+		return isASMFunctionsSet;

+	}

+

+	public void setASMFunctionsSet(boolean isASMFunctionsSet) {

+		this.isASMFunctionsSet = isASMFunctionsSet;

+	}

+

+	public String getExecution() {

+		return execution;

+	}

+

+	public void setExecution(String execution) {

+		this.execution = execution;

+	}

+

+	public boolean isRunning() {

+		return isRunning;

+	}

+

+	public void setRunning(boolean isRunning) {

+		this.isRunning = isRunning;

+	}

+

+	public boolean isReteEngineSet() {

+		return isReteEngineSet;

+	}

+

+	public void setReteEngineSet(boolean isReteEngineSet) {

+		this.isReteEngineSet = isReteEngineSet;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/natives/StartTriggerFunction.java b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/natives/StartTriggerFunction.java
new file mode 100644
index 0000000..8424e67
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/natives/StartTriggerFunction.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Okros, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Okros - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.trigger.natives;

+

+import org.eclipse.viatra2.gtasm.trigger.engine.TriggerEngineManager;

+import org.eclipse.viatra2.gtasm.trigger.engine.TriggerExecutionEngine;

+import org.eclipse.viatra2.gtasm.trigger.model.Trigger;

+import org.eclipse.viatra2.core.IModelSpace;

+import org.eclipse.viatra2.errors.VPMRuntimeException;

+import org.eclipse.viatra2.natives.ASMNativeFunction;

+

+/**

+ * A Viatra native function for starting triggers from VTCL code.

+ * @author Andr�s �kr�s

+ */

+public class StartTriggerFunction implements ASMNativeFunction {

+

+	public Object evaluate(IModelSpace msp, Object[] params) throws VPMRuntimeException 

+	{

+		String name = (String) params[0];				// The name of the gtrule

+		boolean founded = false;

+		

+		//Trigger output = new Trigger(name);

+		//TriggerExecutionEngine single = TriggerEngineManager.getInstance().getTriggerEngine(msp.getFramework());

+		//single.initTrigger(output);

+		//return "The " + name + " trigger started.";

+		

+		TriggerExecutionEngine single = TriggerEngineManager.getInstance().getTriggerEngine(msp.getFramework());

+		for (Trigger trigger : single.getTriggers())

+		{

+			if (trigger.getName().equals(name)) {

+				founded = true;

+				single.startTrigger(trigger);

+			}	

+		}

+				

+		if (founded)

+			return "startTrigger: the " + name + " trigger started.";

+		else

+			return "startTrigger: the " + name + " trigger cannot be found.";

+	}

+	

+	public String getDescription() 

+	{

+		return "Starts a trigger in the trigger execution engine";

+	}

+

+	public String getID() 

+	{

+		return "org.eclipse.viatra2.gtasm.trigger.natives.StartTriggerFunction";

+	}

+

+	public String getName() 

+	{

+		return "startTrigger";  // VTCL command name

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/natives/StopTriggerFunction.java b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/natives/StopTriggerFunction.java
new file mode 100644
index 0000000..8ec25b9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/natives/StopTriggerFunction.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Okros, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Okros - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.trigger.natives;

+

+import org.eclipse.viatra2.gtasm.trigger.engine.TriggerEngineManager;

+import org.eclipse.viatra2.gtasm.trigger.engine.TriggerExecutionEngine;

+import org.eclipse.viatra2.gtasm.trigger.model.Trigger;

+import org.eclipse.viatra2.core.IModelSpace;

+import org.eclipse.viatra2.errors.VPMRuntimeException;

+import org.eclipse.viatra2.natives.ASMNativeFunction;

+

+/**

+ * A Viatra native function for stopping triggers from VTCL code.

+ * @author Andr�s �kr�s

+ */

+public class StopTriggerFunction implements ASMNativeFunction {

+

+	public Object evaluate(IModelSpace msp, Object[] params) throws VPMRuntimeException 

+	{

+		String name = (String) params[0];				// The name of the gtrule

+		boolean founded = false;

+		

+		TriggerExecutionEngine single = TriggerEngineManager.getInstance().getTriggerEngine(msp.getFramework());

+		for (Trigger trigger : single.getTriggers())

+		{

+			if (trigger.getName().equals(name)) {

+				founded = true;

+				single.stopTrigger(trigger);

+			}	

+		}

+				

+		if (founded)

+			return "stopTrigger: the " + name + " trigger stopped.";

+		else

+			return "stopTrigger: the " + name + " trigger cannot be found.";

+	}

+	

+	public String getDescription() 

+	{

+		return "Stops a trigger in the trigger execution engine";

+	}

+

+	public String getID() 

+	{

+		return "org.eclipse.viatra2.gtasm.trigger.natives.StopTriggerFunction";

+	}

+

+	public String getName() 

+	{

+		return "stopTrigger";  // VTCL command name

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/view/DeleteTriggerAction.java b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/view/DeleteTriggerAction.java
new file mode 100644
index 0000000..f3a1ea8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/view/DeleteTriggerAction.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Okros, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Okros - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.trigger.view;

+

+import org.eclipse.ui.ISharedImages;

+import org.eclipse.ui.PlatformUI;

+

+import org.eclipse.viatra2.frameworkgui.actions.AbstractFrameworkGUIAction;

+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;

+import org.eclipse.viatra2.gtasm.trigger.engine.TriggerEngineManager;

+import org.eclipse.viatra2.gtasm.trigger.view.FrameworkViewExtension.TriggerDummy;

+

+/**

+ * An action for deleting triggers from the execution engine. 

+ * @author Andr�s �kr�s

+ */

+public class DeleteTriggerAction extends AbstractFrameworkGUIAction {

+	

+	public DeleteTriggerAction(FrameworkTreeView part) {

+		super();

+		setupInternals(part);

+		setText("Drop");

+		setToolTipText("Drops the trigger from the trigger execution engine");

+		setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));

+	}

+	

+	@Override

+	public boolean isEnabled() {

+		return true;

+	}

+	

+	@Override

+	public void run() {

+		refreshSelection();

+		Object o = getFirstSelected();

+		if (o instanceof TriggerDummy)

+			{

+			TriggerEngineManager.getInstance().getTriggerEngine(iViatraFramework).deleteTrigger(((TriggerDummy)o).getTrigger());

+			}

+

+	}	

+	

+}

+

+

diff --git a/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/view/FrameworkViewExtension.java b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/view/FrameworkViewExtension.java
new file mode 100644
index 0000000..f351606
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/view/FrameworkViewExtension.java
@@ -0,0 +1,248 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Okros, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Okros - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.trigger.view;

+

+import org.eclipse.viatra2.frameworkgui.content.FrameworkContainer;

+import org.eclipse.viatra2.frameworkgui.content.IFrameworkContentProviderExtension;

+import org.eclipse.viatra2.frameworkgui.content.ITreeObject;

+import org.eclipse.viatra2.frameworkgui.content.ITreeParent;

+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;

+import org.eclipse.viatra2.gtasm.trigger.Activator;

+import org.eclipse.viatra2.gtasm.trigger.engine.ITriggerSetChangedListener;

+import org.eclipse.viatra2.gtasm.trigger.engine.TriggerEngineManager;

+import org.eclipse.viatra2.gtasm.trigger.engine.TriggerExecutionEngine;

+import org.eclipse.viatra2.gtasm.trigger.model.Trigger;

+

+import java.util.Collection;

+import java.util.HashMap;

+import java.util.HashSet;

+import java.util.Map;

+import java.util.Set;

+import java.util.Vector;

+

+import org.eclipse.jface.action.IAction;

+import org.eclipse.jface.action.IContributionItem;

+import org.eclipse.swt.graphics.Image;

+import org.eclipse.ui.views.properties.IPropertySource2;

+import org.eclipse.viatra2.framework.IFramework;

+

+/**

+ * An extension for the Viatra framework's model space view.

+ * @author Andr�s �kr�s

+ */

+public class FrameworkViewExtension 

+	implements IFrameworkContentProviderExtension, ITreeParent, ITriggerSetChangedListener

+{

+	private DeleteTriggerAction deleteAction;

+	private StartTriggerAction startAction;

+	private StopTriggerAction stopAction;

+	private SwitchExecutionModeAction switchAction;

+	private Vector<IAction> actions;

+	private Vector<IAction> sActions;

+	private FrameworkTreeView viewer;

+	private IFramework fw;

+	private TriggerExecutionEngine tee;

+	private FrameworkContainer cont;

+	private Map<Object, ITreeObject> triggers;

+	//private static Image trigger_image = Activator.getImageDescriptor("icons/trigger_transparent.png").createImage();

+	private static Image trigger_loaded = Activator.getImageDescriptor("icons/trigger_loaded.png").createImage();

+	private static Image trigger_running = Activator.getImageDescriptor("icons/trigger_running.png").createImage();

+	private static Image trigger_stopped = Activator.getImageDescriptor("icons/trigger_stopped.png").createImage();

+		

+	

+	public FrameworkViewExtension() 

+	{

+		triggers = new HashMap<Object, ITreeObject>();

+		actions = new Vector<IAction>();

+		sActions = new Vector<IAction>();

+	}

+	

+	public void init(FrameworkTreeView fv, IFramework f, FrameworkContainer c) 

+	{

+		viewer = fv; 

+		fw = f;

+		cont = c;

+

+		tee = TriggerEngineManager.getInstance().getTriggerEngine(fw);

+		deleteAction = new DeleteTriggerAction(fv);

+		startAction = new StartTriggerAction(fv);

+		stopAction = new StopTriggerAction(fv);

+		switchAction = new SwitchExecutionModeAction(fv,fw,tee);

+		actions.add(deleteAction);

+		actions.add(startAction);

+		actions.add(stopAction);

+		sActions.add(switchAction);

+		initTriggers();

+		tee.addTriggerSetListener(this);

+		

+	}

+	

+	//First time run.. At this moment it won't find anything;

+	//(No trigger can be in the system at the start...)

+	private void initTriggers()

+	{

+		for (Object _m : tee.getTriggers())

+		{

+			if (_m instanceof Trigger)

+				triggers.put(_m, new TriggerDummy((Trigger)_m));

+		}

+	}

+	

+	public Collection<IAction> getActions()

+	{ 

+		return sActions;

+	}

+	

+	public Collection<IContributionItem> getContributionItems() 

+	{

+		return null;

+	}

+

+	public ITreeObject getTopLevelEntry() 

+	{

+		return this;

+	}

+	

+	public void dispose() 

+	{

+		tee.removeTriggerSetListener(this);

+	}

+

+	public Set<ITreeObject> getChildren() 

+	{

+		return new HashSet<ITreeObject>(triggers.values());

+	}

+

+	public boolean hasChildren() 

+	{

+		return !triggers.isEmpty();

+	}

+

+	public FrameworkContainer getFrameworkContainer() 

+	{

+		return cont;

+	}

+

+	public Image getLabelImage() 

+	{

+		// TODO

+		return null;

+	}

+

+	public String getLabelText() 

+	{

+		String s;

+		if (tee.isSerialExecutionMode())

+		{

+			s = "Triggers (serial execution mode)";

+		} else {

+			s = "Triggers (parallel execution mode)";

+		}

+		return s;

+	}

+

+	public ITreeParent getParent() 

+	{

+		return cont;

+	}

+

+	public IPropertySource2 getPropertySource() 

+	{

+		return null;

+	}

+	

+	public class TriggerDummy implements ITreeObject 

+	{

+		private Trigger trigger;

+		

+		public TriggerDummy(Trigger t) 

+		{

+			trigger = t;

+		}

+		

+		public Trigger getTrigger()

+		{

+			return trigger;

+		}

+		

+		public FrameworkContainer getFrameworkContainer() {

+			return cont;

+		}

+

+		public Image getLabelImage() 

+		{

+			if (trigger.isReteEngineSet()==false)

+				return trigger_loaded;

+			else if (trigger.isRunning())

+				return trigger_running;

+			else

+				return trigger_stopped;

+			//return trigger_image;

+		}

+

+		public String getLabelText() 

+		{

+			return trigger.getName();

+		}

+

+		public ITreeParent getParent() 

+		{

+			return FrameworkViewExtension.this;

+		}

+	

+		public IPropertySource2 getPropertySource() {

+			TriggerPropertySource tps = new TriggerPropertySource(trigger);

+			return tps;

+		}

+

+		public Collection<IContributionItem> getContributionItems() {

+			return null;

+		}

+		

+		public Collection<IAction> getActions() 

+		{

+			return actions;

+		}

+

+		public IAction getDoubleClickAction() {

+			return null;

+		}

+	}

+	

+	public void triggerAdded(Object trigger) 

+	{

+		if (trigger instanceof Trigger)

+			triggers.put(trigger , new TriggerDummy((Trigger)trigger));	

+		viewer.refreshViewer(this);

+	}

+

+	public void triggerRemoved(Object trigger) 

+	{

+		if (trigger instanceof Trigger)

+			triggers.remove(trigger);

+		viewer.refreshViewer(this);

+	}

+	

+	public void triggerRefreshed(Object trigger) 

+	{

+		if (trigger instanceof Trigger){

+			triggers.remove(trigger);			

+			triggers.put(trigger , new TriggerDummy((Trigger)trigger));

+		}	

+		viewer.refreshViewer(this);

+	}

+

+	public IAction getDoubleClickAction() {

+		return null;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/view/StartTriggerAction.java b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/view/StartTriggerAction.java
new file mode 100644
index 0000000..0273982
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/view/StartTriggerAction.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Okros, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Okros - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.trigger.view;

+

+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.viatra2.frameworkgui.actions.AbstractFrameworkGUIAction;
+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;
+import org.eclipse.viatra2.gtasm.trigger.Activator;
+import org.eclipse.viatra2.gtasm.trigger.engine.TriggerEngineManager;
+import org.eclipse.viatra2.gtasm.trigger.view.FrameworkViewExtension.TriggerDummy;
+

+/**

+ * An action for deleting triggers from the execution engine. 

+ * @author Andr�s �kr�s

+ */

+public class StartTriggerAction extends AbstractFrameworkGUIAction {

+	

+	private static ImageDescriptor trigger_start = Activator.getImageDescriptor("icons/thread_start.png");

+	

+	public StartTriggerAction(FrameworkTreeView part) {

+		super();

+		setupInternals(part);

+		setText("Start");

+		setToolTipText("Starts the trigger");

+		setImageDescriptor(trigger_start);

+	}

+	

+	@Override

+	public boolean isEnabled() {

+		return true;

+	}

+	

+	@Override

+	public void run() {

+		refreshSelection();

+		Object o = getFirstSelected();

+		if (o instanceof TriggerDummy)

+			{

+			TriggerEngineManager.getInstance().getTriggerEngine(iViatraFramework).startTriggerWithCommit(((TriggerDummy)o).getTrigger());

+			}

+

+	}	

+	

+}

+

+

diff --git a/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/view/StopTriggerAction.java b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/view/StopTriggerAction.java
new file mode 100644
index 0000000..82ee894
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/view/StopTriggerAction.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Okros, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Okros - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.trigger.view;

+

+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.viatra2.frameworkgui.actions.AbstractFrameworkGUIAction;
+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;
+import org.eclipse.viatra2.gtasm.trigger.Activator;
+import org.eclipse.viatra2.gtasm.trigger.engine.TriggerEngineManager;
+import org.eclipse.viatra2.gtasm.trigger.view.FrameworkViewExtension.TriggerDummy;
+

+/**

+ * An action for deleting triggers from the execution engine. 

+ * @author Andr�s �kr�s

+ */

+public class StopTriggerAction extends AbstractFrameworkGUIAction {

+	

+	private static ImageDescriptor trigger_pause = Activator.getImageDescriptor("icons/thread_pause.png");

+	

+	public StopTriggerAction(FrameworkTreeView part) {

+		super();

+		setupInternals(part);

+		setText("Stop");

+		setToolTipText("Stops the trigger");

+		setImageDescriptor(trigger_pause);

+	}

+	

+	@Override

+	public boolean isEnabled() {

+		return true;

+	}

+	

+	@Override

+	public void run() {

+		refreshSelection();

+		Object o = getFirstSelected();

+		if (o instanceof TriggerDummy)

+			{

+			TriggerEngineManager.getInstance().getTriggerEngine(iViatraFramework).stopTrigger(((TriggerDummy)o).getTrigger());

+			}

+

+	}	

+	

+}

+

+

diff --git a/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/view/SwitchExecutionModeAction.java b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/view/SwitchExecutionModeAction.java
new file mode 100644
index 0000000..0100828
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/view/SwitchExecutionModeAction.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Okros, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Okros - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.trigger.view;

+

+import org.eclipse.jface.resource.ImageDescriptor;

+import org.eclipse.viatra2.framework.IFramework;

+

+import org.eclipse.viatra2.frameworkgui.actions.AbstractFrameworkGUIAction;

+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;

+import org.eclipse.viatra2.gtasm.trigger.Activator;

+import org.eclipse.viatra2.gtasm.trigger.engine.TriggerExecutionEngine;

+

+

+/**

+ * An action for deleting triggers from the execution engine. 

+ * @author Andr�s �kr�s

+ */

+public class SwitchExecutionModeAction extends AbstractFrameworkGUIAction {

+	

+	private FrameworkTreeView viewer;

+	private IFramework fw;

+	private TriggerExecutionEngine tee;

+	private static ImageDescriptor refresh_image = Activator.getImageDescriptor("icons/refresh.png");

+	

+	public SwitchExecutionModeAction(FrameworkTreeView part, IFramework f, TriggerExecutionEngine t ) {

+		super();

+		setupInternals(part);

+		viewer = part;

+		fw = f;

+		tee = t;

+		setText("Switch execution mode");

+		setToolTipText("Switches the execution mode in trigger execution engine");

+		setImageDescriptor(refresh_image);

+

+	}

+	

+	@Override

+	public boolean isEnabled() {

+		return true;

+	}

+	

+	@Override

+	public void run() {

+		refreshSelection();

+		Object o = getFirstSelected();

+		if (o instanceof FrameworkViewExtension)

+			{

+			if (!tee.isTrigger_running_flag()) 

+			{

+				boolean current = tee.isSerialExecutionMode();

+				tee.setSerialExecutionMode(!current); 

+			} else {

+				fw.getLogger().info("Trigger engine: the trigger engine mode cannot be changed during trigger processing.");

+			}

+			viewer.refreshViewer(o);

+			}

+	}	

+	

+	

+}

+

+

diff --git a/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/view/TriggerPropertySource.java b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/view/TriggerPropertySource.java
new file mode 100644
index 0000000..13072f1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.trigger/src/org/eclipse/viatra2/gtasm/trigger/view/TriggerPropertySource.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Okros, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Okros - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.gtasm.trigger.view;

+

+import org.eclipse.viatra2.gtasm.trigger.model.Trigger;

+

+import org.eclipse.ui.views.properties.IPropertyDescriptor;

+import org.eclipse.ui.views.properties.IPropertySource2;

+import org.eclipse.ui.views.properties.TextPropertyDescriptor;

+

+public class TriggerPropertySource implements IPropertySource2 {

+

+	Trigger trigger;

+	protected int priority;

+	protected String name;

+	protected String mode;  // always (default) | once

+	protected String sensitivity; // rise (default) | fall

+	protected String startup; // active (default)  | passive

+	protected String execution; // forall (default) | iterate

+	protected String running;

+	

+	public TriggerPropertySource(Trigger t){

+		super();

+		trigger = t;

+		

+		name = trigger.getName();

+		priority = trigger.getPriority();

+		mode = trigger.getMode();  

+		sensitivity = trigger.getSensitivity(); 

+		startup = trigger.getStartup(); 

+		execution = trigger.getExecution();

+		if (trigger.isRunning()) running = "true"; else running = "false";

+	}

+	

+	public boolean isPropertyResettable(Object id) {

+		// TODO Auto-generated method stub

+		return false;

+	}

+

+	public boolean isPropertySet(Object id) {

+		// TODO Auto-generated method stub

+		return false;

+	}

+

+	public Object getEditableValue() {

+		// TODO Auto-generated method stub

+		return null;

+	}

+

+	public IPropertyDescriptor[] getPropertyDescriptors() {

+		IPropertyDescriptor[] ipd = new IPropertyDescriptor[7];

+		

+		TextPropertyDescriptor tpdname = new TextPropertyDescriptor(name,"01. Name");

+		TextPropertyDescriptor tpdpriority = new TextPropertyDescriptor(priority,"02. Priority");

+		TextPropertyDescriptor tpdsensitivity = new TextPropertyDescriptor(sensitivity,"03. Sensitivity");

+		TextPropertyDescriptor tpdexecution = new TextPropertyDescriptor(execution,"04. Execution");

+		TextPropertyDescriptor tpdmode = new TextPropertyDescriptor(mode,"05. Mode");

+		TextPropertyDescriptor tpdstartup = new TextPropertyDescriptor(startup,"06. Startup");

+		TextPropertyDescriptor tpdrunning = new TextPropertyDescriptor(running,"07. Running");

+		

+		ipd[0] = tpdname;

+		ipd[1] = tpdpriority;

+		ipd[2] = tpdexecution;

+		ipd[3] = tpdsensitivity;

+		ipd[4] = tpdmode;

+		ipd[5] = tpdstartup;

+		ipd[6] = tpdrunning;

+		

+		return ipd;

+

+	}

+

+	public Object getPropertyValue(Object id) {

+		if (id.equals(name) || id.equals(priority) || id.equals(execution) || id.equals(sensitivity) || id.equals(mode) || id.equals(startup) || id.equals(running)) {

+			return (id);

+		} else return null;

+	}

+

+	public void resetPropertyValue(Object id) {

+		// TODO Auto-generated method stub

+		

+	}

+

+	public void setPropertyValue(Object id, Object value) {

+		// TODO Auto-generated method stub

+		

+	}

+	

+

+}

diff --git a/org.eclipse.viatra2.gtasm.typing.model/.classpath b/org.eclipse.viatra2.gtasm.typing.model/.classpath
new file mode 100644
index 0000000..121e527
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.viatra2.gtasm.typing.model/.deployment b/org.eclipse.viatra2.gtasm.typing.model/.deployment
new file mode 100644
index 0000000..0d0f103
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/.deployment
@@ -0,0 +1 @@
+deploymenet.output.folder=Deployment
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gtasm.typing.model/.project b/org.eclipse.viatra2.gtasm.typing.model/.project
new file mode 100644
index 0000000..a9f071b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<projectDescription>

+	<name>org.eclipse.viatra2.gtasm.typing.model</name>

+	<comment></comment>

+	<projects>

+	</projects>

+	<buildSpec>

+		<buildCommand>

+			<name>org.eclipse.jdt.core.javabuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+		<buildCommand>

+			<name>org.eclipse.pde.ManifestBuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+		<buildCommand>

+			<name>org.eclipse.pde.SchemaBuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+	</buildSpec>

+	<natures>

+		<nature>org.eclipse.jdt.core.javanature</nature>

+		<nature>org.eclipse.pde.PluginNature</nature>

+	</natures>

+</projectDescription>

diff --git a/org.eclipse.viatra2.gtasm.typing.model/.settings/org.eclipse.core.resources.prefs b/org.eclipse.viatra2.gtasm.typing.model/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..71dad6d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Thu Dec 04 11:24:00 CET 2008

+eclipse.preferences.version=1

+encoding//model/VTCLTypeRule.ecore_diagram=UTF-8

diff --git a/org.eclipse.viatra2.gtasm.typing.model/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra2.gtasm.typing.model/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..409fb2c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Wed Jan 12 11:23:21 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.6
diff --git a/org.eclipse.viatra2.gtasm.typing.model/META-INF/MANIFEST.MF b/org.eclipse.viatra2.gtasm.typing.model/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..acaa34e
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0

+Bundle-ManifestVersion: 2

+Bundle-Name: VTCL Type Rules

+Bundle-SymbolicName: org.eclipse.viatra2.gtasm.typing.model; singleton:=true

+Bundle-Version: 3.3.0.qualifier

+Bundle-ClassPath: .

+Bundle-Vendor: Optxware Ltd.

+Bundle-Localization: plugin

+Bundle-RequiredExecutionEnvironment: JavaSE-1.6

+Export-Package: org.eclipse.viatra2.gtasm.typerules,

+ org.eclipse.viatra2.gtasm.typerules.impl,

+ org.eclipse.viatra2.gtasm.typerules.util

+Require-Bundle: org.eclipse.core.runtime,

+ org.eclipse.emf.ecore;visibility:=reexport

+Bundle-ActivationPolicy: lazy

diff --git a/org.eclipse.viatra2.gtasm.typing.model/build.properties b/org.eclipse.viatra2.gtasm.typing.model/build.properties
new file mode 100644
index 0000000..1a3a48b
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/build.properties
@@ -0,0 +1,14 @@
+

+# <copyright>

+# </copyright>

+#

+# $Id$

+

+bin.includes = .,\

+               model/,\

+               META-INF/,\

+               plugin.xml,\

+               plugin.properties

+jars.compile.order = .

+source.. = src/

+output.. = bin/

diff --git a/org.eclipse.viatra2.gtasm.typing.model/model/TypeRules.genmodel b/org.eclipse.viatra2.gtasm.typing.model/model/TypeRules.genmodel
new file mode 100644
index 0000000..de46e47
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/model/TypeRules.genmodel
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<genmodel:GenModel xmi:version="2.0"

+    xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"

+    xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText=" * Copyright (c) 2008 Daniel Varro&#xD;&#xA; * All rights reserved. This program and the accompanying materials&#xD;&#xA; * are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA; * which accompanies this distribution, and is available at&#xD;&#xA; * http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA; *&#xD;&#xA; * Contributors:&#xD;&#xA; *    Daniel Varro - initial API and implementation&#xD;&#xA;"

+    modelDirectory="/org.eclipse.viatra2.gtasm.typing.model/src" modelPluginID="org.eclipse.viatra2.gtasm.typing.model"

+    modelName="TypeRules" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0"

+    copyrightFields="false">

+  <foreignModel>VTCLTypeRule.ecore</foreignModel>

+  <genPackages prefix="Typerules" basePackage="org.eclipse.viatra2.gtasm" disposableProviderFactory="true"

+      ecorePackage="VTCLTypeRule.ecore#/">

+    <genClasses ecoreClass="VTCLTypeRule.ecore#//RuleSet">

+      <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference VTCLTypeRule.ecore#//RuleSet/extends"/>

+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference VTCLTypeRule.ecore#//RuleSet/typerules"/>

+    </genClasses>

+    <genClasses image="false" ecoreClass="VTCLTypeRule.ecore#//TypeJudgement">

+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute VTCLTypeRule.ecore#//TypeJudgement/isValid"/>

+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute VTCLTypeRule.ecore#//TypeJudgement/result"/>

+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute VTCLTypeRule.ecore#//TypeJudgement/name"/>

+    </genClasses>

+    <genClasses ecoreClass="VTCLTypeRule.ecore#//UnaryTypeJudgement">

+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute VTCLTypeRule.ecore#//UnaryTypeJudgement/operand"/>

+    </genClasses>

+    <genClasses ecoreClass="VTCLTypeRule.ecore#//BinaryTypeJudgement">

+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute VTCLTypeRule.ecore#//BinaryTypeJudgement/firstOperand"/>

+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute VTCLTypeRule.ecore#//BinaryTypeJudgement/secondOperand"/>

+    </genClasses>

+    <genClasses image="false" ecoreClass="VTCLTypeRule.ecore#//TypeRule">

+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference VTCLTypeRule.ecore#//TypeRule/judgements"/>

+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute VTCLTypeRule.ecore#//TypeRule/operator"/>

+    </genClasses>

+    <genClasses ecoreClass="VTCLTypeRule.ecore#//CustomTypeJudgement">

+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute VTCLTypeRule.ecore#//CustomTypeJudgement/operands"/>

+    </genClasses>

+  </genPackages>

+</genmodel:GenModel>

diff --git a/org.eclipse.viatra2.gtasm.typing.model/model/VTCLCore.typerules b/org.eclipse.viatra2.gtasm.typing.model/model/VTCLCore.typerules
new file mode 100644
index 0000000..a276c63
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/model/VTCLCore.typerules
@@ -0,0 +1,281 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<typerules:RuleSet xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:typerules="http:///typerules.ecore">
+  <typerules operator="Or">
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Bool || Bool = Bool" firstOperand="datatypes.Boolean" secondOperand="datatypes.Boolean"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="TOP || * = Bool" firstOperand="TOP" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="* || TOP = Bool" firstOperand="*" secondOperand="TOP"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="BOTTOM || * -> TOP" firstOperand="BOTTOM" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="* || BOTTOM -> TOP" firstOperand="*" secondOperand="BOTTOM"/>
+  </typerules>
+  <typerules operator="And">
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Bool &amp;&amp; Bool=Bool" firstOperand="datatypes.Boolean" secondOperand="datatypes.Boolean"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="* &amp;&amp; TOP = Bool" firstOperand="*" secondOperand="TOP"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="TOP &amp;&amp; * = Bool" firstOperand="TOP" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="BOTTOM &amp;&amp; * -> TOP" firstOperand="BOTTOM" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="* &amp;&amp; BOTTOM -> TOP" firstOperand="*" secondOperand="BOTTOM"/>
+  </typerules>
+  <typerules operator="XOr">
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Bool xor Bool = Bool" firstOperand="datatypes.Boolean" secondOperand="datatypes.Boolean"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="TOP xor * = Bool" firstOperand="TOP" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="* xor TOP = Bool" firstOperand="*" secondOperand="TOP"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="BOTTOM xor * -> TOP" firstOperand="BOTTOM" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="* xor BOTTOM -> TOP" firstOperand="*" secondOperand="BOTTOM"/>
+  </typerules>
+  <typerules operator="Equals">
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="TOP == * -> Boolean" firstOperand="TOP" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="* == TOP -> Boolean" firstOperand="*" secondOperand="TOP"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="BOTTOM == * -> TOP" firstOperand="BOTTOM" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="* == BOTTOM -> TOP" firstOperand="*" secondOperand="BOTTOM"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="MODELELEMENT == MODELELEMENT -> Boolean" firstOperand="MODELELEMENT" secondOperand="MODELELEMENT"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="ENTITY == ENTITY -> Boolean" firstOperand="ENTITY" secondOperand="ENTITY"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="RELATION == RELATION -> Boolean" firstOperand="RELATION" secondOperand="RELATION"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="String == String -> Boolean" firstOperand="datatypes.String" secondOperand="datatypes.String"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Boolean == Boolean -> Boolean" firstOperand="datatypes.Boolean" secondOperand="datatypes.Boolean"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Integer == Integer -> Boolean" firstOperand="datatypes.Integer" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Double == Double -> Boolean" firstOperand="datatypes.Double" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Integer == Double -> Boolean" firstOperand="datatypes.Integer" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Double == Integer -> Boolean" firstOperand="datatypes.Double" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="MultiplicityKind == MultiplicityKind -> Boolean" firstOperand="datatypes.MultiplicityKind" secondOperand="datatypes.MultiplicityKind"/>
+  </typerules>
+  <typerules operator="NotEquals">
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="TOP != * -> Bool" firstOperand="TOP" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="* != TOP -> Bool" firstOperand="*" secondOperand="TOP"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="BOTTOM != * -> TOP" firstOperand="BOTTOM" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="* != BOTTOM -> TOP" firstOperand="*" secondOperand="BOTTOM"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="MODELELEMENT != MODELELEMENT -> Boolean" firstOperand="MODELELEMENT" secondOperand="MODELELEMENT"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="ENTITY != ENTITY -> Boolean" firstOperand="ENTITY" secondOperand="ENTITY"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="RELATION != RELATION -> Boolean" firstOperand="RELATION" secondOperand="RELATION"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="String != String -> Boolean" firstOperand="datatypes.String" secondOperand="datatypes.String"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Boolean != Boolean -> Boolean" firstOperand="datatypes.Boolean" secondOperand="datatypes.Boolean"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Integer != Integer -> Boolean" firstOperand="datatypes.Integer" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Double != Double -> Boolean" firstOperand="datatypes.Double" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Integer != Double -> Boolean" firstOperand="datatypes.Integer" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Double != Integer -> Boolean" firstOperand="datatypes.Double" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="MultiplicityKind != MultiplicityKind -> Boolean" firstOperand="datatypes.MultiplicityKind" secondOperand="datatypes.MultiplicityKind"/>
+  </typerules>
+  <typerules operator="GreaterThan">
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="TOP > * = Bool" firstOperand="TOP" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="* > TOP = Bool" firstOperand="*" secondOperand="TOP"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="BOTTOM > * -> TOP" firstOperand="BOTTOM" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="* > BOTTOM -> TOP" firstOperand="*" secondOperand="BOTTOM"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Integer > Integer = Boolean" firstOperand="datatypes.Integer" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Double > Double = Boolean" firstOperand="datatypes.Double" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Integer > Double = Boolean" firstOperand="datatypes.Integer" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Double > Integer = Boolean" firstOperand="datatypes.Double" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="MultiplicityKind > MultiplicityKind -> Boolean" firstOperand="datatypes.MultiplicityKind" secondOperand="datatypes.MultiplicityKind"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="String > String -> Boolean" firstOperand="datatypes.String" secondOperand="datatypes.String"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="Boolean" name="String > Double -> Boolean" firstOperand="String" secondOperand="Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="Boolean" name="String > Integer -> Boolean" firstOperand="String" secondOperand="Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="Boolean" name="Double > String -> Boolean" firstOperand="Double" secondOperand="String"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="Boolean" name="Integer > String -> Boolean" firstOperand="Integer" secondOperand="String"/>
+  </typerules>
+  <typerules operator="GreaterThanOrEqualTo">
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="TOP >= * = Bool" firstOperand="TOP" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="* >= TOP = Bool" firstOperand="*" secondOperand="TOP"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="BOTTOM >= * -> TOP" firstOperand="BOTTOM" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="* >= BOTTOM -> TOP" firstOperand="*" secondOperand="BOTTOM"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Integer >= Integer = Boolean" firstOperand="datatypes.Integer" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Double >= Double = Boolean" firstOperand="datatypes.Double" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Integer >= Double = Boolean" firstOperand="datatypes.Integer" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Double >= Integer = Boolean" firstOperand="datatypes.Double" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="MultiplicityKind >= MultiplicityKind -> Boolean" firstOperand="datatypes.MultiplicityKind" secondOperand="datatypes.MultiplicityKind"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="String >= String -> Boolean" firstOperand="datatypes.String" secondOperand="datatypes.String"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="String >= Double -> Boolean" firstOperand="datatypes.String" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="String >= Integer -> Boolean" firstOperand="datatypes.String" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Double >= String -> Boolean" firstOperand="datatypes.Double" secondOperand="datatypes.String"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Integer >= String -> Boolean" firstOperand="datatypes.Integer" secondOperand="datatypes.String"/>
+  </typerules>
+  <typerules operator="LessThan">
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="TOP &lt; * = Bool" firstOperand="TOP" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="* &lt; TOP = Bool" firstOperand="*" secondOperand="TOP"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="BOTTOM &lt; * -> TOP" firstOperand="BOTTOM" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="* &lt; BOTTOM -> TOP" firstOperand="*" secondOperand="BOTTOM"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Integer &lt; Integer = Boolean" firstOperand="datatypes.Integer" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Double &lt; Double = Boolean" firstOperand="datatypes.Double" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Integer &lt; Double = Boolean" firstOperand="datatypes.Integer" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Double &lt; Integer = Boolean" firstOperand="datatypes.Double" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="MultiplicityKind &lt; MultiplicityKind -> Boolean" firstOperand="datatypes.MultiplicityKind" secondOperand="datatypes.MultiplicityKind"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="String &lt; String -> Boolean" firstOperand="datatypes.String" secondOperand="datatypes.String"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="String &lt; Double -> Boolean" firstOperand="datatypes.String" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="String &lt; Integer -> Boolean" firstOperand="datatypes.String" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Double &lt; String -> Boolean" firstOperand="datatypes.Double" secondOperand="datatypes.String"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Integer &lt; String -> Boolean" firstOperand="datatypes.Integer" secondOperand="datatypes.String"/>
+  </typerules>
+  <typerules operator="LessThanOrEqualTo">
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="TOP &lt;= * = Bool" firstOperand="TOP" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="* &lt;= TOP = Bool" firstOperand="*" secondOperand="TOP"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="BOTTOM &lt;= * -> TOP" firstOperand="BOTTOM" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="* &lt;= BOTTOM -> TOP" firstOperand="*" secondOperand="BOTTOM"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Integer &lt;= Integer = Boolean" firstOperand="datatypes.Integer" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Double &lt;= Double = Boolean" firstOperand="datatypes.Double" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Integer &lt;= Double = Boolean" firstOperand="datatypes.Integer" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Double &lt;= Integer = Boolean" firstOperand="datatypes.Double" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="MultiplicityKind &lt;= MultiplicityKind -> Boolean" firstOperand="datatypes.MultiplicityKind" secondOperand="datatypes.MultiplicityKind"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="String &lt;= String -> Boolean" firstOperand="datatypes.String" secondOperand="datatypes.String"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="String &lt;= Double -> Boolean" firstOperand="datatypes.String" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="String &lt;= Integer -> Boolean" firstOperand="datatypes.String" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Double &lt;= String -> Boolean" firstOperand="datatypes.Double" secondOperand="datatypes.String"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Boolean" name="Integer &lt;= String -> Boolean" firstOperand="datatypes.Integer" secondOperand="datatypes.String"/>
+  </typerules>
+  <typerules operator="Plus">
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.String" name="String +* = String" firstOperand="datatypes.String" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.String" name="* + String = String" firstOperand="*" secondOperand="datatypes.String"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="TOP + TOP= TOP" firstOperand="TOP" secondOperand="TOP"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="TOP + Boolean = TOP" firstOperand="TOP" secondOperand="datatypes.Boolean"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="Boolean + TOP= TOP" firstOperand="datatypes.Boolean" secondOperand="TOP"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="TOP + Integer = TOP" firstOperand="TOP" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="Integer + TOP= TOP" firstOperand="datatypes.Integer" secondOperand="TOP"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="TOP + Double = TOP" firstOperand="TOP" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="Double + TOP= TOP" firstOperand="datatypes.Double" secondOperand="TOP"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="TOP + MultiplicityKind = TOP" firstOperand="TOP" secondOperand="datatypes.MultiplicityKind"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="MultiplicityKind + TOP= TOP" firstOperand="datatypes.MultiplicityKind" secondOperand="TOP"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="BOTTOM + BOTTOM= TOP" firstOperand="BOTTOM" secondOperand="BOTTOM"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="BOTTOM + Boolean = TOP" firstOperand="BOTTOM" secondOperand="datatypes.Boolean"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="Boolean + BOTTOM= TOP" firstOperand="datatypes.Boolean" secondOperand="BOTTOM"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="BOTTOM + Integer = TOP" firstOperand="BOTTOM" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="Integer + BOTTOM= TOP" firstOperand="datatypes.Integer" secondOperand="BOTTOM"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="BOTTOM + Double = TOP" firstOperand="BOTTOM" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="Double + BOTTOM= TOP" firstOperand="datatypes.Double" secondOperand="BOTTOM"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="BOTTOM + MultiplicityKind = TOP" firstOperand="BOTTOM" secondOperand="datatypes.MultiplicityKind"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="MultiplicityKind + BOTTOM= TOP" firstOperand="datatypes.MultiplicityKind" secondOperand="BOTTOM"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Integer" name="Integer + Integer = Integer" firstOperand="datatypes.Integer" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Double" name="Double + Double = Double" firstOperand="datatypes.Double" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Double" name="Double + Integer = Double" firstOperand="datatypes.Double" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Double" name="Integer + Double = Double" firstOperand="datatypes.Integer" secondOperand="datatypes.Double"/>
+  </typerules>
+  <typerules operator="Minus">
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="TOP - * = TOP" firstOperand="TOP" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="* - TOP = TOP" firstOperand="*" secondOperand="TOP"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="BOTTOM - * -> TOP" firstOperand="BOTTOM" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="* - BOTTOM -> TOP" firstOperand="*" secondOperand="BOTTOM"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Integer" name="Integer - Integer = Integer" firstOperand="datatypes.Integer" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Double" name="Double - Double = Double" firstOperand="datatypes.Double" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Double" name="Double - Integer = Double" firstOperand="datatypes.Double" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Double" name="Integer - Double = Double" firstOperand="datatypes.Integer" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="TOP" name="-TOP = TOP" operand="TOP"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="TOP" name="-BOTTOM = TOP" operand="BOTTOM"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Integer" name="-Integer = Integer" operand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Double" name="-Double = Double" operand="datatypes.Double"/>
+  </typerules>
+  <typerules operator="Multiply">
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="TOP * * = TOP" firstOperand="TOP" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="* * TOP = TOP" firstOperand="*" secondOperand="TOP"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="BOTTOM * * -> TOP" firstOperand="BOTTOM" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="* * BOTTOM -> TOP" firstOperand="*" secondOperand="BOTTOM"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Integer" name="Integer * Integer = Integer" firstOperand="datatypes.Integer" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Double" name="Double * Double = Double" firstOperand="datatypes.Double" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Double" name="Double * Integer = Double" firstOperand="datatypes.Double" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Double" name="Integer * Double = Double" firstOperand="datatypes.Integer" secondOperand="datatypes.Double"/>
+  </typerules>
+  <typerules operator="Division">
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="TOP / * = TOP" firstOperand="TOP" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="* / TOP = TOP" firstOperand="*" secondOperand="TOP"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="BOTTOM / * -> TOP" firstOperand="BOTTOM" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="* / BOTTOM -> TOP" firstOperand="*" secondOperand="BOTTOM"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Integer" name="Integer / Integer = Integer" firstOperand="datatypes.Integer" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Double" name="Double / Double = Double" firstOperand="datatypes.Double" secondOperand="datatypes.Double"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Double" name="Double / Integer = Double" firstOperand="datatypes.Double" secondOperand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Double" name="Integer / Double = Double" firstOperand="datatypes.Integer" secondOperand="datatypes.Double"/>
+  </typerules>
+  <typerules operator="Remainder">
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="TOP % * = TOP" firstOperand="TOP" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="* % TOP = TOP" firstOperand="*" secondOperand="TOP"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="BOTTOM % * -> TOP" firstOperand="BOTTOM" secondOperand="*"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="TOP" name="* % BOTTOM -> TOP" firstOperand="*" secondOperand="BOTTOM"/>
+    <judgements xsi:type="typerules:BinaryTypeJudgement" result="datatypes.Integer" name="Integer % Integer = Integer" firstOperand="datatypes.Integer" secondOperand="datatypes.Integer"/>
+  </typerules>
+  <typerules operator="Aggregate">
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Boolean" name="aggregation(RELATION) = Boolean" operand="RELATION"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="TOP" name="aggergation(BOTTOM) = TOP" operand="BOTTOM"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Boolean" name="aggregation(TOP) = Boolean" operand="TOP"/>
+  </typerules>
+  <typerules operator="Source">
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Boolean" name="source(RELATION) = MODELELEMENT" operand="MODELELEMENT"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="TOP" name="source(BOTTOM) = TOP" operand="BOTTOM"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="MODELELEMENT" name="source(TOP) = MODELELEMENT" operand="TOP"/>
+    <judgements xsi:type="typerules:CustomTypeJudgement" name="typeSource">
+      <operands>operand</operands>
+    </judgements>
+  </typerules>
+  <typerules operator="Target">
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="MODELELEMENT" name="target(RELATION) = MODELELEMENT" operand="RELATION"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="TOP" name="target(BOTTOM) = TOP" operand="BOTTOM"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="MODELELEMENT" name="target(TOP) = MODELELEMENT" operand="TOP"/>
+    <judgements xsi:type="typerules:CustomTypeJudgement" name="typeTarget">
+      <operands>operand</operands>
+    </judgements>
+  </typerules>
+  <typerules operator="ElementReference">
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="MODELELEMENT" name="ref(String) = MODELELEMENT" operand="datatypes.String"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="TOP" name="ref(BOTTOM) = TOP" operand="BOTTOM"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="MODELELEMENT" name="ref(TOP) = MODELELEMENT" operand="TOP"/>
+    <judgements xsi:type="typerules:CustomTypeJudgement" name="typeElementReference">
+      <operands>operand</operands>
+    </judgements>
+  </typerules>
+  <typerules operator="FullyQualifiedName">
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.String" name="fqn(MODELELEMENT) = String" operand="MODELELEMENT"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="TOP" name="fqn(BOTTOM) = TOP" operand="BOTTOM"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.String" name="fqn(TOP) = String" operand="TOP"/>
+  </typerules>
+  <typerules operator="Name">
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.String" name="name(MODELELEMENT) = String" operand="MODELELEMENT"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="TOP" name="name(BOTTOM) = TOP" operand="BOTTOM"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.String" name="name(TOP) = String" operand="TOP"/>
+  </typerules>
+  <typerules operator="Value">
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.String" name="value(ENTITY) = String" operand="ENTITY"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="TOP" name="value(BOTTOM) = TOP" operand="BOTTOM"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.String" name="value(TOP) = String" operand="TOP"/>
+  </typerules>
+  <typerules operator="Inverse">
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="RELATION" name="inverse(RELATION) = RELATION" operand="RELATION"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="TOP" name="source(BOTTOM) = TOP" operand="BOTTOM"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Boolean" name="source(TOP) = Boolean" operand="TOP"/>
+    <judgements xsi:type="typerules:CustomTypeJudgement" result="" name="typeInverse">
+      <operands>operand</operands>
+    </judgements>
+  </typerules>
+  <typerules operator="Multiplicity">
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.MultiplicityKind" name="aggregation(RELATION) = MultiplicityKind" operand="RELATION"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="TOP" name="aggergation(BOTTOM) = TOP" operand="BOTTOM"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.MultiplicityKind" name="aggregation(TOP) = MultiplicityKind" operand="TOP"/>
+  </typerules>
+  <typerules operator="ToString">
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.String" name="toString(*) = String" operand="*"/>
+  </typerules>
+  <typerules operator="ToInt">
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Integer" name="toInt(TOP) = Integer" operand="TOP"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Integer" name="toInt(Integer) = Integer" operand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Integer" name="toInt(String) = Integer" operand="datatypes.String"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Integer" name="toInt(Double) = Integer" operand="datatypes.Double"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="TOP" name="toInt(BOTTOM) = TOP" operand="BOTTOM"/>
+  </typerules>
+  <typerules operator="ToDouble">
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Double" name="toDouble(TOP) = Double" operand="TOP"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Double" name="toDouble(Integer) = Double" operand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Double" name="toDouble(String) = Double" operand="datatypes.String"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Double" name="toDouble(Double) = Double" operand="datatypes.Double"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="TOP" name="toDouble(BOTTOM) = TOP" operand="BOTTOM"/>
+  </typerules>
+  <typerules operator="ToBoolean">
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Boolean" name="toBoolean(TOP) = Boolean" operand="TOP"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Boolean" name="toBoolean(Integer) = Boolean" operand="datatypes.Integer"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Boolean" name="toBoolean(String) = Boolean" operand="datatypes.String"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Boolean" name="toBoolean(Double) = Boolean" operand="datatypes.Double"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Boolean" name="toBoolean(Boolean) = Boolean" operand="datatypes.Boolean"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="TOP" name="toBoolean(BOTTOM) = TOP" operand="BOTTOM"/>
+  </typerules>
+  <typerules operator="ToMultiplicity">
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.MultiplicityKind" name="toMultiplicity(TOP) = MultiplicityKind" operand="TOP"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.MultiplicityKind" name="toMultiplicity(MultiplicityKind) = MultiplicityKind" operand="datatypes.MultiplicityKind"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.MultiplicityKind" name="toMultiplicity(String) = MultiplicityKind" operand="datatypes.String"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Integer" name="toInt(Double) = Integer" operand="datatypes.Double"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="TOP" name="toMultiplicity(BOTTOM) = TOP" operand="BOTTOM"/>
+  </typerules>
+  <typerules operator="Not">
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Boolean" name="!Boolean = Boolean" operand="datatypes.Boolean"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="datatypes.Boolean" name="!TOP = Boolean" operand="TOP"/>
+    <judgements xsi:type="typerules:UnaryTypeJudgement" result="TOP" name="!BOTTOM = TOP" operand="BOTTOM"/>
+  </typerules>
+</typerules:RuleSet>
diff --git a/org.eclipse.viatra2.gtasm.typing.model/model/VTCLTypeRule.ecore b/org.eclipse.viatra2.gtasm.typing.model/model/VTCLTypeRule.ecore
new file mode 100644
index 0000000..675f4dd
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/model/VTCLTypeRule.ecore
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<ecore:EPackage xmi:version="2.0"

+    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

+    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="typerules"

+    nsURI="http:///typerules.ecore" nsPrefix="typerules">

+  <eClassifiers xsi:type="ecore:EClass" name="RuleSet">

+    <eStructuralFeatures xsi:type="ecore:EReference" name="extends" eType="#//RuleSet"/>

+    <eStructuralFeatures xsi:type="ecore:EReference" name="typerules" upperBound="-1"

+        eType="#//TypeRule" containment="true"/>

+  </eClassifiers>

+  <eClassifiers xsi:type="ecore:EClass" name="TypeJudgement" abstract="true">

+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="isValid" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"

+        defaultValueLiteral="true"/>

+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="result" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>

+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>

+  </eClassifiers>

+  <eClassifiers xsi:type="ecore:EClass" name="UnaryTypeJudgement" eSuperTypes="#//TypeJudgement">

+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="operand" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>

+  </eClassifiers>

+  <eClassifiers xsi:type="ecore:EClass" name="BinaryTypeJudgement" eSuperTypes="#//TypeJudgement">

+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="firstOperand" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>

+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="secondOperand" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>

+  </eClassifiers>

+  <eClassifiers xsi:type="ecore:EClass" name="TypeRule">

+    <eStructuralFeatures xsi:type="ecore:EReference" name="judgements" upperBound="-1"

+        eType="#//TypeJudgement" containment="true"/>

+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="operator" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>

+  </eClassifiers>

+  <eClassifiers xsi:type="ecore:EClass" name="CustomTypeJudgement" eSuperTypes="#//TypeJudgement">

+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="operands" upperBound="-1"

+        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>

+  </eClassifiers>

+</ecore:EPackage>

diff --git a/org.eclipse.viatra2.gtasm.typing.model/model/VTCLTypeRule.ecore_diagram b/org.eclipse.viatra2.gtasm.typing.model/model/VTCLTypeRule.ecore_diagram
new file mode 100644
index 0000000..0906a1c
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/model/VTCLTypeRule.ecore_diagram
@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation" xmi:id="_qsha0cHtEd2yKpZQ17_Few" type="Ecore" measurementUnit="Pixel">

+  <children xmi:type="notation:Node" xmi:id="_sOkcYMHtEd2yKpZQ17_Few" type="2001">

+    <children xmi:type="notation:Node" xmi:id="_sOuNYsHtEd2yKpZQ17_Few" type="5001"/>

+    <children xmi:type="notation:Node" xmi:id="_sOuNY8HtEd2yKpZQ17_Few" type="7001">

+      <styles xmi:type="notation:DrawerStyle" xmi:id="_sOuNZMHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:SortingStyle" xmi:id="_sOuNZcHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:FilteringStyle" xmi:id="_sOuNZsHtEd2yKpZQ17_Few"/>

+    </children>

+    <children xmi:type="notation:Node" xmi:id="_sOuNZ8HtEd2yKpZQ17_Few" type="7002">

+      <styles xmi:type="notation:DrawerStyle" xmi:id="_sOuNaMHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:SortingStyle" xmi:id="_sOuNacHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:FilteringStyle" xmi:id="_sOuNasHtEd2yKpZQ17_Few"/>

+    </children>

+    <children xmi:type="notation:Node" xmi:id="_sOuNa8HtEd2yKpZQ17_Few" type="7003">

+      <styles xmi:type="notation:DrawerStyle" xmi:id="_sOuNbMHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:SortingStyle" xmi:id="_sOuNbcHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:FilteringStyle" xmi:id="_sOuNbsHtEd2yKpZQ17_Few"/>

+    </children>

+    <styles xmi:type="notation:ShapeStyle" xmi:id="_sOuNYMHtEd2yKpZQ17_Few" lineColor="4210752"/>

+    <element xmi:type="ecore:EClass" href="VTCLTypeRule.ecore#//RuleSet"/>

+    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_sOuNYcHtEd2yKpZQ17_Few" x="348" y="84"/>

+  </children>

+  <children xmi:type="notation:Node" xmi:id="_tuiaUMHtEd2yKpZQ17_Few" type="2001">

+    <children xmi:type="notation:Node" xmi:id="_tuiaU8HtEd2yKpZQ17_Few" type="5001"/>

+    <children xmi:type="notation:Node" xmi:id="_tuiaVMHtEd2yKpZQ17_Few" type="7001">

+      <children xmi:type="notation:Node" xmi:id="_veLWgMHuEd2yKpZQ17_Few" type="3001">

+        <element xmi:type="ecore:EAttribute" href="VTCLTypeRule.ecore#//TypeJudgement/isValid"/>

+        <layoutConstraint xmi:type="notation:Location" xmi:id="_veLWgcHuEd2yKpZQ17_Few"/>

+      </children>

+      <children xmi:type="notation:Node" xmi:id="_71R2EMHuEd2yKpZQ17_Few" type="3001">

+        <element xmi:type="ecore:EAttribute" href="VTCLTypeRule.ecore#//TypeJudgement/result"/>

+        <layoutConstraint xmi:type="notation:Location" xmi:id="_71R2EcHuEd2yKpZQ17_Few"/>

+      </children>

+      <children xmi:type="notation:Node" xmi:id="_UlGpAMHzEd2yKpZQ17_Few" type="3001">

+        <element xmi:type="ecore:EAttribute" href="VTCLTypeRule.ecore#//TypeJudgement/name"/>

+        <layoutConstraint xmi:type="notation:Location" xmi:id="_UlGpAcHzEd2yKpZQ17_Few"/>

+      </children>

+      <styles xmi:type="notation:DrawerStyle" xmi:id="_tuiaVcHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:SortingStyle" xmi:id="_tuiaVsHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:FilteringStyle" xmi:id="_tuiaV8HtEd2yKpZQ17_Few"/>

+    </children>

+    <children xmi:type="notation:Node" xmi:id="_tuiaWMHtEd2yKpZQ17_Few" type="7002">

+      <styles xmi:type="notation:DrawerStyle" xmi:id="_tuiaWcHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:SortingStyle" xmi:id="_tuiaWsHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:FilteringStyle" xmi:id="_tuiaW8HtEd2yKpZQ17_Few"/>

+    </children>

+    <children xmi:type="notation:Node" xmi:id="_tuiaXMHtEd2yKpZQ17_Few" type="7003">

+      <styles xmi:type="notation:DrawerStyle" xmi:id="_tuiaXcHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:SortingStyle" xmi:id="_tuiaXsHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:FilteringStyle" xmi:id="_tuiaX8HtEd2yKpZQ17_Few"/>

+    </children>

+    <styles xmi:type="notation:ShapeStyle" xmi:id="_tuiaUcHtEd2yKpZQ17_Few" lineColor="4210752"/>

+    <element xmi:type="ecore:EClass" href="VTCLTypeRule.ecore#//TypeJudgement"/>

+    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tuiaUsHtEd2yKpZQ17_Few" x="121" y="256"/>

+  </children>

+  <children xmi:type="notation:Node" xmi:id="_3GKRAMHtEd2yKpZQ17_Few" type="2001">

+    <children xmi:type="notation:Node" xmi:id="_3GKRA8HtEd2yKpZQ17_Few" type="5001"/>

+    <children xmi:type="notation:Node" xmi:id="_3GKRBMHtEd2yKpZQ17_Few" type="7001">

+      <children xmi:type="notation:Node" xmi:id="_K20YEMHuEd2yKpZQ17_Few" type="3001">

+        <element xmi:type="ecore:EAttribute" href="VTCLTypeRule.ecore#//UnaryTypeJudgement/operand"/>

+        <layoutConstraint xmi:type="notation:Location" xmi:id="_K20YEcHuEd2yKpZQ17_Few"/>

+      </children>

+      <styles xmi:type="notation:DrawerStyle" xmi:id="_3GKRBcHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:SortingStyle" xmi:id="_3GKRBsHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:FilteringStyle" xmi:id="_3GKRB8HtEd2yKpZQ17_Few"/>

+    </children>

+    <children xmi:type="notation:Node" xmi:id="_3GUCAMHtEd2yKpZQ17_Few" type="7002">

+      <styles xmi:type="notation:DrawerStyle" xmi:id="_3GUCAcHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:SortingStyle" xmi:id="_3GUCAsHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:FilteringStyle" xmi:id="_3GUCA8HtEd2yKpZQ17_Few"/>

+    </children>

+    <children xmi:type="notation:Node" xmi:id="_3GUCBMHtEd2yKpZQ17_Few" type="7003">

+      <styles xmi:type="notation:DrawerStyle" xmi:id="_3GUCBcHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:SortingStyle" xmi:id="_3GUCBsHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:FilteringStyle" xmi:id="_3GUCB8HtEd2yKpZQ17_Few"/>

+    </children>

+    <styles xmi:type="notation:ShapeStyle" xmi:id="_3GKRAcHtEd2yKpZQ17_Few" lineColor="4210752"/>

+    <element xmi:type="ecore:EClass" href="VTCLTypeRule.ecore#//UnaryTypeJudgement"/>

+    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3GKRAsHtEd2yKpZQ17_Few" x="84" y="389"/>

+  </children>

+  <children xmi:type="notation:Node" xmi:id="_36dbwMHtEd2yKpZQ17_Few" type="2001">

+    <children xmi:type="notation:Node" xmi:id="_36dbw8HtEd2yKpZQ17_Few" type="5001"/>

+    <children xmi:type="notation:Node" xmi:id="_36dbxMHtEd2yKpZQ17_Few" type="7001">

+      <children xmi:type="notation:Node" xmi:id="_OgU1YMHuEd2yKpZQ17_Few" type="3001">

+        <element xmi:type="ecore:EAttribute" href="VTCLTypeRule.ecore#//BinaryTypeJudgement/firstOperand"/>

+        <layoutConstraint xmi:type="notation:Location" xmi:id="_OgU1YcHuEd2yKpZQ17_Few"/>

+      </children>

+      <children xmi:type="notation:Node" xmi:id="_TjhpgMHuEd2yKpZQ17_Few" type="3001">

+        <element xmi:type="ecore:EAttribute" href="VTCLTypeRule.ecore#//BinaryTypeJudgement/secondOperand"/>

+        <layoutConstraint xmi:type="notation:Location" xmi:id="_TjhpgcHuEd2yKpZQ17_Few"/>

+      </children>

+      <styles xmi:type="notation:DrawerStyle" xmi:id="_36dbxcHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:SortingStyle" xmi:id="_36dbxsHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:FilteringStyle" xmi:id="_36dbx8HtEd2yKpZQ17_Few"/>

+    </children>

+    <children xmi:type="notation:Node" xmi:id="_36dbyMHtEd2yKpZQ17_Few" type="7002">

+      <styles xmi:type="notation:DrawerStyle" xmi:id="_36dbycHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:SortingStyle" xmi:id="_36dbysHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:FilteringStyle" xmi:id="_36dby8HtEd2yKpZQ17_Few"/>

+    </children>

+    <children xmi:type="notation:Node" xmi:id="_36dbzMHtEd2yKpZQ17_Few" type="7003">

+      <styles xmi:type="notation:DrawerStyle" xmi:id="_36dbzcHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:SortingStyle" xmi:id="_36dbzsHtEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:FilteringStyle" xmi:id="_36dbz8HtEd2yKpZQ17_Few"/>

+    </children>

+    <styles xmi:type="notation:ShapeStyle" xmi:id="_36dbwcHtEd2yKpZQ17_Few" lineColor="4210752"/>

+    <element xmi:type="ecore:EClass" href="VTCLTypeRule.ecore#//BinaryTypeJudgement"/>

+    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_36dbwsHtEd2yKpZQ17_Few" x="269" y="386"/>

+  </children>

+  <children xmi:type="notation:Node" xmi:id="_D5QMMMHyEd2yKpZQ17_Few" type="2001">

+    <children xmi:type="notation:Node" xmi:id="_D5QMM8HyEd2yKpZQ17_Few" type="5001"/>

+    <children xmi:type="notation:Node" xmi:id="_D5QMNMHyEd2yKpZQ17_Few" type="7001">

+      <children xmi:type="notation:Node" xmi:id="_DL-zUMHuEd2yKpZQ17_Few" type="3001">

+        <element xmi:type="ecore:EAttribute" href="VTCLTypeRule.ecore#//TypeRule/operator"/>

+        <layoutConstraint xmi:type="notation:Location" xmi:id="_DL-zUcHuEd2yKpZQ17_Few"/>

+      </children>

+      <styles xmi:type="notation:DrawerStyle" xmi:id="_D5QMNcHyEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:SortingStyle" xmi:id="_D5QMNsHyEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:FilteringStyle" xmi:id="_D5QMN8HyEd2yKpZQ17_Few"/>

+    </children>

+    <children xmi:type="notation:Node" xmi:id="_D5QMOMHyEd2yKpZQ17_Few" type="7002">

+      <styles xmi:type="notation:DrawerStyle" xmi:id="_D5QMOcHyEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:SortingStyle" xmi:id="_D5QMOsHyEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:FilteringStyle" xmi:id="_D5QMO8HyEd2yKpZQ17_Few"/>

+    </children>

+    <children xmi:type="notation:Node" xmi:id="_D5QMPMHyEd2yKpZQ17_Few" type="7003">

+      <styles xmi:type="notation:DrawerStyle" xmi:id="_D5QMPcHyEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:SortingStyle" xmi:id="_D5QMPsHyEd2yKpZQ17_Few"/>

+      <styles xmi:type="notation:FilteringStyle" xmi:id="_D5QMP8HyEd2yKpZQ17_Few"/>

+    </children>

+    <styles xmi:type="notation:ShapeStyle" xmi:id="_D5QMMcHyEd2yKpZQ17_Few" lineColor="4210752"/>

+    <element xmi:type="ecore:EClass" href="VTCLTypeRule.ecore#//TypeRule"/>

+    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_D5QMMsHyEd2yKpZQ17_Few" x="132" y="84"/>

+  </children>

+  <children xmi:type="notation:Node" xmi:id="_lyycAMH-Ed2yKpZQ17_Few" type="2001">

+    <children xmi:type="notation:Node" xmi:id="_lyycA8H-Ed2yKpZQ17_Few" type="5001"/>

+    <children xmi:type="notation:Node" xmi:id="_lyycBMH-Ed2yKpZQ17_Few" type="7001">

+      <children xmi:type="notation:Node" xmi:id="_0q0nQMH-Ed2yKpZQ17_Few" type="3001">

+        <element xmi:type="ecore:EAttribute" href="VTCLTypeRule.ecore#//CustomTypeJudgement/operands"/>

+        <layoutConstraint xmi:type="notation:Location" xmi:id="_0q0nQcH-Ed2yKpZQ17_Few"/>

+      </children>

+      <styles xmi:type="notation:DrawerStyle" xmi:id="_lyycBcH-Ed2yKpZQ17_Few"/>

+      <styles xmi:type="notation:SortingStyle" xmi:id="_lyycBsH-Ed2yKpZQ17_Few"/>

+      <styles xmi:type="notation:FilteringStyle" xmi:id="_lyycB8H-Ed2yKpZQ17_Few"/>

+    </children>

+    <children xmi:type="notation:Node" xmi:id="_lyycCMH-Ed2yKpZQ17_Few" type="7002">

+      <styles xmi:type="notation:DrawerStyle" xmi:id="_lyycCcH-Ed2yKpZQ17_Few"/>

+      <styles xmi:type="notation:SortingStyle" xmi:id="_lyycCsH-Ed2yKpZQ17_Few"/>

+      <styles xmi:type="notation:FilteringStyle" xmi:id="_lyycC8H-Ed2yKpZQ17_Few"/>

+    </children>

+    <children xmi:type="notation:Node" xmi:id="_lyycDMH-Ed2yKpZQ17_Few" type="7003">

+      <styles xmi:type="notation:DrawerStyle" xmi:id="_lyycDcH-Ed2yKpZQ17_Few"/>

+      <styles xmi:type="notation:SortingStyle" xmi:id="_lyycDsH-Ed2yKpZQ17_Few"/>

+      <styles xmi:type="notation:FilteringStyle" xmi:id="_lyycD8H-Ed2yKpZQ17_Few"/>

+    </children>

+    <styles xmi:type="notation:ShapeStyle" xmi:id="_lyycAcH-Ed2yKpZQ17_Few" lineColor="4210752"/>

+    <element xmi:type="ecore:EClass" href="VTCLTypeRule.ecore#//CustomTypeJudgement"/>

+    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lyycAsH-Ed2yKpZQ17_Few" x="470" y="394"/>

+  </children>

+  <styles xmi:type="notation:DiagramStyle" xmi:id="_qsha0sHtEd2yKpZQ17_Few"/>

+  <element xmi:type="ecore:EPackage" href="VTCLTypeRule.ecore#/"/>

+  <edges xmi:type="notation:Edge" xmi:id="_u0k1UMHtEd2yKpZQ17_Few" type="4003" source="_D5QMMMHyEd2yKpZQ17_Few" target="_tuiaUMHtEd2yKpZQ17_Few">

+    <children xmi:type="notation:Node" xmi:id="_u0t_QMHtEd2yKpZQ17_Few" type="6002">

+      <layoutConstraint xmi:type="notation:Location" xmi:id="_u0t_QcHtEd2yKpZQ17_Few" x="27" y="23"/>

+    </children>

+    <children xmi:type="notation:Node" xmi:id="_u0t_QsHtEd2yKpZQ17_Few" type="6004">

+      <layoutConstraint xmi:type="notation:Location" xmi:id="_u0t_Q8HtEd2yKpZQ17_Few" x="-3" y="-32"/>

+    </children>

+    <styles xmi:type="notation:ConnectorStyle" xmi:id="_u0k1UcHtEd2yKpZQ17_Few" lineColor="4210752"/>

+    <styles xmi:type="notation:FontStyle" xmi:id="_u0k1UsHtEd2yKpZQ17_Few"/>

+    <element xmi:type="ecore:EReference" href="VTCLTypeRule.ecore#//TypeRule/judgements"/>

+    <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_u0k1U8HtEd2yKpZQ17_Few" points="[1, 10, 2, -110]$[1, 94, 2, -26]"/>

+    <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_u16SEMHtEd2yKpZQ17_Few" id="(0.46875,0.8076923)"/>

+  </edges>

+  <edges xmi:type="notation:Edge" xmi:id="_5SOf8MHtEd2yKpZQ17_Few" type="4004" source="_3GKRAMHtEd2yKpZQ17_Few" target="_tuiaUMHtEd2yKpZQ17_Few">

+    <styles xmi:type="notation:ConnectorStyle" xmi:id="_5SOf8cHtEd2yKpZQ17_Few" lineColor="4210752"/>

+    <styles xmi:type="notation:FontStyle" xmi:id="_5SOf8sHtEd2yKpZQ17_Few"/>

+    <element xsi:nil="true"/>

+    <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_5SOf88HtEd2yKpZQ17_Few" points="[4, -26, -18, 107]$[18, -107, -4, 26]"/>

+  </edges>

+  <edges xmi:type="notation:Edge" xmi:id="_5rHhEMHtEd2yKpZQ17_Few" type="4004" source="_36dbwMHtEd2yKpZQ17_Few" target="_tuiaUMHtEd2yKpZQ17_Few">

+    <styles xmi:type="notation:ConnectorStyle" xmi:id="_5rHhEcHtEd2yKpZQ17_Few" lineColor="4210752"/>

+    <styles xmi:type="notation:FontStyle" xmi:id="_5rHhEsHtEd2yKpZQ17_Few"/>

+    <element xsi:nil="true"/>

+    <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_5rHhE8HtEd2yKpZQ17_Few" points="[-32, -26, 132, 104]$[-129, -121, 35, 9]"/>

+  </edges>

+  <edges xmi:type="notation:Edge" xmi:id="_jpfngMHuEd2yKpZQ17_Few" type="4002" source="_sOkcYMHtEd2yKpZQ17_Few" target="_sOkcYMHtEd2yKpZQ17_Few">

+    <children xmi:type="notation:Node" xmi:id="_jpfnhMHuEd2yKpZQ17_Few" type="6001">

+      <layoutConstraint xmi:type="notation:Location" xmi:id="_jpfnhcHuEd2yKpZQ17_Few" x="-67" y="20"/>

+    </children>

+    <children xmi:type="notation:Node" xmi:id="_jpfnhsHuEd2yKpZQ17_Few" type="6003">

+      <layoutConstraint xmi:type="notation:Location" xmi:id="_jpfnh8HuEd2yKpZQ17_Few" y="60"/>

+    </children>

+    <styles xmi:type="notation:ConnectorStyle" xmi:id="_jpfngcHuEd2yKpZQ17_Few" lineColor="4210752"/>

+    <styles xmi:type="notation:FontStyle" xmi:id="_jpfngsHuEd2yKpZQ17_Few"/>

+    <element xmi:type="ecore:EReference" href="VTCLTypeRule.ecore#//RuleSet/extends"/>

+    <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_jpfng8HuEd2yKpZQ17_Few" points="[7, 0, 10, -10]$[69, 0, 72, -10]$[69, 86, 72, 76]$[-8, 86, -5, 76]$[-8, 24, -5, 14]"/>

+    <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_nHYDoMHuEd2yKpZQ17_Few" id="(0.8852459,0.53846157)"/>

+    <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_jp8TcMHuEd2yKpZQ17_Few" id="(0.8360656,0.7307692)"/>

+  </edges>

+  <edges xmi:type="notation:Edge" xmi:id="_ZBPSkMHyEd2yKpZQ17_Few" type="4003" source="_sOkcYMHtEd2yKpZQ17_Few" target="_D5QMMMHyEd2yKpZQ17_Few">

+    <children xmi:type="notation:Node" xmi:id="_ZBPSlMHyEd2yKpZQ17_Few" type="6002">

+      <layoutConstraint xmi:type="notation:Location" xmi:id="_ZBPSlcHyEd2yKpZQ17_Few" y="40"/>

+    </children>

+    <children xmi:type="notation:Node" xmi:id="_ZBPSlsHyEd2yKpZQ17_Few" type="6004">

+      <layoutConstraint xmi:type="notation:Location" xmi:id="_ZBPSl8HyEd2yKpZQ17_Few" y="60"/>

+    </children>

+    <styles xmi:type="notation:ConnectorStyle" xmi:id="_ZBPSkcHyEd2yKpZQ17_Few" lineColor="4210752"/>

+    <styles xmi:type="notation:FontStyle" xmi:id="_ZBPSksHyEd2yKpZQ17_Few"/>

+    <element xmi:type="ecore:EReference" href="VTCLTypeRule.ecore#//RuleSet/typerules"/>

+    <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ZBPSk8HyEd2yKpZQ17_Few" points="[-12, -1, 178, -14]$[-153, -16, 37, -29]"/>

+    <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ZBPSmMHyEd2yKpZQ17_Few" id="(0.19672132,0.30769232)"/>

+  </edges>

+  <edges xmi:type="notation:Edge" xmi:id="_pyo8wMH-Ed2yKpZQ17_Few" type="4004" source="_lyycAMH-Ed2yKpZQ17_Few" target="_tuiaUMHtEd2yKpZQ17_Few">

+    <styles xmi:type="notation:ConnectorStyle" xmi:id="_pyo8wcH-Ed2yKpZQ17_Few" lineColor="4210752"/>

+    <styles xmi:type="notation:FontStyle" xmi:id="_pyo8wsH-Ed2yKpZQ17_Few"/>

+    <element xsi:nil="true"/>

+    <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_pyo8w8H-Ed2yKpZQ17_Few" points="[-29, -9, 293, 92]$[-309, -101, 13, 0]"/>

+    <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pyo8xMH-Ed2yKpZQ17_Few" id="(0.46,0.17307693)"/>

+    <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pyo8xcH-Ed2yKpZQ17_Few" id="(0.88073397,0.50549453)"/>

+  </edges>

+</notation:Diagram>

diff --git a/org.eclipse.viatra2.gtasm.typing.model/plugin.properties b/org.eclipse.viatra2.gtasm.typing.model/plugin.properties
new file mode 100644
index 0000000..26b240f
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/plugin.properties
@@ -0,0 +1,20 @@
+

+# <copyright>

+# </copyright>

+#

+# $Id$

+

+# ====================================================================

+# To code developer:

+#   Do NOT change the properties between this line and the

+#   "%%% END OF TRANSLATED PROPERTIES %%%" line.

+#   Make a new property name, append to the end of the file and change

+#   the code to use the new property.

+# ====================================================================

+

+# ====================================================================

+# %%% END OF TRANSLATED PROPERTIES %%%

+# ====================================================================

+

+pluginName = TypeRules Model

+providerName = www.example.org

diff --git a/org.eclipse.viatra2.gtasm.typing.model/plugin.xml b/org.eclipse.viatra2.gtasm.typing.model/plugin.xml
new file mode 100644
index 0000000..5d82ab5
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/plugin.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<?eclipse version="3.0"?>

+

+<!--

+ <copyright>

+ </copyright>

+

+ $Id$

+-->

+

+<plugin>

+

+  <extension point="org.eclipse.emf.ecore.generated_package">

+    <package 

+       uri = "http:///typerules.ecore" 

+       class = "org.eclipse.viatra2.gtasm.typerules.TyperulesPackage"

+       genModel = "model/TypeRules.genmodel" /> 

+  </extension>

+

+</plugin>

diff --git a/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/BinaryTypeJudgement.java b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/BinaryTypeJudgement.java
new file mode 100644
index 0000000..fef74bb
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/BinaryTypeJudgement.java
@@ -0,0 +1,87 @@
+/**

+ *  * Copyright (c) 2008 Daniel Varro

+ *  * All rights reserved. This program and the accompanying materials

+ *  * are made available under the terms of the Eclipse Public License v1.0

+ *  * which accompanies this distribution, and is available at

+ *  * http://www.eclipse.org/legal/epl-v10.html

+ *  *

+ *  * Contributors:

+ *  *    Daniel Varro - initial API and implementation

+ * 

+ *

+ * $Id$

+ */

+package org.eclipse.viatra2.gtasm.typerules;

+

+

+/**

+ * <!-- begin-user-doc -->

+ * A representation of the model object '<em><b>Binary Type Judgement</b></em>'.

+ * <!-- end-user-doc -->

+ *

+ * <p>

+ * The following features are supported:

+ * <ul>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.BinaryTypeJudgement#getFirstOperand <em>First Operand</em>}</li>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.BinaryTypeJudgement#getSecondOperand <em>Second Operand</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage#getBinaryTypeJudgement()

+ * @model

+ * @generated

+ */

+public interface BinaryTypeJudgement extends TypeJudgement {

+	/**

+	 * Returns the value of the '<em><b>First Operand</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <p>

+	 * If the meaning of the '<em>First Operand</em>' attribute isn't clear,

+	 * there really should be more of a description here...

+	 * </p>

+	 * <!-- end-user-doc -->

+	 * @return the value of the '<em>First Operand</em>' attribute.

+	 * @see #setFirstOperand(String)

+	 * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage#getBinaryTypeJudgement_FirstOperand()

+	 * @model

+	 * @generated

+	 */

+	String getFirstOperand();

+

+	/**

+	 * Sets the value of the '{@link org.eclipse.viatra2.gtasm.typerules.BinaryTypeJudgement#getFirstOperand <em>First Operand</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @param value the new value of the '<em>First Operand</em>' attribute.

+	 * @see #getFirstOperand()

+	 * @generated

+	 */

+	void setFirstOperand(String value);

+

+	/**

+	 * Returns the value of the '<em><b>Second Operand</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <p>

+	 * If the meaning of the '<em>Second Operand</em>' attribute isn't clear,

+	 * there really should be more of a description here...

+	 * </p>

+	 * <!-- end-user-doc -->

+	 * @return the value of the '<em>Second Operand</em>' attribute.

+	 * @see #setSecondOperand(String)

+	 * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage#getBinaryTypeJudgement_SecondOperand()

+	 * @model

+	 * @generated

+	 */

+	String getSecondOperand();

+

+	/**

+	 * Sets the value of the '{@link org.eclipse.viatra2.gtasm.typerules.BinaryTypeJudgement#getSecondOperand <em>Second Operand</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @param value the new value of the '<em>Second Operand</em>' attribute.

+	 * @see #getSecondOperand()

+	 * @generated

+	 */

+	void setSecondOperand(String value);

+

+} // BinaryTypeJudgement

diff --git a/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/CustomTypeJudgement.java b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/CustomTypeJudgement.java
new file mode 100644
index 0000000..0b0e74d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/CustomTypeJudgement.java
@@ -0,0 +1,51 @@
+/**

+ *  * Copyright (c) 2008 Daniel Varro

+ *  * All rights reserved. This program and the accompanying materials

+ *  * are made available under the terms of the Eclipse Public License v1.0

+ *  * which accompanies this distribution, and is available at

+ *  * http://www.eclipse.org/legal/epl-v10.html

+ *  *

+ *  * Contributors:

+ *  *    Daniel Varro - initial API and implementation

+ * 

+ *

+ * $Id$

+ */

+package org.eclipse.viatra2.gtasm.typerules;

+

+import org.eclipse.emf.common.util.EList;

+

+/**

+ * <!-- begin-user-doc -->

+ * A representation of the model object '<em><b>Custom Type Judgement</b></em>'.

+ * <!-- end-user-doc -->

+ *

+ * <p>

+ * The following features are supported:

+ * <ul>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.CustomTypeJudgement#getOperands <em>Operands</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage#getCustomTypeJudgement()

+ * @model

+ * @generated

+ */

+public interface CustomTypeJudgement extends TypeJudgement {

+	/**

+	 * Returns the value of the '<em><b>Operands</b></em>' attribute list.

+	 * The list contents are of type {@link java.lang.String}.

+	 * <!-- begin-user-doc -->

+	 * <p>

+	 * If the meaning of the '<em>Operands</em>' attribute list isn't clear,

+	 * there really should be more of a description here...

+	 * </p>

+	 * <!-- end-user-doc -->

+	 * @return the value of the '<em>Operands</em>' attribute list.

+	 * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage#getCustomTypeJudgement_Operands()

+	 * @model

+	 * @generated

+	 */

+	EList<String> getOperands();

+

+} // CustomTypeJudgement

diff --git a/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/RuleSet.java b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/RuleSet.java
new file mode 100644
index 0000000..3e75b7d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/RuleSet.java
@@ -0,0 +1,80 @@
+/**

+ *  * Copyright (c) 2008 Daniel Varro

+ *  * All rights reserved. This program and the accompanying materials

+ *  * are made available under the terms of the Eclipse Public License v1.0

+ *  * which accompanies this distribution, and is available at

+ *  * http://www.eclipse.org/legal/epl-v10.html

+ *  *

+ *  * Contributors:

+ *  *    Daniel Varro - initial API and implementation

+ * 

+ *

+ * $Id$

+ */

+package org.eclipse.viatra2.gtasm.typerules;

+

+import org.eclipse.emf.common.util.EList;

+

+import org.eclipse.emf.ecore.EObject;

+

+/**

+ * <!-- begin-user-doc -->

+ * A representation of the model object '<em><b>Rule Set</b></em>'.

+ * <!-- end-user-doc -->

+ *

+ * <p>

+ * The following features are supported:

+ * <ul>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.RuleSet#getExtends <em>Extends</em>}</li>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.RuleSet#getTyperules <em>Typerules</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage#getRuleSet()

+ * @model

+ * @generated

+ */

+public interface RuleSet extends EObject {

+	/**

+	 * Returns the value of the '<em><b>Extends</b></em>' reference.

+	 * <!-- begin-user-doc -->

+	 * <p>

+	 * If the meaning of the '<em>Extends</em>' reference isn't clear,

+	 * there really should be more of a description here...

+	 * </p>

+	 * <!-- end-user-doc -->

+	 * @return the value of the '<em>Extends</em>' reference.

+	 * @see #setExtends(RuleSet)

+	 * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage#getRuleSet_Extends()

+	 * @model

+	 * @generated

+	 */

+	RuleSet getExtends();

+

+	/**

+	 * Sets the value of the '{@link org.eclipse.viatra2.gtasm.typerules.RuleSet#getExtends <em>Extends</em>}' reference.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @param value the new value of the '<em>Extends</em>' reference.

+	 * @see #getExtends()

+	 * @generated

+	 */

+	void setExtends(RuleSet value);

+

+	/**

+	 * Returns the value of the '<em><b>Typerules</b></em>' containment reference list.

+	 * The list contents are of type {@link org.eclipse.viatra2.gtasm.typerules.TypeRule}.

+	 * <!-- begin-user-doc -->

+	 * <p>

+	 * If the meaning of the '<em>Typerules</em>' containment reference list isn't clear,

+	 * there really should be more of a description here...

+	 * </p>

+	 * <!-- end-user-doc -->

+	 * @return the value of the '<em>Typerules</em>' containment reference list.

+	 * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage#getRuleSet_Typerules()

+	 * @model containment="true"

+	 * @generated

+	 */

+	EList<TypeRule> getTyperules();

+

+} // RuleSet

diff --git a/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/TypeJudgement.java b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/TypeJudgement.java
new file mode 100644
index 0000000..9913bc9
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/TypeJudgement.java
@@ -0,0 +1,116 @@
+/**

+ *  * Copyright (c) 2008 Daniel Varro

+ *  * All rights reserved. This program and the accompanying materials

+ *  * are made available under the terms of the Eclipse Public License v1.0

+ *  * which accompanies this distribution, and is available at

+ *  * http://www.eclipse.org/legal/epl-v10.html

+ *  *

+ *  * Contributors:

+ *  *    Daniel Varro - initial API and implementation

+ * 

+ *

+ * $Id$

+ */

+package org.eclipse.viatra2.gtasm.typerules;

+

+import org.eclipse.emf.ecore.EObject;

+

+/**

+ * <!-- begin-user-doc -->

+ * A representation of the model object '<em><b>Type Judgement</b></em>'.

+ * <!-- end-user-doc -->

+ *

+ * <p>

+ * The following features are supported:

+ * <ul>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.TypeJudgement#isIsValid <em>Is Valid</em>}</li>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.TypeJudgement#getResult <em>Result</em>}</li>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.TypeJudgement#getName <em>Name</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage#getTypeJudgement()

+ * @model abstract="true"

+ * @generated

+ */

+public interface TypeJudgement extends EObject {

+	/**

+	 * Returns the value of the '<em><b>Is Valid</b></em>' attribute.

+	 * The default value is <code>"true"</code>.

+	 * <!-- begin-user-doc -->

+	 * <p>

+	 * If the meaning of the '<em>Is Valid</em>' attribute isn't clear,

+	 * there really should be more of a description here...

+	 * </p>

+	 * <!-- end-user-doc -->

+	 * @return the value of the '<em>Is Valid</em>' attribute.

+	 * @see #setIsValid(boolean)

+	 * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage#getTypeJudgement_IsValid()

+	 * @model default="true"

+	 * @generated

+	 */

+	boolean isIsValid();

+

+	/**

+	 * Sets the value of the '{@link org.eclipse.viatra2.gtasm.typerules.TypeJudgement#isIsValid <em>Is Valid</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @param value the new value of the '<em>Is Valid</em>' attribute.

+	 * @see #isIsValid()

+	 * @generated

+	 */

+	void setIsValid(boolean value);

+

+	/**

+	 * Returns the value of the '<em><b>Result</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <p>

+	 * If the meaning of the '<em>Result</em>' attribute isn't clear,

+	 * there really should be more of a description here...

+	 * </p>

+	 * <!-- end-user-doc -->

+	 * @return the value of the '<em>Result</em>' attribute.

+	 * @see #setResult(String)

+	 * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage#getTypeJudgement_Result()

+	 * @model

+	 * @generated

+	 */

+	String getResult();

+

+	/**

+	 * Sets the value of the '{@link org.eclipse.viatra2.gtasm.typerules.TypeJudgement#getResult <em>Result</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @param value the new value of the '<em>Result</em>' attribute.

+	 * @see #getResult()

+	 * @generated

+	 */

+	void setResult(String value);

+

+	/**

+	 * Returns the value of the '<em><b>Name</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <p>

+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,

+	 * there really should be more of a description here...

+	 * </p>

+	 * <!-- end-user-doc -->

+	 * @return the value of the '<em>Name</em>' attribute.

+	 * @see #setName(String)

+	 * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage#getTypeJudgement_Name()

+	 * @model

+	 * @generated

+	 */

+	String getName();

+

+	/**

+	 * Sets the value of the '{@link org.eclipse.viatra2.gtasm.typerules.TypeJudgement#getName <em>Name</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @param value the new value of the '<em>Name</em>' attribute.

+	 * @see #getName()

+	 * @generated

+	 */

+	void setName(String value);

+

+} // TypeJudgement

diff --git a/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/TypeRule.java b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/TypeRule.java
new file mode 100644
index 0000000..a05a0f7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/TypeRule.java
@@ -0,0 +1,80 @@
+/**

+ *  * Copyright (c) 2008 Daniel Varro

+ *  * All rights reserved. This program and the accompanying materials

+ *  * are made available under the terms of the Eclipse Public License v1.0

+ *  * which accompanies this distribution, and is available at

+ *  * http://www.eclipse.org/legal/epl-v10.html

+ *  *

+ *  * Contributors:

+ *  *    Daniel Varro - initial API and implementation

+ * 

+ *

+ * $Id$

+ */

+package org.eclipse.viatra2.gtasm.typerules;

+

+import org.eclipse.emf.common.util.EList;

+

+import org.eclipse.emf.ecore.EObject;

+

+/**

+ * <!-- begin-user-doc -->

+ * A representation of the model object '<em><b>Type Rule</b></em>'.

+ * <!-- end-user-doc -->

+ *

+ * <p>

+ * The following features are supported:

+ * <ul>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.TypeRule#getJudgements <em>Judgements</em>}</li>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.TypeRule#getOperator <em>Operator</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage#getTypeRule()

+ * @model

+ * @generated

+ */

+public interface TypeRule extends EObject {

+	/**

+	 * Returns the value of the '<em><b>Judgements</b></em>' containment reference list.

+	 * The list contents are of type {@link org.eclipse.viatra2.gtasm.typerules.TypeJudgement}.

+	 * <!-- begin-user-doc -->

+	 * <p>

+	 * If the meaning of the '<em>Judgements</em>' containment reference list isn't clear,

+	 * there really should be more of a description here...

+	 * </p>

+	 * <!-- end-user-doc -->

+	 * @return the value of the '<em>Judgements</em>' containment reference list.

+	 * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage#getTypeRule_Judgements()

+	 * @model containment="true"

+	 * @generated

+	 */

+	EList<TypeJudgement> getJudgements();

+

+	/**

+	 * Returns the value of the '<em><b>Operator</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <p>

+	 * If the meaning of the '<em>Operator</em>' attribute isn't clear,

+	 * there really should be more of a description here...

+	 * </p>

+	 * <!-- end-user-doc -->

+	 * @return the value of the '<em>Operator</em>' attribute.

+	 * @see #setOperator(String)

+	 * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage#getTypeRule_Operator()

+	 * @model

+	 * @generated

+	 */

+	String getOperator();

+

+	/**

+	 * Sets the value of the '{@link org.eclipse.viatra2.gtasm.typerules.TypeRule#getOperator <em>Operator</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @param value the new value of the '<em>Operator</em>' attribute.

+	 * @see #getOperator()

+	 * @generated

+	 */

+	void setOperator(String value);

+

+} // TypeRule

diff --git a/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/TyperulesFactory.java b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/TyperulesFactory.java
new file mode 100644
index 0000000..ec424e7
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/TyperulesFactory.java
@@ -0,0 +1,89 @@
+/**

+ *  * Copyright (c) 2008 Daniel Varro

+ *  * All rights reserved. This program and the accompanying materials

+ *  * are made available under the terms of the Eclipse Public License v1.0

+ *  * which accompanies this distribution, and is available at

+ *  * http://www.eclipse.org/legal/epl-v10.html

+ *  *

+ *  * Contributors:

+ *  *    Daniel Varro - initial API and implementation

+ * 

+ *

+ * $Id$

+ */

+package org.eclipse.viatra2.gtasm.typerules;

+

+import org.eclipse.emf.ecore.EFactory;

+

+/**

+ * <!-- begin-user-doc -->

+ * The <b>Factory</b> for the model.

+ * It provides a create method for each non-abstract class of the model.

+ * <!-- end-user-doc -->

+ * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage

+ * @generated

+ */

+public interface TyperulesFactory extends EFactory {

+	/**

+	 * The singleton instance of the factory.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	TyperulesFactory eINSTANCE = org.eclipse.viatra2.gtasm.typerules.impl.TyperulesFactoryImpl.init();

+

+	/**

+	 * Returns a new object of class '<em>Rule Set</em>'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return a new object of class '<em>Rule Set</em>'.

+	 * @generated

+	 */

+	RuleSet createRuleSet();

+

+	/**

+	 * Returns a new object of class '<em>Unary Type Judgement</em>'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return a new object of class '<em>Unary Type Judgement</em>'.

+	 * @generated

+	 */

+	UnaryTypeJudgement createUnaryTypeJudgement();

+

+	/**

+	 * Returns a new object of class '<em>Binary Type Judgement</em>'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return a new object of class '<em>Binary Type Judgement</em>'.

+	 * @generated

+	 */

+	BinaryTypeJudgement createBinaryTypeJudgement();

+

+	/**

+	 * Returns a new object of class '<em>Type Rule</em>'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return a new object of class '<em>Type Rule</em>'.

+	 * @generated

+	 */

+	TypeRule createTypeRule();

+

+	/**

+	 * Returns a new object of class '<em>Custom Type Judgement</em>'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return a new object of class '<em>Custom Type Judgement</em>'.

+	 * @generated

+	 */

+	CustomTypeJudgement createCustomTypeJudgement();

+

+	/**

+	 * Returns the package supported by this factory.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the package supported by this factory.

+	 * @generated

+	 */

+	TyperulesPackage getTyperulesPackage();

+

+} //TyperulesFactory

diff --git a/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/TyperulesPackage.java b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/TyperulesPackage.java
new file mode 100644
index 0000000..4b448e8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/TyperulesPackage.java
@@ -0,0 +1,718 @@
+/**

+ *  * Copyright (c) 2008 Daniel Varro

+ *  * All rights reserved. This program and the accompanying materials

+ *  * are made available under the terms of the Eclipse Public License v1.0

+ *  * which accompanies this distribution, and is available at

+ *  * http://www.eclipse.org/legal/epl-v10.html

+ *  *

+ *  * Contributors:

+ *  *    Daniel Varro - initial API and implementation

+ * 

+ *

+ * $Id$

+ */

+package org.eclipse.viatra2.gtasm.typerules;

+

+import org.eclipse.emf.ecore.EAttribute;

+import org.eclipse.emf.ecore.EClass;

+import org.eclipse.emf.ecore.EPackage;

+import org.eclipse.emf.ecore.EReference;

+

+/**

+ * <!-- begin-user-doc -->

+ * The <b>Package</b> for the model.

+ * It contains accessors for the meta objects to represent

+ * <ul>

+ *   <li>each class,</li>

+ *   <li>each feature of each class,</li>

+ *   <li>each enum,</li>

+ *   <li>and each data type</li>

+ * </ul>

+ * <!-- end-user-doc -->

+ * @see org.eclipse.viatra2.gtasm.typerules.TyperulesFactory

+ * @model kind="package"

+ * @generated

+ */

+public interface TyperulesPackage extends EPackage {

+	/**

+	 * The package name.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	String eNAME = "typerules";

+

+	/**

+	 * The package namespace URI.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	String eNS_URI = "http:///typerules.ecore";

+

+	/**

+	 * The package namespace name.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	String eNS_PREFIX = "typerules";

+

+	/**

+	 * The singleton instance of the package.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	TyperulesPackage eINSTANCE = org.eclipse.viatra2.gtasm.typerules.impl.TyperulesPackageImpl.init();

+

+	/**

+	 * The meta object id for the '{@link org.eclipse.viatra2.gtasm.typerules.impl.RuleSetImpl <em>Rule Set</em>}' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see org.eclipse.viatra2.gtasm.typerules.impl.RuleSetImpl

+	 * @see org.eclipse.viatra2.gtasm.typerules.impl.TyperulesPackageImpl#getRuleSet()

+	 * @generated

+	 */

+	int RULE_SET = 0;

+

+	/**

+	 * The feature id for the '<em><b>Extends</b></em>' reference.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int RULE_SET__EXTENDS = 0;

+

+	/**

+	 * The feature id for the '<em><b>Typerules</b></em>' containment reference list.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int RULE_SET__TYPERULES = 1;

+

+	/**

+	 * The number of structural features of the '<em>Rule Set</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int RULE_SET_FEATURE_COUNT = 2;

+

+	/**

+	 * The meta object id for the '{@link org.eclipse.viatra2.gtasm.typerules.impl.TypeJudgementImpl <em>Type Judgement</em>}' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see org.eclipse.viatra2.gtasm.typerules.impl.TypeJudgementImpl

+	 * @see org.eclipse.viatra2.gtasm.typerules.impl.TyperulesPackageImpl#getTypeJudgement()

+	 * @generated

+	 */

+	int TYPE_JUDGEMENT = 1;

+

+	/**

+	 * The feature id for the '<em><b>Is Valid</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int TYPE_JUDGEMENT__IS_VALID = 0;

+

+	/**

+	 * The feature id for the '<em><b>Result</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int TYPE_JUDGEMENT__RESULT = 1;

+

+	/**

+	 * The feature id for the '<em><b>Name</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int TYPE_JUDGEMENT__NAME = 2;

+

+	/**

+	 * The number of structural features of the '<em>Type Judgement</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int TYPE_JUDGEMENT_FEATURE_COUNT = 3;

+

+	/**

+	 * The meta object id for the '{@link org.eclipse.viatra2.gtasm.typerules.impl.UnaryTypeJudgementImpl <em>Unary Type Judgement</em>}' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see org.eclipse.viatra2.gtasm.typerules.impl.UnaryTypeJudgementImpl

+	 * @see org.eclipse.viatra2.gtasm.typerules.impl.TyperulesPackageImpl#getUnaryTypeJudgement()

+	 * @generated

+	 */

+	int UNARY_TYPE_JUDGEMENT = 2;

+

+	/**

+	 * The feature id for the '<em><b>Is Valid</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int UNARY_TYPE_JUDGEMENT__IS_VALID = TYPE_JUDGEMENT__IS_VALID;

+

+	/**

+	 * The feature id for the '<em><b>Result</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int UNARY_TYPE_JUDGEMENT__RESULT = TYPE_JUDGEMENT__RESULT;

+

+	/**

+	 * The feature id for the '<em><b>Name</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int UNARY_TYPE_JUDGEMENT__NAME = TYPE_JUDGEMENT__NAME;

+

+	/**

+	 * The feature id for the '<em><b>Operand</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int UNARY_TYPE_JUDGEMENT__OPERAND = TYPE_JUDGEMENT_FEATURE_COUNT + 0;

+

+	/**

+	 * The number of structural features of the '<em>Unary Type Judgement</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int UNARY_TYPE_JUDGEMENT_FEATURE_COUNT = TYPE_JUDGEMENT_FEATURE_COUNT + 1;

+

+	/**

+	 * The meta object id for the '{@link org.eclipse.viatra2.gtasm.typerules.impl.BinaryTypeJudgementImpl <em>Binary Type Judgement</em>}' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see org.eclipse.viatra2.gtasm.typerules.impl.BinaryTypeJudgementImpl

+	 * @see org.eclipse.viatra2.gtasm.typerules.impl.TyperulesPackageImpl#getBinaryTypeJudgement()

+	 * @generated

+	 */

+	int BINARY_TYPE_JUDGEMENT = 3;

+

+	/**

+	 * The feature id for the '<em><b>Is Valid</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int BINARY_TYPE_JUDGEMENT__IS_VALID = TYPE_JUDGEMENT__IS_VALID;

+

+	/**

+	 * The feature id for the '<em><b>Result</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int BINARY_TYPE_JUDGEMENT__RESULT = TYPE_JUDGEMENT__RESULT;

+

+	/**

+	 * The feature id for the '<em><b>Name</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int BINARY_TYPE_JUDGEMENT__NAME = TYPE_JUDGEMENT__NAME;

+

+	/**

+	 * The feature id for the '<em><b>First Operand</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int BINARY_TYPE_JUDGEMENT__FIRST_OPERAND = TYPE_JUDGEMENT_FEATURE_COUNT + 0;

+

+	/**

+	 * The feature id for the '<em><b>Second Operand</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int BINARY_TYPE_JUDGEMENT__SECOND_OPERAND = TYPE_JUDGEMENT_FEATURE_COUNT + 1;

+

+	/**

+	 * The number of structural features of the '<em>Binary Type Judgement</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int BINARY_TYPE_JUDGEMENT_FEATURE_COUNT = TYPE_JUDGEMENT_FEATURE_COUNT + 2;

+

+	/**

+	 * The meta object id for the '{@link org.eclipse.viatra2.gtasm.typerules.impl.TypeRuleImpl <em>Type Rule</em>}' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see org.eclipse.viatra2.gtasm.typerules.impl.TypeRuleImpl

+	 * @see org.eclipse.viatra2.gtasm.typerules.impl.TyperulesPackageImpl#getTypeRule()

+	 * @generated

+	 */

+	int TYPE_RULE = 4;

+

+	/**

+	 * The feature id for the '<em><b>Judgements</b></em>' containment reference list.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int TYPE_RULE__JUDGEMENTS = 0;

+

+	/**

+	 * The feature id for the '<em><b>Operator</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int TYPE_RULE__OPERATOR = 1;

+

+	/**

+	 * The number of structural features of the '<em>Type Rule</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int TYPE_RULE_FEATURE_COUNT = 2;

+

+

+	/**

+	 * The meta object id for the '{@link org.eclipse.viatra2.gtasm.typerules.impl.CustomTypeJudgementImpl <em>Custom Type Judgement</em>}' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see org.eclipse.viatra2.gtasm.typerules.impl.CustomTypeJudgementImpl

+	 * @see org.eclipse.viatra2.gtasm.typerules.impl.TyperulesPackageImpl#getCustomTypeJudgement()

+	 * @generated

+	 */

+	int CUSTOM_TYPE_JUDGEMENT = 5;

+

+	/**

+	 * The feature id for the '<em><b>Is Valid</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int CUSTOM_TYPE_JUDGEMENT__IS_VALID = TYPE_JUDGEMENT__IS_VALID;

+

+	/**

+	 * The feature id for the '<em><b>Result</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int CUSTOM_TYPE_JUDGEMENT__RESULT = TYPE_JUDGEMENT__RESULT;

+

+	/**

+	 * The feature id for the '<em><b>Name</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int CUSTOM_TYPE_JUDGEMENT__NAME = TYPE_JUDGEMENT__NAME;

+

+	/**

+	 * The feature id for the '<em><b>Operands</b></em>' attribute list.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int CUSTOM_TYPE_JUDGEMENT__OPERANDS = TYPE_JUDGEMENT_FEATURE_COUNT + 0;

+

+	/**

+	 * The number of structural features of the '<em>Custom Type Judgement</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int CUSTOM_TYPE_JUDGEMENT_FEATURE_COUNT = TYPE_JUDGEMENT_FEATURE_COUNT + 1;

+

+

+	/**

+	 * Returns the meta object for class '{@link org.eclipse.viatra2.gtasm.typerules.RuleSet <em>Rule Set</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for class '<em>Rule Set</em>'.

+	 * @see org.eclipse.viatra2.gtasm.typerules.RuleSet

+	 * @generated

+	 */

+	EClass getRuleSet();

+

+	/**

+	 * Returns the meta object for the reference '{@link org.eclipse.viatra2.gtasm.typerules.RuleSet#getExtends <em>Extends</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for the reference '<em>Extends</em>'.

+	 * @see org.eclipse.viatra2.gtasm.typerules.RuleSet#getExtends()

+	 * @see #getRuleSet()

+	 * @generated

+	 */

+	EReference getRuleSet_Extends();

+

+	/**

+	 * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasm.typerules.RuleSet#getTyperules <em>Typerules</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for the containment reference list '<em>Typerules</em>'.

+	 * @see org.eclipse.viatra2.gtasm.typerules.RuleSet#getTyperules()

+	 * @see #getRuleSet()

+	 * @generated

+	 */

+	EReference getRuleSet_Typerules();

+

+	/**

+	 * Returns the meta object for class '{@link org.eclipse.viatra2.gtasm.typerules.TypeJudgement <em>Type Judgement</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for class '<em>Type Judgement</em>'.

+	 * @see org.eclipse.viatra2.gtasm.typerules.TypeJudgement

+	 * @generated

+	 */

+	EClass getTypeJudgement();

+

+	/**

+	 * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasm.typerules.TypeJudgement#isIsValid <em>Is Valid</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for the attribute '<em>Is Valid</em>'.

+	 * @see org.eclipse.viatra2.gtasm.typerules.TypeJudgement#isIsValid()

+	 * @see #getTypeJudgement()

+	 * @generated

+	 */

+	EAttribute getTypeJudgement_IsValid();

+

+	/**

+	 * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasm.typerules.TypeJudgement#getResult <em>Result</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for the attribute '<em>Result</em>'.

+	 * @see org.eclipse.viatra2.gtasm.typerules.TypeJudgement#getResult()

+	 * @see #getTypeJudgement()

+	 * @generated

+	 */

+	EAttribute getTypeJudgement_Result();

+

+	/**

+	 * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasm.typerules.TypeJudgement#getName <em>Name</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for the attribute '<em>Name</em>'.

+	 * @see org.eclipse.viatra2.gtasm.typerules.TypeJudgement#getName()

+	 * @see #getTypeJudgement()

+	 * @generated

+	 */

+	EAttribute getTypeJudgement_Name();

+

+	/**

+	 * Returns the meta object for class '{@link org.eclipse.viatra2.gtasm.typerules.UnaryTypeJudgement <em>Unary Type Judgement</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for class '<em>Unary Type Judgement</em>'.

+	 * @see org.eclipse.viatra2.gtasm.typerules.UnaryTypeJudgement

+	 * @generated

+	 */

+	EClass getUnaryTypeJudgement();

+

+	/**

+	 * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasm.typerules.UnaryTypeJudgement#getOperand <em>Operand</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for the attribute '<em>Operand</em>'.

+	 * @see org.eclipse.viatra2.gtasm.typerules.UnaryTypeJudgement#getOperand()

+	 * @see #getUnaryTypeJudgement()

+	 * @generated

+	 */

+	EAttribute getUnaryTypeJudgement_Operand();

+

+	/**

+	 * Returns the meta object for class '{@link org.eclipse.viatra2.gtasm.typerules.BinaryTypeJudgement <em>Binary Type Judgement</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for class '<em>Binary Type Judgement</em>'.

+	 * @see org.eclipse.viatra2.gtasm.typerules.BinaryTypeJudgement

+	 * @generated

+	 */

+	EClass getBinaryTypeJudgement();

+

+	/**

+	 * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasm.typerules.BinaryTypeJudgement#getFirstOperand <em>First Operand</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for the attribute '<em>First Operand</em>'.

+	 * @see org.eclipse.viatra2.gtasm.typerules.BinaryTypeJudgement#getFirstOperand()

+	 * @see #getBinaryTypeJudgement()

+	 * @generated

+	 */

+	EAttribute getBinaryTypeJudgement_FirstOperand();

+

+	/**

+	 * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasm.typerules.BinaryTypeJudgement#getSecondOperand <em>Second Operand</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for the attribute '<em>Second Operand</em>'.

+	 * @see org.eclipse.viatra2.gtasm.typerules.BinaryTypeJudgement#getSecondOperand()

+	 * @see #getBinaryTypeJudgement()

+	 * @generated

+	 */

+	EAttribute getBinaryTypeJudgement_SecondOperand();

+

+	/**

+	 * Returns the meta object for class '{@link org.eclipse.viatra2.gtasm.typerules.TypeRule <em>Type Rule</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for class '<em>Type Rule</em>'.

+	 * @see org.eclipse.viatra2.gtasm.typerules.TypeRule

+	 * @generated

+	 */

+	EClass getTypeRule();

+

+	/**

+	 * Returns the meta object for the containment reference list '{@link org.eclipse.viatra2.gtasm.typerules.TypeRule#getJudgements <em>Judgements</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for the containment reference list '<em>Judgements</em>'.

+	 * @see org.eclipse.viatra2.gtasm.typerules.TypeRule#getJudgements()

+	 * @see #getTypeRule()

+	 * @generated

+	 */

+	EReference getTypeRule_Judgements();

+

+	/**

+	 * Returns the meta object for the attribute '{@link org.eclipse.viatra2.gtasm.typerules.TypeRule#getOperator <em>Operator</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for the attribute '<em>Operator</em>'.

+	 * @see org.eclipse.viatra2.gtasm.typerules.TypeRule#getOperator()

+	 * @see #getTypeRule()

+	 * @generated

+	 */

+	EAttribute getTypeRule_Operator();

+

+	/**

+	 * Returns the meta object for class '{@link org.eclipse.viatra2.gtasm.typerules.CustomTypeJudgement <em>Custom Type Judgement</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for class '<em>Custom Type Judgement</em>'.

+	 * @see org.eclipse.viatra2.gtasm.typerules.CustomTypeJudgement

+	 * @generated

+	 */

+	EClass getCustomTypeJudgement();

+

+	/**

+	 * Returns the meta object for the attribute list '{@link org.eclipse.viatra2.gtasm.typerules.CustomTypeJudgement#getOperands <em>Operands</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for the attribute list '<em>Operands</em>'.

+	 * @see org.eclipse.viatra2.gtasm.typerules.CustomTypeJudgement#getOperands()

+	 * @see #getCustomTypeJudgement()

+	 * @generated

+	 */

+	EAttribute getCustomTypeJudgement_Operands();

+

+	/**

+	 * Returns the factory that creates the instances of the model.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the factory that creates the instances of the model.

+	 * @generated

+	 */

+	TyperulesFactory getTyperulesFactory();

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * Defines literals for the meta objects that represent

+	 * <ul>

+	 *   <li>each class,</li>

+	 *   <li>each feature of each class,</li>

+	 *   <li>each enum,</li>

+	 *   <li>and each data type</li>

+	 * </ul>

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	interface Literals {

+		/**

+		 * The meta object literal for the '{@link org.eclipse.viatra2.gtasm.typerules.impl.RuleSetImpl <em>Rule Set</em>}' class.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @see org.eclipse.viatra2.gtasm.typerules.impl.RuleSetImpl

+		 * @see org.eclipse.viatra2.gtasm.typerules.impl.TyperulesPackageImpl#getRuleSet()

+		 * @generated

+		 */

+		EClass RULE_SET = eINSTANCE.getRuleSet();

+

+		/**

+		 * The meta object literal for the '<em><b>Extends</b></em>' reference feature.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @generated

+		 */

+		EReference RULE_SET__EXTENDS = eINSTANCE.getRuleSet_Extends();

+

+		/**

+		 * The meta object literal for the '<em><b>Typerules</b></em>' containment reference list feature.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @generated

+		 */

+		EReference RULE_SET__TYPERULES = eINSTANCE.getRuleSet_Typerules();

+

+		/**

+		 * The meta object literal for the '{@link org.eclipse.viatra2.gtasm.typerules.impl.TypeJudgementImpl <em>Type Judgement</em>}' class.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @see org.eclipse.viatra2.gtasm.typerules.impl.TypeJudgementImpl

+		 * @see org.eclipse.viatra2.gtasm.typerules.impl.TyperulesPackageImpl#getTypeJudgement()

+		 * @generated

+		 */

+		EClass TYPE_JUDGEMENT = eINSTANCE.getTypeJudgement();

+

+		/**

+		 * The meta object literal for the '<em><b>Is Valid</b></em>' attribute feature.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @generated

+		 */

+		EAttribute TYPE_JUDGEMENT__IS_VALID = eINSTANCE.getTypeJudgement_IsValid();

+

+		/**

+		 * The meta object literal for the '<em><b>Result</b></em>' attribute feature.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @generated

+		 */

+		EAttribute TYPE_JUDGEMENT__RESULT = eINSTANCE.getTypeJudgement_Result();

+

+		/**

+		 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @generated

+		 */

+		EAttribute TYPE_JUDGEMENT__NAME = eINSTANCE.getTypeJudgement_Name();

+

+		/**

+		 * The meta object literal for the '{@link org.eclipse.viatra2.gtasm.typerules.impl.UnaryTypeJudgementImpl <em>Unary Type Judgement</em>}' class.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @see org.eclipse.viatra2.gtasm.typerules.impl.UnaryTypeJudgementImpl

+		 * @see org.eclipse.viatra2.gtasm.typerules.impl.TyperulesPackageImpl#getUnaryTypeJudgement()

+		 * @generated

+		 */

+		EClass UNARY_TYPE_JUDGEMENT = eINSTANCE.getUnaryTypeJudgement();

+

+		/**

+		 * The meta object literal for the '<em><b>Operand</b></em>' attribute feature.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @generated

+		 */

+		EAttribute UNARY_TYPE_JUDGEMENT__OPERAND = eINSTANCE.getUnaryTypeJudgement_Operand();

+

+		/**

+		 * The meta object literal for the '{@link org.eclipse.viatra2.gtasm.typerules.impl.BinaryTypeJudgementImpl <em>Binary Type Judgement</em>}' class.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @see org.eclipse.viatra2.gtasm.typerules.impl.BinaryTypeJudgementImpl

+		 * @see org.eclipse.viatra2.gtasm.typerules.impl.TyperulesPackageImpl#getBinaryTypeJudgement()

+		 * @generated

+		 */

+		EClass BINARY_TYPE_JUDGEMENT = eINSTANCE.getBinaryTypeJudgement();

+

+		/**

+		 * The meta object literal for the '<em><b>First Operand</b></em>' attribute feature.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @generated

+		 */

+		EAttribute BINARY_TYPE_JUDGEMENT__FIRST_OPERAND = eINSTANCE.getBinaryTypeJudgement_FirstOperand();

+

+		/**

+		 * The meta object literal for the '<em><b>Second Operand</b></em>' attribute feature.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @generated

+		 */

+		EAttribute BINARY_TYPE_JUDGEMENT__SECOND_OPERAND = eINSTANCE.getBinaryTypeJudgement_SecondOperand();

+

+		/**

+		 * The meta object literal for the '{@link org.eclipse.viatra2.gtasm.typerules.impl.TypeRuleImpl <em>Type Rule</em>}' class.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @see org.eclipse.viatra2.gtasm.typerules.impl.TypeRuleImpl

+		 * @see org.eclipse.viatra2.gtasm.typerules.impl.TyperulesPackageImpl#getTypeRule()

+		 * @generated

+		 */

+		EClass TYPE_RULE = eINSTANCE.getTypeRule();

+

+		/**

+		 * The meta object literal for the '<em><b>Judgements</b></em>' containment reference list feature.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @generated

+		 */

+		EReference TYPE_RULE__JUDGEMENTS = eINSTANCE.getTypeRule_Judgements();

+

+		/**

+		 * The meta object literal for the '<em><b>Operator</b></em>' attribute feature.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @generated

+		 */

+		EAttribute TYPE_RULE__OPERATOR = eINSTANCE.getTypeRule_Operator();

+

+		/**

+		 * The meta object literal for the '{@link org.eclipse.viatra2.gtasm.typerules.impl.CustomTypeJudgementImpl <em>Custom Type Judgement</em>}' class.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @see org.eclipse.viatra2.gtasm.typerules.impl.CustomTypeJudgementImpl

+		 * @see org.eclipse.viatra2.gtasm.typerules.impl.TyperulesPackageImpl#getCustomTypeJudgement()

+		 * @generated

+		 */

+		EClass CUSTOM_TYPE_JUDGEMENT = eINSTANCE.getCustomTypeJudgement();

+

+		/**

+		 * The meta object literal for the '<em><b>Operands</b></em>' attribute list feature.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @generated

+		 */

+		EAttribute CUSTOM_TYPE_JUDGEMENT__OPERANDS = eINSTANCE.getCustomTypeJudgement_Operands();

+

+	}

+

+} //TyperulesPackage

diff --git a/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/UnaryTypeJudgement.java b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/UnaryTypeJudgement.java
new file mode 100644
index 0000000..9c66a49
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/UnaryTypeJudgement.java
@@ -0,0 +1,60 @@
+/**

+ *  * Copyright (c) 2008 Daniel Varro

+ *  * All rights reserved. This program and the accompanying materials

+ *  * are made available under the terms of the Eclipse Public License v1.0

+ *  * which accompanies this distribution, and is available at

+ *  * http://www.eclipse.org/legal/epl-v10.html

+ *  *

+ *  * Contributors:

+ *  *    Daniel Varro - initial API and implementation

+ * 

+ *

+ * $Id$

+ */

+package org.eclipse.viatra2.gtasm.typerules;

+

+

+/**

+ * <!-- begin-user-doc -->

+ * A representation of the model object '<em><b>Unary Type Judgement</b></em>'.

+ * <!-- end-user-doc -->

+ *

+ * <p>

+ * The following features are supported:

+ * <ul>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.UnaryTypeJudgement#getOperand <em>Operand</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage#getUnaryTypeJudgement()

+ * @model

+ * @generated

+ */

+public interface UnaryTypeJudgement extends TypeJudgement {

+	/**

+	 * Returns the value of the '<em><b>Operand</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <p>

+	 * If the meaning of the '<em>Operand</em>' attribute isn't clear,

+	 * there really should be more of a description here...

+	 * </p>

+	 * <!-- end-user-doc -->

+	 * @return the value of the '<em>Operand</em>' attribute.

+	 * @see #setOperand(String)

+	 * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage#getUnaryTypeJudgement_Operand()

+	 * @model

+	 * @generated

+	 */

+	String getOperand();

+

+	/**

+	 * Sets the value of the '{@link org.eclipse.viatra2.gtasm.typerules.UnaryTypeJudgement#getOperand <em>Operand</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @param value the new value of the '<em>Operand</em>' attribute.

+	 * @see #getOperand()

+	 * @generated

+	 */

+	void setOperand(String value);

+

+} // UnaryTypeJudgement

diff --git a/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/BinaryTypeJudgementImpl.java b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/BinaryTypeJudgementImpl.java
new file mode 100644
index 0000000..932e807
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/BinaryTypeJudgementImpl.java
@@ -0,0 +1,227 @@
+/**

+ *  * Copyright (c) 2008 Daniel Varro

+ *  * All rights reserved. This program and the accompanying materials

+ *  * are made available under the terms of the Eclipse Public License v1.0

+ *  * which accompanies this distribution, and is available at

+ *  * http://www.eclipse.org/legal/epl-v10.html

+ *  *

+ *  * Contributors:

+ *  *    Daniel Varro - initial API and implementation

+ * 

+ *

+ * $Id$

+ */

+package org.eclipse.viatra2.gtasm.typerules.impl;

+

+import org.eclipse.emf.common.notify.Notification;

+

+import org.eclipse.emf.ecore.EClass;

+

+import org.eclipse.emf.ecore.impl.ENotificationImpl;

+

+import org.eclipse.viatra2.gtasm.typerules.BinaryTypeJudgement;

+import org.eclipse.viatra2.gtasm.typerules.TyperulesPackage;

+

+/**

+ * <!-- begin-user-doc -->

+ * An implementation of the model object '<em><b>Binary Type Judgement</b></em>'.

+ * <!-- end-user-doc -->

+ * <p>

+ * The following features are implemented:

+ * <ul>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.impl.BinaryTypeJudgementImpl#getFirstOperand <em>First Operand</em>}</li>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.impl.BinaryTypeJudgementImpl#getSecondOperand <em>Second Operand</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @generated

+ */

+public class BinaryTypeJudgementImpl extends TypeJudgementImpl implements BinaryTypeJudgement {

+	/**

+	 * The default value of the '{@link #getFirstOperand() <em>First Operand</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getFirstOperand()

+	 * @generated

+	 * @ordered

+	 */

+	protected static final String FIRST_OPERAND_EDEFAULT = null;

+

+	/**

+	 * The cached value of the '{@link #getFirstOperand() <em>First Operand</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getFirstOperand()

+	 * @generated

+	 * @ordered

+	 */

+	protected String firstOperand = FIRST_OPERAND_EDEFAULT;

+

+	/**

+	 * The default value of the '{@link #getSecondOperand() <em>Second Operand</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getSecondOperand()

+	 * @generated

+	 * @ordered

+	 */

+	protected static final String SECOND_OPERAND_EDEFAULT = null;

+

+	/**

+	 * The cached value of the '{@link #getSecondOperand() <em>Second Operand</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getSecondOperand()

+	 * @generated

+	 * @ordered

+	 */

+	protected String secondOperand = SECOND_OPERAND_EDEFAULT;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	protected BinaryTypeJudgementImpl() {

+		super();

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	protected EClass eStaticClass() {

+		return TyperulesPackage.Literals.BINARY_TYPE_JUDGEMENT;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public String getFirstOperand() {

+		return firstOperand;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public void setFirstOperand(String newFirstOperand) {

+		String oldFirstOperand = firstOperand;

+		firstOperand = newFirstOperand;

+		if (eNotificationRequired())

+			eNotify(new ENotificationImpl(this, Notification.SET, TyperulesPackage.BINARY_TYPE_JUDGEMENT__FIRST_OPERAND, oldFirstOperand, firstOperand));

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public String getSecondOperand() {

+		return secondOperand;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public void setSecondOperand(String newSecondOperand) {

+		String oldSecondOperand = secondOperand;

+		secondOperand = newSecondOperand;

+		if (eNotificationRequired())

+			eNotify(new ENotificationImpl(this, Notification.SET, TyperulesPackage.BINARY_TYPE_JUDGEMENT__SECOND_OPERAND, oldSecondOperand, secondOperand));

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public Object eGet(int featureID, boolean resolve, boolean coreType) {

+		switch (featureID) {

+			case TyperulesPackage.BINARY_TYPE_JUDGEMENT__FIRST_OPERAND:

+				return getFirstOperand();

+			case TyperulesPackage.BINARY_TYPE_JUDGEMENT__SECOND_OPERAND:

+				return getSecondOperand();

+		}

+		return super.eGet(featureID, resolve, coreType);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public void eSet(int featureID, Object newValue) {

+		switch (featureID) {

+			case TyperulesPackage.BINARY_TYPE_JUDGEMENT__FIRST_OPERAND:

+				setFirstOperand((String)newValue);

+				return;

+			case TyperulesPackage.BINARY_TYPE_JUDGEMENT__SECOND_OPERAND:

+				setSecondOperand((String)newValue);

+				return;

+		}

+		super.eSet(featureID, newValue);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public void eUnset(int featureID) {

+		switch (featureID) {

+			case TyperulesPackage.BINARY_TYPE_JUDGEMENT__FIRST_OPERAND:

+				setFirstOperand(FIRST_OPERAND_EDEFAULT);

+				return;

+			case TyperulesPackage.BINARY_TYPE_JUDGEMENT__SECOND_OPERAND:

+				setSecondOperand(SECOND_OPERAND_EDEFAULT);

+				return;

+		}

+		super.eUnset(featureID);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public boolean eIsSet(int featureID) {

+		switch (featureID) {

+			case TyperulesPackage.BINARY_TYPE_JUDGEMENT__FIRST_OPERAND:

+				return FIRST_OPERAND_EDEFAULT == null ? firstOperand != null : !FIRST_OPERAND_EDEFAULT.equals(firstOperand);

+			case TyperulesPackage.BINARY_TYPE_JUDGEMENT__SECOND_OPERAND:

+				return SECOND_OPERAND_EDEFAULT == null ? secondOperand != null : !SECOND_OPERAND_EDEFAULT.equals(secondOperand);

+		}

+		return super.eIsSet(featureID);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public String toString() {

+		if (eIsProxy()) return super.toString();

+

+		StringBuffer result = new StringBuffer(super.toString());

+		result.append(" (firstOperand: ");

+		result.append(firstOperand);

+		result.append(", secondOperand: ");

+		result.append(secondOperand);

+		result.append(')');

+		return result.toString();

+	}

+

+} //BinaryTypeJudgementImpl

diff --git a/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/CustomTypeJudgementImpl.java b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/CustomTypeJudgementImpl.java
new file mode 100644
index 0000000..5e3a328
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/CustomTypeJudgementImpl.java
@@ -0,0 +1,158 @@
+/**

+ *  * Copyright (c) 2008 Daniel Varro

+ *  * All rights reserved. This program and the accompanying materials

+ *  * are made available under the terms of the Eclipse Public License v1.0

+ *  * which accompanies this distribution, and is available at

+ *  * http://www.eclipse.org/legal/epl-v10.html

+ *  *

+ *  * Contributors:

+ *  *    Daniel Varro - initial API and implementation

+ * 

+ *

+ * $Id$

+ */

+package org.eclipse.viatra2.gtasm.typerules.impl;

+

+import java.util.Collection;

+

+import org.eclipse.emf.common.util.EList;

+

+import org.eclipse.emf.ecore.EClass;

+

+import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;

+

+import org.eclipse.viatra2.gtasm.typerules.CustomTypeJudgement;

+import org.eclipse.viatra2.gtasm.typerules.TyperulesPackage;

+

+/**

+ * <!-- begin-user-doc -->

+ * An implementation of the model object '<em><b>Custom Type Judgement</b></em>'.

+ * <!-- end-user-doc -->

+ * <p>

+ * The following features are implemented:

+ * <ul>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.impl.CustomTypeJudgementImpl#getOperands <em>Operands</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @generated

+ */

+public class CustomTypeJudgementImpl extends TypeJudgementImpl implements CustomTypeJudgement {

+	/**

+	 * The cached value of the '{@link #getOperands() <em>Operands</em>}' attribute list.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getOperands()

+	 * @generated

+	 * @ordered

+	 */

+	protected EList<String> operands;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	protected CustomTypeJudgementImpl() {

+		super();

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	protected EClass eStaticClass() {

+		return TyperulesPackage.Literals.CUSTOM_TYPE_JUDGEMENT;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EList<String> getOperands() {

+		if (operands == null) {

+			operands = new EDataTypeUniqueEList<String>(String.class, this, TyperulesPackage.CUSTOM_TYPE_JUDGEMENT__OPERANDS);

+		}

+		return operands;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public Object eGet(int featureID, boolean resolve, boolean coreType) {

+		switch (featureID) {

+			case TyperulesPackage.CUSTOM_TYPE_JUDGEMENT__OPERANDS:

+				return getOperands();

+		}

+		return super.eGet(featureID, resolve, coreType);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@SuppressWarnings("unchecked")

+	@Override

+	public void eSet(int featureID, Object newValue) {

+		switch (featureID) {

+			case TyperulesPackage.CUSTOM_TYPE_JUDGEMENT__OPERANDS:

+				getOperands().clear();

+				getOperands().addAll((Collection<? extends String>)newValue);

+				return;

+		}

+		super.eSet(featureID, newValue);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public void eUnset(int featureID) {

+		switch (featureID) {

+			case TyperulesPackage.CUSTOM_TYPE_JUDGEMENT__OPERANDS:

+				getOperands().clear();

+				return;

+		}

+		super.eUnset(featureID);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public boolean eIsSet(int featureID) {

+		switch (featureID) {

+			case TyperulesPackage.CUSTOM_TYPE_JUDGEMENT__OPERANDS:

+				return operands != null && !operands.isEmpty();

+		}

+		return super.eIsSet(featureID);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public String toString() {

+		if (eIsProxy()) return super.toString();

+

+		StringBuffer result = new StringBuffer(super.toString());

+		result.append(" (operands: ");

+		result.append(operands);

+		result.append(')');

+		return result.toString();

+	}

+

+} //CustomTypeJudgementImpl

diff --git a/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/RuleSetImpl.java b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/RuleSetImpl.java
new file mode 100644
index 0000000..f9f6591
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/RuleSetImpl.java
@@ -0,0 +1,225 @@
+/**

+ *  * Copyright (c) 2008 Daniel Varro

+ *  * All rights reserved. This program and the accompanying materials

+ *  * are made available under the terms of the Eclipse Public License v1.0

+ *  * which accompanies this distribution, and is available at

+ *  * http://www.eclipse.org/legal/epl-v10.html

+ *  *

+ *  * Contributors:

+ *  *    Daniel Varro - initial API and implementation

+ * 

+ *

+ * $Id$

+ */

+package org.eclipse.viatra2.gtasm.typerules.impl;

+

+import java.util.Collection;

+

+import org.eclipse.emf.common.notify.Notification;

+import org.eclipse.emf.common.notify.NotificationChain;

+

+import org.eclipse.emf.common.util.EList;

+

+import org.eclipse.emf.ecore.EClass;

+import org.eclipse.emf.ecore.InternalEObject;

+

+import org.eclipse.emf.ecore.impl.ENotificationImpl;

+import org.eclipse.emf.ecore.impl.EObjectImpl;

+

+import org.eclipse.emf.ecore.util.EObjectContainmentEList;

+import org.eclipse.emf.ecore.util.InternalEList;

+

+import org.eclipse.viatra2.gtasm.typerules.RuleSet;

+import org.eclipse.viatra2.gtasm.typerules.TypeRule;

+import org.eclipse.viatra2.gtasm.typerules.TyperulesPackage;

+

+/**

+ * <!-- begin-user-doc -->

+ * An implementation of the model object '<em><b>Rule Set</b></em>'.

+ * <!-- end-user-doc -->

+ * <p>

+ * The following features are implemented:

+ * <ul>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.impl.RuleSetImpl#getExtends <em>Extends</em>}</li>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.impl.RuleSetImpl#getTyperules <em>Typerules</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @generated

+ */

+public class RuleSetImpl extends EObjectImpl implements RuleSet {

+	/**

+	 * The cached value of the '{@link #getExtends() <em>Extends</em>}' reference.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getExtends()

+	 * @generated

+	 * @ordered

+	 */

+	protected RuleSet extends_;

+

+	/**

+	 * The cached value of the '{@link #getTyperules() <em>Typerules</em>}' containment reference list.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getTyperules()

+	 * @generated

+	 * @ordered

+	 */

+	protected EList<TypeRule> typerules;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	protected RuleSetImpl() {

+		super();

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	protected EClass eStaticClass() {

+		return TyperulesPackage.Literals.RULE_SET;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public RuleSet getExtends() {

+		if (extends_ != null && extends_.eIsProxy()) {

+			InternalEObject oldExtends = (InternalEObject)extends_;

+			extends_ = (RuleSet)eResolveProxy(oldExtends);

+			if (extends_ != oldExtends) {

+				if (eNotificationRequired())

+					eNotify(new ENotificationImpl(this, Notification.RESOLVE, TyperulesPackage.RULE_SET__EXTENDS, oldExtends, extends_));

+			}

+		}

+		return extends_;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public RuleSet basicGetExtends() {

+		return extends_;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public void setExtends(RuleSet newExtends) {

+		RuleSet oldExtends = extends_;

+		extends_ = newExtends;

+		if (eNotificationRequired())

+			eNotify(new ENotificationImpl(this, Notification.SET, TyperulesPackage.RULE_SET__EXTENDS, oldExtends, extends_));

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EList<TypeRule> getTyperules() {

+		if (typerules == null) {

+			typerules = new EObjectContainmentEList<TypeRule>(TypeRule.class, this, TyperulesPackage.RULE_SET__TYPERULES);

+		}

+		return typerules;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {

+		switch (featureID) {

+			case TyperulesPackage.RULE_SET__TYPERULES:

+				return ((InternalEList<?>)getTyperules()).basicRemove(otherEnd, msgs);

+		}

+		return super.eInverseRemove(otherEnd, featureID, msgs);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public Object eGet(int featureID, boolean resolve, boolean coreType) {

+		switch (featureID) {

+			case TyperulesPackage.RULE_SET__EXTENDS:

+				if (resolve) return getExtends();

+				return basicGetExtends();

+			case TyperulesPackage.RULE_SET__TYPERULES:

+				return getTyperules();

+		}

+		return super.eGet(featureID, resolve, coreType);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@SuppressWarnings("unchecked")

+	@Override

+	public void eSet(int featureID, Object newValue) {

+		switch (featureID) {

+			case TyperulesPackage.RULE_SET__EXTENDS:

+				setExtends((RuleSet)newValue);

+				return;

+			case TyperulesPackage.RULE_SET__TYPERULES:

+				getTyperules().clear();

+				getTyperules().addAll((Collection<? extends TypeRule>)newValue);

+				return;

+		}

+		super.eSet(featureID, newValue);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public void eUnset(int featureID) {

+		switch (featureID) {

+			case TyperulesPackage.RULE_SET__EXTENDS:

+				setExtends((RuleSet)null);

+				return;

+			case TyperulesPackage.RULE_SET__TYPERULES:

+				getTyperules().clear();

+				return;

+		}

+		super.eUnset(featureID);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public boolean eIsSet(int featureID) {

+		switch (featureID) {

+			case TyperulesPackage.RULE_SET__EXTENDS:

+				return extends_ != null;

+			case TyperulesPackage.RULE_SET__TYPERULES:

+				return typerules != null && !typerules.isEmpty();

+		}

+		return super.eIsSet(featureID);

+	}

+

+} //RuleSetImpl

diff --git a/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/TypeJudgementImpl.java b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/TypeJudgementImpl.java
new file mode 100644
index 0000000..af0352d
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/TypeJudgementImpl.java
@@ -0,0 +1,282 @@
+/**

+ *  * Copyright (c) 2008 Daniel Varro

+ *  * All rights reserved. This program and the accompanying materials

+ *  * are made available under the terms of the Eclipse Public License v1.0

+ *  * which accompanies this distribution, and is available at

+ *  * http://www.eclipse.org/legal/epl-v10.html

+ *  *

+ *  * Contributors:

+ *  *    Daniel Varro - initial API and implementation

+ * 

+ *

+ * $Id$

+ */

+package org.eclipse.viatra2.gtasm.typerules.impl;

+

+import org.eclipse.emf.common.notify.Notification;

+

+import org.eclipse.emf.ecore.EClass;

+

+import org.eclipse.emf.ecore.impl.ENotificationImpl;

+import org.eclipse.emf.ecore.impl.EObjectImpl;

+

+import org.eclipse.viatra2.gtasm.typerules.TypeJudgement;

+import org.eclipse.viatra2.gtasm.typerules.TyperulesPackage;

+

+/**

+ * <!-- begin-user-doc -->

+ * An implementation of the model object '<em><b>Type Judgement</b></em>'.

+ * <!-- end-user-doc -->

+ * <p>

+ * The following features are implemented:

+ * <ul>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.impl.TypeJudgementImpl#isIsValid <em>Is Valid</em>}</li>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.impl.TypeJudgementImpl#getResult <em>Result</em>}</li>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.impl.TypeJudgementImpl#getName <em>Name</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @generated

+ */

+public abstract class TypeJudgementImpl extends EObjectImpl implements TypeJudgement {

+	/**

+	 * The default value of the '{@link #isIsValid() <em>Is Valid</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #isIsValid()

+	 * @generated

+	 * @ordered

+	 */

+	protected static final boolean IS_VALID_EDEFAULT = true;

+

+	/**

+	 * The cached value of the '{@link #isIsValid() <em>Is Valid</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #isIsValid()

+	 * @generated

+	 * @ordered

+	 */

+	protected boolean isValid = IS_VALID_EDEFAULT;

+

+	/**

+	 * The default value of the '{@link #getResult() <em>Result</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getResult()

+	 * @generated

+	 * @ordered

+	 */

+	protected static final String RESULT_EDEFAULT = null;

+

+	/**

+	 * The cached value of the '{@link #getResult() <em>Result</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getResult()

+	 * @generated

+	 * @ordered

+	 */

+	protected String result = RESULT_EDEFAULT;

+

+	/**

+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getName()

+	 * @generated

+	 * @ordered

+	 */

+	protected static final String NAME_EDEFAULT = null;

+

+	/**

+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getName()

+	 * @generated

+	 * @ordered

+	 */

+	protected String name = NAME_EDEFAULT;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	protected TypeJudgementImpl() {

+		super();

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	protected EClass eStaticClass() {

+		return TyperulesPackage.Literals.TYPE_JUDGEMENT;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public boolean isIsValid() {

+		return isValid;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public void setIsValid(boolean newIsValid) {

+		boolean oldIsValid = isValid;

+		isValid = newIsValid;

+		if (eNotificationRequired())

+			eNotify(new ENotificationImpl(this, Notification.SET, TyperulesPackage.TYPE_JUDGEMENT__IS_VALID, oldIsValid, isValid));

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public String getResult() {

+		return result;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public void setResult(String newResult) {

+		String oldResult = result;

+		result = newResult;

+		if (eNotificationRequired())

+			eNotify(new ENotificationImpl(this, Notification.SET, TyperulesPackage.TYPE_JUDGEMENT__RESULT, oldResult, result));

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public String getName() {

+		return name;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public void setName(String newName) {

+		String oldName = name;

+		name = newName;

+		if (eNotificationRequired())

+			eNotify(new ENotificationImpl(this, Notification.SET, TyperulesPackage.TYPE_JUDGEMENT__NAME, oldName, name));

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public Object eGet(int featureID, boolean resolve, boolean coreType) {

+		switch (featureID) {

+			case TyperulesPackage.TYPE_JUDGEMENT__IS_VALID:

+				return isIsValid() ? Boolean.TRUE : Boolean.FALSE;

+			case TyperulesPackage.TYPE_JUDGEMENT__RESULT:

+				return getResult();

+			case TyperulesPackage.TYPE_JUDGEMENT__NAME:

+				return getName();

+		}

+		return super.eGet(featureID, resolve, coreType);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public void eSet(int featureID, Object newValue) {

+		switch (featureID) {

+			case TyperulesPackage.TYPE_JUDGEMENT__IS_VALID:

+				setIsValid(((Boolean)newValue).booleanValue());

+				return;

+			case TyperulesPackage.TYPE_JUDGEMENT__RESULT:

+				setResult((String)newValue);

+				return;

+			case TyperulesPackage.TYPE_JUDGEMENT__NAME:

+				setName((String)newValue);

+				return;

+		}

+		super.eSet(featureID, newValue);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public void eUnset(int featureID) {

+		switch (featureID) {

+			case TyperulesPackage.TYPE_JUDGEMENT__IS_VALID:

+				setIsValid(IS_VALID_EDEFAULT);

+				return;

+			case TyperulesPackage.TYPE_JUDGEMENT__RESULT:

+				setResult(RESULT_EDEFAULT);

+				return;

+			case TyperulesPackage.TYPE_JUDGEMENT__NAME:

+				setName(NAME_EDEFAULT);

+				return;

+		}

+		super.eUnset(featureID);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public boolean eIsSet(int featureID) {

+		switch (featureID) {

+			case TyperulesPackage.TYPE_JUDGEMENT__IS_VALID:

+				return isValid != IS_VALID_EDEFAULT;

+			case TyperulesPackage.TYPE_JUDGEMENT__RESULT:

+				return RESULT_EDEFAULT == null ? result != null : !RESULT_EDEFAULT.equals(result);

+			case TyperulesPackage.TYPE_JUDGEMENT__NAME:

+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);

+		}

+		return super.eIsSet(featureID);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public String toString() {

+		if (eIsProxy()) return super.toString();

+

+		StringBuffer result = new StringBuffer(super.toString());

+		result.append(" (isValid: ");

+		result.append(isValid);

+		result.append(", result: ");

+		result.append(result);

+		result.append(", name: ");

+		result.append(name);

+		result.append(')');

+		return result.toString();

+	}

+

+} //TypeJudgementImpl

diff --git a/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/TypeRuleImpl.java b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/TypeRuleImpl.java
new file mode 100644
index 0000000..a7a90f4
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/TypeRuleImpl.java
@@ -0,0 +1,233 @@
+/**

+ *  * Copyright (c) 2008 Daniel Varro

+ *  * All rights reserved. This program and the accompanying materials

+ *  * are made available under the terms of the Eclipse Public License v1.0

+ *  * which accompanies this distribution, and is available at

+ *  * http://www.eclipse.org/legal/epl-v10.html

+ *  *

+ *  * Contributors:

+ *  *    Daniel Varro - initial API and implementation

+ * 

+ *

+ * $Id$

+ */

+package org.eclipse.viatra2.gtasm.typerules.impl;

+

+import java.util.Collection;

+

+import org.eclipse.emf.common.notify.Notification;

+import org.eclipse.emf.common.notify.NotificationChain;

+

+import org.eclipse.emf.common.util.EList;

+

+import org.eclipse.emf.ecore.EClass;

+import org.eclipse.emf.ecore.InternalEObject;

+

+import org.eclipse.emf.ecore.impl.ENotificationImpl;

+import org.eclipse.emf.ecore.impl.EObjectImpl;

+

+import org.eclipse.emf.ecore.util.EObjectContainmentEList;

+import org.eclipse.emf.ecore.util.InternalEList;

+

+import org.eclipse.viatra2.gtasm.typerules.TypeJudgement;

+import org.eclipse.viatra2.gtasm.typerules.TypeRule;

+import org.eclipse.viatra2.gtasm.typerules.TyperulesPackage;

+

+/**

+ * <!-- begin-user-doc -->

+ * An implementation of the model object '<em><b>Type Rule</b></em>'.

+ * <!-- end-user-doc -->

+ * <p>

+ * The following features are implemented:

+ * <ul>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.impl.TypeRuleImpl#getJudgements <em>Judgements</em>}</li>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.impl.TypeRuleImpl#getOperator <em>Operator</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @generated

+ */

+public class TypeRuleImpl extends EObjectImpl implements TypeRule {

+	/**

+	 * The cached value of the '{@link #getJudgements() <em>Judgements</em>}' containment reference list.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getJudgements()

+	 * @generated

+	 * @ordered

+	 */

+	protected EList<TypeJudgement> judgements;

+

+	/**

+	 * The default value of the '{@link #getOperator() <em>Operator</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getOperator()

+	 * @generated

+	 * @ordered

+	 */

+	protected static final String OPERATOR_EDEFAULT = null;

+

+	/**

+	 * The cached value of the '{@link #getOperator() <em>Operator</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getOperator()

+	 * @generated

+	 * @ordered

+	 */

+	protected String operator = OPERATOR_EDEFAULT;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	protected TypeRuleImpl() {

+		super();

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	protected EClass eStaticClass() {

+		return TyperulesPackage.Literals.TYPE_RULE;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EList<TypeJudgement> getJudgements() {

+		if (judgements == null) {

+			judgements = new EObjectContainmentEList<TypeJudgement>(TypeJudgement.class, this, TyperulesPackage.TYPE_RULE__JUDGEMENTS);

+		}

+		return judgements;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public String getOperator() {

+		return operator;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public void setOperator(String newOperator) {

+		String oldOperator = operator;

+		operator = newOperator;

+		if (eNotificationRequired())

+			eNotify(new ENotificationImpl(this, Notification.SET, TyperulesPackage.TYPE_RULE__OPERATOR, oldOperator, operator));

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {

+		switch (featureID) {

+			case TyperulesPackage.TYPE_RULE__JUDGEMENTS:

+				return ((InternalEList<?>)getJudgements()).basicRemove(otherEnd, msgs);

+		}

+		return super.eInverseRemove(otherEnd, featureID, msgs);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public Object eGet(int featureID, boolean resolve, boolean coreType) {

+		switch (featureID) {

+			case TyperulesPackage.TYPE_RULE__JUDGEMENTS:

+				return getJudgements();

+			case TyperulesPackage.TYPE_RULE__OPERATOR:

+				return getOperator();

+		}

+		return super.eGet(featureID, resolve, coreType);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@SuppressWarnings("unchecked")

+	@Override

+	public void eSet(int featureID, Object newValue) {

+		switch (featureID) {

+			case TyperulesPackage.TYPE_RULE__JUDGEMENTS:

+				getJudgements().clear();

+				getJudgements().addAll((Collection<? extends TypeJudgement>)newValue);

+				return;

+			case TyperulesPackage.TYPE_RULE__OPERATOR:

+				setOperator((String)newValue);

+				return;

+		}

+		super.eSet(featureID, newValue);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public void eUnset(int featureID) {

+		switch (featureID) {

+			case TyperulesPackage.TYPE_RULE__JUDGEMENTS:

+				getJudgements().clear();

+				return;

+			case TyperulesPackage.TYPE_RULE__OPERATOR:

+				setOperator(OPERATOR_EDEFAULT);

+				return;

+		}

+		super.eUnset(featureID);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public boolean eIsSet(int featureID) {

+		switch (featureID) {

+			case TyperulesPackage.TYPE_RULE__JUDGEMENTS:

+				return judgements != null && !judgements.isEmpty();

+			case TyperulesPackage.TYPE_RULE__OPERATOR:

+				return OPERATOR_EDEFAULT == null ? operator != null : !OPERATOR_EDEFAULT.equals(operator);

+		}

+		return super.eIsSet(featureID);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public String toString() {

+		if (eIsProxy()) return super.toString();

+

+		StringBuffer result = new StringBuffer(super.toString());

+		result.append(" (operator: ");

+		result.append(operator);

+		result.append(')');

+		return result.toString();

+	}

+

+} //TypeRuleImpl

diff --git a/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/TyperulesFactoryImpl.java b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/TyperulesFactoryImpl.java
new file mode 100644
index 0000000..5409fe8
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/TyperulesFactoryImpl.java
@@ -0,0 +1,150 @@
+/**

+ *  * Copyright (c) 2008 Daniel Varro

+ *  * All rights reserved. This program and the accompanying materials

+ *  * are made available under the terms of the Eclipse Public License v1.0

+ *  * which accompanies this distribution, and is available at

+ *  * http://www.eclipse.org/legal/epl-v10.html

+ *  *

+ *  * Contributors:

+ *  *    Daniel Varro - initial API and implementation

+ * 

+ *

+ * $Id$

+ */

+package org.eclipse.viatra2.gtasm.typerules.impl;

+

+import org.eclipse.emf.ecore.EClass;

+import org.eclipse.emf.ecore.EObject;

+import org.eclipse.emf.ecore.EPackage;

+

+import org.eclipse.emf.ecore.impl.EFactoryImpl;

+

+import org.eclipse.emf.ecore.plugin.EcorePlugin;

+

+import org.eclipse.viatra2.gtasm.typerules.*;

+

+/**

+ * <!-- begin-user-doc -->

+ * An implementation of the model <b>Factory</b>.

+ * <!-- end-user-doc -->

+ * @generated

+ */

+public class TyperulesFactoryImpl extends EFactoryImpl implements TyperulesFactory {

+	/**

+	 * Creates the default factory implementation.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public static TyperulesFactory init() {

+		try {

+			TyperulesFactory theTyperulesFactory = (TyperulesFactory)EPackage.Registry.INSTANCE.getEFactory("http:///typerules.ecore"); 

+			if (theTyperulesFactory != null) {

+				return theTyperulesFactory;

+			}

+		}

+		catch (Exception exception) {

+			EcorePlugin.INSTANCE.log(exception);

+		}

+		return new TyperulesFactoryImpl();

+	}

+

+	/**

+	 * Creates an instance of the factory.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public TyperulesFactoryImpl() {

+		super();

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public EObject create(EClass eClass) {

+		switch (eClass.getClassifierID()) {

+			case TyperulesPackage.RULE_SET: return createRuleSet();

+			case TyperulesPackage.UNARY_TYPE_JUDGEMENT: return createUnaryTypeJudgement();

+			case TyperulesPackage.BINARY_TYPE_JUDGEMENT: return createBinaryTypeJudgement();

+			case TyperulesPackage.TYPE_RULE: return createTypeRule();

+			case TyperulesPackage.CUSTOM_TYPE_JUDGEMENT: return createCustomTypeJudgement();

+			default:

+				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");

+		}

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public RuleSet createRuleSet() {

+		RuleSetImpl ruleSet = new RuleSetImpl();

+		return ruleSet;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public UnaryTypeJudgement createUnaryTypeJudgement() {

+		UnaryTypeJudgementImpl unaryTypeJudgement = new UnaryTypeJudgementImpl();

+		return unaryTypeJudgement;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public BinaryTypeJudgement createBinaryTypeJudgement() {

+		BinaryTypeJudgementImpl binaryTypeJudgement = new BinaryTypeJudgementImpl();

+		return binaryTypeJudgement;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public TypeRule createTypeRule() {

+		TypeRuleImpl typeRule = new TypeRuleImpl();

+		return typeRule;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public CustomTypeJudgement createCustomTypeJudgement() {

+		CustomTypeJudgementImpl customTypeJudgement = new CustomTypeJudgementImpl();

+		return customTypeJudgement;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public TyperulesPackage getTyperulesPackage() {

+		return (TyperulesPackage)getEPackage();

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @deprecated

+	 * @generated

+	 */

+	@Deprecated

+	public static TyperulesPackage getPackage() {

+		return TyperulesPackage.eINSTANCE;

+	}

+

+} //TyperulesFactoryImpl

diff --git a/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/TyperulesPackageImpl.java b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/TyperulesPackageImpl.java
new file mode 100644
index 0000000..8f82d69
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/TyperulesPackageImpl.java
@@ -0,0 +1,414 @@
+/**

+ *  * Copyright (c) 2008 Daniel Varro

+ *  * All rights reserved. This program and the accompanying materials

+ *  * are made available under the terms of the Eclipse Public License v1.0

+ *  * which accompanies this distribution, and is available at

+ *  * http://www.eclipse.org/legal/epl-v10.html

+ *  *

+ *  * Contributors:

+ *  *    Daniel Varro - initial API and implementation

+ * 

+ *

+ * $Id$

+ */

+package org.eclipse.viatra2.gtasm.typerules.impl;

+

+import org.eclipse.emf.ecore.EAttribute;

+import org.eclipse.emf.ecore.EClass;

+import org.eclipse.emf.ecore.EPackage;

+import org.eclipse.emf.ecore.EReference;

+

+import org.eclipse.emf.ecore.impl.EPackageImpl;

+

+import org.eclipse.viatra2.gtasm.typerules.BinaryTypeJudgement;

+import org.eclipse.viatra2.gtasm.typerules.CustomTypeJudgement;

+import org.eclipse.viatra2.gtasm.typerules.RuleSet;

+import org.eclipse.viatra2.gtasm.typerules.TypeJudgement;

+import org.eclipse.viatra2.gtasm.typerules.TypeRule;

+import org.eclipse.viatra2.gtasm.typerules.TyperulesFactory;

+import org.eclipse.viatra2.gtasm.typerules.TyperulesPackage;

+import org.eclipse.viatra2.gtasm.typerules.UnaryTypeJudgement;

+

+/**

+ * <!-- begin-user-doc -->

+ * An implementation of the model <b>Package</b>.

+ * <!-- end-user-doc -->

+ * @generated

+ */

+public class TyperulesPackageImpl extends EPackageImpl implements TyperulesPackage {

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	private EClass ruleSetEClass = null;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	private EClass typeJudgementEClass = null;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	private EClass unaryTypeJudgementEClass = null;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	private EClass binaryTypeJudgementEClass = null;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	private EClass typeRuleEClass = null;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	private EClass customTypeJudgementEClass = null;

+

+	/**

+	 * Creates an instance of the model <b>Package</b>, registered with

+	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package

+	 * package URI value.

+	 * <p>Note: the correct way to create the package is via the static

+	 * factory method {@link #init init()}, which also performs

+	 * initialization of the package, or returns the registered package,

+	 * if one already exists.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see org.eclipse.emf.ecore.EPackage.Registry

+	 * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage#eNS_URI

+	 * @see #init()

+	 * @generated

+	 */

+	private TyperulesPackageImpl() {

+		super(eNS_URI, TyperulesFactory.eINSTANCE);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	private static boolean isInited = false;

+

+	/**

+	 * Creates, registers, and initializes the <b>Package</b> for this

+	 * model, and for any others upon which it depends.  Simple

+	 * dependencies are satisfied by calling this method on all

+	 * dependent packages before doing anything else.  This method drives

+	 * initialization for interdependent packages directly, in parallel

+	 * with this package, itself.

+	 * <p>Of this package and its interdependencies, all packages which

+	 * have not yet been registered by their URI values are first created

+	 * and registered.  The packages are then initialized in two steps:

+	 * meta-model objects for all of the packages are created before any

+	 * are initialized, since one package's meta-model objects may refer to

+	 * those of another.

+	 * <p>Invocation of this method will not affect any packages that have

+	 * already been initialized.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #eNS_URI

+	 * @see #createPackageContents()

+	 * @see #initializePackageContents()

+	 * @generated

+	 */

+	public static TyperulesPackage init() {

+		if (isInited) return (TyperulesPackage)EPackage.Registry.INSTANCE.getEPackage(TyperulesPackage.eNS_URI);

+

+		// Obtain or create and register package

+		TyperulesPackageImpl theTyperulesPackage = (TyperulesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof TyperulesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new TyperulesPackageImpl());

+

+		isInited = true;

+

+		// Create package meta-data objects

+		theTyperulesPackage.createPackageContents();

+

+		// Initialize created meta-data

+		theTyperulesPackage.initializePackageContents();

+

+		// Mark meta-data to indicate it can't be changed

+		theTyperulesPackage.freeze();

+

+		return theTyperulesPackage;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EClass getRuleSet() {

+		return ruleSetEClass;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EReference getRuleSet_Extends() {

+		return (EReference)ruleSetEClass.getEStructuralFeatures().get(0);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EReference getRuleSet_Typerules() {

+		return (EReference)ruleSetEClass.getEStructuralFeatures().get(1);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EClass getTypeJudgement() {

+		return typeJudgementEClass;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EAttribute getTypeJudgement_IsValid() {

+		return (EAttribute)typeJudgementEClass.getEStructuralFeatures().get(0);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EAttribute getTypeJudgement_Result() {

+		return (EAttribute)typeJudgementEClass.getEStructuralFeatures().get(1);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EAttribute getTypeJudgement_Name() {

+		return (EAttribute)typeJudgementEClass.getEStructuralFeatures().get(2);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EClass getUnaryTypeJudgement() {

+		return unaryTypeJudgementEClass;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EAttribute getUnaryTypeJudgement_Operand() {

+		return (EAttribute)unaryTypeJudgementEClass.getEStructuralFeatures().get(0);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EClass getBinaryTypeJudgement() {

+		return binaryTypeJudgementEClass;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EAttribute getBinaryTypeJudgement_FirstOperand() {

+		return (EAttribute)binaryTypeJudgementEClass.getEStructuralFeatures().get(0);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EAttribute getBinaryTypeJudgement_SecondOperand() {

+		return (EAttribute)binaryTypeJudgementEClass.getEStructuralFeatures().get(1);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EClass getTypeRule() {

+		return typeRuleEClass;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EReference getTypeRule_Judgements() {

+		return (EReference)typeRuleEClass.getEStructuralFeatures().get(0);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EAttribute getTypeRule_Operator() {

+		return (EAttribute)typeRuleEClass.getEStructuralFeatures().get(1);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EClass getCustomTypeJudgement() {

+		return customTypeJudgementEClass;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EAttribute getCustomTypeJudgement_Operands() {

+		return (EAttribute)customTypeJudgementEClass.getEStructuralFeatures().get(0);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public TyperulesFactory getTyperulesFactory() {

+		return (TyperulesFactory)getEFactoryInstance();

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	private boolean isCreated = false;

+

+	/**

+	 * Creates the meta-model objects for the package.  This method is

+	 * guarded to have no affect on any invocation but its first.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public void createPackageContents() {

+		if (isCreated) return;

+		isCreated = true;

+

+		// Create classes and their features

+		ruleSetEClass = createEClass(RULE_SET);

+		createEReference(ruleSetEClass, RULE_SET__EXTENDS);

+		createEReference(ruleSetEClass, RULE_SET__TYPERULES);

+

+		typeJudgementEClass = createEClass(TYPE_JUDGEMENT);

+		createEAttribute(typeJudgementEClass, TYPE_JUDGEMENT__IS_VALID);

+		createEAttribute(typeJudgementEClass, TYPE_JUDGEMENT__RESULT);

+		createEAttribute(typeJudgementEClass, TYPE_JUDGEMENT__NAME);

+

+		unaryTypeJudgementEClass = createEClass(UNARY_TYPE_JUDGEMENT);

+		createEAttribute(unaryTypeJudgementEClass, UNARY_TYPE_JUDGEMENT__OPERAND);

+

+		binaryTypeJudgementEClass = createEClass(BINARY_TYPE_JUDGEMENT);

+		createEAttribute(binaryTypeJudgementEClass, BINARY_TYPE_JUDGEMENT__FIRST_OPERAND);

+		createEAttribute(binaryTypeJudgementEClass, BINARY_TYPE_JUDGEMENT__SECOND_OPERAND);

+

+		typeRuleEClass = createEClass(TYPE_RULE);

+		createEReference(typeRuleEClass, TYPE_RULE__JUDGEMENTS);

+		createEAttribute(typeRuleEClass, TYPE_RULE__OPERATOR);

+

+		customTypeJudgementEClass = createEClass(CUSTOM_TYPE_JUDGEMENT);

+		createEAttribute(customTypeJudgementEClass, CUSTOM_TYPE_JUDGEMENT__OPERANDS);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	private boolean isInitialized = false;

+

+	/**

+	 * Complete the initialization of the package and its meta-model.  This

+	 * method is guarded to have no affect on any invocation but its first.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public void initializePackageContents() {

+		if (isInitialized) return;

+		isInitialized = true;

+

+		// Initialize package

+		setName(eNAME);

+		setNsPrefix(eNS_PREFIX);

+		setNsURI(eNS_URI);

+

+		// Create type parameters

+

+		// Set bounds for type parameters

+

+		// Add supertypes to classes

+		unaryTypeJudgementEClass.getESuperTypes().add(this.getTypeJudgement());

+		binaryTypeJudgementEClass.getESuperTypes().add(this.getTypeJudgement());

+		customTypeJudgementEClass.getESuperTypes().add(this.getTypeJudgement());

+

+		// Initialize classes and features; add operations and parameters

+		initEClass(ruleSetEClass, RuleSet.class, "RuleSet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

+		initEReference(getRuleSet_Extends(), this.getRuleSet(), null, "extends", null, 0, 1, RuleSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+		initEReference(getRuleSet_Typerules(), this.getTypeRule(), null, "typerules", null, 0, -1, RuleSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+

+		initEClass(typeJudgementEClass, TypeJudgement.class, "TypeJudgement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

+		initEAttribute(getTypeJudgement_IsValid(), ecorePackage.getEBoolean(), "isValid", "true", 0, 1, TypeJudgement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+		initEAttribute(getTypeJudgement_Result(), ecorePackage.getEString(), "result", null, 0, 1, TypeJudgement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+		initEAttribute(getTypeJudgement_Name(), ecorePackage.getEString(), "name", null, 0, 1, TypeJudgement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+

+		initEClass(unaryTypeJudgementEClass, UnaryTypeJudgement.class, "UnaryTypeJudgement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

+		initEAttribute(getUnaryTypeJudgement_Operand(), ecorePackage.getEString(), "operand", null, 0, 1, UnaryTypeJudgement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+

+		initEClass(binaryTypeJudgementEClass, BinaryTypeJudgement.class, "BinaryTypeJudgement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

+		initEAttribute(getBinaryTypeJudgement_FirstOperand(), ecorePackage.getEString(), "firstOperand", null, 0, 1, BinaryTypeJudgement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+		initEAttribute(getBinaryTypeJudgement_SecondOperand(), ecorePackage.getEString(), "secondOperand", null, 0, 1, BinaryTypeJudgement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+

+		initEClass(typeRuleEClass, TypeRule.class, "TypeRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

+		initEReference(getTypeRule_Judgements(), this.getTypeJudgement(), null, "judgements", null, 0, -1, TypeRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+		initEAttribute(getTypeRule_Operator(), ecorePackage.getEString(), "operator", null, 0, 1, TypeRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+

+		initEClass(customTypeJudgementEClass, CustomTypeJudgement.class, "CustomTypeJudgement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

+		initEAttribute(getCustomTypeJudgement_Operands(), ecorePackage.getEString(), "operands", null, 0, -1, CustomTypeJudgement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+

+		// Create resource

+		createResource(eNS_URI);

+	}

+

+} //TyperulesPackageImpl

diff --git a/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/UnaryTypeJudgementImpl.java b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/UnaryTypeJudgementImpl.java
new file mode 100644
index 0000000..4af9348
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/impl/UnaryTypeJudgementImpl.java
@@ -0,0 +1,173 @@
+/**

+ *  * Copyright (c) 2008 Daniel Varro

+ *  * All rights reserved. This program and the accompanying materials

+ *  * are made available under the terms of the Eclipse Public License v1.0

+ *  * which accompanies this distribution, and is available at

+ *  * http://www.eclipse.org/legal/epl-v10.html

+ *  *

+ *  * Contributors:

+ *  *    Daniel Varro - initial API and implementation

+ * 

+ *

+ * $Id$

+ */

+package org.eclipse.viatra2.gtasm.typerules.impl;

+

+import org.eclipse.emf.common.notify.Notification;

+

+import org.eclipse.emf.ecore.EClass;

+

+import org.eclipse.emf.ecore.impl.ENotificationImpl;

+

+import org.eclipse.viatra2.gtasm.typerules.TyperulesPackage;

+import org.eclipse.viatra2.gtasm.typerules.UnaryTypeJudgement;

+

+/**

+ * <!-- begin-user-doc -->

+ * An implementation of the model object '<em><b>Unary Type Judgement</b></em>'.

+ * <!-- end-user-doc -->

+ * <p>

+ * The following features are implemented:

+ * <ul>

+ *   <li>{@link org.eclipse.viatra2.gtasm.typerules.impl.UnaryTypeJudgementImpl#getOperand <em>Operand</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @generated

+ */

+public class UnaryTypeJudgementImpl extends TypeJudgementImpl implements UnaryTypeJudgement {

+	/**

+	 * The default value of the '{@link #getOperand() <em>Operand</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getOperand()

+	 * @generated

+	 * @ordered

+	 */

+	protected static final String OPERAND_EDEFAULT = null;

+

+	/**

+	 * The cached value of the '{@link #getOperand() <em>Operand</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getOperand()

+	 * @generated

+	 * @ordered

+	 */

+	protected String operand = OPERAND_EDEFAULT;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	protected UnaryTypeJudgementImpl() {

+		super();

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	protected EClass eStaticClass() {

+		return TyperulesPackage.Literals.UNARY_TYPE_JUDGEMENT;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public String getOperand() {

+		return operand;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public void setOperand(String newOperand) {

+		String oldOperand = operand;

+		operand = newOperand;

+		if (eNotificationRequired())

+			eNotify(new ENotificationImpl(this, Notification.SET, TyperulesPackage.UNARY_TYPE_JUDGEMENT__OPERAND, oldOperand, operand));

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public Object eGet(int featureID, boolean resolve, boolean coreType) {

+		switch (featureID) {

+			case TyperulesPackage.UNARY_TYPE_JUDGEMENT__OPERAND:

+				return getOperand();

+		}

+		return super.eGet(featureID, resolve, coreType);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public void eSet(int featureID, Object newValue) {

+		switch (featureID) {

+			case TyperulesPackage.UNARY_TYPE_JUDGEMENT__OPERAND:

+				setOperand((String)newValue);

+				return;

+		}

+		super.eSet(featureID, newValue);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public void eUnset(int featureID) {

+		switch (featureID) {

+			case TyperulesPackage.UNARY_TYPE_JUDGEMENT__OPERAND:

+				setOperand(OPERAND_EDEFAULT);

+				return;

+		}

+		super.eUnset(featureID);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public boolean eIsSet(int featureID) {

+		switch (featureID) {

+			case TyperulesPackage.UNARY_TYPE_JUDGEMENT__OPERAND:

+				return OPERAND_EDEFAULT == null ? operand != null : !OPERAND_EDEFAULT.equals(operand);

+		}

+		return super.eIsSet(featureID);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public String toString() {

+		if (eIsProxy()) return super.toString();

+

+		StringBuffer result = new StringBuffer(super.toString());

+		result.append(" (operand: ");

+		result.append(operand);

+		result.append(')');

+		return result.toString();

+	}

+

+} //UnaryTypeJudgementImpl

diff --git a/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/util/TyperulesAdapterFactory.java b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/util/TyperulesAdapterFactory.java
new file mode 100644
index 0000000..fd73dd1
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/util/TyperulesAdapterFactory.java
@@ -0,0 +1,221 @@
+/**

+ *  * Copyright (c) 2008 Daniel Varro

+ *  * All rights reserved. This program and the accompanying materials

+ *  * are made available under the terms of the Eclipse Public License v1.0

+ *  * which accompanies this distribution, and is available at

+ *  * http://www.eclipse.org/legal/epl-v10.html

+ *  *

+ *  * Contributors:

+ *  *    Daniel Varro - initial API and implementation

+ * 

+ *

+ * $Id$

+ */

+package org.eclipse.viatra2.gtasm.typerules.util;

+

+import org.eclipse.emf.common.notify.Adapter;

+import org.eclipse.emf.common.notify.Notifier;

+

+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;

+

+import org.eclipse.emf.ecore.EObject;

+

+import org.eclipse.viatra2.gtasm.typerules.*;

+

+/**

+ * <!-- begin-user-doc -->

+ * The <b>Adapter Factory</b> for the model.

+ * It provides an adapter <code>createXXX</code> method for each class of the model.

+ * <!-- end-user-doc -->

+ * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage

+ * @generated

+ */

+public class TyperulesAdapterFactory extends AdapterFactoryImpl {

+	/**

+	 * The cached model package.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	protected static TyperulesPackage modelPackage;

+

+	/**

+	 * Creates an instance of the adapter factory.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public TyperulesAdapterFactory() {

+		if (modelPackage == null) {

+			modelPackage = TyperulesPackage.eINSTANCE;

+		}

+	}

+

+	/**

+	 * Returns whether this factory is applicable for the type of the object.

+	 * <!-- begin-user-doc -->

+	 * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.

+	 * <!-- end-user-doc -->

+	 * @return whether this factory is applicable for the type of the object.

+	 * @generated

+	 */

+	@Override

+	public boolean isFactoryForType(Object object) {

+		if (object == modelPackage) {

+			return true;

+		}

+		if (object instanceof EObject) {

+			return ((EObject)object).eClass().getEPackage() == modelPackage;

+		}

+		return false;

+	}

+

+	/**

+	 * The switch the delegates to the <code>createXXX</code> methods.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	protected TyperulesSwitch<Adapter> modelSwitch =

+		new TyperulesSwitch<Adapter>() {

+			@Override

+			public Adapter caseRuleSet(RuleSet object) {

+				return createRuleSetAdapter();

+			}

+			@Override

+			public Adapter caseTypeJudgement(TypeJudgement object) {

+				return createTypeJudgementAdapter();

+			}

+			@Override

+			public Adapter caseUnaryTypeJudgement(UnaryTypeJudgement object) {

+				return createUnaryTypeJudgementAdapter();

+			}

+			@Override

+			public Adapter caseBinaryTypeJudgement(BinaryTypeJudgement object) {

+				return createBinaryTypeJudgementAdapter();

+			}

+			@Override

+			public Adapter caseTypeRule(TypeRule object) {

+				return createTypeRuleAdapter();

+			}

+			@Override

+			public Adapter caseCustomTypeJudgement(CustomTypeJudgement object) {

+				return createCustomTypeJudgementAdapter();

+			}

+			@Override

+			public Adapter defaultCase(EObject object) {

+				return createEObjectAdapter();

+			}

+		};

+

+	/**

+	 * Creates an adapter for the <code>target</code>.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @param target the object to adapt.

+	 * @return the adapter for the <code>target</code>.

+	 * @generated

+	 */

+	@Override

+	public Adapter createAdapter(Notifier target) {

+		return modelSwitch.doSwitch((EObject)target);

+	}

+

+

+	/**

+	 * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasm.typerules.RuleSet <em>Rule Set</em>}'.

+	 * <!-- begin-user-doc -->

+	 * This default implementation returns null so that we can easily ignore cases;

+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.

+	 * <!-- end-user-doc -->

+	 * @return the new adapter.

+	 * @see org.eclipse.viatra2.gtasm.typerules.RuleSet

+	 * @generated

+	 */

+	public Adapter createRuleSetAdapter() {

+		return null;

+	}

+

+	/**

+	 * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasm.typerules.TypeJudgement <em>Type Judgement</em>}'.

+	 * <!-- begin-user-doc -->

+	 * This default implementation returns null so that we can easily ignore cases;

+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.

+	 * <!-- end-user-doc -->

+	 * @return the new adapter.

+	 * @see org.eclipse.viatra2.gtasm.typerules.TypeJudgement

+	 * @generated

+	 */

+	public Adapter createTypeJudgementAdapter() {

+		return null;

+	}

+

+	/**

+	 * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasm.typerules.UnaryTypeJudgement <em>Unary Type Judgement</em>}'.

+	 * <!-- begin-user-doc -->

+	 * This default implementation returns null so that we can easily ignore cases;

+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.

+	 * <!-- end-user-doc -->

+	 * @return the new adapter.

+	 * @see org.eclipse.viatra2.gtasm.typerules.UnaryTypeJudgement

+	 * @generated

+	 */

+	public Adapter createUnaryTypeJudgementAdapter() {

+		return null;

+	}

+

+	/**

+	 * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasm.typerules.BinaryTypeJudgement <em>Binary Type Judgement</em>}'.

+	 * <!-- begin-user-doc -->

+	 * This default implementation returns null so that we can easily ignore cases;

+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.

+	 * <!-- end-user-doc -->

+	 * @return the new adapter.

+	 * @see org.eclipse.viatra2.gtasm.typerules.BinaryTypeJudgement

+	 * @generated

+	 */

+	public Adapter createBinaryTypeJudgementAdapter() {

+		return null;

+	}

+

+	/**

+	 * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasm.typerules.TypeRule <em>Type Rule</em>}'.

+	 * <!-- begin-user-doc -->

+	 * This default implementation returns null so that we can easily ignore cases;

+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.

+	 * <!-- end-user-doc -->

+	 * @return the new adapter.

+	 * @see org.eclipse.viatra2.gtasm.typerules.TypeRule

+	 * @generated

+	 */

+	public Adapter createTypeRuleAdapter() {

+		return null;

+	}

+

+	/**

+	 * Creates a new adapter for an object of class '{@link org.eclipse.viatra2.gtasm.typerules.CustomTypeJudgement <em>Custom Type Judgement</em>}'.

+	 * <!-- begin-user-doc -->

+	 * This default implementation returns null so that we can easily ignore cases;

+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.

+	 * <!-- end-user-doc -->

+	 * @return the new adapter.

+	 * @see org.eclipse.viatra2.gtasm.typerules.CustomTypeJudgement

+	 * @generated

+	 */

+	public Adapter createCustomTypeJudgementAdapter() {

+		return null;

+	}

+

+	/**

+	 * Creates a new adapter for the default case.

+	 * <!-- begin-user-doc -->

+	 * This default implementation returns null.

+	 * <!-- end-user-doc -->

+	 * @return the new adapter.

+	 * @generated

+	 */

+	public Adapter createEObjectAdapter() {

+		return null;

+	}

+

+} //TyperulesAdapterFactory

diff --git a/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/util/TyperulesSwitch.java b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/util/TyperulesSwitch.java
new file mode 100644
index 0000000..2c95c00
--- /dev/null
+++ b/org.eclipse.viatra2.gtasm.typing.model/src/org/eclipse/viatra2/gtasm/typerules/util/TyperulesSwitch.java
@@ -0,0 +1,245 @@
+/**

+ *  * Copyright (c) 2008 Daniel Varro

+ *  * All rights reserved. This program and the accompanying materials

+ *  * are made available under the terms of the Eclipse Public License v1.0

+ *  * which accompanies this distribution, and is available at

+ *  * http://www.eclipse.org/legal/epl-v10.html

+ *  *

+ *  * Contributors:

+ *  *    Daniel Varro - initial API and implementation

+ * 

+ *

+ * $Id$

+ */

+package org.eclipse.viatra2.gtasm.typerules.util;

+

+import java.util.List;

+

+import org.eclipse.emf.ecore.EClass;

+import org.eclipse.emf.ecore.EObject;

+

+import org.eclipse.viatra2.gtasm.typerules.*;

+

+/**

+ * <!-- begin-user-doc -->

+ * The <b>Switch</b> for the model's inheritance hierarchy.

+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}

+ * to invoke the <code>caseXXX</code> method for each class of the model,

+ * starting with the actual class of the object

+ * and proceeding up the inheritance hierarchy

+ * until a non-null result is returned,

+ * which is the result of the switch.

+ * <!-- end-user-doc -->

+ * @see org.eclipse.viatra2.gtasm.typerules.TyperulesPackage

+ * @generated

+ */

+public class TyperulesSwitch<T> {

+	/**

+	 * The cached model package

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	protected static TyperulesPackage modelPackage;

+

+	/**

+	 * Creates an instance of the switch.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public TyperulesSwitch() {

+		if (modelPackage == null) {

+			modelPackage = TyperulesPackage.eINSTANCE;

+		}

+	}

+

+	/**

+	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the first non-null result returned by a <code>caseXXX</code> call.

+	 * @generated

+	 */

+	public T doSwitch(EObject theEObject) {

+		return doSwitch(theEObject.eClass(), theEObject);

+	}

+

+	/**

+	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the first non-null result returned by a <code>caseXXX</code> call.

+	 * @generated

+	 */

+	protected T doSwitch(EClass theEClass, EObject theEObject) {

+		if (theEClass.eContainer() == modelPackage) {

+			return doSwitch(theEClass.getClassifierID(), theEObject);

+		}

+		else {

+			List<EClass> eSuperTypes = theEClass.getESuperTypes();

+			return

+				eSuperTypes.isEmpty() ?

+					defaultCase(theEObject) :

+					doSwitch(eSuperTypes.get(0), theEObject);

+		}

+	}

+

+	/**

+	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the first non-null result returned by a <code>caseXXX</code> call.

+	 * @generated

+	 */

+	protected T doSwitch(int classifierID, EObject theEObject) {

+		switch (classifierID) {

+			case TyperulesPackage.RULE_SET: {

+				RuleSet ruleSet = (RuleSet)theEObject;

+				T result = caseRuleSet(ruleSet);

+				if (result == null) result = defaultCase(theEObject);

+				return result;

+			}

+			case TyperulesPackage.TYPE_JUDGEMENT: {

+				TypeJudgement typeJudgement = (TypeJudgement)theEObject;

+				T result = caseTypeJudgement(typeJudgement);

+				if (result == null) result = defaultCase(theEObject);

+				return result;

+			}

+			case TyperulesPackage.UNARY_TYPE_JUDGEMENT: {

+				UnaryTypeJudgement unaryTypeJudgement = (UnaryTypeJudgement)theEObject;

+				T result = caseUnaryTypeJudgement(unaryTypeJudgement);

+				if (result == null) result = caseTypeJudgement(unaryTypeJudgement);

+				if (result == null) result = defaultCase(theEObject);

+				return result;

+			}

+			case TyperulesPackage.BINARY_TYPE_JUDGEMENT: {

+				BinaryTypeJudgement binaryTypeJudgement = (BinaryTypeJudgement)theEObject;

+				T result = caseBinaryTypeJudgement(binaryTypeJudgement);

+				if (result == null) result = caseTypeJudgement(binaryTypeJudgement);

+				if (result == null) result = defaultCase(theEObject);

+				return result;

+			}

+			case TyperulesPackage.TYPE_RULE: {

+				TypeRule typeRule = (TypeRule)theEObject;

+				T result = caseTypeRule(typeRule);

+				if (result == null) result = defaultCase(theEObject);

+				return result;

+			}

+			case TyperulesPackage.CUSTOM_TYPE_JUDGEMENT: {

+				CustomTypeJudgement customTypeJudgement = (CustomTypeJudgement)theEObject;

+				T result = caseCustomTypeJudgement(customTypeJudgement);

+				if (result == null) result = caseTypeJudgement(customTypeJudgement);

+				if (result == null) result = defaultCase(theEObject);

+				return result;

+			}

+			default: return defaultCase(theEObject);

+		}

+	}

+

+	/**

+	 * Returns the result of interpreting the object as an instance of '<em>Rule Set</em>'.

+	 * <!-- begin-user-doc -->

+	 * This implementation returns null;

+	 * returning a non-null result will terminate the switch.

+	 * <!-- end-user-doc -->

+	 * @param object the target of the switch.

+	 * @return the result of interpreting the object as an instance of '<em>Rule Set</em>'.

+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)

+	 * @generated

+	 */

+	public T caseRuleSet(RuleSet object) {

+		return null;

+	}

+

+	/**

+	 * Returns the result of interpreting the object as an instance of '<em>Type Judgement</em>'.

+	 * <!-- begin-user-doc -->

+	 * This implementation returns null;

+	 * returning a non-null result will terminate the switch.

+	 * <!-- end-user-doc -->

+	 * @param object the target of the switch.

+	 * @return the result of interpreting the object as an instance of '<em>Type Judgement</em>'.

+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)

+	 * @generated

+	 */

+	public T caseTypeJudgement(TypeJudgement object) {

+		return null;

+	}

+

+	/**

+	 * Returns the result of interpreting the object as an instance of '<em>Unary Type Judgement</em>'.

+	 * <!-- begin-user-doc -->

+	 * This implementation returns null;

+	 * returning a non-null result will terminate the switch.

+	 * <!-- end-user-doc -->

+	 * @param object the target of the switch.

+	 * @return the result of interpreting the object as an instance of '<em>Unary Type Judgement</em>'.

+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)

+	 * @generated

+	 */

+	public T caseUnaryTypeJudgement(UnaryTypeJudgement object) {

+		return null;

+	}

+

+	/**

+	 * Returns the result of interpreting the object as an instance of '<em>Binary Type Judgement</em>'.

+	 * <!-- begin-user-doc -->

+	 * This implementation returns null;

+	 * returning a non-null result will terminate the switch.

+	 * <!-- end-user-doc -->

+	 * @param object the target of the switch.

+	 * @return the result of interpreting the object as an instance of '<em>Binary Type Judgement</em>'.

+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)

+	 * @generated

+	 */

+	public T caseBinaryTypeJudgement(BinaryTypeJudgement object) {

+		return null;

+	}

+

+	/**

+	 * Returns the result of interpreting the object as an instance of '<em>Type Rule</em>'.

+	 * <!-- begin-user-doc -->

+	 * This implementation returns null;

+	 * returning a non-null result will terminate the switch.

+	 * <!-- end-user-doc -->

+	 * @param object the target of the switch.

+	 * @return the result of interpreting the object as an instance of '<em>Type Rule</em>'.

+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)

+	 * @generated

+	 */

+	public T caseTypeRule(TypeRule object) {

+		return null;

+	}

+

+	/**

+	 * Returns the result of interpreting the object as an instance of '<em>Custom Type Judgement</em>'.

+	 * <!-- begin-user-doc -->

+	 * This implementation returns null;

+	 * returning a non-null result will terminate the switch.

+	 * <!-- end-user-doc -->

+	 * @param object the target of the switch.

+	 * @return the result of interpreting the object as an instance of '<em>Custom Type Judgement</em>'.

+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)

+	 * @generated

+	 */

+	public T caseCustomTypeJudgement(CustomTypeJudgement object) {

+		return null;

+	}

+

+	/**

+	 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.

+	 * <!-- begin-user-doc -->

+	 * This implementation returns null;

+	 * returning a non-null result will terminate the switch, but this is the last case anyway.

+	 * <!-- end-user-doc -->

+	 * @param object the target of the switch.

+	 * @return the result of interpreting the object as an instance of '<em>EObject</em>'.

+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject)

+	 * @generated

+	 */

+	public T defaultCase(EObject object) {

+		return null;

+	}

+

+} //TyperulesSwitch

diff --git a/org.eclipse.viatra2.gui/.classpath b/org.eclipse.viatra2.gui/.classpath
new file mode 100644
index 0000000..ad32c83
--- /dev/null
+++ b/org.eclipse.viatra2.gui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.viatra2.gui/.cvsignore b/org.eclipse.viatra2.gui/.cvsignore
new file mode 100644
index 0000000..ba077a4
--- /dev/null
+++ b/org.eclipse.viatra2.gui/.cvsignore
@@ -0,0 +1 @@
+bin
diff --git a/org.eclipse.viatra2.gui/.project b/org.eclipse.viatra2.gui/.project
new file mode 100644
index 0000000..a8d9122
--- /dev/null
+++ b/org.eclipse.viatra2.gui/.project
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.viatra2.gui</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.viatra2.gui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra2.gui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..cd0dbfc
--- /dev/null
+++ b/org.eclipse.viatra2.gui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,255 @@
+#Wed Jan 12 11:23:49 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
diff --git a/org.eclipse.viatra2.gui/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.viatra2.gui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..5a17cbe
--- /dev/null
+++ b/org.eclipse.viatra2.gui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,5 @@
+#Mon Jul 10 11:23:30 CEST 2006
+eclipse.preferences.version=1
+formatter_profile=org.eclipse.jdt.ui.default.eclipse_profile
+formatter_settings_version=10
+internal.default.compliance=default
diff --git a/org.eclipse.viatra2.gui/META-INF/MANIFEST.MF b/org.eclipse.viatra2.gui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..ff4a3ee
--- /dev/null
+++ b/org.eclipse.viatra2.gui/META-INF/MANIFEST.MF
@@ -0,0 +1,35 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: VIATRA2 R3 Framework GUI Plug-in
+Bundle-SymbolicName: org.eclipse.viatra2.gui;singleton:=true
+Bundle-Version: 3.3.0.qualifier
+Bundle-Activator: org.eclipse.viatra2.frameworkgui.FrameworkGUIPlugin
+Bundle-Vendor: BUTE-FTSRG
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.viatra2.core2,
+ org.eclipse.ui.views,
+ org.eclipse.core.resources,
+ org.eclipse.viatra2.gtasm.model,
+ org.eclipse.ui.ide,
+ org.eclipse.core.databinding,
+ org.eclipse.core.databinding.beans,
+ org.eclipse.jface.databinding,
+ org.eclipse.ui.console,
+ org.eclipse.viatra2.loaders.vtcl_lpgparser,
+ org.eclipse.emf.codegen
+Bundle-ClassPath: .
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.viatra2.frameworkgui.actions,
+ org.eclipse.viatra2.frameworkgui.content,
+ org.eclipse.viatra2.frameworkgui.content.nativefunctions,
+ org.eclipse.viatra2.frameworkgui.content.transformation,
+ org.eclipse.viatra2.frameworkgui.dialogs,
+ org.eclipse.viatra2.frameworkgui.runner,
+ org.eclipse.viatra2.frameworkgui.views,
+ org.eclipse.viatra2.frameworkgui.views.console.commands,
+ org.eclipse.viatra2.frameworkgui.views.console.commands.xform,
+ org.eclipse.viatra2.frameworkgui.views.layout,
+ org.eclipse.viatra2.frameworkgui.wizards
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+
diff --git a/org.eclipse.viatra2.gui/about.html b/org.eclipse.viatra2.gui/about.html
new file mode 100644
index 0000000..1262b8c
--- /dev/null
+++ b/org.eclipse.viatra2.gui/about.html
@@ -0,0 +1,28 @@
+<!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>About</title>

+</head>

+<body lang="EN-US">

+<h2>About This Content</h2>

+ 

+<p>July 4th, 2008</p>	

+<h3>License</h3>

+

+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 

+indicated below, the Content 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 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>If you did not receive this Content directly from the Eclipse Foundation, the Content is 

+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may

+apply to your use of any object code in the Content.  Check the Redistributor's license that was 

+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise

+indicated below, the terms and conditions of the EPL still apply to any source code in the Content

+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>

+

+</body>

+</html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gui/build.properties b/org.eclipse.viatra2.gui/build.properties
new file mode 100644
index 0000000..495e729
--- /dev/null
+++ b/org.eclipse.viatra2.gui/build.properties
@@ -0,0 +1,8 @@
+bin.includes = icons/,\
+               plugin.xml,\
+               META-INF/,\
+               .,\
+               schema/
+source.. = src/
+src.includes = schema/,\
+               icons/
diff --git a/org.eclipse.viatra2.gui/icons/buffer_off.png b/org.eclipse.viatra2.gui/icons/buffer_off.png
new file mode 100644
index 0000000..60ad636
--- /dev/null
+++ b/org.eclipse.viatra2.gui/icons/buffer_off.png
Binary files differ
diff --git a/org.eclipse.viatra2.gui/icons/buffer_on.png b/org.eclipse.viatra2.gui/icons/buffer_on.png
new file mode 100644
index 0000000..af478e3
--- /dev/null
+++ b/org.eclipse.viatra2.gui/icons/buffer_on.png
Binary files differ
diff --git a/org.eclipse.viatra2.gui/icons/entity_transparent.png b/org.eclipse.viatra2.gui/icons/entity_transparent.png
new file mode 100644
index 0000000..0c2d46c
--- /dev/null
+++ b/org.eclipse.viatra2.gui/icons/entity_transparent.png
Binary files differ
diff --git a/org.eclipse.viatra2.gui/icons/machine_transparent.png b/org.eclipse.viatra2.gui/icons/machine_transparent.png
new file mode 100644
index 0000000..2dcba34
--- /dev/null
+++ b/org.eclipse.viatra2.gui/icons/machine_transparent.png
Binary files differ
diff --git a/org.eclipse.viatra2.gui/icons/nf_transparent.png b/org.eclipse.viatra2.gui/icons/nf_transparent.png
new file mode 100644
index 0000000..c4a643a
--- /dev/null
+++ b/org.eclipse.viatra2.gui/icons/nf_transparent.png
Binary files differ
diff --git a/org.eclipse.viatra2.gui/icons/refresh.gif b/org.eclipse.viatra2.gui/icons/refresh.gif
new file mode 100644
index 0000000..e383147
--- /dev/null
+++ b/org.eclipse.viatra2.gui/icons/refresh.gif
Binary files differ
diff --git a/org.eclipse.viatra2.gui/icons/relation_transparent.png b/org.eclipse.viatra2.gui/icons/relation_transparent.png
new file mode 100644
index 0000000..526b3eb
--- /dev/null
+++ b/org.eclipse.viatra2.gui/icons/relation_transparent.png
Binary files differ
diff --git a/org.eclipse.viatra2.gui/icons/viatra_framework.png b/org.eclipse.viatra2.gui/icons/viatra_framework.png
new file mode 100644
index 0000000..f916788
--- /dev/null
+++ b/org.eclipse.viatra2.gui/icons/viatra_framework.png
Binary files differ
diff --git a/org.eclipse.viatra2.gui/icons/viatra_logo.png b/org.eclipse.viatra2.gui/icons/viatra_logo.png
new file mode 100644
index 0000000..6819429
--- /dev/null
+++ b/org.eclipse.viatra2.gui/icons/viatra_logo.png
Binary files differ
diff --git a/org.eclipse.viatra2.gui/plugin.xml b/org.eclipse.viatra2.gui/plugin.xml
new file mode 100644
index 0000000..e7503d3
--- /dev/null
+++ b/org.eclipse.viatra2.gui/plugin.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+   <extension-point id="content" name="Viatra R3 GUI content extension" schema="schema/content.exsd"/>
+   <extension-point id="fileTemplate" name="New VIATRA file templates" schema="schema/fileTemplate.exsd"/>
+   <extension-point id="contributedAction" name="Contributed action for a Modelspaces view element&apos;s context menu" schema="schema/contributedAction.exsd"/>
+   <extension-point id="consoleCommandProvider" name="consoleCommandProvider" schema="schema/consoleCommandProvider.exsd"/>
+
+   <extension
+         point="org.eclipse.ui.views">
+      <category
+            name="VIATRA2 Framework Release3"
+            id="org.eclipse.viatra2.frameworkgui">
+      </category>
+      <view
+            name="VIATRA2 Model spaces"
+            icon="icons/viatra_logo.png"
+            category="org.eclipse.viatra2.frameworkgui"
+            class="org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView"
+            id="org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView">
+      </view>
+      <view
+            category="org.eclipse.viatra2.frameworkgui"
+            class="org.eclipse.viatra2.frameworkgui.views.code.CodeBufferView"
+            icon="icons/viatra_logo.png"
+            id="org.eclipse.viatra2.gui.codebufferview"
+            name="VIATRA2 Textual Output">
+      </view>
+      <view
+            category="org.eclipse.viatra2.frameworkgui"
+            class="org.eclipse.viatra2.frameworkgui.views.console.ConsoleView"
+            icon="icons/viatra_framework.png"
+            id="org.eclipse.viatra2.gui.console"
+            name="VIATRA2 Console"
+            restorable="true">
+      </view>
+   </extension>
+   
+  
+
+   <extension
+         point="org.eclipse.viatra2.gui.content">
+      <content_provider class="org.eclipse.viatra2.frameworkgui.content.transformation.TransformationContent"/>
+      <content_provider
+            class="org.eclipse.viatra2.frameworkgui.content.nativefunctions.NativeFunctionContent">
+      </content_provider>
+   </extension>
+   <extension
+         point="org.eclipse.viatra2.core2.programloader">
+      <loader
+            class="org.eclipse.viatra2.frameworkgui.loaders.XMIModuleLoader"
+            description="Loads VIATRA2 R3 EMF Module models from XMI serializations."
+            fileExtensionList="module"
+            id="org.eclipse.viatra2.frameworkgui.loaders.XMIModuleLoader"
+            name="EMF XMI Loader for VIATRA2 R3 Module instances">
+      </loader>
+      <loader
+            class="org.eclipse.viatra2.frameworkgui.loaders.XMITransformationLoader"
+            description="Loads VIATRA2 R3 EMF Transformation models from XMI serializations."
+            fileExtensionList="transformation"
+            id="org.eclipse.viatra2.frameworkgui.loaders.XMITransformationLoader"
+            name="EMF XMI Loader for VIATRA2 R3 Transformation instances">
+      </loader>
+   </extension>
+   <extension
+         point="org.eclipse.ui.preferencePages">
+      <page
+            class="org.eclipse.viatra2.frameworkgui.preferences.VIATRAPreferencePage"
+            id="org.eclipse.viatra2.gui.prefspage"
+            name="VIATRA2">
+      </page>
+   </extension>
+   <extension
+         point="org.eclipse.ui.perspectives">
+      <perspective
+            class="org.eclipse.viatra2.gui.perspectives.VIATRAPerspective"
+            fixed="false"
+            icon="icons/viatra_logo.png"
+            id="org.eclipse.viatra2.gui.perspective"
+            name="VIATRA2">
+      </perspective>
+   </extension>
+   <extension
+         point="org.eclipse.viatra2.gui.consoleCommandProvider">
+      <commandProviderFactory
+            class="org.eclipse.viatra2.frameworkgui.views.console.commands.builtin.BuiltInCommands">
+      </commandProviderFactory>
+      <commandProviderFactory
+            class="org.eclipse.viatra2.frameworkgui.views.console.commands.xform.TransformationDebuggingCommands">
+      </commandProviderFactory>
+      <commandProviderFactory
+            class="org.eclipse.viatra2.frameworkgui.views.console.commands.imports.NativeImporterCommands">
+      </commandProviderFactory>
+   </extension>
+   
+
+
+
+</plugin>
diff --git a/org.eclipse.viatra2.gui/schema/consoleCommandProvider.exsd b/org.eclipse.viatra2.gui/schema/consoleCommandProvider.exsd
new file mode 100644
index 0000000..972fb1c
--- /dev/null
+++ b/org.eclipse.viatra2.gui/schema/consoleCommandProvider.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.viatra2.gui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.viatra2.gui" id="consoleCommandProvider" name="consoleCommandProvider"/>
+      </appInfo>
+      <documentation>
+         Plug-ins may contribute command providers to be used in the VIATRA Console through this extension point.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="commandProviderFactory" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="commandProviderFactory">
+      <complexType>
+         <attribute name="class" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn=":org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProviderFactory"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         [Enter the first release in which this extension point appears.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         [Enter extension point usage example here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiinfo"/>
+      </appInfo>
+      <documentation>
+         [Enter API information here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+
+</schema>
diff --git a/org.eclipse.viatra2.gui/schema/content.exsd b/org.eclipse.viatra2.gui/schema/content.exsd
new file mode 100644
index 0000000..f760d45
--- /dev/null
+++ b/org.eclipse.viatra2.gui/schema/content.exsd
@@ -0,0 +1,86 @@
+<?xml version='1.0' encoding='UTF-8'?>

+<!-- Schema file written by PDE -->

+<schema targetNamespace="org.eclipse.viatra2.gui" xmlns="http://www.w3.org/2001/XMLSchema">

+<annotation>

+      <appinfo>

+         <meta.schema plugin="org.eclipse.viatra2.gui" id="content" name="Viatra R3 GUI content extension"/>

+      </appinfo>

+      <documentation>

+         This extension point can be used to add content to the VIATRA Model spaces view.

+      </documentation>

+   </annotation>

+

+   <element name="extension">

+      <annotation>

+         <appinfo>

+            <meta.element />

+         </appinfo>

+      </annotation>

+      <complexType>

+         <sequence minOccurs="1" maxOccurs="unbounded">

+            <element ref="content_provider" minOccurs="1" maxOccurs="unbounded"/>

+         </sequence>

+         <attribute name="point" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appinfo>

+                  <meta.attribute translatable="true"/>

+               </appinfo>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <element name="content_provider">

+      <complexType>

+         <attribute name="class" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appinfo>

+                  <meta.attribute kind="java" basedOn="org.eclipse.viatra2.frameworkgui.content.IFrameworkContentProviderExtension"/>

+               </appinfo>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="since"/>

+      </appinfo>

+      <documentation>

+         R3

+      </documentation>

+   </annotation>

+

+

+

+

+   <annotation>

+      <appinfo>

+         <meta.section type="copyright"/>

+      </appinfo>

+      <documentation>

+         Copyright 2007 Istvan Rath

+      </documentation>

+   </annotation>

+

+</schema>

diff --git a/org.eclipse.viatra2.gui/schema/contributedAction.exsd b/org.eclipse.viatra2.gui/schema/contributedAction.exsd
new file mode 100644
index 0000000..7f73d5a
--- /dev/null
+++ b/org.eclipse.viatra2.gui/schema/contributedAction.exsd
@@ -0,0 +1,109 @@
+<?xml version='1.0' encoding='UTF-8'?>

+<!-- Schema file written by PDE -->

+<schema targetNamespace="org.eclipse.viatra2.gui" xmlns="http://www.w3.org/2001/XMLSchema">

+<annotation>

+      <appinfo>

+         <meta.schema plugin="org.eclipse.viatra2.gui" id="contributedAction" name="Contributed action for a Modelspaces view element's context menu"/>

+      </appinfo>

+      <documentation>

+         Plugins can use this extension point to contribute a selection action into the VIATRA2 modelspaces view.

+      </documentation>

+   </annotation>

+

+   <element name="extension">

+      <annotation>

+         <appinfo>

+            <meta.element />

+         </appinfo>

+      </annotation>

+      <complexType>

+         <sequence minOccurs="0" maxOccurs="1">

+            <element ref="contributedAction" minOccurs="0" maxOccurs="unbounded"/>

+         </sequence>

+         <attribute name="point" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="id" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+            </annotation>

+         </attribute>

+         <attribute name="name" type="string">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appinfo>

+                  <meta.attribute translatable="true"/>

+               </appinfo>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <element name="contributedAction">

+      <complexType>

+         <attribute name="class" type="string" use="required">

+            <annotation>

+               <documentation>

+                  

+               </documentation>

+               <appinfo>

+                  <meta.attribute kind="java" basedOn="org.eclipse.viatra2.frameworkgui.actions.AbstractFrameworkGUIAction:"/>

+               </appinfo>

+            </annotation>

+         </attribute>

+         <attribute name="enablesForType" type="string" use="required">

+            <annotation>

+               <documentation>

+                  The Java FQN which the selection must be .getClass().equals for this action to be included in the menu.

+               </documentation>

+            </annotation>

+         </attribute>

+      </complexType>

+   </element>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="since"/>

+      </appinfo>

+      <documentation>

+         [Enter the first release in which this extension point appears.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="examples"/>

+      </appinfo>

+      <documentation>

+         [Enter extension point usage example here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="apiinfo"/>

+      </appinfo>

+      <documentation>

+         [Enter API information here.]

+      </documentation>

+   </annotation>

+

+   <annotation>

+      <appinfo>

+         <meta.section type="implementation"/>

+      </appinfo>

+      <documentation>

+         [Enter information about supplied implementation of this extension point.]

+      </documentation>

+   </annotation>

+

+

+</schema>

diff --git a/org.eclipse.viatra2.gui/schema/fileTemplate.exsd b/org.eclipse.viatra2.gui/schema/fileTemplate.exsd
new file mode 100644
index 0000000..a6e26f8
--- /dev/null
+++ b/org.eclipse.viatra2.gui/schema/fileTemplate.exsd
@@ -0,0 +1,138 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.viatra2.gui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.viatra2.gui" id="fileTemplate" name="New VIATRA file templates"/>
+      </appInfo>
+      <documentation>
+         This extension point can be used to add templates to the new VIATRA file generation wizard.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence minOccurs="0" maxOccurs="unbounded">
+            <element ref="templateReference" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="templateReference">
+      <complexType>
+         <sequence minOccurs="0" maxOccurs="1">
+            <element ref="templateParameter" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="extension" type="string" use="required">
+            <annotation>
+               <documentation>
+                  Specifies the file extension for which the template can be used.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="templateFile" type="string" use="required">
+            <annotation>
+               <documentation>
+                  a bundle-relative path to the template file.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The name of the template.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="description" type="string">
+            <annotation>
+               <documentation>
+                  A short textual description of the template.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="templateParameter">
+      <annotation>
+         <documentation>
+            A template parameter to be passed to the JET engine.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The parameter&apos;s name.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="description" type="string">
+            <annotation>
+               <documentation>
+                  A description of the parameter (role, usage, etc.).
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="defaultValue" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The default value of the parameter.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         R3
+      </documentation>
+   </annotation>
+
+
+
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright 2008 Istvan Rath
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/FrameworkGUIPlugin.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/FrameworkGUIPlugin.java
new file mode 100644
index 0000000..94324ba
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/FrameworkGUIPlugin.java
@@ -0,0 +1,302 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui;

+

+import java.util.Collection;
+import java.util.Vector;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.actions.AbstractFrameworkGUIAction;
+import org.eclipse.viatra2.frameworkgui.actions.extend.ContributedActionContainer;
+import org.eclipse.viatra2.frameworkgui.content.IFrameworkContentProviderExtension;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProviderFactory;
+import org.eclipse.viatra2.frameworkgui.wizards.model.FileTemplateExtension;
+import org.eclipse.viatra2.logger.Logger;
+import org.osgi.framework.BundleContext;
+

+/**

+ * Summary: GUI Plugin class for the Framework tree view.

+ * 

+ * Description: This is an automatically generated class by Eclipse.

+ * 

+ * @author Istvan Rath

+ * 

+ */

+public class FrameworkGUIPlugin extends AbstractUIPlugin {

+

+	private static final String PLUGIN_ID = "org.eclipse.viatra2.gui";
+	// The shared instance.

+	private static FrameworkGUIPlugin plugin;

+

+	/**

+	 * The constructor.

+	 */

+	public FrameworkGUIPlugin() {

+		plugin = this;

+	}

+

+	/**

+	 * This method is called upon plug-in activation

+	 */

+	public void start(BundleContext context) throws Exception {

+		super.start(context);

+	}

+

+	/**

+	 * This method is called when the plug-in is stopped

+	 */

+	public void stop(BundleContext context) throws Exception {

+		super.stop(context);

+		plugin = null;

+	}

+

+	/**

+	 * Returns the shared instance.

+	 */

+	public static FrameworkGUIPlugin getDefault() {

+		return plugin;

+	}

+

+	/**

+	 * Returns an image descriptor for the image file at the given plug-in

+	 * relative path.

+	 * 

+	 * @param path

+	 *            the path

+	 * @return the image descriptor

+	 */

+	public static ImageDescriptor getImageDescriptor(String path) {

+		return AbstractUIPlugin.imageDescriptorFromPlugin(

+				PLUGIN_ID, path);

+	}

+

+	public Collection<IFrameworkContentProviderExtension> getContentProviders() {

+		Vector<IFrameworkContentProviderExtension> v = new Vector<IFrameworkContentProviderExtension>();

+		IExtensionRegistry reg = Platform.getExtensionRegistry();

+		IExtensionPoint ep = reg

+				.getExtensionPoint("org.eclipse.viatra2.gui.content");

+		for (IExtension e : ep.getExtensions()) {

+			for (IConfigurationElement ce : e.getConfigurationElements()) {

+				if (!ce.getName().equalsIgnoreCase("content_provider"))

+					continue;

+				try {

+					Object o = ce.createExecutableExtension("class");

+					if (o instanceof IFrameworkContentProviderExtension) {

+						v.add((IFrameworkContentProviderExtension) o);

+					}

+				} catch (Exception ex) {

+					ex.printStackTrace();

+				}

+			}

+		}

+		return v;

+	}
+	
+	public Collection<IVIATRAConsoleCommandProviderFactory> getCommandProviderFactories() {
+		Vector<IVIATRAConsoleCommandProviderFactory> v = new Vector<IVIATRAConsoleCommandProviderFactory>();
+		IExtensionRegistry reg = Platform.getExtensionRegistry();
+		IExtensionPoint ep = reg.getExtensionPoint("org.eclipse.viatra2.gui.consoleCommandProvider");
+		for (IExtension e : ep.getExtensions()) {
+			for (IConfigurationElement ce : e.getConfigurationElements()) {
+				if (!ce.getName().equalsIgnoreCase("commandProviderFactory"))
+					continue;
+				try {
+					Object o = ce.createExecutableExtension("class");
+					if (o instanceof IVIATRAConsoleCommandProviderFactory) {
+						v.add((IVIATRAConsoleCommandProviderFactory) o);
+					}
+				} catch (Exception ex) {
+					ex.printStackTrace();
+				}
+			}
+		}
+		return v;
+	}

+

+	public Collection<ContributedActionContainer> getContributedActions() 

+	{

+		Vector<ContributedActionContainer> v = new Vector<ContributedActionContainer>();

+		IExtensionRegistry reg = Platform.getExtensionRegistry();

+		IExtensionPoint ep = reg

+				.getExtensionPoint("org.eclipse.viatra2.gui.contributedAction");

+		for (IExtension e : ep.getExtensions()) {

+			for (IConfigurationElement ce : e.getConfigurationElements()) {

+				if (!ce.getName().equalsIgnoreCase("contributedAction"))

+					continue;

+				try {

+					Object o = ce.createExecutableExtension("class");

+					if (o instanceof AbstractFrameworkGUIAction) 

+					{

+						ContributedActionContainer c = new ContributedActionContainer();

+						c.action = (AbstractFrameworkGUIAction) o;

+						c.enablesFor = Class.forName(ce.getAttribute("enablesForType"));

+						v.add(c);

+					}

+				} catch (Exception ex) {

+					ex.printStackTrace();

+				}

+			}

+		}

+		return v;

+	}

+	

+	public Collection<FileTemplateExtension> getFileTemplates() {

+		Vector<FileTemplateExtension> v = new Vector<FileTemplateExtension>();

+		IExtensionRegistry reg = Platform.getExtensionRegistry();

+		IExtensionPoint ep = reg

+				.getExtensionPoint("org.eclipse.viatra2.gui.fileTemplate");

+		for (IExtension e : ep.getExtensions()) {

+			for (IConfigurationElement ce : e.getConfigurationElements()) {

+				if (!ce.getName().equalsIgnoreCase("templateReference"))

+					continue;

+				try {

+					FileTemplateExtension ext = new FileTemplateExtension();

+					ext.extension = ce.getAttribute("extension");

+					ext.name = ce.getAttribute("name");

+					ext.templateFile = ce.getAttribute("templateFile");

+					if (ce.getAttribute("description") != null)

+						ext.desc = ce.getAttribute("description");

+					// process params

+					for (IConfigurationElement p : ce.getChildren()) {

+						if (p.getName().equals("templateParameter")) {

+							FileTemplateExtension.TemplateParameter _p = ext.new TemplateParameter();

+							_p.name = p.getAttribute("name");

+							_p.defaultValue = p.getAttribute("defaultValue");

+							_p.value = _p.defaultValue;

+							if (p.getAttribute("description") != null)

+								_p.description = p.getAttribute("description");

+							ext.params.add(_p);

+						}

+					}

+					ext.contributorID = e.getNamespaceIdentifier();

+					v.add(ext);

+				} catch (Exception ex) {

+					ex.printStackTrace();

+				}

+			}

+		}

+		return v;

+	}

+

+	public static Shell getActiveWorkbenchShell() {

+		IWorkbenchWindow workBenchWindow = getActiveWorkbenchWindow();

+		if (workBenchWindow == null) {

+			return null;

+		}

+		return workBenchWindow.getShell();

+	}

+

+	/**

+	 * Returns the active workbench window

+	 * 

+	 * @return the active workbench window

+	 */

+	public static IWorkbenchWindow getActiveWorkbenchWindow() {

+		if (plugin == null) {

+			return null;

+		}

+		IWorkbench workBench = plugin.getWorkbench();

+		if (workBench == null) {

+			return null;

+		}

+		return workBench.getActiveWorkbenchWindow();

+	}

+

+	public static IWorkbenchPage getActivePage() {

+		IWorkbenchWindow activeWorkbenchWindow = getActiveWorkbenchWindow();

+		if (activeWorkbenchWindow == null) {

+			return null;

+		}

+		return activeWorkbenchWindow.getActivePage();

+	}

+

+	public static String getPluginId() {

+		return getDefault().getBundle().getSymbolicName();

+	}

+

+	public static void log(Throwable e) {

+		log(new Status(IStatus.ERROR, getPluginId(), IStatus.ERROR, "Error", e)); //$NON-NLS-1$

+	}

+

+	public static void log(IStatus status) {

+		getDefault().getLog().log(status);

+	}

+	

+	

+	// Runnable support

+	

+	public static void runAsLongTransaction(final IRunnableWithProgress r, final String taskName, final IFramework fw)

+	{

+		
+		if (r!=null)
+		{
+			/*
+			Job job=new Job(taskName) {
+				
+				@Override
+				protected IStatus run(IProgressMonitor monitor) {
+					try {
+						r.run(monitor);
+						return new Status(IStatus.OK, 
+								PLUGIN_ID, 
+								"Transformation executed successfully.");
+					}
+					catch (Throwable t) {
+						fw.getLogger().fatal("Error executing task '"+taskName+"' ("+t.getClass().getCanonicalName()+") ["+t.getMessage()+"]");
+						return new Status(IStatus.ERROR, 
+								getPluginId(), 
+								IStatus.ERROR, "Error while executing transformation", t);
+					}
+				}
+			};
+			
+			job.setUser(true);
+			job.schedule();
+			*/
+			final Display display = Display.getDefault();
+

+			display.syncExec(new Runnable() {

+				public void run() {

+					ProgressMonitorDialog d= new ProgressMonitorDialog(display.getActiveShell());
+					try {

+						d.run(true, true, r);

+					} catch (Exception e) {
+						if (fw!=null) {

+							//fw.getLogger().fatal("Error executing task '"+taskName+"' ("+e.getClass().getCanonicalName()+") ["+e.getMessage()+"]");
+							fw.getLogger().message(Logger.FATAL,"Error executing task '"+taskName+"' ("+e.getClass().getCanonicalName()+") ["+e.getMessage()+"]", e);
+						} else {

+							e.printStackTrace();
+						}

+					}

+				}

+			});
+			
+		}

+	}

+	

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/AbstractFrameworkGUIAction.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/AbstractFrameworkGUIAction.java
new file mode 100644
index 0000000..624b5d3
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/AbstractFrameworkGUIAction.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.actions;

+

+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.content.FrameworkContainer;
+import org.eclipse.viatra2.frameworkgui.content.ITreeObject;
+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;
+

+/**

+ * Summary:

+ *  Abstract action class.

+ *  

+ * Description:

+ *  This class supports internal references for the Viatra2 Framework instance

+ *  and the Framework tree view, and built-in enabledness calculation.

+ *  

+ * @author Istvan Rath

+ * 

+ */

+public abstract class AbstractFrameworkGUIAction extends Action 

+{

+

+	protected IFramework iViatraFramework;

+

+	protected FrameworkTreeView iFT;

+

+	public void setupInternals(FrameworkTreeView part) {

+		iFT = part;

+		refreshSelection();

+	}

+

+	protected void refreshSelection()

+	{

+		ISelection selection = iFT.getSelection();

+		Object obj = ((IStructuredSelection) selection).getFirstElement();

+		

+		if (obj instanceof ITreeObject)

+		{

+			iViatraFramework = ((ITreeObject)obj).getFrameworkContainer().getFramework();

+		}

+		else if (obj instanceof FrameworkContainer)

+		{

+			iViatraFramework = ((FrameworkContainer)obj).getFramework();

+		}

+	}

+	

+	protected Object getFirstSelected()

+	{

+		IStructuredSelection s = (IStructuredSelection) iFT.getSelection();

+		return s.getFirstElement();

+	}

+	

+	public boolean isEnabled() {

+		if (iFT != null) 

+		{

+			ISelection selection = iFT.getSelection();

+			Object obj = ((IStructuredSelection) selection).getFirstElement();

+			if (obj instanceof FrameworkContainer)

+			{

+				return true;

+			}

+		}

+		return false;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/CheckAction.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/CheckAction.java
new file mode 100644
index 0000000..a38a436
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/CheckAction.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.actions;

+

+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;
+

+public class CheckAction extends AbstractFrameworkGUIAction {

+

+	public CheckAction(FrameworkTreeView part) {

+		super();

+		setupInternals(part);

+		setText("Re-Check modelspace");

+		setToolTipText("Check the Framework's modelspace for errors and inconsistencies");

+		setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()

+				.getImageDescriptor(ISharedImages.IMG_TOOL_UP));

+	}

+

+	

+	public void run() {

+		refreshSelection();

+		this.iViatraFramework.getTagManager().resetProblemManager();

+	}

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/ClearTagsAction.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/ClearTagsAction.java
new file mode 100644
index 0000000..36284e3
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/ClearTagsAction.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.actions;

+

+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;
+

+public class ClearTagsAction extends AbstractFrameworkGUIAction {

+

+	public ClearTagsAction(FrameworkTreeView part) {

+		super();

+		setupInternals(part);

+		setText("Clear all tags");

+		setToolTipText("Clears all information and error tag markers");

+//		setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()

+//				.getImageDescriptor(ISharedImages.IMG_ELCL_REMOVE));

+	}

+

+	

+	public void run() {

+		refreshSelection();

+		this.iViatraFramework.getTagManager().clearAllTags();

+	}

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/DisposeFrameworkAction.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/DisposeFrameworkAction.java
new file mode 100644
index 0000000..3380d4f
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/DisposeFrameworkAction.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.actions;

+

+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.viatra2.frameworkgui.content.FrameworkContainer;
+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;
+

+public class DisposeFrameworkAction extends AbstractFrameworkGUIAction {

+

+	private boolean isEnabled = true;

+

+	public DisposeFrameworkAction(FrameworkTreeView part) {

+		super();

+		setupInternals(part);

+		setText("Dispose framework");

+		setToolTipText("Dispose a framework; CAUTION: do not dispose of frameworks which are currently in use by an editor!");

+		setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()

+				.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));

+	}

+

+	public void run() {

+		ISelection sel = iFT.getSelection();

+		if (sel instanceof IStructuredSelection) {

+			Object o = ((IStructuredSelection) sel).getFirstElement();

+			if (o instanceof FrameworkContainer) 

+			{

+				iViatraFramework = ((FrameworkContainer)o).getFramework();

+				try {

+					iFT.getFrameWorkManager().disposeFramework(

+							iViatraFramework.getId());

+					iFT.refreshViewer(null);

+				} catch (Exception e) {

+					iFT.showMessage(e.getMessage());

+				}

+			}

+		}

+

+	}

+

+	public boolean isEnabled() {

+		return isEnabled;

+	}

+

+	public void calculateEnabled() {

+		ISelection sel = iFT.getSelection();

+		if (sel instanceof IStructuredSelection) {

+			Object o = ((IStructuredSelection) sel).getFirstElement();

+			isEnabled = (o instanceof FrameworkContainer);

+		} else

+			isEnabled = false;

+		this.setEnabled(isEnabled);

+		iFT.updateLocalToolBar();

+	}

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/LoaderAction.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/LoaderAction.java
new file mode 100644
index 0000000..673dd8a
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/LoaderAction.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.actions;

+

+import java.util.ArrayList;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;
+import org.eclipse.viatra2.loaders.LoaderFactory;
+

+public class LoaderAction extends AbstractFrameworkGUIAction {

+

+	private String iLoaderID;

+

+	public LoaderAction(FrameworkTreeView part, String loaderid) {

+		super();

+		setupInternals(part);

+		iLoaderID = loaderid;

+		setText("Load program model");

+		setToolTipText("Load a program model into the registry");

+		setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()

+				.getImageDescriptor(ISharedImages.IMG_OBJ_FILE));

+	}

+

+	public void run() {

+		refreshSelection();

+		FileDialog fop = new FileDialog(iFT.getSite().getShell(), SWT.OPEN);

+		fop.setText("Choose a program file to load");

+		LoaderFactory lf = iViatraFramework.getLoaders().get(iLoaderID);

+		

+		ArrayList<String> exts = new ArrayList<String>();

+		for (String ext : lf.getFileExtensionList())

+		{

+			exts.add("*."+ext);

+		}

+		fop.setFilterExtensions(exts.toArray(new String[0]));

+		fop.setFilterNames(exts.toArray(new String[0]));

+		String fn = fop.open();

+		if (fn != null) {

+			try {

+				Long c = System.currentTimeMillis();

+				iViatraFramework.loadMachine(fn, iLoaderID);

+				Long c2 = System.currentTimeMillis();

+				iViatraFramework.getLogger().info("Machine load lasted for "+(new Long(c2-c)).toString()+" ms");

+			} catch (Exception e) {

+				iFT.showMessage("Error performing native import with "+ iLoaderID);

+			}

+		}

+		//iFT.refreshViewer();

+	}

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/MergeFileAction.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/MergeFileAction.java
new file mode 100644
index 0000000..257d02b
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/MergeFileAction.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.actions;

+

+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.viatra2.frameworkgui.FrameworkGUIPlugin;
+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;
+

+public class MergeFileAction extends AbstractFrameworkGUIAction {

+

+	public MergeFileAction(FrameworkTreeView part) {

+		super();

+		setupInternals(part);

+		setText("Merge a VPML file");

+		setToolTipText("Merge a VPML file with the Framework's modelspace");

+		setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()

+				.getImageDescriptor(ISharedImages.IMG_OBJ_FILE));

+	}

+

+	public void run() {

+		refreshSelection();

+		FileDialog fpd = new FileDialog(iFT.getSite().getShell(), SWT.OPEN);

+		fpd.setText("Choose a file to merge");

+		fpd.setFilterNames(new String[] { "Viatra VPML files" });

+		fpd.setFilterExtensions(new String[] { "*.vpml" });

+		final String fn = fpd.open();

+		if (fn != null) 

+		{

+			IRunnableWithProgress runnable = new IRunnableWithProgress()

+			{

+				public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {

+					try 

+					{

+						monitor.beginTask("VPM merge: "+fn, 2);

+						iViatraFramework.mergeFile(fn);

+						monitor.done();

+					} 

+					catch (Exception e)

+					{

+						throw new InvocationTargetException(e);

+					}

+				}

+			};

+			

+			FrameworkGUIPlugin.runAsLongTransaction(runnable, "VPM merge: "+fn, iViatraFramework);

+

+		}

+	}

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/NativeImportAction.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/NativeImportAction.java
new file mode 100644
index 0000000..15b8460
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/NativeImportAction.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.actions;

+

+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.viatra2.frameworkgui.FrameworkGUIPlugin;
+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;
+

+public class NativeImportAction extends AbstractFrameworkGUIAction {

+

+	private String iImporterID;

+

+	public NativeImportAction(FrameworkTreeView part, String importerid) {

+		super();

+		setupInternals(part);

+		iImporterID = importerid;

+		setText("Native import");

+		setToolTipText("Import a file into the modelspace using a Viatra native importer");

+		setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()

+				.getImageDescriptor(ISharedImages.IMG_OBJ_FILE));

+	}

+

+	public void run() {

+		refreshSelection();

+		FileDialog fop = new FileDialog(iFT.getSite().getShell(), SWT.OPEN);

+		fop.setText("Choose a file to import");

+		fop.setFilterExtensions(new String[] { "*.*" });

+		fop.setFilterNames(new String[] { "All files" });
+		//fop.setFilterNames( );

+		final String fn = fop.open();

+		if (fn != null) 

+		{

+			IRunnableWithProgress runnable = new IRunnableWithProgress()

+			{

+

+			public void run(IProgressMonitor monitor)

+					throws InvocationTargetException, InterruptedException {

+				try {

+					monitor.beginTask("Native import: "+fn, 3);

+					Long c = System.currentTimeMillis();

+					monitor.worked(1);

+					iViatraFramework.nativeImport(fn, iImporterID);

+					monitor.worked(2);

+					Long c2 = System.currentTimeMillis();

+					iViatraFramework.getLogger().info("Native import lasted for "+(new Long(c2-c)).toString()+" ms");

+					monitor.done();

+				} catch (Exception e) {

+					throw new InvocationTargetException(e);

+					//iFT.showMessage("Error performing native import with "+ iImporterID);

+				}	

+			}

+			};

+			

+			FrameworkGUIPlugin.runAsLongTransaction(runnable, "Native import: "+fn, iViatraFramework);

+

+		}

+	}

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/extend/ContributedActionContainer.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/extend/ContributedActionContainer.java
new file mode 100644
index 0000000..087f1fc
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/actions/extend/ContributedActionContainer.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.actions.extend;

+

+import org.eclipse.viatra2.frameworkgui.actions.AbstractFrameworkGUIAction;
+

+/**

+ * 

+ * @author Istvan Rath

+ *

+ */

+public class ContributedActionContainer {

+

+	public AbstractFrameworkGUIAction action;

+	

+	public Class enablesFor;

+	

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/FrameworkContainer.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/FrameworkContainer.java
new file mode 100644
index 0000000..bd93629
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/FrameworkContainer.java
@@ -0,0 +1,273 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.content;

+

+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Vector;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.views.properties.IPropertySource2;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.framework.IFrameworkGlobalListener;
+import org.eclipse.viatra2.frameworkgui.FrameworkGUIPlugin;
+import org.eclipse.viatra2.frameworkgui.actions.AbstractFrameworkGUIAction;
+import org.eclipse.viatra2.frameworkgui.actions.CheckAction;
+import org.eclipse.viatra2.frameworkgui.actions.ClearTagsAction;
+import org.eclipse.viatra2.frameworkgui.actions.LoaderAction;
+import org.eclipse.viatra2.frameworkgui.actions.MergeFileAction;
+import org.eclipse.viatra2.frameworkgui.actions.NativeImportAction;
+import org.eclipse.viatra2.frameworkgui.actions.extend.ContributedActionContainer;
+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;
+import org.eclipse.viatra2.imports.NativeImporterFactory;
+import org.eclipse.viatra2.loaders.LoaderFactory;
+

+public class FrameworkContainer implements ITreeParent, IFrameworkGlobalListener

+{

+

+	public static Image fwImage = FrameworkGUIPlugin.getImageDescriptor("icons/viatra_framework.png").createImage();

+
+	private List<AbstractFrameworkGUIAction> native_import_actions;
+	
+	private List<AbstractFrameworkGUIAction> loader_actions;
+	
+	private List<AbstractFrameworkGUIAction> contributed_actions;

+	
+	protected Set<IFrameworkContentProviderExtension> extensions;
+	
+	protected IFramework framework;

+	
+	protected FrameworkTreeView treeview;
+	
+	

+	public FrameworkContainer(IFramework f, FrameworkTreeView tv) 

+	{

+		treeview = tv;

+		framework = f;

+		f.addFrameworkGlobalListener(this);

+		//runDialogEntries = new Vector<String>();

+		extensions = new HashSet<IFrameworkContentProviderExtension>();

+		native_import_actions = new ArrayList<AbstractFrameworkGUIAction>();

+		loader_actions = new ArrayList<AbstractFrameworkGUIAction>();

+		contributed_actions = new ArrayList<AbstractFrameworkGUIAction>();

+		makeActions();

+		initializeExtensions();

+	}

+	

+

+	

+	public IFramework getFramework()

+	{

+		return framework;

+	}

+

+	

+	

+	

+	protected void initializeExtensions()

+	{

+		for (IFrameworkContentProviderExtension ex : FrameworkGUIPlugin.getDefault().getContentProviders())

+		{

+			ex.init(treeview, framework, this);

+			extensions.add(ex);

+		}

+	}

+	

+	public String getLabelText()

+	{

+		return framework.getId()+" ("+

+			new File(framework.getCurrentFilename()).getName()+ ")";

+	}

+	

+	public boolean hasChildren()

+	{

+		return !getChildren().isEmpty();

+	}

+	

+	public Set<ITreeObject> getChildren()

+	{

+		HashSet<ITreeObject> ret = new HashSet<ITreeObject>();

+		for (IFrameworkContentProviderExtension e : extensions)

+		{

+			ret.add(e.getTopLevelEntry());

+		}

+		return ret;

+	}

+	

+	public void dispose()

+	{

+		for (IFrameworkContentProviderExtension e : extensions)

+		{

+			e.dispose();

+		}

+		framework.removeFrameworkGlobalListener(this);

+	}

+

+	public FrameworkContainer getFrameworkContainer() 

+	{

+		return this;

+	}

+

+	public Image getLabelImage() {

+		return fwImage;

+	}

+

+	public ITreeParent getParent() { return null; }

+

+	public IPropertySource2 getPropertySource() 

+	{

+		// TODO

+		return null;

+	}

+

+	/* ACTIONS */

+	

+	private MergeFileAction mergeAction;

+

+	private CheckAction checkAction;

+	

+	private ClearTagsAction clearAction;

+	

+	private void makeActions()

+	{

+		checkAction = new CheckAction(this.treeview);

+		clearAction = new ClearTagsAction(this.treeview);

+		mergeAction = new MergeFileAction(this.treeview);

+		makeNativeImporterActions();

+		makeLoaderActions();

+		makeContributedActions();

+	}

+	

+	

+	

+	private void makeContributedActions()

+	{

+		for (ContributedActionContainer c : FrameworkGUIPlugin.getDefault().getContributedActions())

+		{

+			if (c.enablesFor.equals(IFramework.class))

+			{

+				c.action.setupInternals(this.treeview);

+				contributed_actions.add(c.action);

+			}

+		}
+		Collections.sort(contributed_actions,new ActionComparator());

+	}

+	
+	private class ActionComparator implements Comparator<Action> {
+
+
+		@Override
+		public int compare(Action o1, Action o2) {
+			return o1.getText().compareTo(o2.getText());
+		}
+		
+	}
+	

+	private void makeNativeImporterActions() 

+	{

+		Map<String, NativeImporterFactory> hm = framework.getNativeImporters();

+		AbstractFrameworkGUIAction a;

+		for (NativeImporterFactory f : hm.values()) 

+		{

+			a = new NativeImportAction(this.treeview, f.getId());

+			String ni = f.getImporterName();

+			a.setText(ni);

+			a.setToolTipText(ni);

+			a.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FILE));

+			native_import_actions.add(a);

+		}
+		Collections.sort(native_import_actions,new ActionComparator());

+	}

+

+	private void makeLoaderActions() 

+	{

+		Map<String, LoaderFactory> hm = framework.getLoaders();

+		AbstractFrameworkGUIAction a;

+		for (LoaderFactory f : hm.values()) 

+		{

+			a = new LoaderAction(this.treeview, f.getId());

+			String ni = f.getLoaderName();

+			a.setText(ni);

+			a.setToolTipText(ni);

+			a.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FILE));

+			loader_actions.add(a);

+		}
+		Collections.sort(loader_actions,new ActionComparator());

+	}

+	

+	public Collection<IAction> getActions() 

+	{

+		Vector<IAction> v = new Vector<IAction>();

+		v.add(mergeAction);

+		v.add(checkAction);

+		v.add(clearAction);

+		return v;

+	}

+	

+	public Collection<IContributionItem> getContributionItems() 

+	{

+		Vector<IContributionItem> v = new Vector<IContributionItem>();

+		if (native_import_actions!=null && native_import_actions.size()>0)

+		{

+			MenuManager nativemgr = new MenuManager("Native importers");

+			for (AbstractFrameworkGUIAction a : native_import_actions)

+			{

+				nativemgr.add(a);

+			}

+			v.add(nativemgr);

+		}

+		if (loader_actions!=null && loader_actions.size()>0)

+		{

+			MenuManager loadermgr = new MenuManager("Program loaders");

+			for (AbstractFrameworkGUIAction a : loader_actions)

+			{

+				loadermgr.add(a);

+			}

+			v.add(loadermgr);

+		}

+		if (contributed_actions!=null && contributed_actions.size()>0)

+		{

+			MenuManager contrmgr = new MenuManager("Contributions");

+			for (AbstractFrameworkGUIAction a : contributed_actions)

+			{

+				contrmgr.add(a);

+			}

+			v.add(contrmgr);

+		}

+		return v;

+	}

+

+	public IAction getDoubleClickAction() {

+		return null;

+	}

+

+	public void frameworkNameChanged() {

+		this.treeview.refreshViewer(this);

+		

+	}

+	

+	

+	

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/FrameworkViewContentProvider.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/FrameworkViewContentProvider.java
new file mode 100644
index 0000000..fbca807
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/FrameworkViewContentProvider.java
@@ -0,0 +1,177 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.content;

+

+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.viatra2.framework.FrameworkManager;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.framework.IFrameworkListChangedListener;
+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;
+import org.eclipse.viatra2.frameworkgui.views.code.CodeBufferView;
+

+public class FrameworkViewContentProvider

+	implements ITreeContentProvider, IFrameworkListChangedListener

+{

+

+	private FrameworkTreeView iFT;

+

+	private Map<IFramework,FrameworkContainer> frameworkContainers;

+

+	public FrameworkViewContentProvider(FrameworkTreeView part)

+	{

+		iFT = part;

+		frameworkContainers = new HashMap<IFramework,FrameworkContainer>();

+		refreshFrameworks();

+		FrameworkManager.getInstance().addFrameworkListChangedListener(this);

+	}

+

+	public void inputChanged(Viewer v, Object oldInput, Object newInput) {}

+

+	public void dispose()

+	{

+		FrameworkManager.getInstance().removeFrameworkListChangedListener(this);

+	}

+

+	public Object[] getElements(Object parent)

+	{

+		return getChildren(parent);

+	}

+

+	public Object[] getChildren(Object parent)

+	{

+		if (parent.equals(iFT.getViewSite()))

+		{

+			return frameworkContainers.values().toArray();

+		}

+		else if (parent instanceof ITreeParent)

+		{

+			return ((ITreeParent)parent).getChildren().toArray();

+		}

+		else return new Object[0];

+	}

+

+

+	public Object getParent(Object child)

+	{

+		if (child instanceof ITreeObject)

+		{

+			return ((ITreeObject)child).getParent();

+		}

+//		else if (child instanceof I)

+		return null;

+	}

+

+	public boolean hasChildren(Object parent)

+	{

+		if (parent instanceof ITreeParent)

+		{

+			return ((ITreeParent)parent).hasChildren();

+		}

+		return false;

+	}

+

+	public void frameworkAdded(final IFramework f)

+	{

+		Display.getDefault().asyncExec(new Runnable(){

+

+			public void run() {

+				FrameworkContainer c = new FrameworkContainer(f,iFT);

+				frameworkContainers.put(f,c);

+				iFT.refreshViewer(null);

+

+				// activate code output view

+				try {

+					iFT.getViewSite().getPage().showView(CodeBufferView.ID);

+				}

+				catch (PartInitException e)

+				{

+					f.getLogger().fatal(e.getMessage());

+				}

+			}

+		});

+

+	}

+

+	public void frameworkRemoved(final IFramework f)

+	{

+		Display.getDefault().asyncExec(new Runnable(){

+

+			public void run() {

+				FrameworkContainer c = frameworkContainers.get(f);
+				if (c != null)

+					c.dispose();

+				frameworkContainers.remove(f);

+				iFT.refreshViewer(null);

+			}

+		});

+

+	}

+

+	private void refreshFrameworks()

+	{

+		String[] fws = iFT.getFrameWorkManager().getAllFrameWorks();

+		for (int i=0; i<fws.length; i++)

+		{

+			IFramework fw = iFT.getFrameWorkManager().getFramework(fws[i]);

+			FrameworkContainer c = new FrameworkContainer(fw,iFT);

+			frameworkContainers.put(fw,c);

+		}

+	}

+

+/*	private void refreshframeworks()

+	{

+		invisibleRoot = new TreeParent("", null);

+		String[] fws = iFT.getFrameWorkManager().getAllFrameWorks();

+		for (int i=0; i<fws.length; i++)

+		{

+			IFramework fw = iFT.getFrameWorkManager().getFramework(fws[i]);

+			String pf = new File(fw.getCurrentFilename()).getName();

+			TreeParent p = new TreeParent(fws[i]+" ("+pf+")", fw);

+			TreeParent cf = new TreeParent("Full filename", null);

+			TreeObject o = new TreeObject(fw.getCurrentFilename(), null);

+			cf.addChild(o);

+			p.addChild(cf);

+

+			TreeParent pmp = new TreeParent("Program models", null);

+			for (Object machine : fw.getMachines())

+			{

+				TreeObject to = new TreeObject(machine.toString(), machine);

+				pmp.addChild(to);

+			}

+			p.addChild(pmp);

+

+			TreeParent pp = new TreeParent("Property providers", null);

+			for (String pid : fw.getProperties().getAllProviderIDs())

+			{

+				TreeObject to = new TreeObject(pid, null);

+				pp.addChild(to);

+			}

+			p.addChild(pp);

+			TreeParent ni = new TreeParent("Native importers", null);

+			for (String iid : fw.getNativeImporters().keySet())

+			{

+				TreeObject to = new TreeObject(iid, null);

+				ni.addChild(to);

+			}

+			p.addChild(ni);

+			invisibleRoot.addChild(p);

+		}

+	}

+*/

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/FrameworkViewLabelProvider.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/FrameworkViewLabelProvider.java
new file mode 100644
index 0000000..6ab0b92
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/FrameworkViewLabelProvider.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.content;

+

+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+

+public class FrameworkViewLabelProvider extends LabelProvider 

+{

+

+	private static Image elementImage = PlatformUI.getWorkbench()

+			.getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT);

+

+	

+	public String getText(Object obj) 

+	{

+		if (obj instanceof ITreeObject)

+		{

+			return ((ITreeObject)obj).getLabelText();

+		}

+		return obj.toString();

+	}

+

+	public Image getImage(Object obj) {

+		Image ret = elementImage;

+		if (obj instanceof ITreeObject) ret = ((ITreeObject)obj).getLabelImage();

+		return ret!=null?ret:elementImage;

+	}

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/IFrameworkContentProviderExtension.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/IFrameworkContentProviderExtension.java
new file mode 100644
index 0000000..e668b37
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/IFrameworkContentProviderExtension.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.content;

+

+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;
+

+

+public interface IFrameworkContentProviderExtension 

+{

+

+	public void init(FrameworkTreeView fv, IFramework fw, FrameworkContainer c);

+	

+	public ITreeObject getTopLevelEntry();

+	

+	public void dispose();

+	

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/ITreeObject.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/ITreeObject.java
new file mode 100644
index 0000000..d326e6c
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/ITreeObject.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.content;

+

+import java.util.Collection;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.views.properties.IPropertySource2;
+

+public interface ITreeObject 

+{

+

+	public FrameworkContainer getFrameworkContainer();

+	

+	public ITreeParent getParent();

+	

+	public String getLabelText();

+	

+	public Image getLabelImage();

+	

+	public IPropertySource2 getPropertySource();

+	

+	public Collection<IContributionItem> getContributionItems();

+	

+	public Collection<IAction> getActions();

+	

+	public IAction getDoubleClickAction();

+	

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/ITreeParent.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/ITreeParent.java
new file mode 100644
index 0000000..d7aa0a3
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/ITreeParent.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.content;

+

+import java.util.Set;
+

+public interface ITreeParent extends ITreeObject 

+{

+

+	public Set<ITreeObject> getChildren();

+	

+	public boolean hasChildren();

+	

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/NameSorter.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/NameSorter.java
new file mode 100644
index 0000000..8fe5393
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/NameSorter.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.content;

+

+import java.util.Comparator;
+
+import org.eclipse.jface.viewers.ViewerSorter;
+

+public class NameSorter extends ViewerSorter {

+	// TODO

+	

+	

+	@Override

+	protected Comparator getComparator() 

+	{

+		return super.getComparator();

+	};

+	

+	@Override

+	public int category(Object element) 

+	{

+		return super.category(element);

+	}

+	

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/nativefunctions/NativeFunctionContent.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/nativefunctions/NativeFunctionContent.java
new file mode 100644
index 0000000..9d333f6
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/nativefunctions/NativeFunctionContent.java
@@ -0,0 +1,123 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.content.nativefunctions;

+

+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.views.properties.IPropertySource2;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.FrameworkGUIPlugin;
+import org.eclipse.viatra2.frameworkgui.content.FrameworkContainer;
+import org.eclipse.viatra2.frameworkgui.content.IFrameworkContentProviderExtension;
+import org.eclipse.viatra2.frameworkgui.content.ITreeObject;
+import org.eclipse.viatra2.frameworkgui.content.ITreeParent;
+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;
+import org.eclipse.viatra2.natives.ASMNativeFunction;
+

+public class NativeFunctionContent implements

+		IFrameworkContentProviderExtension, ITreeParent {

+

+

+	public void dispose() { }

+

+

+	public ITreeObject getTopLevelEntry() {return this;}

+

+	FrameworkContainer cont;

+	IFramework fw;

+	

+

+	public void init(FrameworkTreeView fv, IFramework fw, FrameworkContainer c) 

+	{

+		cont = c;

+		this.fw = fw;

+	}

+

+

+	public Set<ITreeObject> getChildren() 

+	{

+		HashSet<ITreeObject> r = new HashSet<ITreeObject>();

+		for (final ASMNativeFunction nf : fw.getNativeFunctionManager().getAllNativeFunctions())

+		{

+			r.add(new ITreeObject(){

+

+

+				public Collection<IAction> getActions() {return null;}

+

+

+				public Collection<IContributionItem> getContributionItems() {return null;}

+

+	

+				public IAction getDoubleClickAction() {return null;}

+

+

+				public FrameworkContainer getFrameworkContainer() { return cont; }

+

+				public Image getLabelImage() {

+					return nf_image;

+				}

+

+	

+				public String getLabelText() {

+					return nf.getName();//+" ("+nf.getDescription()+")";

+				}

+

+

+				public ITreeParent getParent() { return NativeFunctionContent.this; }

+

+

+				public IPropertySource2 getPropertySource() {

+					return new NativeFunctionPropertySource(nf);

+				}

+				

+			});

+		}

+		return r;

+	}

+

+

+	public boolean hasChildren() {

+		return true;

+	}

+

+

+	public Collection<IAction> getActions() { return null; }

+

+

+	public Collection<IContributionItem> getContributionItems() { return null; }

+

+

+	public IAction getDoubleClickAction() { return null; }

+

+

+	public FrameworkContainer getFrameworkContainer() { return cont; }

+

+	protected static Image nf_image = FrameworkGUIPlugin.getImageDescriptor("icons/nf_transparent.png").createImage();

+		

+

+	public Image getLabelImage() {return null;}

+

+

+	public String getLabelText() { return "Native functions"; }

+

+

+	public ITreeParent getParent() { return cont; }

+

+

+	public IPropertySource2 getPropertySource() { return null; }

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/nativefunctions/NativeFunctionPropertySource.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/nativefunctions/NativeFunctionPropertySource.java
new file mode 100644
index 0000000..ec188a2
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/nativefunctions/NativeFunctionPropertySource.java
@@ -0,0 +1,151 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.content.nativefunctions;

+

+import java.lang.annotation.Annotation;
+import java.util.ArrayList;
+
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource2;
+import org.eclipse.ui.views.properties.PropertyDescriptor;
+import org.eclipse.viatra2.natives.ASMNativeFunction;
+import org.eclipse.viatra2.natives.NativeFunctionParameter;
+import org.eclipse.viatra2.natives.VIATRANativeFunction;
+

+public class NativeFunctionPropertySource implements IPropertySource2

+{

+

+	ASMNativeFunction fNf;

+	VIATRANativeFunction fNfA;

+	

+	public NativeFunctionPropertySource(ASMNativeFunction nf) 

+	{

+		fNf = nf;

+	}

+	

+	enum PROP_IDS { NAME, ID, DESC, ANNOTATIONS, REMARK, SIGNATURE };

+	

+

+	public boolean isPropertyResettable(Object id) { return false; }

+

+

+	public boolean isPropertySet(Object id) { return false; }

+

+

+	public Object getEditableValue() { return null;	}

+

+

+	public IPropertyDescriptor[] getPropertyDescriptors() {

+		ArrayList<IPropertyDescriptor> ret = new ArrayList<IPropertyDescriptor>();

+		PropertyDescriptor pd = new PropertyDescriptor(PROP_IDS.NAME, "Name");

+		pd.setCategory("General");

+		ret.add(pd);

+		pd = new PropertyDescriptor(PROP_IDS.ID, "ID");

+		pd.setCategory("General");

+		ret.add(pd);

+		pd = new PropertyDescriptor(PROP_IDS.DESC, "Description");

+		pd.setCategory("General");

+		ret.add(pd);

+		

+		

+		// process annotations

+		for (Annotation a : fNf.getClass().getAnnotations())

+		{

+			if (a.annotationType().equals(VIATRANativeFunction.class))

+			{

+				fNfA = (VIATRANativeFunction) a;

+				

+				pd = new PropertyDescriptor(PROP_IDS.REMARK, "Remark");

+				pd.setCategory("General");

+				ret.add(pd);

+				

+				pd = new PropertyDescriptor(PROP_IDS.SIGNATURE, "Signature");

+				pd.setCategory("General");

+				ret.add(pd);

+				

+				for (NativeFunctionParameter p : fNfA.params())

+				{

+					pd = new PropertyDescriptor(":"+p.name(),p.name());

+					pd.setCategory("Parameters");

+					ret.add(pd);

+				}

+			}

+		}

+		

+		return ret.toArray(new IPropertyDescriptor[]{});

+	}

+

+

+	public Object getPropertyValue(Object id) {

+		if (id.equals(PROP_IDS.ID))

+			return fNf.getID();

+		else if (id.equals(PROP_IDS.NAME))

+			return fNf.getName();

+		else if (id.equals(PROP_IDS.DESC))

+			return fNf.getDescription();

+		else if (id.equals(PROP_IDS.REMARK))

+			return fNfA!=null?fNfA.remark():"";

+		else if (id.equals(PROP_IDS.SIGNATURE))

+			return fNfA!=null?getFunctionSignature(fNfA):"";

+		else if ( ((String)id).startsWith(":") )

+			// parameter signature

+		{

+			// parse parameter name

+			String pname = ((String)id).substring(1);

+			for (NativeFunctionParameter p : fNfA.params())

+			{

+				if (p.name().equals(pname))

+				{

+					return p.description() + " (variable argument number: "+p.isVarArg()+")";

+				}

+			}

+		}

+		return null;

+	}

+

+	protected String getParameterSignature(NativeFunctionParameter p)

+	{

+		String signature = "";

+		for (NativeFunctionParameter.ParameterType t : p.type())

+		{

+			signature+="|"+t.name();

+			if (p.isVarArg()) signature+="*";

+		}

+		signature = signature.substring(1);

+		return signature;

+	}

+	

+	protected String getFunctionSignature(VIATRANativeFunction f)

+	{

+		String s = f.name() + "( ";

+		int i = 0;

+		for (NativeFunctionParameter p : f.params())

+		{

+			s += i>0?(", "+getParameterSignature(p)):getParameterSignature(p);

+			i++;

+			s += " " + p.name();

+		}

+		String ret = "";

+		for (NativeFunctionParameter.ParameterType t : f.returns())

+		{

+			ret+="|"+t.name();

+		}

+		return s+" ) : "+ret.substring(1);

+	}

+	

+

+	public void resetPropertyValue(Object id) { }

+

+

+	public void setPropertyValue(Object id, Object value) { }

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/CrossReferenceManager.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/CrossReferenceManager.java
new file mode 100644
index 0000000..10c058d
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/CrossReferenceManager.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2009 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+
+package org.eclipse.viatra2.frameworkgui.content.transformation;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Manager class to handle reference resolving management.
+ * @author istvan rath
+ *
+ */
+public class CrossReferenceManager {
+
+	/**
+	 * Queries whether a machine has any unresolved outgoing references.
+	 * @param machineID
+	 * @return
+	 */
+	public boolean hasUnresolvedReferences(String machineID) {
+		return unresolved.keySet().contains(machineID);
+	}
+
+	/**
+	 * Stores the map Machine->Set(unresolved_target_references).
+	 */
+	private Map<String, Set<String>> unresolved = new HashMap<String, Set<String>>();
+
+	/**
+	 * Stores machines referred by a machine.
+	 */
+	private Map<String, Set<String>> callgraph_forward = new HashMap<String, Set<String>>();
+
+	/**
+	 * Stores machines referring a machine.
+	 */
+	private Map<String, Set<String>> callgraph_backward = new HashMap<String, Set<String>>();
+
+
+	/**
+	 * Adds a machine reference to the registry.
+	 * Also initializes the set of the caller.
+	 * @param callerID
+	 * @param referredID
+	 */
+	public void addMachineReference(String callerID, String referredID)
+	{
+		addToGraph(callerID, referredID, callgraph_forward);
+		addToGraph(referredID, callerID, callgraph_backward);
+//		removeFromGraph(callerID, referredID, unresolved);
+	}
+
+	/*
+	 * Lazily initializes the target sets.
+	 * Performs reference edge addition.
+	 */
+	private void addToGraph(String key, String value, Map<String,Set<String>> map) {
+		Set<String> target = map.get(key);
+		if (target==null) {
+			target = new HashSet<String>();
+		}
+		target.add(value);
+		map.put(key, target);
+	}
+
+	/*
+	 * Removes a reference from a graph.
+	 */
+//	private void removeFromGraph(String key, String value, Map<String, Set<String>> map) {
+//		Set<String> _s = map.get(key);
+//		if (_s!=null) {
+//			_s.remove(value);
+//		}
+//	}
+
+	/**
+	 * Deletes all references belonging to the machine identified by callerID.
+	 * @param callerID
+	 */
+	public void deleteMachineReferences(String callerID) {
+//		Set<String> referenced_machines = callgraph_forward.get(callerID);
+		// we're not allowed to do this!
+//		if (referenced_machines!=null) {
+//			for (String referenced_machine_id : referenced_machines) {
+//				callgraph_backward.get(referenced_machine_id).remove(callerID);
+//			}
+//		}
+		callgraph_forward.put(callerID, new HashSet<String>());
+	}
+
+	/**
+	 * Registers all machines to be "unresolved" referenced the removed machine.
+	 * @param removedMachineID
+	 */
+	public void checkUnresolvedReference(String removedMachineID) {
+		Set<String> referencing_machines = callgraph_backward.get(removedMachineID);
+		if (referencing_machines!=null) {
+			for (String ref_m : referencing_machines) {
+				Set<String> _t = unresolved.get(ref_m);
+				if (_t == null) {
+					_t = new HashSet<String>();
+				}
+				_t.add(removedMachineID);
+				unresolved.put(ref_m, _t);
+			}
+		}
+	}
+
+	/**
+	 * Updates the "resolved" status of machines which reference the newly added machine.
+	 * @param machineAddedID
+	 */
+	public void checkResolvedReference(String machineAddedID) {
+		Set<String> referencing_machines = callgraph_backward.get(machineAddedID);
+		if (referencing_machines!=null) {
+			for (String ref_m : referencing_machines) {
+				// check whether ref_m can be cleared from "unresolved"
+				Set<String> unresolved_targets = unresolved.get(ref_m);
+				if (unresolved_targets!=null) {
+					unresolved_targets.remove(machineAddedID);
+					unresolved.put(ref_m, unresolved_targets);
+				}
+				if (unresolved_targets == null || unresolved_targets.size()==0) {
+					unresolved.remove(ref_m);
+				}
+			}
+		}
+	}
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/DeleteModelAction.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/DeleteModelAction.java
new file mode 100644
index 0000000..a1c0c84
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/DeleteModelAction.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.content.transformation;

+

+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.viatra2.framework.FrameworkException;
+import org.eclipse.viatra2.frameworkgui.actions.AbstractFrameworkGUIAction;
+import org.eclipse.viatra2.frameworkgui.content.transformation.TransformationContent.MachineDummy;
+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;
+

+public class DeleteModelAction extends AbstractFrameworkGUIAction {

+

+	public DeleteModelAction(FrameworkTreeView part) {

+		super();

+		//setId(ActionFactory.DELETE.getId());

+		setupInternals(part);

+		setText("Drop");

+		setToolTipText("Drops the machine model from the framework");

+		setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()

+				.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));

+		//setAccelerator(SWT.DEL);

+		setActionDefinitionId("org.eclipse.ui.edit.delete");

+	}

+	

+	@Override

+	public boolean isEnabled() {

+		return true;

+	}

+	

+	@Override

+	public void run() {

+		refreshSelection();

+		try 

+		{

+			for (Object c : ((IStructuredSelection) iFT.getSelection()).toArray() )

+			{

+				if (c instanceof MachineDummy)

+				{

+					iViatraFramework.removeMachine(((MachineDummy)c).machine.getFqn());

+				}

+			}

+		}

+		catch (FrameworkException e)

+		{

+			iFT.showMessage("Framework error: " +e.getMessage());

+		}

+		

+	}

+	

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/MachinePropertySource.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/MachinePropertySource.java
new file mode 100644
index 0000000..c8fda77
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/MachinePropertySource.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.content.transformation;

+

+import java.util.ArrayList;
+
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource2;
+import org.eclipse.ui.views.properties.PropertyDescriptor;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+

+/**

+ * Property support for Machines.

+ * @author istvan rath

+ *

+ */

+public class MachinePropertySource implements IPropertySource2 {

+

+	enum PROP_IDS { FQN, NAME, MODULE_NAME };

+	

+	

+	Machine machine;

+	

+	public MachinePropertySource(Machine m) 

+	{

+		machine = m;

+	}

+	

+	

+	public boolean isPropertyResettable(Object id) {

+		return false;

+	}

+

+	public boolean isPropertySet(Object id) {

+		return false;

+	}

+

+	public Object getEditableValue() {

+		return null;

+	}

+

+	public IPropertyDescriptor[] getPropertyDescriptors() 

+	{

+		ArrayList<IPropertyDescriptor> ret = new ArrayList<IPropertyDescriptor>();

+		ret.add(new PropertyDescriptor(PROP_IDS.NAME, "Name"));

+		ret.add(new PropertyDescriptor(PROP_IDS.FQN, "Fully qualified name"));

+		ret.add(new PropertyDescriptor(PROP_IDS.MODULE_NAME, "Module"));

+		return ret.toArray(new IPropertyDescriptor[]{});

+	}

+

+	public Object getPropertyValue(Object id) {

+		if (id.equals(PROP_IDS.FQN))

+			return machine.getFqn();

+		else if (id.equals(PROP_IDS.NAME))

+			return machine.getName();

+		else if (id.equals(PROP_IDS.MODULE_NAME))

+			return machine.getModule().getFileName();

+		return null;

+	}

+

+	public void resetPropertyValue(Object id) {

+		// not supported (yet)

+	}

+

+	public void setPropertyValue(Object id, Object value) {	

+		// not supported (yet)

+	}

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/RunModelAction.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/RunModelAction.java
new file mode 100644
index 0000000..2bdd5ac
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/RunModelAction.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.content.transformation;

+

+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.viatra2.frameworkgui.actions.AbstractFrameworkGUIAction;
+import org.eclipse.viatra2.frameworkgui.content.transformation.TransformationContent.MachineDummy;
+import org.eclipse.viatra2.frameworkgui.runner.TransformationRunner;
+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+

+public class RunModelAction extends AbstractFrameworkGUIAction 

+{

+

+	public RunModelAction(FrameworkTreeView part) 

+	{

+		super();

+		setupInternals(part);

+		setText("Run...");

+		setToolTipText("Runs the selected entity as an ASM");

+		setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()

+				.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD));

+		

+	}

+	

+	@Override

+	public boolean isEnabled() {

+		return true;

+	}

+	

+	@Override

+	public void run() 

+	{

+		refreshSelection();

+		Object c = getFirstSelected();

+		if (c instanceof MachineDummy)

+		{

+			Machine m = ((MachineDummy)c).getMachine();

+			TransformationRunner.run(m, iViatraFramework, iFT.getViewSite().getShell());

+		}

+	}

+	

+	

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/SaveModelAction.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/SaveModelAction.java
new file mode 100644
index 0000000..01d7a60
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/SaveModelAction.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.content.transformation;

+

+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.jface.window.Window;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.SaveAsDialog;
+import org.eclipse.viatra2.frameworkgui.actions.AbstractFrameworkGUIAction;
+import org.eclipse.viatra2.frameworkgui.content.transformation.TransformationContent.MachineDummy;
+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+

+public class SaveModelAction extends AbstractFrameworkGUIAction {

+

+	public SaveModelAction(FrameworkTreeView part) {

+		super();

+		setupInternals(part);

+		setText("Save as module");

+		setToolTipText("Saves the program model as an XMI file");

+		setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()

+				.getImageDescriptor(ISharedImages.IMG_OBJ_FILE));

+	}

+	

+	@Override

+	public boolean isEnabled() {

+		return true;

+	}

+	

+	@Override

+	public void run() {

+		refreshSelection();

+		try 

+		{

+			Object c = getFirstSelected();

+			if (c instanceof MachineDummy)

+			{

+				Machine m = ((MachineDummy)c).machine;

+				SaveAsDialog d = new SaveAsDialog(iFT.getViewSite().getShell());
+				d.setOriginalName(m.getName()+".module");

+				if (d.open()==Window.OK)

+				{

+					IPath result = d.getResult();

+					ResourceSet rs = new ResourceSetImpl();

+					IWorkspace ws = ResourcesPlugin.getWorkspace();

+					String wsroot = ws.getRoot().getRawLocation().toOSString();

+					Resource res = rs.createResource(URI.createFileURI(wsroot+result.toOSString()));

+					res.getContents().add(m.getModule());

+					res.save(null);
+					ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());

+				}

+				

+			}

+		}

+		catch (Exception e) 

+		{

+			iFT.showMessage(e.getMessage());

+		}

+		

+	}

+	

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/SaveTransformationAction.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/SaveTransformationAction.java
new file mode 100644
index 0000000..5e854ed
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/SaveTransformationAction.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.content.transformation;

+

+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.jface.window.Window;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.SaveAsDialog;
+import org.eclipse.viatra2.frameworkgui.actions.AbstractFrameworkGUIAction;
+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Transformation;
+

+public class SaveTransformationAction extends AbstractFrameworkGUIAction {

+

+	public SaveTransformationAction(FrameworkTreeView part) {

+		super();

+		setupInternals(part);

+		setText("Save as Transformation");

+		setToolTipText("Saves the program model set as an XMI file");

+		setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()

+				.getImageDescriptor(ISharedImages.IMG_OBJ_FILE));

+	}

+	

+	@Override

+	public boolean isEnabled() {

+		return true;

+	}

+	

+	@Override

+	public void run() {

+		refreshSelection();

+		try 

+		{

+			Object c = getFirstSelected();

+			if (c instanceof TransformationContent)

+			{

+				SaveAsDialog d = new SaveAsDialog(iFT.getViewSite().getShell());
+				d.setOriginalName(iViatraFramework.getId()+".transformation");

+				if (d.open()==Window.OK)

+				{

+					IPath result = d.getResult();

+					ResourceSet rs = new ResourceSetImpl();

+					IWorkspace ws = ResourcesPlugin.getWorkspace();

+					String wsroot = ws.getRoot().getRawLocation().toOSString();

+					Resource res = rs.createResource(URI.createFileURI(wsroot+result.toOSString()));

+					Transformation t = DefinitionsFactory.eINSTANCE.createTransformation();

+					for (Object _machine : iViatraFramework.getMachines())

+					{

+							t.getModules().add( ((Machine)_machine).getModule() );

+					}

+					t.setName(result.lastSegment());

+					res.getContents().add(t);

+					res.save(null);
+					ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());

+				}

+				

+			}

+		}

+		catch (Exception e) 

+		{

+			iFT.showMessage(e.getMessage());

+		}

+		

+	}

+	

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/TransformationContent.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/TransformationContent.java
new file mode 100644
index 0000000..20acce2
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/TransformationContent.java
@@ -0,0 +1,432 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.content.transformation;

+

+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Vector;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.EcoreUtil.UsageCrossReferencer;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.views.properties.IPropertySource2;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.framework.IMachineSetChangedListener;
+import org.eclipse.viatra2.frameworkgui.FrameworkGUIPlugin;
+import org.eclipse.viatra2.frameworkgui.actions.extend.ContributedActionContainer;
+import org.eclipse.viatra2.frameworkgui.content.FrameworkContainer;
+import org.eclipse.viatra2.frameworkgui.content.IFrameworkContentProviderExtension;
+import org.eclipse.viatra2.frameworkgui.content.ITreeObject;
+import org.eclipse.viatra2.frameworkgui.content.ITreeParent;
+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;
+import org.eclipse.viatra2.lpgparser.modelbuilder.VTCLModelResolver;
+

+public class TransformationContent

+	implements IFrameworkContentProviderExtension, IMachineSetChangedListener, ITreeParent

+{

+

+	private RunModelAction runAction;

+

+	private DeleteModelAction deleteAction;

+

+	private SaveModelAction saveAction;

+

+	private SaveTransformationAction saveTransformationAction;

+

+	private Vector<IAction> actions;
+
+	private CrossReferenceManager xrefman;

+

+	public Collection<IAction> getActions()

+	{

+		ArrayList<IAction> r = new ArrayList<IAction>();

+		r.add(saveTransformationAction);

+		return r;

+	}

+

+	public Collection<IContributionItem> getContributionItems()

+	{

+		return null;

+	}

+

+	public ITreeObject getTopLevelEntry()

+	{

+		return this;

+	}

+

+	private FrameworkTreeView viewer;

+	private IFramework fw;

+	private FrameworkContainer cont;

+

+	//private HashSet<ContributedActionContainer> contributedActions = new HashSet<ContributedActionContainer>();

+

+	private void processContributedActions(FrameworkTreeView ftv)

+	{

+		for (ContributedActionContainer c : FrameworkGUIPlugin.getDefault().getContributedActions())

+		{

+			if (c.enablesFor.equals(Machine.class))

+			{

+				c.action.setupInternals(ftv);

+				//contributedActions.add(c);

+				actions.add(c.action);

+			}

+		}

+	}

+

+	public void init(FrameworkTreeView fv, IFramework f, FrameworkContainer c)

+	{

+		viewer = fv; this.fw = f; cont = c;

+		runAction = new RunModelAction(fv);

+		deleteAction = new DeleteModelAction(fv);

+		saveAction = new SaveModelAction(fv);

+		saveTransformationAction = new SaveTransformationAction(fv);
+		xrefman = new CrossReferenceManager();

+

+		processContributedActions(fv);

+

+		actions.add(runAction);

+		actions.add(deleteAction);

+		actions.add(saveAction);

+

+		//actions.add(saveTransformationAction);

+		initMachines();

+		f.addMachineSetListener(this);

+

+		brokenRefs = new HashMap<EObject, Collection<Setting>>();

+	}

+

+	private Map<Object, ITreeObject> machines;

+

+	public TransformationContent()

+	{

+		machines = new HashMap<Object, ITreeObject>();

+		actions = new Vector<IAction>();

+	}

+

+	public void dispose()

+	{

+		fw.removeMachineSetListener(this);

+	}

+

+	public Set<ITreeObject> getChildren()

+	{

+		return new HashSet<ITreeObject>(machines.values());

+	}

+

+	public boolean hasChildren()

+	{

+		return !machines.isEmpty();

+	}

+

+	public FrameworkContainer getFrameworkContainer()

+	{

+		return cont;

+	}

+

+	public Image getLabelImage()

+	{

+		// TODO

+		return null;

+	}

+

+	public String getLabelText()

+	{

+		return "Program models";

+	}

+

+	public ITreeParent getParent()

+	{

+		return cont;

+	}

+

+	public IPropertySource2 getPropertySource()

+	{

+		// TODO

+		return null;

+	}

+

+	protected static Image machine_image = FrameworkGUIPlugin.getImageDescriptor("icons/machine_transparent.png").createImage();

+

+	public class MachineDummy implements ITreeObject

+	{

+

+		public MachineDummy(Machine m)

+		{

+			machine = m;

+			if (m.getModule()!=null)

+				moduleName = m.getModule().getName();

+			else

+				moduleName = "";

+		}

+

+		public Machine getMachine()

+		{

+			return machine;

+		}

+

+		Machine machine;

+

+		String moduleName;

+

+		MachinePropertySource propertySource;

+

+		public FrameworkContainer getFrameworkContainer() {

+			return cont;

+		}

+

+		public Image getLabelImage()

+		{

+			return machine_image;

+		}

+

+		public String getLabelText()

+		{
+			String s = "";
+			if (xrefman.hasUnresolvedReferences(machine.getFqn())) {
+				s = " [UNRESOLVED]";
+			}

+			return machine.getFqn()+" ("+moduleName+")"+s;

+		}

+

+		public ITreeParent getParent()

+		{

+			return TransformationContent.this;

+		}

+

+		public IPropertySource2 getPropertySource() {

+			if (propertySource == null)

+				propertySource = new MachinePropertySource(machine);

+			return propertySource;

+		}

+

+		public Collection<IContributionItem> getContributionItems() {

+			return null;

+		}

+

+		public Collection<IAction> getActions()

+		{

+			return actions;

+		}

+

+		public IAction getDoubleClickAction() {

+			return runAction;

+		}

+

+	}

+

+	private void initMachines()

+	{

+		for (Object _m : fw.getMachines())

+		{

+			if (_m instanceof Machine)

+				machines.put(_m, new MachineDummy((Machine)_m));

+		}

+	}

+

+	public void machineAdded(Object machine)

+	{

+		if (machine instanceof Machine) {

+			resolveBrokenLinks((Machine) machine);

+			machines.put(machine , new MachineDummy((Machine)machine));
+			xrefman.checkResolvedReference(((Machine)machine).getFqn());

+		}

+		viewer.refreshViewer(this);

+	}

+

+	public void machineRemoved(Object machine)

+	{

+		if (machine instanceof Machine) {

+			recordBrokenLinks((Machine) machine);

+			machines.remove(machine);
+			xrefman.checkUnresolvedReference(((Machine)machine).getFqn());

+		}

+		viewer.refreshViewer(this);

+	}

+

+	public IAction getDoubleClickAction() {

+		return null;

+	}

+

+	// -- Added by Daniel Varro to record broken references --

+	private Map<EObject, Collection<Setting>> brokenRefs;

+

+	/**

+	 * This method records all links which will be broken due to the removal

+	 * of removedMachine

+	 * @param removedMachine : the {@link Machine} to be removed

+	 */

+	protected void recordBrokenLinks(Machine removedMachine) {

+		List<GTASMElement> defsToResolve = new ArrayList<GTASMElement>();

+		List<Machine> machinesToSearch = new ArrayList<Machine>();
+

+		for (int i = 0; i < removedMachine.getAsmFunctionDefinitions().size(); i++) {

+			ASMFunction asmFun = removedMachine.getAsmFunctionDefinitions().get(i);

+			defsToResolve.add(asmFun);

+		}

+

+		for (int i = 0; i < removedMachine.getAsmRuleDefinitions().size(); i++) {

+			Rule asmRule = removedMachine.getAsmRuleDefinitions().get(i);

+			defsToResolve.add(asmRule);

+		}

+

+		for (int i = 0; i < removedMachine.getGtPatternDefinitions().size(); i++) {

+			GTPattern gtPatt = removedMachine.getGtPatternDefinitions().get(i);

+			defsToResolve.add(gtPatt);

+		}

+

+		for (int i = 0; i < removedMachine.getGtRuleDefinitions().size(); i++) {

+			GTRule gtRule = removedMachine.getGtRuleDefinitions().get(i);

+			defsToResolve.add(gtRule);

+		}

+

+		// Recording machines of interest (disregarding the machine to be removed)

+		for (Object obj :  fw.getMachines()) {

+			Machine machine = (Machine) obj;

+			if (machine != removedMachine) {

+				machinesToSearch.add(machine);

+			}

+		}

+

+		// Recording cross references

+		if (!machinesToSearch.isEmpty() && !defsToResolve.isEmpty()) {

+			brokenRefs.putAll( UsageCrossReferencer.findAll(defsToResolve, machinesToSearch));

+		}

+

+		// Removing cross references leading out from the machine to be removed

+		removeLinksFromRemovedMachine(removedMachine);

+	}

+

+	protected void removeLinksFromRemovedMachine (Machine removedMachine) {
+		// toRemove is a collection of Settings (i.e. a representation of a value held by a feature of an object)
+		Collection<Setting> toRemove = new ArrayList<Setting>();
+		// if there are broken references recorded by the framework

+		if (brokenRefs != null) {

+			toRemove.clear();

+			Iterator<Collection<Setting>> it = brokenRefs.values().iterator();

+			while (it.hasNext()) {

+				Collection<Setting> settings = it.next();

+				for (Setting setting : settings) {

+					GTASMElement element = (GTASMElement) setting.getEObject();
+					// Check if removed machine is a parent / ancestor of element

+					if (EcoreUtil.isAncestor(removedMachine, element)) {
+						// Schedule the setting for removal

+						toRemove.add(setting);
+					}

+					// Unset the feature of the object
+					setting.unset();
+				}

+				if (!toRemove.isEmpty()) {

+					settings.removeAll(toRemove);

+				}

+			}

+			Collection<EObject> brokenRefsToRemove = new ArrayList<EObject>();
+			Iterator<EObject> it2 = brokenRefs.keySet().iterator();
+			while (it2.hasNext()) {
+				EObject nextKey = it2.next();
+				if (brokenRefs.get(nextKey).isEmpty()) {
+					brokenRefsToRemove.add(nextKey);
+				}
+
+			}
+			for (EObject nextObject : brokenRefsToRemove) {
+				brokenRefs.remove(nextObject);
+			}
+		}

+	}

+

+	protected void resolveBrokenLinks(Machine addedMachine) {

+		Collection<Setting> toRemove = new ArrayList<Setting>();

+ 		if (brokenRefs != null) {

+			for (Collection<Setting> settings : brokenRefs.values()){

+				toRemove.clear();

+				for (Setting setting : settings) {

+					//GTASMElement element = (GTASMElement) setting.getEObject();

+					//System.out.println("Resolving " + element.getFqn() + ":" + element.getClass().getCanonicalName());

+					GTASMElement result = resolveGTASMElement(setting);

+					if (result != null) {

+						toRemove.add(setting);

+					}

+				}

+				if (!toRemove.isEmpty()) {

+					settings.removeAll(toRemove);

+				}

+				//brokenRefs.remove(arg0);

+			}
+
+			Collection<EObject> brokenRefsToRemove = new ArrayList<EObject>();
+			Iterator<EObject> it2 = brokenRefs.keySet().iterator();
+			while (it2.hasNext()) {
+				EObject nextKey = it2.next();
+				if (brokenRefs.get(nextKey).isEmpty()) {
+					brokenRefsToRemove.add(nextKey);
+				}
+
+			}
+			for (EObject nextObject : brokenRefsToRemove) {
+				brokenRefs.remove(nextObject);
+			}
+		}

+	}

+

+

+	protected GTASMElement resolveGTASMElement(Setting setting) {

+		EObject refObject = setting.getEObject();

+		VTCLModelResolver fModelResolver = new VTCLModelResolver();

+		if (refObject instanceof CallRule) {

+			CallRule asmRuleInvoc = (CallRule) refObject;

+			return fModelResolver.reportAsmRuleInvocResolutionError(asmRuleInvoc, null, fw);

+		}

+		else if (refObject instanceof GTPatternCall) {

+			GTPatternCall pattCall = (GTPatternCall) refObject;

+			return fModelResolver.reportGtPatternCallResolutionError(pattCall, null, fw);

+		}

+		else if (refObject instanceof GTRuleInvocation) {

+			GTRuleInvocation gtInvoc = (GTRuleInvocation) refObject;

+			return fModelResolver.reportGtRuleResolutionError(gtInvoc, null, fw);

+		}

+		else if (refObject instanceof ASMFunctionInvocation) {

+			ASMFunctionInvocation funInvoc = (ASMFunctionInvocation) refObject;

+			return fModelResolver.reportFunInvocResolutionError(funInvoc, null, fw);

+		}

+		else if (refObject instanceof RuleUpdateASMFunction) {

+			RuleUpdateASMFunction updateRule = (RuleUpdateASMFunction) refObject;

+			return fModelResolver.reportAsmFunUpdateResolutionError(updateRule, null, fw);

+

+		}

+		else {

+			return null;

+		}

+

+	}

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/ViatraTreeviewSorter.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/ViatraTreeviewSorter.java
new file mode 100644
index 0000000..1687ce9
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/content/transformation/ViatraTreeviewSorter.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.content.transformation;

+

+

+import java.text.Collator;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.viatra2.core.IModelElement;
+

+public class ViatraTreeviewSorter extends ViewerSorter {

+

+	public ViatraTreeviewSorter() {

+		super();

+	}

+

+	public ViatraTreeviewSorter(Collator collator) {

+		super(collator);

+	}

+	

+	@Override

+	public int compare(Viewer viewer, Object arg0, Object arg1) {

+		IModelElement a0 = (IModelElement) arg0;

+		IModelElement a1 = (IModelElement) arg1;

+		if (a0.getClass().equals(a1.getClass()))

+			return (a0.getName().compareTo(a1.getName()));

+		else if (a0.isEntity() && a1.isRelation())

+			return +1;

+		else

+			return -1;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/dialogs/ModelspaceContentProvider.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/dialogs/ModelspaceContentProvider.java
new file mode 100644
index 0000000..9b5504f
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/dialogs/ModelspaceContentProvider.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.dialogs;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.framework.IFramework;
+
+/**
+ * Content provider used in dialogs for displaying a tree of a model space.
+ * @author Istvan Rath
+ *
+ */
+public class ModelspaceContentProvider implements ITreeContentProvider {
+
+	public Object[] getChildren(Object parentElement) {
+		if (parentElement instanceof IModelElement) {
+			return ((IModelElement) parentElement).getElementsInNamespace()
+					.toArray();
+		} else
+			return null;
+	}
+
+	public Object getParent(Object element) {
+		if (element instanceof IModelElement) {
+			return ((IModelElement) element).getNamespace();
+		}
+		return null;
+	}
+
+	public boolean hasChildren(Object element) {
+		if (element instanceof IModelElement) {
+			return !((IModelElement) element).getElementsInNamespace()
+					.isEmpty();
+		}
+		return false;
+	}
+
+	public Object[] getElements(Object inputElement) {
+		if (inputElement instanceof IFramework) {
+			return ((IFramework) inputElement).getTopmodel()
+					.getModelManager().getRoot().getContents().toArray();
+		} else
+			return null;
+	}
+
+	public void dispose() {
+	}
+
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+	}
+
+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/dialogs/ModelspaceLabelProvider.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/dialogs/ModelspaceLabelProvider.java
new file mode 100644
index 0000000..dff112f
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/dialogs/ModelspaceLabelProvider.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.dialogs;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.frameworkgui.FrameworkGUIPlugin;
+
+/**
+ * A label provider for model elements in dialogs.
+ * 
+ * @author Istvan Rath
+ */
+public class ModelspaceLabelProvider implements ILabelProvider {
+
+	public Image getImage(Object element) {
+		if (element instanceof IRelation)
+			return im_relation;
+		else if (element instanceof IEntity)
+			return im_entity;
+		return null;
+	}
+
+	public String getText(Object element) {
+		return ((IModelElement) element).getName()
+				+ getTypesAsString((IModelElement) element);
+	}
+
+	public void addListener(ILabelProviderListener listener) {
+	}
+
+	public void dispose() {
+	}
+
+	public boolean isLabelProperty(Object element, String property) {
+		return true;
+	}
+
+	public void removeListener(ILabelProviderListener listener) {
+	}
+
+	public String getTypesAsString(IModelElement element) {
+		String r = " : ";
+		for (IModelElement type : element.getTypes()) {
+			r += type.getName() + ", ";
+		}
+		if (r.length() > 2) {
+			r = r.substring(0, r.length() - 2);
+			return r;
+		} else {
+			return "";
+		}
+	}
+
+	public static Image im_entity = FrameworkGUIPlugin.getImageDescriptor(
+			"icons/entity_transparent.png").createImage();
+
+	public static Image im_relation = FrameworkGUIPlugin.getImageDescriptor(
+			"icons/relation_transparent.png").createImage();
+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/dialogs/SelectModelElementDialog.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/dialogs/SelectModelElementDialog.java
new file mode 100644
index 0000000..0d004bf
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/dialogs/SelectModelElementDialog.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2011 Zoltan Ujhelyi, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.dialogs;
+
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
+import org.eclipse.viatra2.framework.IFramework;
+
+/**
+ * An extension of the ElementTreeSelectionDialog to support the selection of
+ * model elements. The dialog expects setting an {@link IFramework} as its input
+ * element.
+ * 
+ * @author Zoltan Ujhelyi
+ */
+public class SelectModelElementDialog extends ElementTreeSelectionDialog {
+
+	public SelectModelElementDialog(Shell parent) {
+		super(parent, new ModelspaceLabelProvider(),
+				new ModelspaceContentProvider());
+	}
+
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/dialogs/ValidatingRunnerInputDialog.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/dialogs/ValidatingRunnerInputDialog.java
new file mode 100644
index 0000000..8d11b90
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/dialogs/ValidatingRunnerInputDialog.java
@@ -0,0 +1,337 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.dialogs;

+

+import java.util.StringTokenizer;
+
+import org.eclipse.core.databinding.AggregateValidationStatus;
+import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.core.databinding.UpdateValueStrategy;
+import org.eclipse.core.databinding.observable.ChangeEvent;
+import org.eclipse.core.databinding.observable.IChangeListener;
+import org.eclipse.core.databinding.observable.Realm;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.databinding.observable.value.WritableValue;
+import org.eclipse.core.databinding.validation.IValidator;
+import org.eclipse.core.databinding.validation.ValidationStatus;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.bindings.keys.KeyStroke;
+import org.eclipse.jface.bindings.keys.ParseException;
+import org.eclipse.jface.databinding.swt.SWTObservables;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.fieldassist.ContentProposalAdapter;
+import org.eclipse.jface.fieldassist.IContentProposal;
+import org.eclipse.jface.fieldassist.IContentProposalProvider;
+import org.eclipse.jface.fieldassist.TextContentAdapter;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.IElementComparer;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.framework.FrameworkManager;
+import org.eclipse.viatra2.frameworkgui.content.transformation.ViatraTreeviewSorter;
+import org.eclipse.viatra2.frameworkgui.runner.TransformationRunner;
+

+/**

+ * @author Istvan Rath

+ * 

+ */

+public class ValidatingRunnerInputDialog extends Dialog {

+	private final String message;

+

+	//private String value;

+

+	private final String title;

+

+	/**

+	 * Used to select a model element from the tree view.

+	 */

+	private Button modelButton;

+

+	private Button runButton;

+	

+	protected Label errorMessageLabel;

+

+	private TreeViewer modelSpaceViewer;

+

+	public String[] params;

+

+	public String[] parsed_params;

+

+	private Text valuetext;

+

+	private final WritableValue parameters;

+

+	private DataBindingContext context;

+

+	// private FrameworkContainer frameworkContainer;

+

+	private final String frameworkId;

+
+	private AggregateValidationStatus aggregateValidationStatus;
+	private IChangeListener listener;
+	

+	/**

+	 * @param parentshell

+	 *            The Shell

+	 * @param t

+	 *            The title of the dialog window

+	 * @param m

+	 *            The message above the edit box

+	 * @param i

+	 *            The initial value of the edit box

+	 */

+	public ValidatingRunnerInputDialog(Shell parentshell, // FrameworkContainer

+															// cont,

+			String fwid, String t, String m, String i, String[] p) {

+		super(parentshell);

+		// frameworkContainer = cont;

+		frameworkId = fwid;

+		title = t;

+//		value = i;

+		message = m;

+

+		params = p;

+

+		if (Realm.getDefault() == null)

+			// SWTObservables.getRealm(Display.getCurrent());

+			SWTObservables.getRealm(Display.getDefault());

+

+		parameters = WritableValue.withValueType(String.class);

+	}

+

+	@Override
+	protected void configureShell(Shell shell) {

+		super.configureShell(shell);

+		shell.setText(title);

+	}

+

+	@Override
+	protected void createButtonsForButtonBar(Composite parent) {

+		runButton = createButton(parent, 0, IDialogConstants.OK_LABEL, true);

+		runButton.setEnabled(false);

+		createButton(parent, 1, IDialogConstants.CANCEL_LABEL, false);

+		modelButton = createButton(parent, 2, "Select model element", false);

+	}

+

+	private class RunContentProposalAdapter implements IContentProposalProvider {

+		public IContentProposal[] getProposals(String contents, int position) {
+			Object[] entries = TransformationRunner.getRunDialogEntries(frameworkId);
+			if (entries!=null)
+			{

+				IContentProposal[] ret = new IContentProposal[entries.length];

+				for (int i = 0; i < ret.length; i++) {

+					final String entry = (String) TransformationRunner

+							.getRunDialogEntries(frameworkId)[ret.length - i - 1]; // inverse

+					ret[i] = new IContentProposal() {

+						public String getContent() {

+							return entry;

+						}

+	

+						public int getCursorPosition() {

+							return entry.length();

+						}

+	

+						public String getDescription() {

+							return null;

+						}

+	

+						public String getLabel() {

+							return null;

+						}

+					};

+				}

+				return ret;

+			}
+			return new IContentProposal[]{};
+		}

+	}

+

+	@Override
+	protected Control createDialogArea(Composite parent) {

+		Composite composite = (Composite) super.createDialogArea(parent);

+		Label label = new Label(composite, SWT.HORIZONTAL | SWT.LEFT);

+		label.setText(message);

+		

+		Label label2 = new Label(composite, SWT.HORIZONTAL | SWT.LEFT);

+		label2.setText("Hint: use characters [,;] and space to separate parameters.");

+		

+		errorMessageLabel = new Label(composite, SWT.HORIZONTAL | SWT.LEFT);

+		errorMessageLabel.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_RED));

+		GridData _gd = new GridData();

+		_gd.widthHint = 400;

+		errorMessageLabel.setLayoutData(_gd);

+		errorMessageLabel.setText("No parameters read.");

+

+		valuetext = new Text(composite, 2052);

+		GridData gd = new GridData();

+		gd.widthHint = 513; // magic number woohoohoohoo

+		valuetext.setLayoutData(gd);

+//		valuetext.setText(value);

+		valuetext.setBackground(Display.getDefault().getSystemColor(

+				SWT.COLOR_RED));

+

+		// content proposal based on history

+		try {

+			ContentProposalAdapter adapter = new ContentProposalAdapter(

+					valuetext, new TextContentAdapter(),

+					// new SimpleContentProposalProvider(new String [] {"A",

+					// "B", "C"}),

+					new RunContentProposalAdapter(), KeyStroke

+							.getInstance("Ctrl+Space"), null);

+		} catch (ParseException e) {

+		}

+

+		// place treeviewer

+		modelSpaceViewer = new TreeViewer(composite, SWT.BORDER);

+		GridData gd2 = new GridData();

+		gd2.heightHint = 300;

+		gd2.widthHint = 500;

+

+		modelSpaceViewer.getTree().setLayoutData(gd2);

+		modelSpaceViewer.setContentProvider(new ModelspaceContentProvider());

+		modelSpaceViewer.setLabelProvider(new ModelspaceLabelProvider());

+		// modelSpaceViewer.setInput(this.frameworkContainer.getFramework());

+		modelSpaceViewer.setInput(FrameworkManager.getInstance().getFramework(

+				this.frameworkId));

+		modelSpaceViewer.setSorter(new ViatraTreeviewSorter());

+		modelSpaceViewer.setComparer(new IElementComparer() {

+			public boolean equals(Object a, Object b) {

+				if (a == null && b == null)

+					return true;

+				if (a == null || b == null)

+					return false;

+				if (a instanceof IModelElement && b instanceof IModelElement)

+					return a.equals(b);

+				// if (a instanceof ViatraRootProvider && b instanceof

+				// ViatraRootProvider)

+				// return (a == b);

+				return false;

+			}

+

+			public int hashCode(Object element) {

+				return element == null ? 0 : element.hashCode();

+			}

+		});

+

+		modelSpaceViewer.addDoubleClickListener(new IDoubleClickListener(){

+			public void doubleClick(DoubleClickEvent event) 

+			{

+				buttonPressed(2);

+			}

+		});

+		

+		context = initDataBindings();

+

+		return composite;

+	}

+

+	@Override
+	protected void buttonPressed(int buttonId) {
+		switch (buttonId) {
+		case 0: 
+			TransformationRunner.addRunDialogEntry(frameworkId,valuetext.getText());
+			break;
+		case 2:
+			// use model element selection

+			valuetext.setText(valuetext.getText()

+					+ (this.valuetext.getText().length()>0?"; ":"")

+					+ ((IStructuredSelection) modelSpaceViewer.getSelection())

+							.getFirstElement().toString());
+			break;
+		}

+		super.buttonPressed(buttonId);

+	}
+	

+	@Override
+	public boolean close() {
+		defuseDataBindings();
+		return super.close();
+	}
+	

+//	public String getData() {

+//		return value;

+//	}

+

+	protected DataBindingContext initDataBindings() {

+		IObservableValue value = SWTObservables.observeText(this.valuetext,

+				SWT.Modify);

+		DataBindingContext bindingContext = new DataBindingContext();

+		bindingContext.bindValue(value, parameters, new UpdateValueStrategy()

+				.setAfterConvertValidator(new ParameterValidator()), null);

+

+		final AggregateValidationStatus aggregateValidationStatus = new AggregateValidationStatus(

+				bindingContext.getBindings(),

+				AggregateValidationStatus.MAX_SEVERITY);

+		this.aggregateValidationStatus = aggregateValidationStatus;

+
+		this.listener = new IChangeListener() {

+			public void handleChange(ChangeEvent event) {

+				Object value = aggregateValidationStatus.getValue();

+				if (value instanceof IStatus) {

+					IStatus status = (IStatus) value;

+					if (status.getSeverity() == IStatus.INFO) {

+						// enable pressing run

+						runButton.setEnabled(true);

+						valuetext.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));

+						errorMessageLabel.setText("The number of parameters is correct.");

+						errorMessageLabel.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_DARK_GREEN));

+

+					} else {

+						// disable running

+						runButton.setEnabled(false);

+						valuetext.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_RED));

+						errorMessageLabel.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_RED));

+						errorMessageLabel.setText(status.getMessage());

+					}

+				}

+			}

+		};
+		
+		aggregateValidationStatus.addChangeListener(this.listener);

+		return bindingContext;

+	}

+
+	void defuseDataBindings() {
+		aggregateValidationStatus.removeChangeListener(this.listener);
+	}
+	

+	protected class ParameterValidator implements IValidator {

+		public IStatus validate(Object value) {

+			boolean isValid = false;

+

+			StringTokenizer st = new StringTokenizer((String) value, " ,;");

+			isValid = (st.countTokens() == params.length);

+			if (isValid) {

+				// perform parsing

+				parsed_params = new String[params.length];

+				int i = 0;

+				while (st.hasMoreTokens())

+					parsed_params[i++] = st.nextToken();

+			}

+			return isValid ? ValidationStatus.info("") : ValidationStatus

+					.error("Read " + st.countTokens() + " parameters, but expected " + params.length+".");

+		}

+	}

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/loaders/XMIModuleLoader.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/loaders/XMIModuleLoader.java
new file mode 100644
index 0000000..66d63d6
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/loaders/XMIModuleLoader.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.loaders;

+

+import java.io.IOException;
+import java.io.InputStream;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module;
+import org.eclipse.viatra2.loaders.Loader;
+import org.eclipse.viatra2.loaders.Loader2;
+

+public class XMIModuleLoader implements Loader2 {

+

+	public Object process(InputStream f, IFramework fw)	throws VPMRuntimeException

+	{
+		throw new VPMRuntimeException("The XMI Module Loader does not support loading from an InputStream.");

+		// return null;

+	}

+

+	public Object processFile(String fileName, IFramework fw) throws VPMRuntimeException

+	{

+		return processURI(URI.createFileURI(fileName).toString(), fw);

+	}
+
+	@Override
+	public Object processURI(String _URI, IFramework fw)
+			throws VPMRuntimeException {
+		ResourceSet rs = new ResourceSetImpl();
+		rs.getPackageRegistry().put(CorePackage.eNS_URI, CorePackage.eINSTANCE);
+		Resource res = rs.getResource(URI.createURI( _URI ), true);
+		try {
+			res.load(null);
+		} catch (IOException e) {
+			throw new VPMRuntimeException("XMI module load error");
+		}
+		if (res.getContents().get(0) instanceof Module)
+		{
+			Module _m = (Module)res.getContents().get(0);
+			Machine m = _m.getMachine().get(0);
+			try {
+				fw.addMachine(m.getFqn(), m);
+				return m;
+			} catch (Exception e) {
+				// should never happen
+				throw new VPMRuntimeException(e.getMessage());
+			}
+		}
+		return null;
+	}

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/loaders/XMITransformationLoader.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/loaders/XMITransformationLoader.java
new file mode 100644
index 0000000..47da995
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/loaders/XMITransformationLoader.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.loaders;

+

+import java.io.IOException;
+import java.io.InputStream;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CorePackage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Transformation;
+import org.eclipse.viatra2.loaders.Loader;
+

+public class XMITransformationLoader implements Loader {

+

+	public Object process(InputStream f, IFramework fw)	throws VPMRuntimeException

+	{
+		throw new VPMRuntimeException("The XMI loader does not support loading from an InputStream.");

+		// return null;

+	}

+

+	public Object processFile(String fileName, IFramework fw) throws VPMRuntimeException

+	{

+		ResourceSet rs = new ResourceSetImpl();

+		rs.getPackageRegistry().put(CorePackage.eNS_URI, CorePackage.eINSTANCE);

+		Resource res = rs.getResource(URI.createFileURI(fileName), true);

+		try {

+			res.load(null);

+		} catch (IOException e) {

+			throw new VPMRuntimeException("XMI transformation load error");

+		}

+		if (res.getContents().get(0) instanceof Transformation)

+		{

+			Transformation t = (Transformation)res.getContents().get(0);

+			try {

+				for (Object _mod : t.getModules())

+				{

+					Machine m = ((Module)_mod).getMachine().get(0);

+					fw.addMachine(m.getFqn(), m);
+					return m;

+				}

+

+			} catch (Exception e) {

+				// should never happen

+				throw new VPMRuntimeException(e.getMessage());

+			}

+		}
+		return null;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/preferences/VIATRAPreferencePage.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/preferences/VIATRAPreferencePage.java
new file mode 100644
index 0000000..807e077
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/preferences/VIATRAPreferencePage.java
@@ -0,0 +1,307 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.preferences;

+

+import java.io.IOException;
+
+import org.eclipse.core.runtime.Preferences;
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.IPersistentPreferenceStore;
+import org.eclipse.jface.preference.IntegerFieldEditor;
+import org.eclipse.jface.preference.PathEditor;
+import org.eclipse.jface.preference.StringFieldEditor;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.viatra2.ViatraPlugin;
+import org.eclipse.viatra2.framework.properties.IViatraPropertyProvider;
+import org.eclipse.viatra2.framework.properties.VIATRAPreferences;
+

+@SuppressWarnings("deprecation")
+public class VIATRAPreferencePage extends FieldEditorPreferencePage implements

+		IWorkbenchPreferencePage {

+

+	public VIATRAPreferencePage()

+	{

+		super(GRID);

+//		setPreferenceStore(ViatraPlugin.getDefault().getPreferenceStore());
+		setPreferenceStore(new TrickPreferenceStore());

+		setDescription("Changes will be applied for newly loaded VPML files.");

+		setMessage("VIATRA2 Framework");

+		//initPrefs();

+	}

+

+
+	/**
+	 * 
+	 * @author istvan rath
+	 *
+	 */
+	public class TrickPreferenceStore implements IPersistentPreferenceStore
+	{
+
+		Preferences ViatraPluginPrefs;
+
+		public TrickPreferenceStore() {
+			ViatraPluginPrefs = ViatraPlugin.getDefault().getPluginPreferences();
+		}
+
+
+		public void addPropertyChangeListener(IPropertyChangeListener listener) {
+			ViatraPluginPrefs.addPropertyChangeListener((Preferences.IPropertyChangeListener)listener);
+		}
+
+		public void removePropertyChangeListener(
+				IPropertyChangeListener listener) {
+			ViatraPluginPrefs.removePropertyChangeListener((Preferences.IPropertyChangeListener)listener);
+
+		}
+
+		public boolean contains(String name) {
+			return ViatraPluginPrefs.contains(name);
+		}
+
+		public void firePropertyChangeEvent(String name, Object oldValue,
+				Object newValue) {
+		}
+
+		public boolean getBoolean(String name) {
+			return ViatraPluginPrefs.getBoolean(name);
+		}
+
+		public boolean getDefaultBoolean(String name) {
+			return ViatraPluginPrefs.getDefaultBoolean(name);
+		}
+
+		public double getDefaultDouble(String name) {
+			return ViatraPluginPrefs.getDefaultDouble(name);
+		}
+
+		public float getDefaultFloat(String name) {
+			return ViatraPluginPrefs.getDefaultFloat(name);
+		}
+
+		public int getDefaultInt(String name) {
+			return ViatraPluginPrefs.getDefaultInt(name);
+		}
+
+		public long getDefaultLong(String name) {
+			return ViatraPluginPrefs.getDefaultLong(name);
+		}
+
+		public String getDefaultString(String name) {
+			return ViatraPluginPrefs.getDefaultString(name);
+		}
+
+		public double getDouble(String name) {
+			return ViatraPluginPrefs.getDouble(name);
+		}
+
+		public float getFloat(String name) {
+			return ViatraPluginPrefs.getFloat(name);
+		}
+
+		public int getInt(String name) {
+			return ViatraPluginPrefs.getInt(name);
+		}
+
+		public long getLong(String name) {
+			return ViatraPluginPrefs.getLong(name);
+		}
+
+		public String getString(String name) {
+			return ViatraPluginPrefs.getString(name);
+		}
+
+		public boolean isDefault(String name) {
+			return ViatraPluginPrefs.isDefault(name);
+		}
+
+		public boolean needsSaving() {
+			return ViatraPluginPrefs.needsSaving();
+		}
+
+		public void putValue(String name, String value) {
+			ViatraPluginPrefs.setValue(name, value);
+
+		}
+
+		public void setDefault(String name, double value) {
+			ViatraPluginPrefs.setDefault(name, value);
+
+		}
+
+		public void setDefault(String name, float value) {
+			ViatraPluginPrefs.setDefault(name, value);
+		}
+
+		public void setDefault(String name, int value) {
+			ViatraPluginPrefs.setDefault(name, value);
+
+		}
+
+		public void setDefault(String name, long value) {
+			ViatraPluginPrefs.setDefault(name, value);
+
+		}
+
+		public void setDefault(String name, String defaultObject) {
+			ViatraPluginPrefs.setDefault(name, defaultObject);
+		}
+
+		public void setDefault(String name, boolean value) {
+			ViatraPluginPrefs.setDefault(name, value);
+
+		}
+
+		public void setToDefault(String name) {
+			ViatraPluginPrefs.setToDefault(name);
+
+		}
+
+		public void setValue(String name, double value) {
+			ViatraPluginPrefs.setValue(name, value);
+
+		}
+
+		public void setValue(String name, float value) {
+			ViatraPluginPrefs.setValue(name, value);
+
+		}
+
+		public void setValue(String name, int value) {
+			ViatraPluginPrefs.setValue(name, value);
+
+		}
+
+		public void setValue(String name, long value) {
+			ViatraPluginPrefs.setValue(name, value);
+
+		}
+
+		public void setValue(String name, String value) {
+			ViatraPluginPrefs.setValue(name, value);
+
+		}
+
+		public void setValue(String name, boolean value) {
+			ViatraPluginPrefs.setValue(name, value);
+
+		}
+
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.preference.IPersistentPreferenceStore#save()
+		 */
+		@Override
+		public void save() throws IOException {
+			ViatraPlugin.getDefault().savePluginPreferences();
+		}
+
+	}
+

+

+	@Override

+	protected void createFieldEditors() {

+		addField(

+				new BooleanFieldEditor(

+				VIATRAPreferences.DISABLE_VPML_OVERRIDE,

+				"&Disable override by custom preferences in VPML files",

+				getFieldEditorParent()

+				)

+		);

+

+		// add contributed field editors

+		for (IViatraPropertyProvider p : ViatraPlugin.getDefault().getPropertyProviders())

+		{

+			Label l = new Label(getFieldEditorParent(),SWT.BOLD);

+			l.setText(p.getProviderID());

+			l.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_BLUE));

+			//l.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));

+

+

+			Label sep = new Label(getFieldEditorParent(), SWT.NONE);//SWT.HORIZONTAL|SWT.SEPARATOR);

+			sep.setText("");

+			sep.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_BLUE));

+			//sep.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));

+

+

+			for (String prop_id : p.getAllPropertyIds())

+			{

+				switch (p.getPropertyKind(prop_id))

+				{

+				case STRING:

+					addField(

+							new StringFieldEditor(

+									p.getProviderID()+"::"+prop_id,

+									prop_id,

+									getFieldEditorParent()

+									)

+							);

+					break;

+				case INTEGER:

+					addField(

+							new IntegerFieldEditor(

+									p.getProviderID()+"::"+prop_id,

+									prop_id,

+									getFieldEditorParent()

+									)

+							);

+					break;

+				case BOOLEAN:

+					addField(

+							new BooleanFieldEditor(

+									p.getProviderID()+"::"+prop_id,

+									"&"+prop_id,

+									getFieldEditorParent()

+									)

+							);

+					break;

+				case PATH:

+					addField(

+							new PathEditor(

+									p.getProviderID()+"::"+prop_id,

+									prop_id,

+									"Choose path",

+									getFieldEditorParent()

+									)

+							);

+					break;

+				}

+			}

+

+			// just to ensure there is enough distance to the next category

+			Label placeHolder0 = new Label(getFieldEditorParent(),SWT.BOLD);

+			placeHolder0.setText("\n\n");

+			Label placeHolder1 = new Label(getFieldEditorParent(), SWT.NONE);//SWT.HORIZONTAL|SWT.SEPARATOR);

+			placeHolder1.setText("\n\n");

+

+

+		}

+		// just to ensure there is enough distance to the next category

+		Label placeHolder0 = new Label(getFieldEditorParent(),SWT.BOLD);

+		placeHolder0.setText("\n\n");

+		Label placeHolder1 = new Label(getFieldEditorParent(), SWT.NONE);//SWT.HORIZONTAL|SWT.SEPARATOR);

+		placeHolder1.setText("\n\n");

+	}

+

+

+	public void init(IWorkbench workbench)

+	{

+

+	}

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/property/FrameworkGUIPPropertySourceProvider.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/property/FrameworkGUIPPropertySourceProvider.java
new file mode 100644
index 0000000..c974031
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/property/FrameworkGUIPPropertySourceProvider.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.property;

+

+import org.eclipse.ui.views.properties.IPropertySource;
+import org.eclipse.ui.views.properties.IPropertySourceProvider;
+import org.eclipse.viatra2.frameworkgui.content.FrameworkContainer;
+import org.eclipse.viatra2.frameworkgui.content.ITreeObject;
+

+public class FrameworkGUIPPropertySourceProvider implements

+		IPropertySourceProvider {

+

+	

+	String iProviderID;

+	

+	public FrameworkGUIPPropertySourceProvider(String providerID)

+	{

+		iProviderID = providerID;

+	}

+	

+	

+	public IPropertySource getPropertySource(Object object) {

+		if (object instanceof FrameworkContainer)

+		{

+			return new FrameworkGUIPropertySource( ((FrameworkContainer)object).getFramework(), iProviderID);

+		}

+		else if (object instanceof ITreeObject) 

+		{

+			return ((ITreeObject)object).getPropertySource();

+		}

+		return null;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/property/FrameworkGUIPropertySource.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/property/FrameworkGUIPropertySource.java
new file mode 100644
index 0000000..8218fd9
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/property/FrameworkGUIPropertySource.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.property;

+

+

+import java.util.ArrayList;
+import java.util.Set;
+
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource2;
+import org.eclipse.ui.views.properties.TextPropertyDescriptor;
+import org.eclipse.viatra2.framework.IFramework;
+

+public class FrameworkGUIPropertySource implements IPropertySource2 {

+

+	private IFramework iViatraFramework;

+

+	private String iProviderID;

+

+	public FrameworkGUIPropertySource(IFramework fw, String providerid) {

+		super();

+		iViatraFramework = fw;

+		iProviderID = providerid;

+	}

+

+	public boolean isPropertyResettable(Object id) {

+		return false;

+	}

+

+	public boolean isPropertySet(Object id) {

+		if (iViatraFramework != null) {

+			return iViatraFramework.getProperties().isRuntimePropertySet(iProviderID, id.toString());

+		}

+		return false;

+	}

+

+	public Object getEditableValue() {

+		if (iViatraFramework != null)

+			return iViatraFramework.getId();

+		return null;

+	}

+

+	public IPropertyDescriptor[] getPropertyDescriptors() {

+		if (iViatraFramework != null) {

+			ArrayList<TextPropertyDescriptor> a = new ArrayList<TextPropertyDescriptor>();

+			Set<String> props = iViatraFramework.getProperties().getAllRuntimePropertyIDs(iProviderID);

+			for (Object n : props.toArray())

+			{

+				a.add(new TextPropertyDescriptor(n, n.toString()));

+			}

+			IPropertyDescriptor[] a2 = new IPropertyDescriptor[a.size()];

+			for (int i = 0; i < a.size(); a2[i] = a.get(i++));

+			return a2;

+		}

+		return null;

+	}

+

+	public Object getPropertyValue(Object id) {

+		if (iViatraFramework != null)

+			return iViatraFramework.getProperties().getRuntimeProperty(iProviderID, (String) id);

+		return null;

+	}

+

+	public void resetPropertyValue(Object id) {

+		// TODO Istvan Rath implement this.

+	}

+

+	public void setPropertyValue(Object id, Object value) {

+		if (iViatraFramework != null)

+			iViatraFramework.getProperties().setRuntimeProperty(iProviderID, (String) id, (String) value);

+	}

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/property/MultiPropertySheetPage.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/property/MultiPropertySheetPage.java
new file mode 100644
index 0000000..843045c
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/property/MultiPropertySheetPage.java
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.property;

+

+import java.util.Vector;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.eclipse.ui.views.properties.IPropertySourceProvider;
+import org.eclipse.ui.views.properties.PropertySheetPage;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.content.FrameworkContainer;
+import org.eclipse.viatra2.frameworkgui.content.ITreeObject;
+

+public class MultiPropertySheetPage implements IPropertySheetPage {

+

+	private TabFolder tabFolder;

+

+	

+	private Vector<PropertySheetPage> pages;

+	

+	private PropertySheetPage singlePage;

+	

+	/**

+	 * Points to the selected Viatra framework.

+	 */

+	private IFramework viatraFramework;

+	

+	public MultiPropertySheetPage(IWorkbenchPart part)

+	{

+		pages = new Vector<PropertySheetPage>();

+		//singlePage = new PropertySheetPage();

+		selectionChanged(part,part.getSite().getSelectionProvider().getSelection());		

+	}

+	

+	public void createControl(Composite parent) {

+		tabFolder = new TabFolder(parent,SWT.BOTTOM);

+		initTabs();

+	}

+	

+	private void initSinglePage(ITreeObject treeObject)

+	{

+		if (viatraFramework==null)

+			return;

+		for (PropertySheetPage p : pages)

+		{

+			p.dispose(); // remove all propertysheetpages

+		}

+		for (TabItem i : tabFolder.getItems())

+		{

+			i.dispose(); // remove all tabitems

+		}

+		pages.clear();

+		

+		TabItem item = new TabItem(tabFolder,SWT.NONE);

+		singlePage = new PropertySheetPage();

+		singlePage.createControl(tabFolder);

+		//final ITreeObject _to = treeObject;

+		singlePage.setPropertySourceProvider(new IPropertySourceProvider(){

+

+			public IPropertySource getPropertySource(Object object) 

+			{

+				if (object instanceof ITreeObject) 

+				{

+					return ((ITreeObject)object).getPropertySource();

+				}

+				return null;

+			}

+			

+		});

+		item.setText(treeObject.getLabelText());

+		item.setControl(singlePage.getControl());

+	}

+	

+	private void initTabs()

+	{

+		if (viatraFramework==null)

+			return;

+		for (PropertySheetPage p : pages)

+		{

+			p.dispose(); // remove all propertysheetpages

+		}

+		for (TabItem i : tabFolder.getItems())

+		{

+			i.dispose(); // remove all tabitems

+		}

+		pages.clear();

+		for (String provID : viatraFramework.getProperties().getAllProviderIDs())

+		{

+			if (!viatraFramework.getProperties().isProviderActive(provID))

+				continue; // FIXME remove me for all prop. prov. display

+			TabItem item = new TabItem(tabFolder,SWT.NONE);

+			PropertySheetPage page = new PropertySheetPage();

+			page.createControl(tabFolder);

+			page.setPropertySourceProvider(new FrameworkGUIPPropertySourceProvider(provID));

+			pages.add(page);

+			item.setText(provID);

+			item.setControl(page.getControl());

+		}

+	}

+/*

+ * TODO 

+ * 3. uj property felvetele dinamikusan? + notification?

+ *    

+ */

+	

+	

+	public void dispose() {

+		tabFolder.dispose();

+	}

+

+	public Control getControl() {

+		return tabFolder;

+	}

+

+	public void setActionBars(IActionBars actionBars) {

+		

+	}

+

+	public void setFocus() {

+		

+	}

+

+	public void selectionChanged(IWorkbenchPart part, ISelection selection) {

+		if (selection instanceof IStructuredSelection)

+		{

+			IStructuredSelection _s = (IStructuredSelection)selection;

+			if (_s.getFirstElement() instanceof FrameworkContainer)

+			{

+				viatraFramework = ((FrameworkContainer)_s.getFirstElement()).getFramework();

+				if (tabFolder != null)

+				{

+					initTabs();

+					for (PropertySheetPage p : pages)

+					{

+						p.selectionChanged(part,selection);

+					}

+				}

+			}

+			else if (_s.getFirstElement() instanceof ITreeObject)

+			{

+				ITreeObject to = (ITreeObject) _s.getFirstElement();

+				viatraFramework = to.getFrameworkContainer().getFramework();

+				if (tabFolder!=null && to.getPropertySource()!=null)

+				{

+					initSinglePage(to);

+					singlePage.selectionChanged(part, selection);

+				}

+			}

+		}

+	}

+

+

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/runner/TransformationRunner.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/runner/TransformationRunner.java
new file mode 100644
index 0000000..fca14ef
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/runner/TransformationRunner.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.runner;

+

+import java.util.HashMap;
+import java.util.TreeMap;
+import java.util.Vector;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.viatra2.framework.FrameworkException;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.dialogs.ValidatingRunnerInputDialog;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.xform.TransformationExecutionHelper;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+
+/**
+ * Helper class to facilitate the execution of VIATRA transformations
+ * from the GUI.
+ * @author istvan rath
+ *
+ */

+public class TransformationRunner 

+{

+	/**
+	 * Cache to store run history.
+	 */

+	private static HashMap<String, Vector<String>> runDialogEntries 

+									= new HashMap<String, Vector<String>>();

+	

+	public static void addRunDialogEntry(String frameworkId, String entry)

+	{

+		Vector<String> target = runDialogEntries.get(frameworkId);

+		if (target==null)

+		{

+			target = new Vector<String>();

+		}

+		if (!target.contains(entry))

+			target.add(entry);

+		runDialogEntries.put(frameworkId, target);

+	}

+	

+	public static Object[] getRunDialogEntries(String frameworkId)

+	{
+		Vector<String> r = runDialogEntries.get(frameworkId);
+		if (r!=null)

+			return r.toArray();
+		return null;

+	}

+	

+

+	/**
+	 * Invoked when a particular machine is to be run.
+	 * @param m
+	 * @param fw
+	 * @param shell
+	 */

+	public static void run(final Machine m, final IFramework fw, final Shell shell)

+	{

+		// set-up phase

+		TreeMap<String, Object> params_map = new TreeMap<String, Object>();

+		try

+		{

+			if (fw.isRunnable(m))

+			{

+				String[] params = fw.getEntrypointParameters(m);

+				if (params.length > 0) 

+				{

+					// there are parameters

+					String s_params = "";

+					for (String param : params) s_params += param+", ";

+					s_params = s_params.substring(0,s_params.length()-2); // assemble information string 

+				
+					ValidatingRunnerInputDialog dialog = new ValidatingRunnerInputDialog(

+							shell, 

+							fw.getId(),

+							"Set run parameters",

+							"Enter the desired values for run parameters: "

+									+ s_params, "", params);

+					if (dialog.open() == 0) 

+					{

+						for (int i = 0; i < params.length; i++) 

+						{

+							String val = dialog.parsed_params[i];

+							params_map.put(params[i], TransformationExecutionHelper.convertToPassableType(val));

+						}

+						//TransformationRunner.addRunDialogEntry(fw.getId(),dialog.getData()); <-- moved to Dialog class.

+					}

+					else

+					{

+						// user pressed cancel

+						return;

+					}

+					

+				}

+			}

+		}

+		catch (FrameworkException fwe)

+		{

+			MessageDialog.openInformation(shell, "VIATRA2 R3", fwe.getMessage());

+			return;

+		}

+		// set-up phase complete

+		TransformationExecutionHelper.runMachine(fw, m, params_map, false);

+	}

+	

+	

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/FrameworkDropTargetAdapter.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/FrameworkDropTargetAdapter.java
new file mode 100644
index 0000000..5b1a6d3
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/FrameworkDropTargetAdapter.java
@@ -0,0 +1,296 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DropTargetAdapter;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.swt.dnd.FileTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.ui.dialogs.ListDialog;
+import org.eclipse.viatra2.framework.FrameworkManager;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.FrameworkGUIPlugin;
+import org.eclipse.viatra2.frameworkgui.content.FrameworkContainer;
+
+/**
+ * 
+ * @author Istvan Rath
+ */
+public class FrameworkDropTargetAdapter extends DropTargetAdapter {
+
+	private FrameworkTreeView iFT;
+
+	static FileTransfer transfer = FileTransfer.getInstance();
+
+	public FrameworkDropTargetAdapter(FrameworkTreeView part) {
+		super();
+		iFT = part;
+	}
+
+	public static Transfer[] getTransfers() {
+		Transfer[] transfers = new Transfer[1];
+		transfers[0] = transfer;
+		return transfers;
+	}
+
+	public void drop(DropTargetEvent event) {
+		final String[] filenames = (String[]) event.data;
+		if (event.item != null) {
+			// if we're being dropped on an existing item in the tree
+			Object target = event.item.getData();
+			if (target != null && target instanceof FrameworkContainer) {
+				for (int i = 0; i < filenames.length; i++) {
+					final IFramework fw = ((FrameworkContainer) target)
+							.getFramework();
+					String extension = filenames[i].substring(filenames[i]
+							.lastIndexOf(".") + 1);
+					final int _i = i;
+					IRunnableWithProgress targetRunnable = null;
+
+					// merge

+					final IRunnableWithProgress runnable_merge = new IRunnableWithProgress() {
+
+						public void run(IProgressMonitor monitor)
+								throws InvocationTargetException,
+								InterruptedException {
+							try {
+								monitor.beginTask(
+										"VPM merge: " + filenames[_i], 2);
+								fw.mergeFile(filenames[_i]);
+								monitor.done();
+							} catch (Exception e) {
+								throw new InvocationTargetException(e);
+							}
+						}
+					};
+
+					// machine load

+					// compute target loader first

+					String loaderID = "";
+
+					final Set<String> loaders = fw
+							.getLoadersForExtension(extension);
+					if (loaders.size() > 1) {
+						ListDialog dialog = new ListDialog(iFT.getSite()
+								.getShell());
+						dialog.setTitle("Select loader to use for "
+								+ filenames[i]);
+						dialog.setAddCancelButton(true);
+						dialog.setBlockOnOpen(true);
+						dialog.setLabelProvider(new LabelProvider());
+						dialog
+								.setContentProvider(new IStructuredContentProvider() {
+									public Object[] getElements(
+											Object inputElement) {
+										return loaders.toArray();
+									}
+
+									public void dispose() {
+									}
+
+									public void inputChanged(Viewer viewer,
+											Object oldInput, Object newInput) {
+									}
+								});
+						dialog.setInput("blablabla");
+						int result = dialog.open();
+						if (result == ListDialog.OK) {
+							Object[] o = dialog.getResult();
+							if (o != null && o.length > 0) {
+								loaderID = o[0].toString();
+							}
+						}
+					} else if (loaders.size() == 1) {
+						loaderID = loaders.iterator().next().toString();
+					}
+
+					final String _loaderID = loaderID;
+					IRunnableWithProgress runnable_load = new IRunnableWithProgress() {
+
+						public void run(IProgressMonitor monitor)
+								throws InvocationTargetException,
+								InterruptedException {
+							try {
+								monitor.beginTask("Machine load: "
+										+ filenames[_i], 2);
+								Long c = System.currentTimeMillis();
+								fw.loadMachine(filenames[_i], _loaderID);
+								Long c2 = System.currentTimeMillis();
+								fw.getLogger().info(
+										"Machine loading using '" + _loaderID
+												+ "' lasted for "
+												+ (new Long(c2 - c)).toString()
+												+ " ms");
+								monitor.done();
+							} catch (Exception e) {
+								fw.getLogger().fatal(e.getMessage());
+								e.printStackTrace();
+								throw new InvocationTargetException(e);
+							}
+						}
+					};
+
+					// try importers

+					String importerID = "";
+
+					final Set<String> importers = fw
+							.getNativeImportersForExtension(extension);
+					if (importers.size() > 1) {
+						ListDialog dialog = new ListDialog(iFT.getSite()
+								.getShell());
+						dialog.setTitle("Select native importer to use for "
+								+ filenames[i]);
+						dialog.setAddCancelButton(true);
+						dialog.setBlockOnOpen(true);
+						dialog.setLabelProvider(new LabelProvider());
+						dialog
+								.setContentProvider(new IStructuredContentProvider() {
+									public Object[] getElements(
+											Object inputElement) {
+										return importers.toArray();
+									}
+
+									public void dispose() {
+									}
+
+									public void inputChanged(Viewer viewer,
+											Object oldInput, Object newInput) {
+									}
+								});
+						dialog.setInput("blablabla");
+						int result = dialog.open();
+						if (result == ListDialog.OK) {
+							Object[] o = dialog.getResult();
+							if (o != null && o.length > 0) {
+								importerID = o[0].toString();
+							}
+						}
+					} else if (importers.size() == 1) {
+						importerID = importers.iterator().next().toString();
+					}
+
+					final String _importerID = importerID;
+					final IRunnableWithProgress runnable_import = new IRunnableWithProgress() {
+
+						public void run(IProgressMonitor monitor)
+								throws InvocationTargetException,
+								InterruptedException {
+							try {
+								monitor.beginTask("Native import: "
+										+ filenames[_i], 2);
+								Long c = System.currentTimeMillis();
+								fw.nativeImport(filenames[_i], _importerID);
+								Long c2 = System.currentTimeMillis();
+								fw.getLogger().info(
+										"Native import using '" + _importerID
+												+ "' lasted for "
+												+ (new Long(c2 - c)).toString()
+												+ " ms");
+								monitor.done();
+							} catch (Exception e) {
+								throw new InvocationTargetException(e);
+							}
+						}
+					};
+
+					if (extension.equalsIgnoreCase("vpml")) {
+						targetRunnable = runnable_merge;
+					} else if (loaderID.length() > 0) {
+						targetRunnable = runnable_load;
+					} else if (importerID.length() > 0) {
+						targetRunnable = runnable_import;
+					}
+
+					FrameworkGUIPlugin.runAsLongTransaction(targetRunnable,
+							"Drag-and-drop operation", fw);
+
+				}
+			}
+		}
+		else {
+			// dropped over emptiness
+			// System.out.println("empty");
+			// if element is VPML, create new modelspace
+			for (int i = 0; i < filenames.length; i++) {
+				String extension = filenames[i].substring(filenames[i].lastIndexOf(".") + 1);
+		
+				if ("vpml".equalsIgnoreCase(extension)) {
+					final int _i = i;
+					// initialize
+					final IRunnableWithProgress runnable_init = new IRunnableWithProgress() {
+	
+						public void run(IProgressMonitor monitor)
+								throws InvocationTargetException,
+								InterruptedException {
+							try {
+								monitor.beginTask("Modelspace load: " + filenames[_i], 2);
+								FrameworkManager.getInstance().createFramework(filenames[_i]);
+								monitor.done();
+							} catch (Exception e) {
+								throw new InvocationTargetException(e);
+							}
+						}
+					};
+					FrameworkGUIPlugin.runAsLongTransaction(runnable_init,
+							"Drag-and-drop operation", null);	
+				}
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.eclipse.swt.dnd.DropTargetAdapter#dragEnter(org.eclipse.swt.dnd.
+	 * DropTargetEvent)
+	 */
+	@Override
+	public void dragEnter(DropTargetEvent event) {
+		dragOver(event);
+	}
+
+	public void dragOver(DropTargetEvent event) {
+
+		if (event.item!=null && event.item.getData() instanceof FrameworkContainer) {
+			event.detail = DND.DROP_COPY;
+		}
+		else if (event.item == null) { // && event.data instanceof String[]) {
+			event.detail = DND.DROP_COPY;
+		}
+		else {
+			event.detail = DND.DROP_NONE;
+		}
+		event.feedback = DND.FEEDBACK_SELECT | DND.FEEDBACK_SCROLL;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.swt.dnd.DropTargetAdapter#dragOperationChanged(org.eclipse
+	 * .swt.dnd.DropTargetEvent)
+	 */
+	@Override
+	public void dragOperationChanged(DropTargetEvent event) {
+		dragOver(event);
+	}
+
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/FrameworkTreeView.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/FrameworkTreeView.java
new file mode 100644
index 0000000..599886d
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/FrameworkTreeView.java
@@ -0,0 +1,262 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.views;

+

+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.AbstractTreeViewer;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.part.DrillDownAdapter;
+import org.eclipse.ui.part.ViewPart;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.viatra2.framework.FrameworkManager;
+import org.eclipse.viatra2.frameworkgui.FrameworkGUIPlugin;
+import org.eclipse.viatra2.frameworkgui.actions.DisposeFrameworkAction;
+import org.eclipse.viatra2.frameworkgui.content.FrameworkViewContentProvider;
+import org.eclipse.viatra2.frameworkgui.content.FrameworkViewLabelProvider;
+import org.eclipse.viatra2.frameworkgui.content.ITreeObject;
+import org.eclipse.viatra2.frameworkgui.content.NameSorter;
+import org.eclipse.viatra2.frameworkgui.property.MultiPropertySheetPage;
+

+/**

+ * A treeview-based GUI for accessing Viatra Framework-specific functionality.

+ * 

+ * @author Istvan Rath

+ */

+

+public class FrameworkTreeView extends ViewPart implements ISelectionListener

+{

+	

+	private TreeViewer viewer;

+

+	private DrillDownAdapter drillDownAdapter;

+

+	private DisposeFrameworkAction deleteAction;

+

+	private Action refreshAction;

+

+	private Action doubleClickAction;

+

+	private FrameworkManager iFrameworkManager;

+

+	public FrameworkManager getFrameWorkManager() {

+		return iFrameworkManager;

+	}

+

+//	private Object refreshParameter;

+	

+	public void refreshViewer(final Object o) 

+	{

+//		refreshParameter = o;

+		Display.getDefault().syncExec(new Runnable(){

+

+			public void run() {

+				if (!viewer.getTree().isDisposed())

+				{

+				if (o == null)

+					viewer.refresh();

+				else

+				{

+					viewer.refresh(o, true);

+					viewer.expandToLevel(o, AbstractTreeViewer.ALL_LEVELS);

+				}

+				}

+			}

+			

+		});

+	}

+	

+	/**

+	 * The constructor.

+	 */

+	public FrameworkTreeView() {

+	}

+

+	/**

+	 * This is a callback that will allow us to create the viewer and initialize

+	 * it.

+	 */

+	public void createPartControl(Composite parent) {

+		iFrameworkManager = FrameworkManager.getInstance();

+		viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);

+		drillDownAdapter = new DrillDownAdapter(viewer);

+		viewer.setContentProvider(new FrameworkViewContentProvider(this));

+		viewer.setLabelProvider(new FrameworkViewLabelProvider());

+		viewer.setSorter(new NameSorter());

+		viewer.setInput(getViewSite());

+		getSite().setSelectionProvider(viewer);

+		getSite().getWorkbenchWindow().getSelectionService()

+				.addSelectionListener(this);

+		viewer.addDropSupport(org.eclipse.swt.dnd.DND.DROP_COPY

+				| org.eclipse.swt.dnd.DND.DROP_MOVE, FrameworkDropTargetAdapter

+				.getTransfers(), new FrameworkDropTargetAdapter(this));

+		makeStaticActions();

+		hookContextMenu();

+		hookDoubleClickAction();

+		contributeToActionBars();

+	}

+

+	private void hookContextMenu() {

+		MenuManager menuMgr = new MenuManager("#PopupMenu");

+		menuMgr.setRemoveAllWhenShown(true);

+		menuMgr.addMenuListener(new IMenuListener() {

+			public void menuAboutToShow(IMenuManager manager) {

+				FrameworkTreeView.this.fillContextMenu(manager);

+			}

+		});

+		Menu menu = menuMgr.createContextMenu(viewer.getControl());

+		viewer.getControl().setMenu(menu);

+		getSite().registerContextMenu(menuMgr, viewer);

+	}

+

+	public void updateLocalToolBar() {

+		getViewSite().getActionBars().getToolBarManager().update(true);

+	}

+

+	private void contributeToActionBars() {

+		IActionBars bars = getViewSite().getActionBars();

+		fillLocalPullDown(bars.getMenuManager());

+		fillLocalToolBar(bars.getToolBarManager());

+	}

+

+	private void fillLocalPullDown(IMenuManager manager) 

+	{

+		

+	}

+

+	private void fillContextMenu(IMenuManager manager) 

+	{

+		IStructuredSelection s = (IStructuredSelection)getSelection();

+		Object first = s.getFirstElement();

+		if (first instanceof ITreeObject)

+		{

+			if (((ITreeObject)first).getActions()!=null)

+			{

+				for (IAction a : ((ITreeObject)first).getActions())

+				{

+					manager.add(a);

+				}

+			}

+			//manager.add(new Separator());

+			if (((ITreeObject)first).getContributionItems()!=null)

+			{

+				for (IContributionItem i : ((ITreeObject)first).getContributionItems())

+				{

+					manager.add(i);

+				}

+			}

+		}

+		
+		
+		

+		// drillDownAdapter.addNavigationActions(manager);

+		// Other plug-ins can contribute there actions here

+		manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));

+	}

+

+	private void fillLocalToolBar(IToolBarManager manager) {

+		manager.removeAll();

+		manager.add(refreshAction);

+		manager.add(deleteAction);

+		drillDownAdapter.addNavigationActions(manager);

+	}

+

+	private void makeStaticActions() {

+		deleteAction = new DisposeFrameworkAction(this);

+		refreshAction = new Action() {

+			public void run() {

+				refreshViewer(null);

+				System.gc();

+			}

+		};

+		refreshAction.setText("Refresh");

+		refreshAction.setToolTipText("Refresh view");

+		refreshAction.setImageDescriptor(FrameworkGUIPlugin.getImageDescriptor("icons/refresh.gif"));

+		doubleClickAction = new Action() {

+			public void run() {

+				ISelection selection = viewer.getSelection();

+				Object obj = ((IStructuredSelection) selection).getFirstElement();

+				if (obj instanceof ITreeObject)

+				{

+					ITreeObject to = (ITreeObject) obj;

+					if (to.getDoubleClickAction()!=null)

+					{

+						to.getDoubleClickAction().run();

+					}

+				}

+			}

+		};

+	}

+

+	private void hookDoubleClickAction() {

+		viewer.addDoubleClickListener(new IDoubleClickListener() {

+			public void doubleClick(DoubleClickEvent event) {

+				doubleClickAction.run();

+			}

+		});

+	}

+

+	public void showMessage(String message) {

+		MessageDialog.openInformation(viewer.getControl().getShell(),

+				"VIATRA2 R3", message);

+	}

+

+	/**

+	 * Passing the focus request to the viewer's control.

+	 */

+	public void setFocus() {

+		viewer.getControl().setFocus();

+	}

+

+	public ISelection getSelection() {

+		return viewer.getSelection();

+	}

+

+

+	

+	public Object getAdapter(Class type) {

+		if (type == IPropertySheetPage.class) {

+			//PropertySheetPage page = new PropertySheetPage();

+			//page.setPropertySourceProvider(new FrameworkGUIPPropertySourceProvider());

+			//return page;

+			return new MultiPropertySheetPage(this);

+		}

+		return super.getAdapter(type);

+	}

+

+	public void selectionChanged(IWorkbenchPart part, ISelection selection) {

+		if (this.equals(getSite().getPage().getActivePart())) {

+			if (deleteAction != null)

+				deleteAction.calculateEnabled();

+		}

+	}

+	

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/code/CodeBufferView.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/code/CodeBufferView.java
new file mode 100644
index 0000000..289a371
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/code/CodeBufferView.java
@@ -0,0 +1,546 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.views.code;

+

+import java.io.IOException;
+import java.io.StringWriter;
+import java.net.URISyntaxException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.action.Action;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CTabFolder;
+import org.eclipse.swt.custom.CTabItem;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Item;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.ViewPart;
+import org.eclipse.viatra2.buffers.BufferStore;
+import org.eclipse.viatra2.buffers.IBufferStoreListener;
+import org.eclipse.viatra2.codegen.CodeOutputPlugin;
+import org.eclipse.viatra2.core.ICoreNotificationListener;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;
+import org.eclipse.viatra2.core.notification.NotificationType;
+import org.eclipse.viatra2.framework.FrameworkManager;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.framework.IFrameworkListChangedListener;
+

+/**

+ * New generation code buffer view.

+ * @author Istvan Rath

+ *

+ */

+public class CodeBufferView extends ViewPart implements IFrameworkListChangedListener

+{

+	

+	public static final String ID = "org.eclipse.viatra2.gui.codebufferview";

+	

+	/**

+	 * True, if the output is buffered (i.e. should only be refreshed on

+	 * transaction end).

+	 */

+	public boolean isBuffering = true;

+	

+	

+	protected class DummyPage 

+	implements ICoreNotificationListener,

+			   IBufferStoreListener,

+			   CodeOutputPlugin

+	{

+		

+		protected class DummyBufferPage

+		{

+			CTabItem item;

+			Text text;

+			String key;

+			

+			public DummyBufferPage(String aKey) 

+			{

+				key = aKey;

+				item = new CTabItem(internalFolder, SWT.NONE); 

+				text = new Text(internalFolder, SWT.MULTI//|SWT.H_SCROLL
+						|SWT.V_SCROLL|SWT.READ_ONLY|SWT.WRAP);

+				

+				if (System.getProperty("file.separator").equals("/"))

+				{

+					FontData fd = new FontData("Monospace", 9, SWT.NONE);

+					text.setFont(new Font(Display.getDefault(), fd));

+				}

+				else

+				{

+					FontData fd = new FontData("Courier New", 9, SWT.NONE);

+					text.setFont(new Font(Display.getDefault(), fd));

+				}

+				

+				text.setBackground(ColorFactory.getColor(255,255,255));

+				text.setForeground(ColorFactory.getColor(0, 0, 0));

+				

+				item.setText(key);

+				item.setControl(text);

+				item.setData(this);

+				internalFolder.setSelection(item);

+				

+				//refresh();

+			}

+			

+			public void refresh()

+			{

+				Display.getDefault().syncExec(new Runnable()

+				{

+					public void run()

+					{

+						try {
+							String s = ((StringWriter)
+									BufferStore.getBuffer(
+											FrameworkManager.getInstance().getFramework(frameworkId).getTopmodel(), key))
+											.getBuffer().toString();

+						text.setText(s);
+						// autoscroll to end 
+						text.setSelection(s.length()-1);

+						} catch (URISyntaxException e) 

+						{ // impossible 

+							

+						} catch (IOException e) 

+						{

+							// impossible

+						}

+					}

+				});

+			}

+		}

+		

+		

+		protected Text defaultDisplay;

+	

+		protected StringBuffer defaultBuffer;

+		

+		protected CTabItem defaultItem;

+		

+		protected CTabFolder internalFolder;

+		

+		protected Map<String, DummyBufferPage> internalPages;

+		

+		protected String frameworkId;

+		

+		protected Item externalTabItem;

+		

+		public DummyPage(String id)

+		{

+			frameworkId = id;

+			defaultBuffer = new StringBuffer();

+			internalPages = new HashMap<String, DummyBufferPage>();

+			

+			// register as code output plugin

+			IFramework fw =  FrameworkManager.getInstance().getFramework(frameworkId);

+			fw.addCodeOutListener(this);

+			

+			// register as transaction listener

+			fw.getTopmodel().getNotificationManager().addAllListener(this);

+		}

+		

+		public void disposePage()

+		{

+			// deregister as code output plugin

+			IFramework fw =  FrameworkManager.getInstance().getFramework(frameworkId);

+			if (fw!=null) {
+				fw.removeCodeOutListener(this);

+			

+			//deregister as transaction listener
+				fw.getTopmodel().getNotificationManager().removeAllListener(this);

+			}

+			// deregister as buffer store listener

+			BufferStore.removeListener(this);

+			

+			// dispose item

+			externalTabItem.dispose();

+		}

+		

+		public Control createPageControl(Composite parent)

+		{

+			// create internal tabfolder

+			internalFolder = new CTabFolder(parent, SWT.BOTTOM | SWT.FLAT);

+			internalFolder.setSimple(false);

+			

+			// create default page

+			defaultItem = new CTabItem(internalFolder,SWT.NONE);

+			defaultItem.setText("default");

+			

+			defaultDisplay = new Text(internalFolder, SWT.MULTI | SWT.V_SCROLL //| SWT.H_SCROLL 
+					| SWT.READ_ONLY | SWT.WRAP);

+			//defaultDisplay = new Text(internalFolder, SWT.MULTI | SWT.READ_ONLY);

+			if (System.getProperty("file.separator").equals("/"))

+			{

+				FontData fd = new FontData("Monospace", 9, SWT.NONE);

+				defaultDisplay.setFont(new Font(Display.getDefault(), fd));

+			}

+			else

+			{

+				FontData fd = new FontData("Courier New", 9, SWT.NONE);

+				defaultDisplay.setFont(new Font(Display.getDefault(), fd));

+			}

+

+			defaultItem.setControl(defaultDisplay);

+			defaultItem.setData(defaultDisplay);

+			

+			//defaultDisplay.setText("hello\n asd \n asdasd \n asdasdasdasd \n asdasdasdasdasd \n werwerwerwerwe \n aqweqweqweq \n qwwdsdafasd \n aqasdasdasd \n 23234234 \n asdasdasdasdas \n asdasdasdasads \n adasdasdasd \n asdasdasdasd2234234 \n");

+			defaultDisplay.setBackground(ColorFactory.getColor(255,255,255));

+			defaultDisplay.setForeground(ColorFactory.getColor(0, 0, 0));

+			

+			internalFolder.setSelection(defaultItem);

+			

+			// register buffer store listener

+			BufferStore.addListener(this);

+			

+			return internalFolder;

+		}

+

+		public void refreshContent()

+		{

+			Display.getDefault().syncExec(new Runnable()

+			{

+				public void run() 

+				{

+					defaultDisplay.setText(defaultBuffer.toString());
+					// autoscroll to end 
+					defaultDisplay.setSelection(defaultBuffer.length()-1);

+

+					for (DummyBufferPage p : internalPages.values())

+					{

+						p.refresh();

+					}

+				}	

+			});

+		}

+		

+		public void clear()

+		{

+			defaultBuffer = new StringBuffer();

+			refreshContent();

+		}

+		

+		

+		public void beginWork() 

+		{ 

+			//buffer.append("----------------\n");

+		}

+

+		public void codeOut(final String s) 

+		{

+			if (!isBuffering)

+			{

+				//refreshContent();

+				Display.getDefault().asyncExec(new Runnable(){

+

+					public void run() {

+						defaultDisplay.append(s);

+						

+						// refresh buffers

+						for (DummyBufferPage p : internalPages.values())

+						{

+							p.refresh();

+						}

+					}

+					

+				});

+				//display.append(s);

+			}

+			else

+			{

+				defaultBuffer.append(s);

+			}

+		}

+

+		public void endWork() {	}

+

+		public void init(IFramework fw) 

+		{

+			fw.getLogger().info("Textual Output View buffer for framework "+frameworkId+" initialized.");

+		}

+		

+		public void actionPerformed(ICoreNotificationObject notification) 

+		{

+			if (!isBuffering) return;

+			NotificationType type = notification.getActionTypeEnum();

+			if (type.equals(NotificationType.TA_TRANSACTION_END))

+			{

+				refreshContent();

+			}

+		}

+

+		public int getListenerCategory() { return 0; }

+

+		public void bufferAdded(final String newKey) 

+		{

+			Display.getDefault().syncExec(new Runnable(){

+				public void run()

+				{

+					internalPages.put(newKey, new DummyBufferPage(newKey));

+				}

+			});

+			

+		}

+

+		public void bufferRemoved(String removedKey) {

+			// TODO implement remove buffer

+			

+		}

+

+	}

+	

+	

+	protected CTabFolder tabFolder;

+

+	/**

+	 * frameworkId ==> DummyPage map

+	 */

+	private Map<String, DummyPage> pages = new HashMap<String, DummyPage>();

+		

+	

+	private CTabFolder getTabFolder()

+	{

+		return tabFolder;

+	}

+	

+	protected int getActivePage() {

+		CTabFolder tabFolder = getTabFolder();

+		if (tabFolder != null && !tabFolder.isDisposed()) {

+			return tabFolder.getSelectionIndex();

+		}

+		return -1;

+	}

+	

+	protected int getPageCount() {

+		CTabFolder folder = getTabFolder();

+		// May not have been created yet, or may have been disposed.

+		if (folder != null && !folder.isDisposed()) {

+			return folder.getItemCount();

+		}

+		return 0;

+	}

+	

+	protected void setActivePage(int pageIndex) {

+		Assert.isTrue(pageIndex >= 0 && pageIndex < getPageCount());

+		getTabFolder().setSelection(pageIndex);

+		pageChange(pageIndex);

+	}

+	

+	private CTabItem getItem(int pageIndex) {

+		return getTabFolder().getItem(pageIndex);

+	}

+	

+	protected void setPageText(int pageIndex, String text) {

+		getItem(pageIndex).setText(text);

+	}

+	

+	protected String getPageText(int pageIndex) {

+		return getItem(pageIndex).getText();

+	}

+	

+	@Override

+	public void createPartControl(Composite parent) 

+	{

+		parent.setLayout(new FillLayout());

+		tabFolder = new CTabFolder(parent, SWT.BOTTOM | SWT.FLAT);

+		tabFolder.setSimple(false);

+		tabFolder.addSelectionListener(new SelectionAdapter() {

+			public void widgetSelected(SelectionEvent e) {

+				int newPageIndex = tabFolder.indexOf((CTabItem) e.item);

+				pageChange(newPageIndex);

+			}

+		});

+		

+		createPages();

+		if (getPageCount() > 0 && getActivePage() == -1)

+			setActivePage(0);

+		

+		// register frameworklistchanged listener

+		FrameworkManager.getInstance().addFrameworkListChangedListener(this);

+		

+		// add toolbar actions

+		addToolbarActions();

+	}

+

+	private void addToolbarActions()

+	{

+		// add save action

+		getViewSite().getActionBars().getToolBarManager().add(new SaveAllBuffersAction(this));

+		getViewSite().getActionBars().getToolBarManager().add(new SaveOutputAction(this));

+		

+		Action action = new Action("Clear buffer") 

+		{

+			public void run() 

+			{

+				int outerindex = getActivePage();

+				int innerindex = ((DummyPage)getItem( outerindex ).getData()).internalFolder.getSelectionIndex();

+				DummyPage p = ((DummyPage)getItem( outerindex ).getData());

+				if (innerindex == 0)

+				{

+					// clear the default buffer

+					p.clear();

+				}

+				else

+				{

+					// we want to clear a core buffer

+					try

+					{

+						DummyPage.DummyBufferPage pp = (DummyPage.DummyBufferPage) ((DummyPage)getItem( outerindex ).getData()).internalFolder.getItem(innerindex).getData(); 

+						IFramework fw = FrameworkManager.getInstance().getFramework(p.frameworkId);

+						((StringWriter)BufferStore.getBuffer(fw.getTopmodel(), pp.key)).getBuffer().setLength(0);

+						((StringWriter)BufferStore.getBuffer(fw.getTopmodel(), pp.key)).getBuffer().trimToSize();

+						p.refreshContent();

+					}

+					catch (IOException e) { } // impossible

+					catch (URISyntaxException e) { } // impossible

+				}

+			}

+		};

+		action.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));

+		action.setDisabledImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));

+		//action.setHoverImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_HOVER));

+		action.setToolTipText("Clear output");

+		getViewSite().getActionBars().getToolBarManager().add(action);

+		

+		// add buffer toggle action

+		getViewSite().getActionBars().getToolBarManager().add(new ToggleAction(this));

+	}

+	

+	public DummyPage getCurrentOuterPage()

+	{

+		int outerindex = getActivePage();

+		DummyPage p = ((DummyPage)getItem( outerindex ).getData());

+		return p;

+	}

+	

+	public DummyPage.DummyBufferPage getCurrentInnerPage()

+	{

+		// XXX kludgy hack alert

+		try {

+			int outerindex = getActivePage();

+			int innerindex = ((DummyPage)getItem( outerindex ).getData()).internalFolder.getSelectionIndex();

+			return (DummyPage.DummyBufferPage) ((DummyPage)getItem( outerindex ).getData()).internalFolder.getItem(innerindex).getData();

+		}

+		catch (Exception e)

+		{

+			return null;

+		}

+	}

+	

+	protected void createPages()

+	{

+		for (String id : FrameworkManager.getInstance().getAllFrameWorks())

+		{

+			createNewPage(id);

+		}

+	}

+	

+	private void createNewPage(String _id)

+	{

+		final String id = _id;

+		

+//		Display.getDefault().syncExec(new Runnable(){

+

+//			public void run() {

+				DummyPage p = new DummyPage(id);

+				pages.put(id, p);

+				int index = getPageCount();

+				Control control = p.createPageControl(getTabFolder());

+				CTabItem item = new CTabItem(getTabFolder(), SWT.NONE, index);

+				item.setControl(control);

+				item.setData(p);

+				p.externalTabItem = item;

+				setPageText(index, id);

+//			}

+			

+//		});

+	}

+	

+	private void removePage(String _id)

+	{

+		final String id = _id;

+		Display.getDefault().syncExec(new Runnable(){

+

+			public void run() 

+			{

+				DummyPage p = pages.get(id);

+				if (p!=null)

+				{

+					p.disposePage();

+					pages.remove(id);

+				}

+			}

+			

+		});

+	}

+	

+	protected void pageChange(int newPageIndex)

+	{

+		// currently empty

+	}

+	

+	

+	@Override

+	public void setFocus() {

+		setFocus(getActivePage());

+	}

+	

+	private void setFocus(int pageIndex)

+	{

+		// currently empty

+	}

+

+	public void frameworkAdded(final IFramework f) 

+	{

+		Display.getDefault().syncExec(new Runnable(){

+		

+			public void run() {

+				// add a new page

+				createNewPage(f.getId());

+				// set it as active

+				setActivePage(getPageCount()-1);

+			}

+		});

+	}

+

+	public void frameworkRemoved(final IFramework f) 

+	{

+		Display.getDefault().syncExec(new Runnable(){

+			

+			public void run() {

+				// remove page

+				removePage(f.getId());

+				

+			}

+		});

+	}

+	
+	
+	@Override
+	public void dispose() {
+		FrameworkManager.getInstance().removeFrameworkListChangedListener(this);
+		for (String id :  pages.keySet()) {
+			removePage(id);
+		}
+		super.dispose();
+	}

+	

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/code/ColorFactory.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/code/ColorFactory.java
new file mode 100644
index 0000000..1c1c281
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/code/ColorFactory.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.views.code;

+

+import java.util.HashMap;
+
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+

+public class ColorFactory {

+

+	private static ColorFactory instance = new ColorFactory();

+	

+	public static ColorFactory getInstance()

+	{

+		if (instance == null)

+			instance = new ColorFactory();

+		return instance;

+	}

+	

+	private ColorFactory()

+	{

+		colors = new HashMap<RGB, Color>();

+	}

+	

+	private HashMap<RGB, Color> colors;

+	

+	public static Color getColor(int R, int G, int B)

+	{

+		Color color = getInstance().colors.get(new RGB(R,G,B));

+		if (color == null)

+		{

+			color = new Color(Display.getCurrent(),R,G,B);

+			getInstance().colors.put(new RGB(R,G,B), color);

+		}

+		return color;

+	}

+	

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/code/SaveAllBuffersAction.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/code/SaveAllBuffersAction.java
new file mode 100644
index 0000000..ee23a3d
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/code/SaveAllBuffersAction.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.views.code;

+

+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.window.Window;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.ContainerSelectionDialog;
+import org.eclipse.viatra2.buffers.BufferStore;
+import org.eclipse.viatra2.framework.FrameworkManager;
+import org.eclipse.viatra2.framework.IFramework;
+

+public class SaveAllBuffersAction extends Action {

+

+	CodeBufferView cbv;

+	

+	public SaveAllBuffersAction(CodeBufferView v)

+	{

+		cbv = v;

+		this.setToolTipText("Save the content of all buffers to a directory in the workspace");

+		this.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER));

+		this.setText("Save outputs");

+	}

+	

+	@Override

+	public void run() 

+	{

+		ContainerSelectionDialog dd = new ContainerSelectionDialog(

+				cbv.getViewSite().getShell(),

+				ResourcesPlugin.getWorkspace().getRoot(),

+				true,

+				"Select destination folder:");

+		

+		dd.setBlockOnOpen(true);

+		dd.setTitle("Select folder to save buffers to");

+		// check whether there are buffers to the current modelspace

+		IFramework fw = FrameworkManager.getInstance().getFramework(cbv.getCurrentOuterPage().frameworkId);

+		if (BufferStore.getAllCoreBuffers(fw.getTopmodel())!=null && Window.OK == dd.open())

+		{

+			try

+			{

+				// save output

+				Object[] dirs = dd.getResult();

+				for (Object _p : dirs) // support multiple output directories

+				{

+					IPath p = (IPath)_p;

+					// iterate over buffers and save

+					for (Map.Entry<String, StringWriter> buf : BufferStore.getAllCoreBuffers(fw.getTopmodel()))

+					{

+						// calculate target file path

+						String fileName = buf.getKey().replaceFirst("core://", "");

+						IFile ifile = ResourcesPlugin.getWorkspace().getRoot().getFile(p.append("/"+fileName));

+						FileWriter wr = new FileWriter(new File(ifile.getLocation().toOSString()));

+						try {

+							wr.write(buf.getValue().getBuffer().toString());

+						}

+						finally {

+							wr.flush();

+							wr.close();

+						}

+					}

+				}

+				ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());

+			}

+			catch (IOException e)

+			{

+				fw.getLogger().fatal(e.getMessage());

+			} 

+			catch (CoreException e) 

+			{

+				fw.getLogger().fatal(e.getMessage());

+			}

+		}

+		

+	}

+	

+	

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/code/SaveOutputAction.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/code/SaveOutputAction.java
new file mode 100644
index 0000000..cfba0a8
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/code/SaveOutputAction.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.views.code;

+

+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.window.Window;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.SaveAsDialog;
+import org.eclipse.viatra2.framework.FrameworkManager;
+

+public class SaveOutputAction extends Action {

+

+	CodeBufferView cbv;

+	

+	public SaveOutputAction(CodeBufferView v)

+	{

+		cbv = v;

+		this.setToolTipText("Save current buffer content to a file in the workspace");

+		this.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FILE));

+		this.setText("Save output");

+	}

+	

+	@Override

+	public void run() 

+	{

+		String target = null;

+		String targetName = null;

+		CodeBufferView.DummyPage.DummyBufferPage pp = cbv.getCurrentInnerPage();

+		if (pp==null)

+		{

+			// default buffer should be written

+			target = cbv.getCurrentOuterPage().defaultBuffer.toString();
+			if (target==null || target.length()<1)
+			{
+				target = cbv.getCurrentOuterPage().defaultDisplay.getText();
+			} // fix for bug #266484

+			targetName = "default";

+		}

+		else

+		{

+			target = pp.text.getText();

+			targetName = pp.key.replaceFirst("core://", "");

+		}

+		SaveAsDialog d = new SaveAsDialog(cbv.getViewSite().getShell());

+		d.setBlockOnOpen(true);

+		d.setTitle("Save buffer output");

+		d.setOriginalName(targetName);

+		if (Window.OK == d.open())

+		{

+			try

+			{

+				// save output

+				IFile ifile = ResourcesPlugin.getWorkspace().getRoot().getFile(d.getResult());

+				FileWriter wr = new FileWriter(new File(ifile.getLocation().toOSString()));

+				try {

+					wr.write(target);

+				}

+				finally {

+					wr.flush();

+					wr.close();

+				}

+				ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());

+			}

+			catch (IOException e)

+			{

+				FrameworkManager.getInstance().getFramework(cbv.getCurrentOuterPage().frameworkId).getLogger().fatal(e.getMessage());

+			} catch (CoreException e) 

+			{

+				FrameworkManager.getInstance().getFramework(cbv.getCurrentOuterPage().frameworkId).getLogger().fatal(e.getMessage());

+			}

+		}

+		

+	}

+	

+	

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/code/ToggleAction.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/code/ToggleAction.java
new file mode 100644
index 0000000..b7408bf
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/code/ToggleAction.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.views.code;

+

+import org.eclipse.jface.action.Action;
+import org.eclipse.viatra2.frameworkgui.FrameworkGUIPlugin;
+

+public class ToggleAction extends Action {

+

+	

+	public ToggleAction(CodeBufferView v) 

+	{

+		cbv=v;

+		setChecked(cbv.isBuffering);

+		this.setToolTipText("Toggle buffering");

+		this.setImageDescriptor(FrameworkGUIPlugin.getImageDescriptor("icons/buffer_on.png"));

+		this.setDisabledImageDescriptor(FrameworkGUIPlugin.getImageDescriptor("icons/buffer_off.png"));

+	}

+	

+	

+	CodeBufferView cbv;

+	

+	@Override

+	public void run() 

+	{

+		cbv.isBuffering = !cbv.isBuffering;

+		if (cbv.isBuffering)

+		{

+			setChecked(true);

+			setToolTipText("Output is buffered.");

+		}

+		else

+		{

+			setChecked(false);

+			setToolTipText("Output is NOT buffered");

+		}

+		cbv.getViewSite().getActionBars().getToolBarManager().update(true);

+	}

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/ConsoleView.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/ConsoleView.java
new file mode 100644
index 0000000..947645b
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/ConsoleView.java
@@ -0,0 +1,566 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2009 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.action.Action;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CTabFolder;
+import org.eclipse.swt.custom.CTabItem;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.TraverseEvent;
+import org.eclipse.swt.events.TraverseListener;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Item;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.ViewPart;
+import org.eclipse.viatra2.framework.FrameworkManager;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.framework.IFrameworkListChangedListener;
+import org.eclipse.viatra2.framework.properties.VPMProperties;
+import org.eclipse.viatra2.frameworkgui.views.code.ColorFactory;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.CommandExecutor;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProvider;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.ParsedCommand;
+import org.eclipse.viatra2.frameworkgui.views.layout.SimpleBorderLayout;
+import org.eclipse.viatra2.logger.Logger;
+
+/**
+ * GUI class to implements the VIATRA2 Console.
+ * An interactive shell to the VIATRA engine.
+ * @author istvan rath
+ *
+ */
+public class ConsoleView extends ViewPart implements IFrameworkListChangedListener
+{
+	
+	public static final String ID = "org.eclipse.viatra2.gui.console";
+	
+	/**
+	 * True, if the output is buffered (i.e. should only be refreshed on
+	 * transaction end).
+	 */
+	public boolean isBuffering = true;
+	
+	/**
+	 * Internal GUI back-end class that implements a "model" for a given page
+	 * corresponding to a model space. 
+	 * @author istvan
+	 *
+	 */
+	protected class ConsolePage implements Logger
+	{
+		/**
+		 * Text used to display contents of the log.
+		 */
+		protected Text defaultDisplay;
+	
+		/**
+		 * We accumulate log output here.
+		 */
+		protected StringBuffer defaultBuffer;
+				
+		/**
+		 * Reference to the framework we're listening to.
+		 */
+		protected String frameworkId;
+		
+		/**
+		 * Points to the tabItem in the tabFolder we're displayed in.
+		 */
+		protected Item externalTabItem;
+
+		/**
+		 * Text field where commands are entered.
+		 */
+		private Text commandField;
+		
+		
+		public ConsolePage(String id)
+		{
+			frameworkId = id;
+			defaultBuffer = new StringBuffer();
+			
+			// register as code output plugin
+			IFramework fw =  FrameworkManager.getInstance().getFramework(frameworkId);
+			fw.addLoggerListener(this);
+			
+			// register as transaction listener
+			//fw.getTopmodel().getNotificationManager().addAllListener(this);
+		}
+		
+		public void disposePage()
+		{
+			// deregister as logger listener
+			IFramework fw =  FrameworkManager.getInstance().getFramework(frameworkId);
+			if (fw!=null) {
+				fw.removeLoggerListener(this);
+			}
+			// deregister as transaction listener
+			//fw.getTopmodel().getNotificationManager().removeAllListener(this);
+			// dispose item
+			externalTabItem.dispose();
+		}
+		
+		private int currentBackwardIndex = 0;
+		
+		private int currentContentAssistIndex = 0;
+		
+		public Control createPageControl(Composite parent)
+		{
+			parent.setLayout(new FillLayout());
+			Composite c = new Composite(parent, SWT.NONE);
+			c.setLayout(new SimpleBorderLayout());
+			
+			
+			defaultDisplay = new Text(c, SWT.MULTI | SWT.V_SCROLL //| SWT.H_SCROLL 
+					| SWT.READ_ONLY | SWT.WRAP);
+			defaultDisplay.setLayoutData(SimpleBorderLayout.CENTER);
+			
+			if (System.getProperty("file.separator").equals("/"))
+			{
+				FontData fd = new FontData("Monospace", 9, SWT.NONE);
+				defaultDisplay.setFont(new Font(Display.getDefault(), fd));
+			}
+			else
+			{
+				FontData fd = new FontData("Courier New", 9, SWT.NONE);
+				defaultDisplay.setFont(new Font(Display.getDefault(), fd));
+			}
+			
+			defaultDisplay.setBackground(ColorFactory.getColor(255,255,255));
+			defaultDisplay.setForeground(ColorFactory.getColor(0, 0, 0));
+			
+	
+
+			commandField = new Text(c, SWT.BORDER|SWT.SINGLE);
+			commandField.setLayoutData(SimpleBorderLayout.SOUTH);
+			commandField.setText("");
+			commandField.addTraverseListener(new TraverseListener() {
+				
+				public void keyTraversed(TraverseEvent e) {
+					// disable traversal on tab, to allow for tab-triggered content assist
+					if (e.keyCode == SWT.TAB) {
+						e.doit = false;
+					}
+					
+				}
+			});
+
+			commandField.addKeyListener(new KeyListener() {
+				
+				public void keyReleased(KeyEvent e) {
+					IFramework fw =  FrameworkManager.getInstance().getFramework(frameworkId);
+					if (e.keyCode == SWT.CR) {
+						// print first execution feedback
+						ParsedCommand cmd = CommandExecutor.getParsedCommand(commandField.getText());
+						if (cmd.isValid) {
+							defaultBuffer.append("> "+cmd.cmdName+"("+cmd.params.toString()+")\n");
+							if (CommandExecutor.executeCommand(fw,cmd)) {
+								// add to command history
+								CommandExecutor.storeCommand(fw, commandField.getText());
+								// clear the current contents of the command entry field
+								commandField.setText("");
+								// reset the backward index
+								currentBackwardIndex = 0;
+							}
+							else {
+								fw.getLogger().error("Could not find VIATRA Console command by name: "+cmd.cmdName);
+							}		
+						}
+						else {
+							fw.getLogger().error("Parsing error for command: " + commandField.getText());
+						}
+					}
+					else if (e.keyCode == SWT.ARROW_UP) {
+						// fetch the previous command in the history if available
+						currentBackwardIndex++;
+						String oldCmd = CommandExecutor.getCommandAtBackwardIndex(fw, currentBackwardIndex);
+						if (oldCmd!=null) {
+							commandField.setText(oldCmd);
+							commandField.selectAll();
+						}
+					}
+					else if (e.keyCode == SWT.ARROW_DOWN) {
+						// fetch the previous command in the history if available
+						currentBackwardIndex--;
+						String oldCmd = CommandExecutor.getCommandAtBackwardIndex(fw, currentBackwardIndex);
+						if (oldCmd!=null) {
+							commandField.setText(oldCmd);
+							commandField.selectAll();
+						}
+						else {
+							commandField.setText("");
+						}
+					}
+					else if (e.keyCode == SWT.TAB) {
+						// provide very simple content-assist :)
+						// consider only non-selected part of text as a prefix
+						String prefix = commandField.getText();
+						if (commandField.getSelectionCount()>0) {
+							prefix = commandField.getText().substring(0, commandField.getText().indexOf(commandField.getSelectionText()));
+						}
+						List<IVIATRAConsoleCommandProvider> matches = CommandExecutor.getCommandByNamePrefix(fw, prefix);
+						if (matches.size()>0) {
+							currentContentAssistIndex = Math.max(0, currentContentAssistIndex);
+							currentContentAssistIndex = Math.min(matches.size()-1, currentContentAssistIndex);
+							commandField.setText(matches.get(currentContentAssistIndex).getCommandSignature());
+							commandField.setSelection(prefix.length(), commandField.getText().length());
+							if (matches.size() == currentContentAssistIndex+1) {
+								currentContentAssistIndex=0;
+							}
+							else {
+								currentContentAssistIndex++;
+							}
+						}
+					}
+				}
+				
+				public void keyPressed(KeyEvent e) {
+				}
+			});
+			
+			return c;
+		}
+		
+		
+		
+		
+
+		public void refreshContent()
+		{
+			Display.getDefault().syncExec(new Runnable()
+			{
+				public void run() 
+				{
+					defaultDisplay.setText(defaultBuffer.toString());
+					// autoscroll to end 
+					defaultDisplay.setSelection(defaultBuffer.length()-1);
+				}	
+			});
+		}
+		
+		public void clear()
+		{
+			defaultBuffer = new StringBuffer();
+			refreshContent();
+		}
+/*				
+		public void actionPerformed(ICoreNotificationObject notification) 
+		{
+			if (!isBuffering) return;
+			String type = notification.getActionType();
+			if (type.equals(ICoreNotificationObject.TA_TRANSACTION_END))
+			{
+				refreshContent();
+			}
+		}
+*/
+		public int getListenerCategory() { return 0; }
+
+		public void debug(String s) {
+			if (debugs) {
+			defaultBuffer.append("[debug] "+s+"\n");
+			refreshContent();
+			}
+		}
+
+		public void error(String s) {
+			if (errors) {
+			defaultBuffer.append("[error] "+s+"\n");
+			refreshContent();
+			}
+		}
+
+		public void fatal(String s) {
+			defaultBuffer.append("[fatal] "+s+"\n");
+			refreshContent();
+		}
+
+		public void info(String s) {
+			if (infos) {
+			defaultBuffer.append("[info] "+s+"\n");
+			refreshContent();
+			}
+		}
+
+		public void init(VPMProperties p) {
+			// empty
+			
+		}
+
+		public void message(int level, String msg, Throwable cause) {
+			message(level,msg);
+			printStackTrace(cause);
+		}
+
+		public void message(int level, String msg) {
+			defaultBuffer.append("[message ("+level+")] "+msg+"\n");
+			refreshContent();
+		}
+
+		public void printStackTrace(Throwable t) {
+			StringWriter sw = new StringWriter();
+			t.printStackTrace(new PrintWriter(sw));
+			defaultBuffer.append("[exception] stack trace follows for: "+
+					t.getClass().getCanonicalName()+": "+t.getMessage()+"\n");
+			defaultBuffer.append(sw.getBuffer());
+			refreshContent();
+		}
+
+		public void setLevel(int l) {
+			
+		}
+
+		public void warning(String s) {
+			if (warnings) {
+			defaultBuffer.append("[warning] "+s+"\n");
+			refreshContent();
+			}
+		}
+
+	}
+	
+	
+	protected CTabFolder tabFolder;
+
+	/**
+	 * frameworkId ==> ConsolePage map
+	 */
+	private Map<String, ConsolePage> pages = new HashMap<String, ConsolePage>();
+		
+	
+	private CTabFolder getTabFolder()
+	{
+		return tabFolder;
+	}
+	
+	protected int getActivePage() {
+		CTabFolder tabFolder = getTabFolder();
+		if (tabFolder != null && !tabFolder.isDisposed()) {
+			return tabFolder.getSelectionIndex();
+		}
+		return -1;
+	}
+	
+	protected int getPageCount() {
+		CTabFolder folder = getTabFolder();
+		// May not have been created yet, or may have been disposed.
+		if (folder != null && !folder.isDisposed()) {
+			return folder.getItemCount();
+		}
+		return 0;
+	}
+	
+	protected void setActivePage(int pageIndex) {
+		Assert.isTrue(pageIndex >= 0 && pageIndex < getPageCount());
+		getTabFolder().setSelection(pageIndex);
+		pageChange(pageIndex);
+	}
+	
+	private CTabItem getItem(int pageIndex) {
+		return getTabFolder().getItem(pageIndex);
+	}
+	
+	protected void setPageText(int pageIndex, String text) {
+		getItem(pageIndex).setText(text);
+	}
+	
+	protected String getPageText(int pageIndex) {
+		return getItem(pageIndex).getText();
+	}
+	
+	@Override
+	public void createPartControl(Composite parent) 
+	{
+		parent.setLayout(new FillLayout());
+		tabFolder = new CTabFolder(parent, SWT.TOP | SWT.FLAT);
+		tabFolder.setSimple(false);
+		tabFolder.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				int newPageIndex = tabFolder.indexOf((CTabItem) e.item);
+				pageChange(newPageIndex);
+			}
+		});
+		
+		createPages();
+		if (getPageCount() > 0 && getActivePage() == -1)
+			setActivePage(0);
+		
+		// register frameworklistchanged listener
+		FrameworkManager.getInstance().addFrameworkListChangedListener(this);
+		
+		// add toolbar actions
+		addToolbarActions();
+	}
+
+	private void addToolbarActions()
+	{
+		// add save action
+//		getViewSite().getActionBars().getToolBarManager().add(new SaveAllBuffersAction(this));
+//		getViewSite().getActionBars().getToolBarManager().add(new SaveOutputAction(this));
+		
+		Action action = new Action("Clear log") 
+		{
+			@Override
+			public void run() 
+			{
+				int outerindex = getActivePage();
+				ConsolePage p = ((ConsolePage)getItem( outerindex ).getData());
+				p.clear();
+			}
+		};
+		action.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
+		action.setDisabledImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));
+		//action.setHoverImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_HOVER));
+		action.setToolTipText("Clear log");
+		getViewSite().getActionBars().getToolBarManager().add(action);
+	
+		// add toggle actions
+		getViewSite().getActionBars().getToolBarManager().add(new ToggleAction(this, "Info", "infos"));
+		getViewSite().getActionBars().getToolBarManager().add(new ToggleAction(this, "Warning", "warnings"));
+		getViewSite().getActionBars().getToolBarManager().add(new ToggleAction(this, "Error", "errors"));
+		getViewSite().getActionBars().getToolBarManager().add(new ToggleAction(this, "Debug", "debugs"));
+	}
+	
+	public boolean warnings = true;
+	public boolean errors = true;
+	public boolean infos = true;
+	public boolean debugs = false;
+	
+	public ConsolePage getCurrentOuterPage()
+	{
+		int outerindex = getActivePage();
+		ConsolePage p = ((ConsolePage)getItem( outerindex ).getData());
+		return p;
+	}
+	
+	protected void createPages()
+	{
+		for (String id : FrameworkManager.getInstance().getAllFrameWorks())
+		{
+			createNewPage(id);
+		}
+	}
+	
+	private void createNewPage(String _id)
+	{
+		final String id = _id;
+		
+//		Display.getDefault().syncExec(new Runnable(){
+
+//			public void run() {
+				ConsolePage p = new ConsolePage(id);
+				pages.put(id, p);
+				int index = getPageCount();
+				Control control = p.createPageControl(getTabFolder());
+				CTabItem item = new CTabItem(getTabFolder(), SWT.NONE, index);
+				item.setControl(control);
+				item.setData(p);
+				p.externalTabItem = item;
+				setPageText(index, id);
+				FrameworkManager.getInstance().getFramework(id).getLogger().info(
+						"VIATRA2 Console open for model space '" + id + 
+						"'; issue listcommands() to see available commands.");
+//			}
+			
+//		});
+	}
+	
+	private void removePage(String _id)
+	{
+		final String id = _id;
+		Display.getDefault().syncExec(new Runnable(){
+
+			public void run() 
+			{
+				ConsolePage p = pages.get(id);
+				if (p!=null)
+				{
+					p.disposePage();
+					pages.remove(id);
+				}
+			}
+			
+		});
+	}
+	
+	protected void pageChange(int newPageIndex)
+	{
+		// currently empty
+	}
+	
+	
+	@Override
+	public void setFocus() {
+		setFocus(getActivePage());
+	}
+	
+	private void setFocus(int pageIndex)
+	{
+		// currently empty
+	}
+
+	public void frameworkAdded(final IFramework f) 
+	{
+		Display.getDefault().syncExec(new Runnable(){
+		
+			public void run() {
+				// add a new page
+				createNewPage(f.getId());
+				// set it as active
+				setActivePage(getPageCount()-1);
+			}
+		});	
+	}
+
+	public void frameworkRemoved(final IFramework f) 
+	{
+		Display.getDefault().syncExec(new Runnable(){
+			
+			public void run() {
+				// remove page
+				removePage(f.getId());
+				
+			}
+		});
+	}
+	
+	
+	@Override
+	public void dispose() {
+		FrameworkManager.getInstance().removeFrameworkListChangedListener(this);
+		for (String id :  pages.keySet()) {
+			removePage(id);
+		}
+		super.dispose();
+		
+	}
+	
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/ToggleAction.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/ToggleAction.java
new file mode 100644
index 0000000..b6a650b
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/ToggleAction.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.views.console;

+

+import java.lang.reflect.Field;
+
+import org.eclipse.jface.action.Action;
+
+/**
+ * Super reflective toggle action class to be used for the console view.
+ * @author istvan rath
+ *
+ */

+public class ToggleAction extends Action {

+

+	

+	public ToggleAction(ConsoleView v, String text, String attrName) 

+	{

+		cv=v;
+		targetName=attrName;
+		initField();

+		setChecked(getCurrentValue());
+		setText(text);

+		this.setToolTipText("Toggle on/off");

+//		this.setImageDescriptor(FrameworkGUIPlugin.getImageDescriptor("icons/buffer_on.png"));

+//		this.setDisabledImageDescriptor(FrameworkGUIPlugin.getImageDescriptor("icons/buffer_off.png"));

+	}

+	

+	

+	ConsoleView cv;

+
+	String targetName;
+	
+	Field f;
+	
+	private void initField() {
+		try {
+			f = cv.getClass().getDeclaredField(targetName);
+		} catch (SecurityException e) {
+			e.printStackTrace();
+		} catch (NoSuchFieldException e) {
+			e.printStackTrace();
+		}	
+	}
+	
+	
+	private Boolean getCurrentValue() {
+		try {
+			return f.getBoolean(cv);
+		} catch (IllegalArgumentException e) {
+			e.printStackTrace();
+		} catch (IllegalAccessException e) {
+			e.printStackTrace();
+		}
+		return false;
+	}
+	

+	@Override

+	public void run() 

+	{
+		boolean b = getCurrentValue();

+		try {
+			f.setBoolean(cv, new Boolean(! b));
+		} catch (IllegalArgumentException e) {
+			e.printStackTrace();
+		} catch (IllegalAccessException e) {
+			e.printStackTrace();
+		}
+		b = getCurrentValue();

+		if (b)

+		{

+			setChecked(true);

+			setToolTipText("On");

+		}

+		else

+		{

+			setChecked(false);

+			setToolTipText("Off");

+		}

+		cv.getViewSite().getActionBars().getToolBarManager().update(true);

+	}

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/CommandExecutor.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/CommandExecutor.java
new file mode 100644
index 0000000..a6afd3c
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/CommandExecutor.java
@@ -0,0 +1,158 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.FrameworkGUIPlugin;
+
+/**
+ * Utility class to execute VIATRA Console commands.
+ * 
+ * 
+ * @author istvan rath
+ *
+ */
+public class CommandExecutor {
+
+	private static Map<String, List<String>> historyMap = new HashMap<String, List<String>>();
+	
+	public static List<String> getCommandHistory(IFramework fw){
+		return historyMap.get(fw.getId());
+	}
+	
+	public static void storeCommand(IFramework fw, String raw) {
+		List<String> history = historyMap.get(fw.getId());
+		if (history == null) {
+			history = new ArrayList<String>();
+			historyMap.put(fw.getId(), history);
+		}
+		history.add(raw);
+	}
+	
+	public static String getCommandAtBackwardIndex(IFramework fw, int ix) {
+		List<String> history = historyMap.get(fw.getId());
+		if (history !=null) {
+			try {
+				return history.get(history.size()-ix);
+			} catch (Throwable t) {
+				return null;
+			}
+		}
+		return null;
+	}
+	
+	public static void clearCommandHistory(IFramework fw) {
+		List<String> history = historyMap.get(fw.getId());
+		if (history !=null) {
+			history.clear();
+		}
+	}
+	
+
+	/**
+	 * Gets a parsed command DTO for a raw string.
+	 * 
+	 * Accepts:
+	 * 
+	 * cmd_name(arg0, arg1, ...) type raw strings.
+	 * 
+	 * @param raw
+	 * @return
+	 */
+	public static ParsedCommand getParsedCommand(String raw) {
+		String cmd_name = "";
+		ArrayList<String> params = new ArrayList<String>();
+		
+		if (raw.indexOf("(")>0 && raw.indexOf(")")>0) {
+			// we have valid parametrization
+			cmd_name = raw.substring(0, raw.indexOf("(")).trim().toLowerCase();
+			
+			try {
+				Object[] raw_params = raw.substring((raw.indexOf("(") + 1), raw.lastIndexOf(")")).split(",");
+				for (Object rp : raw_params) {
+					params.add(rp.toString().trim());
+				}
+			}
+			catch (Throwable t) { t.printStackTrace(); }
+		}
+		else {
+			cmd_name = raw.trim().toLowerCase();
+		}
+
+		ParsedCommand c = new ParsedCommand();
+		c.cmdName = cmd_name;
+		c.params = params;
+		c.isValid = true;
+		
+		// TODO add more parsing validation logic
+		
+		return c;
+	}
+	
+	public static IVIATRAConsoleCommandProvider getCommandByName(IFramework fw, String name) {
+		for (IVIATRAConsoleCommandProviderFactory f : FrameworkGUIPlugin.getDefault().getCommandProviderFactories())
+		{
+			for (IVIATRAConsoleCommandProvider cp : f.getProviders(fw)) {
+				if (cp.getClass().getSimpleName().toLowerCase().equals(name)) {
+					// found a match, invoke
+					return cp;
+				}
+			}
+		}
+		return null;
+	}
+	
+	public static List<IVIATRAConsoleCommandProvider> getCommandByNamePrefix(IFramework fw, String prefix) {
+		ArrayList<IVIATRAConsoleCommandProvider> matches = new ArrayList<IVIATRAConsoleCommandProvider>();
+		for (IVIATRAConsoleCommandProviderFactory f : FrameworkGUIPlugin.getDefault().getCommandProviderFactories())
+		{
+			for (IVIATRAConsoleCommandProvider cp : f.getProviders(fw)) {
+				if (cp.getClass().getSimpleName().toLowerCase().startsWith(prefix)) {
+					// found a match, push
+					matches.add(cp);
+				}
+			}
+		}
+		return matches;
+	}
+	
+	
+	/**
+	 * Try to parse the contents of cmd as a VIATRA Console command in the format
+	 * command_name(argument0, argument1, ...) and execute it.
+	 * 
+	 * @return true if the execution was successful 
+	 */
+	public static boolean executeCommand(IFramework fw, ParsedCommand pcmd) {
+			if (!pcmd.isValid) return false;
+		// lookup by name
+		boolean foundMatch = false;
+		for (IVIATRAConsoleCommandProviderFactory f : FrameworkGUIPlugin.getDefault().getCommandProviderFactories())
+		{
+			for (IVIATRAConsoleCommandProvider cp : f.getProviders(fw)) {
+				if (cp.getClass().getSimpleName().toLowerCase().equals(pcmd.cmdName)) {
+					// found a match, invoke
+					cp.executeCommand(fw, pcmd.params); 
+					foundMatch = true;
+					break;
+				}
+			}
+			if (foundMatch) break;
+		}
+		return foundMatch;
+	}
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/IVIATRAConsoleCommandProvider.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/IVIATRAConsoleCommandProvider.java
new file mode 100644
index 0000000..5cfdea7
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/IVIATRAConsoleCommandProvider.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands;
+
+import java.util.List;
+
+import org.eclipse.viatra2.framework.IFramework;
+
+/**
+ * Interface for VIATRA console command providers.
+ * 
+ * Command providers are identified by their Java class names.
+ * 
+ * E.g. to invoke a commandprovider implemented in SomeCommand.java, you would need
+ * to type "SomeCommand" or "someCommand" or "somecommand" or "SoMeCommAnd" etc. into the console. 
+ * 
+ * @author istvan rath
+ *
+ */
+public interface IVIATRAConsoleCommandProvider {
+	
+	public String getCommandSignature();
+	
+	public String getDescription();
+	
+	public String getHelpText();
+	
+	/**
+	 * Implementation should care about exception handling by e.g. logging as an error.
+	 * @param fw
+	 * @param parameters
+	 */
+	public void executeCommand(IFramework fw, List<String> parameters);
+	
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/IVIATRAConsoleCommandProviderFactory.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/IVIATRAConsoleCommandProviderFactory.java
new file mode 100644
index 0000000..15ea17f
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/IVIATRAConsoleCommandProviderFactory.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands;
+
+import java.util.List;
+
+import org.eclipse.viatra2.framework.IFramework;
+
+/**
+ * 
+ * Console command provider factory.
+ * @author istvan rath
+ *
+ */
+public interface IVIATRAConsoleCommandProviderFactory {
+
+	
+	public List<IVIATRAConsoleCommandProvider> getProviders(IFramework fw);
+	
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/ParsedCommand.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/ParsedCommand.java
new file mode 100644
index 0000000..9b5a2aa
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/ParsedCommand.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands;
+
+import java.util.List;
+
+public class ParsedCommand
+{
+	public String cmdName;
+	public List<String> params;
+	public boolean isValid;
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/About.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/About.java
new file mode 100644
index 0000000..720f2de
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/About.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands.builtin;
+
+import java.util.List;
+
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProvider;
+
+/**
+ * Supertrivial implementation for the "about" command.
+ * @author istvan
+ *
+ */
+public class About implements IVIATRAConsoleCommandProvider {
+
+	public void executeCommand(IFramework fw, List<String> parameters) {
+		fw.getLogger().info("This is the VIATRA2 R3.1 Console. Copyright 2009 Istvan Rath.");
+	}
+
+	public String getCommandSignature() {
+		return "about()";
+	}
+
+	public String getDescription() {
+		return "Prints some information about the VIATRA2 R3.1 Console system.";
+	}
+
+	public String getHelpText() {
+		return getDescription();
+	}
+
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/BuiltInCommands.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/BuiltInCommands.java
new file mode 100644
index 0000000..5bb5a2d
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/BuiltInCommands.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands.builtin;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProvider;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProviderFactory;
+
+/**
+ * Basic console commandprovider factory which provides basic functions such as
+ *  - about
+ *  - listcommands
+ *  - help
+ *  
+ * @author istvan rath
+ *
+ */
+public class BuiltInCommands implements IVIATRAConsoleCommandProviderFactory {
+
+	public BuiltInCommands() {
+	}
+
+	public List<IVIATRAConsoleCommandProvider> getProviders(IFramework fw) {
+		ArrayList<IVIATRAConsoleCommandProvider> ps = new ArrayList<IVIATRAConsoleCommandProvider>();
+		ps.add(new About());
+		ps.add(new ListCommands());
+		ps.add(new Help());
+		ps.add(new ClearCommandHistory());
+		ps.add(new PrintCommandHistory());
+		ps.add(new SaveCommandScript());
+		ps.add(new ExecuteCommandScript());
+		return ps;
+	}
+
+	
+	
+	
+	
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/ClearCommandHistory.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/ClearCommandHistory.java
new file mode 100644
index 0000000..5ad1a19
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/ClearCommandHistory.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands.builtin;
+
+import java.util.List;
+
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.CommandExecutor;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProvider;
+
+public class ClearCommandHistory implements IVIATRAConsoleCommandProvider {
+
+	public void executeCommand(IFramework fw, List<String> parameters) {
+		CommandExecutor.clearCommandHistory(fw);
+		fw.getLogger().info("VIATRA2 Console command history cleared.");
+	}
+
+	public String getCommandSignature() {
+		return "clearcommandhistory()";
+	}
+
+	public String getDescription() {
+		return "Clears the historical record of VIATRA2 Console commands";
+	}
+
+	public String getHelpText() {
+		return "This command clears the history of commands executed in the VIATRA2 Console.";
+	}
+
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/ExecuteCommandScript.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/ExecuteCommandScript.java
new file mode 100644
index 0000000..8d29575
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/ExecuteCommandScript.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands.builtin;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.net.URI;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.CommandExecutor;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProvider;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.ParsedCommand;
+
+public class ExecuteCommandScript implements IVIATRAConsoleCommandProvider {
+
+	public void executeCommand(IFramework fw, List<String> parameters) {
+		try {
+			if (parameters.size()>0)
+			{
+				String pURI = parameters.get(0);
+
+				// get rid of any trailing / and append file:// prefix if necessary
+				if (pURI.startsWith("/")) {
+					pURI = pURI.substring(1);
+				}
+				if (!pURI.startsWith("file://")) {
+					pURI = "file://"+pURI;
+				}
+				else {
+					// check if there is a surplus / inside
+					String _pURI = pURI.substring(7);
+					if (_pURI.startsWith("/")) {
+						_pURI = _pURI.substring(1);
+						pURI = "file://"+_pURI;
+					}
+				}
+				URI uri = new URI(pURI);
+		
+				String path = uri.getAuthority() + uri.getPath();
+				// check whether the path exists
+				// if not, create projects
+				IFile ifile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(path));
+				IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(uri.getAuthority());
+				IProgressMonitor mon = new NullProgressMonitor();
+				try {
+					if (!p.exists()) {
+						fw.getLogger().error("top-level project "+p.getName()+" does not exist in the workspace");
+						return;
+					}
+					p.open(mon);
+				} catch (CoreException cex) {
+					throw new IOException("Target project cannot be created/opened");
+				}
+				// make sure project-relative path exists
+				//try {
+					String[] segments = uri.getPath().split("/");
+					if (segments.length > 2) // first segment is always "" due to path beginning with '/'
+					{
+						// there is at least one directory below the project
+						// root
+						IFolder curr = null;
+						for (int i = 1; i < segments.length - 1; i++) // last segment will always be the file name
+						{
+							if (curr == null)
+								curr = p.getFolder(segments[i]);
+							else
+								curr = curr.getFolder(segments[i]);
+							if (!curr.exists()) {
+								fw.getLogger().error("folder "+curr.getName()+" does not exist");
+								return;
+								//curr.create(true, true, mon);
+							}
+						}
+					}
+//				} catch (CoreException cex) {
+//					throw new IOException("Target folder structure cannot be created");
+//				}
+//				// open reader to the file
+				FileReader ret = new FileReader(new File(ifile.getLocation().toOSString()));
+				
+				fw.getLogger().info("Executing command script from file "+ifile.getLocation().toPortableString());
+				BufferedReader br = new BufferedReader(ret);
+				while (br.ready()) {
+					String cmdLine = br.readLine();
+					// try execution
+					ParsedCommand cmd = CommandExecutor.getParsedCommand(cmdLine);
+					if (cmd.isValid) {
+						CommandExecutor.executeCommand(fw, cmd);
+					}
+				}
+				ret.close();
+				fw.getLogger().info("Execution finished.");
+			}
+			} catch (Throwable t) {
+				fw.getLogger().printStackTrace(t);
+			}
+			
+	}
+
+	public String getCommandSignature() {
+		return "executecommandscript(workspace_relative_path_to_commandscript_file)";
+	}
+
+	public String getDescription() {
+		return "Executes a VIATRA2 Console command script";
+	}
+
+	public String getHelpText() {
+		return "This command allows you to put a sequence of commands into a line-separated file, load it from the workspace and execute it as a simple macro.";
+	}
+
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/Help.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/Help.java
new file mode 100644
index 0000000..44c8781
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/Help.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands.builtin;
+
+import java.util.List;
+
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.CommandExecutor;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProvider;
+
+/**
+ * Supertrivial implementation for the "about" command.
+ * @author istvan
+ *
+ */
+public class Help implements IVIATRAConsoleCommandProvider {
+
+	public void executeCommand(IFramework fw, List<String> parameters) {
+		if (parameters.size()>0) {
+			IVIATRAConsoleCommandProvider cp = CommandExecutor.getCommandByName(fw, parameters.get(0));
+			if (cp!=null) {
+				fw.getLogger().info("Help text for the '"+cp.getClass().getSimpleName()+ "' command:");
+				fw.getLogger().info(cp.getHelpText());
+			}
+			else {
+				fw.getLogger().error("No command found by the name "+parameters.get(0));	
+			}
+		}
+		else {
+			fw.getLogger().error("help requires a command's name as a parameter; try the \"listcommands\" command to see what commands are available.");
+		}
+	}
+
+	public String getCommandSignature() {
+		return "help(commandname)";
+	}
+
+	public String getDescription() {
+		return "Prints help information about commands.";
+	}
+
+	public String getHelpText() {
+		return "Use help(<<commandname>>) to print out the help text of a given command.";
+	}
+
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/ListCommands.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/ListCommands.java
new file mode 100644
index 0000000..fd155b5
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/ListCommands.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands.builtin;
+
+import java.util.List;
+
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.FrameworkGUIPlugin;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProvider;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProviderFactory;
+
+/**
+ * Supertrivial implementation for the "listcommands" command.
+ * It will print out a list of available commands with their short descriptions.
+ * @author istvan
+ *
+ */
+public class ListCommands implements IVIATRAConsoleCommandProvider {
+
+	public void executeCommand(IFramework fw, List<String> parameters) {
+		for (IVIATRAConsoleCommandProviderFactory f : FrameworkGUIPlugin.getDefault().getCommandProviderFactories())
+		{
+			fw.getLogger().info("Console command factory: "+f.getClass().getSimpleName());
+			for (IVIATRAConsoleCommandProvider cp : f.getProviders(fw))
+			{
+				fw.getLogger().info("\t"+cp.getCommandSignature()+" : "+cp.getDescription());
+			}
+		}
+	}
+
+	public String getCommandSignature() {
+		return "listcommands()";
+	}
+
+	public String getDescription() {
+		return "Prints a list of commands with their short descriptions";
+	}
+
+	public String getHelpText() {
+		return getDescription();
+	}
+
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/PrintCommandHistory.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/PrintCommandHistory.java
new file mode 100644
index 0000000..afbf13f
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/PrintCommandHistory.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands.builtin;
+
+import java.util.List;
+
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.CommandExecutor;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProvider;
+
+public class PrintCommandHistory implements IVIATRAConsoleCommandProvider {
+
+	public void executeCommand(IFramework fw, List<String> parameters) {
+		List<String> history = CommandExecutor.getCommandHistory(fw);
+		if(history == null) {
+			fw.getLogger().info("VIATRA2 Console command history is empty.");
+			return;
+		}
+		fw.getLogger().info("Printing VIATRA2 Console command history:");
+		for (String rawCmd:history) {
+			fw.getLogger().info("\t"+rawCmd);
+		}
+	}
+
+	public String getCommandSignature() {
+		return "printcommandhistory()";
+	}
+
+	public String getDescription() {
+		return "Prints the historical record of VIATRA2 Console commands";
+	}
+
+	public String getHelpText() {
+		return "This command shows you the history of commands executed in the VIATRA2 Console.";
+	}
+
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/SaveCommandScript.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/SaveCommandScript.java
new file mode 100644
index 0000000..790307d
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/builtin/SaveCommandScript.java
@@ -0,0 +1,123 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands.builtin;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.net.URI;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.CommandExecutor;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProvider;
+
+public class SaveCommandScript implements IVIATRAConsoleCommandProvider {
+
+	public void executeCommand(IFramework fw, List<String> parameters) {
+		try {
+		if (parameters.size()>0)
+		{
+			String pURI = parameters.get(0);
+			
+			// get rid of any trailing / and append file:// prefix if necessary
+			if (pURI.startsWith("/")) {
+				pURI = pURI.substring(1);
+			}
+			if (!pURI.startsWith("file://")) {
+				pURI = "file://"+pURI;
+			}
+			else {
+				// check if there is a surplus / inside
+				String _pURI = pURI.substring(7);
+				if (_pURI.startsWith("/")) {
+					_pURI = _pURI.substring(1);
+					pURI = "file://"+_pURI;
+				}
+			}
+			URI uri = new URI(pURI);
+			
+			String path = uri.getAuthority() + uri.getPath();
+			// check whether the path exists
+			// if not, create projects
+			IFile ifile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(path));
+			IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(uri.getAuthority());
+			IProgressMonitor mon = new NullProgressMonitor();
+			try {
+				if (!p.exists()) {
+					p.create(mon);
+				}
+				p.open(mon);
+			} catch (CoreException cex) {
+				throw new IOException("Target project cannot be created/opened");
+			}
+			// make sure project-relative path exists
+			try {
+				String[] segments = uri.getPath().split("/");
+				if (segments.length > 2) // first segment is always "" due to path beginning with '/'
+				{
+					// there is at least one directory below the project
+					// root
+					IFolder curr = null;
+					for (int i = 1; i < segments.length - 1; i++) // last segment will always be the file name
+					{
+						if (curr == null)
+							curr = p.getFolder(segments[i]);
+						else
+							curr = curr.getFolder(segments[i]);
+						if (!curr.exists())
+							curr.create(true, true, mon);
+					}
+				}
+			} catch (CoreException cex) {
+				throw new IOException("Target folder structure cannot be created");
+			}
+			fw.getLogger().info("Saving command history to file "+ifile.getLocation().toPortableString());
+			// open writer to the file
+			FileWriter ret = new FileWriter(new File(ifile.getLocation().toOSString()), true);
+			
+			String contents = "";
+			for (String raw : CommandExecutor.getCommandHistory(fw)) {
+				contents += raw+"\n";
+			}
+			ret.write(contents);
+			ret.close();
+			
+			fw.getLogger().info("Saving command history finished.");
+		}
+		} catch (Throwable t) {
+			fw.getLogger().printStackTrace(t);
+		}
+		
+	}
+
+	public String getCommandSignature() {
+		return "savecommandscript(workspace_relative_path_to_commandscript_file)";
+	}
+
+	public String getDescription() {
+		return "Saves the current command history to a script in the workspace.";
+	}
+
+	public String getHelpText() {
+		return "This command allows you to save the command history as a sequence of commands into a line-separated file macro.";
+	}
+
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/imports/NativeImport.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/imports/NativeImport.java
new file mode 100644
index 0000000..d676907
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/imports/NativeImport.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands.imports;
+
+import java.io.File;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProvider;
+
+/**
+ * VIATRA2 console command to facilitate the native import operation.
+ * @author istvan rath
+ *
+ */
+public class NativeImport implements IVIATRAConsoleCommandProvider {
+
+	
+	public void executeCommand(IFramework fw, List<String> parameters) {
+		// 0. check if we have exactly one parameter
+		if (parameters.size()!=1) {
+			fw.getLogger().error("[NativeImport] Wrong number of parameters supplied. Expected: 1, received: "+parameters.size());
+			return;
+		}
+		// try to locate file
+		String path = parameters.get(0);
+		File f = null;
+		IFile ifile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(path));
+		
+//		if (!f.exists()) {
+		if (ifile.getLocation()==null) {
+			// try as an absolute path
+			f = new File(path);
+			if (!f.exists()) {
+				fw.getLogger().error("[NativeImport] file cannot be located");
+				return;
+			}
+		}
+		else {
+			f = new File(ifile.getLocation().toOSString());
+		}
+		
+		// file is sure to exist beyond this point
+		String ext = path.substring(path.lastIndexOf(".")+1);
+		Set<String> importerIDs = fw.getNativeImportersForExtension(ext);
+		if (importerIDs.size()<1) {
+			fw.getLogger().error("[NativeImport] No applicable native importer found for extension "+ext);
+			return;
+		}
+		NativeImporterCommands.commenceImport(fw, f, importerIDs.iterator().next());
+	}
+
+	public String getCommandSignature() {
+		return "nativeimport(filePath)";
+	}
+
+	public String getDescription() {
+		return "Imports the contents of a file into the VIATRA2 model space.";
+	}
+
+	public String getHelpText() {
+		return "Use nativeimport(<<filePath>>) with workspace-relative pathname (recommended) OR absolute file name.\nThis command "+getDescription();
+	}
+
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/imports/NativeImportUsing.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/imports/NativeImportUsing.java
new file mode 100644
index 0000000..ac13557
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/imports/NativeImportUsing.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands.imports;
+
+import java.io.File;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProvider;
+
+/**
+ * VIATRA2 console command to facilitate the native import operation.
+ * @author istvan rath
+ *
+ */
+public class NativeImportUsing implements IVIATRAConsoleCommandProvider {
+
+	
+	public void executeCommand(IFramework fw, List<String> parameters) {
+		// 0. check if we have exactly one parameter
+		if (parameters.size()!=2) {
+			fw.getLogger().error("[NativeImportUsing] Wrong number of parameters supplied. Expected: 2, received: "+parameters.size());
+			return;
+		}
+		// try to locate file
+		String path = parameters.get(0);
+		File f = null;
+		IFile ifile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(path));
+		f = new File(ifile.getLocation().toOSString());
+		if (!f.exists()) {
+			// try as an absolute path
+			f = new File(path);
+			if (!f.exists()) {
+				fw.getLogger().error("[NativeImportUsing] file cannot be located");
+				return;
+			}
+		}
+		
+		// file is sure to exist beyond this point
+		NativeImporterCommands.commenceImport(fw, f, parameters.get(1));
+	}
+
+	public String getCommandSignature() {
+		return "nativeimportusing(path,importerID)";
+	}
+
+	public String getDescription() {
+		return "Imports the contents of a file into the VIATRA2 model space.";
+	}
+
+	public String getHelpText() {
+		return "Use nativeimportusing(<<fileName>>,<<importerID>>) with workspace-relative pathname (recommended) OR absolute file name, and fully qualified importer ID.\nThis command "+getDescription();
+	}
+
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/imports/NativeImporterCommands.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/imports/NativeImporterCommands.java
new file mode 100644
index 0000000..834e99c
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/imports/NativeImporterCommands.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands.imports;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProvider;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProviderFactory;
+
+/**
+ * Simple console commandprovider factory which provides importer invocation functions
+ *  
+ * @author istvan rath
+ *
+ */
+public class NativeImporterCommands implements IVIATRAConsoleCommandProviderFactory {
+
+	public NativeImporterCommands() {
+	}
+
+	public List<IVIATRAConsoleCommandProvider> getProviders(IFramework fw) {
+		ArrayList<IVIATRAConsoleCommandProvider> ps = new ArrayList<IVIATRAConsoleCommandProvider>();
+		ps.add(new NativeImport());
+		ps.add(new NativeImportUsing());
+		return ps;
+	}
+
+	
+	protected static void commenceImport(IFramework fw, File f, String impID) {
+		try {
+			fw.nativeImport(f.getAbsolutePath(), impID);
+		} 
+		catch (Exception e) {
+			fw.getLogger().error("[NativeImporterCommands] path "+f.getAbsolutePath()+" is not importable.");
+			fw.getLogger().printStackTrace(e);
+			return;
+		}
+	}
+	
+	
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/AbstractRunnerCommand.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/AbstractRunnerCommand.java
new file mode 100644
index 0000000..6668e30
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/AbstractRunnerCommand.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands.xform;
+
+import java.util.Map;
+
+import org.eclipse.viatra2.framework.FrameworkException;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;
+
+public abstract class AbstractRunnerCommand {
+
+	
+	protected void commenceRunning(IFramework fw, Object entrypoint, String paramStr, String epName, boolean undoable) {
+		try {
+			if (!fw.isRunnable(entrypoint)) {
+				fw.getLogger().error("[RunRule] entrypoint "+epName+" is not runnable.");
+				return;
+			}
+			} catch (FrameworkException e) {
+				fw.getLogger().error("[RunRule] entrypoint "+epName+" is not runnable.");
+				fw.getLogger().printStackTrace(e);
+				return;
+			}
+			// 2. parse parameters
+			Map<String, Object> params = TransformationExecutionHelper.parseParameters(paramStr);
+			// 3. check parameter compatibility
+			if (!TransformationExecutionHelper.checkParameterCompatibility(fw, entrypoint, params)) {
+				fw.getLogger().error("[RunnerCommands] transformation parameters not compatible with machine.");
+				fw.getLogger().info("[RunnerCommands] parsed parameters: "+params.toString());
+				return;
+			}
+			// 4. run machine or rule depending on case
+			if (entrypoint instanceof Machine) {
+				TransformationExecutionHelper.runMachine(fw, (Machine)entrypoint, params, undoable);
+			}
+			else if (entrypoint instanceof Rule) {
+				TransformationExecutionHelper.runRule(fw, (Rule)entrypoint, params, undoable);
+			}
+	}
+	
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/RunMachine.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/RunMachine.java
new file mode 100644
index 0000000..12aabda
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/RunMachine.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands.xform;
+
+import java.util.List;
+
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProvider;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+
+/**
+ * VIATRA2 console command to facilitate the execution of a GTASM machine.
+ * @author istvan rath
+ *
+ */
+public class RunMachine extends AbstractRunnerCommand implements IVIATRAConsoleCommandProvider {
+
+	
+	public void executeCommand(IFramework fw, List<String> parameters) {
+		// 0. check if we have exactly two parameters
+		if (parameters.size()!=2) {
+			fw.getLogger().error("[RunMachine] Wrong number of parameters supplied.");
+			return;
+		}
+		// 1. check if machine exists in the framwork and is runnable
+		String machineFQN = parameters.get(0);
+		Machine m = (Machine)fw.getMachineByFQN(machineFQN);
+		if (m==null) {
+			fw.getLogger().error("[RunMachine] machine "+machineFQN+" not found.");
+			return;
+		}
+		commenceRunning(fw, m, parameters.get(1), m.getFqn(), false);
+	}
+
+	public String getCommandSignature() {
+		return "runmachine(machineFQN,parameterMappings)";
+	}
+
+	public String getDescription() {
+		return "Executes a GTASM Machine in a normal VIATRA2 transaction.";
+	}
+
+	public String getHelpText() {
+		return "Use runmachine(<<machine fqn>>,<<parametermapping>>) to execute a GTASM machine in a normal transaction.\n"+
+		"Parameter mappings take the following syntax: <<parametername=value>> and are separated by ; characters.\n"+
+		"Example: runmachine(helloworld, target=John;message=Hello)";
+	}
+
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/RunMachineUndoable.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/RunMachineUndoable.java
new file mode 100644
index 0000000..5a2dea1
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/RunMachineUndoable.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands.xform;
+
+import java.util.List;
+
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProvider;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+
+/**
+ * VIATRA2 console command to facilitate the execution of a GTASM machine.
+ * @author istvan rath
+ *
+ */
+public class RunMachineUndoable extends AbstractRunnerCommand implements IVIATRAConsoleCommandProvider {
+
+	
+	public void executeCommand(IFramework fw, List<String> parameters) {
+		// 0. check if we have exactly two parameters
+		if (parameters.size()!=2) {
+			fw.getLogger().error("[RunMachineUndoable] Wrong number of parameters supplied.");
+			return;
+		}
+		// 1. check if machine exists in the framwork and is runnable
+		String machineFQN = parameters.get(0);
+		Machine m = (Machine)fw.getMachineByFQN(machineFQN);
+		if (m==null) {
+			fw.getLogger().error("[RunMachineUndoable] machine "+machineFQN+" not found.");
+			return;
+		}
+		commenceRunning(fw, m, parameters.get(1), m.getFqn(), true);
+	}
+
+	public String getCommandSignature() {
+		return "runmachineundoable(machineFQN,parameterMappings)";
+	}
+
+	public String getDescription() {
+		return "Executes a GTASM Machine in an undoable VIATRA2 transaction.";
+	}
+
+	public String getHelpText() {
+		return "Use runmachineundoable(<<machine fqn>>,<<parametermapping>>) to execute a GTASM machine in an undoable transaction.\n"+
+		"Parameter mappings take the following syntax: <<parametername=value>> and are separated by ; characters.\n"+
+		"Example: runmachineundoable(helloworld, target=John;message=Hello)";
+	}
+
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/RunRule.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/RunRule.java
new file mode 100644
index 0000000..d288456
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/RunRule.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands.xform;
+
+import java.util.List;
+
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProvider;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;
+
+/**
+ * VIATRA2 console command to facilitate the execution of a GTASM machine.
+ * @author istvan rath
+ *
+ */
+public class RunRule extends AbstractRunnerCommand implements IVIATRAConsoleCommandProvider {
+
+	
+	public void executeCommand(IFramework fw, List<String> parameters) {
+		// 0. check if we have exactly two parameters
+		if (parameters.size()!=2) {
+			fw.getLogger().error("[RunRule] Wrong number of parameters supplied.");
+			return;
+		}
+		// 1. check if machine exists in the framework and is runnable
+		String ruleFQN = parameters.get(0);
+		// try to get the machine's FQN
+		// rule's name is the last segment
+		if (ruleFQN.indexOf(".")<0) {
+			fw.getLogger().error("[RunRule] rule FQN does not contain at least one dot (.)");
+			return;
+		}
+		String ruleName = ruleFQN.substring(ruleFQN.lastIndexOf(".")+1);
+		if (ruleName.length()<1) {
+			fw.getLogger().error("[RunRule] rule name empty.");
+			return;
+		}
+		String machineFQN = ruleFQN.substring(0, ruleFQN.lastIndexOf("."));
+		Machine m = (Machine)fw.getMachineByFQN(machineFQN);
+		if (m==null) {
+			fw.getLogger().error("[RunRule] machine "+machineFQN+" not found.");
+			return;
+		}
+		
+		Object entrypoint = null;
+		
+		for (Rule r : m.getAsmRuleDefinitions())
+		{
+			if (r.getName().equals(ruleName)) {
+				entrypoint = r;
+				break;
+			}
+		}
+		if (entrypoint==null) {
+			fw.getLogger().error("[RunRule] rule "+ruleName+" not found.");
+			return;
+		}
+		
+		commenceRunning(fw, entrypoint, parameters.get(1), ruleName, false);
+	}
+
+	public String getCommandSignature() {
+		return "runrule(ruleFQN,parameterMappings)";
+	}
+
+	public String getDescription() {
+		return "Executes a GTASM Rule in a normal VIATRA2 transaction.";
+	}
+
+	public String getHelpText() {
+		return "Use runrule(<<rule fqn>>,<<parametermapping>>) to execute a GTASM rule in a normal transaction.\n"+
+		"Parameter mappings take the following syntax: <<parametername=value>> and are separated by ; characters.\n"+
+		"Example: runrule(helloworld.sayhello, target=John;message=Hello)";
+	}
+
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/RunRuleUndoable.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/RunRuleUndoable.java
new file mode 100644
index 0000000..51ba426
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/RunRuleUndoable.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands.xform;
+
+import java.util.List;
+
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProvider;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;
+
+/**
+ * VIATRA2 console command to facilitate the execution of a GTASM machine.
+ * @author istvan rath
+ *
+ */
+public class RunRuleUndoable extends AbstractRunnerCommand implements IVIATRAConsoleCommandProvider {
+
+	
+	public void executeCommand(IFramework fw, List<String> parameters) {
+		// 0. check if we have exactly two parameters
+		if (parameters.size()!=2) {
+			fw.getLogger().error("[RunRuleUndoable] Wrong number of parameters supplied.");
+			return;
+		}
+		// 1. check if machine exists in the framework and is runnable
+		String ruleFQN = parameters.get(0);
+		// try to get the machine's FQN
+		// rule's name is the last segment
+		if (ruleFQN.indexOf(".")<0) {
+			fw.getLogger().error("[RunRuleUndoable] rule FQN does not contain at least one dot (.)");
+			return;
+		}
+		String ruleName = ruleFQN.substring(ruleFQN.lastIndexOf(".")+1);
+		if (ruleName.length()<1) {
+			fw.getLogger().error("[RunRuleUndoable] rule name empty.");
+			return;
+		}
+		String machineFQN = ruleFQN.substring(0, ruleFQN.lastIndexOf("."));
+		Machine m = (Machine)fw.getMachineByFQN(machineFQN);
+		if (m==null) {
+			fw.getLogger().error("[RunRuleUndoable] machine "+machineFQN+" not found.");
+			return;
+		}
+		
+		Object entrypoint = null;
+		
+		for (Rule r : m.getAsmRuleDefinitions())
+		{
+			if (r.getName().equals(ruleName)) {
+				entrypoint = r;
+				break;
+			}
+		}
+		
+		commenceRunning(fw, entrypoint, parameters.get(1), ruleName, true);
+	}
+
+	public String getCommandSignature() {
+		return "runruleundoable(ruleFQN,parameterMappings)";
+	}
+
+	public String getDescription() {
+		return "Executes a GTASM Rule in an undoable VIATRA2 transaction.";
+	}
+
+	public String getHelpText() {
+		return "Use runruleUndoable(<<rule fqn>>,<<parametermapping>>) to execute a GTASM rule in an undoable transaction.\n"+
+		"Parameter mappings take the following syntax: <<parametername=value>> and are separated by ; characters.\n"+
+		"Example: runrule(helloworld.sayhello, target=John;message=Hello)";
+	}
+
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/TransformationDebuggingCommands.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/TransformationDebuggingCommands.java
new file mode 100644
index 0000000..025dfed
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/TransformationDebuggingCommands.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands.xform;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProvider;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProviderFactory;
+
+/**
+ * Advanked console commandprovider factory which provides xform debugging functions
+ *  - runMachine
+ *  - runMachineUndoable
+ *  - runRule
+ *  - runRuleUndoable
+ *  - undoTransaction
+ *  - ...?
+ *  
+ * @author istvan rath
+ *
+ */
+public class TransformationDebuggingCommands implements IVIATRAConsoleCommandProviderFactory {
+
+	public TransformationDebuggingCommands() {
+	}
+
+	public List<IVIATRAConsoleCommandProvider> getProviders(IFramework fw) {
+		ArrayList<IVIATRAConsoleCommandProvider> ps = new ArrayList<IVIATRAConsoleCommandProvider>();
+		ps.add(new RunMachine());
+		ps.add(new RunMachineUndoable());
+		ps.add(new RunRule());
+		ps.add(new RunRuleUndoable());
+		ps.add(new UndoTransaction());
+		return ps;
+	}
+
+	
+	
+	
+	
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/TransformationExecutionHelper.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/TransformationExecutionHelper.java
new file mode 100644
index 0000000..b3b9d06
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/TransformationExecutionHelper.java
@@ -0,0 +1,257 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands.xform;
+
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.viatra2.errors.VPMRuntimeControlledException;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.FrameworkException;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.FrameworkGUIPlugin;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;
+import org.eclipse.viatra2.interpreters.IProgressReport;
+
+/**
+ * Helper class which contains utility functions that provide
+ * a (hopefully temporary) "wrapper" around the core VIATRA2 engine API to:
+ * - execute transformations
+ * - invoke GTASM rules
+ * - retrieve graph pattern matching sets
+ * 
+ * @author istvan rath
+ *
+ */
+public class TransformationExecutionHelper {
+
+	
+	
+	// phases: 
+	// 1. parameter map assembly, datatype conversion
+	// 2. set up IRunnableWithProgress
+	// 2a. if necessary, print out transaction ID for undoable transactions
+	// 3. execute through FrameworkGUIPlugin
+	
+	/**
+	 * Takes a parameter string in the key=value;key2=value2; format and provides
+	 * a key->value, key2->value structured map in return.
+	 */
+	public static Map<String, Object> parseParameters(String paramStr) {
+		TreeMap<String, Object> ret = new TreeMap<String, Object>();
+		for (String entry : paramStr.split(";")) {
+			if (entry.length()>0 && entry.indexOf("=")>-1) {
+				String key = entry.substring(0, entry.indexOf("=")); 
+				String value = entry.substring(entry.indexOf("=")+1);
+				// datatype conversion 
+				ret.put(key, convertToPassableType(value));
+			}
+		}
+		return ret;
+	}
+	
+	public static boolean checkParameterCompatibility(IFramework fw, Object m, Map<String, Object> params) {
+		String[] paramNames;
+		try {
+			paramNames = fw.getEntrypointParameters(m);
+		} catch (FrameworkException e) {
+			return false;
+		}
+		boolean ret = true;
+		if (paramNames!=null && params!=null) {
+			for (String param : paramNames) {
+				ret &= (params.get(param)!=null);
+			}
+		}
+		return ret;
+	}
+	
+	public static Object convertToPassableType(String val) {
+		Object o = val;
+		try { o = new Double(Double.parseDouble(val)); } catch (NumberFormatException e1) { }
+		try { o = new Integer(Integer.parseInt(val)); } catch (NumberFormatException e1) {}
+		//try { o = new Boolean(Boolean.parseBoolean(val)); } catch () // this is not needed for the current core
+		// no lookup performed here!
+		return o;
+	}
+	
+	static long start = 0, stop = 0;
+	
+	private static IRunnableWithProgress createRunnable(final IFramework fw, final Object entryPoint, final Map<String, Object> params, final boolean undoable) {
+		return new IRunnableWithProgress()
+		{
+			public void run(final org.eclipse.core.runtime.IProgressMonitor monitor) throws java.lang.reflect.InvocationTargetException ,InterruptedException 
+			{
+				// running phase
+				String transID = "";
+				start = 0;
+				stop = 0;
+				
+				monitor.beginTask("VIATRA2 Transformation executing", 1000000); // guess
+				if (undoable) {
+					transID = fw.getTopmodel().getTransactionManager().beginUndoableTransaction(Boolean.TRUE);
+				}
+				else {
+					transID = fw.getTopmodel().getTransactionManager().beginTransaction(Boolean.TRUE);
+				}
+				monitor.worked(2);
+				
+				Thread executor = new Thread(new Runnable() {
+					public void run() {
+						try
+						{
+						start = System.currentTimeMillis();			
+						fw.runEntrypoint(entryPoint, params, new IProgressReport(){
+							public void progress(int indicator) {
+								monitor.worked(indicator);
+							}
+						});	
+						stop = System.currentTimeMillis();
+						}
+						catch (final VPMRuntimeControlledException rex)
+						{
+							stop = System.currentTimeMillis();
+							Display.getDefault().syncExec(new Runnable(){
+							public void run() {
+								MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "VIATRA2 R3", rex.getMessage() + " (see the Error Log view for details)");							
+								}	
+							});
+						}				
+						catch (final VPMRuntimeException rex)
+						{
+							stop = System.currentTimeMillis();
+							Display.getDefault().syncExec(new Runnable(){
+							public void run() {
+								MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "VIATRA2 R3", rex.getMessage() + " (see the Error Log view for details)");							
+								}	
+							});
+						}
+					}
+				});
+				executor.setName("VIATRA2 Transformation Executor");
+				executor.start();
+				
+				boolean killed = false;
+				
+				while(true) {
+					Thread.sleep(200);
+					if (monitor.isCanceled()) {
+						// user requested a cancellation
+						if (executor.isAlive()) {
+							//executor.interrupt(); // try to interrupt execution
+							executor.stop();// hard stop
+							executor.join();
+							stop = System.currentTimeMillis();
+							fw.getTopmodel().getTransactionManager().commitCompositeTransaction();
+							fw.getLogger().info("Transformation engine ran for "+(stop-start)+" milliseconds.");
+							fw.getLogger().warning("User abort");
+							if (undoable) {
+								fw.getTopmodel().getTransactionManager().undoTransaction(transID);
+								fw.getLogger().info("Transaction undone.");
+							}
+							monitor.done();
+							killed = true;
+							break;
+						}
+						else {
+							// canceled, but the executor has already finished
+							break;
+						}
+					}
+					if (!executor.isAlive()) {
+						break;
+					}
+				}
+				if (!killed) {
+					// transformation has finished
+					fw.getTopmodel().getTransactionManager().commitTransaction();
+					monitor.done();
+					fw.getLogger().info("Transformation engine ran for "+(stop-start)+" milliseconds.");
+					if (undoable) {
+						fw.getLogger().info("Transformation transaction ID: "+transID);
+					}
+				}	 
+			}
+		};
+	}
+	
+	
+	private static IRunnableWithProgress _createRunnable(final IFramework fw, final Object entryPoint, final Map<String, Object> params, final boolean undoable) {
+		return new IRunnableWithProgress()
+		{
+			public void run(final org.eclipse.core.runtime.IProgressMonitor monitor) throws java.lang.reflect.InvocationTargetException ,InterruptedException 
+			{
+				// running phase
+				long start = 0;
+				String transID = "";
+				try
+				{
+					monitor.beginTask("VIATRA2 Transformation executing", 1000000); // guess
+					start = System.currentTimeMillis();
+					if (undoable) {
+						transID = fw.getTopmodel().getTransactionManager().beginUndoableTransaction(Boolean.TRUE);
+					}
+					else {
+						transID = fw.getTopmodel().getTransactionManager().beginTransaction(Boolean.TRUE);
+					}
+					monitor.worked(2);
+					fw.runEntrypoint(entryPoint, params, new IProgressReport(){
+						public void progress(int indicator) {
+							monitor.worked(indicator);
+						}
+					}); 
+				}
+				catch (final VPMRuntimeControlledException rex)
+				{
+					Display.getDefault().syncExec(new Runnable(){
+					public void run() {
+						MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "VIATRA2 R3", rex.getMessage() + " (see the Error Log view for details)");							
+						}	
+					});
+				}				
+				catch (final VPMRuntimeException rex)
+				{
+					Display.getDefault().syncExec(new Runnable(){
+					public void run() {
+						MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "VIATRA2 R3", rex.getMessage() + " (see the Error Log view for details)");							
+						}	
+					});
+				}
+				finally
+				{
+					fw.getTopmodel().getTransactionManager().commitTransaction();
+					long stop = System.currentTimeMillis();
+					monitor.done();
+					fw.getLogger().info("Transformation engine ran for "+(stop-start)+" milliseconds.");
+					if (undoable) {
+						fw.getLogger().info("Transformation transaction ID: "+transID);
+					}
+				}	
+			}
+		};
+	}
+	
+	
+	public static void runRule(final IFramework fw, final Rule r, final Map<String, Object> params, final boolean undoable) {
+		FrameworkGUIPlugin.runAsLongTransaction(createRunnable(fw, r, params, undoable), "VIATRA2 Transformation: "+r.getFqn(), fw);
+	}
+	
+	
+	public static void runMachine(final IFramework fw, final Machine m, final Map<String, Object> params, final boolean undoable) {
+		FrameworkGUIPlugin.runAsLongTransaction(createRunnable(fw, m, params, undoable), "VIATRA2 Transformation: "+m.getFqn(), fw);
+	}
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/UndoTransaction.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/UndoTransaction.java
new file mode 100644
index 0000000..d4e8680
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/console/commands/xform/UndoTransaction.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.console.commands.xform;
+
+import java.util.List;
+
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.views.console.commands.IVIATRAConsoleCommandProvider;
+
+/**
+ * VIATRA2 console command to facilitate the undo transaction operation.
+ * @author istvan rath
+ *
+ */
+public class UndoTransaction implements IVIATRAConsoleCommandProvider {
+
+	
+	public void executeCommand(IFramework fw, List<String> parameters) {
+		// 0. check if we have exactly two parameters
+		if (parameters.size()!=1) {
+			fw.getLogger().error("[UndoTransaction] Wrong number of parameters supplied. Expected: 1, received: "+parameters.size());
+			return;
+		}
+		String transID = parameters.get(0);
+		fw.getTopmodel().getTransactionManager().undoTransaction(transID);
+	}
+
+	public String getCommandSignature() {
+		return "undotransaction(transactionID)";
+	}
+
+	public String getDescription() {
+		return "Rolls back the VIATRA2 modelspace to the state before the transaction with the given ID was executed.";
+	}
+
+	public String getHelpText() {
+		return "Use undotransaction(<<transactionID>>) to undo the effects of a previously executed undoable transaction.\nThis command "+getDescription();
+	}
+
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/layout/SimpleBorderLayout.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/layout/SimpleBorderLayout.java
new file mode 100644
index 0000000..686ded0
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/views/layout/SimpleBorderLayout.java
@@ -0,0 +1,151 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010, Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.frameworkgui.views.layout;
+
+import java.awt.Dimension;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Layout;
+
+/**
+ * AWT-style border layout for SWT.
+ * 
+ * Completely rewritten by Istvan Rath, April 26, 2010.
+ * 
+ */
+public class SimpleBorderLayout extends Layout {
+
+	
+	protected Point getPreferredSize(Control control, int wHint, int hHint, boolean changed) {
+		Dimension dim = (Dimension) control.getData("preferredSize");
+		if (dim != null) {
+			return new Point(dim.width, dim.height);
+		}
+		return control.computeSize(wHint, hHint, changed);
+	}
+	
+	public final static Integer CENTER = 0;
+	public final static Integer EAST = 1;
+	public final static Integer NORTH = 2;
+	public final static Integer SOUTH = 3;
+	public final static Integer WEST = 4;
+	
+	private Control centerElem, eElem, nElem, sElem, wElem;
+
+	public SimpleBorderLayout() {
+		super();
+	}
+
+	/**
+	 * Computes the size of our composite.
+	 */
+	protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
+		// init references to children
+		getChildLayout(composite);
+		Point base = new Point(0, 0);
+		Point pref;
+		if (sElem != null) 
+		{
+			pref=getPreferredSize(sElem, wHint, SWT.DEFAULT, flushCache);
+			base.y+=pref.y;
+		}
+		if (nElem != null) 
+		{
+			pref=getPreferredSize(nElem, wHint, SWT.DEFAULT, flushCache);
+			base.y+=pref.y;
+		}
+		if (eElem != null) 
+		{
+			pref=getPreferredSize(eElem, SWT.DEFAULT, hHint, flushCache);
+			base.x+=pref.x;
+		}
+		if (wElem != null) 
+		{
+			pref=getPreferredSize(wElem, SWT.DEFAULT, hHint, flushCache);
+			base.x+=pref.x;
+		}
+		if (centerElem != null) 
+		{
+			pref=getPreferredSize(centerElem, wHint, hHint, flushCache);
+			base.x+=pref.x;
+			base.y+=pref.y;
+		}
+		return base;
+	}
+
+	protected void layout(Composite composite, boolean flushCache) 
+	{
+		getChildLayout(composite);
+		Rectangle bounds = composite.getClientArea();
+		int t = bounds.y;
+		int b = bounds.y + bounds.height;
+		int l = bounds.x;
+		int r = bounds.x + bounds.width;
+
+		Point preferredSize;
+		if (nElem != null) {
+			preferredSize = getPreferredSize(nElem, bounds.width,SWT.DEFAULT, flushCache);
+			nElem.setBounds(l, t, r-l, preferredSize.y);
+			t+=preferredSize.y;
+		}
+		if (sElem != null) {
+			preferredSize = getPreferredSize(sElem, bounds.width, SWT.DEFAULT, flushCache);
+			sElem.setBounds(l, b-preferredSize.y, r-l,preferredSize.y);
+			b -= preferredSize.y;
+		}
+		if (wElem != null) {
+			preferredSize = getPreferredSize(wElem, SWT.DEFAULT, b-t, flushCache);
+			wElem.setBounds(l, t, preferredSize.x, b-t);
+			l += preferredSize.x;
+		}
+		if (eElem != null) {
+			preferredSize = getPreferredSize(eElem, SWT.DEFAULT, b-t, flushCache);
+			eElem.setBounds(r - preferredSize.x, t, preferredSize.x,b-t);
+			r -= preferredSize.x;
+		}
+		if (centerElem != null) {
+			centerElem.setBounds(l, t, r-l, b-t);
+		}
+	}
+
+	/**
+	 * Initialize member references to children controls.
+	 */
+	private void getChildLayout(Composite composite) {
+		nElem = sElem = eElem = wElem = centerElem = null;
+		Control[] children = composite.getChildren();
+		for (int i = 0; i < children.length; i++) {
+			Integer layoutData = (Integer) children[i].getLayoutData();
+			switch (layoutData) {
+			default:
+				case 0: // center 				
+					centerElem = children[i]; break;
+				case 1: // east
+					eElem = children[i]; break;
+				case 2: // north
+					nElem = children[i]; break;
+				case 3: // south
+					sElem = children[i]; break;
+				case 4: // west
+					wElem = children[i]; break;
+			}
+		}
+	}
+
+
+
+
+}
diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/wizards/NewVIATRAWizard.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/wizards/NewVIATRAWizard.java
new file mode 100644
index 0000000..5e73d3b
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/wizards/NewVIATRAWizard.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.wizards;

+

+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.codegen.jet.JETException;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
+import org.eclipse.viatra2.frameworkgui.FrameworkGUIPlugin;
+import org.eclipse.viatra2.frameworkgui.wizards.jet.JETGateway;
+import org.eclipse.viatra2.frameworkgui.wizards.model.FileTemplateExtension;
+import org.eclipse.viatra2.frameworkgui.wizards.ui.TemplateSelectionPage;
+import org.eclipse.viatra2.frameworkgui.wizards.ui.VIATRANewFileCreationPage;
+

+public abstract class NewVIATRAWizard extends Wizard implements INewWizard {

+

+	String iKind;

+

+	public NewVIATRAWizard(String aKind) {

+		iKind = aKind;

+	}

+

+	@Override

+	public boolean canFinish() {

+		if (iMainPage!=null)

+			return iMainPage.isPageComplete();

+		else

+			return false;

+	}

+	

+	protected IStructuredSelection iSelection;

+

+	private IWorkbench mWorkbench;

+

+

+	public void init(IWorkbench workbench, IStructuredSelection selection) {

+		iSelection = selection;

+		mWorkbench = workbench;

+		setWindowTitle("Create a new VIATRA2 " + iKind.toUpperCase() + " file");

+	}

+

+	protected VIATRANewFileCreationPage iMainPage;

+

+	protected TemplateSelectionPage iSelectionPage;

+

+	@Override

+	public void addPages() {

+		iMainPage = new VIATRANewFileCreationPage(iKind, iSelection);

+		addPage(iMainPage);

+		iSelectionPage = new TemplateSelectionPage(iKind);

+		addPage(iSelectionPage);

+	}

+	

+	IFile newFile;

+	

+	protected void finishPage(IProgressMonitor monitor)	throws InterruptedException, CoreException 

+	{

+

+		if (newFile != null)

+		{

+			if (iSelectionPage.getSelectedTemplate()!=null)

+			{

+				// get the selected template

+				FileTemplateExtension template = iSelectionPage.getSelectedTemplate();

+				JETGateway gw = new JETGateway(template);

+				String result;

+				try {

+					result = gw.generate(monitor);

+					gw.save(newFile, monitor, result.getBytes());

+					

+					// try to delete .JETEmitters project

+					ResourcesPlugin.getWorkspace().getRoot().getProject(".JETEmitters").delete(true, true, monitor);

+				} catch (JETException e) {

+					FrameworkGUIPlugin.log(e);

+				}
+				catch (Exception e)
+				{
+					e.printStackTrace();
+				}

+			}

+			selectAndReveal(newFile);

+			openResource(newFile);

+		}

+	}

+

+	/*

+	 * @see Wizard#performFinish

+	 */

+	public boolean performFinish() {

+		// Check main page completion

+		if (!iMainPage.isPageComplete())

+			return false;

+

+		// Check selection page completion

+		//if (!iSelectionPage.isPageComplete())

+		//	return false;

+

+		// Create new file

+		String basefn = iMainPage.getFileName();

+		if (!basefn.endsWith("." + iKind.toLowerCase()))

+			iMainPage.setFileName(basefn + "." + iKind.toLowerCase());

+		newFile = iMainPage.createNewFile();

+		

+		IWorkspaceRunnable op = new IWorkspaceRunnable() {

+			public void run(IProgressMonitor monitor) throws CoreException,

+					OperationCanceledException {

+				try {

+					finishPage(monitor);

+				} catch (InterruptedException e) {

+					throw new OperationCanceledException(e.getMessage());

+				}

+			}

+		};

+

+		try {

+			getContainer().run(false, true, new WorkbenchRunnableAdapter(op));

+		} catch (InvocationTargetException e) {

+			handleFinishException(getShell(), e);

+			return false;

+		} catch (InterruptedException e) {

+			return false;

+		}

+		return true;

+	}

+

+	/**

+	 * An <code>IRunnableWithProgress</code> that adapts

+	 * <code>IWorkspaceRunnable</code> so that it can be executed inside

+	 * <code>IRunnableContext</code>.<code>OperationCanceledException</code>

+	 * thrown by the apapted runnabled are caught and rethrown as a

+	 * <code>InterruptedException</code>.

+	 */

+	private static class WorkbenchRunnableAdapter implements

+			IRunnableWithProgress {

+

+		private IWorkspaceRunnable fWorkspaceRunnable;

+

+		public WorkbenchRunnableAdapter(IWorkspaceRunnable runnable) {

+			fWorkspaceRunnable = runnable;

+		}

+

+		/*

+		 * @see IRunnableWithProgress#run(IProgressMonitor)

+		 */

+		public void run(IProgressMonitor monitor)

+				throws InvocationTargetException, InterruptedException {

+			try {

+				ResourcesPlugin.getWorkspace().run(fWorkspaceRunnable, monitor);

+			} catch (OperationCanceledException e) {

+				throw new InterruptedException(e.getMessage());

+			} catch (CoreException e) {

+				throw new InvocationTargetException(e);

+			}

+		}

+	}

+

+	protected void handleFinishException(Shell shell, InvocationTargetException e) {

+		String exceptionMessage = "Error while generating the VIATRA2 file.";

+		if (e.getCause() != null && e.getCause().getMessage() != null) {

+			exceptionMessage = e.getCause().getMessage();

+		} else if (e.getMessage() != null) {

+			exceptionMessage = e.getMessage();

+		}

+

+		IStatus status = new Status(IStatus.ERROR, FrameworkGUIPlugin.getPluginId(), IStatus.ERROR, exceptionMessage, e);

+		FrameworkGUIPlugin.log(status);

+

+		String title = "Error"; //$NON-NLS-1$

+		String message = "Error happened while invoking the JET engine."; //$NON-NLS-1$

+		ErrorDialog.openError(shell, title, message, status);

+	}

+

+	protected void openResource(final IResource resource) {

+		if (resource.getType() == IResource.FILE) {

+			final IWorkbenchPage activePage = FrameworkGUIPlugin.getActivePage();

+			if (activePage != null) {

+				final Display display = getShell().getDisplay();

+				if (display != null) {

+					display.asyncExec(new Runnable() {

+						public void run() {

+							try {

+								IDE.openEditor(activePage, (IFile) resource,

+										true);

+							} catch (PartInitException e) {

+								FrameworkGUIPlugin.log(e);

+							}

+						}

+					});

+				}

+			}

+		}

+	}

+

+	protected void selectAndReveal(IResource newResource) {

+		BasicNewResourceWizard.selectAndReveal(newResource, mWorkbench

+				.getActiveWorkbenchWindow());

+	}

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/wizards/jet/JETGateway.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/wizards/jet/JETGateway.java
new file mode 100644
index 0000000..79b5c55
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/wizards/jet/JETGateway.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.wizards.jet;

+

+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.emf.codegen.jet.JETEmitter;
+import org.eclipse.emf.codegen.jet.JETException;
+import org.eclipse.viatra2.frameworkgui.wizards.model.FileTemplateExtension;
+

+/**

+ * This class encapsulates access to the JET engine.

+ * 

+ * @author Istvan Rath based on work by Remko Popma

+ */

+public class JETGateway {

+

+	private FileTemplateExtension template = null;

+

+	public JETGateway(FileTemplateExtension t) {

+		template = t;

+	}

+

+	/**

+	 * Invokes the JET template specified in the <code>Config</code> with the

+	 * model specified in the <code>Config</code> and returns the generated text

+	 * as a String.

+	 * <p>

+	 * This implementation uses a <code>JETEmitter</code> to translate the

+	 * template to a Java implementation class. The translated class is created

+	 * in a hidden project called <code>.JETEmitters</code>.

+	 * <p>

+	 * In order to be able to compile the translated template implementation

+	 * class, the classes used by the model specified in the <code>Config</code>

+	 * must be available in the classpath. For this reason, this method sets the

+	 * first runtime library of the plugin specified in the <code>Config</code>

+	 * as a classpath variable to the <code>.JETEmitters</code> project.

+	 * 

+	 * @param monitor

+	 *            the progress monitor to use. May be <code>null</code>.

+	 * @return the source code text generated by the JET template

+	 * @throws CoreException

+	 * @throws JETException

+	 */

+	public String generate(IProgressMonitor monitor) throws CoreException,

+			JETException {

+		monitor = createIfNull(monitor);

+

+		String pluginId = template.contributorID;

+		String base = Platform.getBundle(pluginId).getEntry("/").toString();

+		String relativeUri = template.templateFile;

+

+		JETEmitter emitter = new JETEmitter(base + relativeUri, getClass()

+				.getClassLoader());

+

+		IProgressMonitor sub = new SubProgressMonitor(monitor, 1);

+		try {

+			//String result = emitter.generate(sub, template.params.toArray());

+			String result = emitter.generate(sub, new Object[]{template.getParameterMap()});

+			monitor.worked(1);

+			return result;	

+		} catch (Exception e)

+		{

+			e.printStackTrace();

+		}

+		return "";

+	}

+

+	/**

+	 * Saves the specified contents to a location specified by the

+	 * <code>Config</code> settings. The location of the file to save is found

+	 * by finding or creating the container (folder) for the <code>Config</code>

+	 * 's package in the <code>Config</code>'s target folder. The name of the

+	 * file to save is the <code>Config</code>'s target file.

+	 * 

+	 * @param monitor

+	 *            the progress monitor to use. May be <code>null</code>.

+	 * @param contents

+	 *            the byte contents of the file to save

+	 * @throws CoreException

+	 */

+	public void save(IFile targetFile, IProgressMonitor monitor, byte[] contents)

+			throws CoreException {

+		monitor = createIfNull(monitor);

+

+		InputStream newContents = new ByteArrayInputStream(contents);

+		if (targetFile.exists()) {

+			targetFile.setContents(newContents, true, true,

+					new SubProgressMonitor(monitor, 1));

+		} else {

+			targetFile.create(newContents, true, new SubProgressMonitor(

+					monitor, 1));

+		}

+	}

+

+	/**

+	 * Returns a non-null progress monitor.

+	 * 

+	 * @param monitor

+	 *            an existing progress monitor

+	 * @return a new <code>NullProgressMonitor</code> if the specified monitor

+	 *         is <code>null</code>, or the existing monitor otherwise

+	 */

+	private IProgressMonitor createIfNull(IProgressMonitor monitor) {

+		if (monitor == null) {

+			return new NullProgressMonitor();

+		}

+		return monitor;

+	}

+

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/wizards/model/FileTemplateExtension.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/wizards/model/FileTemplateExtension.java
new file mode 100644
index 0000000..b789c2b
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/wizards/model/FileTemplateExtension.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.wizards.model;

+

+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+

+/**

+ * DTO class to pass parameters to the UI and then to the JET engine.

+ * @author Istvan Rath

+ *

+ */

+public class FileTemplateExtension 

+{

+	public class TemplateParameter

+	{

+		public String name="";

+		public String defaultValue="";

+		public String value="";

+		public String description="";

+	}

+	

+	public String name="";

+	public String extension="";

+	public String templateFile="";

+	public String desc="";

+	public String contributorID="";

+	

+	public Set<TemplateParameter> params=new HashSet<TemplateParameter>();

+	

+	@Override

+	public String toString() 

+	{

+		return name + " (" + desc + ")";

+	}

+	

+	public Map<String, String> getParameterMap()

+	{

+		HashMap<String, String> r = new HashMap<String, String>();

+		for (TemplateParameter tp : params)

+		{

+			r.put(tp.name, tp.value);

+		}

+		return r;

+	}

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/wizards/ui/TemplateSelectionPage.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/wizards/ui/TemplateSelectionPage.java
new file mode 100644
index 0000000..074030d
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/wizards/ui/TemplateSelectionPage.java
@@ -0,0 +1,243 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.wizards.ui;

+

+import java.util.ArrayList;
+
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.viatra2.frameworkgui.FrameworkGUIPlugin;
+import org.eclipse.viatra2.frameworkgui.wizards.model.FileTemplateExtension;
+import org.eclipse.viatra2.frameworkgui.wizards.model.FileTemplateExtension.TemplateParameter;
+

+public class TemplateSelectionPage extends WizardPage {

+

+	

+	String extension;

+	

+	public TemplateSelectionPage(String aKind) 

+	{

+		super("Select a "+aKind.toUpperCase()+" template");

+		extension = aKind;

+	}

+

+	protected ListViewer templateList;

+	

+	protected TableViewer parameterTable;

+	

+	protected FileTemplateExtension template;

+	

+	

+	public void createControl(Composite parent) {

+		SashForm sash = new SashForm(parent, SWT.BORDER|SWT.VERTICAL);

+		

+		templateList = new ListViewer(sash, SWT.SINGLE);

+		templateList.setLabelProvider(new LabelProvider());		

+		templateList.setContentProvider(new IStructuredContentProvider(){

+			

+			public void dispose() {}

+			

+			public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}

+			

+			public Object[] getElements(Object inputElement) 

+			{

+				ArrayList<FileTemplateExtension> r = new ArrayList<FileTemplateExtension>();

+				for (FileTemplateExtension ex : FrameworkGUIPlugin.getDefault().getFileTemplates())

+				{

+					if (ex.extension.toLowerCase().equals(TemplateSelectionPage.this.extension.toLowerCase()))

+					{

+						r.add(ex);

+					}

+				}				

+				return r.toArray();

+			}

+		});

+		templateList.setInput(FrameworkGUIPlugin.getDefault());

+		templateList.addSelectionChangedListener(new ISelectionChangedListener(){

+			

+			public void selectionChanged(SelectionChangedEvent event) 

+			{

+				if (event.getSelection() instanceof IStructuredSelection)

+				{

+					Object o = ((IStructuredSelection)event.getSelection()).getFirstElement();

+					if (o instanceof FileTemplateExtension)

+					{

+						template = (FileTemplateExtension)o;

+						parameterTable.setInput(template);

+					}

+				}

+			}

+		});

+		

+		parameterTable = new TableViewer(sash, SWT.DEFAULT);

+		TableLayout tlay = new TableLayout();

+		tlay.addColumnData(new ColumnWeightData(30, true));

+		tlay.addColumnData(new ColumnWeightData(30, true));

+		tlay.addColumnData(new ColumnWeightData(40, true));

+		parameterTable.getTable().setLayout(tlay);

+		TableColumn keyC  =new TableColumn(parameterTable.getTable(),SWT.LEFT);

+		keyC.setText("Parameter name");

+		TableColumn defvalC  =new TableColumn(parameterTable.getTable(),SWT.LEFT);

+		defvalC.setText("Default Value");

+		TableColumn valC  =new TableColumn(parameterTable.getTable(),SWT.LEFT);

+		valC.setText("Actual Value");

+		

+		parameterTable.getTable().setHeaderVisible(true);

+		parameterTable.getTable().setLinesVisible(true);

+		parameterTable.setLabelProvider(new ITableLabelProvider(){

+			

+			public Image getColumnImage(Object element, int columnIndex) 

+			{

+				return null;

+			}

+

+			

+			public String getColumnText(Object element, int columnIndex) {

+				switch (columnIndex)

+				{

+				case 0: // display parameter name

+					return ((FileTemplateExtension.TemplateParameter)element).name;

+				case 1: // default value

+					return ((FileTemplateExtension.TemplateParameter)element).defaultValue;

+				default:

+				case 2:

+					return ((FileTemplateExtension.TemplateParameter)element).value;

+				}

+			}

+

+			

+			public void addListener(ILabelProviderListener listener) {}

+

+			

+			public void dispose() {}

+

+			

+			public boolean isLabelProperty(Object element, String property) {return false;}

+

+			

+			public void removeListener(ILabelProviderListener listener) {}

+			

+		});

+		parameterTable.setContentProvider(new IStructuredContentProvider(){

+

+			

+			public Object[] getElements(Object element) {

+				Object t = element;

+				if (element instanceof IStructuredSelection)

+				{

+					t = ((IStructuredSelection)element).getFirstElement();

+				}

+				

+				if (t instanceof FileTemplateExtension)

+				{

+					return ((FileTemplateExtension)t).params.toArray();

+				}

+				

+				return null;

+			}

+

+			

+			public void dispose() {}

+

+			

+			public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}

+			

+		});

+		// TODO add cell editing support

+		parameterTable.setCellEditors(new TextCellEditor[]

+        {

+				new TextCellEditor(parameterTable.getTable()),

+				new TextCellEditor(parameterTable.getTable()),

+				new TextCellEditor(parameterTable.getTable())

+		}

+		);

+		parameterTable.setColumnProperties(new String[]{"name","def","value"});

+		parameterTable.setCellModifier(new ICellModifier(){

+

+			

+			public boolean canModify(Object element, String property) 

+			{

+				return "value".equals(property);

+			}

+

+			

+			public Object getValue(Object element, String property) 

+			{

+				if ("value".equals(property))

+					return ((FileTemplateExtension.TemplateParameter)element).value;

+				return null;

+			}

+

+			

+			public void modify(Object element, String property, Object value) 

+			{

+				if ("value".equals(property))

+				{

+					FileTemplateExtension.TemplateParameter p = null;

+					if (element instanceof TableItem)

+					{

+						p = (TemplateParameter) ((TableItem)element).getData();

+					}

+					else

+						p = (TemplateParameter) element;

+					

+					template.params.remove(p);

+					TemplateParameter _p = template.new TemplateParameter();

+					_p.name = p.name;

+					_p.value = value.toString();

+					_p.defaultValue = p.defaultValue;

+					_p.description = p.description;

+					template.params.add(_p);

+					

+					parameterTable.refresh();

+				}

+			}

+			

+		});

+		

+		setDescription("Select the template to use for the new file");

+		sash.setWeights(new int[]{2,1});

+		setControl(sash);

+	}

+

+	

+	public boolean isPageComplete() 

+	{

+		return template!=null;

+	}

+	

+	public FileTemplateExtension getSelectedTemplate()

+	{

+		return template;

+	}

+	

+	

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/wizards/ui/VIATRANewFileCreationPage.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/wizards/ui/VIATRANewFileCreationPage.java
new file mode 100644
index 0000000..4c5686f
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/frameworkgui/wizards/ui/VIATRANewFileCreationPage.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.frameworkgui.wizards.ui;

+

+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+

+public class VIATRANewFileCreationPage extends WizardNewFileCreationPage 

+{

+	public VIATRANewFileCreationPage(String aKind, IStructuredSelection selection) 

+	{

+		super("This wizard creates a new "+aKind.toUpperCase()+" file.", selection);

+		setMessage("Enter the name of the new "+aKind.toUpperCase()+" file.");

+		setFileName("example."+aKind.toLowerCase());

+	}

+}

diff --git a/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/gui/perspectives/VIATRAPerspective.java b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/gui/perspectives/VIATRAPerspective.java
new file mode 100644
index 0000000..cc3ded9
--- /dev/null
+++ b/org.eclipse.viatra2.gui/src/org/eclipse/viatra2/gui/perspectives/VIATRAPerspective.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Istvan Rath and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.gui.perspectives;

+

+import org.eclipse.ui.IFolderLayout;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+

+/**
+ * Class that customizes the Eclipse UI to form the VIATRA perspective.
+ * @author istvan rath
+ *
+ */

+public class VIATRAPerspective implements IPerspectiveFactory {

+

+	private IPageLayout factory;

+

+	public VIATRAPerspective() {

+		super();

+	}

+

+	public void createInitialLayout(IPageLayout factory) {

+		this.factory = factory;

+		addViews();

+		addNewWizardShortcuts();

+		addViewShortcuts();

+	}

+

+	private void addViews() {

+		// Creates the overall folder layout. 

+		// Note that each new Folder uses a percentage of the remaining EditorArea.

+		

+

+

+		IFolderLayout topLeft =

+			factory.createFolder(

+				"topLeft", //NON-NLS-1

+				IPageLayout.LEFT,

+				0.25f,

+				factory.getEditorArea());

+		topLeft.addView(IPageLayout.ID_RES_NAV);

+		

+		IFolderLayout bottomLeft =

+			factory.createFolder(

+				"bottomLeft", //NON-NLS-1

+				IPageLayout.BOTTOM,

+				0.75f,

+				"topLeft");

+		bottomLeft.addView("org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView"); //NON-NLS-1

+		

+		

+		IFolderLayout bottom =

+			factory.createFolder(

+				"bottomRight", //NON-NLS-1

+				IPageLayout.BOTTOM,

+				0.75f,

+				factory.getEditorArea());

+		bottom.addView("org.eclipse.viatra2.gui.codebufferview");
+		

+		bottom.addView("org.eclipse.viatra2.gui.console");
+		bottom.addView(IPageLayout.ID_PROP_SHEET);

+		bottom.addView(IPageLayout.ID_PROBLEM_VIEW);

+	

+		IFolderLayout topRight =

+			factory.createFolder(

+				"topRight", //NON-NLS-1

+				IPageLayout.RIGHT,

+				0.80f,

+				factory.getEditorArea());

+		topRight.addView(IPageLayout.ID_OUTLINE);

+		

+		

+		//factory.addFastView("org.eclipse.team.ccvs.ui.RepositoriesView",0.50f); //NON-NLS-1

+		factory.addFastView("org.eclipse.team.sync.views.SynchronizeView", 0.50f); //NON-NLS-1

+		factory.addFastView("org.eclipse.pde.runtime.LogView");

+	}

+

+	private void addNewWizardShortcuts() {

+		factory.addNewWizardShortcut("org.eclipse.viatra2.editor.newVPMLWizard");//NON-NLS-1

+		factory.addNewWizardShortcut("org.eclipse.viatra2.editor.text.wizard.vtcl");//NON-NLS-1

+		factory.addNewWizardShortcut("org.eclipse.viatra2.editor.text.wizard.vtml");//NON-NLS-1

+	}

+

+	private void addViewShortcuts() {

+		factory.addShowViewShortcut("org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView"); //NON-NLS-1

+		factory.addShowViewShortcut("org.eclipse.viatra2.gui.codebufferview"); //NON-NLS-1
+		factory.addShowViewShortcut("org.eclipse.viatra2.gui.console"); //NON-NLS-1
+		

+		//factory.addShowViewShortcut(JavaUI.ID_PACKAGES);

+		factory.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);

+		factory.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);

+		factory.addShowViewShortcut(IPageLayout.ID_OUTLINE);

+	}

+

+}

diff --git a/org.eclipse.viatra2.help/.project b/org.eclipse.viatra2.help/.project
new file mode 100644
index 0000000..3b6caf4
--- /dev/null
+++ b/org.eclipse.viatra2.help/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<projectDescription>

+	<name>org.eclipse.viatra2.help</name>

+	<comment></comment>

+	<projects>

+	</projects>

+	<buildSpec>

+	</buildSpec>

+	<natures>

+	</natures>

+</projectDescription>

diff --git a/org.eclipse.viatra2.help/META-INF/MANIFEST.MF b/org.eclipse.viatra2.help/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..230afb5
--- /dev/null
+++ b/org.eclipse.viatra2.help/META-INF/MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.viatra2.help;singleton=true
+Bundle-Version: 3.3.0.qualifier
+Bundle-Name: VIATRA2 R3.1 Help
+Bundle-Vendor: BUTE-DMIS / OptXware LLC
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.viatra2.help/ViatraSpecification.html b/org.eclipse.viatra2.help/ViatraSpecification.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/org.eclipse.viatra2.help/ViatraSpecification.html
diff --git a/org.eclipse.viatra2.help/about.html b/org.eclipse.viatra2.help/about.html
new file mode 100644
index 0000000..1262b8c
--- /dev/null
+++ b/org.eclipse.viatra2.help/about.html
@@ -0,0 +1,28 @@
+<!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>About</title>

+</head>

+<body lang="EN-US">

+<h2>About This Content</h2>

+ 

+<p>July 4th, 2008</p>	

+<h3>License</h3>

+

+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 

+indicated below, the Content 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 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>If you did not receive this Content directly from the Eclipse Foundation, the Content is 

+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may

+apply to your use of any object code in the Content.  Check the Redistributor's license that was 

+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise

+indicated below, the terms and conditions of the EPL still apply to any source code in the Content

+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>

+

+</body>

+</html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/build.properties b/org.eclipse.viatra2.help/build.properties
new file mode 100644
index 0000000..ba2dc5d
--- /dev/null
+++ b/org.eclipse.viatra2.help/build.properties
@@ -0,0 +1,121 @@
+bin.includes = META-INF/,\
+               ViatraSpecification.html,\
+               about.html,\
+               def_ActualParameter.html,\
+               def_Annotation.html,\
+               def_AnnotationLiteral.html,\
+               def_ArithmeticTerm.html,\
+               def_AsmConstant.html,\
+               def_AsmFunctionDef.html,\
+               def_AsmFunctionLocation.html,\
+               def_AsmRuleDef.html,\
+               def_AsmRuleInvoc.html,\
+               def_BaseArithmeticTerm.html,\
+               def_BaseLogicalTerm.html,\
+               def_BooleanConstant.html,\
+               def_CallRule.html,\
+               def_CheckCondition.html,\
+               def_ChooseRule.html,\
+               def_CompoundRule.html,\
+               def_ConjLogicalTerm.html,\
+               def_ConstrainedVariableList.html,\
+               def_ContainmentConstraint.html,\
+               def_CopyRule.html,\
+               def_CreateRule.html,\
+               def_DeleteRule.html,\
+               def_DirectedFormalParameter.html,\
+               def_ElementUpdateRule.html,\
+               def_Entity.html,\
+               def_FailRule.html,\
+               def_FloatConstant.html,\
+               def_FloatLiteral.html,\
+               def_ForallRule.html,\
+               def_FormalParameter.html,\
+               def_GTRuleCall.html,\
+               def_GTRuleDef.html,\
+               def_GraphPatternCall.html,\
+               def_GraphPatternDef.html,\
+               def_Identifier.html,\
+               def_IfRule.html,\
+               def_InitialValue.html,\
+               def_IntConstant.html,\
+               def_IntegerLiteral.html,\
+               def_IterateRule.html,\
+               def_LetRule.html,\
+               def_LogRule.html,\
+               def_LogicalTerm.html,\
+               def_Machine.html,\
+               def_ModelElementConstant.html,\
+               def_ModelElementName.html,\
+               def_ModelManipulationRule.html,\
+               def_MoveRule.html,\
+               def_MultArithmeticTerm.html,\
+               def_MultiplicityConstant.html,\
+               def_NameLiteral.html,\
+               def_NamespaceDefinition.html,\
+               def_NamespaceImport.html,\
+               def_NegativePattern.html,\
+               def_ParallelRule.html,\
+               def_PatternBody.html,\
+               def_PatternComposition.html,\
+               def_PatternVariable.html,\
+               def_PatternVariableAssignment.html,\
+               def_PredefinedFunctionCall.html,\
+               def_PrintRule.html,\
+               def_RandomRule.html,\
+               def_Relation.html,\
+               def_Relationship.html,\
+               def_SequentialRule.html,\
+               def_SimpleRule.html,\
+               def_SkipRule.html,\
+               def_StringConstant.html,\
+               def_StringLiteral.html,\
+               def_Term.html,\
+               def_Token.html,\
+               def_TryRule.html,\
+               def_UnaryArithmeticTerm.html,\
+               def_UndefinedValue.html,\
+               def_UpdateRule.html,\
+               def_UpperCaseLiteral.html,\
+               def_VTCLKeywords.html,\
+               def_Variable.html,\
+               def_VtclFile.html,\
+               images/,\
+               index.html,\
+               plugin.xml,\
+               sec_ASMArithmeticTerms.html,\
+               sec_ASMCompoundRules.html,\
+               sec_ASMConstants.html,\
+               sec_ASMFunctions.html,\
+               sec_ASMLogicalTerms.html,\
+               sec_ASMModelManipulationRules.html,\
+               sec_ASMRules.html,\
+               sec_ASMSimpleRules.html,\
+               sec_ASMTerms.html,\
+               sec_ASMTermsFormulas.html,\
+               sec_ConflictHandling.html,\
+               sec_DefASMRule.html,\
+               sec_DefGTRule.html,\
+               sec_GTParamPass.html,\
+               sec_GTRuleBehaviour.html,\
+               sec_GraphPatterns.html,\
+               sec_GraphTransformations.html,\
+               sec_InvokeGTRule.html,\
+               sec_LocalPatternlElementDescription.html,\
+               sec_MachineDefinition.html,\
+               sec_MainVtclConcepts.html,\
+               sec_NameTokens.html,\
+               sec_NamingVariables.html,\
+               sec_NumberTokens.html,\
+               sec_Parameters.html,\
+               sec_PatternDefinition.html,\
+               sec_PostconditionRestriction.html,\
+               sec_PostconditionSpec.html,\
+               sec_PredefinedFunctions.html,\
+               sec_TokensOverview.html,\
+               sec_VTCLSpec.html,\
+               sec_VTCLTokens.html,\
+               sec_VtclFile.html,\
+               sec_index.html,\
+               style.css,\
+               toc.xml
diff --git a/org.eclipse.viatra2.help/def_ActualParameter.html b/org.eclipse.viatra2.help/def_ActualParameter.html
new file mode 100644
index 0000000..0da8e28
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_ActualParameter.html
@@ -0,0 +1,35 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.8.3.&nbsp;Actual Parameters</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_Parameters.html" title="5.8.&nbsp;Parameters and Variable Lists"><link rel="prev" href="def_DirectedFormalParameter.html" title="5.8.2.&nbsp;Directed Formal Parameters"><link rel="next" href="def_ConstrainedVariableList.html" title="5.8.4.&nbsp;Constrained Variable List"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.8.3.&nbsp;Actual Parameters</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_DirectedFormalParameter.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.8.&nbsp;Parameters and Variable Lists</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_ConstrainedVariableList.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_ActualParameter"></a>5.8.3.&nbsp;Actual Parameters</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_ActualParameter_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+<span class="strong"><strong>Actual parameters</strong></span>

+<a name="N13068" class="indexterm"></a>

+<a name="N1306D" class="indexterm"></a>

+describe the values passes as parameter when invoking

+ASM rules, ASM functions, graph patterns and graph transformation rules.

+These values are substituted with the formal parameters of these constructs

+during execution. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_ActualParameter_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+ActualParamsAST ::= <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a>

+                  | ActualParamsAST COMMA <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a>

+

+ActualParamsPatternVariablesAST ::= <a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">PatternVariableRefAST</a> 

+                                  | ActualParamsPatternVariablesAST COMMA <a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">PatternVariableRefAST</a> 

+</pre><p>

+<span class="strong"><strong>Actual parameters</strong></span> are defined as a comma separated list 

+of ASM terms that are associated with the formal parameters of a pattern or rules. 

+</p><p>

+<span class="strong"><strong>Actual parameters used in <a href="def_PatternComposition.html" title="2.1.5.&nbsp;Pattern Composition">pattern composition</a></strong></span> 

+are defined as a comma separated list of <a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">pattern variables</a>. 

+</p><p>

+In case of GT or ASM rules, the formal parameters have a direction (see

+<a href="def_DirectedFormalParameter.html" title="5.8.2.&nbsp;Directed Formal Parameters">directed formal parameter</a>).

+This implies that actual parameters which are passed for output formal 

+parameters can be only variables. Actual parameters that are associated 

+with input-only formal parameters can be arbitrary ASM 

+<a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">arithmetic terms</a>. 

+</p></td></tr></table></div><div class="highlights"><a name="def_ActualParameter_UsedBy"></a><p><b>Used By:&nbsp;</b>

+<a href="def_GTRuleCall.html" title="3.4.1.&nbsp;GTRule Call">GT rule call</a>, 

+<a href="def_PatternComposition.html" title="2.1.5.&nbsp;Pattern Composition">pattern composition</a>, 

+<a href="def_GraphPatternCall.html" title="2.1.4.&nbsp;Graph Pattern Call">graph pattern call</a>, 

+<a href="def_CallRule.html" title="4.2.2.&nbsp;Call Rule">call rule</a>

+<a href="def_AsmFunctionLocation.html" title="5.5.3.&nbsp;ASM Function Location">ASM function location</a>, 

+<a href="def_PredefinedFunctionCall.html" title="5.6.1.&nbsp;Predefined Function Call">predefined function call</a>, 

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_DirectedFormalParameter.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_Parameters.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_ConstrainedVariableList.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.8.2.&nbsp;Directed Formal Parameters&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.8.4.&nbsp;Constrained Variable List</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_Annotation.html b/org.eclipse.viatra2.help/def_Annotation.html
new file mode 100644
index 0000000..606bdbd
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_Annotation.html
@@ -0,0 +1,60 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>1.2.2.&nbsp;Annotation</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_MachineDefinition.html" title="1.2.&nbsp;Machine Definition"><link rel="prev" href="def_Machine.html" title="1.2.1.&nbsp;GTASM Machine Definition"><link rel="next" href="sec_GraphPatterns.html" title="2.&nbsp;Graph Patterns"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">1.2.2.&nbsp;Annotation</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_Machine.html">Prev</a>&nbsp;</td><th align="center" width="60%">1.2.&nbsp;Machine Definition</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_GraphPatterns.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_Annotation"></a>1.2.2.&nbsp;Annotation</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_Annotation_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+An <span class="strong"><strong>annotation</strong></span>

+<a name="N10249" class="indexterm"></a> 

+allows the transformation designers to fine-tune runtime settings.

+Currently, only few runtime annotations are supported in VIATRA to select

+the appropriate pattern matching engine, and to switch between batch and 

+live transformations.

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_Annotation_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+OptAnnotationsAST ::= $empty | AnnotationsAST

+	

+AnnotationsAST ::= AnnotationAST 

+                 | AnnotationsAST AnnotationAST

+

+AnnotationAST ::= AnnotationNameAST

+                | AnnotationNameAST <span class="token">(</span> AnnotationBodyAST <span class="token">)</span>

+	

+AnnotationBodyAST ::= KeyValuePairAST

+                    | AnnotationBodyAST <span class="token">,</span> KeyValuePairAST

+	                 

+KeyValuePairAST ::= <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">TypeNameAST</a> <span class="token">=</span> <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">TypeNameAST</a>  

+		        

+AnnotationNameAST ::= <a href="def_AnnotationLiteral.html" title="6.2.5.&nbsp;Annotation Literal">AnnotationLiteral</a>

+</pre><p>

+An <span class="strong"><strong>annotation</strong></span> has a name which is prefixed by <code class="computeroutput">@</code>.

+It may have an optional body defined in the form of key-value pairs within parentheses.

+The keys and values are restricted well-formed <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">local names</a>,

+although they are not required to point to actual model elements (i.e. it is only

+a syntactic restriction).

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_Annotation_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+Currently, the VIATRA interpreter accepts three annotations.

+<div class="itemizedlist"><ul type="disc"><li><p>

+<code class="computeroutput">incremental</code>: this can be attached to 

+<a href="def_GraphPatternDef.html" title="2.1.1.&nbsp;Graph Pattern Definition">graph pattern definitions</a>, 

+ 

+<a href="def_Machine.html" title="1.2.1.&nbsp;GTASM Machine Definition">machines</a>. 

+</p><p>

+In case of graph patterns, it prescribes that the annotated pattern and all dependent patterns accessed

+by <a href="def_PatternComposition.html" title="2.1.5.&nbsp;Pattern Composition">pattern composition</a>

+should be executed using the incremental pattern matcher engine. 

+</p><p>

+When a machine is annotated, it prescribes that all patterns defined in the machine

+should be executed by the incremental pattern matcher.

+</p></li><li><code class="computeroutput">localsearch</code>: this can be also attached to 

+<a href="def_GraphPatternDef.html" title="2.1.1.&nbsp;Graph Pattern Definition">graph pattern definitions</a>, 

+<a href="def_Machine.html" title="1.2.1.&nbsp;GTASM Machine Definition">machines</a>. The effect of this annotation is same as

+above, except for selecting the local search based pattern matching engine. 

+</li><li><p>

+<code class="computeroutput">trigger</code>: this can be also attached to a 

+GT rule, and it defines that the corresponding GT rule is interpreted as a

+<a href="">trigger</a>. 

+</p></li></ul></div>

+</p></td></tr></table></div><div class="highlights"><a name="def_Annotation_Remark"></a><p><b>Remark.&nbsp;</b>

+Note that in most cases, the incremental pattern matcher engine has

+significantly better performance. However, the default annotation

+for a pattern is <code class="computeroutput">@localsearch</code>.

+</p></div><div class="highlights"><a name="def_Annotation_UsedBy"></a><p><b>Used By:&nbsp;</b>

+<a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">GT rule definition</a>, 

+<a href="def_GraphPatternDef.html" title="2.1.1.&nbsp;Graph Pattern Definition">graph pattern definition</a>, 

+<a href="def_Machine.html" title="1.2.1.&nbsp;GTASM Machine Definition">machine</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_Machine.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_MachineDefinition.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_GraphPatterns.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">1.2.1.&nbsp;GTASM Machine Definition&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;2.&nbsp;Graph Patterns</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_AnnotationLiteral.html b/org.eclipse.viatra2.help/def_AnnotationLiteral.html
new file mode 100644
index 0000000..193d174
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_AnnotationLiteral.html
@@ -0,0 +1,10 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>6.2.5.&nbsp;Annotation Literal</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_NameTokens.html" title="6.2.&nbsp;Tokens for names and strings"><link rel="prev" href="def_StringLiteral.html" title="6.2.4.&nbsp;String Literal"><link rel="next" href="sec_NumberTokens.html" title="6.3.&nbsp;Tokens for numbers"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">6.2.5.&nbsp;Annotation Literal</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_StringLiteral.html">Prev</a>&nbsp;</td><th align="center" width="60%">6.2.&nbsp;Tokens for names and strings</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_NumberTokens.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_AnnotationLiteral"></a>6.2.5.&nbsp;Annotation Literal</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_AnnotationLiteral_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+An <span class="strong"><strong>annotation literal</strong></span> is a alphanumeric token, which 

+constitutes an <a href="def_Annotation.html" title="1.2.2.&nbsp;Annotation">annotation</a>. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_AnnotationLiteral_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+AnnotationLiteral -&gt; <span class="token">@</span> LiteralStartsWithLetter

+LiteralStartsWithLetter -&gt; <a href="def_Identifier.html" title="6.2.1.&nbsp;Identifier">Identifier</a> 

+                         | <a href="def_UpperCaseLiteral.html" title="6.2.3.&nbsp;UpperCase Literal">UpperCaseLiteral</a>

+</pre></td></tr></table></div><div class="highlights"><a name="def_AnnotationLiteral_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_Token.html" title="6.1.1.&nbsp;Tokens">Token</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_StringLiteral.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_NameTokens.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_NumberTokens.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">6.2.4.&nbsp;String Literal&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;6.3.&nbsp;Tokens for numbers</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_ArithmeticTerm.html b/org.eclipse.viatra2.help/def_ArithmeticTerm.html
new file mode 100644
index 0000000..5afc88a
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_ArithmeticTerm.html
@@ -0,0 +1,36 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.3.1.&nbsp;Arithmetic Term</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMArithmeticTerms.html" title="5.3.&nbsp;Arithmetic Terms"><link rel="prev" href="sec_ASMArithmeticTerms.html" title="5.3.&nbsp;Arithmetic Terms"><link rel="next" href="def_MultArithmeticTerm.html" title="5.3.2.&nbsp;Multiplicative Arithmetic Term"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.3.1.&nbsp;Arithmetic Term</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_ASMArithmeticTerms.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.3.&nbsp;Arithmetic Terms</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_MultArithmeticTerm.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_ArithmeticTerm"></a>5.3.1.&nbsp;Arithmetic Term</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_ArithmeticTerm_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+An <span class="strong"><strong>arithmetic term</strong></span><a name="N1238A" class="indexterm"></a> 

+<a name="N1238F" class="indexterm"></a>

+is an ASM term that evaluates to an 

+arbitrary value (string, integer, float, boolean, model element). 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_ArithmeticTerm_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+ArithmeticTermAST ::= <a href="def_MultArithmeticTerm.html" title="5.3.2.&nbsp;Multiplicative Arithmetic Term">MultArithmeticTermAST</a> 

+                    | ArithmeticTermAST <span class="token">+</span> <a href="def_MultArithmeticTerm.html" title="5.3.2.&nbsp;Multiplicative Arithmetic Term">MultArithmeticTermAST</a>

+                    | ArithmeticTermAST <span class="token">-</span> <a href="def_MultArithmeticTerm.html" title="5.3.2.&nbsp;Multiplicative Arithmetic Term">MultArithmeticTermAST</a>

+</pre><p>

+An <span class="strong"><strong>arithmetic term</strong></span> is composed of 

+<a href="def_MultArithmeticTerm.html" title="5.3.2.&nbsp;Multiplicative Arithmetic Term">multiplicative arithmetic terms</a> 

+with an arithmetic add <code class="computeroutput">+</code> or subtract <code class="computeroutput">-</code> operator. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_ArithmeticTerm_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The arithmetic term evaluation is defined in <a href="def_ArithmeticTerm.html#tab_AddOp" title="Table&nbsp;2.6.&nbsp;Add (+) operator">Table&nbsp;2.6, &ldquo;Add  (<code class="computeroutput">+</code>) operator &rdquo;</a>, and <a href="def_ArithmeticTerm.html#tab_SubtractOp" title="Table&nbsp;2.7.&nbsp;Subtract (-) operator">Table&nbsp;2.7, &ldquo;Subtract (<code class="computeroutput">-</code>) operator &rdquo;</a>, 

+which shows the type of the output with respect to the types of each operand. 

+</p><p>

+The interpretation of operators <code class="computeroutput">+</code> and <code class="computeroutput">-</code> is the 

+classical in case of integers and doubles (i.e. addition and subtraction). 

+</p><p>

+Applying the <code class="computeroutput">+</code> operator to two <code class="computeroutput">Strings</code> means concatenation. 

+</p><p>

+If any operation has an <code class="computeroutput">undef</code> value among its operands, the result 

+is always <code class="computeroutput">undef</code>, except when it is added to a string; in this case 

+the <code class="computeroutput">undef</code> value is converted to the <span class="emphasis"><em>'undef'</em></span> string. 

+</p><div class="table"><a name="tab_AddOp"></a><p class="title"><b>Table&nbsp;2.6.&nbsp;Add  (<code class="computeroutput">+</code>) operator </b></p><div class="table-contents"><table summary="Add  (+) operator " border="1"><colgroup><col><col><col><col><col><col><col><col></colgroup><thead><tr><th align="center">&nbsp;</th><th align="center">Undef</th><th align="center">Boolean</th><th align="center">String</th><th align="center">Integer</th><th align="center">Double</th><th align="center">ModelElement</th><th align="center">Multiplicity</th></tr></thead><tbody><tr><td align="center"><span class="strong"><strong>Undef</strong></span></td><td align="center">Undef</td><td align="center">Undef</td><td align="center">String</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td></tr><tr><td align="center"><span class="strong"><strong>Boolean</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">String</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>String</strong></span></td><td align="center">String</td><td align="center">String</td><td align="center">String</td><td align="center">String</td><td align="center">String</td><td align="center">String</td><td align="center">String</td></tr><tr><td align="center"><span class="strong"><strong>Integer</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">String</td><td align="center">Int</td><td align="center">Double</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Double</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">String</td><td align="center">Double</td><td align="center">Double</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>ModelElement</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">String</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Multiplicity</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">String</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr></tbody></table></div><p></p></div><br class="table-break"><div class="table"><a name="tab_SubtractOp"></a><p class="title"><b>Table&nbsp;2.7.&nbsp;Subtract (<code class="computeroutput">-</code>) operator </b></p><div class="table-contents"><table summary="Subtract (-) operator " border="1"><colgroup><col><col><col><col><col><col><col><col></colgroup><thead><tr><th align="center">&nbsp;</th><th align="center">Undef</th><th align="center">Boolean</th><th align="center">String</th><th align="center">Integer</th><th align="center">Double</th><th align="center">ModelElement</th><th align="center">Multiplicity</th></tr></thead><tbody><tr><td align="center"><span class="strong"><strong>Undef</strong></span></td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td></tr><tr><td align="center"><span class="strong"><strong>Boolean</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>String</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Integer</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">Int</td><td align="center">Double</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Double</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">Double</td><td align="center">Double</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>ModelElement</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Multiplicity</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr></tbody></table></div><p></p></div><br class="table-break"></td></tr></table></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning: Warning"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Warning]" src="images/warning.png"></td><th align="left"><a name="def_ArithmeticTerm_Warning"></a>Warning</th></tr><tr><td valign="top" align="left"><p>

+Note that the evaluation rules of arithmetic operators changed in the 

+new release to be compliant with its use in Java.

+  	</p></td></tr></table></div><div class="highlights"><a name="def_ArithmeticTerm_Remark"></a><p><b>Remark.&nbsp;</b>

+There is no implicit type casting on the input of the operands; conversion 

+operators have to be used if casting is required. 

+</p></div><div class="highlights"><a name="def_ArithmeticTerm_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_Term.html" title="5.1.1.&nbsp;ASM Term">term</a>

+</p></div><div class="highlights"><a name="def_ArithmeticTerm_UsedBy"></a><p><b>Used By:&nbsp;</b>

+<a href="def_BaseLogicalTerm.html" title="5.2.3.&nbsp;Base Logical Term">base logical term</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_ASMArithmeticTerms.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMArithmeticTerms.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_MultArithmeticTerm.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.3.&nbsp;Arithmetic Terms&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.3.2.&nbsp;Multiplicative   Arithmetic Term</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_AsmConstant.html b/org.eclipse.viatra2.help/def_AsmConstant.html
new file mode 100644
index 0000000..fb4f18f
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_AsmConstant.html
@@ -0,0 +1,27 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.4.1.&nbsp;ASM Constant (Value)</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMConstants.html" title="5.4.&nbsp;Constants"><link rel="prev" href="sec_ASMConstants.html" title="5.4.&nbsp;Constants"><link rel="next" href="def_UndefinedValue.html" title="5.4.2.&nbsp;Undefined Value"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.4.1.&nbsp;ASM Constant (Value)</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_ASMConstants.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.4.&nbsp;Constants</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_UndefinedValue.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_AsmConstant"></a>5.4.1.&nbsp;ASM Constant (Value)</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_AsmConstant_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+An <span class="strong"><strong>ASM constant</strong></span>

+<a name="N127E4" class="indexterm"></a> is an elementary

+ASM term.

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_AsmConstant_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+ConstantValueAST ::= <a href="def_UndefinedValue.html" title="5.4.2.&nbsp;Undefined Value">UndefValueAST</a> 

+	        | <a href="def_BooleanConstant.html" title="5.4.3.&nbsp;Boolean Constant">BooleanConstantAST</a> 

+	        | <a href="def_StringConstant.html" title="5.4.5.&nbsp;String Constant">StringConstantAST</a>  

+          | <a href="def_IntConstant.html" title="5.4.6.&nbsp;Integer Constants">IntConstantAST</a>        

+          | <a href="def_FloatConstant.html" title="5.4.7.&nbsp;Float Constant">FloatConstantAST</a>  

+	        | <a href="def_ModelElementConstant.html" title="5.4.8.&nbsp;Model Element Constant">ModelElementConstantAST</a>

+	        | <a href="def_MultiplicityConstant.html" title="5.4.4.&nbsp;Multiplicity Constant">MultiplicityConstantAST</a> 

+

+</pre><p>

+An <span class="strong"><strong>ASM constant</strong></span> can be 

+<div class="itemizedlist"><ul type="disc"><li><p>an <a href="def_UndefinedValue.html" title="5.4.2.&nbsp;Undefined Value">undefined value</a>, 

+</p></li><li><p>a <a href="def_BooleanConstant.html" title="5.4.3.&nbsp;Boolean Constant">boolean constant</a>,

+</p></li><li><p>a <a href="def_StringConstant.html" title="5.4.5.&nbsp;String Constant">string constant</a>, 

+</p></li><li><p>an <a href="def_IntConstant.html" title="5.4.6.&nbsp;Integer Constants">integer constant</a>, 

+</p></li><li><p>a <a href="def_FloatConstant.html" title="5.4.7.&nbsp;Float Constant">floating point constant</a>, 

+</p></li><li><p>a <a href="def_ModelElementConstant.html" title="5.4.8.&nbsp;Model Element Constant">model element constant</a>, which is a reference to a 

+model element resided in the model space. 

+</p><font color="red">&lt;listitem&gt;<p>a <a href="def_MultiplicityConstant.html" title="5.4.4.&nbsp;Multiplicity Constant">multiplicity constant</a>, 

+</p>&lt;/listitem&gt;</font></li></ul></div>

+</p></td></tr></table></div><div class="highlights"><a name="def_AsmConstant_UsedBy"></a><p><b>Used By:&nbsp;</b>

+<a href="def_BaseArithmeticTerm.html" title="5.3.4.&nbsp;Base Arithmetic Term">base arithmetic term</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_ASMConstants.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMConstants.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_UndefinedValue.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.4.&nbsp;Constants&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.4.2.&nbsp;Undefined Value</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_AsmFunctionDef.html b/org.eclipse.viatra2.help/def_AsmFunctionDef.html
new file mode 100644
index 0000000..20c3896
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_AsmFunctionDef.html
@@ -0,0 +1,46 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.5.1.&nbsp;ASM Function Definition</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMFunctions.html" title="5.5.&nbsp;ASM Functions"><link rel="prev" href="sec_ASMFunctions.html" title="5.5.&nbsp;ASM Functions"><link rel="next" href="def_InitialValue.html" title="5.5.2.&nbsp;Initial Value"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.5.1.&nbsp;ASM Function Definition</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_ASMFunctions.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.5.&nbsp;ASM Functions</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_InitialValue.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_AsmFunctionDef"></a>5.5.1.&nbsp;ASM Function Definition</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_AsmFunctionDef_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+In terms of structured programming languages, an <span class="strong"><strong>ASM function definition</strong></span>

+<a name="N12B96" class="indexterm"></a>

+is an associative array (dictionary, map, etc.), which stores 

+<span class="emphasis"><em>data values</em></span> at <a href="def_AsmFunctionLocation.html" title="5.5.3.&nbsp;ASM Function Location">locations</a> (slots) defined by its 

+<span class="emphasis"><em>index elements</em></span>. However, a main difference is that these arrays are 

+very dynamic in the sense that they may store an arbitrarily large number of 

+elements, and the size of the array can be increased at any time during 

+execution in order to store a new element at a specific location (index). 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_AsmFunctionDef_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+AsmFunctionDefAST ::= <a href="def_Annotation.html" title="1.2.2.&nbsp;Annotation">OptAnnotationsAST</a> <span class="token">asmfunction</span> <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">TypeNameAST</a> <span class="token">/</span> ArityAST <a href="def_InitialValue.html" title="5.5.2.&nbsp;Initial Value">InitialValuesOptAST</a>  

+

+ArityAST ::= DecimalIntegerLiteral

+</pre><p>

+An <code class="computeroutput">ASM function</code> is identified by its 

+<a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">name</a> and its <span class="strong"><strong>arity</strong></span>,

+<a name="N12BCE" class="indexterm"></a> 

+<a name="N12BD5" class="indexterm"></a> 

+which is the number of dimensions of the corresponding associative array.

+In addition, we may optionally provided initial definitions of some slots storing some 

+values at certain locations (<a href="def_InitialValue.html" title="5.5.2.&nbsp;Initial Value">initial value</a>).

+Unused locations of arrays are implicitly storing the <span class="emphasis"><em>undef</em></span> value. 

+</p><p>

+An ASM function have to be declared at the global scope (that is, at machine 

+scope, outside any rules) prior to its first use. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_AsmFunctionDef_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+Mathematically, an ASM function is a partial mapping from its index domain 

+(called location or slot) to its value domain. 

+</p><p>

+While ASM variables have a local scope in the sense that a variable becomes 

+non-accessible as soon as the execution leaves the rule (or the block) of its 

+scope, <span class="emphasis"><em>ASM functions</em></span>have a global visibility, thus they are 

+accessible from anywhere <span class="emphasis"><em>during the entire run of an ASM machine</em></span>. However, 

+the location-value assignments are not persistent, i.e. these are not 

+preserved between different runs of ASM machines (as it is the case in case 

+of model elements in the VPM model space). 

+</p><p>

+Since ASM functions defined in other machines can also be invoked, the 

+interpreter provides lazy initialization for all ASM functions: these are 

+<span class="emphasis"><em>initialized on-demand</em></span>, i.e. just before their first use. 

+</p></td></tr></table></div><div class="highlights"><a name="def_AsmFunctionDef_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_Machine.html" title="1.2.1.&nbsp;GTASM Machine Definition">GTASM Machine</a>

+</p></div><div class="highlights"><a name="def_AsmFunctionDef_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_AsmFunctionLocation.html" title="5.5.3.&nbsp;ASM Function Location">ASM function location</a>, 

+<a href="def_UpdateRule.html" title="4.2.5.&nbsp;Update Rule">update rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_ASMFunctions.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMFunctions.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_InitialValue.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.5.&nbsp;ASM Functions&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.5.2.&nbsp;Initial Value</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_AsmFunctionLocation.html b/org.eclipse.viatra2.help/def_AsmFunctionLocation.html
new file mode 100644
index 0000000..bfda49d
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_AsmFunctionLocation.html
@@ -0,0 +1,22 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.5.3.&nbsp;ASM Function Location</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMFunctions.html" title="5.5.&nbsp;ASM Functions"><link rel="prev" href="def_InitialValue.html" title="5.5.2.&nbsp;Initial Value"><link rel="next" href="sec_PredefinedFunctions.html" title="5.6.&nbsp;Predefined Functions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.5.3.&nbsp;ASM Function Location</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_InitialValue.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.5.&nbsp;ASM Functions</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_PredefinedFunctions.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_AsmFunctionLocation"></a>5.5.3.&nbsp;ASM Function Location</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_AsmFunctionLocation_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+An <span class="strong"><strong>ASM function location</strong></span>

+<a name="N12C93" class="indexterm"></a>

+refers to a (multi-dimensional) slot of an <a href="def_AsmFunctionDef.html" title="5.5.1.&nbsp;ASM Function Definition">ASM function</a>, 

+which is associated with a <span class="emphasis"><em>value tag</em></span>. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_AsmFunctionLocation_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+AsmFunctionLocationAST ::= ASMFunctionNameAST ActualParameterDefAST

+</pre><p>

+In an <span class="strong"><strong>ASM function location</strong></span>, the corresponding ASM function definition is identified by 

+its <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">fully qualified name</a> (which can also be a local name). 

+</p><p>

+The slot of the ASM function is identified by a list of <a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">actual parameters</a>. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_AsmFunctionLocation_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+An <span class="strong"><strong>ASM function location</strong></span>

+returns the value associated with the given 

+location. If a location is accessed without previously assigning a value,

+then the <code class="computeroutput">undef</code> value is returned. 

+</p></td></tr></table></div><div class="highlights"><a name="def_AsmFunctionLocation_UsedBy"></a><p><b>Used By:&nbsp;</b>

+<a href="def_BaseArithmeticTerm.html" title="5.3.4.&nbsp;Base Arithmetic Term">base arithmetic term</a>

+</p></div><div class="highlights"><a name="def_AsmFunctionLocation_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_AsmFunctionDef.html" title="5.5.1.&nbsp;ASM Function Definition">ASM function definition</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_InitialValue.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMFunctions.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_PredefinedFunctions.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.5.2.&nbsp;Initial Value&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.6.&nbsp;Predefined Functions</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_AsmRuleDef.html b/org.eclipse.viatra2.help/def_AsmRuleDef.html
new file mode 100644
index 0000000..eaee44d
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_AsmRuleDef.html
@@ -0,0 +1,31 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.1.1.&nbsp;ASM Rule Definition</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_DefASMRule.html" title="4.1.&nbsp;ASM Rule Definition and Invocation"><link rel="prev" href="sec_DefASMRule.html" title="4.1.&nbsp;ASM Rule Definition and Invocation"><link rel="next" href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.1.1.&nbsp;ASM Rule Definition</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_DefASMRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.1.&nbsp;ASM Rule Definition and Invocation</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_AsmRuleInvoc.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_AsmRuleDef"></a>4.1.1.&nbsp;ASM Rule Definition</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_AsmRuleDef_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+An <span class="strong"><strong>ASM rule definition</strong></span><a name="N11131" class="indexterm"></a>

+is the building block of an ASM program. When invoked, its formal parameters are substituted with actual parameters, and its body is called. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_AsmRuleDef_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+AsmRuleDefAST ::= <a href="def_Annotation.html" title="1.2.2.&nbsp;Annotation">OptAnnotationsAST</a> <span class="token">rule</span> <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">TypeNameAST</a> DirectedFormalParameterDefAST <span class="token">=</span> <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">AsmRuleInvocAST</a> 

+DirectedFormalParameterDefAST ::= <span class="token">(</span> <a href="def_FormalParameter.html" title="5.8.1.&nbsp;Formal Parameters">FormalParamsAST</a> <span class="token">)</span> 

+                                | <span class="token">(</span> <span class="token">)</span> 

+</pre><p>

+An <span class="strong"><strong>ASM rule definition</strong></span> is identified by a <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">name</a>, 

+it has a <a href="def_DirectedFormalParameter.html" title="5.8.2.&nbsp;Directed Formal Parameters">list of directed formal parameters</a>, and an 

+<a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rule invocation</a> as body. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_AsmRuleDef_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+An <span class="strong"><strong>ASM rule definition</strong></span> can be invoked by a 

+<a href="def_CallRule.html" title="4.2.2.&nbsp;Call Rule">call rule</a>. When invoked, the formal parameters are substituted 

+by the actual parameters of the call, and the <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">body</a> of the ASM rule is called.  

+</p><p>

+The entry point of an ASM program is a special user-defined rule called <span class="emphasis"><em>main</em></span>. 

+</p><p>

+Two rules may have identical names as long as their arity (the number of parameters) is different. 

+</p></td></tr></table></div><div class="highlights"><a name="def_AsmRuleDef_Remark"></a><p><b>Remark.&nbsp;</b>

+If the <span class="emphasis"><em>main</em></span>rule of a machine has an input parameter then this parameter can 

+set by the user when the transformation starts execution. The actual values 

+of the input parameters should be defined in the pop-up window separated by 

+spaces (' '). Currently, each input parameter is considered to be a string. 

+

+Most frequently, the <span class="strong"><strong>body</strong></span> of an ASM rule definition 

+is a <a href="def_SequentialRule.html" title="4.3.2.&nbsp;Sequential Rule">sequential rule</a>, but it can be arbitrary 

+<a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rule invocations</a>. 

+</p></div><div class="highlights"><a name="def_AsmRuleDef_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_Machine.html" title="1.2.1.&nbsp;GTASM Machine Definition">machine</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_DefASMRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_DefASMRule.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_AsmRuleInvoc.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.1.&nbsp;ASM Rule Definition and Invocation&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.1.2.&nbsp;ASM Rule Invocation</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_AsmRuleInvoc.html b/org.eclipse.viatra2.help/def_AsmRuleInvoc.html
new file mode 100644
index 0000000..1b3e194
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_AsmRuleInvoc.html
@@ -0,0 +1,20 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.1.2.&nbsp;ASM Rule Invocation</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_DefASMRule.html" title="4.1.&nbsp;ASM Rule Definition and Invocation"><link rel="prev" href="def_AsmRuleDef.html" title="4.1.1.&nbsp;ASM Rule Definition"><link rel="next" href="sec_ASMSimpleRules.html" title="4.2.&nbsp;Simple ASM Rules"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.1.2.&nbsp;ASM Rule Invocation</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_AsmRuleDef.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.1.&nbsp;ASM Rule Definition and Invocation</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_ASMSimpleRules.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_AsmRuleInvoc"></a>4.1.2.&nbsp;ASM Rule Invocation</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_AsmRuleInvoc_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+An <span class="strong"><strong>ASM rule invocation</strong></span><a name="N111BD" class="indexterm"></a> 

+is an abstract term for a whole set of different invocations of ASM rule definitions and built-in ASM rules. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_AsmRuleInvoc_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+AsmRuleAST ::= <a href="def_SimpleRule.html" title="4.2.1.&nbsp;Simple Rule">SimpleRuleAST</a>

+             | <a href="def_CompoundRule.html" title="4.3.1.&nbsp;Compound Rule">CompoundRuleAST</a>

+	           | <a href="def_ModelManipulationRule.html" title="4.4.1.&nbsp;Model Manipulation Rule">ModelManipulationRuleAST</a>

+

+AsmRulesAST ::= AsmRulesOptAST AsmRuleAST 

+	

+AsmRulesOptAST ::= $empty

+                 | AsmRulesOptAST AsmRuleAST           

+</pre><p>

+Traditionally, an <span class="strong"><strong>ASM rule invocation</strong></span> is a <a href="def_SimpleRule.html" title="4.2.1.&nbsp;Simple Rule">simple rule</a> or a 

+<a href="def_CompoundRule.html" title="4.3.1.&nbsp;Compound Rule">compound rule</a>. In VIATRA, the set of ASM rule invocations is extended 

+with <a href="def_ModelManipulationRule.html" title="4.4.1.&nbsp;Model Manipulation Rule">model manipulation rules</a>, which can modify the VIATRA model 

+space. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_AsmRuleInvoc_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The semantics of each type of rule invocations are described separately.

+</p></td></tr></table></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_AsmRuleDef.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_DefASMRule.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_ASMSimpleRules.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.1.1.&nbsp;ASM Rule Definition&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.2.&nbsp;Simple ASM Rules</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_BaseArithmeticTerm.html b/org.eclipse.viatra2.help/def_BaseArithmeticTerm.html
new file mode 100644
index 0000000..18b0fe4
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_BaseArithmeticTerm.html
@@ -0,0 +1,22 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.3.4.&nbsp;Base Arithmetic Term</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMArithmeticTerms.html" title="5.3.&nbsp;Arithmetic Terms"><link rel="prev" href="def_UnaryArithmeticTerm.html" title="5.3.3.&nbsp;Unary Arithmetic Term"><link rel="next" href="sec_ASMConstants.html" title="5.4.&nbsp;Constants"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.3.4.&nbsp;Base Arithmetic Term</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_UnaryArithmeticTerm.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.3.&nbsp;Arithmetic Terms</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_ASMConstants.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_BaseArithmeticTerm"></a>5.3.4.&nbsp;Base Arithmetic Term</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_BaseArithmeticTerm_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>base arithmetic term</strong></span>

+<a name="N12767" class="indexterm"></a> is the most elementary ASM term.

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_BaseArithmeticTerm_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+BaseArithmeticTermAST ::= <a href="def_Variable.html" title="5.7.2.&nbsp;Variable">VariableRefAST</a> 

+                        | <a href="def_AsmConstant.html" title="5.4.1.&nbsp;ASM Constant (Value)">ConstantValueAST</a> 	                     

+                        | <span class="token">(</span> <a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">LogicalTermAST</a> <span class="token">)</span>

+                        | <a href="def_AsmFunctionLocation.html" title="5.5.3.&nbsp;ASM Function Location">AsmFunctionLocationAST</a>

+                        | <a href="def_GraphPatternCall.html" title="2.1.4.&nbsp;Graph Pattern Call">GraphPatternCallAST</a>

+                        | <a href="def_PredefinedFunctionCall.html" title="5.6.1.&nbsp;Predefined Function Call">PredefinedFunctionCallAST</a>

+</pre><p>

+A <span class="strong"><strong>base arithmetic term</strong></span> can be the followings: 

+</p><div class="itemizedlist"><ul type="disc"><li><p>a <a href="def_Variable.html" title="5.7.2.&nbsp;Variable">variable</a>, 

+</p></li><li><p>an <a href="def_AsmConstant.html" title="5.4.1.&nbsp;ASM Constant (Value)">ASM constant</a>, 

+</p></li><li><p>the negative value of an <a href="def_IntConstant.html" title="5.4.6.&nbsp;Integer Constants">integer constant</a> or 

+<a href="def_FloatConstant.html" title="5.4.7.&nbsp;Float Constant">float constant</a> 

+</p></li><li><p>a general <a href="def_Term.html" title="5.1.1.&nbsp;ASM Term">term</a>surrounded by parenthesis, 

+</p></li><li><p>an <a href="def_AsmFunctionLocation.html" title="5.5.3.&nbsp;ASM Function Location">ASM function location</a> or 

+</p></li><li><p>a <a href="def_PredefinedFunctionCall.html" title="5.6.1.&nbsp;Predefined Function Call">predefined function call</a>. 

+</p></li></ul></div></td></tr></table></div><div class="highlights"><a name="def_BaseArithmeticTerm_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_UnaryArithmeticTerm.html" title="5.3.3.&nbsp;Unary Arithmetic Term">unary arithmetic term</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_UnaryArithmeticTerm.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMArithmeticTerms.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_ASMConstants.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.3.3.&nbsp;Unary Arithmetic Term&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.4.&nbsp;Constants</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_BaseLogicalTerm.html b/org.eclipse.viatra2.help/def_BaseLogicalTerm.html
new file mode 100644
index 0000000..2d9cbfe
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_BaseLogicalTerm.html
@@ -0,0 +1,57 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.2.3.&nbsp;Base Logical Term</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMLogicalTerms.html" title="5.2.&nbsp;Logical Terms"><link rel="prev" href="def_ConjLogicalTerm.html" title="5.2.2.&nbsp;Conjunctive Logical Term (Logical And Term)"><link rel="next" href="sec_ASMArithmeticTerms.html" title="5.3.&nbsp;Arithmetic Terms"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.2.3.&nbsp;Base Logical Term</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_ConjLogicalTerm.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.2.&nbsp;Logical Terms</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_ASMArithmeticTerms.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_BaseLogicalTerm"></a>5.2.3.&nbsp;Base Logical Term</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_BaseLogicalTerm_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>base logical term</strong></span><a name="N1216D" class="indexterm"></a>

+is the most elementary ASM term that evaluates to a boolean value.  

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_BaseLogicalTerm_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+EqualityTermAST ::= RelationalTermAST

+                  | EqualityTermAST <span class="token">==</span> RelationalTermAST

+                  | EqualityTermAST <span class="token">!=</span> RelationalTermAST

+    

+RelationalTermAST ::= <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a>  

+                    | RelationalTermAST RelationalOpAST <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a>

+                     	                 

+RelationalOpAST ::= <span class="token">&lt;</span> | <span class="token">&gt;</span> | <span class="token">&lt;=</span> | <span class="token">&gt;=</span>   

+</pre><p>

+A <span class="strong"><strong>base logical term</strong></span><a name="N1219A" class="indexterm"></a> can be the following: 

+</p><div class="itemizedlist"><ul type="disc"><li><p>a relational expression</p></li><li><p>an <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">arithmetic term</a>, which evaluates to a boolean value, such as 

+<div class="itemizedlist"><ul type="circle"><li><p>a <a href="def_BooleanConstant.html" title="5.4.3.&nbsp;Boolean Constant">boolean constant</a>, 

+</p></li><li><p>the negation of a <span class="strong"><strong>base logical term</strong></span>, 

+</p></li><li><p>a general <a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">logical term</a> surrounded with parenthesis, 

+</p></li><li><p>a <a href="def_GraphPatternCall.html" title="2.1.4.&nbsp;Graph Pattern Call">graph pattern call</a>. 

+</p></li></ul></div>

+</p></li></ul></div><p>

+A <span class="emphasis"><em>relational expression</em></span>is a relation between two 

+<a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">arithmetic terms</a>; the relational operator can be equality operators 

+(like equal, <code class="computeroutput">$==$</code> and not equal, <code class="computeroutput">!=</code>) or inequality operators such as  

+<code class="computeroutput">&gt;</code>, <code class="computeroutput">&lt;</code>, <code class="computeroutput">&gt;=</code>, 

+<code class="computeroutput">&lt;=</code> (where the latter has higher precedence). 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_BaseLogicalTerm_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+A <a href="def_GraphPatternCall.html" title="2.1.4.&nbsp;Graph Pattern Call">graph pattern call</a> results <code class="computeroutput">true</code> if a matching is found 

+and <code class="computeroutput">false</code> otherwise. 

+</p><p>

+Relational operators are interpreted between data types according to 

+<a href="def_BaseLogicalTerm.html#tab_EqualNotEqual" title="Table&nbsp;2.4.&nbsp;Equal (==) and Not Equal (!=) operators">Table&nbsp;2.4, &ldquo;Equal (<code class="computeroutput">==</code>) and Not Equal (<code class="computeroutput">!=</code>) operators &rdquo;</a> and <a href="def_BaseLogicalTerm.html#tab_Inequality" title="Table&nbsp;2.5.&nbsp;Other relational inequality operators (<, >, <=, >=) and Not Equal (!=) operators">Table&nbsp;2.5, &ldquo;Other relational inequality operators (<code class="computeroutput">&lt;, &gt;, &lt;=, &gt;=</code>) and Not Equal (<code class="computeroutput">!=</code>) operators &rdquo;</a>. 

+The cells in the tables define the type of the result when evaluating a relational 

+expression with arguments of a specific datatype. 

+</p><p>

+<span class="emphasis"><em>Equality</em></span> (and <span class="emphasis"><em>!=</em></span>) can be tested for any kinds of operands, 

+but the other relations are limited. Semantically the <span class="emphasis"><em>less than</em></span> and 

+<span class="emphasis"><em>greater than</em></span> relations are the usual (Java) ones for the <code class="computeroutput">Integer</code> 

+and <code class="computeroutput">Double</code> values. Regarding <code class="computeroutput">Multiplicity</code> values,

+<div class="itemizedlist"><ul type="disc"><li><p>

+<code class="computeroutput">one-to-one</code> is less than <code class="computeroutput">many-to-many</code>,

+<code class="computeroutput">many-to-one</code>, and <code class="computeroutput">one-to-many</code>,

+</p></li><li><p>

+<code class="computeroutput">one-to-many</code> and <code class="computeroutput">many-to-one</code> is less than 

+<code class="computeroutput">many-to-many</code>;

+</p></li><li><p>

+but <code class="computeroutput">one-to-many</code> and <code class="computeroutput">many-to-one</code> are uncomparable to each other.

+</p></li></ul></div> 

+</p><div class="table"><a name="tab_EqualNotEqual"></a><p class="title"><b>Table&nbsp;2.4.&nbsp;Equal (<code class="computeroutput">==</code>) and Not Equal (<code class="computeroutput">!=</code>) operators </b></p><div class="table-contents"><table summary="Equal (==) and Not Equal (!=) operators " border="1"><colgroup><col><col><col><col><col><col><col><col></colgroup><thead><tr><th align="center">&nbsp;</th><th align="center">Undef</th><th align="center">Boolean</th><th align="center">String</th><th align="center">Integer</th><th align="center">Double</th><th align="center">ModelElement</th><th align="center">Multiplicity</th></tr></thead><tbody><tr><td align="center"><span class="strong"><strong>Undef</strong></span></td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td></tr><tr><td align="center"><span class="strong"><strong>Boolean</strong></span></td><td align="center">Undef</td><td align="center">Bool</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>String</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">Bool</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Integer</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">Bool</td><td align="center">Bool</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Double</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">Bool</td><td align="center">Bool</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>ModelElement</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">Bool</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Multiplicity</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">Bool</td></tr></tbody></table></div><p></p></div><br class="table-break"><div class="table"><a name="tab_Inequality"></a><p class="title"><b>Table&nbsp;2.5.&nbsp;Other relational inequality operators (<code class="computeroutput">&lt;, &gt;, &lt;=, &gt;=</code>) and Not Equal (<code class="computeroutput">!=</code>) operators </b></p><div class="table-contents"><table summary="Other relational inequality operators (<, >, <=, >=) and Not Equal (!=) operators " border="1"><colgroup><col><col><col><col><col><col><col><col></colgroup><thead><tr><th align="center">&nbsp;</th><th align="center">Undef</th><th align="center">Boolean</th><th align="center">String</th><th align="center">Integer</th><th align="center">Double</th><th align="center">ModelElement</th><th align="center">Multiplicity</th></tr></thead><tbody><tr><td align="center"><span class="strong"><strong>Undef</strong></span></td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td></tr><tr><td align="center"><span class="strong"><strong>Boolean</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>String</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Integer</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">Bool</td><td align="center">Bool</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Double</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">Bool</td><td align="center">Bool</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>ModelElement</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Multiplicity</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">Bool</td></tr></tbody></table></div><p></p></div><br class="table-break"></td></tr></table></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning: Warning"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Warning]" src="images/warning.png"></td><th align="left"><a name="def_BaseLogicalTerm_Warning"></a>Warning</th></tr><tr><td valign="top" align="left"><p>

+Note that the evaluation rules of relational operators changed in the 

+new release to be compliant with its use in Java.

+  	</p></td></tr></table></div><div class="highlights"><a name="def_BaseLogicalTerm_Remark"></a><p><b>Remark.&nbsp;</b>

+There is no implicit type casting on the input of the operands except between Integers and Doubles; conversion 

+operators have to be used if casting is required. 

+</p></div><div class="highlights"><a name="def_BaseLogicalTerm_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_ConjLogicalTerm.html" title="5.2.2.&nbsp;Conjunctive Logical Term (Logical And Term)">conjuntive logical term</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_ConjLogicalTerm.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMLogicalTerms.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_ASMArithmeticTerms.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.2.2.&nbsp;Conjunctive Logical Term (Logical And Term)&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.3.&nbsp;Arithmetic Terms</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_BooleanConstant.html b/org.eclipse.viatra2.help/def_BooleanConstant.html
new file mode 100644
index 0000000..9b19268
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_BooleanConstant.html
@@ -0,0 +1,15 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.4.3.&nbsp;Boolean Constant</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMConstants.html" title="5.4.&nbsp;Constants"><link rel="prev" href="def_UndefinedValue.html" title="5.4.2.&nbsp;Undefined Value"><link rel="next" href="def_MultiplicityConstant.html" title="5.4.4.&nbsp;Multiplicity Constant"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.4.3.&nbsp;Boolean Constant</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_UndefinedValue.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.4.&nbsp;Constants</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_MultiplicityConstant.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_BooleanConstant"></a>5.4.3.&nbsp;Boolean Constant</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_BooleanConstant_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>boolean constant</strong></span>

+<a name="N128A3" class="indexterm"></a> 

+<a name="N128A8" class="indexterm"></a> 

+is an ASM constant representing 

+the logical <span class="emphasis"><em>true</em></span>and <span class="emphasis"><em>false</em></span>values. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_BooleanConstant_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+BooleanConstantAST ::= <span class="token">false</span> | <span class="token">true</span>

+</pre><p>

+A boolean constant can have two values: <code class="computeroutput">true</code>and <code class="computeroutput">false</code>. 

+</p></td></tr></table></div><div class="highlights"><a name="def_BooleanConstant_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_AsmConstant.html" title="5.4.1.&nbsp;ASM Constant (Value)">ASM constant</a>

+</p></div><div class="highlights"><a name="def_BooleanConstant_UsedBy"></a><p><b>Used By:&nbsp;</b>

+<a href="def_BaseLogicalTerm.html" title="5.2.3.&nbsp;Base Logical Term">base logical term</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_UndefinedValue.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMConstants.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_MultiplicityConstant.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.4.2.&nbsp;Undefined Value&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.4.4.&nbsp;Multiplicity Constant</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_CallRule.html b/org.eclipse.viatra2.help/def_CallRule.html
new file mode 100644
index 0000000..a167540
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_CallRule.html
@@ -0,0 +1,23 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.2.2.&nbsp;Call Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMSimpleRules.html" title="4.2.&nbsp;Simple ASM Rules"><link rel="prev" href="def_SimpleRule.html" title="4.2.1.&nbsp;Simple Rule"><link rel="next" href="def_SkipRule.html" title="4.2.3.&nbsp;Skip Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.2.2.&nbsp;Call Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_SimpleRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.2.&nbsp;Simple ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_SkipRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_CallRule"></a>4.2.2.&nbsp;Call Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_CallRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A user-defined ASM rule can be invoked by a <span class="strong"><strong>call rule</strong></span><a name="N11255" class="indexterm"></a>. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_CallRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+CallRuleAST ::= <span class="token">call</span> <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">QualifiedTypeNameAST</a> <a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">ActualParameterDefAST</a> <span class="token">;</span>

+</pre><p>

+In the <span class="strong"><strong>call rule</strong></span>, the <span class="emphasis"><em>name of the invoked rule</em></span> and the list of the 

+<span class="emphasis"><em>actual parameters</em></span> (corresponding to the formal parameters of the invoked rule) have to be 

+specified. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_CallRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+It calls the specified ASM rule by the given list of actual parameters. 

+Constraints of actual parameters are defined in <a href="def_FormalParameter.html" title="5.8.1.&nbsp;Formal Parameters">Section&nbsp;5.8.1, &ldquo;Formal Parameters&rdquo;</a>. 

+</p><p>

+If the called ASM rule fails, failure is propagated to the caller. 

+</p></td></tr></table></div><div class="highlights"><a name="def_CallRule_Remark"></a><p><b>Remark.&nbsp;</b>

+In order to facilitate modular transformation design, rules are allowed to 

+call rules located in other machines. In such a case, the called rules can be 

+referred to by their fully qualified names composed of the location of its 

+machine container and the name of the ASM rule. 

+</p></div><div class="highlights"><a name="def_CallRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_SimpleRule.html" title="4.2.1.&nbsp;Simple Rule">simple rule</a>

+</p></div><div class="highlights"><a name="def_CallRule_SeeAlso"></a><p><b>See also:&nbsp;</b>

+<a href="def_DirectedFormalParameter.html" title="5.8.2.&nbsp;Directed Formal Parameters">formal parameter definition</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_SimpleRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMSimpleRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_SkipRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.2.1.&nbsp;Simple Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.2.3.&nbsp;Skip Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_CheckCondition.html b/org.eclipse.viatra2.help/def_CheckCondition.html
new file mode 100644
index 0000000..649d468
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_CheckCondition.html
@@ -0,0 +1,34 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>2.1.8.&nbsp;Check Condition</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_PatternDefinition.html" title="2.1.&nbsp;Pattern Definition"><link rel="prev" href="def_PatternVariableAssignment.html" title="2.1.7.&nbsp;Pattern Variable Assignment"><link rel="next" href="def_ContainmentConstraint.html" title="2.1.9.&nbsp;Containment Constraint"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">2.1.8.&nbsp;Check Condition</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_PatternVariableAssignment.html">Prev</a>&nbsp;</td><th align="center" width="60%">2.1.&nbsp;Pattern Definition</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_ContainmentConstraint.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_CheckCondition"></a>2.1.8.&nbsp;Check Condition</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_CheckCondition_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+			A	<span class="strong"><strong>check condition</strong></span>

+			<a name="N10848" class="indexterm"></a>

+			is part of a

+			<a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">pattern body</a>.

+		</p><p>

+			It defines a boolean condition as an ASM term that must evaluate to true for a successful match of the

+			pattern.

+		</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_CheckCondition_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+CheckConditionAST ::= <span class="token">check</span> <span class="token">(</span> <a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">LogicalTermAST</a> <span class="token">)</span>	

+	</pre><p>

+			A

+			<span class="strong"><strong>check condition</strong></span>

+			<a name="N1086D" class="indexterm"></a>

+			is composed of the keyword and an ASM	<a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">logical term</a>

+			in braces. The ASM <a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">logical terms</a>

+			is composed of <a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">pattern variables</a>, as well as

+			<a href="def_AsmConstant.html" title="5.4.1.&nbsp;ASM Constant (Value)">constants</a>

+			and

+			<a href="def_AsmFunctionLocation.html" title="5.5.3.&nbsp;ASM Function Location">ASM function locations</a>, etc.

+		</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_CheckCondition_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+			The matching of the container pattern succeeds only if this

+			<span class="strong"><strong>check condition</strong></span>

+			<a name="N10890" class="indexterm"></a>

+			evaluates to

+			<span class="emphasis"><em>true</em></span>.

+		</p><p>

+			From a semantic point of view, this check is carried out

+			<span class="emphasis"><em>after</em></span>

+			matching the container pattern itself, i.e. we assume that all pattern variables are successfully bound to

+			model elements (otherwise the pattern matching process should already fail).

+		</p></td></tr></table></div><div class="highlights"><a name="def_CheckCondition_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+				<a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">pattern body</a>

+			</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_PatternVariableAssignment.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_PatternDefinition.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_ContainmentConstraint.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">2.1.7.&nbsp;Pattern Variable Assignment&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;2.1.9.&nbsp;Containment Constraint</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_ChooseRule.html b/org.eclipse.viatra2.help/def_ChooseRule.html
new file mode 100644
index 0000000..9589458
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_ChooseRule.html
@@ -0,0 +1,90 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.3.6.&nbsp;Choose Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMCompoundRules.html" title="4.3.&nbsp;Compound ASM Rules"><link rel="prev" href="def_LetRule.html" title="4.3.5.&nbsp;Let Rule"><link rel="next" href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.3.6.&nbsp;Choose Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_LetRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.3.&nbsp;Compound ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_ForallRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_ChooseRule"></a>4.3.6.&nbsp;Choose Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_ChooseRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>choose rule</strong></span><a name="N1170E" class="indexterm"></a> 

+binds its variables to non-deterministically selected elements from the model space (or from an ASM function) 

+fulfilling a condition (existential condition), and then executes its body with those variable bindings. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_ChooseRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+ChooseRuleAST ::= <span class="token">choose</span> <a href="def_ConstrainedVariableList.html" title="5.8.4.&nbsp;Constrained Variable List">ConstrainedVariablesOptAST</a> <span class="token">with</span> ConditionAST <span class="token">do</span> <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">AsmRuleAST</a>

+ConditionAST ::= <a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">LogicalTermAST</a>

+               | <a href="def_GTRuleCall.html" title="3.4.1.&nbsp;GTRule Call">GTRuleCallAST</a> 

+</pre><p>

+The <span class="strong"><strong>choose rule</strong></span> consists of (scoped) variable declarations, a condition 

+part (<span class="emphasis"><em>with</em></span> clause), and an <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rule invocation</a>as body. 

+</p><p>

+Quantified variables of the <span class="strong"><strong>choose rule</strong></span> may only appear in the condition part in 

+a <a href="def_GraphPatternCall.html" title="2.1.4.&nbsp;Graph Pattern Call">graph pattern call</a>, a <a href="def_GTRuleCall.html" title="3.4.1.&nbsp;GTRule Call">GT rule call</a> or 

+an <a href="def_AsmFunctionLocation.html" title="5.5.3.&nbsp;ASM Function Location">ASM function location</a>.

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_ChooseRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>choose rule</strong></span> tries to find one substitution of variables 

+defined in its head, which satisfies a boolean condition, and then the body 

+rule is executed. If more variable substitutions satisfy the condition, then 

+one is chosen non-deterministically. If there are no such substitutions then 

+the <span class="strong"><strong>choose rule</strong></span> fails. The body ASM rule may use the head 

+variables of the choose construct. 

+</p><p>

+For a combination of values in the variables that make the formula true, the 

+rule is executed. 

+</p><p>

+The location in the containment hierarchy of each variable in the 

+<a href="def_ConstrainedVariableList.html" title="5.8.4.&nbsp;Constrained Variable List">constrained variable list</a> can be narrowed to a specific 

+<a href="def_Entity.html" title="2.2.1.&nbsp;Entity">container entity</a>, or to a specific subtree of the model space. With the 

+use of the <code class="computeroutput">in</code> clause users can specify the direct parent which the 

+values of the variables can be taken from. The <code class="computeroutput">below</code>

+clause means that the values of the corresponding variable have to be taken from the model 

+subtree below the given container. 

+</p><p>

+If the <span class="strong"><strong>choose rule</strong></span> is used with <a href="def_GTRuleCall.html" title="3.4.1.&nbsp;GTRule Call">GT rule call</a>

+then the quantified variables have to be 

+<div class="itemizedlist"><ul type="disc"><li><p>output parameters of the <a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">GT rule</a>, and 

+</p></li><li><p>input parameters of its <span class="emphasis"><em>precondition </em></span> <a href="def_GraphPatternDef.html" title="2.1.1.&nbsp;Graph Pattern Definition">pattern</a>, 

+</p></li></ul></div>

+</p><p>

+Variables not quantified explicitly by the <span class="strong"><strong>choose rule</strong></span>, and 

+passed to the pattern matcher with a specific value (either in a 

+<a href="def_GTRuleCall.html" title="3.4.1.&nbsp;GTRule Call">GT rule call</a> or in a <a href="def_GraphPatternCall.html" title="2.1.4.&nbsp;Graph Pattern Call">graph pattern call</a>) are 

+input parameters for the pattern matcher. 

+</p><p>

+Variables not quantified explicitly by the <span class="strong"><strong>choose rule</strong></span>, and 

+passed to pattern matching with an <span class="strong"><strong>undef</strong></span> value (either in a 

+<a href="def_GTRuleCall.html" title="3.4.1.&nbsp;GTRule Call">GT rule call</a> or in a <a href="def_GraphPatternCall.html" title="2.1.4.&nbsp;Graph Pattern Call">graph pattern call</a>) are 

+always existentially quantified implicitly. 

+</p></td></tr></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Constraints"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left"><a name="def_ChooseRule_Constraints"></a>Constraints</th></tr><tr><td valign="top" align="left"><p>

+In the <a href="def_ConstrainedVariableList.html" title="5.8.4.&nbsp;Constrained Variable List">constrained variable list</a>only entities can be constrained. 

+If a containment contraint is applied to a relation, it causes a runtime error. 

+</p></td></tr></table></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning: Warning"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Warning]" src="images/warning.png"></td><th align="left">Warning</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>choose rule</strong></span> is evaluated efficiently when the condition (<span class="emphasis"><em>with</em></span> clause)

+is either a graph pattern call, or a GT rule call. Evaluating complex logical expressions with ASM function invocations

+can be highly inefficient. The intended use is to include attribute and other arithmetic constraints as part of a 

+<a href="def_CheckCondition.html" title="2.1.8.&nbsp;Check Condition">check condition</a> of a graph pattern, where it is evaluated more efficiently. 

+</p></td></tr></table></div><div class="highlights"><a name="def_ChooseRule_Remark"></a><p><b>Remark.&nbsp;</b>

+Note that in a typical model transformation, the <a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>

+and the <span class="strong"><strong>choose rule</strong></span> will drive the execution of elementary 

+graph transformation rules. In this respect, wherever a Boolean condition is 

+expected, we may use a graph pattern as condition, and wherever an ASM rule 

+is executed, we may apply a GT rule. 

+</p></div><div class="example"><a name="def_ChooseRule_Example1"></a><p class="title"><b>Example&nbsp;2.4.&nbsp;Different invocations of a choose rule</b></p><div class="example-contents"><pre class="programlisting">

+// Invoking a graph pattern

+pattern myPattern(X) = { ... }

+choose Y with find myPatt(Y) do println(fqn(Y));

+

+// Invoking a graph transformation rule

+gtrule myGtRule(out X) = { ... }

+choose Y with find myGtRule(Y) do println(fqn(Y));

+

+// Invoking a logical term with an ASM function (INEFFICIENT) 

+asmfunction myAsmFun/1 = { ... }

+choose Y with myAsmFun(Y) &gt; 2 do println(Y);

+</pre></div><p></p></div><br class="example-break"><div class="example"><a name="def_ChooseRule_Example2"></a><p class="title"><b>Example&nbsp;2.5.&nbsp;Quantification of variables passed to a choose rule</b></p><div class="example-contents"><pre class="programlisting">

+let X=uml.mymodel in 

+choose Y with find myPatt(X,Y) do ... 

+</pre><p>

+In this case, X is an input variable. 

+</p><pre class="programlisting">

+let X=undef in 

+choose Y with find myPatt(X,Y) do ... 

+</pre><p>

+causes a run-time exception as X is unbound. 

+</p></div><p></p></div><br class="example-break"><div class="highlights"><a name="def_ChooseRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_CompoundRule.html" title="4.3.1.&nbsp;Compound Rule">compound rule</a>

+</p></div><div class="highlights"><a name="def_ChooseRule_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_LetRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMCompoundRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_ForallRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.3.5.&nbsp;Let Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.3.7.&nbsp;Forall Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_CompoundRule.html b/org.eclipse.viatra2.help/def_CompoundRule.html
new file mode 100644
index 0000000..dd7f144
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_CompoundRule.html
@@ -0,0 +1,18 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.3.1.&nbsp;Compound Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMCompoundRules.html" title="4.3.&nbsp;Compound ASM Rules"><link rel="prev" href="sec_ASMCompoundRules.html" title="4.3.&nbsp;Compound ASM Rules"><link rel="next" href="def_SequentialRule.html" title="4.3.2.&nbsp;Sequential Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.3.1.&nbsp;Compound Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_ASMCompoundRules.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.3.&nbsp;Compound ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_SequentialRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_CompoundRule"></a>4.3.1.&nbsp;Compound Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_CompoundRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>compound rule</strong></span><a name="N114F5" class="indexterm"></a> is such an ASM rule

+invocation that contains nested rules executed in different ways. 

+</p><p>

+A compound rule can be 

+</p><div class="itemizedlist"><ul type="disc"><li><p>for defining a set of rules (<a href="def_SequentialRule.html" title="4.3.2.&nbsp;Sequential Rule">sequential rule</a>, 

+<a href="def_ParallelRule.html" title="4.3.3.&nbsp;Parallel Rule">parallel rule</a>, 

+<a href="def_RandomRule.html" title="4.3.4.&nbsp;Random Rule">random rule</a>), 

+</p></li><li><p>variable related (<a href="def_LetRule.html" title="4.3.5.&nbsp;Let Rule">let rule</a>) or 

+</p></li><li><p>pattern matching or graph transformation related (<a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose   rule</a>, <a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>), 

+</p></li><li><p>control flow related ( <a href="def_IterateRule.html" title="4.3.8.&nbsp;Iterate Rule">iterate rule</a>, 

+<a href="def_IfRule.html" title="4.3.9.&nbsp;If Rule">if rule</a>, <a href="def_TryRule.html" title="4.3.10.&nbsp;Try Rule">try rule</a>). 

+</p></li></ul></div></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_CompoundRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+CompoundRuleAST ::=  <a href="def_SequentialRule.html" title="4.3.2.&nbsp;Sequential Rule">SequentialRuleAST</a> | <a href="def_RandomRule.html" title="4.3.4.&nbsp;Random Rule">RandomRuleAST</a> | <a href="def_ParallelRule.html" title="4.3.3.&nbsp;Parallel Rule">ParallelRuleAST</a>  

+                   | <a href="def_LetRule.html" title="4.3.5.&nbsp;Let Rule">LetRuleAST</a> | <a href="def_IterateRule.html" title="4.3.8.&nbsp;Iterate Rule">IterateRuleAST</a> 

+                   | <a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">ChooseRuleAST</a> | <a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">ForallRuleAST</a> 

+                   | <a href="def_IfRule.html" title="4.3.9.&nbsp;If Rule">IfRuleAST</a> | <a href="def_TryRule.html" title="4.3.10.&nbsp;Try Rule">TryRuleAST</a> 

+</pre></td></tr></table></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_ASMCompoundRules.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMCompoundRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_SequentialRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.3.&nbsp;Compound ASM Rules&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.3.2.&nbsp;Sequential Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_ConjLogicalTerm.html b/org.eclipse.viatra2.help/def_ConjLogicalTerm.html
new file mode 100644
index 0000000..ea95e38
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_ConjLogicalTerm.html
@@ -0,0 +1,18 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.2.2.&nbsp;Conjunctive Logical Term (Logical And Term)</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMLogicalTerms.html" title="5.2.&nbsp;Logical Terms"><link rel="prev" href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term"><link rel="next" href="def_BaseLogicalTerm.html" title="5.2.3.&nbsp;Base Logical Term"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.2.2.&nbsp;Conjunctive Logical Term (Logical And Term)</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_LogicalTerm.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.2.&nbsp;Logical Terms</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_BaseLogicalTerm.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_ConjLogicalTerm"></a>5.2.2.&nbsp;Conjunctive Logical Term (Logical And Term)</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_ConjLogicalTerm_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>conjunctive logical term</strong></span><a name="N12112" class="indexterm"></a>

+is an ASM term that evaluates to a boolean value. It can be either a simple or a compound logical expression. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_ConjLogicalTerm_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+LogicalAndTermAST ::= <a href="def_BaseLogicalTerm.html" title="5.2.3.&nbsp;Base Logical Term">EqualityTermAST</a> 

+                    | LogicalAndTermAST <span class="token">&amp;&amp;</span> <a href="def_BaseLogicalTerm.html" title="5.2.3.&nbsp;Base Logical Term">EqualityTermAST</a>

+</pre><p>

+A <span class="strong"><strong>conjunctive logical term</strong></span> can be a compound expression, i.e. it can 

+be composed of <a href="def_BaseLogicalTerm.html" title="5.2.3.&nbsp;Base Logical Term">base logical terms</a> with a <span class="strong"><strong>logical AND operator</strong></span>. 

+</p><p>

+The <span class="strong"><strong>logical AND operator</strong></span> is the <code class="computeroutput">&amp;&amp;</code> operator; it 

+is interpreted in the classical conjunctive way. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_ConjLogicalTerm_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+Semantics of the <span class="strong"><strong>logical AND operation</strong></span> is discussed 

+in <a href="def_LogicalTerm.html#tab_LogicalOp" title="Table&nbsp;2.3.&nbsp;Logical operators (AND, OR, XOR)">Table&nbsp;2.3, &ldquo;Logical operators (AND, OR, XOR)&rdquo;</a> (see <a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">logical term</a>). 

+</p></td></tr></table></div><div class="highlights"><a name="def_ConjLogicalTerm_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">logical term</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_LogicalTerm.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMLogicalTerms.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_BaseLogicalTerm.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.2.1.&nbsp;Logical Term&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.2.3.&nbsp;Base Logical Term</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_ConstrainedVariableList.html b/org.eclipse.viatra2.help/def_ConstrainedVariableList.html
new file mode 100644
index 0000000..b7f5e69
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_ConstrainedVariableList.html
@@ -0,0 +1,25 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.8.4.&nbsp;Constrained Variable List</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_Parameters.html" title="5.8.&nbsp;Parameters and Variable Lists"><link rel="prev" href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters"><link rel="next" href="sec_VTCLTokens.html" title="6.&nbsp;Tokens in the VTCL Language"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.8.4.&nbsp;Constrained Variable List</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_ActualParameter.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.8.&nbsp;Parameters and Variable Lists</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_VTCLTokens.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_ConstrainedVariableList"></a>5.8.4.&nbsp;Constrained Variable List</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_ConstrainedVariableList_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>constrained variable list</strong></span>

+<a name="N130D6" class="indexterm"></a>

+is a list of variables where the 

+variables are placeholders for model elements. The possible values of these variables

+are restricted by <a href="def_ContainmentConstraint.html" title="2.1.9.&nbsp;Containment Constraint">containment constraints</a>,

+to certain locations in the containment hierarchy of the model space. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_ConstrainedVariableList_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+ConstrainedVariablesOptAST ::= $empty 

+                             | ConstrainedVariablesAST 

+

+ConstrainedVariablesAST ::= <a href="def_Variable.html" title="5.7.2.&nbsp;Variable">VariableDefAST</a> <a href="def_ContainmentConstraint.html" title="2.1.9.&nbsp;Containment Constraint">ContainmentConstraintOptAST</a> 

+                          | ConstrainedVariablesAST COMMA <a href="def_Variable.html" title="5.7.2.&nbsp;Variable">VariableDefAST</a> <a href="def_ContainmentConstraint.html" title="2.1.9.&nbsp;Containment Constraint">ContainmentConstraintOptAST</a> 

+</pre></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_ConstrainedVariableList_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+<span class="strong"><strong>Constrained variable lists</strong></span> are used in a 

+<a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a> or in a <a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>, 

+where the list of variables are quantified existentially or universally, respectively. 

+These variables can store only model elements and the <a href="def_ContainmentConstraint.html" title="2.1.9.&nbsp;Containment Constraint">containment constraint</a>

+restricts the possible location of model elements with respect to their location in the containment hierarchy. 

+</p></td></tr></table></div><div class="highlights"><a name="def_ConstrainedVariableList_UsedBy"></a><p><b>Used By:&nbsp;</b>

+<a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>, 

+<a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>

+</p></div><div class="highlights"><a name="def_ConstrainedVariableList_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_ContainmentConstraint.html" title="2.1.9.&nbsp;Containment Constraint">containment constraint</a>, 

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_ActualParameter.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_Parameters.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_VTCLTokens.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.8.3.&nbsp;Actual Parameters&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;6.&nbsp;Tokens in the VTCL Language</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_ContainmentConstraint.html b/org.eclipse.viatra2.help/def_ContainmentConstraint.html
new file mode 100644
index 0000000..c984690
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_ContainmentConstraint.html
@@ -0,0 +1,34 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>2.1.9.&nbsp;Containment Constraint</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_PatternDefinition.html" title="2.1.&nbsp;Pattern Definition"><link rel="prev" href="def_CheckCondition.html" title="2.1.8.&nbsp;Check Condition"><link rel="next" href="sec_LocalPatternlElementDescription.html" title="2.2.&nbsp;Local Pattern Body Elements"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">2.1.9.&nbsp;Containment Constraint</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_CheckCondition.html">Prev</a>&nbsp;</td><th align="center" width="60%">2.1.&nbsp;Pattern Definition</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_LocalPatternlElementDescription.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_ContainmentConstraint"></a>2.1.9.&nbsp;Containment Constraint</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_ContainmentConstraint_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>containment constraint</strong></span> 

+<a name="N108B7" class="indexterm"></a>

+is defined in the scope of a variable. It restricts the domain of a 

+variable with respect to the containment hierarchy of the model space.  

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_ContainmentConstraint_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+ContainmentConstraintOptAST ::= $empty 

+	                            | <span class="token">in</span> <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a>

+	                            | <span class="token">below</span> <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a>

+</pre><p>

+The <span class="strong"><strong>container</strong></span><a name="N108D6" class="indexterm"></a> in a 

+<span class="strong"><strong>containment constraint</strong></span> is an  

+<a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">arithmetic term</a> which evaluates to an entity.

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_ContainmentConstraint_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+In case of the <code class="computeroutput">in</code> constraint, the domain of the constrained variable 

+is restricted to the elements that are directly contained by the 

+<span class="strong"><strong>container</strong></span>, i.e. the domain contains the children of the 

+entity defined by the <span class="strong"><strong>container</strong></span>. 

+</p><p>

+In case of the <code class="computeroutput">below</code> constraint the domain of the constrained variable 

+is restricted to the elements that are directly or indirectly contained by a 

+<span class="strong"><strong>container</strong></span>, i.e. the domain contains all the descendants

+of the <span class="strong"><strong>container</strong></span> (e.g. the children, the

+children of the children, etc. in an arbitrary depth). 

+</p></td></tr></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Constraints"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left"><a name="def_ContainmentConstraint_Constraints"></a>Constraints</th></tr><tr><td valign="top" align="left"><p>

+A containment constraint can be applied only for variables that refer to 

+entities, but it is a run-time error if the scope of the containment constraint is a relation. 

+</p></td></tr></table></div><div class="highlights"><a name="def_ContainmentConstraint_UsedBy"></a><p><b>Used By:&nbsp;</b>

+<a href="def_ConstrainedVariableList.html" title="5.8.4.&nbsp;Constrained Variable List">constrained variable list</a>, 

+<a href="def_Entity.html" title="2.2.1.&nbsp;Entity">entity</a>

+</p></div><div class="highlights"><a name="def_ContainmentConstraint_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_Variable.html" title="5.7.2.&nbsp;Variable">variable</a>

+<a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">pattern variable</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_CheckCondition.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_PatternDefinition.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_LocalPatternlElementDescription.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">2.1.8.&nbsp;Check Condition&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;2.2.&nbsp;Local Pattern Body Elements</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_CopyRule.html b/org.eclipse.viatra2.help/def_CopyRule.html
new file mode 100644
index 0000000..1a0490b
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_CopyRule.html
@@ -0,0 +1,33 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.4.4.&nbsp;Copy Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMModelManipulationRules.html" title="4.4.&nbsp;Model Manipulation Rules"><link rel="prev" href="def_DeleteRule.html" title="4.4.3.&nbsp;Delete Rule"><link rel="next" href="def_MoveRule.html" title="4.4.5.&nbsp;Move Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.4.4.&nbsp;Copy Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_DeleteRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.4.&nbsp;Model Manipulation Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_MoveRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_CopyRule"></a>4.4.4.&nbsp;Copy Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_CopyRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+This rule copies a subtree of the current model space to another location. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_CopyRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+CopyRuleAST ::= <span class="token">copy</span> <span class="token">(</span> CopyContentsAST <span class="token">)</span> <span class="token">;</span>

+

+CopyContentsAST ::= <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a> <span class="token">,</span> <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a> <span class="token">,</span> <a href="def_Variable.html" title="5.7.2.&nbsp;Variable">VariableRefAST</a> <span class="token">,</span> CopySemanticsAST								

+

+CopySemanticsAST ::= <span class="token">copy_boundary_edges</span> | <span class="token">skip_boundary_edges</span>

+</pre><p>

+The first parameter (<span class="strong"><strong>source entity</strong></span>) is the root of the sub-model to be 

+copied, and the second parameter is the <span class="strong"><strong>target container</strong></span>. 

+</p><p>

+Both <span class="strong"><strong>source entity</strong></span> and <span class="strong"><strong>target container</strong></span> is an ASM 

+<a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">term</a> that evaluates to a <a href="def_ModelElementConstant.html" title="5.4.8.&nbsp;Model Element Constant">model element constant</a>

+referencing an entity. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_CopyRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+A reference to the root element of the newly created sub-model is stored in a 

+<a href="def_Variable.html" title="5.7.2.&nbsp;Variable">variable</a>. 

+</p><p>

+The <span class="strong"><strong>copy semantics</strong></span>

+<a name="N11D98" class="indexterm"></a> defines whether to copy 

+(<code class="computeroutput">copy_boundary_edges</code>) or not to copy the edges 

+(<code class="computeroutput">skip_boundary_edges</code>) that are going to or coming from outside 

+the sub-model under copy. 

+</p></td></tr></table></div><div class="highlights"><a name="def_CopyRule_Remark"></a><p><b>Remark.&nbsp;</b>

+Note that the terminology has changed compared to previous Viatra 

+versions (<code class="computeroutput">copy_boundary_edges</code> instead of <code class="computeroutput">keep_edges</code>; 

+<code class="computeroutput">skip_boundary_edges</code> instead of <code class="computeroutput">drop_edges</code>). 

+</p></div><div class="highlights"><a name="def_CopyRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_ModelManipulationRule.html" title="4.4.1.&nbsp;Model Manipulation Rule">model manipulation rule</a>

+</p></div><div class="highlights"><a name="def_CopyRule_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_MoveRule.html" title="4.4.5.&nbsp;Move Rule">move rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_DeleteRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMModelManipulationRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_MoveRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.4.3.&nbsp;Delete Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.4.5.&nbsp;Move Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_CreateRule.html b/org.eclipse.viatra2.help/def_CreateRule.html
new file mode 100644
index 0000000..1c4e09b
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_CreateRule.html
@@ -0,0 +1,49 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.4.2.&nbsp;Create Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMModelManipulationRules.html" title="4.4.&nbsp;Model Manipulation Rules"><link rel="prev" href="def_ModelManipulationRule.html" title="4.4.1.&nbsp;Model Manipulation Rule"><link rel="next" href="def_DeleteRule.html" title="4.4.3.&nbsp;Delete Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.4.2.&nbsp;Create Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_ModelManipulationRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.4.&nbsp;Model Manipulation Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_DeleteRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_CreateRule"></a>4.4.2.&nbsp;Create Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_CreateRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>create rule</strong></span><a name="N11B97" class="indexterm"></a> can be used for model element or  

+relationship creation. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_CreateRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+CreateRuleAST ::= <span class="token">new</span> <span class="token">(</span> CreateModelElementAST <span class="token">)</span> <span class="token">;</span>

+                | <span class="token">new</span> <span class="token">(</span> CreateRelationshipAST <span class="token">)</span> <span class="token">;</span>

+	

+CreateModelElementAST ::= QualifiedTypeNameAST <span class="token">(</span> VariableRefAST <span class="token">)</span> InConstraintOptAST 

+                        | QualifiedTypeNameAST <span class="token">(</span> VariableRefAST <span class="token">,</span> ArithmeticTermAST <span class="token">,</span> ArithmeticTermAST <span class="token">)</span>

+

+InConstraintOptAST ::= $empty | <span class="token">in</span> ArithmeticTermAST

+

+CreateRelationshipAST ::= <span class="token">supertypeOf</span> TwoParametersAST

+                        | <span class="token">subtypeOf</span> TwoParametersAST

+                        | <span class="token">typeOf</span> TwoParametersAST

+	                      | <span class="token">instanceOf</span> TwoParametersAST  

+

+TwoParametersAST ::= <span class="token">(</span> <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a> <span class="token">,</span> <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a> <span class="token">)</span>

+</pre></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_CreateRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+When an <span class="emphasis"><em>entity</em></span> is being created 

+</p><div class="itemizedlist"><ul type="disc"><li><p>it will be the instance of the specified type (<a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">qualified type name</a>), 

+</p></li><li><p>it will be contained either by the entity determined by the 

+<a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">term</a> if the <code class="computeroutput">in</code> branch is present or by the 

+<code class="computeroutput">root</code> element of the model space by default, and 

+</p></li><li><p>a reference to it will be stored in the <a href="def_Variable.html" title="5.7.2.&nbsp;Variable">variable reference</a>. 

+</p></li></ul></div><p>

+When a <span class="emphasis"><em>relation</em></span> is being created 

+</p><div class="itemizedlist"><ul type="disc"><li><p>it will be the instance of the specified type (<a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">qualified type name</a>), 

+</p></li><li><p>it will point from the <span class="strong"><strong>source</strong></span> model element (identified by the second 

+<a href="def_Variable.html" title="5.7.2.&nbsp;Variable">variable reference</a>) to the 

+<span class="strong"><strong>target</strong></span> model element (identified by the third <a href="def_Variable.html" title="5.7.2.&nbsp;Variable">variable reference</a>), and 

+</p></li><li><p>a reference to it will be stored in the <a href="def_Variable.html" title="5.7.2.&nbsp;Variable">variable reference</a>. 

+</p></li></ul></div><p>

+If the variable is already bound when the <span class="strong"><strong>create rule</strong></span> is called 

+its value will be overwritten. 

+</p><p>

+When a <a href="def_Relationship.html" title="2.2.3.&nbsp;Relationships">relationship</a> is being created 

+<div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>supertypeOf</em></span>: the first <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">term</a>

+identifies the supertype, and the second <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">term</a> identifies the subtype.

+</p></li><li><p><span class="emphasis"><em>subtypeOf</em></span>: the first <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">term</a>

+identifies the subtype, and the second <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">term</a> identifies the supertype.

+</p></li><li><p><span class="emphasis"><em>typeOf</em></span>: the first <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">term</a>

+identifies the type of the model element, and the second <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">term</a> identifies the instance.

+</p></li><li><p><span class="emphasis"><em>instanceOf</em></span>: the first <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">term</a>

+identifies the instance element, and the second <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">term</a> identifies the type.

+</p></li></ul></div>

+</p></td></tr></table></div><div class="highlights"><a name="def_CreateRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_ModelManipulationRule.html" title="4.4.1.&nbsp;Model Manipulation Rule">model manipulation rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_ModelManipulationRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMModelManipulationRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_DeleteRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.4.1.&nbsp;Model Manipulation Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.4.3.&nbsp;Delete Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_DeleteRule.html b/org.eclipse.viatra2.help/def_DeleteRule.html
new file mode 100644
index 0000000..4c20cca
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_DeleteRule.html
@@ -0,0 +1,54 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.4.3.&nbsp;Delete Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMModelManipulationRules.html" title="4.4.&nbsp;Model Manipulation Rules"><link rel="prev" href="def_CreateRule.html" title="4.4.2.&nbsp;Create Rule"><link rel="next" href="def_CopyRule.html" title="4.4.4.&nbsp;Copy Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.4.3.&nbsp;Delete Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_CreateRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.4.&nbsp;Model Manipulation Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_CopyRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_DeleteRule"></a>4.4.3.&nbsp;Delete Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_DeleteRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>delete rule</strong></span><a name="N11C96" class="indexterm"></a> 

+removes a model element or a relationship from the model. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_DeleteRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+DeleteRuleAST ::= <span class="token">delete</span> <span class="token">(</span> <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a> DeleteSemanticsOptAST <span class="token">)</span> <span class="token">;</span>

+                | <span class="token">delete</span> <span class="token">(</span> DeleteRelationshipAST <span class="token">)</span> <span class="token">;</span>

+	

+DeleteSemanticsOptAST ::= $empty | <span class="token">,</span> DeleteSemanticsAST

+DeleteSemanticsAST ::= <span class="token">delete_content</span> | <span class="token">move_content</span>	                    

+

+DeleteRelationshipAST ::= <span class="token">supertypeOf</span> TwoParametersAST

+                        | <span class="token">subtypeOf</span> TwoParametersAST

+                        | <span class="token">typeOf</span> TwoParametersAST

+	                      | <span class="token">instanceOf</span> TwoParametersAST

+	                        

+TwoParametersAST ::= <span class="token">(</span> <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a> <span class="token">,</span> <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a> <span class="token">)</span>

+</pre><p>

+The parameter of a <span class="strong"><strong>delete rule</strong></span> is either a <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">term</a>

+that evaluates to a model element or a <a href="def_Relationship.html" title="2.2.3.&nbsp;Relationships">relationship</a>. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_DeleteRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+If a model element is to be deleted then all relations that have this element either 

+as source or as target are deleted implicitly, too. 

+</p><p>

+If an entity is to be deleted then optionally the <span class="strong"><strong>delete semantics</strong></span>

+<a name="N11CFE" class="indexterm"></a> can be defined: 

+<div class="itemizedlist"><ul type="disc"><li><p><code class="computeroutput">delete_content</code> means that both the referenced element and its 

+contained elements - if any - are deleted from the model. This behavior 

+corresponds to the view when the model is interpreted along its 

+<span class="emphasis"><em>containment hierarchy</em></span>: in each deletion operation the node with its 

+whole subtree is deleted with the corresponding edges. This is the default 

+behavior. 

+</p></li><li><p><code class="computeroutput">move_content</code> means that only the referenced element is 

+deleted and the contained elements - if any - remain in the model; the new 

+container for these is the container of the deleted element. This behavior 

+corresponds to the view when the model is interpreted as a <span class="emphasis"><em>graph</em></span>: in 

+each deletion operation only a single node is deleted with corresponding 

+edges. 

+</p></li></ul></div>

+</p><p>

+The interpreter ignores multiple deleting and continue. Multiple deleting 

+occurs for instance in the following example 

+</p><pre class="programlisting">

+delete(A, delete_content); 

+delete(B, delete_content); 

+</pre><p>

+if <code class="computeroutput">B</code> is contained by <code class="computeroutput">A</code>. 

+In this case the second delete rule is ignored. 

+</p><p>

+During debugging, the interpreter informs the user about the ignored rule 

+execution. The interpreter will issue no further information in normal 

+execution mode. 

+</p></td></tr></table></div><div class="highlights"><a name="def_DeleteRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_ModelManipulationRule.html" title="4.4.1.&nbsp;Model Manipulation Rule">model manipulation rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_CreateRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMModelManipulationRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_CopyRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.4.2.&nbsp;Create Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.4.4.&nbsp;Copy Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_DirectedFormalParameter.html b/org.eclipse.viatra2.help/def_DirectedFormalParameter.html
new file mode 100644
index 0000000..c44f8a4
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_DirectedFormalParameter.html
@@ -0,0 +1,42 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.8.2.&nbsp;Directed Formal Parameters</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_Parameters.html" title="5.8.&nbsp;Parameters and Variable Lists"><link rel="prev" href="def_FormalParameter.html" title="5.8.1.&nbsp;Formal Parameters"><link rel="next" href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.8.2.&nbsp;Directed Formal Parameters</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_FormalParameter.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.8.&nbsp;Parameters and Variable Lists</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_ActualParameter.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_DirectedFormalParameter"></a>5.8.2.&nbsp;Directed Formal Parameters</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_DirectedFormalParameter_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+<span class="strong"><strong>Directed formal parameters</strong></span>

+<a name="N12FC7" class="indexterm"></a>

+<a name="N12FCC" class="indexterm"></a> 

+define the interface of a <a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">GT rule</a> or an 

+<a href="def_AsmRuleDef.html" title="4.1.1.&nbsp;ASM Rule Definition">ASM rule</a> by a list of

+<a href="def_Variable.html" title="5.7.2.&nbsp;Variable">ASM variables</a>. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_DirectedFormalParameter_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+	DirectedFormalParamsAST ::= DirectionKindAST <a href="def_Variable.html" title="5.7.2.&nbsp;Variable">VariableDefAST</a> 

+	                          | DirectedFormalParamsAST <span class="token">,</span> DirectionKindAST <a href="def_Variable.html" title="5.7.2.&nbsp;Variable">VariableDefAST</a>

+

+	DirectionKindAST ::= <span class="token">in</span> | <span class="token">out</span> | <span class="token">inout</span>

+</pre><p>

+<span class="strong"><strong>Directed formal parameters</strong></span> are defined by

+is a comma-separated list of variables (each having a direction specification).

+It can contain an arbitrary number of variables (including none).

+In contrast to the <a href="def_FormalParameter.html" title="5.8.1.&nbsp;Formal Parameters">formal parameters</a>,

+it defines a direction for each parameter, namely either <code class="computeroutput">in</code>, 

+<code class="computeroutput">out</code> or <code class="computeroutput">inout</code>. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_DirectedFormalParameter_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+An <span class="emphasis"><em>input-only variable</em></span> (with tag <code class="computeroutput">in</code>) takes the value of the 

+actual parameter, but at the end of the execution of the rule the value of 

+the actual parameter is not updated. 

+</p><p>

+An <span class="emphasis"><em>output-only variable</em></span>(with tag <code class="computeroutput">out</code>) does not take the value of 

+the actual parameter: it is considered as undefined having the 

+<a href="def_UndefinedValue.html" title="5.4.2.&nbsp;Undefined Value">undefined value</a> (<code class="computeroutput">undef</code>). 

+At the end of the execution of the rule, the value of the actual parameter is overwritten with the value 

+of the variable defined as formal parameter. 

+</p><p>

+An <span class="emphasis"><em>input-output variable</em></span>(with tag <code class="computeroutput">inout</code>) takes the value of the 

+actual parameter, and at the end of the execution of the rule the value of 

+the actual parameter is updated with the value of the variable defined as 

+formal parameter. 

+</p></td></tr></table></div><div class="highlights"><a name="def_DirectedFormalParameter_UsedBy"></a><p><b>Used By:&nbsp;</b>

+<a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">GT rule definition</a>, 

+<a href="def_AsmRuleDef.html" title="4.1.1.&nbsp;ASM Rule Definition">ASM rule definition</a>

+</p></div><div class="highlights"><a name="def_DirectedFormalParameter_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_FormalParameter.html" title="5.8.1.&nbsp;Formal Parameters">formal parameters</a>, 

+<a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">actual parameter</a>, 

+<a href="def_UndefinedValue.html" title="5.4.2.&nbsp;Undefined Value">undefined value</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_FormalParameter.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_Parameters.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_ActualParameter.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.8.1.&nbsp;Formal Parameters&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.8.3.&nbsp;Actual Parameters</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_ElementUpdateRule.html b/org.eclipse.viatra2.help/def_ElementUpdateRule.html
new file mode 100644
index 0000000..d11d588
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_ElementUpdateRule.html
@@ -0,0 +1,64 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.4.6.&nbsp;Element Update Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMModelManipulationRules.html" title="4.4.&nbsp;Model Manipulation Rules"><link rel="prev" href="def_MoveRule.html" title="4.4.5.&nbsp;Move Rule"><link rel="next" href="sec_ASMTermsFormulas.html" title="5.&nbsp;ASM Terms and ASM Functions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.4.6.&nbsp;Element Update   Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_MoveRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.4.&nbsp;Model Manipulation Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_ASMTermsFormulas.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_ElementUpdateRule"></a>4.4.6.&nbsp;Element Update   Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_ElementUpdateRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+An <span class="strong"><strong>element update rule</strong></span><a name="N11E63" class="indexterm"></a> 

+changes a property of a model element. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_ElementUpdateRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+ElementUpdateRuleAST ::= ElementUpdateOpAST <span class="token">(</span> ArithmeticTermAST <span class="token">,</span> ArithmeticTermAST <span class="token">)</span> <span class="token">;</span>

+

+ElementUpdateOpAST ::= <span class="token">rename</span> | <span class="token">setValue</span> | <span class="token">setFrom</span> | <span class="token">setTo</span>

+                     | <span class="token">setMultiplicity</span> | <span class="token">setAggregation</span> | <span class="token">setInverse</span>

+</pre><p>

+All <span class="strong"><strong>element update rules</strong></span> have two parameters. The first 

+identifies the model element to be updated, while the second contains the new 

+value. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_ElementUpdateRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><div class="itemizedlist"><p>

+The <code class="computeroutput">setInverse</code> rule defines an <span class="emphasis"><em>inverse relation</em></span> between two 

+relations. Both parameters are ASM <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">terms</a> that must evaluate to 

+<a href="def_ModelElementConstant.html" title="5.4.8.&nbsp;Model Element Constant">model element constants</a> referencing <span class="emphasis"><em>relations</em></span>; the 

+inverse property is set for both relations having a reference to the other relation 

+as the new value. 

+</p><ul type="disc"><li><p>

+The <code class="computeroutput">rename</code> rule modifies the <span class="emphasis"><em>name</em></span> of a model element. Both 

+parameters are ASM <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">terms</a>; the first must evaluate to a 

+<a href="def_ModelElementConstant.html" title="5.4.8.&nbsp;Model Element Constant">model element constant</a> referencing an <span class="emphasis"><em>entity or relation</em></span>, 

+the second must evaluate to a <span class="emphasis"><em>string</em></span> that will be the local name of 

+the model element. Since the new name is required to be unique within its 

+container (in case of entities) or within the source element (in case of 

+relations), a possible name clash is resolved automatically by the 

+interpreter at run-time by extending the name of the renamed model element 

+with a randomly generated tag. 

+</p></li><li><p>

+The <code class="computeroutput">setValue</code> rule modifies the <span class="emphasis"><em>value</em></span> of an entity. Both 

+parameters are ASM <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">terms</a>; the first must evaluate to a 

+<a href="def_ModelElementConstant.html" title="5.4.8.&nbsp;Model Element Constant">model element constant</a> referencing an <span class="emphasis"><em>entity</em></span>, the second 

+must evaluate to a <span class="emphasis"><em>string</em></span> that will be the new value assigned to the 

+entity. If the second parameter is not evaluated to a string an implicit 

+conversion to string is performed. 

+</p></li><li><p>

+The <code class="computeroutput">setFrom</code> rule sets the source of a relation. Both parameters 

+are ASM <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">terms</a> that must evaluate to <a href="def_ModelElementConstant.html" title="5.4.8.&nbsp;Model Element Constant">model element constants</a>; 

+the first references a <span class="emphasis"><em>relation</em></span>, the second 

+references an <span class="emphasis"><em>arbitrary model element</em></span> that will be the new source of the relation. 

+</p></li><li><p>

+The <code class="computeroutput">setTo</code> rule sets the target of a relation. Both parameters are 

+ASM <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">terms</a> that must evaluate to <a href="def_ModelElementConstant.html" title="5.4.8.&nbsp;Model Element Constant">model element constants</a>; 

+the first references a <span class="emphasis"><em>relation</em></span>, the second references 

+an <span class="emphasis"><em>arbitrary model element</em></span>that will be the new target of the relation. 

+</p></li><li><p>

+The <code class="computeroutput">setMultiplicity</code> rule modifies the <span class="emphasis"><em>multiplicity</em></span> property 

+of a relation. Both parameters are ASM <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">terms</a>; the first must 

+evaluate to a <a href="def_ModelElementConstant.html" title="5.4.8.&nbsp;Model Element Constant">model element constant</a> referencing a 

+<span class="emphasis"><em>relation</em></span>, the second must evaluate to a <span class="emphasis"><em>multiplicity value</em></span> that will be the new 

+value assigned to the relation. 

+</p></li><li><p>

+The <code class="computeroutput">setAggregation</code> rule modifies the <span class="emphasis"><em>aggregation</em></span> property 

+of a relation. Both parameters are ASM <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">terms</a>; the first must 

+evaluate to a <a href="def_ModelElementConstant.html" title="5.4.8.&nbsp;Model Element Constant">model element constant</a> referencing a 

+<span class="emphasis"><em>relation</em></span>, the second must evaluate to a <span class="emphasis"><em>boolean value</em></span> that will be the new value 

+assigned to the relation. 

+</p></li></ul></div></td></tr></table></div><div class="highlights"><a name="def_ElementUpdateRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_ModelManipulationRule.html" title="4.4.1.&nbsp;Model Manipulation Rule">model manipulation rule</a>

+</p></div><div class="highlights"><a name="def_ElementUpdateRule_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_Entity.html" title="2.2.1.&nbsp;Entity">entity</a>, <a href="def_Relation.html" title="2.2.2.&nbsp;Relation">relation</a>, <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">model element name</a>, 

+<a href="def_ModelElementConstant.html" title="5.4.8.&nbsp;Model Element Constant">model element constant</a>, <a href="def_StringConstant.html" title="5.4.5.&nbsp;String Constant">string constant</a>, 

+<a href="def_MultiplicityConstant.html" title="5.4.4.&nbsp;Multiplicity Constant">multiplicity constant</a>, <a href="def_BooleanConstant.html" title="5.4.3.&nbsp;Boolean Constant">boolean constant</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_MoveRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMModelManipulationRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_ASMTermsFormulas.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.4.5.&nbsp;Move Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.&nbsp;ASM Terms and ASM Functions</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_Entity.html b/org.eclipse.viatra2.help/def_Entity.html
new file mode 100644
index 0000000..7a5ef31
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_Entity.html
@@ -0,0 +1,123 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>2.2.1.&nbsp;Entity</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_LocalPatternlElementDescription.html" title="2.2.&nbsp;Local Pattern Body Elements"><link rel="prev" href="sec_LocalPatternlElementDescription.html" title="2.2.&nbsp;Local Pattern Body Elements"><link rel="next" href="def_Relation.html" title="2.2.2.&nbsp;Relation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">2.2.1.&nbsp;Entity</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_LocalPatternlElementDescription.html">Prev</a>&nbsp;</td><th align="center" width="60%">2.2.&nbsp;Local Pattern Body Elements</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_Relation.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_Entity"></a>2.2.1.&nbsp;Entity</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_Entity_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+			An

+			<span class="strong"><strong>entity</strong></span>

+			<a name="N1093A" class="indexterm"></a>

+			can be part of a (local) pattern body. If it is part of a precondition pattern, it binds a pattern variable

+			to an entity in the model space during pattern matching. If it is part of a postcondition, it may prescribe

+			the creation of model elements.

+		</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_Entity_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+EntityAST ::= <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">QualifiedTypeNameAST</a> EntityBody <a href="def_ContainmentConstraint.html" title="2.1.9.&nbsp;Containment Constraint">ContainmentConstraintOptAST</a>	

+EntityBody ::= <span class="token">(</span> <a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">PatternVariableDefRefAST</a> <span class="token">)</span> 

+</pre><p>

+			An

+			<span class="strong"><strong>entity</strong></span>

+			<a name="N1095E" class="indexterm"></a>

+			is identified by a

+			<a href="def_Entity.html" title="2.2.1.&nbsp;Entity">pattern variable</a>.

+		</p><p>

+			It can have a type (

+			<span class="strong"><strong>entity type</strong></span>

+			<a name="N1096D" class="indexterm"></a>), 

+			which is either a local name or a fully qualified name of a model element (

+			<a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">qualified model element name</a>). 

+			A type identifies another entity of the model space; it can be referenced with the local name only if its

+			namespace is imported. 

+			In the most general case, the type is <code class="computeroutput">entity</code>.

+			

+		</p><p>

+			The location of an entity may be restricted by a 

+			<a href="def_ContainmentConstraint.html" title="2.1.9.&nbsp;Containment Constraint">containment constraint</a>.

+		</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_Entity_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+			The semantics of an

+			<span class="strong"><strong>entity</strong></span>

+			<a name="N1098D" class="indexterm"></a>

+			largely differs on whether this entity appears in a pattern used as a stand-alone pattern, or as a

+			precondition or a postcondition of a

+			<a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">GT rule definition</a>.

+			The semantics of the postcondition case is defined in details in

+			<a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">GT rule definition</a>.

+		</p><p>

+			In case of pattern matching (precondition part or stand-alone patterns), an

+			<span class="strong"><strong>entity</strong></span>

+			<a name="N109A0" class="indexterm"></a>

+			appearing in a

+			<a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">pattern body</a>

+			prescribes that the corresponding

+			<a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">pattern variable</a>

+			should be bound to an entity in the model space.

+		</p><p>

+			Note that attribute conditions (e.g. accessing the 

+			<span class="strong"><strong>value</strong></span> 

+			<a name="N109B3" class="indexterm"></a>

+			of an entity need to be specified as part of a

+			<a href="def_CheckCondition.html" title="2.1.8.&nbsp;Check Condition">check condition</a>.

+		</p><p>

+			During pattern matching the referenced entity must be located in the containment hierarchy according to the

+			<a href="def_ContainmentConstraint.html" title="2.1.9.&nbsp;Containment Constraint">containment constraint</a>. 

+			In case of the constraint the entity must be contained directly by the entity referenced by the container,

+			whereas in case of the constraint the containment can be transitive (to find all ancestors).

+		</p><p><b>Needs to be checked.&nbsp;</b>

+				The

+				<span class="strong"><strong>container</strong></span>

+				<a name="N109CB" class="indexterm"></a>

+				needs to be a constant, an ASM function, or (most typically) a pattern variable. In the latter case, the 

+				corresponding <a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">pattern variable</a> needs to be bound prior to 

+				pattern matching (i.e. it is an input parameter of the pattern).  

+			</p><p>

+			If there are multiple containment constraints for an entity (for instance, from the caller ASM

+			<a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>

+			or

+			<a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>), all constraints need to be satisfied for a successful match. 

+			Thus, if the constraints are contradictionary, pattern matching will fail.

+		</p><p>

+

+			In case of postcondition patterns, an

+			<span class="strong"><strong>entity</strong></span>

+			<a name="N109E4" class="indexterm"></a>

+			appearing in a

+			<a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">pattern body</a>

+			may prescribe that a new entity has to be created in the model space, and this new entity is then assigned

+			to the corresponding <a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">pattern variable</a>. 

+

+		</p><p>

+				Concerning <a href="def_ContainmentConstraint.html" title="2.1.9.&nbsp;Containment Constraint">containment constraints</a>

+				used in postcondition patterns, 

+				<div class="itemizedlist"><ul type="disc"><li><p> in case of the <span class="emphasis"><em>in</em></span> constraint, the new element will be created as a direct child of the entity

+				defined by the <span class="emphasis"><em>container</em></span> entity

+				</p></li><li><p> in case of the <span class="emphasis"><em>no</em></span> containment constraint, 

+				the new element will be created as a direct child of the <span class="emphasis"><em>root</em></span> entity

+				</p></li><li><p> <span class="emphasis"><em>below</em></span> constraints are only checked as a postcondition, thus

+				they require (but do not enforce) that the new element should be located in the 

+				<span class="emphasis"><em>container</em></span> entity. A runtime error is issued if this is not the case.

+				</p></li></ul></div>

+			</p><p>

+			The

+			<span class="strong"><strong>container</strong></span>

+			<a name="N10A1C" class="indexterm"></a>

+			is allowed to be a constant, an ASM function, or a pattern variable. In the latter case, it is allowed to

+			have another entity referred by the pattern variable of the

+			<span class="strong"><strong>container</strong></span>.

+		</p><p>

+				In case of postcondition patterns, contradicting multiple containment constraints result in a runtime

+				error.

+			</p></td></tr></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Constraints"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left"><a name="def_Entity_Constraints"></a>Constraints</th></tr><tr><td valign="top" align="left"><p>

+			Referencing to the

+			<span class="strong"><strong>value</strong></span>

+			of an entity is not allowed in entity definitions. The value property

+			can be accessed in <a href="def_CheckCondition.html" title="2.1.8.&nbsp;Check Condition">check conditions</a> 

+			as <code class="computeroutput">value(E)</code> (where pattern variable 

+			<code class="computeroutput">E</code> stands for the corresponding entity).  

+		</p></td></tr></table></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning: Warning"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Warning]" src="images/warning.png"></td><th align="left"><a name="def_Entity_Warning"></a>Warning</th></tr><tr><td valign="top" align="left"><p>

+The <code class="computeroutput">vpm</code> namespace with 

+<code class="computeroutput">vpm.entity</code> and <code class="computeroutput">vpm.entity.relation</code>   

+(which were present in previous VIATRA releases as a metamodeling core) is  

+no longer supported. Please use simple <code class="computeroutput">entity</code>

+instead.

+  	</p></td></tr></table></div><div class="highlights"><a name="def_Entity_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+				<a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">pattern body</a>

+			</p></div><div class="highlights"><a name="def_Entity_UsedBy"></a><p><b>Used By:&nbsp;</b>

+				<a href="def_CreateRule.html" title="4.4.2.&nbsp;Create Rule">create rule</a>

+			</p></div><div class="highlights"><a name="def_Entity_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+				<a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">pattern body</a>,

+				<a href="def_NamespaceImport.html" title="1.1.3.&nbsp;Namespace Import">namespace import</a>

+			</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_LocalPatternlElementDescription.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_LocalPatternlElementDescription.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_Relation.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">2.2.&nbsp;Local Pattern Body Elements&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;2.2.2.&nbsp;Relation</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_FailRule.html b/org.eclipse.viatra2.help/def_FailRule.html
new file mode 100644
index 0000000..a134c71
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_FailRule.html
@@ -0,0 +1,23 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.2.4.&nbsp;Fail Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMSimpleRules.html" title="4.2.&nbsp;Simple ASM Rules"><link rel="prev" href="def_SkipRule.html" title="4.2.3.&nbsp;Skip Rule"><link rel="next" href="def_UpdateRule.html" title="4.2.5.&nbsp;Update Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.2.4.&nbsp;Fail Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_SkipRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.2.&nbsp;Simple ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_UpdateRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_FailRule"></a>4.2.4.&nbsp;Fail Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_FailRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>fail rule</strong></span><a name="N112F1" class="indexterm"></a>represents an "always fails" instruction, that can be used for 

+interrupting the execution of the container rule. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_FailRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+FailRuleAST ::= <span class="token">fail</span> <span class="token">;</span>

+</pre></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_FailRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>fail rule</strong></span><a name="N1130C" class="indexterm"></a>interrupts the execution of the container rule, 

+which is propagated like exception to upper levels as long as it is caught (or 

+the transformation is terminated). 

+</p><p>

+An exception generated by a <span class="strong"><strong>fail rule</strong></span><a name="N11316" class="indexterm"></a>can be catched explicitly 

+by the <a href="def_TryRule.html" title="4.3.10.&nbsp;Try Rule">try rule</a>. Alternatively, a fail exception can be used 

+to explicitly interrupt an <a href="def_IterateRule.html" title="4.3.8.&nbsp;Iterate Rule">iterate rule</a>. 

+</p></td></tr></table></div><div class="highlights"><a name="def_FailRule_Remark"></a><p><b>Remark.&nbsp;</b>

+A rule can fail in the following situations: 

+<div class="itemizedlist"><ul type="disc"><li><p>it is the <a href="def_FailRule.html" title="4.2.4.&nbsp;Fail Rule">fail rule</a>itself, 

+</p></li><li><p>it is the <a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>and no matching is found, 

+</p></li><li><p>it is a <a href="def_CompoundRule.html" title="4.3.1.&nbsp;Compound Rule">compound rule</a>and an executed contained rule fails. 

+</p></li></ul></div></p></div><div class="highlights"><a name="def_FailRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_SimpleRule.html" title="4.2.1.&nbsp;Simple Rule">simple rule</a>

+</p></div><div class="highlights"><a name="def_FailRule_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_TryRule.html" title="4.3.10.&nbsp;Try Rule">try rule</a>, <a href="def_IterateRule.html" title="4.3.8.&nbsp;Iterate Rule">iterate rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_SkipRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMSimpleRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_UpdateRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.2.3.&nbsp;Skip Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.2.5.&nbsp;Update Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_FloatConstant.html b/org.eclipse.viatra2.help/def_FloatConstant.html
new file mode 100644
index 0000000..09b0338
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_FloatConstant.html
@@ -0,0 +1,21 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.4.7.&nbsp;Float Constant</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMConstants.html" title="5.4.&nbsp;Constants"><link rel="prev" href="def_IntConstant.html" title="5.4.6.&nbsp;Integer Constants"><link rel="next" href="def_ModelElementConstant.html" title="5.4.8.&nbsp;Model Element Constant"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.4.7.&nbsp;Float Constant</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_IntConstant.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.4.&nbsp;Constants</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_ModelElementConstant.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_FloatConstant"></a>5.4.7.&nbsp;Float Constant</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_FloatConstant_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>Float constant</strong></span> 

+<a name="N12AE9" class="indexterm"></a>

+<a name="N12AEE" class="indexterm"></a> 

+is a numeric value with a floating point expression.

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_FloatConstant_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+FloatConstantAST ::= <a href="def_FloatLiteral.html" title="6.3.2.&nbsp;Float Literal">DoubleLiteral</a> | <a href="def_FloatLiteral.html" title="6.3.2.&nbsp;Float Literal">FloatingPointLiteral</a> 

+</pre><p>

+A float constant can be represented in an arbitrary combination of the 

+floating point representation and the scientific representation. 

+</p></td></tr></table></div><div class="example"><a name="def_FloatConstant_Example"></a><p class="title"><b>Example&nbsp;2.10.&nbsp;Floating point constants</b></p><div class="example-contents"><p>

+<pre class="programlisting">

+Floating point representation: 1.5 4, 1 3 2.4 5 6 

+

+Scientific representation: 1E-6, 3.5 6e2 

+

+Combination: 4 3 2e-8, 1 3 3.5 6 7E6 

+</pre>

+</p></div><p></p></div><br class="example-break"><div class="highlights"><a name="def_FloatConstant_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_AsmConstant.html" title="5.4.1.&nbsp;ASM Constant (Value)">ASM constant</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_IntConstant.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMConstants.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_ModelElementConstant.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.4.6.&nbsp;Integer Constants&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.4.8.&nbsp;Model Element Constant</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_FloatLiteral.html b/org.eclipse.viatra2.help/def_FloatLiteral.html
new file mode 100644
index 0000000..3a048e7
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_FloatLiteral.html
@@ -0,0 +1,32 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>6.3.2.&nbsp;Float Literal</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_NumberTokens.html" title="6.3.&nbsp;Tokens for numbers"><link rel="prev" href="def_IntegerLiteral.html" title="6.3.1.&nbsp;Integer Literal"><link rel="next" href="sec_index.html" title="Index"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">6.3.2.&nbsp;Float Literal</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_IntegerLiteral.html">Prev</a>&nbsp;</td><th align="center" width="60%">6.3.&nbsp;Tokens for numbers</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_index.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_FloatLiteral"></a>6.3.2.&nbsp;Float Literal</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_FloatLiteral_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+An <span class="strong"><strong>float literal</strong></span> 

+<a name="N1330F" class="indexterm"></a>

+<a name="N13314" class="indexterm"></a>

+is a numeric token representing a floating point number.

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_FloatLiteral_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+DoubleLiteral -&gt; Decimal

+               | Decimal LetterForD

+               | Decimal Exponent

+               | Decimal Exponent LetterForD

+               | <a href="def_IntegerLiteral.html" title="6.3.1.&nbsp;Integer Literal">Integer</a> Exponent

+               | <a href="def_IntegerLiteral.html" title="6.3.1.&nbsp;Integer Literal">Integer</a> Exponent LetterForD

+               | <a href="def_IntegerLiteral.html" title="6.3.1.&nbsp;Integer Literal">Integer</a> LetterForD

+

+FloatingPointLiteral -&gt; Decimal LetterForF

+                      | Decimal Exponent LetterForF

+                      | <a href="def_IntegerLiteral.html" title="6.3.1.&nbsp;Integer Literal">Integer</a> Exponent LetterForF

+                      | <a href="def_IntegerLiteral.html" title="6.3.1.&nbsp;Integer Literal">Integer</a> LetterForF

+                      

+Decimal ::= '.' <a href="def_IntegerLiteral.html" title="6.3.1.&nbsp;Integer Literal">Integer</a>

+          | <a href="def_IntegerLiteral.html" title="6.3.1.&nbsp;Integer Literal">Integer</a> '.'

+          | <a href="def_IntegerLiteral.html" title="6.3.1.&nbsp;Integer Literal">Integer</a> '.' <a href="def_IntegerLiteral.html" title="6.3.1.&nbsp;Integer Literal">Integer</a>

+

+Exponent ::= LetterEe <a href="def_IntegerLiteral.html" title="6.3.1.&nbsp;Integer Literal">Integer</a>

+           | LetterEe '-' <a href="def_IntegerLiteral.html" title="6.3.1.&nbsp;Integer Literal">Integer</a>

+           | LetterEe '+' <a href="def_IntegerLiteral.html" title="6.3.1.&nbsp;Integer Literal">Integer</a>

+                      

+LetterForD -&gt; 'D' | 'd'

+LetterForF -&gt; 'F' | 'f'                      

+</pre></td></tr></table></div><div class="highlights"><a name="def_FloatLiteral_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_Token.html" title="6.1.1.&nbsp;Tokens">Token</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_IntegerLiteral.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_NumberTokens.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_index.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">6.3.1.&nbsp;Integer Literal&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;Index</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_ForallRule.html b/org.eclipse.viatra2.help/def_ForallRule.html
new file mode 100644
index 0000000..7b9e368
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_ForallRule.html
@@ -0,0 +1,139 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.3.7.&nbsp;Forall Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMCompoundRules.html" title="4.3.&nbsp;Compound ASM Rules"><link rel="prev" href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule"><link rel="next" href="def_IterateRule.html" title="4.3.8.&nbsp;Iterate Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.3.7.&nbsp;Forall Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_ChooseRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.3.&nbsp;Compound ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_IterateRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_ForallRule"></a>4.3.7.&nbsp;Forall Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_ForallRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>forall rule</strong></span><a name="N11814" class="indexterm"></a> 

+collects all variable bindings fulfilling a condition (universal condition) by selecting elements from the model space

+(or from an ASM function), and then executes its body (one by one) for each of these variable bindings. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_ForallRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+ForalleRuleAST ::= <span class="token">forall</span> <a href="def_ConstrainedVariableList.html" title="5.8.4.&nbsp;Constrained Variable List">ConstrainedVariablesOptAST</a> <span class="token">with</span> ConditionAST <span class="token">do</span> <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">AsmRuleAST</a>

+ConditionAST ::= <a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">LogicalTermAST</a>

+               | <a href="def_GTRuleCall.html" title="3.4.1.&nbsp;GTRule Call">GTRuleCallAST</a> 

+</pre><p>

+The <span class="strong"><strong>forall rule</strong></span> consists of (scoped) variable 

+declarations, a condition part (<span class="emphasis"><em>with </em></span>clause), and an <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rule invocation</a> as body. 

+</p><p>

+Quantified variables of the <span class="strong"><strong>forall rule</strong></span> may only appear in the condition part in 

+a <a href="def_GraphPatternCall.html" title="2.1.4.&nbsp;Graph Pattern Call">graph pattern call</a>, a <a href="def_GTRuleCall.html" title="3.4.1.&nbsp;GTRule Call">GT rule call</a> or 

+an <a href="def_AsmFunctionLocation.html" title="5.5.3.&nbsp;ASM Function Location">ASM function location</a>.

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_ForallRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>forall rule</strong></span> finds all substitution of variables defined in 

+its head which satisfies a boolean condition, and then executes the body 

+rule for each substitution separately. Note that the execution semantics of a <span class="strong"><strong>forall rule</strong></span>

+is not fully parallel. 

+<div class="itemizedlist"><ul type="disc"><li><p> 

+In the first phase, each variable binding is calculated (typically, by pattern matching).

+</p></li><li><p> 

+As the next step, the body of the rule is executed for each binding, but side effects can be accumulated for external variables

+(see <a href="def_ForallRule.html#def_ForallRule_Example2" title="Example&nbsp;2.7.&nbsp;Counting with a forall rule">Example&nbsp;2.7, &ldquo;Counting with a forall rule&rdquo;</a>). 

+</p></li></ul></div>  

+</p><p>

+If no variable substitutions satisfy the condition, then the 

+<span class="strong"><strong>forall rule</strong></span> is still successful and the execution continues, 

+but nothing is changed.  

+</p><p>

+In contrast to the <a href="def_IterateRule.html" title="4.3.8.&nbsp;Iterate Rule">iterate rule</a>, termination is normally 

+not a critical issue when using the <span class="strong"><strong>forall rule</strong></span>, which first 

+collects all available matchings, and then applies the rule for all of them 

+in a single (most frequently determinstic) step. 

+</p><p>

+However, if different matchings of a GT rule are overlapping, parallel rule 

+application may result in conflicts when conflicting operations are issued on 

+a model element (e.g. delete vs. preserve). currently does not 

+provide support for detecting such conflicts, thus it is the role of the 

+transformation designer to assure that a GT rule applied in 

+<span class="strong"><strong>forall rule</strong></span> is not conflicting with itself. 

+</p><p>

+A <span class="strong"><strong>forall rule</strong></span> can be used in three ways: 

+<div class="itemizedlist"><ul type="disc"><li><p>

+In the first form, the body <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rule</a> is executed for 

+all matches of a given <a href="def_GraphPatternCall.html" title="2.1.4.&nbsp;Graph Pattern Call">graph pattern</a> serving as the condition.

+</p></li><li><p>

+In the second one, a <a href="def_GTRuleCall.html" title="3.4.1.&nbsp;GTRule Call">graph transformation rule</a> is 

+executed for all possible matches of its precondition pattern and the body  

+<a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rule</a> is then executed. 

+</p></li><li><p>

+In the third form, body <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rule</a> is executed for all (combination of) variable 

+substitutions that satisfy the condition <a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">logical term</a>. In such a case,

+only those variables are substituted which are used as locations to   

+access <a href="def_AsmFunctionLocation.html" title="5.5.3.&nbsp;ASM Function Location">ASM functions</a>. Naturally,

+only those locations are enumerated which stores a value other than <a href="">undef</a>.

+An example for this third case is given in <a href="def_ForallRule.html#def_ForallRule_Example4" title="Example&nbsp;2.9.&nbsp;Forall rule used in the context of ASM functions">Example&nbsp;2.9, &ldquo;Forall rule used in the context of ASM functions&rdquo;</a>. 

+</p></li></ul></div> 

+</p><p>

+The location in the containment hierarchy of each variable in the 

+<a href="def_ConstrainedVariableList.html" title="5.8.4.&nbsp;Constrained Variable List">constrained variable list</a> can be restricted to a specific 

+<span class="emphasis"><em>container entity</em></span>, or to a specific part of the model space. With the 

+use of the <code class="computeroutput">in</code>clause users can specify a container whereof the 

+values of the variables can be taken from. Similarly, the <code class="computeroutput">below</code>

+clause means that the values of the variables must be taken from the model 

+tree below the given container. 

+</p><p>

+If the <span class="strong"><strong>forall rule</strong></span> is used with <a href="def_GTRuleCall.html" title="3.4.1.&nbsp;GTRule Call">GT rule call</a>

+then the quantified variables have to be 

+<div class="itemizedlist"><ul type="disc"><li><p>output parameters of the <a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">GT rule</a>, and 

+</p></li><li><p>input parameters of its <span class="emphasis"><em>precondition </em></span> <a href="def_GraphPatternDef.html" title="2.1.1.&nbsp;Graph Pattern Definition">pattern</a>, 

+</p></li></ul></div>

+</p><p>

+Variables not quantified explicitly by the <span class="strong"><strong>forall rule</strong></span>, and 

+passed to the pattern matcher with a specific value (either in a 

+<a href="def_GTRuleCall.html" title="3.4.1.&nbsp;GTRule Call">GT rule call</a> or in a <a href="def_GraphPatternCall.html" title="2.1.4.&nbsp;Graph Pattern Call">graph pattern call</a>) are 

+input parameters for the pattern matcher. 

+</p><p>

+Variables not quantified explicitly by the <span class="strong"><strong>forall rule</strong></span>, and 

+passed to pattern matching with an <span class="strong"><strong>undef</strong></span> value (either in a 

+<a href="def_GTRuleCall.html" title="3.4.1.&nbsp;GTRule Call">GT rule call</a> or in a <a href="def_GraphPatternCall.html" title="2.1.4.&nbsp;Graph Pattern Call">graph pattern call</a>) 

+cause a run-time exception.

+ 

+</p><p>

+When a <span class="strong"><strong>forall rule</strong></span> is executed 

+</p></td></tr></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Constraints"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left"><a name="def_ForallRule_Constraints"></a>Constraints</th></tr><tr><td valign="top" align="left"><p>

+In the <a href="def_ConstrainedVariableList.html" title="5.8.4.&nbsp;Constrained Variable List">constrained variable list</a> only entities can be constrained. 

+If a containment constraint is applied to a relation, it causes a runtime error. 

+</p></td></tr></table></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning: Warning"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Warning]" src="images/warning.png"></td><th align="left"><a name="def_ForallRule_Warning"></a>Warning</th></tr><tr><td valign="top" align="left"><p>

+The evaluation of <span class="strong"><strong>forall rules</strong></span> for variables

+ranging over the indices of ASM functions is not optimized, and it can be 

+very slow for complex expressions like in <a href="def_ForallRule.html#def_ForallRule_Example4" title="Example&nbsp;2.9.&nbsp;Forall rule used in the context of ASM functions">Example&nbsp;2.9, &ldquo;Forall rule used in the context of ASM functions&rdquo;</a>.

+  	</p></td></tr></table></div><div class="highlights"><a name="def_ForallRule_Remark"></a><p><b>Remark.&nbsp;</b>

+Note that in a typical model transformation, the <span class="strong"><strong>forall rule</strong></span>

+and the <a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a> will drive the execution of elementary 

+graph transformation rules. In this respect, wherever a Boolean condition is 

+expected, we may use a graph pattern as condition, and wherever an ASM rule 

+is executed, we may apply a GT rule. 

+</p></div><div class="example"><a name="def_ForallRule_Example1"></a><p class="title"><b>Example&nbsp;2.6.&nbsp;Different invocations of a forall rule</b></p><div class="example-contents"><pre class="programlisting">

+// Invoking a graph pattern

+pattern myPattern(X) = { ... }

+forall Y with find myPatt(Y) do println(fqn(Y));

+

+// Invoking a graph transformation rule

+gtrule myGtRule(out X) = { ... }

+forall Y with find myGtRule(Y) do println(fqn(Y));

+

+// Invoking a logical term with an ASM function (INEFFICIENT) 

+asmfunction myAsmFun/1 = { ... }

+forall Y with myAsmFun(Y) &gt; 2 do println(Y);

+</pre></div><p></p></div><br class="example-break"><div class="example"><a name="def_ForallRule_Example2"></a><p class="title"><b>Example&nbsp;2.7.&nbsp;Counting with a forall rule</b></p><div class="example-contents"><pre class="programlisting">

+let N=0 in seq {

+  forall Y with find myPatt(Y) do 

+    update N = N+1;

+  println("Number of matches: " + N);

+} 

+</pre></div><p></p></div><br class="example-break"><div class="example"><a name="def_ForallRule_Example3"></a><p class="title"><b>Example&nbsp;2.8.&nbsp;Quantification of unbound variables passed to a forall rule</b></p><div class="example-contents"><p>

+The following example 

+</p><pre class="programlisting">

+let X=undef in 

+forall Y with find myPatt(X,Y) do ... 

+</pre><p>

+causes a run-time exception since X is not an input parameter.

+</p></div><p></p></div><br class="example-break"><div class="example"><a name="def_ForallRule_Example4"></a><p class="title"><b>Example&nbsp;2.9.&nbsp;Forall rule used in the context of ASM functions</b></p><div class="example-contents"><pre class="programlisting">

+asmfunction adderFun / 2 = { (1,2) = 3; (0,1) = 1; (2,3) = 5;  }

+forall X,Y with adderFun(adderFun(X, Y), Z) &gt; 2 do print(X + Y + Z); 

+</pre><p>

+This enumerates all triples <code class="computeroutput">X, Y, Z</code>,

+where <code class="computeroutput">adderFun</code> is defined for <code class="computeroutput">X, Y</code>, 

+and <code class="computeroutput">adderFun</code> is also defined for the result of

+<code class="computeroutput">adderFun(X,Y)</code> and <code class="computeroutput">Z</code>.

+In our example, this retrieves: <code class="computeroutput">X = 0</code>, 

+<code class="computeroutput">Y = 1</code>, <code class="computeroutput">Z = 2</code>.

+</p></div><p></p></div><br class="example-break"><div class="highlights"><a name="def_ForallRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_CompoundRule.html" title="4.3.1.&nbsp;Compound Rule">compound rule</a>

+</p></div><div class="highlights"><a name="def_ForallRule_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>, <a href="def_IterateRule.html" title="4.3.8.&nbsp;Iterate Rule">iterate rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_ChooseRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMCompoundRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_IterateRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.3.6.&nbsp;Choose Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.3.8.&nbsp;Iterate Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_FormalParameter.html b/org.eclipse.viatra2.help/def_FormalParameter.html
new file mode 100644
index 0000000..a6f9e4f
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_FormalParameter.html
@@ -0,0 +1,26 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.8.1.&nbsp;Formal Parameters</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_Parameters.html" title="5.8.&nbsp;Parameters and Variable Lists"><link rel="prev" href="sec_Parameters.html" title="5.8.&nbsp;Parameters and Variable Lists"><link rel="next" href="def_DirectedFormalParameter.html" title="5.8.2.&nbsp;Directed Formal Parameters"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.8.1.&nbsp;Formal Parameters</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_Parameters.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.8.&nbsp;Parameters and Variable Lists</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_DirectedFormalParameter.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_FormalParameter"></a>5.8.1.&nbsp;Formal Parameters</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_FormalParameter_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+<span class="strong"><strong>Formal parameters</strong></span>

+<a name="N12F68" class="indexterm"></a>

+<a name="N12F6D" class="indexterm"></a> 

+define the interface of a graph pattern by a list of

+<a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">pattern variables</a>. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_FormalParameter_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+FormalParamsAST ::= <a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">PatternVariableDefAST</a> 

+                  | FormalParamsAST <span class="token">,</span> <a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">PatternVariableDefAST</a> 

+</pre><p>

+<span class="strong"><strong>Formal parameters</strong></span> is a list of pattern variables separated by 

+commas. It can contain an arbitrary number of variables (including none). 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_FormalParameter_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+In case of <span class="strong"><strong>formal parameters</strong></span>

+the direction of the parameters is not defined 

+(in contrast to the <a href="def_DirectedFormalParameter.html" title="5.8.2.&nbsp;Directed Formal Parameters">directed formal parameters</a>). The 

+variables can be used both for input and output purposes depending on the 

+the invoking environment. Those variables that are bound 

+before the invocation of the pattern are the input variables and those that 

+are unbound are output variables.  

+</p></td></tr></table></div><div class="highlights"><a name="def_FormalParameter_UsedBy"></a><p><b>Used By:&nbsp;</b>

+<a href="def_GraphPatternDef.html" title="2.1.1.&nbsp;Graph Pattern Definition">graph pattern definition</a>

+</p></div><div class="highlights"><a name="def_FormalParameter_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_DirectedFormalParameter.html" title="5.8.2.&nbsp;Directed Formal Parameters">directed formal parameter</a>, 

+<a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">actual parameter</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_Parameters.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_Parameters.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_DirectedFormalParameter.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.8.&nbsp;Parameters and Variable Lists&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.8.2.&nbsp;Directed Formal Parameters</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_GTRuleCall.html b/org.eclipse.viatra2.help/def_GTRuleCall.html
new file mode 100644
index 0000000..6ff8d5f
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_GTRuleCall.html
@@ -0,0 +1,47 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3.4.1.&nbsp;GTRule Call</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_InvokeGTRule.html" title="3.4.&nbsp;Invocation of Graph Transformation Rules"><link rel="prev" href="sec_InvokeGTRule.html" title="3.4.&nbsp;Invocation of Graph Transformation Rules"><link rel="next" href="sec_ASMRules.html" title="4.&nbsp;ASM Rules"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">3.4.1.&nbsp;GTRule Call</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_InvokeGTRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">3.4.&nbsp;Invocation of Graph Transformation Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_ASMRules.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_GTRuleCall"></a>3.4.1.&nbsp;GTRule Call</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_GTRuleCall_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+Graph transformation rules can be invoked to execute model manipulation by 

+using the <a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>or <a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>to apply 

+the GT rule for a single match or for all matches, respectively. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_GTRuleCall_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+GTRuleCallAST ::= <span class="token">apply</span> <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">QualifiedTypeNameAST</a> <a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">ActualParameterDefAST</a>

+ActualParameterDefAST ::= <span class="token">(</span> <a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">ActualParamsAST</a> <span class="token">)</span> 

+                        | <span class="token">(</span> <span class="token">)</span> 

+</pre><p>

+The rule is identified by the <span class="strong"><strong>GT rule name</strong></span><a name="N11099" class="indexterm"></a>. It can be the local 

+<a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">name</a>of the rule if 

+</p><div class="itemizedlist"><ul type="disc"><li><p>the rule is defined in the same file or</p></li><li><p>

+				the rule is defined in another file but the namespace of the rule is imported at the beginning of the

+				file.

+			</p></li></ul></div><p>

+If the rule is defined in another file and its <a href="def_NamespaceImport.html" title="1.1.3.&nbsp;Namespace Import">namespace</a> is not imported 

+then the <span class="strong"><strong>GT rule name</strong></span> should be the <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">fully qualified name</a> of 

+the rule. 

+</p><p>

+The <a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">actual parameter</a> part is the list of actual parameters. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_GTRuleCall_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+In general, during the execution of a rule variables are bound according to 

+the LHS (precondition or condition part) of the rule and model manipulation 

+is performed according to the RHS (postcondition or condition part) and the 

+action parts. 

+</p><p>

+In more details, during the execution of a rule 

+</p><div class="orderedlist"><ol type="1"><li><p>all matchings determined by LHS are collected,</p></li><li><p>for each matching in a single step the followings are executed in the specified order:</p><div class="orderedlist"><ol type="a"><li><p>

+						model manipulation determined by the RHS of the GT rule (which is defined by either the

+						postcondition or the condition part),

+					</p></li><li><p>action part of the GT rule,</p></li><li><p>

+						do part of the

+						<a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>

+						or

+						<a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>.

+					</p></li></ol></div></li></ol></div></td></tr></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Constraints"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left"><a name="def_GTRuleCall_Constraints"></a>Constraints</th></tr><tr><td valign="top" align="left"><p>

+Input-only parameters of the rule - i.e. the parameters that are tagged with 

+in the formal definition of the parameter list - can be an arbitrary ASM <a href="def_Term.html" title="5.1.1.&nbsp;ASM Term">term</a>, 

+but output parameters must be variables. 

+</p><p>

+All variables used in the <a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">actual parameters</a> part have to be 

+already defined before the invocation of the rule, although these can be unbound. 

+</p></td></tr></table></div><div class="highlights"><a name="def_GTRuleCall_UsedBy"></a><p><b>Used By:&nbsp;</b>

+<a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>, <a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>

+</p></div><div class="highlights"><a name="def_GTRuleCall_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_NamespaceDefinition.html" title="1.1.2.&nbsp;Namespace Definition">Namespace definition</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_InvokeGTRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_InvokeGTRule.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_ASMRules.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">3.4.&nbsp;Invocation of Graph Transformation Rules&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.&nbsp;ASM Rules</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_GTRuleDef.html b/org.eclipse.viatra2.help/def_GTRuleDef.html
new file mode 100644
index 0000000..bd74f62
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_GTRuleDef.html
@@ -0,0 +1,97 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3.1.1.&nbsp;Graph Transformation Rule Definition</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_DefGTRule.html" title="3.1.&nbsp;Definition of Graph Transformation Rules"><link rel="prev" href="sec_DefGTRule.html" title="3.1.&nbsp;Definition of Graph Transformation Rules"><link rel="next" href="sec_GTParamPass.html" title="3.2.&nbsp;Parameter passing at Graph Transformation Rules"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">3.1.1.&nbsp;Graph Transformation Rule Definition</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_DefGTRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">3.1.&nbsp;Definition of Graph Transformation Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_GTParamPass.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_GTRuleDef"></a>3.1.1.&nbsp;Graph Transformation Rule Definition</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_GTRuleDef_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+			<span class="strong"><strong>Graph transformation</strong></span>

+			<a name="N10C14" class="indexterm"></a>

+			(GT) is the primary means for elementary model transformation steps in VIATRA. Graph transformation provides

+			a rule and pattern-based manipulation of graph-based models. The application of a GT rule on a given VPM

+			model (i.e. part of the model space) replaces an image of its

+			<span class="strong"><strong>precondition</strong></span>

+			<a name="N10C1D" class="indexterm"></a>

+			(left-hand side, LHS) pattern with an image of its

+			<span class="strong"><strong>postcondition</strong></span>

+			<a name="N10C26" class="indexterm"></a>

+			(right-hand side, RHS) pattern, and additional

+			<span class="strong"><strong>actions</strong></span>

+			<a name="N10C2F" class="indexterm"></a>

+			can be executed after that as further side effects.

+		</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_GTRuleDef_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+	GTRuleDefAST ::= <a href="def_Annotation.html" title="1.2.2.&nbsp;Annotation">OptAnnotationsAST</a> <span class="token">gtrule</span> <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">TypeNameAST</a> <a href="def_DirectedFormalParameter.html" title="5.8.2.&nbsp;Directed Formal Parameters">DirectedFormalParameterDefAST</a> <span class="token">=</span> GTRuleBodyAST 

+

+  DirectedFormalParameterDefAST ::= <span class="token">(</span> <a href="def_FormalParameter.html" title="5.8.1.&nbsp;Formal Parameters">FormalParamsAST</a> <span class="token">)</span> 

+                                  | <span class="token">(</span> <span class="token">)</span> 

+

+	GTRuleBodyAST ::= <span class="token">{</span> PreconditionDefAST PostconditionOptAST ActionOptAST <span class="token">}</span>

+	

+	PreconditionDefAST ::= precondition GraphPatternDefAST

+	                     | precondition PatternCompositionAST

+

+	PostconditionOptAST ::= $empty 

+	                      | postcondition GraphPatternDefAST

+	                      | postcondition PatternCompositionAST

+	                

+	ActionOptAST ::= $empty 

+				   | action <span class="token">{</span> <a href="def_AsmRuleDef.html" title="4.1.1.&nbsp;ASM Rule Definition">AsmRulesAST</a> <span class="token">}</span>  	                	               

+</pre><p>

+			<a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">TypeNameAST</a>

+			is the identifier of the graph transformation rule.

+		</p><p>

+			Variables defined as part of the

+			<a href="def_DirectedFormalParameter.html" title="5.8.2.&nbsp;Directed Formal Parameters">directed formal params</a>

+			are the input or output parameters of the rule depending on its direction (

+			<code class="computeroutput">in</code>,

+			<code class="computeroutput">out</code>,

+			<code class="computeroutput">inout</code>).

+		</p><p>

+			provides different ways for defining graph transformation rules in order to adapt to the different

+			programming style of transformation developers:

+		</p><div class="itemizedlist"><ul type="disc"><li><p>

+					The traditional way of defining GT rules is to provide a pair of graph patterns: the

+					<span class="strong"><strong>precondition</strong></span>

+					<a name="N10C8F" class="indexterm"></a>

+					(left-hand side, LHS) pattern and the

+					<span class="strong"><strong>postcondition</strong></span>

+					<a name="N10C98" class="indexterm"></a>

+					(right-hand side, RHS) pattern.

+				</p></li><li><p>

+					In VIATRA, there is also an

+					<span class="strong"><strong>action</strong></span>

+					<a name="N10CA4" class="indexterm"></a>

+					part executed after resolving the right hand side and left hand side where additional side-effects

+					for rules can be defined with ASM rules.

+				</p></li></ul></div><p>Thus, a GT rule can be composed of</p><div class="itemizedlist"><ul type="disc"><li><p>

+					a

+					<span class="strong"><strong>precondition</strong></span>

+					<a name="N10CB3" class="indexterm"></a>, a

+					<span class="strong"><strong>postcondition</strong></span>

+					<a name="N10CBC" class="indexterm"></a>

+					and an optional

+					<span class="strong"><strong>action</strong></span>

+					<a name="N10CC5" class="indexterm"></a>

+					part,

+				</p></li><li><p>

+					a

+					<span class="strong"><strong>precondition</strong></span>

+					<a name="N10CD1" class="indexterm"></a>

+					and an

+					<span class="strong"><strong>action</strong></span>

+					<a name="N10CDA" class="indexterm"></a>

+					part.

+				</p></li></ul></div><p>

+			Each of the precondition and postcondition parts of a GT rule can be defined either locally or somewhere

+			else, i.e. the appropriate keyword is followed by either a pattern definition or a pattern call.

+		</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_GTRuleDef_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+			Parameters of GT rules can be bound before calling the rule; these bindings are kept in case of input

+			parameters (<code class="computeroutput">in</code>,

+			<code class="computeroutput">inout</code>). Output-only parameters (that has the tag

+			<code class="computeroutput">out</code>) are always handled as unbound variables.

+		</p><p>Model manipulation can be defined by</p><div class="itemizedlist"><ul type="disc"><li><p>the difference of the precondition and the postcondition if both LHS and RHS are present,</p></li><li><p>

+					ASM rules, if an

+					<span class="strong"><strong>action</strong></span>

+					<a name="N10D00" class="indexterm"></a>

+					part is present.

+				</p></li></ul></div><p>Detailed semantics of GT rules is defined in the upcoming sections.</p></td></tr></table></div><div class="highlights"><a name="def_GTRuleDef_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+				<a href="def_Machine.html" title="1.2.1.&nbsp;GTASM Machine Definition">GTASM machine</a>

+			</p></div><div class="highlights"><a name="def_GTRuleDef_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+				<a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>,

+				<a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>,

+				<a href="def_GTRuleCall.html" title="3.4.1.&nbsp;GTRule Call">GT rule call</a>.

+			</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_DefGTRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_DefGTRule.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_GTParamPass.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">3.1.&nbsp;Definition of Graph Transformation Rules&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;3.2.&nbsp;Parameter passing at Graph Transformation Rules</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_GraphPatternCall.html b/org.eclipse.viatra2.help/def_GraphPatternCall.html
new file mode 100644
index 0000000..c96b15a
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_GraphPatternCall.html
@@ -0,0 +1,89 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>2.1.4.&nbsp;Graph Pattern Call</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_PatternDefinition.html" title="2.1.&nbsp;Pattern Definition"><link rel="prev" href="def_NegativePattern.html" title="2.1.3.&nbsp;Negative Pattern"><link rel="next" href="def_PatternComposition.html" title="2.1.5.&nbsp;Pattern Composition"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">2.1.4.&nbsp;Graph Pattern Call</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_NegativePattern.html">Prev</a>&nbsp;</td><th align="center" width="60%">2.1.&nbsp;Pattern Definition</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_PatternComposition.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_GraphPatternCall"></a>2.1.4.&nbsp;Graph Pattern Call</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_GraphPatternCall_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+			A

+			<span class="strong"><strong>graph pattern call</strong></span>

+			<a name="N10525" class="indexterm"></a>

+			from an ASM rule initiates graph pattern matching.

+		</p><p>

+			A

+			<span class="strong"><strong>graph pattern call</strong></span>

+			<a name="N10530" class="indexterm"></a>

+			can be initiated in the following contexts:

+		</p><div class="orderedlist"><ol type="1"><li><p>

+				in ASM part by a

+				<a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>

+				or

+				<a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>

+			</p></li><li><p>

+				where

+				<a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">base logical term</a>

+				can be used (e.g. in <a href="def_IfRule.html" title="4.3.9.&nbsp;If Rule">if rule</a>).

+			</p></li></ol></div></td></tr></table></div><pre class="programlisting">

+GraphPatternCallAST ::= <span class="token">find</span> <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">QualifiedTypeNameAST</a> <a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">ActualParameterDefAST</a>

+ActualParameterDefAST ::= <span class="token">(</span> <a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">ActualParamsAST</a> <span class="token">)</span> 

+                        | <span class="token">(</span> <span class="token">)</span> 

+</pre><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_GraphPatternCall_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><p>

+			The called graph pattern is identified by the

+			<span class="strong"><strong>graph pattern name</strong></span>

+			<a name="N10576" class="indexterm"></a>

+			and its

+			<span class="strong"><strong>arity</strong></span>

+			<a name="N1057F" class="indexterm"></a>

+			(number of parameters).

+		</p><p>A local name of the called graph pattern can be used if</p><div class="itemizedlist"><ul type="disc"><li><p>it is defined in the same machine or</p></li><li><p>

+					it is defined in another machine but the namespace of the pattern is imported at the beginning of

+					the file.

+				</p></li></ul></div><p>

+			If the pattern is defined in another machine and its namespace is not imported then the

+			<span class="strong"><strong>graph pattern name</strong></span>

+			<a name="N10593" class="indexterm"></a>

+			should be the

+			<a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">fully qualified name</a> of the pattern.

+		</p><p>

+			The

+			<a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">actual params</a>

+			part is the list of actual parameters supplied to the called graph pattern.

+		</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_GraphPatternCall_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+			The variables in the actual parameter list supplied to the called graph pattern from the caller ASM context

+			can be either bound or unbound. This way, the semantics of a graph pattern call depends on its adornment,

+			i.e. the binding of actual parameters.

+		</p><div class="itemizedlist"><ul type="disc"><li><p>

+					If an actual parameter is bound then it is an

+					<span class="emphasis"><em>input parameter</em></span>

+					for pattern matching. The binding of all input parameters is kept unchanged during pattern matching.

+				</p></li><li><p>

+					If an actual parameter is unbound then it is an

+					<span class="emphasis"><em>output parameter</em></span>, 

+					and a binding is calculated during pattern matching.

+				</p></li></ul></div><p>

+			If the matching of a called pattern fails, then it still depends on the caller ASM rule if this failure is

+			propagated or not.

+		</p><div class="itemizedlist"><ul type="disc"><li><p>

+					In case of <a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>, 

+					execution continues if no matches are found for the called pattern.

+				</p></li><li><p>

+					In case of

+					<a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>, execution fails, and backtracking is initiated as in case of

+					<a href="def_FailRule.html" title="4.2.4.&nbsp;Fail Rule">fail rule</a>

+					.

+				</p></li></ul></div><p>

+			Containment constraints of quantified variables defined in a

+			<a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>	or a

+			<a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>

+			are passed to the pattern matching engine as additional containment constraints.

+		</p><p>

+			When pattern matching is initiated from a

+			<a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">base logical term</a>, 

+			successful pattern matching is converted to the logical

+			<span class="emphasis"><em>true</em></span>

+			value while the failure of pattern matching is interpreted as the logical

+			<span class="emphasis"><em>false</em></span>

+			value. Note, however, even if the matching of the called pattern succeeds, the actual bindings are forbidden

+			to be used (i.e. thrown away) in the context of caller

+			<a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">base logical term</a>.

+		</p></td></tr></table></div><div class="highlights"><a name="def_GraphPatternCall_UsedBy"></a><p><b>Used By:&nbsp;</b>

+				<a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">GT rule definition</a>,

+				<a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">pattern body</a>,

+			

+				<a href="def_NegativePattern.html" title="2.1.3.&nbsp;Negative Pattern">negative pattern</a>,

+				<a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">base logical term</a>

+			</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_NegativePattern.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_PatternDefinition.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_PatternComposition.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">2.1.3.&nbsp;Negative Pattern&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;2.1.5.&nbsp;Pattern Composition</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_GraphPatternDef.html b/org.eclipse.viatra2.help/def_GraphPatternDef.html
new file mode 100644
index 0000000..b8c0bad
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_GraphPatternDef.html
@@ -0,0 +1,62 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>2.1.1.&nbsp;Graph Pattern Definition</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_PatternDefinition.html" title="2.1.&nbsp;Pattern Definition"><link rel="prev" href="sec_PatternDefinition.html" title="2.1.&nbsp;Pattern Definition"><link rel="next" href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">2.1.1.&nbsp;Graph Pattern Definition</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_PatternDefinition.html">Prev</a>&nbsp;</td><th align="center" width="60%">2.1.&nbsp;Pattern Definition</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_PatternBody.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_GraphPatternDef"></a>2.1.1.&nbsp;Graph Pattern Definition</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_GraphPatternDef_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+			A graph pattern is the primary means for querying the model space. Graph patterns provide a way for defining

+			logic constraints for the model structure.

+		</p><p>

+			Graph patterns can be either

+			<span class="emphasis"><em>predefined</em></span>

+			in the context of a

+			<a href="def_Machine.html" title="1.2.1.&nbsp;GTASM Machine Definition">GTASM machine</a>

+			or defined locally as part of a graph transformation rule

+			<a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">GT rule</a>

+			or as part of a negative pattern

+			<a href="def_NegativePattern.html" title="2.1.3.&nbsp;Negative Pattern">negative pattern</a>

+			in the body of another pattern.

+		</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_GraphPatternDef_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+GraphPatternDefAST ::= <a href="def_Annotation.html" title="1.2.2.&nbsp;Annotation">OptAnnotationsAST</a> <span class="token">pattern</span> <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">TypeNameAST</a> <a href="def_FormalParameter.html" title="5.8.1.&nbsp;Formal Parameters">FormalParameterDefAST</a> <span class="token">=</span> <a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">PatternBodiesAST</a>

+FormalParameterDefAST ::= <span class="token">(</span> <a href="def_FormalParameter.html" title="5.8.1.&nbsp;Formal Parameters">FormalParamsAST</a> <span class="token">)</span> 

+                        | <span class="token">(</span> <span class="token">)</span> 

+</pre><p>

+			<a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">name</a>

+			is the identifier of the pattern.

+		</p><p>

+			The list of

+			<a href="def_FormalParameter.html" title="5.8.1.&nbsp;Formal Parameters">formal parameters</a>

+			in graph patterns are different from that of ASM rules in the sense that the parameters of a graph pattern

+			do not have directions (<code class="computeroutput">in</code>,

+			<code class="computeroutput">out</code>,

+			<code class="computeroutput">inout</code>).

+		</p><p>

+			A graph pattern definition consists of at least one

+			<a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">pattern body</a>

+			definition. If multiple bodies are present, there is an OR condition between them.

+		</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_GraphPatternDef_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+			A graph pattern can be interpreted as a predefined query evaluated over the model space. Formally (see Sec.~

+			), the semantics of a graph pattern is defined as the set of all matches in the model space.

+		</p><p>

+			As graph pattern matching is initiated in an ASM program by a

+			<a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>

+			<a name="N10351" class="indexterm"></a>

+			or

+			<a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>

+			<a name="N1035A" class="indexterm"></a>, the calling environment may restrict the result set by (i) supplying input parameters, (ii) quantifying

+			pattern variables existentially or universally, or (iii) setting containment constraints to (the domains of)

+			pattern variables.

+		</p><p>

+			The direction (or adornment) of a pattern parameter is determined only at execution time when pattern

+			matching is initiated for that pattern. In this way, the same pattern can be called with different settings

+			for parameter directions at various parts of a VTCL program.

+		</p><p>

+			The pattern matching engine implements injective pattern matching, i.e. each pattern variable has to be

+			bound to different elements in the model (with the single exception of

+			<a href="def_PatternVariableAssignment.html" title="2.1.7.&nbsp;Pattern Variable Assignment">pattern variable assignment</a>).

+		</p><p>

+			If multiple bodies are present (OR-pattern) the pattern is considered to be matched if at least one of the

+			bodies can be matched.

+		</p></td></tr></table></div><div class="highlights"><a name="def_GraphPatternDef_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+				<a href="def_Machine.html" title="1.2.1.&nbsp;GTASM Machine Definition">GTASM machine</a>,

+				<a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">GT rule definition</a>	,

+				<a href="def_NegativePattern.html" title="2.1.3.&nbsp;Negative Pattern">negative pattern</a>

+			</p></div><div class="highlights"><a name="def_GraphPatternDef_UsedBy"></a><p><b>Used By:&nbsp;</b>

+  			<a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">Choose rule</a>, 

+  			<a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">Forall rule</a>, 

+			</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_PatternDefinition.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_PatternDefinition.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_PatternBody.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">2.1.&nbsp;Pattern Definition&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;2.1.2.&nbsp;Pattern Body</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_Identifier.html b/org.eclipse.viatra2.help/def_Identifier.html
new file mode 100644
index 0000000..ae1b157
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_Identifier.html
@@ -0,0 +1,31 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>6.2.1.&nbsp;Identifier</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_NameTokens.html" title="6.2.&nbsp;Tokens for names and strings"><link rel="prev" href="sec_NameTokens.html" title="6.2.&nbsp;Tokens for names and strings"><link rel="next" href="def_NameLiteral.html" title="6.2.2.&nbsp;Name Literal"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">6.2.1.&nbsp;Identifier</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_NameTokens.html">Prev</a>&nbsp;</td><th align="center" width="60%">6.2.&nbsp;Tokens for names and strings</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_NameLiteral.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_Identifier"></a>6.2.1.&nbsp;Identifier</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_Identifier_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+An <span class="strong"><strong>Identifier</strong></span>

+<a name="N131D4" class="indexterm"></a>

+is a alphanumeric token, which starts with a lower case letter.

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_Identifier_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+Identifier -&gt; LowerCaseLetter

+            | LowerCaseLetter Alphanum    

+

+Alphanum -&gt;  Letter | Digit

+           | Alphanum Letter 

+           | Alphanum Digit 

+

+Letter -&gt; LowerCaseLetter

+        | UpperCaseLetter

+        | _

+        | '$'

+        | AfterASCII

+

+LowerCaseLetter -&gt; <span class="token">a..z</span>

+UpperCaseLetter -&gt; <span class="token">A..Z</span>

+Digit -&gt; 0..9	

+AfterASCII   -&gt; <span class="token">\u0080..\ufffe</span>

+</pre><p>

+An <span class="strong"><strong>identifier</strong></span> starts with a lower case letter 

+which can be followed by an arbitrary number of alphanumeric characters. 

+An identifier cannot contain other special characters; in such a case,

+a <a href="def_NameLiteral.html" title="6.2.2.&nbsp;Name Literal">name literal</a> should be used 

+(by inserting the name between apostrophes).

+</p></td></tr></table></div><div class="highlights"><a name="def_Identifier_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_Token.html" title="6.1.1.&nbsp;Tokens">Token</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_NameTokens.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_NameTokens.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_NameLiteral.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">6.2.&nbsp;Tokens for names and strings&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;6.2.2.&nbsp;Name Literal</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_IfRule.html b/org.eclipse.viatra2.help/def_IfRule.html
new file mode 100644
index 0000000..9b95690
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_IfRule.html
@@ -0,0 +1,24 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.3.9.&nbsp;If Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMCompoundRules.html" title="4.3.&nbsp;Compound ASM Rules"><link rel="prev" href="def_IterateRule.html" title="4.3.8.&nbsp;Iterate Rule"><link rel="next" href="def_TryRule.html" title="4.3.10.&nbsp;Try Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.3.9.&nbsp;If Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_IterateRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.3.&nbsp;Compound ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_TryRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_IfRule"></a>4.3.9.&nbsp;If Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_IfRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+An <span class="strong"><strong>if rule</strong></span><a name="N11A32" class="indexterm"></a>is a conditional rule that defines a binary branch in the 

+flow of execution similar to the conditional instructions of programming 

+languages. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_IfRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+IfRuleAST ::= <span class="token">if</span> <span class="token">(</span> <a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">LogicalTermAST</a> <span class="token">)</span> <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">AsmRuleAST</a> 

+            | <span class="token">if</span> <span class="token">(</span> <a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">LogicalTermAST</a> <span class="token">)</span> <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">AsmRuleAST</a> <span class="token">else</span> <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">AsmRuleAST</a>

+</pre><p>

+The <span class="strong"><strong>if rule</strong></span> has a condition, 

+which is a <a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">logical term</a> 

+and it contains a mandatory and an optional <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rule</a>. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_IfRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+During the interpretation of the <span class="strong"><strong>if rule</strong></span>, the 

+<a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">logical term</a> is evaluated and if it is true then the first 

+<a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rule</a> is executed otherwise the second 

+<a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rule</a> is executed (if the else branch exists). 

+</p><p>

+The execution of the <span class="strong"><strong>if rule</strong></span> fails, when the execution of the selected 

+branch fails.

+</p></td></tr></table></div><div class="highlights"><a name="def_IfRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_CompoundRule.html" title="4.3.1.&nbsp;Compound Rule">compound rule</a>

+</p></div><div class="highlights"><a name="def_IfRule_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_TryRule.html" title="4.3.10.&nbsp;Try Rule">try rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_IterateRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMCompoundRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_TryRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.3.8.&nbsp;Iterate Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.3.10.&nbsp;Try Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_InitialValue.html b/org.eclipse.viatra2.help/def_InitialValue.html
new file mode 100644
index 0000000..d09354e
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_InitialValue.html
@@ -0,0 +1,30 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.5.2.&nbsp;Initial Value</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMFunctions.html" title="5.5.&nbsp;ASM Functions"><link rel="prev" href="def_AsmFunctionDef.html" title="5.5.1.&nbsp;ASM Function Definition"><link rel="next" href="def_AsmFunctionLocation.html" title="5.5.3.&nbsp;ASM Function Location"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.5.2.&nbsp;Initial Value</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_AsmFunctionDef.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.5.&nbsp;ASM Functions</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_AsmFunctionLocation.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_InitialValue"></a>5.5.2.&nbsp;Initial Value</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_InitialValue_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+An <span class="strong"><strong>initial value</strong></span><a name="N12C1E" class="indexterm"></a> 

+can be the part of the definition of an ASM function. It provides the definition of a slot initially storing a value at  

+certain locations. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_InitialValue_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+InitialValuesOptAST ::= <span class="token">;</span>

+                      | <span class="token">{</span> InitialValuesAST <span class="token">}</span>

+

+InitialValuesAST ::= InitialValueAST 

+                   | InitialValuesAST InitialValueAST 

+

+InitialValueAST ::= <a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">ActualParameterDefAST</a> <span class="token">=</span> <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a> <span class="token">;</span>

+</pre><p>

+An <span class="strong"><strong>initial value</strong></span> is a value assignment to a <a href="def_AsmFunctionLocation.html" title="5.5.3.&nbsp;ASM Function Location">location</a>.

+</p><p>

+The <span class="strong"><strong>location</strong></span> is supplied as <a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">actual parameters</a>, 

+i.e. by a comma separated list of ASM <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">arithmetic terms</a>. 

+</p><p>

+The value is determined by the evaluation of the <span class="strong"><strong>value tag</strong></span>

+that can also be an arbitrary ASM <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">arithmetic term</a>. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_InitialValue_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+Since ASM functions defined in other machines can also be invoked, the 

+interpreter provides lazy initialization for all ASM functions: these are 

+<span class="emphasis"><em>initialized on-demand</em></span>, i.e. just before their first use. 

+</p></td></tr></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Constraints"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left"><a name="def_InitialValue_Constraints"></a>Constraints</th></tr><tr><td valign="top" align="left"><p>

+The number of the index elements (i.e. the dimension) must be equal to the <span class="emphasis"><em>arity</em></span> 

+determined by the corresponding <a href="def_AsmFunctionDef.html" title="5.5.1.&nbsp;ASM Function Definition">ASM function definition</a>. 

+</p></td></tr></table></div><div class="highlights"><a name="def_InitialValue_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_AsmFunctionDef.html" title="5.5.1.&nbsp;ASM Function Definition">ASM function definition</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_AsmFunctionDef.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMFunctions.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_AsmFunctionLocation.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.5.1.&nbsp;ASM Function Definition&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.5.3.&nbsp;ASM Function Location</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_IntConstant.html b/org.eclipse.viatra2.help/def_IntConstant.html
new file mode 100644
index 0000000..6486b21
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_IntConstant.html
@@ -0,0 +1,36 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.4.6.&nbsp;Integer Constants</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMConstants.html" title="5.4.&nbsp;Constants"><link rel="prev" href="def_StringConstant.html" title="5.4.5.&nbsp;String Constant"><link rel="next" href="def_FloatConstant.html" title="5.4.7.&nbsp;Float Constant"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.4.6.&nbsp;Integer Constants</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_StringConstant.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.4.&nbsp;Constants</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_FloatConstant.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_IntConstant"></a>5.4.6.&nbsp;Integer Constants</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_IntConstant_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+<span class="strong"><strong>Integer constants</strong></span> 

+<a name="N12A22" class="indexterm"></a>

+<a name="N12A27" class="indexterm"></a> 

+can be represented as octal, decimal or hexadecimal constants. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_IntConstant_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+IntConstantAST ::= <a href="def_IntegerLiteral.html" title="6.3.1.&nbsp;Integer Literal">DecimalIntegerLiteral</a> | <a href="def_IntegerLiteral.html" title="6.3.1.&nbsp;Integer Literal">IntegerLiteral</a>

+</pre><p>

+The different representations of integers are differentiated by their first 

+characters, which is followed by the possible numerical characters: 

+</p><div class="itemizedlist"><ul type="disc"><li><p>an <span class="emphasis"><em>octal integer</em></span>

+<div class="itemizedlist"><ul type="circle"><li><p>starts with a <code class="computeroutput">0</code>character that is followed by an <span class="strong"><strong>octal digit</strong></span><a name="N12A51" class="indexterm"></a>, 

+</p></li><li><p>can contain the <code class="computeroutput">0</code>.. <code class="computeroutput">7</code>characters; 

+</p></li></ul></div>

+</p></li><li><p>a <span class="emphasis"><em>decimal integer</em></span>

+<div class="itemizedlist"><ul type="circle"><li><p>starts with a positive digit (<code class="computeroutput">1..9</code>), 

+</p></li><li><p>can contain the <code class="computeroutput">0..9</code> characters; 

+</p></li></ul></div>

+</p></li><li><p>a <span class="emphasis"><em>hexadecimal integer</em></span>

+ <div class="itemizedlist"><ul type="circle"><li><p>starts with a <code class="computeroutput">0</code> character that is followed by a small or large <span class="emphasis"><em>X</em></span>

+ (<code class="computeroutput">x</code>/ <code class="computeroutput">X</code>), 

+ </p></li><li><p>can contain the <code class="computeroutput">0..9</code>, <code class="computeroutput">a..f</code>, 

+ <code class="computeroutput">A..F</code> characters. 

+ </p></li></ul></div>

+</p></li></ul></div><p>

+Each representation of an integer can have three different types related to 

+the internal representation: 

+<div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>normal</em></span> (there is no type modifier at the end of the number), 

+</p></li><li><p><span class="emphasis"><em>unsigned</em></span> (there is a <code class="computeroutput">u</code>or <code class="computeroutput">U</code>character at the end of the number), 

+</p></li><li><p><span class="emphasis"><em>long</em></span> (there is an <code class="computeroutput">l</code>or <code class="computeroutput">L</code>character at the end of the number). 

+</p></li></ul></div>

+</p></td></tr></table></div><div class="highlights"><a name="def_IntConstant_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_AsmConstant.html" title="5.4.1.&nbsp;ASM Constant (Value)">ASM constant</a>

+</p></div><div class="highlights"><a name="def_IntConstant_UsedBy"></a><p><b>Used By:&nbsp;</b>

+<a href="def_AsmFunctionDef.html" title="5.5.1.&nbsp;ASM Function Definition">arity</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_StringConstant.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMConstants.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_FloatConstant.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.4.5.&nbsp;String Constant&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.4.7.&nbsp;Float Constant</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_IntegerLiteral.html b/org.eclipse.viatra2.help/def_IntegerLiteral.html
new file mode 100644
index 0000000..7276e75
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_IntegerLiteral.html
@@ -0,0 +1,26 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>6.3.1.&nbsp;Integer Literal</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_NumberTokens.html" title="6.3.&nbsp;Tokens for numbers"><link rel="prev" href="sec_NumberTokens.html" title="6.3.&nbsp;Tokens for numbers"><link rel="next" href="def_FloatLiteral.html" title="6.3.2.&nbsp;Float Literal"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">6.3.1.&nbsp;Integer Literal</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_NumberTokens.html">Prev</a>&nbsp;</td><th align="center" width="60%">6.3.&nbsp;Tokens for numbers</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_FloatLiteral.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_IntegerLiteral"></a>6.3.1.&nbsp;Integer Literal</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_IntegerLiteral_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+An <span class="strong"><strong>Integer Literal</strong></span> 

+<a name="N132E2" class="indexterm"></a>

+<a name="N132E7" class="indexterm"></a>

+is a numeric token representing an integer number.

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_IntegerLiteral_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+DecimalIntegerLiteral -&gt; Integer

+IntegerLiteral -&gt;  Integer LetterLl

+                 | '0' LetterXx HexDigits

+                 | '0' LetterXx HexDigits LetterLl

+

+Integer -&gt; Digit 

+         | Integer Digit

+

+HexDigits -&gt; HexDigit

+           | HexDigits HexDigit

+

+Digit -&gt; 0..9 

+HexDigit -&gt; Digit

+          | a..f

+

+LetterXx -&gt; 'X' | 'x'

+LetterLl -&gt; 'L' | 'l'

+</pre></td></tr></table></div><div class="highlights"><a name="def_IntegerLiteral_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_Token.html" title="6.1.1.&nbsp;Tokens">Token</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_NumberTokens.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_NumberTokens.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_FloatLiteral.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">6.3.&nbsp;Tokens for numbers&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;6.3.2.&nbsp;Float Literal</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_IterateRule.html b/org.eclipse.viatra2.help/def_IterateRule.html
new file mode 100644
index 0000000..dfb2db2
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_IterateRule.html
@@ -0,0 +1,38 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.3.8.&nbsp;Iterate Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMCompoundRules.html" title="4.3.&nbsp;Compound ASM Rules"><link rel="prev" href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule"><link rel="next" href="def_IfRule.html" title="4.3.9.&nbsp;If Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.3.8.&nbsp;Iterate Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_ForallRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.3.&nbsp;Compound ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_IfRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_IterateRule"></a>4.3.8.&nbsp;Iterate Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_IterateRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+Using an <span class="strong"><strong>iterate rule</strong></span><a name="N119A6" class="indexterm"></a> is a 

+possible way to manage loop execution in a transformation. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_IterateRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+IterateRuleAST ::= <span class="token">iterate</span> <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">AsmRuleAST</a> 

+</pre><p>

+The <span class="strong"><strong>iterate rule</strong></span> contains a single body ASM rule. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_IterateRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>iterate rule</strong></span> applies its body rule as long as possible, i.e. 

+until its body fails. 

+</p></td></tr></table></div><div class="highlights"><a name="def_IterateRule_Remark"></a><p><b>Remark.&nbsp;</b>

+A rule can fail in the following situations: 

+<div class="itemizedlist"><ul type="disc"><li><p>it is the <a href="def_FailRule.html" title="4.2.4.&nbsp;Fail Rule">fail rule</a> itself, 

+</p></li><li><p>it is the <a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a> and no matching is found, 

+</p></li><li><p>it is a <a href="def_CompoundRule.html" title="4.3.1.&nbsp;Compound Rule">compound rule</a> and an executed contained rule fails. 

+</p></li></ul></div>

+Since the execution of an <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rule</a> does not necessarily fails it can 

+happen that the <span class="strong"><strong>iterate rule</strong></span> does <span class="emphasis"><em>not terminate</em></span>. It can 

+be avoided only with careful transformation design. 

+

+The <span class="strong"><strong>iterate rule</strong></span> construct combined with a single 

+<a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>

+execution of a GT rule (as its body) applies the GT rule as long as possible, 

+i.e. as long as a matching of the GT rule can be found by the choose 

+construct. In other terms, first we apply the GT rule on a single 

+(non-deterministically selected) matching and only after rule application do we 

+recompute the next available matching. 

+

+As a consequence, the incorrect precondition of the GT rule may cause 

+<span class="emphasis"><em>non-termination</em></span> when combined with the iterate construct. For 

+instance, the most typical problem is when a transformation designer does not 

+prevent to apply the GT rule twice on the same matching (by using an 

+appropriate negative condition). 

+</p></div><div class="highlights"><a name="def_IterateRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_CompoundRule.html" title="4.3.1.&nbsp;Compound Rule">compound rule</a>

+</p></div><div class="highlights"><a name="def_IterateRule_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>, <a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>, <a href="def_FailRule.html" title="4.2.4.&nbsp;Fail Rule">fail   rule</a>, <a href="def_TryRule.html" title="4.3.10.&nbsp;Try Rule">try rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_ForallRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMCompoundRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_IfRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.3.7.&nbsp;Forall Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.3.9.&nbsp;If Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_LetRule.html b/org.eclipse.viatra2.help/def_LetRule.html
new file mode 100644
index 0000000..681fee5
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_LetRule.html
@@ -0,0 +1,26 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.3.5.&nbsp;Let Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMCompoundRules.html" title="4.3.&nbsp;Compound ASM Rules"><link rel="prev" href="def_RandomRule.html" title="4.3.4.&nbsp;Random Rule"><link rel="next" href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.3.5.&nbsp;Let Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_RandomRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.3.&nbsp;Compound ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_ChooseRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_LetRule"></a>4.3.5.&nbsp;Let Rule</h4></div><div><h5 class="subtitle">Variable Definition Rule</h5></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_LetRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>let rule (variable definition rule)</strong></span><a name="N1169C" class="indexterm"></a> is used for defining 

+<a href="def_Variable.html" title="5.7.2.&nbsp;Variable">variable</a>for a given rule, typically 

+for a <a href="def_SequentialRule.html" title="4.3.2.&nbsp;Sequential Rule">sequential rule</a>. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_LetRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+LetRuleAST ::= <span class="token">let</span> VariableDefinitionsAST <span class="token">in</span> <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">AsmRuleAST</a> 

+VariableDefinitionsAST ::= VariableDefinitionAST  

+                         | VariableDefinitionsAST <span class="token">,</span> VariableDefinitionAST 

+	                      

+VariableDefinitionAST ::= <a href="def_Variable.html" title="5.7.2.&nbsp;Variable">VariableDefAST</a> TypeOptAST <span class="token">=</span> <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a> 

+</pre></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_LetRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+An ASM variable needs to be defined explicitly prior to its first use. A 

+possible way of it is using the <span class="strong"><strong>let rule</strong></span>. 

+</p><p>

+The <span class="strong"><strong>let rule</strong></span> defines a variable, initializes it with the value resulting 

+from the evaluation of the ASM <a href="def_Term.html" title="5.1.1.&nbsp;ASM Term">term</a> and then calls its internal 

+<a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rule</a>. The variable is accessible inside the scope of the 

+rule, i.e. only in its body <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rule</a>. 

+</p></td></tr></table></div><div class="highlights"><a name="def_LetRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_CompoundRule.html" title="4.3.1.&nbsp;Compound Rule">compound rule</a>

+</p></div><div class="highlights"><a name="def_LetRule_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+A variable can be defined also with 

+the <a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a> and the <a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a> or as a 

+parameter of an ASM rule. 

+

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_RandomRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMCompoundRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_ChooseRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.3.4.&nbsp;Random Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.3.6.&nbsp;Choose Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_LogRule.html b/org.eclipse.viatra2.help/def_LogRule.html
new file mode 100644
index 0000000..fa1f69f
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_LogRule.html
@@ -0,0 +1,18 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.2.7.&nbsp;Log Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMSimpleRules.html" title="4.2.&nbsp;Simple ASM Rules"><link rel="prev" href="def_PrintRule.html" title="4.2.6.&nbsp;Print Rule"><link rel="next" href="sec_ASMCompoundRules.html" title="4.3.&nbsp;Compound ASM Rules"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.2.7.&nbsp;Log Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_PrintRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.2.&nbsp;Simple ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_ASMCompoundRules.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_LogRule"></a>4.2.7.&nbsp;Log Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_LogRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>log rule</strong></span><a name="N11470" class="indexterm"></a> prints a message into the Eclipse Error Log. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_LogRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+LogRuleAST ::= <span class="token">log</span> <span class="token">(</span> LogLevelAST <span class="token">,</span> <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a> <span class="token">)</span> <span class="token">;</span>

+

+LogLevelAST ::= <span class="token">debug</span> | <span class="token">info</span> | <span class="token">warning</span> | <span class="token">error</span> | <span class="token">fatal</span>

+</pre></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_LogRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>log rule</strong></span> evaluates its argument <a href="def_Term.html" title="5.1.1.&nbsp;ASM Term">term</a>and 

+prints the resulted value to the <span class="emphasis"><em>Error Log View</em></span>, which is a general Eclipse view. 

+</p><p>

+The <span class="strong"><strong>log level</strong></span><a name="N114B4" class="indexterm"></a> of the message can be <code class="computeroutput">debug</code>, 

+<code class="computeroutput">info</code>, <code class="computeroutput">warning</code>, <code class="computeroutput">error</code>or <code class="computeroutput">fatal</code>. 

+This determines how Eclipse handles and represents the message.  

+</p></td></tr></table></div><div class="highlights"><a name="def_LogRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_SimpleRule.html" title="4.2.1.&nbsp;Simple Rule">simple rule</a>

+</p></div><div class="highlights"><a name="def_LogRule_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_PrintRule.html" title="4.2.6.&nbsp;Print Rule">print rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_PrintRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMSimpleRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_ASMCompoundRules.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.2.6.&nbsp;Print Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.3.&nbsp;Compound ASM Rules</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_LogicalTerm.html b/org.eclipse.viatra2.help/def_LogicalTerm.html
new file mode 100644
index 0000000..c06e379
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_LogicalTerm.html
@@ -0,0 +1,36 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.2.1.&nbsp;Logical Term</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMLogicalTerms.html" title="5.2.&nbsp;Logical Terms"><link rel="prev" href="sec_ASMLogicalTerms.html" title="5.2.&nbsp;Logical Terms"><link rel="next" href="def_ConjLogicalTerm.html" title="5.2.2.&nbsp;Conjunctive Logical Term (Logical And Term)"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.2.1.&nbsp;Logical Term</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_ASMLogicalTerms.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.2.&nbsp;Logical Terms</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_ConjLogicalTerm.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_LogicalTerm"></a>5.2.1.&nbsp;Logical Term</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_LogicalTerm_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>logical term</strong></span><a name="N12015" class="indexterm"></a> 

+<a name="N1201A" class="indexterm"></a>

+is an ASM term that evaluates to a boolean 

+value. It can be either a simple or a compound expression. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_LogicalTerm_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+LogicalTermAST ::= <a href="def_ConjLogicalTerm.html" title="5.2.2.&nbsp;Conjunctive Logical Term (Logical And Term)">LogicalAndTermAST</a> 

+                 | LogicalTermAST <span class="token">||</span> <a href="def_ConjLogicalTerm.html" title="5.2.2.&nbsp;Conjunctive Logical Term (Logical And Term)">LogicalAndTermAST</a>

+	               | LogicalTermAST <span class="token">xor</span> <a href="def_ConjLogicalTerm.html" title="5.2.2.&nbsp;Conjunctive Logical Term (Logical And Term)">LogicalAndTermAST</a>	       

+</pre><p>

+A <span class="strong"><strong>logical term</strong></span><a name="N1203F" class="indexterm"></a> 

+<a name="N12046" class="indexterm"></a>

+can be a compound expression, i.e. it can be 

+composed of <a href="def_ConjLogicalTerm.html" title="5.2.2.&nbsp;Conjunctive Logical Term (Logical And Term)">conjunctive logical terms</a> with a 

+logical OR operation. 

+</p><p>

+The logical OR operator can be either the <code class="computeroutput">||</code> (OR) 

+or the <code class="computeroutput">xor</code> operator; these are interpreted in the classical way. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_LogicalTerm_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+Logical operations are defined only for Boolean and Multiplicity types. 

+</p><p>

+The interpretation of operations is trivial in case of Booleans. 

+</p><p>

+A Multiplicity value is handled as a pair of boolean values: one 

+denotes if source can be multiple or not, whereas the other denotes it for 

+the target of the relation. Logical operations on Multiplicity 

+values are performed separately for the first and second parts of the pairs. 

+The result is a Multiplicity value. 

+</p><div class="table"><a name="tab_LogicalOp"></a><p class="title"><b>Table&nbsp;2.3.&nbsp;Logical operators (AND, OR, XOR)</b></p><div class="table-contents"><table summary="Logical operators (AND, OR, XOR)" border="1"><colgroup><col><col><col><col><col><col><col><col></colgroup><thead><tr><th align="center">&nbsp;</th><th align="center">Undef</th><th align="center">Boolean</th><th align="center">String</th><th align="center">Integer</th><th align="center">Double</th><th align="center">ModelElement</th><th align="center">Multiplicity</th></tr></thead><tbody><tr><td align="center"><span class="strong"><strong>Undef</strong></span></td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td></tr><tr><td align="center"><span class="strong"><strong>Boolean</strong></span></td><td align="center">Undef</td><td align="center">Bool</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>String</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Integer</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Double</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>ModelElement</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Multiplicity</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">Multi</td></tr></tbody></table></div><p></p></div><br class="table-break"></td></tr></table></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning: Warning"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Warning]" src="images/warning.png"></td><th align="left"><a name="def_LogicalTerm_Warning"></a>Warning</th></tr><tr><td valign="top" align="left"><p>

+Note that the evaluation rules of boolean operators changed in the 

+new release to be compliant with its use in Java.

+  	</p></td></tr></table></div><div class="highlights"><a name="def_LogicalTerm_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_Term.html" title="5.1.1.&nbsp;ASM Term">term</a>

+</p></div><div class="highlights"><a name="def_LogicalTerm_UsedBy"></a><p><b>Used By:&nbsp;</b>

+<a href="def_BaseLogicalTerm.html" title="5.2.3.&nbsp;Base Logical Term">base logical term</a>, <a href="def_CheckCondition.html" title="2.1.8.&nbsp;Check Condition">check condition</a>, <a href="def_IfRule.html" title="4.3.9.&nbsp;If Rule">if rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_ASMLogicalTerms.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMLogicalTerms.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_ConjLogicalTerm.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.2.&nbsp;Logical Terms&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.2.2.&nbsp;Conjunctive Logical Term (Logical And Term)</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_Machine.html b/org.eclipse.viatra2.help/def_Machine.html
new file mode 100644
index 0000000..7e1c224
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_Machine.html
@@ -0,0 +1,43 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>1.2.1.&nbsp;GTASM Machine Definition</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_MachineDefinition.html" title="1.2.&nbsp;Machine Definition"><link rel="prev" href="sec_MachineDefinition.html" title="1.2.&nbsp;Machine Definition"><link rel="next" href="def_Annotation.html" title="1.2.2.&nbsp;Annotation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">1.2.1.&nbsp;GTASM Machine Definition</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_MachineDefinition.html">Prev</a>&nbsp;</td><th align="center" width="60%">1.2.&nbsp;Machine Definition</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_Annotation.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_Machine"></a>1.2.1.&nbsp;GTASM Machine Definition</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_Machine_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+    A GTASM machine (transformation) is the basic unit of execution. It consists of ASM rules,

+    ASM functions, graph transformation rules  and graph transformation patterns.

+		</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_Machine_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><p>

+			<pre class="programlisting">

+GTASMDefAST ::= <a href="def_Annotation.html" title="1.2.2.&nbsp;Annotation">OptAnnotationsAST</a> <span class="token">machine</span> <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">TypeNameAST</a> <span class="token">{</span> MachineContentsAST <span class="token">}</span>

+MachineContentsAST ::= MachineContentAST

+	                   | MachineContentsAST MachineContentAST

+	                  

+MachineContentAST ::= <a href="def_GraphPatternDef.html" title="2.1.1.&nbsp;Graph Pattern Definition">GraphPatternDefAST</a>	                  

+	                  | <a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">GTRuleDefAST</a>

+	                  | <a href="def_AsmFunctionDef.html" title="5.5.1.&nbsp;ASM Function Definition">AsmFunctionDefAST</a>

+	                  | <a href="def_AsmRuleDef.html" title="4.1.1.&nbsp;ASM Rule Definition">AsmRuleDefAST</a>

+			</pre>

+		</p><p>

+    A GTASM transformation is identified by its <span class="emphasis"><em>local name</em></span>; the fully

+    qualified name of a machine is composed of the namespace defined in the

+    container <a href="def_VtclFile.html" title="1.1.1.&nbsp;VTCL file">VTCL file</a> and this name.

+		</p><p>

+    A GTASM transformation contains two types of components: abstract state machine (ASM)

+    related components and graph transformation (GT) related components.

+		</p><p>

+    An ASM related component can be the <a href="def_AsmRuleDef.html" title="4.1.1.&nbsp;ASM Rule Definition">definition of an ASM rule</a>

+    or the <a href="def_AsmFunctionDef.html" title="5.5.1.&nbsp;ASM Function Definition">definition of an ASM function</a>.

+    The control flow of a GTASM machine is defined by ASM rules (starting from <span class="emphasis"><em>main</em></span>). 

+		</p><p>

+    A graph transformation related component can be the 

+    <a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">definition of a graph transformation rule</a> 

+    or a <a href="def_GraphPatternDef.html" title="2.1.1.&nbsp;Graph Pattern Definition">graph pattern definition</a>; 

+    the set of these compose the model query and manipulation part of the GTASM transformation.

+		</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_Machine_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+    The entry point of the control flow is a special rule called <span class="emphasis"><em>main</em></span>

+    just similarly to the C or Java languages.

+		</p></td></tr></table></div><div class="example"><a name="def_Machine_Example"></a><p class="title"><b>Example&nbsp;2.2.&nbsp;Hello World Machine</b></p><div class="example-contents"><p>

+			<pre class="programlisting">

+namespace hello;			

+machine helloWorld {

+ rule main () = println("Hello world!");

+}			

+			</pre>

+		</p></div><p></p></div><br class="example-break"><div class="highlights"><a name="def_Machine_DefinedIn"></a><p><b>Defined in:&nbsp;</b>

+  			<a href="def_VtclFile.html" title="1.1.1.&nbsp;VTCL file">VTCL File</a>

+			</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_MachineDefinition.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_MachineDefinition.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_Annotation.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">1.2.&nbsp;Machine Definition&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;1.2.2.&nbsp;Annotation</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_ModelElementConstant.html b/org.eclipse.viatra2.help/def_ModelElementConstant.html
new file mode 100644
index 0000000..28e1226
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_ModelElementConstant.html
@@ -0,0 +1,35 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.4.8.&nbsp;Model Element Constant</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMConstants.html" title="5.4.&nbsp;Constants"><link rel="prev" href="def_FloatConstant.html" title="5.4.7.&nbsp;Float Constant"><link rel="next" href="sec_ASMFunctions.html" title="5.5.&nbsp;ASM Functions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.4.8.&nbsp;Model Element Constant</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_FloatConstant.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.4.&nbsp;Constants</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_ASMFunctions.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_ModelElementConstant"></a>5.4.8.&nbsp;Model Element Constant</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_ModelElementConstant_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>model element constant</strong></span>

+<a name="N12B2A" class="indexterm"></a> 

+<a name="N12B2F" class="indexterm"></a> 

+refers to a model element, which exists in the model space (at compile time). 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_ModelElementConstant_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+ModelElementConstant ::= <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">ValueQualifiedNameAST</a>

+</pre><p>

+A <span class="strong"><strong>model element constant</strong></span>

+is formulated as a <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">qualified model element name</a>. 

+</p><p>

+A <span class="strong"><strong>model element constant</strong></span>

+can reference either an entity or a relation in the actual model space: 

+the <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">qualified model element name</a>

+can be either the local or the fully qualified name of the referenced model element. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_ModelElementConstant_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>model element constant</strong></span> is a reference to a model element 

+resided in the model space, which needs to exist at compile-time. 

+</p><p>

+Note that this is the semantic difference with the <span class="strong"><strong>ref(s)</strong></span>

+<a href="def_PredefinedFunctionCall.html" title="5.6.1.&nbsp;Predefined Function Call">predefined function</a>, which is only resolved at run-time. 

+</p></td></tr></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Constraints"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left"><a name="def_ModelElementConstant_Constraints"></a>Constraints</th></tr><tr><td valign="top" align="left"><p>

+If the qualified model element name is a local name (i.e. it does not contain a '.'), 

+then no upper case literals and no keywords are allowed to avoid name clashes with variables

+and keywords, respectively. 

+  	</p></td></tr></table></div><div class="highlights"><a name="def_ModelElementConstant_Remark"></a><p><b>Remark.&nbsp;</b>

+If a model element is referred to by its local name, and (i) this local name 

+starts with an uppercase letter or (ii) it is a VTCL keyword, then this name 

+should be written between apostrophes (single quotes) to avoid name clashes. 

+

+Typically, model element constants are retrieved by pattern 

+matching or using the built-in 'ref' function.

+</p></div><div class="highlights"><a name="def_ModelElementConstant_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_AsmConstant.html" title="5.4.1.&nbsp;ASM Constant (Value)">ASM constant</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_FloatConstant.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMConstants.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_ASMFunctions.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.4.7.&nbsp;Float Constant&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.5.&nbsp;ASM Functions</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_ModelElementName.html b/org.eclipse.viatra2.help/def_ModelElementName.html
new file mode 100644
index 0000000..85576f9
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_ModelElementName.html
@@ -0,0 +1,65 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.7.1.&nbsp;Model Element Name</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_NamingVariables.html" title="5.7.&nbsp;Naming and Variables"><link rel="prev" href="sec_NamingVariables.html" title="5.7.&nbsp;Naming and Variables"><link rel="next" href="def_Variable.html" title="5.7.2.&nbsp;Variable"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.7.1.&nbsp;Model Element Name</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_NamingVariables.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.7.&nbsp;Naming and Variables</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_Variable.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_ModelElementName"></a>5.7.1.&nbsp;Model Element Name</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_ModelElementName_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>model element name</strong></span>

+<a name="N12DD6" class="indexterm"></a> 

+is the name of an element in the model space. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_ModelElementName_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+QualifiedTypeNameAST ::= TypeNameAST

+                       | QualifiedTypeNameAST <span class="token">.</span> TypeNameAST

+	

+TypeNameAST ::= <a href="def_NameLiteral.html" title="6.2.2.&nbsp;Name Literal">NameLiteral</a> 

+              | <a href="def_Identifier.html" title="6.2.1.&nbsp;Identifier">IDENTIFIER</a>

+              | <a href="def_UpperCaseLiteral.html" title="6.2.3.&nbsp;UpperCase Literal">UpperCaseLiteral</a>

+              | <a href="def_VTCLKeywords.html" title="6.1.2.&nbsp;Keywords">KeywordAsIdentifier</a>

+

+ValueQualifiedNameAST ::= ValueLocalNameAST 

+                        | QualifiedTypeNameAST <span class="token">.</span> TypeNameAST

+ValueLocalNameAST ::= <a href="def_NameLiteral.html" title="6.2.2.&nbsp;Name Literal">NameLiteral</a> 

+                    | <a href="def_Identifier.html" title="6.2.1.&nbsp;Identifier">IDENTIFIER</a>

+</pre><p>

+A model element is identified by its name. A <span class="strong"><strong>model element name</strong></span>

+can contain arbitrary ASCII characters except apostrophes (single quotation 

+marks) since the sequence of characters must be inserted between single 

+quotation marks. The single quotation marks are not part of the name. The 

+quotation marks can be omitted if the name starts with a letter (either 

+upper case or lower case) and contains only alphanumeric characters. 

+</p><p>

+A <span class="strong"><strong>qualified model element name</strong></span> is a sequence of 

+<span class="strong"><strong>local model element names</strong></span> separated with dots. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_ModelElementName_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The <span class="emphasis"><em>fully qualified name</em></span> is a <span class="strong"><strong>model element name</strong></span> that 

+consists of all containers of the model element according to the 

+containment hierarchy starting from a child of the root element. 

+</p><p>

+When defining a <a href="def_Machine.html" title="1.2.1.&nbsp;GTASM Machine Definition">machine</a>, an <a href="def_AsmRuleDef.html" title="4.1.1.&nbsp;ASM Rule Definition">ASM rule</a>, 

+an <a href="def_AsmFunctionDef.html" title="5.5.1.&nbsp;ASM Function Definition">ASM function</a>, a <a href="def_GraphPatternDef.html" title="2.1.1.&nbsp;Graph Pattern Definition">graph pattern</a> or 

+a <a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">graph transformation rule</a>, their names are always defined as <span class="emphasis"><em>local names</em></span>, while

+their namespace is defined globally in the <a href="def_VtclFile.html" title="1.1.1.&nbsp;VTCL file">VTCL file</a> in a 

+<a href="def_NamespaceDefinition.html" title="1.1.2.&nbsp;Namespace Definition">namespace definition</a>.

+</p><p>

+The <span class="emphasis"><em>local name</em></span> of a model element can be used in

+the type of an <a href="def_Entity.html" title="2.2.1.&nbsp;Entity">entity</a> or 

+<a href="def_Relation.html" title="2.2.2.&nbsp;Relation">relation</a> if the containment hierarchy of

+the referred model element (i.e. the type) is imported by a 

+<a href="def_NamespaceImport.html" title="1.1.3.&nbsp;Namespace Import">namespace import</a>.

+</p></td></tr></table></div><div class="highlights"><a name="def_ModelElementName_Remark"></a><p><b>Remark.&nbsp;</b>

+Note that name constants starting with an upper-case initial may clash with 

+variables in ASM programs. In case of such a conflict, the name constants 

+have to be surrounded with apostrophes ('). 

+

+In other terms, in ASM programs, all upper case literals and reserved words

+should be quoted between apostrophes, when used as a model element constant as a local name. 

+</p></div><div class="highlights"><a name="def_ModelElementName_UsedBy"></a><p><b>Used By:&nbsp;</b>

+<a href="def_NamespaceDefinition.html" title="1.1.2.&nbsp;Namespace Definition">namespace definition</a>, 

+<a href="def_NamespaceImport.html" title="1.1.3.&nbsp;Namespace Import">namespace import</a>, 

+<a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">GT rule definition</a>, 

+<a href="def_GTRuleCall.html" title="3.4.1.&nbsp;GTRule Call">GT rule invocation</a>, 

+<a href="def_GraphPatternDef.html" title="2.1.1.&nbsp;Graph Pattern Definition">graph pattern definition</a>, 

+<a href="def_GraphPatternCall.html" title="2.1.4.&nbsp;Graph Pattern Call">graph pattern call</a>, 

+<a href="def_AsmRuleDef.html" title="4.1.1.&nbsp;ASM Rule Definition">ASM rule definition</a>, 

+<a href="def_CallRule.html" title="4.2.2.&nbsp;Call Rule">Call rule (ASM rule invocation)</a>, 

+<a href="def_AsmFunctionDef.html" title="5.5.1.&nbsp;ASM Function Definition">ASM function definition</a>, 

+<a href="def_AsmFunctionLocation.html" title="5.5.3.&nbsp;ASM Function Location">ASM function location</a>, 

+<a href="def_PredefinedFunctionCall.html" title="5.6.1.&nbsp;Predefined Function Call">predefined function call</a>, 

+<a href="def_Entity.html" title="2.2.1.&nbsp;Entity">entity type</a>, 

+<a href="def_Relation.html" title="2.2.2.&nbsp;Relation">relation type</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_NamingVariables.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_NamingVariables.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_Variable.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.7.&nbsp;Naming and Variables&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.7.2.&nbsp;Variable</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_ModelManipulationRule.html b/org.eclipse.viatra2.help/def_ModelManipulationRule.html
new file mode 100644
index 0000000..badaf39
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_ModelManipulationRule.html
@@ -0,0 +1,15 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.4.1.&nbsp;Model Manipulation Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMModelManipulationRules.html" title="4.4.&nbsp;Model Manipulation Rules"><link rel="prev" href="sec_ASMModelManipulationRules.html" title="4.4.&nbsp;Model Manipulation Rules"><link rel="next" href="def_CreateRule.html" title="4.4.2.&nbsp;Create Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.4.1.&nbsp;Model Manipulation Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_ASMModelManipulationRules.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.4.&nbsp;Model Manipulation Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_CreateRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_ModelManipulationRule"></a>4.4.1.&nbsp;Model Manipulation Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_ModelManipulationRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+In VIATRA, standard ASM rules are extended with rules for manipulating the model space. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_ModelManipulationRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+ModelManipulationRuleAST ::= <a href="def_CreateRule.html" title="4.4.2.&nbsp;Create Rule">CreateRuleAST</a> | <a href="def_DeleteRule.html" title="4.4.3.&nbsp;Delete Rule">DeleteRuleAST</a> | <a href="def_CopyRule.html" title="4.4.4.&nbsp;Copy Rule">CopyRuleAST</a> 

+                           | <a href="def_MoveRule.html" title="4.4.5.&nbsp;Move Rule">MoveRuleAST</a> | <a href="def_ElementUpdateRule.html" title="4.4.6.&nbsp;Element Update Rule">ElementUpdateRuleAST</a> 

+</pre><p>

+The rules introduced in this section are special extensions to the ASM 

+language. They provide an interface to the model space to allow 

+</p><div class="itemizedlist"><ul type="disc"><li><p>creation (<a href="def_CreateRule.html" title="4.4.2.&nbsp;Create Rule">create rule</a>, <a href="def_CopyRule.html" title="4.4.4.&nbsp;Copy Rule">copy rule</a>), 

+</p></li><li><p>change (<a href="def_MoveRule.html" title="4.4.5.&nbsp;Move Rule">move rule</a>, <a href="def_ElementUpdateRule.html" title="4.4.6.&nbsp;Element Update Rule">element update rule</a>), or 

+</p></li><li><p>deletion of model elements (<a href="def_DeleteRule.html" title="4.4.3.&nbsp;Delete Rule">delete rule</a>). 

+</p></li></ul></div></td></tr></table></div><div class="highlights"><a name="def_ModelManipulationRule_Remarks"></a><p><b>Remarks.&nbsp;</b>

+Most model manipulation operations

+can also be carried out by <a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">graph transformation rules</a>. 

+			</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_ASMModelManipulationRules.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMModelManipulationRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_CreateRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.4.&nbsp;Model Manipulation Rules&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.4.2.&nbsp;Create Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_MoveRule.html b/org.eclipse.viatra2.help/def_MoveRule.html
new file mode 100644
index 0000000..b175c86
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_MoveRule.html
@@ -0,0 +1,25 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.4.5.&nbsp;Move Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMModelManipulationRules.html" title="4.4.&nbsp;Model Manipulation Rules"><link rel="prev" href="def_CopyRule.html" title="4.4.4.&nbsp;Copy Rule"><link rel="next" href="def_ElementUpdateRule.html" title="4.4.6.&nbsp;Element Update Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.4.5.&nbsp;Move Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_CopyRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.4.&nbsp;Model Manipulation Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_ElementUpdateRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_MoveRule"></a>4.4.5.&nbsp;Move Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_MoveRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>move rule</strong></span><a name="N11DE0" class="indexterm"></a> changes the location of an entity in the 

+containment hierarchy. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_MoveRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+MoveRuleAST ::= <span class="token">move</span> <span class="token">(</span> <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a> <span class="token">,</span> <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a> <span class="token">)</span> <span class="token">;</span>

+</pre><p>

+A <span class="strong"><strong>move rule</strong></span> has two parameters: the first <span class="strong"><strong>source entity</strong></span>

+and the second <span class="strong"><strong>target container</strong></span>. Both are ASM <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">terms</a>

+that evaluates to a <a href="def_ModelElementConstant.html" title="5.4.8.&nbsp;Model Element Constant">model element constant</a> referencing an 

+<a href="def_Entity.html" title="2.2.1.&nbsp;Entity">entity</a>. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_MoveRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>move rule</strong></span> moves the element specified by the first 

+parameter (<span class="strong"><strong>source entity</strong></span>) to the container specified by the second 

+parameter (<span class="strong"><strong>target container</strong></span>). 

+</p><p>

+The <span class="strong"><strong>move rule</strong></span> performs changes only in the containment 

+hierarchy, i.e. no model element or relationship is deleted from the model space. 

+</p></td></tr></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Constraints"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left"><a name="def_MoveRule_Constraints"></a>Constraints</th></tr><tr><td valign="top" align="left"><p>

+Note that the <span class="strong"><strong>move rule</strong></span> may be conflicting with creating 

+relations of aggregation type. 

+</p></td></tr></table></div><div class="highlights"><a name="def_MoveRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_ModelManipulationRule.html" title="4.4.1.&nbsp;Model Manipulation Rule">model manipulation rule</a>

+</p></div><div class="highlights"><a name="def_MoveRule_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_CopyRule.html" title="4.4.4.&nbsp;Copy Rule">copy rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_CopyRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMModelManipulationRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_ElementUpdateRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.4.4.&nbsp;Copy Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.4.6.&nbsp;Element Update   Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_MultArithmeticTerm.html b/org.eclipse.viatra2.help/def_MultArithmeticTerm.html
new file mode 100644
index 0000000..f54add1
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_MultArithmeticTerm.html
@@ -0,0 +1,33 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.3.2.&nbsp;Multiplicative Arithmetic Term</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMArithmeticTerms.html" title="5.3.&nbsp;Arithmetic Terms"><link rel="prev" href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term"><link rel="next" href="def_UnaryArithmeticTerm.html" title="5.3.3.&nbsp;Unary Arithmetic Term"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.3.2.&nbsp;Multiplicative   Arithmetic Term</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_ArithmeticTerm.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.3.&nbsp;Arithmetic Terms</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_UnaryArithmeticTerm.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_MultArithmeticTerm"></a>5.3.2.&nbsp;Multiplicative   Arithmetic Term</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_MultArithmeticTerm_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>multiplicative arithmetic term</strong></span>

+<a name="N12535" class="indexterm"></a> is an ASM term 

+constituted from applying the multiply, divide or remainder operators. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_MultArithmeticTerm_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+MultArithmeticTermAST ::= <a href="def_UnaryArithmeticTerm.html" title="5.3.3.&nbsp;Unary Arithmetic Term">UnaryArithmeticTermAST</a>

+                        | MultArithmeticTermAST <span class="token">*</span> <a href="def_UnaryArithmeticTerm.html" title="5.3.3.&nbsp;Unary Arithmetic Term">UnaryArithmeticTermAST</a>

+                        | MultArithmeticTermAST <span class="token">/</span> <a href="def_UnaryArithmeticTerm.html" title="5.3.3.&nbsp;Unary Arithmetic Term">UnaryArithmeticTermAST</a>

+                        | MultArithmeticTermAST <span class="token">%</span> <a href="def_UnaryArithmeticTerm.html" title="5.3.3.&nbsp;Unary Arithmetic Term">UnaryArithmeticTermAST</a>

+</pre><p>

+A <span class="strong"><strong>multiplicative arithmetic term</strong></span> is composed of 

+<a href="def_UnaryArithmeticTerm.html" title="5.3.3.&nbsp;Unary Arithmetic Term">unary arithmetic terms</a> with a 

+multiply  (<code class="computeroutput">*</code>), divide (<code class="computeroutput">/</code>) or remainder (<code class="computeroutput">%</code>)

+operators. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_MultArithmeticTerm_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The evaluation of multiplicative arithmetic terms are evaluated according to 

+<a href="def_MultArithmeticTerm.html#tab_MultDivOp" title="Table&nbsp;2.8.&nbsp;Multiply (*) and Divide (/) operators">Table&nbsp;2.8, &ldquo;Multiply (<code class="computeroutput">*</code>) and Divide 

+(<code class="computeroutput">/</code>) operators &rdquo;</a> and <a href="def_MultArithmeticTerm.html#tab_RemainderOp" title="Table&nbsp;2.9.&nbsp;Remainder (%) operator">Table&nbsp;2.9, &ldquo;Remainder (<code class="computeroutput">%</code>) operator &rdquo;</a>, 

+which shows the type of the output with respect to the types of each operand. 

+</p><p>

+If any operation has an <code class="computeroutput">undef</code> value among its operands, the result 

+is always <code class="computeroutput">undef</code>, no matter what the type of the other operand is. 

+</p><div class="table"><a name="tab_MultDivOp"></a><p class="title"><b>Table&nbsp;2.8.&nbsp;Multiply (<code class="computeroutput">*</code>) and Divide 

+(<code class="computeroutput">/</code>) operators </b></p><div class="table-contents"><table summary="Multiply (*) and Divide 
+(/) operators " border="1"><colgroup><col><col><col><col><col><col><col><col></colgroup><thead><tr><th align="center">&nbsp;</th><th align="center">Undef</th><th align="center">Boolean</th><th align="center">String</th><th align="center">Integer</th><th align="center">Double</th><th align="center">ModelElement</th><th align="center">Multiplicity</th></tr></thead><tbody><tr><td align="center"><span class="strong"><strong>Undef</strong></span></td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td></tr><tr><td align="center"><span class="strong"><strong>Boolean</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>String</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Integer</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">Int</td><td align="center">Double</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Double</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">Double</td><td align="center">Double</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>ModelElement</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Multiplicity</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr></tbody></table></div><p></p></div><br class="table-break"><div class="table"><a name="tab_RemainderOp"></a><p class="title"><b>Table&nbsp;2.9.&nbsp;Remainder (<code class="computeroutput">%</code>) operator </b></p><div class="table-contents"><table summary="Remainder (%) operator " border="1"><colgroup><col><col><col><col><col><col><col><col></colgroup><thead><tr><th align="center">&nbsp;</th><th align="center">Undef</th><th align="center">Boolean</th><th align="center">String</th><th align="center">Integer</th><th align="center">Double</th><th align="center">ModelElement</th><th align="center">Multiplicity</th></tr></thead><tbody><tr><td align="center"><span class="strong"><strong>Undef</strong></span></td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td><td align="center">Undef</td></tr><tr><td align="center"><span class="strong"><strong>Boolean</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>String</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Integer</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">Int</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Double</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>ModelElement</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr><tr><td align="center"><span class="strong"><strong>Multiplicity</strong></span></td><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr></tbody></table></div><p></p></div><br class="table-break"></td></tr></table></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning: Warning"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Warning]" src="images/warning.png"></td><th align="left"><a name="def_MultArithmeticTerm_Warning"></a>Warning</th></tr><tr><td valign="top" align="left"><p>

+Note that the evaluation rules of arithmetic operators changed in the 

+new release to be compliant with its use in Java.

+  	</p></td></tr></table></div><div class="highlights"><a name="def_MultArithmeticTerm_Remark"></a><p><b>Remark.&nbsp;</b>

+There is no implicit type casting on the input of the operands; conversion 

+operators have to be used if casting is required. 

+</p></div><div class="highlights"><a name="def_MultArithmeticTerm_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">arithmetic term</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_ArithmeticTerm.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMArithmeticTerms.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_UnaryArithmeticTerm.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.3.1.&nbsp;Arithmetic Term&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.3.3.&nbsp;Unary Arithmetic Term</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_MultiplicityConstant.html b/org.eclipse.viatra2.help/def_MultiplicityConstant.html
new file mode 100644
index 0000000..cc2e939
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_MultiplicityConstant.html
@@ -0,0 +1,38 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.4.4.&nbsp;Multiplicity Constant</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMConstants.html" title="5.4.&nbsp;Constants"><link rel="prev" href="def_BooleanConstant.html" title="5.4.3.&nbsp;Boolean Constant"><link rel="next" href="def_StringConstant.html" title="5.4.5.&nbsp;String Constant"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.4.4.&nbsp;Multiplicity Constant</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_BooleanConstant.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.4.&nbsp;Constants</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_StringConstant.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_MultiplicityConstant"></a>5.4.4.&nbsp;Multiplicity Constant</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_MultiplicityConstant_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>multiplicity constant</strong></span>

+<a name="N128F1" class="indexterm"></a>

+<a name="N128F6" class="indexterm"></a>

+is used to specify multiplicity 

+restrictions for a <a href="def_Relation.html" title="2.2.2.&nbsp;Relation">relation</a>. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_MultiplicityConstant_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+MultiplicityConstantAST ::= <span class="token">one_to_one</span> | <span class="token">one_to_many</span> 

+	                        | <span class="token">many_to_one</span> | <span class="token">many_to_many</span>

+</pre><p>

+The possible values of a <span class="strong"><strong>multiplicity constant</strong></span> are 

+<code class="computeroutput">one_to_one</code>, <code class="computeroutput">one_to_many</code>, <code class="computeroutput">many_to_one</code>

+and <code class="computeroutput">many_to_many</code>. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_MultiplicityConstant_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+Both end of a relation can have either the multiplicity <span class="emphasis"><em>one</em></span>or the 

+multiplicity <span class="emphasis"><em>many</em></span>. In the model space only a single property determines 

+the multiplicity of a relation that holds the multiplicity information for 

+both ends. 

+</p><p>

+The interpretation of multiplicity kinds in VPM are 

+</p><div class="itemizedlist"><ul type="disc"><li><p><span class="strong"><strong>one_to_one</strong></span>: for each source element at most one target 

+element can be in relation, and for each target element at most one source 

+element can be in relation for each instance of the relation, 

+</p></li><li><p><span class="strong"><strong>one_to_many</strong></span>: for each target element at most one source 

+element can be in relation each instance of the relation, 

+</p></li><li><p><span class="strong"><strong>many_to_one</strong></span>: for each source element at most one target 

+element can be in relation for each instance of the relation 

+</p></li><li><p><span class="strong"><strong>many_to_many</strong></span>: an arbitrary number of source and target 

+elements can be in relation. 

+</p></li></ul></div><p>

+The default value of a multiplicity is <code class="computeroutput">many_to_many</code>. 

+</p></td></tr></table></div><div class="highlights"><a name="def_MultiplicityConstant_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_AsmConstant.html" title="5.4.1.&nbsp;ASM Constant (Value)">ASM constant</a>

+</p></div><div class="highlights"><a name="def_MultiplicityConstant_UsedBy"></a><p><b>Used By:&nbsp;</b>

+<a href="def_ElementUpdateRule.html" title="4.4.6.&nbsp;Element Update Rule">element update rule</a> (<code class="computeroutput">setMultiplicity</code>), 

+

+<a href="def_PredefinedFunctionCall.html" title="5.6.1.&nbsp;Predefined Function Call">predefined function call</a> ( <code class="computeroutput">multiplicity</code>) 

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_BooleanConstant.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMConstants.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_StringConstant.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.4.3.&nbsp;Boolean Constant&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.4.5.&nbsp;String Constant</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_NameLiteral.html b/org.eclipse.viatra2.help/def_NameLiteral.html
new file mode 100644
index 0000000..65b9c0e
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_NameLiteral.html
@@ -0,0 +1,11 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>6.2.2.&nbsp;Name Literal</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_NameTokens.html" title="6.2.&nbsp;Tokens for names and strings"><link rel="prev" href="def_Identifier.html" title="6.2.1.&nbsp;Identifier"><link rel="next" href="def_UpperCaseLiteral.html" title="6.2.3.&nbsp;UpperCase Literal"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">6.2.2.&nbsp;Name Literal</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_Identifier.html">Prev</a>&nbsp;</td><th align="center" width="60%">6.2.&nbsp;Tokens for names and strings</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_UpperCaseLiteral.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_NameLiteral"></a>6.2.2.&nbsp;Name Literal</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_NameLiteral_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>Name literal</strong></span> is a token, which 

+represents a <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">model element name</a>.

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_NameLiteral_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+NameLiteral ::= <span class="token">'</span> NameBody <span class="token">'</span>

+NameBody -&gt; NotSQNotDot 

+   	      | NameBody NotSQNotDot

+NotSQNotDot -&gt; Any printable ASCII character other then <span class="token">'</span> and <span class="token">.</span>

+</pre></td></tr></table></div><div class="highlights"><a name="def_NameLiteral_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_Token.html" title="6.1.1.&nbsp;Tokens">Token</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_Identifier.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_NameTokens.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_UpperCaseLiteral.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">6.2.1.&nbsp;Identifier&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;6.2.3.&nbsp;UpperCase Literal</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_NamespaceDefinition.html b/org.eclipse.viatra2.help/def_NamespaceDefinition.html
new file mode 100644
index 0000000..b46d4d1
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_NamespaceDefinition.html
@@ -0,0 +1,45 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>1.1.2.&nbsp;Namespace Definition</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_VtclFile.html" title="1.1.&nbsp;VTCL Files"><link rel="prev" href="def_VtclFile.html" title="1.1.1.&nbsp;VTCL file"><link rel="next" href="def_NamespaceImport.html" title="1.1.3.&nbsp;Namespace Import"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">1.1.2.&nbsp;Namespace Definition</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_VtclFile.html">Prev</a>&nbsp;</td><th align="center" width="60%">1.1.&nbsp;VTCL Files</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_NamespaceImport.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_NamespaceDefinition"></a>1.1.2.&nbsp;Namespace Definition</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_NamespaceDefinition-Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+			Like in modern programming languages, namespaces are used also in VTCL. 

+			<span class="strong"><strong>Namespaces</strong></span>

+			<a name="N100E8" class="indexterm"></a> 

+			make it easier to	identify model elements uniquely in a hierarchical way.

+		</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_NamespaceDefinition-Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+NamespaceDefAST ::= $empty

+                  | <span class="token">namespace</span> <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">QualifiedTypeNameAST</a> <span class="token">;</span>

+</pre><p>

+	    Namespaces are identified by <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">qualified model element names</a>.

+		</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_NamespaceDefinition-Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+			The <span class="strong"><strong>namespace</strong></span> structure corresponds to the containment hierarchy of the VPM model space. 

+			Model elements can be referenced either by their fully qualified names or by their local names (identifiers) if the namespace

+			in which they are contained is reachable (either because it is the currently defined namespace or because it

+			is imported).

+		</p></td></tr></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Constraints"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left"><a name="def_NamespaceDefinition-Constraints"></a>Constraints</th></tr><tr><td valign="top" align="left"><p>All element names must be unique within the scope of their direct containers.</p></td></tr></table></div><div class="highlights"><a name="def_NamespaceDefinition-Remarks"></a><p><b>Remarks.&nbsp;</b>

+				The recommended structure of namespaces is to divide the root namespace into technological spaces (like

+				ASM, UML, BPM, MOF etc.). In these technological namespaces define the following containers 

+				<a href="def_NamespaceDefinition.html#fig:NamespaceStruct" title="Figure&nbsp;2.1.&nbsp;Recommended structure of namespaces">Figure&nbsp;2.1, &ldquo;Recommended structure of namespaces&rdquo;</a>):

+

+				<div class="figure-float" style="float: right;"><div class="figure"><a name="fig:NamespaceStruct"></a><p class="title"><b>Figure&nbsp;2.1.&nbsp;Recommended structure of namespaces</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="images/others/NamespaceStruct.png" align="middle" width="200" alt="Recommended structure of namespaces"></div></div><p></p></div><br class="figure-break"></div>

+

+				<div class="itemizedlist"><ul type="disc"><li><p>

+							<span class="emphasis"><em>metamodel</em></span> for containing the metamodel of the given technology,

+						</p></li><li><p>

+							<span class="emphasis"><em>models</em></span> for all the models that are instances of the above mentioned metamodel,

+						</p></li><li><p>

+							<span class="emphasis"><em>references</em></span>

+							for all the additional information that is related to transformations transforming to other

+							technological spaces organized into subcontainers:

+							<div class="itemizedlist"><ul type="circle"><li><p>

+										<span class="emphasis"><em>metamodels</em></span>

+										for the metamodels of reference structures that defines the relationship between

+										the elements of the metamodels of the current and the target technology,

+									</p></li><li><p>

+										<span class="emphasis"><em>models</em></span>

+										for all the models that are instances of the reference metamodel,

+									</p></li></ul></div>

+						</p></li></ul></div>

+

+

+				This structure clearly separates the various types of metamodels, models, transformations and other

+				related model elements.

+

+			</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_VtclFile.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_VtclFile.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_NamespaceImport.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">1.1.1.&nbsp;VTCL file&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;1.1.3.&nbsp;Namespace Import</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_NamespaceImport.html b/org.eclipse.viatra2.help/def_NamespaceImport.html
new file mode 100644
index 0000000..9513749
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_NamespaceImport.html
@@ -0,0 +1,56 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>1.1.3.&nbsp;Namespace Import</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_VtclFile.html" title="1.1.&nbsp;VTCL Files"><link rel="prev" href="def_NamespaceDefinition.html" title="1.1.2.&nbsp;Namespace Definition"><link rel="next" href="sec_MachineDefinition.html" title="1.2.&nbsp;Machine Definition"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">1.1.3.&nbsp;Namespace Import</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_NamespaceDefinition.html">Prev</a>&nbsp;</td><th align="center" width="60%">1.1.&nbsp;VTCL Files</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_MachineDefinition.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_NamespaceImport"></a>1.1.3.&nbsp;Namespace Import</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_NamespaceImport_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+  A <span class="strong"><strong>namespace import</strong></span><a name="N10161" class="indexterm"></a> 

+  is  part of a <a href="def_VtclFile.html" title="1.1.1.&nbsp;VTCL file">VTCL file</a>; it

+  makes typing of model elements easier since the elements of the model subtree

+  determined by the namespace can be referenced relative to the namespace 

+  when using them as types.

+		</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_NamespaceImport_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><p>

+			<pre class="programlisting">

+NamespaceImportsAST ::= $empty 

+                      | NamespaceImportsAST NamespaceImportAST

+NamespaceImportAST ::= <span class="token">import</span> <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">QualifiedTypeNameAST</a> <span class="token">;</span>

+			</pre>

+		</p><p>

+    Namespaces are identified by <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">qualified model element names</a>.

+

+    Import instructions must be placed at the beginning of the file.

+		</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_NamespaceImport_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+    The result of importing a namespace to a file is that all model elements

+    defined in or below the model element identified by the namespace can be

+    referenced inside of all the machines defined in the given file with their

+    local names or qualified names local to the given namespace.

+		</p><p>

+				Namespace imports can result name clashes:

+				<div class="itemizedlist"><ul type="disc"><li><p>between a locally defined and an imported name, or</p></li><li><p>between two imported names.</p></li></ul></div>

+		</p><p>

+      In the first case local (short) name always refers to the locally defined

+      element (entity, relation, function, variable, rule etc.), whereas the

+      imported element can be referred by its fully qualified name. In

+      addition a compile-time warning is issued when a namespace is

+      imported that has a conflicting element with a local name.

+		</p><p>

+      When two different imported namespace contains elements with the same

+      name then these elements can be referred by their fully qualified names.

+      A compile-time error occurs when such an element is referred by its local

+      name.

+		</p><p>

+      A name clash can occur between a locally defined element and an element

+      in the root namespace; in this case root element can be reached, but the

+      element in the imported name space not. In this case a warning is issued by

+      the compiler.

+		</p></td></tr></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Constraints"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left"><a name="def_NamespaceImport_Constraints"></a>Constraints</th></tr><tr><td valign="top" align="left"><p>

+  Only an entity identifies a namespace in the model space, i.e. the

+  <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">qualified model element name</a> of the import cannot be the name of a relation.

+  	</p></td></tr></table></div><div class="example"><a name="def_NamespaceImport_Example"></a><p class="title"><b>Example&nbsp;2.1.&nbsp;Sample namespace import</b></p><div class="example-contents"><p>

+			<pre class="programlisting">

+// All elements below the entity uml2.metamodel will become available as types 			

+import uml2.metamodel;

+

+// Now the type uml2.metamodel.Classifier of C can be shortened 

+pattern myPattern(C) = {

+ Classifier(C);

+}			

+			</pre>

+		</p></div><p></p></div><br class="example-break"><div class="highlights"><a name="def_NamespaceImport_SeeAlso"></a><p><b>See also:&nbsp;</b>

+			<a href="def_Entity.html" title="2.2.1.&nbsp;Entity">Entity</a>, <a href="def_Relation.html" title="2.2.2.&nbsp;Relation">Relation</a>

+			</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_NamespaceDefinition.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_VtclFile.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_MachineDefinition.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">1.1.2.&nbsp;Namespace Definition&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;1.2.&nbsp;Machine Definition</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_NegativePattern.html b/org.eclipse.viatra2.help/def_NegativePattern.html
new file mode 100644
index 0000000..a5ca727
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_NegativePattern.html
@@ -0,0 +1,30 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>2.1.3.&nbsp;Negative Pattern</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_PatternDefinition.html" title="2.1.&nbsp;Pattern Definition"><link rel="prev" href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body"><link rel="next" href="def_GraphPatternCall.html" title="2.1.4.&nbsp;Graph Pattern Call"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">2.1.3.&nbsp;Negative Pattern</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_PatternBody.html">Prev</a>&nbsp;</td><th align="center" width="60%">2.1.&nbsp;Pattern Definition</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_GraphPatternCall.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_NegativePattern"></a>2.1.3.&nbsp;Negative Pattern</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_NegativePattern_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+			Negative patterns define negative constraints in a

+			<a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">pattern body</a>: 

+			if a negative pattern can be matched then the match of the container pattern fails.

+		</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_NegativePattern_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+NegativePatternAST ::= <span class="token">neg</span> <a href="def_PatternComposition.html" title="2.1.5.&nbsp;Pattern Composition">PatternCompositionAST</a>

+// See also: <a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">PatternBodyContentDefAST</a>

+</pre><p>

+			A

+			<span class="strong"><strong>negative pattern</strong></span>

+			<a name="N104EE" class="indexterm"></a>

+			is composed of the <code class="computeroutput">neg</code> keyword and a <a href="def_GraphPatternDef.html" title="2.1.1.&nbsp;Graph Pattern Definition">pattern definition</a> or 

+			<a href="def_PatternComposition.html" title="2.1.5.&nbsp;Pattern Composition">pattern composition</a>.

+		</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_NegativePattern_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+			Negative patterns typically search for some prohibited context of the partial match of the container

+			(positive) pattern. If a match is found for the negative pattern, then the match of the container pattern is

+			invalidated.

+		</p><p>

+			When a pattern has multiple negative subpatterns, a successful matching of any of its subpatterns

+			invalidates the container pattern.

+		</p><p>

+			When a negative pattern itself has an embedded negative subpattern (i.e. negation of negation) then the

+			matching of the subpattern may invalidate the matching of the negative pattern itself, thus the original

+			(positive) container pattern is not invalidated.

+		</p><p>

+			Note that when a match is found for a negative pattern, no assignment of pattern variables is passed back to

+			its container pattern.

+		</p></td></tr></table></div><div class="highlights"><a name="def_NegativePattern_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+				<a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">pattern body</a>

+			</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_PatternBody.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_PatternDefinition.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_GraphPatternCall.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">2.1.2.&nbsp;Pattern Body&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;2.1.4.&nbsp;Graph Pattern Call</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_ParallelRule.html b/org.eclipse.viatra2.help/def_ParallelRule.html
new file mode 100644
index 0000000..ea51793
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_ParallelRule.html
@@ -0,0 +1,28 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.3.3.&nbsp;Parallel Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMCompoundRules.html" title="4.3.&nbsp;Compound ASM Rules"><link rel="prev" href="def_SequentialRule.html" title="4.3.2.&nbsp;Sequential Rule"><link rel="next" href="def_RandomRule.html" title="4.3.4.&nbsp;Random Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.3.3.&nbsp;Parallel Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_SequentialRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.3.&nbsp;Compound ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_RandomRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_ParallelRule"></a>4.3.3.&nbsp;Parallel Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_ParallelRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>parallel rule</strong></span><a name="N115CB" class="indexterm"></a> is a rule-container 

+that defines the parallel execution of the nested rules. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_ParallelRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+ParallelRuleAST ::= <span class="token">parallel</span> <span class="token">{</span> <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">AsmRulesAST</a> <span class="token">}</span> OptSemicolonAST  

+</pre><p>

+A <span class="strong"><strong>parallel rule</strong></span> contains an arbitrary number of other 

+<a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rules</a>. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_ParallelRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>parallel rule</strong></span> executes <span class="emphasis"><em>all</em></span> rules listed inside in an 

+<span class="emphasis"><em>arbitrary</em></span> order in multiple threads. If parallel processing is supported on the host 

+machine rules are executed simultaneously. 

+</p><p>

+The <span class="strong"><strong>parallel rule</strong></span> fails if at least one of the contained rules fails.

+The previous state of local variables are not restored after failure. 

+</p><p>

+The <span class="strong"><strong>parallel rule</strong></span> uses read and write locks when manipulating the

+model space to avoid concurrency problems. However, no protection is provided for

+preventing the parallel access of ASM machines, which may result in exceptions reporting concurrent access. 

+</p></td></tr></table></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning: Warning"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Warning]" src="images/warning.png"></td><th align="left"><a name="def_ParallelRule_Semantics"></a>Warning</th></tr><tr><td valign="top" align="left"><p>

+The implementation of the <span class="strong"><strong>parallel rule</strong></span> is experimental.

+There is some chance that not all conflicting assignments (carried out in different threads) are 

+detected. 

+		</p></td></tr></table></div><div class="highlights"><a name="def_ParallelRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_CompoundRule.html" title="4.3.1.&nbsp;Compound Rule">compound rule</a>

+</p></div><div class="highlights"><a name="def_ParallelRule_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_SequentialRule.html" title="4.3.2.&nbsp;Sequential Rule">sequential rule</a>, <a href="def_RandomRule.html" title="4.3.4.&nbsp;Random Rule">random rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_SequentialRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMCompoundRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_RandomRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.3.2.&nbsp;Sequential Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.3.4.&nbsp;Random Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_PatternBody.html b/org.eclipse.viatra2.help/def_PatternBody.html
new file mode 100644
index 0000000..71cf79e
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_PatternBody.html
@@ -0,0 +1,113 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>2.1.2.&nbsp;Pattern Body</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_PatternDefinition.html" title="2.1.&nbsp;Pattern Definition"><link rel="prev" href="def_GraphPatternDef.html" title="2.1.1.&nbsp;Graph Pattern Definition"><link rel="next" href="def_NegativePattern.html" title="2.1.3.&nbsp;Negative Pattern"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">2.1.2.&nbsp;Pattern Body</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_GraphPatternDef.html">Prev</a>&nbsp;</td><th align="center" width="60%">2.1.&nbsp;Pattern Definition</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_NegativePattern.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_PatternBody"></a>2.1.2.&nbsp;Pattern Body</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_PatternBody_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+			<span class="strong"><strong>Pattern body</strong></span>

+			<a name="N1039A" class="indexterm"></a>

+			is the basic part of the

+			<a href="def_GraphPatternDef.html" title="2.1.1.&nbsp;Graph Pattern Definition">graph pattern definition</a>. 

+			It determines a constraint set that identifies a part of the model space.

+		</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_PatternBody_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+PatternBodiesAST ::= PatternBodyAST

+                   | PatternBodiesAST <span class="token">or</span> PatternBodyAST

+	

+PatternBodyAST ::= <span class="token">{</span> PatternBodyContentsAST <span class="token">}</span>

+	

+PatternBodyContentsAST ::= $empty 

+                         | PatternBodyContentsAST PatternBodyContentDefAST

+

+PatternBodyContentDefAST ::= PatternBodyContentAST <span class="token">;</span>

+                           | <span class="token">neg</span> <a href="def_GraphPatternDef.html" title="2.1.1.&nbsp;Graph Pattern Definition">GraphPatternDefAST</a>

+

+PatternBodyContentAST ::= LocalPatternBodyElementAST

+                        | <a href="def_PatternComposition.html" title="2.1.5.&nbsp;Pattern Composition">PatternCompositionAST</a>

+                        | <a href="def_NegativePattern.html" title="2.1.3.&nbsp;Negative Pattern">NegativePatternAST</a>

+                        | <a href="def_PatternVariableAssignment.html" title="2.1.7.&nbsp;Pattern Variable Assignment">PatternVariableAssignmentAST</a>

+                        | <a href="def_CheckCondition.html" title="2.1.8.&nbsp;Check Condition">CheckConditionAST</a>

+

+LocalPatternBodyElementAST ::= ModelElementAST  | <a href="def_Relationship.html" title="2.2.3.&nbsp;Relationships">RelationshipAST</a>

+ModelElementAST ::= <a href="def_Entity.html" title="2.2.1.&nbsp;Entity">EntityAST</a>| <a href="def_Relation.html" title="2.2.2.&nbsp;Relation">RelationAST</a>

+	</pre><p>

+			A	<span class="strong"><strong>pattern body</strong></span>

+			<a name="N103DF" class="indexterm"></a>

+			mainly consists of <span class="strong"><strong>local pattern body elements</strong></span>

+			<a name="N103E8" class="indexterm"></a>. These defines the typed structure of the pattern. A

+			<span class="strong"><strong>local pattern body element</strong></span>

+			can be either a 

+			<span class="strong"><strong>model element</strong></span>

+			<a name="N103F5" class="indexterm"></a>

+			or a

+			<a href="def_Relationship.html" title="2.2.3.&nbsp;Relationships">relationship</a>

+			definition between model elements. A

+			<span class="strong"><strong>model element</strong></span>

+			is either an

+			<a href="def_Entity.html" title="2.2.1.&nbsp;Entity">entity</a>

+			or a

+			<a href="def_Relation.html" title="2.2.2.&nbsp;Relation">relation</a>.

+			<span class="strong"><strong>Model element</strong></span>

+			<a name="N1040E" class="indexterm"></a>

+			are identified by <a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">pattern variables</a>: 

+			these are either the parameters of the pattern or internal variables.

+		</p><p>

+			From a

+			<span class="strong"><strong>pattern body</strong></span>

+			<a name="N1041D" class="indexterm"></a>, another graph pattern can be invoked by

+			<a href="def_PatternComposition.html" title="2.1.5.&nbsp;Pattern Composition">pattern composition</a>

+			or as a

+			<a href="def_NegativePattern.html" title="2.1.3.&nbsp;Negative Pattern">negative pattern</a>.

+		</p><p>

+			Within a

+			<span class="strong"><strong>pattern body</strong></span>

+			the unification of variables can be defined: it is called

+			<a href="def_PatternVariableAssignment.html" title="2.1.7.&nbsp;Pattern Variable Assignment">pattern variable assignment</a>.

+		</p><p>

+			Extra conditions can be states in addition to those that defines the typed structure. These are called

+			<a href="def_CheckCondition.html" title="2.1.8.&nbsp;Check Condition">check condition</a>

+			s and are formulated by ASM terms.

+		</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_PatternBody_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+			A pattern body defines a conjunction of constraints which has to be fulfilled by a part of the model space

+			during pattern matching.

+		</p><p>The following list of core constraints are interpreted by the pattern matcher:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="computeroutput">entity(E)</code>: pattern variable E should be bound to an entity in the model space;</p></li><li><p><code class="computeroutput">relation(R)</code>: pattern variable R should be bound to a relation in the model space;</p></li><li><p><code class="computeroutput">from(R,X)</code>: relation R should lead from model element X;</p></li><li><p><code class="computeroutput">to(R, X)</code>: relation R should lead into model element X;</p></li><li><p><code class="computeroutput">super(X, Y)</code>: X is a supertype of Y or Y is a subtype of X;</p></li><li><p><code class="computeroutput">type(X, Y)</code>: X is type of Y, or Y is instance of X;</p></li><li><p>

+					<code class="computeroutput">in(X, Y)</code>: 

+					X is a direct child of Y (Y is the parent of X) in the containment hierarchy of the model space.

+				</p></li><li><p>

+					<code class="computeroutput">below(X, Y)</code>: 

+					X is a descendant of Y (Y is an ancestor of X) in the containment hierarchy of the model space.

+				</p></li></ul></div><p>Here the <code class="computeroutput">super</code> and the <code class="computeroutput">below</code>constraints are transitive.

+		</p><p>

+			In case of

+			<a href="def_PatternComposition.html" title="2.1.5.&nbsp;Pattern Composition">pattern composition</a>, 

+			a predicate representing the invoked pattern is derived as a conjunction of the core constraints of its

+			body. A	<a href="def_NegativePattern.html" title="2.1.3.&nbsp;Negative Pattern">negative pattern</a>

+			defines negative constraints: the pattern body can match only if none of the negative patterns can be

+			satisfied. In case of recursion, the fixpoint of the recursive predicate is calculated.

+		</p><p>

+			In case of multiple pattern bodies (OR-patterns), a different set of constraints is derived, and one of them

+			needs to be matched for a successful match of the pattern.

+		</p><p>

+			The pattern matching engine implements injective pattern matching, i.e. each pattern variable has to be

+			bound to different model elements in the model space unless (i) two

+			<a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">pattern variables</a>

+			are explicitly assigned to the same model element by

+			<a href="def_PatternVariableAssignment.html" title="2.1.7.&nbsp;Pattern Variable Assignment">pattern variable assignment</a> or 

+			(ii) both variables appear in as actual parameters of called subpatterns.

+		</p></td></tr></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Constraints"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left"><a name="def_PatternBody_Constraints"></a>Constraints</th></tr><tr><td valign="top" align="left"><p>All variables in the head of the pattern must appear in the pattern body</p><div class="itemizedlist"><ul type="disc"><li><p>locally in a model element, or</p></li><li><p>in a (positive or negative) pattern composition or</p></li><li><p>in a variable assignment or</p></li><li><p>in the check condition,</p></li></ul></div><p>

+			otherwise a compile-time error is generated. In case of OR-patterns, this rule applies to all pattern

+			bodies.

+		</p><p>

+			This is a significant change wrt. the previous versions of VIATRA where all pattern variables had to appear

+			locally or in the check condition.

+		</p><p>

+			The actual parameters of a pattern composition inside a pattern body are restricted to

+			<a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">pattern variables</a>

+			.

+		</p></td></tr></table></div><div class="example"><a name="def_PatternBody_Example"></a><p class="title"><b>Example&nbsp;2.3.&nbsp;Overview of pattern body contents</b></p><div class="example-contents"><p>

+			<pre class="programlisting">

+pattern myPattern(A,B,C,D) = 

+{

+  myType(A); // local pattern body element 

+  B = A; // variable assignment 

+  neg find myNestedPattern(C); // negative pattern composition 

+  check (name(B) = D); // check condition

+} 

+</pre>

+</p></div><p></p></div><br class="example-break"><div class="highlights"><a name="def_PatternBody_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_GraphPatternDef.html" title="2.1.1.&nbsp;Graph Pattern Definition">graph pattern definition</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_GraphPatternDef.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_PatternDefinition.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_NegativePattern.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">2.1.1.&nbsp;Graph Pattern Definition&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;2.1.3.&nbsp;Negative Pattern</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_PatternComposition.html b/org.eclipse.viatra2.help/def_PatternComposition.html
new file mode 100644
index 0000000..44bd83b
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_PatternComposition.html
@@ -0,0 +1,94 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>2.1.5.&nbsp;Pattern Composition</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_PatternDefinition.html" title="2.1.&nbsp;Pattern Definition"><link rel="prev" href="def_GraphPatternCall.html" title="2.1.4.&nbsp;Graph Pattern Call"><link rel="next" href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">2.1.5.&nbsp;Pattern Composition</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_GraphPatternCall.html">Prev</a>&nbsp;</td><th align="center" width="60%">2.1.&nbsp;Pattern Definition</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_PatternVariable.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_PatternComposition"></a>2.1.5.&nbsp;Pattern Composition</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_PatternComposition_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+			<span class="strong"><strong>Pattern composition</strong></span>

+			<a name="N1060C" class="indexterm"></a>

+			enables the reusability of graph patterns by allowing to combine elementary graph patterns into complex

+			patterns in a declarative way.

+		</p><p>

+			<span class="strong"><strong>Pattern composition</strong></span>

+			can be initiated in the following contexts:

+		</p><div class="orderedlist"><ol type="1"><li><p>

+					from the body of another GT pattern as part of its

+					<a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">pattern body</a>

+				</p></li><li><p>

+					as part of a <a href="def_NegativePattern.html" title="2.1.3.&nbsp;Negative Pattern">negative pattern</a>,

+			</p></li><li><p>

+					in the precondition of a

+					<a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">GT rule definition</a>,

+				</p></li><li><p>

+					in the postcondition part of a

+					<a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">GT rule definition</a>,

+				</p></li></ol></div></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_PatternComposition_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+PatternCompositionAST ::= <span class="token">find</span> <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">QualifiedTypeNameAST</a> <a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">ActualPatternParameterDefAST</a>

+ActualPatternParameterDefAST ::= <span class="token">(</span> <a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">ActualParamsPatternVariablesAST</a> <span class="token">)</span> 

+                               | <span class="token">(</span> <span class="token">)</span> 

+</pre><p>

+The syntax of <span class="strong"><strong>pattern composition</strong></span> is formally identical to the 

+syntax of a <a href="def_GraphPatternCall.html" title="2.1.4.&nbsp;Graph Pattern Call">graph pattern call</a>. However, a main restriction is 

+that only <a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">pattern variables</a> may appear as 

+<a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">actual parameters</a>

+in a <span class="strong"><strong>pattern composition</strong></span>, and not arbitrary terms as in case of 

+<a href="def_GraphPatternCall.html" title="2.1.4.&nbsp;Graph Pattern Call">graph pattern call</a>. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_PatternComposition_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+			The semantics of called graph patterns differs on the context in which the pattern call is initiated.

+		</p><div class="variablelist"><dl><dt><span class="term">Case 1: Pattern called from another pattern</span></dt><dd><p>

+						A graph pattern call (initiated from another pattern or as a precondition pattern of a

+						<a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">GT rule definition</a>

+						<span class="emphasis"><em>injects additional structural constraints</em></span>

+						to caller pattern in the following cases:

+					</p><div class="itemizedlist"><ul type="disc"><li><p>

+								from the body of another GT pattern, i.e. as part of a

+								<a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">pattern body</a>

+							</p></li><li><p>

+								as part of a

+								<a href="def_NegativePattern.html" title="2.1.3.&nbsp;Negative Pattern">negative pattern</a>,

+							</p></li><li><p>

+								in the precondition of a

+								<a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">GT rule definition</a>,								

+							</p></li></ul></div></dd><dt><span class="term">Case 2: Pattern called from postcondition of GT rule</span></dt><dd><p>

+						When

+						<span class="strong"><strong>pattern composition</strong></span>

+						<a name="N106A6" class="indexterm"></a>

+						is part of the postcondition of a

+						<a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">GT rule definition</a>, it

+						<span class="emphasis"><em>defines model manipulation</em></span>

+						(typically, bulk creation of model elements). This semantics is discussed in

+						<a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">GT rule definition</a>, and thus omitted here.

+					</p></dd></dl></div><p>

+			As in case of

+			<a href="def_GraphPatternCall.html" title="2.1.4.&nbsp;Graph Pattern Call">graph pattern call</a>, 

+			the variables in the actual parameter list supplied to the called graph pattern from the caller pattern

+			can be either bound or unbound.

+		</p><div class="itemizedlist"><ul type="disc"><li><p>

+					If an actual parameter is bound then it is an

+					<span class="emphasis"><em>input parameter</em></span> for pattern matching. 

+					The binding of all input parameters is kept unchanged during pattern matching.

+				</p></li><li><p>

+					If an actual parameter is unbound then it is an

+					<span class="emphasis"><em>output parameter</em></span>, and a binding is calculated during pattern matching.

+				</p></li></ul></div><p>

+			In case of

+			<span class="strong"><strong>pattern composition</strong></span>

+			<a name="N106CF" class="indexterm"></a>, each actual parameter is required to be a

+			<a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">pattern variable</a>

+			(with respective semantics) instead of arbitrary

+			<a href="def_Term.html" title="5.1.1.&nbsp;ASM Term">ASM term</a>

+			as in case of

+			<a href="def_GraphPatternCall.html" title="2.1.4.&nbsp;Graph Pattern Call">graph pattern calls</a>.

+		</p><p>

+			As a general rule (i.e. in case of positive pattern composition), if the matching of a subpattern fails,

+			then the matching of the entire pattern also fails. However, if the subpattern is a negative pattern, then

+			the success of the caller is reversed, i.e. if the subpattern fails, then the caller succeeds, and vice

+			versa.

+		</p><p>

+			Pattern composition can also be

+			<span class="emphasis"><em>recursive</em></span>, i.e. a pattern may call itself as a subpattern in one or more pattern bodies. 

+			Recursion is evaluated by	bottom-up fixpoint calculation.

+		</p><p>

+			It is worth pointing out that a very general interpretation is allowed in VTCL: the only structural

+			restriction is that recursion in positive and negative patterns are not allowed to interfere, i.e. if a

+			pattern is called recursively in a negative pattern, than it is not allowed to be called recursively in the

+			positive pattern, and vice versa. Note that this restriction only applies to

+			<span class="emphasis"><em>recursive</em></span> pattern composition calls.

+		</p></td></tr></table></div><div class="highlights"><a name="def_PatternComposition_SeeAlso"></a><p><b>See also:&nbsp;</b>

+  			<a href="def_GraphPatternCall.html" title="2.1.4.&nbsp;Graph Pattern Call">Graph pattern call</a>, 

+			</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_GraphPatternCall.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_PatternDefinition.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_PatternVariable.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">2.1.4.&nbsp;Graph Pattern Call&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;2.1.6.&nbsp;Pattern Variable</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_PatternVariable.html b/org.eclipse.viatra2.help/def_PatternVariable.html
new file mode 100644
index 0000000..a99ca7d
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_PatternVariable.html
@@ -0,0 +1,63 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>2.1.6.&nbsp;Pattern Variable</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_PatternDefinition.html" title="2.1.&nbsp;Pattern Definition"><link rel="prev" href="def_PatternComposition.html" title="2.1.5.&nbsp;Pattern Composition"><link rel="next" href="def_PatternVariableAssignment.html" title="2.1.7.&nbsp;Pattern Variable Assignment"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">2.1.6.&nbsp;Pattern Variable</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_PatternComposition.html">Prev</a>&nbsp;</td><th align="center" width="60%">2.1.&nbsp;Pattern Definition</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_PatternVariableAssignment.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_PatternVariable"></a>2.1.6.&nbsp;Pattern Variable</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_PatternVariable_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+			<span class="strong"><strong>Pattern variable</strong></span>

+			<a name="N10706" class="indexterm"></a>

+			<a name="N1070B" class="indexterm"></a>

+			is a variable that appears in a graph pattern, i.e. (i) in the formal parameter list of a

+			<a href="def_GraphPatternDef.html" title="2.1.1.&nbsp;Graph Pattern Definition">graph pattern definition</a>, 

+			(ii) in the definition of a (local) model element in a

+			<a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">pattern body</a>, (iii) in a

+			<a href="def_PatternVariableAssignment.html" title="2.1.7.&nbsp;Pattern Variable Assignment">pattern variable assignment</a>

+			or (iv) in the

+			<a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">actual parameters</a>

+			of (positive or negative)

+			<a href="def_PatternComposition.html" title="2.1.5.&nbsp;Pattern Composition">pattern composition</a>.

+		</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_PatternVariable_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+PatternVariableDefAST ::= <a href="def_UpperCaseLiteral.html" title="6.2.3.&nbsp;UpperCase Literal">UpperCaseLiteral</a>

+PatternVariableRefAST ::= <a href="def_UpperCaseLiteral.html" title="6.2.3.&nbsp;UpperCase Literal">UpperCaseLiteral</a>

+PatternVariableDefRefAST ::= <a href="def_UpperCaseLiteral.html" title="6.2.3.&nbsp;UpperCase Literal">UpperCaseLiteral</a>

+</pre><p>

+			Syntactically, a <span class="strong"><strong>pattern variable</strong></span>

+			<a name="N1073F" class="indexterm"></a>

+			is (an ASM)

+			<span class="strong"><strong>Variable</strong></span>

+			<a name="N10748" class="indexterm"></a>, i.e. 

+			begins with an uppercase letter that can be followed by an arbitrary number 

+			of alphanumerical	characters. A pattern variable can be a 

+			<span class="strong"><strong>pattern variable definition</strong></span>

+			<a name="N10751" class="indexterm"></a> or 

+			<span class="strong"><strong>pattern variable reference</strong></span>

+			<a name="N1075C" class="indexterm"></a>

+			(or something both at the same time).

+		</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_PatternVariable_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+			The binding of a

+			<span class="strong"><strong>pattern variable</strong></span>

+			is more restrictive compared to that of a ASM

+			<a href="def_Variable.html" title="5.7.2.&nbsp;Variable">Variable</a>.

+		</p><p>

+			Unless being an input parameter of the pattern, a

+			<span class="strong"><strong>pattern variable</strong></span>

+			should always be bound to a model element. Furthermore, if a graph pattern is flattened along

+			<a href="def_PatternComposition.html" title="2.1.5.&nbsp;Pattern Composition">pattern composition</a>

+			(i.e. by composing the subpatterns into a complex flat pattern), then all output

+			<span class="strong"><strong>pattern variable definitions</strong></span>

+			are required to appear in the definition of a model element, i.e. as the

+			first parameter of an

+			<a href="def_Entity.html" title="2.2.1.&nbsp;Entity">entity</a>	or a

+			<a href="def_Relation.html" title="2.2.2.&nbsp;Relation">relation</a>.

+		</p><p>

+		  Moreover, if each <span class="strong"><strong>pattern variable reference</strong></span> should be 

+		  resolved to <span class="strong"><strong>pattern variable definitions</strong></span> within the same

+		  pattern body

+		</p><p>

+			Note, that input parameters of a pattern may still be bound to arbitrary ASM terms. However, this binding is

+			already carried out before pattern matching is initiated.

+		</p></td></tr></table></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning: Exceptions"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Warning]" src="images/warning.png"></td><th align="left"><a name="def_PatternVariable_Exception"></a>Exceptions</th></tr><tr><td valign="top" align="left"><p>

+		When binding an output a pattern variable to anything else but model element during pattern matching, a run-time

+		exception is thrown:

+<span class="emphasis"><em>"Invalid pattern variable binding: Pattern variable X should be bound

+	to a model element and not to term Y."</em></span>	 

+	</p></td></tr></table></div><div class="highlights"><a name="def_PatternVariable_UsedBy"></a><p><b>Used By:&nbsp;</b>

+				<a href="def_PatternComposition.html" title="2.1.5.&nbsp;Pattern Composition">pattern composition</a>

+			</p></div><div class="highlights"><a name="def_PatternVariable_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+				<a href="def_Variable.html" title="5.7.2.&nbsp;Variable">Variable</a>

+			</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_PatternComposition.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_PatternDefinition.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_PatternVariableAssignment.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">2.1.5.&nbsp;Pattern Composition&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;2.1.7.&nbsp;Pattern Variable Assignment</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_PatternVariableAssignment.html b/org.eclipse.viatra2.help/def_PatternVariableAssignment.html
new file mode 100644
index 0000000..3c5b815
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_PatternVariableAssignment.html
@@ -0,0 +1,46 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>2.1.7.&nbsp;Pattern Variable Assignment</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_PatternDefinition.html" title="2.1.&nbsp;Pattern Definition"><link rel="prev" href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable"><link rel="next" href="def_CheckCondition.html" title="2.1.8.&nbsp;Check Condition"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">2.1.7.&nbsp;Pattern Variable Assignment</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_PatternVariable.html">Prev</a>&nbsp;</td><th align="center" width="60%">2.1.&nbsp;Pattern Definition</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_CheckCondition.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_PatternVariableAssignment"></a>2.1.7.&nbsp;Pattern Variable Assignment</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_PatternVariableAssignment_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+			A

+			<span class="strong"><strong>pattern variable assignment</strong></span>

+			<a name="N107C1" class="indexterm"></a>

+			is part of a

+			<a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">pattern body</a>. 

+			It defines the equality of two locally visible variable.

+		</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_PatternVariableAssignment_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+PatternVariableAssignmentAST ::= <a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">PatternVariableRefAST</a> <span class="token">=</span> <a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">PatternVariableRefAST</a>

+</pre></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_PatternVariableAssignment_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+			By default, two pattern variables are bound to different model elements according to the injective pattern

+			matching principle. By

+			<span class="strong"><strong>pattern variable assignment</strong></span>, 

+			two pattern variables are declared to be equal, i.e. to store (share) the same

+			model element.

+		</p><p>

+			The effect of a

+			<span class="strong"><strong>pattern variable assignment</strong></span>

+			<a name="N107EC" class="indexterm"></a>

+			$X = Y $depends on the bindings of pattern variables as follows:

+		</p><div class="itemizedlist"><ul type="disc"><li><p>

+					If both	<code class="computeroutput">X</code>

+					and	<code class="computeroutput">Y</code>

+					are bound (input) pattern variables, or both of them are free variables, then the pattern matcher

+					treats <code class="computeroutput">X = Y</code>

+					as a constraint. Furthermore, it obviously removes injectivity checks for the pair

+					<code class="computeroutput">X</code>

+					and	<code class="computeroutput">Y</code>.

+				</p></li><li><p>

+					If exactly one of pattern variables

+					<code class="computeroutput">X</code>

+					and	<code class="computeroutput">Y</code>

+					are free (e.g. let it be <code class="computeroutput">X</code>), 

+					then the value of the bound variable

+					<code class="computeroutput">Y</code>

+					is assigned to the free variable

+					<code class="computeroutput">X</code>.

+				</p></li></ul></div></td></tr></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Constraints"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left"><a name="def_PatternVariableAssignment_Constraints"></a>Constraints</th></tr><tr><td valign="top" align="left"><p>

+			At least one of the variables in the assignment have to appear in the pattern body either as

+			<a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">locally defined body element</a>

+			or in a (positive)

+			<a href="def_PatternComposition.html" title="2.1.5.&nbsp;Pattern Composition">pattern composition</a>, 

+			otherwise a compile-time error is generated.

+		</p></td></tr></table></div><div class="highlights"><a name="def_PatternVariableAssignment_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+				<a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">pattern body</a>

+			</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_PatternVariable.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_PatternDefinition.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_CheckCondition.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">2.1.6.&nbsp;Pattern Variable&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;2.1.8.&nbsp;Check Condition</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_PredefinedFunctionCall.html b/org.eclipse.viatra2.help/def_PredefinedFunctionCall.html
new file mode 100644
index 0000000..1b6cf24
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_PredefinedFunctionCall.html
@@ -0,0 +1,64 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.6.1.&nbsp;Predefined Function Call</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_PredefinedFunctions.html" title="5.6.&nbsp;Predefined Functions"><link rel="prev" href="sec_PredefinedFunctions.html" title="5.6.&nbsp;Predefined Functions"><link rel="next" href="sec_NamingVariables.html" title="5.7.&nbsp;Naming and Variables"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.6.1.&nbsp;Predefined Function Call</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_PredefinedFunctions.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.6.&nbsp;Predefined Functions</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_NamingVariables.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_PredefinedFunctionCall"></a>5.6.1.&nbsp;Predefined Function Call</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_PredefinedFunctionCall_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+VIATRA provides a set of predefined functions: a part of it is 

+<span class="emphasis"><em>built-in function</em></span> that is interpreted by the VIATRA engine and 

+another part is defined as an Eclipse plug-in; these later ones are called 

+<span class="emphasis"><em>native functions</em></span>. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_PredefinedFunctionCall_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+PredefinedFunctionCallAST ::= BuiltInFunctionNameAST <span class="token">(</span> <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a> <span class="token">)</span> 

+                            | ConversionFunctionNameAST <span class="token">(</span> <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a> <span class="token">)</span> 

+	

+BuiltInFunctionNameAST$BuiltInFunctionNameAST ::= 

+                    ref | fqn | name | value | source | target |  

+                    multiplicity | aggregation | inverse

+

+ConversionFunctionNameAST$ConversionFunctionNameAST ::= 

+    toBoolean | toString | toInteger | toDouble | toMultiplicity

+</pre><p>

+The predefined functions are identified by their <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">names</a> 

+and they are called with an <a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">actual parameter list</a>. 

+</p><p>

+		For	<span class="strong"><strong>native functions</strong></span>,

+		<a name="N12D1C" class="indexterm"></a>

+		<a name="N12D21" class="indexterm"></a>

+		the name and the formal parameter list is determined by an Eclipse plug-in. The objects returned by native

+		functions should be treated by the interpreter according to the followings:

+		<div class="itemizedlist"><ul type="disc"><li><p>

+					for	<span class="emphasis"><em>built-in types</em></span>	(String, Double, Boolean, Integer, IModelElement), 

+					the interpreter should recognize the type and	provide auto-conversion,

+				</p></li><li><p>

+					<span class="emphasis"><em>unknown types</em></span> are handled as "native function objects" that can be passed to other native functions as parameters,

+					but if the transformation tries to use them as a normal VTCL value, a runtime exception is thrown.

+				</p></li></ul></div>

+		</p><p>

+<span class="emphasis"><em>Built-in functions</em></span>are the followings: 

+<div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Element reference functions</em></span>

+  <div class="itemizedlist"><ul type="circle"><li><p><span class="strong"><strong>ref(s)</strong></span>- This function returns a reference to the model element corresponding to string 

+   <span class="emphasis"><em>s</em></span>, where <span class="emphasis"><em>s</em></span>is the string representation of the model element name. 

+   </p></li><li><p><span class="strong"><strong>fqn(e)</strong></span>- Returns the fully qualified name of the model element <span class="emphasis"><em>e</em></span> as string. 

+   </p></li><li><p><span class="strong"><strong>name(e)</strong></span>- Returns the local name of the model element <span class="emphasis"><em>e</em></span> as string. 

+   </p></li><li><p><span class="strong"><strong>value(e)</strong></span>- Returns the value associated to the model entity <span class="emphasis"><em>e</em></span> as string. 

+   </p></li><li><p><span class="strong"><strong>source(r)</strong></span>- Returns the source element of the relation <span class="emphasis"><em>r</em></span> as model element reference. 

+   </p></li><li><p><span class="strong"><strong>target(r)</strong></span>- Returns the target element of the relation <span class="emphasis"><em>r</em></span> as model element reference. 

+   </p></li></ul></div>

+ </p></li><li><p><span class="emphasis"><em>Conversion functions</em></span>

+ <div class="itemizedlist"><ul type="circle"><li><p>

+    <span class="strong"><strong>toBoolean(r)</strong></span>- Converts the value <code class="computeroutput">r</code> to boolean (if possible). 

+  </p></li><li><p>

+    <span class="strong"><strong>toString(r)</strong></span>- Converts the value <code class="computeroutput">r</code> to string (if possible). 

+  </p></li><li><p>

+    <span class="strong"><strong>toInteger(r)</strong></span>- Converts the value <code class="computeroutput">r </code> to integer number (if possible). 

+  </p></li><li><p>

+    <span class="strong"><strong>toDouble(r)</strong></span>- Converts the value <code class="computeroutput">r </code> to double precision floating point 

+     number (if possible). 

+  </p></li></ul></div>

+ </p></li></ul></div>

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_PredefinedFunctionCall_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The native function handling mechanism provides a powerful extension to the 

+framework. Defining a native function is the way how can be 

+extended with arbitrary functionality even by the transformation developers. 

+</p><p>

+Note that currently, native functions are stateless, i.e. they do not 

+preserve their internal state along subsequent calls. 

+</p></td></tr></table></div><div class="highlights"><a name="def_PredefinedFunctionCall_UsedBy"></a><p><b>Used By:&nbsp;</b>

+<a href="def_BaseArithmeticTerm.html" title="5.3.4.&nbsp;Base Arithmetic Term">base arithmetic term</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_PredefinedFunctions.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_PredefinedFunctions.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_NamingVariables.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.6.&nbsp;Predefined Functions&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.7.&nbsp;Naming and Variables</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_PrintRule.html b/org.eclipse.viatra2.help/def_PrintRule.html
new file mode 100644
index 0000000..795d017
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_PrintRule.html
@@ -0,0 +1,28 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.2.6.&nbsp;Print Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMSimpleRules.html" title="4.2.&nbsp;Simple ASM Rules"><link rel="prev" href="def_UpdateRule.html" title="4.2.5.&nbsp;Update Rule"><link rel="next" href="def_LogRule.html" title="4.2.7.&nbsp;Log Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.2.6.&nbsp;Print Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_UpdateRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.2.&nbsp;Simple ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_LogRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_PrintRule"></a>4.2.6.&nbsp;Print Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_PrintRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>print rule</strong></span><a name="N113ED" class="indexterm"></a> is used for 

+printing output from ASM programs to various buffers or to the code output view. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_PrintRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+PrintRuleAST ::= <span class="token">print</span> <span class="token">(</span> OptBufferAST <a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">LogicalTermAST</a> <span class="token">)</span> <span class="token">;</span>

+               | <span class="token">println</span> <span class="token">(</span> OptBufferAST <a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">LogicalTermAST</a> <span class="token">)</span> <span class="token">;</span>

+

+OptBufferAST ::= $empty   

+               | <a href="def_Variable.html" title="5.7.2.&nbsp;Variable">VariableRefAST</a> <span class="token">,</span> 

+</pre><p>

+The <span class="strong"><strong>print rule</strong></span> contains an optional output buffer and a term to be printed.

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_PrintRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>print rule</strong></span> evaluates its argument <a href="def_Term.html" title="5.1.1.&nbsp;ASM Term">term</a> and 

+prints the resulted value to corresponding output buffer or the <span class="emphasis"><em>Code Output View</em></span> 

+(if the optional buffer is not specified).

+The <span class="strong"><strong>println rule</strong></span> adds a newline character 

+to the output string in addition. If the buffer is not specified then the 

+</p></td></tr></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Constraints"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left"><a name="def_PrintRule_Constraints"></a>Constraints</th></tr><tr><td valign="top" align="left"><p>

+Prior to calling rule, the output buffer should be initialized 

+by a call to native function XXX. 

+</p></td></tr></table></div><div class="highlights"><a name="def_PrintRule_Remark"></a><p><b>Remark.&nbsp;</b>

+The <span class="strong"><strong>print rule</strong></span> can be used for instance for code generation or 

+for printing status messages. 

+</p></div><div class="highlights"><a name="def_PrintRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_SimpleRule.html" title="4.2.1.&nbsp;Simple Rule">simple rule</a>

+</p></div><div class="highlights"><a name="def_PrintRule_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_LogRule.html" title="4.2.7.&nbsp;Log Rule">log rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_UpdateRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMSimpleRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_LogRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.2.5.&nbsp;Update Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.2.7.&nbsp;Log Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_RandomRule.html b/org.eclipse.viatra2.help/def_RandomRule.html
new file mode 100644
index 0000000..3a94f49
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_RandomRule.html
@@ -0,0 +1,19 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.3.4.&nbsp;Random Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMCompoundRules.html" title="4.3.&nbsp;Compound ASM Rules"><link rel="prev" href="def_ParallelRule.html" title="4.3.3.&nbsp;Parallel Rule"><link rel="next" href="def_LetRule.html" title="4.3.5.&nbsp;Let Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.3.4.&nbsp;Random Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_ParallelRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.3.&nbsp;Compound ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_LetRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_RandomRule"></a>4.3.4.&nbsp;Random Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_RandomRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>random rule</strong></span><a name="N1163C" class="indexterm"></a>is a rule-container; it executes a 

+non-deterministically chosen rule from the rules listed inside. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_RandomRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+RandomRuleAST ::= <span class="token">random</span> <span class="token">{</span> <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">AsmRulesAST</a> <span class="token">}</span> OptSemicolonAST 

+</pre><p>

+A <span class="strong"><strong>random rule</strong></span> contains an arbitrary number of other 

+<a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rules</a>. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_RandomRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>random rule</strong></span> executes <span class="emphasis"><em>exactly one</em></span> rule from the nested rules. 

+</p><p>

+The <span class="strong"><strong>random rule</strong></span> fails if the executed rule fails. 

+No backtracking is provided upon failure, i.e. no other rules are selected if the previous rule fails.

+The previous state of local variables are not restored after failure.

+</p></td></tr></table></div><div class="highlights"><a name="def_RandomRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_CompoundRule.html" title="4.3.1.&nbsp;Compound Rule">compound rule</a>

+</p></div><div class="highlights"><a name="def_RandomRule_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_SequentialRule.html" title="4.3.2.&nbsp;Sequential Rule">sequential rule</a>, <a href="def_ParallelRule.html" title="4.3.3.&nbsp;Parallel Rule">parallel rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_ParallelRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMCompoundRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_LetRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.3.3.&nbsp;Parallel Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.3.5.&nbsp;Let Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_Relation.html b/org.eclipse.viatra2.help/def_Relation.html
new file mode 100644
index 0000000..5658c1b
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_Relation.html
@@ -0,0 +1,57 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>2.2.2.&nbsp;Relation</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_LocalPatternlElementDescription.html" title="2.2.&nbsp;Local Pattern Body Elements"><link rel="prev" href="def_Entity.html" title="2.2.1.&nbsp;Entity"><link rel="next" href="def_Relationship.html" title="2.2.3.&nbsp;Relationships"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">2.2.2.&nbsp;Relation</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_Entity.html">Prev</a>&nbsp;</td><th align="center" width="60%">2.2.&nbsp;Local Pattern Body Elements</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_Relationship.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_Relation"></a>2.2.2.&nbsp;Relation</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_Relation_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+			A <span class="strong"><strong>relation</strong></span>

+			<a name="N10A87" class="indexterm"></a>

+			is a model element. It is one of the base components of the VPM; 

+			a model space is composed of typed entities and relations between them.

+		</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_Relation_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+RelationAST ::= <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">QualifiedTypeNameAST</a> RelationBodyAST 

+RelationBodyAST ::= <span class="token">(</span> <a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">PatternVariableDefRefAST</a> <span class="token">,</span> <a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">PatternVariableRefAST</a> <span class="token">,</span> <a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">PatternVariableRefAST</a> <span class="token">)</span> 

+</pre><p>

+			A <span class="strong"><strong>relation</strong></span>

+			is identified by a pattern

+			<a href="def_Variable.html" title="5.7.2.&nbsp;Variable">variable</a>.

+		</p><p>

+			It can have a

+			<span class="strong"><strong>relation type</strong></span>

+			<a name="N10ABF" class="indexterm"></a>, 

+			which is either a <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">local</a>

+			name or a <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">fully qualified name</a>). 

+			A type identifies another relation of the model space; it can be referenced with the local name only if

+			its namespace is imported. In the most general case, the type is

+			<code class="computeroutput">relation</code>

+			.

+			

+		</p><p>

+			The first parameter of a relation defines a

+			<a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">pattern variable</a>, 

+			which acts as an identifier for the relation in the pattern.

+		</p><p>

+			The description of a relation contains two additional references to model elements. The second parameter is

+			the	<span class="emphasis"><em>source</em></span>	<a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">pattern variable reference</a>

+			of the relation, while the third parameter is the	<span class="emphasis"><em>target</em></span><a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">pattern variable reference</a>

+			of the relation. Both the source and target of a relation can be an entity or another relation independently

+			of each other.

+		</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_Relation_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+			The description of a

+			<span class="strong"><strong>relation</strong></span>

+			<a name="N10AF3" class="indexterm"></a>

+			can appear in the context of a <a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">pattern body</a>. 

+			It either references an existing relation (when is used as part of the

+			<a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">precondition pattern</a>) 

+			or it may define a new relation to be created (when used in the

+			<a href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition">postcondition pattern</a>).

+		</p></td></tr></table></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning: Warning"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Warning]" src="images/warning.png"></td><th align="left"><a name="def_Relation_Warning"></a>Warning</th></tr><tr><td valign="top" align="left"><p>

+The <code class="computeroutput">vpm</code> namespace with 

+<code class="computeroutput">vpm.entity</code> and <code class="computeroutput">vpm.entity.relation</code>   

+(which were present in previous VIATRA releases as a metamodeling core) is  

+no longer supported. Please use simple <code class="computeroutput">relation</code> instead.

+  	</p></td></tr></table></div><div class="highlights"><a name="def_Relation_Remark"></a><p><b>Remark.&nbsp;</b>

+				The containment of a relation cannot be defined or constrained explicitly since every relation is

+				contained by its source model element.

+			</p></div><div class="highlights"><a name="def_Relation_UsedBy"></a><p><b>Used By:&nbsp;</b>

+				<a href="def_CreateRule.html" title="4.4.2.&nbsp;Create Rule">create rule</a>

+			</p></div><div class="highlights"><a name="def_Relation_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+				<a href="def_Entity.html" title="2.2.1.&nbsp;Entity">entity</a>,

+				<a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">local pattern body element</a>,

+				<a href="def_NamespaceImport.html" title="1.1.3.&nbsp;Namespace Import">namespace import</a>

+			</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_Entity.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_LocalPatternlElementDescription.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_Relationship.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">2.2.1.&nbsp;Entity&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;2.2.3.&nbsp;Relationships</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_Relationship.html b/org.eclipse.viatra2.help/def_Relationship.html
new file mode 100644
index 0000000..f645ba3
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_Relationship.html
@@ -0,0 +1,57 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>2.2.3.&nbsp;Relationships</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_LocalPatternlElementDescription.html" title="2.2.&nbsp;Local Pattern Body Elements"><link rel="prev" href="def_Relation.html" title="2.2.2.&nbsp;Relation"><link rel="next" href="sec_GraphTransformations.html" title="3.&nbsp;Graph Transformation Rules"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">2.2.3.&nbsp;Relationships</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_Relation.html">Prev</a>&nbsp;</td><th align="center" width="60%">2.2.&nbsp;Local Pattern Body Elements</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_GraphTransformations.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_Relationship"></a>2.2.3.&nbsp;Relationships</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_Relationship_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+			A relationship is a special relation that is model independent and is defined as part of the VPM. It

+			describes either inheritance (i.e. supertype-subtype) or instantiation (i.e. type-instance) relation.

+		</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_Relationship_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+RelationshipAST ::= InheritanceAST | InstantiationAST

+    

+InheritanceAST ::= <span class="token">supertypeOf</span> RelationshipBodyAST 

+                 | <span class="token">subtypeOf</span> RelationshipBodyAST 

+	

+InstantiationAST ::= <span class="token">typeOf</span> RelationshipBodyAST 

+                   | <span class="token">instanceOf</span> RelationshipBodyAST 

+

+RelationshipBodyAST ::= <span class="token">(</span> <a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">PatternVariableRefAST</a> <span class="token">,</span> <a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">PatternVariableRefAST</a> <span class="token">)</span>

+</pre><p>

+			A	<span class="strong"><strong>relationship</strong></span>

+			<a name="N10B74" class="indexterm"></a>

+			is either an

+			<span class="strong"><strong>inheritance</strong></span>

+			<a name="N10B7D" class="indexterm"></a>

+			or an

+			<span class="strong"><strong>instantiation</strong></span>

+			<a name="N10B88" class="indexterm"></a>.

+		</p><p>

+			In each case two model element is referenced by pattern variables references: a

+			<a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">parent reference</a>, and a

+			<a href="def_PatternVariable.html" title="2.1.6.&nbsp;Pattern Variable">child reference</a>.

+		</p><p>

+			In case of <span class="strong"><strong>inheritance</strong></span>

+			the parent is the	<span class="emphasis"><em>supertype</em></span>

+			and the child is the <span class="emphasis"><em>subtype</em></span>.

+		</p><p>

+			In case of	<span class="strong"><strong>instantiation</strong></span>

+			the parent is the	<span class="emphasis"><em>type</em></span>

+			and the child is the <span class="emphasis"><em>instance</em></span>.

+		</p><p>In case of both relationships both the parent and the child can be an entity or a relation.</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_Relationship_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+			The description of a	<span class="strong"><strong>relationship</strong></span>

+			can appear in the context of a <a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">pattern body</a>. 

+			It either references an existing relationship if it is used in pattern matching or defines a new

+			relationship.

+		</p><p>

+			In case of <span class="strong"><strong>inheritance</strong></span>

+			both and refers to the same relationship; only the order of the parameters are different.

+		</p><p>

+			In case of <span class="strong"><strong>instantiation</strong></span>

+			both and refers to the same relationship; only the order of the parameters are different.

+		</p></td></tr></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Constraints"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left"><a name="def_Relationship_Constraints"></a>Constraints</th></tr><tr><td valign="top" align="left"><p>

+			The parent and the child of the relationships must refer to the same type of model element, i.e. either both

+			refer to entities or both refer to relations.

+		</p></td></tr></table></div><div class="highlights"><a name="def_Relationship_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+				<a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">local pattern body element</a>

+			</p></div><div class="highlights"><a name="def_Relationship_UsedBy"></a><p><b>Used By:&nbsp;</b>

+				<a href="def_CreateRule.html" title="4.4.2.&nbsp;Create Rule">create rule</a>,

+				<a href="def_DeleteRule.html" title="4.4.3.&nbsp;Delete Rule">delete rule</a>

+			</p></div><div class="highlights"><a name="def_Relationship_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+				<a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">pattern body</a>,

+				<a href="def_Entity.html" title="2.2.1.&nbsp;Entity">entity</a>

+			</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_Relation.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_LocalPatternlElementDescription.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_GraphTransformations.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">2.2.2.&nbsp;Relation&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;3.&nbsp;Graph Transformation Rules</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_SequentialRule.html b/org.eclipse.viatra2.help/def_SequentialRule.html
new file mode 100644
index 0000000..3aa6abc
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_SequentialRule.html
@@ -0,0 +1,20 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.3.2.&nbsp;Sequential Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMCompoundRules.html" title="4.3.&nbsp;Compound ASM Rules"><link rel="prev" href="def_CompoundRule.html" title="4.3.1.&nbsp;Compound Rule"><link rel="next" href="def_ParallelRule.html" title="4.3.3.&nbsp;Parallel Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.3.2.&nbsp;Sequential Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_CompoundRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.3.&nbsp;Compound ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_ParallelRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_SequentialRule"></a>4.3.2.&nbsp;Sequential Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_SequentialRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>sequential rule</strong></span><a name="N11566" class="indexterm"></a>is a rule-container that defines the sequential 

+execution of multiple rules. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_SequentialRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+SequentialRuleAST ::= <span class="token">seq</span> <span class="token">{</span> <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">AsmRulesAST</a> <span class="token">}</span> OptSemicolonAST  

+</pre><p>

+A <span class="strong"><strong>sequential rule</strong></span><a name="N11584" class="indexterm"></a> contains

+an arbitrary number of nested <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rules</a>. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_SequentialRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>sequential rule</strong></span> executes <span class="emphasis"><em>all</em></span> rules listed inside in the 

+<span class="emphasis"><em>defined</em></span> order. 

+</p><p>

+The <span class="strong"><strong>sequential rule</strong></span> fails when one of the contained rules 

+fails. The rules after the failing rule are not executed. The previous state of local variables 

+are not restored after failure.

+</p></td></tr></table></div><div class="highlights"><a name="def_SequentialRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_CompoundRule.html" title="4.3.1.&nbsp;Compound Rule">compound rule</a>

+</p></div><div class="highlights"><a name="def_SequentialRule_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_ParallelRule.html" title="4.3.3.&nbsp;Parallel Rule">parallel rule</a>, <a href="def_RandomRule.html" title="4.3.4.&nbsp;Random Rule">random rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_CompoundRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMCompoundRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_ParallelRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.3.1.&nbsp;Compound Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.3.3.&nbsp;Parallel Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_SimpleRule.html b/org.eclipse.viatra2.help/def_SimpleRule.html
new file mode 100644
index 0000000..544e207
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_SimpleRule.html
@@ -0,0 +1,13 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.2.1.&nbsp;Simple Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMSimpleRules.html" title="4.2.&nbsp;Simple ASM Rules"><link rel="prev" href="sec_ASMSimpleRules.html" title="4.2.&nbsp;Simple ASM Rules"><link rel="next" href="def_CallRule.html" title="4.2.2.&nbsp;Call Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.2.1.&nbsp;Simple Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_ASMSimpleRules.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.2.&nbsp;Simple ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_CallRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_SimpleRule"></a>4.2.1.&nbsp;Simple Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_SimpleRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+  A <span class="strong"><strong>simple rule</strong></span><a name="N11201" class="indexterm"></a> is such an ASM rule that does not contain nested

+  ASM rules.

+		</p><p>

+  A simple rule can change <span class="emphasis"><em>control flow</em></span> (like <a href="def_SkipRule.html" title="4.2.3.&nbsp;Skip Rule">skip rule</a>, 

+  <a href="def_FailRule.html" title="4.2.4.&nbsp;Fail Rule">fail rule</a>, or <a href="def_CallRule.html" title="4.2.2.&nbsp;Call Rule">call rule</a>),

+  <span class="emphasis"><em>variables</em></span> (like <a href="def_UpdateRule.html" title="4.2.5.&nbsp;Update Rule">update rule</a>), and it may print or log

+  during execution (like <a href="def_PrintRule.html" title="4.2.6.&nbsp;Print Rule">print rule</a> or <a href="def_LogRule.html" title="4.2.7.&nbsp;Log Rule">log rule</a>.

+		</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_SimpleRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+SimpleRuleAST ::= <a href="def_SkipRule.html" title="4.2.3.&nbsp;Skip Rule">SkipRuleAST</a> | <a href="def_FailRule.html" title="4.2.4.&nbsp;Fail Rule">FailRuleAST</a> 

+                | <a href="def_CallRule.html" title="4.2.2.&nbsp;Call Rule">CallRuleAST</a> | <a href="def_UpdateRule.html" title="4.2.5.&nbsp;Update Rule">UpdateRuleAST</a> 

+                | <a href="def_PrintRule.html" title="4.2.6.&nbsp;Print Rule">PrintRuleAST</a> | <a href="def_LogRule.html" title="4.2.7.&nbsp;Log Rule">LogRuleAST</a> 

+</pre></td></tr></table></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_ASMSimpleRules.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMSimpleRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_CallRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.2.&nbsp;Simple ASM Rules&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.2.2.&nbsp;Call Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_SkipRule.html b/org.eclipse.viatra2.help/def_SkipRule.html
new file mode 100644
index 0000000..f113e9c
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_SkipRule.html
@@ -0,0 +1,16 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.2.3.&nbsp;Skip Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMSimpleRules.html" title="4.2.&nbsp;Simple ASM Rules"><link rel="prev" href="def_CallRule.html" title="4.2.2.&nbsp;Call Rule"><link rel="next" href="def_FailRule.html" title="4.2.4.&nbsp;Fail Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.2.3.&nbsp;Skip Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_CallRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.2.&nbsp;Simple ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_FailRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_SkipRule"></a>4.2.3.&nbsp;Skip Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_SkipRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>skip rule</strong></span><a name="N112B1" class="indexterm"></a> represents an "empty" 

+or "do nothing" instruction. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_SkipRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+SkipRuleAST ::= <span class="token">skip</span> <span class="token">;</span>

+</pre></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_SkipRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The rule does not do anything, the execution continues with the next 

+rule. 

+</p></td></tr></table></div><div class="highlights"><a name="def_SkipRule_Remark"></a><p><b>Remark.&nbsp;</b>

+Typically, it is used within a nested rule if a nested rule must be defined in a 

+rule where nothing should be done. For instance in a <a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>

+the expected actions can be the side effect of applying a GT rule and thus 

+the <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rule invocation</a> in the do part frequently does nothing. 

+</p></div><div class="highlights"><a name="def_SkipRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_SimpleRule.html" title="4.2.1.&nbsp;Simple Rule">simple rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_CallRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMSimpleRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_FailRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.2.2.&nbsp;Call Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.2.4.&nbsp;Fail Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_StringConstant.html b/org.eclipse.viatra2.help/def_StringConstant.html
new file mode 100644
index 0000000..b16a9fd
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_StringConstant.html
@@ -0,0 +1,18 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.4.5.&nbsp;String Constant</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMConstants.html" title="5.4.&nbsp;Constants"><link rel="prev" href="def_MultiplicityConstant.html" title="5.4.4.&nbsp;Multiplicity Constant"><link rel="next" href="def_IntConstant.html" title="5.4.6.&nbsp;Integer Constants"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.4.5.&nbsp;String Constant</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_MultiplicityConstant.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.4.&nbsp;Constants</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_IntConstant.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_StringConstant"></a>5.4.5.&nbsp;String Constant</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_StringConstant_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>string constant</strong></span>

+<a name="N1298A" class="indexterm"></a> 

+<a name="N1298F" class="indexterm"></a>

+are ASM constants which represent regular Java-like strings.

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_StringConstant_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+StringConstantAST ::= <a href="def_StringLiteral.html" title="6.2.4.&nbsp;String Literal">StringLiteral</a>

+</pre><p>

+A string is a sequence of characters. In the constant representation it is 

+surrounded with double quotation marks (<code class="computeroutput">"</code>). A string literal character can be any

+printable ASCII character other than a double quotation mark (<code class="computeroutput">"</code>). 

+<span class="strong"><strong>Special escape sequences</strong></span><a name="N129AE" class="indexterm"></a>

+are defined in <a href="def_StringConstant.html#tab_EscapeSequences" title="Table&nbsp;2.12.&nbsp;Escape sequences and special characters in string constants">Table&nbsp;2.12, &ldquo;Escape sequences and special characters in string constants&rdquo;</a>

+</p><div class="table"><a name="tab_EscapeSequences"></a><p class="title"><b>Table&nbsp;2.12.&nbsp;Escape sequences and special characters in string constants</b></p><div class="table-contents"><table summary="Escape sequences and special characters in string constants" border="1"><colgroup><col><col></colgroup><thead><tr><th align="center">Escape sequence</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">\"</td><td align="center">A double quote character</td></tr><tr><td align="center">\'</td><td align="center">A single quote character</td></tr><tr><td align="center">\n</td><td align="center">A new line character</td></tr><tr><td align="center">\t</td><td align="center">A tabulator character</td></tr><tr><td align="center">\b</td><td align="center">A backspace character</td></tr><tr><td align="center">\r</td><td align="center">A carriage return character</td></tr><tr><td align="center">\f</td><td align="center">A formfeed character</td></tr><tr><td align="center">\0..\7</td><td align="center">An ASCII character with its code</td></tr><tr><td align="center">\00..\77</td><td align="center">An ASCII character with its code</td></tr><tr><td align="center">\000..\377</td><td align="center">An ASCII character with its code</td></tr></tbody></table></div><p></p></div><br class="table-break"></td></tr></table></div><div class="highlights"><a name="def_StringConstant_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_AsmConstant.html" title="5.4.1.&nbsp;ASM Constant (Value)">ASM constant</a>

+</p></div><div class="highlights"><a name="def_StringConstant_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">arithmetic term</a>, <a href="def_Variable.html" title="5.7.2.&nbsp;Variable">variable</a>, 

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_MultiplicityConstant.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMConstants.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_IntConstant.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.4.4.&nbsp;Multiplicity Constant&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.4.6.&nbsp;Integer Constants</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_StringLiteral.html b/org.eclipse.viatra2.help/def_StringLiteral.html
new file mode 100644
index 0000000..39a1767
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_StringLiteral.html
@@ -0,0 +1,14 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>6.2.4.&nbsp;String Literal</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_NameTokens.html" title="6.2.&nbsp;Tokens for names and strings"><link rel="prev" href="def_UpperCaseLiteral.html" title="6.2.3.&nbsp;UpperCase Literal"><link rel="next" href="def_AnnotationLiteral.html" title="6.2.5.&nbsp;Annotation Literal"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">6.2.4.&nbsp;String Literal</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_UpperCaseLiteral.html">Prev</a>&nbsp;</td><th align="center" width="60%">6.2.&nbsp;Tokens for names and strings</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_AnnotationLiteral.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_StringLiteral"></a>6.2.4.&nbsp;String Literal</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_StringLiteral_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>String literal</strong></span>

+<a name="N13274" class="indexterm"></a>

+<a name="N1327B" class="indexterm"></a>

+is a token, which 

+represents a <a href="def_StringConstant.html" title="5.4.5.&nbsp;String Constant">string constant</a>.

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_StringLiteral_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+StringLiteral ::= <span class="token">"</span> SLBody <span class="token">"</span>

+SLBody ::= $empty

+         | SLBody NotDQ

+NotDQ -&gt; Any printable ASCII character other then <span class="token">"</span>

+</pre></td></tr></table></div><div class="highlights"><a name="def_StringLiteral_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_Token.html" title="6.1.1.&nbsp;Tokens">Token</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_UpperCaseLiteral.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_NameTokens.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_AnnotationLiteral.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">6.2.3.&nbsp;UpperCase Literal&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;6.2.5.&nbsp;Annotation Literal</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_Term.html b/org.eclipse.viatra2.help/def_Term.html
new file mode 100644
index 0000000..c12270b
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_Term.html
@@ -0,0 +1,36 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.1.1.&nbsp;ASM Term</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMTerms.html" title="5.1.&nbsp;ASM Terms: An Overview"><link rel="prev" href="sec_ASMTerms.html" title="5.1.&nbsp;ASM Terms: An Overview"><link rel="next" href="sec_ASMLogicalTerms.html" title="5.2.&nbsp;Logical Terms"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.1.1.&nbsp;ASM Term</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_ASMTerms.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.1.&nbsp;ASM Terms: An Overview</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_ASMLogicalTerms.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_Term"></a>5.1.1.&nbsp;ASM Term</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_Term_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+ASM terms are untyped expressions constructed from ASM constants, variables and 

+functions using traditional operators. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_Term_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><p>

+ASM expressions are constructed in the traditional way from constants, 

+variables and ASM functions. Currently, only constants have types (string, 

+boolean, integer, double or model element) that are evaluated at 

+compile-time, while the type of variables and ASM functions are determined 

+dynamically at run-time. 

+</p><p>

+Operators for different types are defined as follows: 

+</p><div class="itemizedlist"><ul type="disc"><li><p>String operators: <code class="computeroutput">+, ==, !=</code>

+</p></li><li><p>Integer and float operators: <code class="computeroutput">&lt;, &gt;, +, -,  ==, !=, *, /, %, &lt;=, &gt;=</code>

+</p></li><li><p>Boolean operators: <code class="computeroutput">||, &amp;&amp;, xor,  !,  ==, !=</code> 

+</p></li><li><p>Multiplicity operators: <code class="computeroutput">==, != </code>

+</p></li><li><p>Name operators <code class="computeroutput">==, != </code>

+</p></li></ul></div><p>

+An ASM expression, i.e. a <span class="strong"><strong>term</strong></span> is either a <a href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term">logical term</a> 

+or an <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">arithmetic term</a>. 

+</p></td></tr></table></div><div class="highlights"><a name="def_Term_Remark"></a><p><b>Remark.&nbsp;</b>

+If an expression is evaluated to a type where a used operator is not supported 

+(e.g. "str1" <code class="computeroutput"> || </code> "str2" is invalid), a run-time exception is 

+thrown. 

+</p></div><div class="highlights"><a name="def_Term_UsedBy"></a><p><b>Used By:&nbsp;</b>

+<a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">actual parameter</a>, 

+<a href="def_CheckCondition.html" title="2.1.8.&nbsp;Check Condition">check condition</a>, 

+<a href="def_AsmFunctionLocation.html" title="5.5.3.&nbsp;ASM Function Location">location</a>, 

+<a href="def_UpdateRule.html" title="4.2.5.&nbsp;Update Rule">update rule</a>, 

+<a href="def_PrintRule.html" title="4.2.6.&nbsp;Print Rule">print rule</a>, <a href="def_LogRule.html" title="4.2.7.&nbsp;Log Rule">log rule</a>, 

+<a href="def_LetRule.html" title="4.3.5.&nbsp;Let Rule">let rule</a>, 

+<a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>, <a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>, 

+<a href="def_IfRule.html" title="4.3.9.&nbsp;If Rule">if rule</a>, 

+<a href="def_CreateRule.html" title="4.4.2.&nbsp;Create Rule">create rule</a>, <a href="def_DeleteRule.html" title="4.4.3.&nbsp;Delete Rule">delete rule</a>, 

+<a href="def_CopyRule.html" title="4.4.4.&nbsp;Copy Rule">copy rule</a>, <a href="def_MoveRule.html" title="4.4.5.&nbsp;Move Rule">move rule</a>, 

+<a href="def_ElementUpdateRule.html" title="4.4.6.&nbsp;Element Update Rule">element update rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_ASMTerms.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMTerms.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_ASMLogicalTerms.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.1.&nbsp;ASM Terms: An Overview&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.2.&nbsp;Logical Terms</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_Token.html b/org.eclipse.viatra2.help/def_Token.html
new file mode 100644
index 0000000..9d7094c
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_Token.html
@@ -0,0 +1,18 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>6.1.1.&nbsp;Tokens</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_TokensOverview.html" title="6.1.&nbsp;VTCL tokens: An Overview"><link rel="prev" href="sec_TokensOverview.html" title="6.1.&nbsp;VTCL tokens: An Overview"><link rel="next" href="def_VTCLKeywords.html" title="6.1.2.&nbsp;Keywords"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">6.1.1.&nbsp;Tokens</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_TokensOverview.html">Prev</a>&nbsp;</td><th align="center" width="60%">6.1.&nbsp;VTCL tokens: An Overview</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_VTCLKeywords.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_Token"></a>6.1.1.&nbsp;Tokens</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_Token_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>token</strong></span> 

+<a name="N1313E" class="indexterm"></a>

+is the character stream returned accepted (and returned) by the VTCL Lexer of VIATRA. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_Token_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+Token ::= 

+  <a href="def_Identifier.html" title="6.2.1.&nbsp;Identifier">Identifier</a>

+| <a href="def_IntegerLiteral.html" title="6.3.1.&nbsp;Integer Literal">IntegerLiteral</a>        

+| <a href="def_IntegerLiteral.html" title="6.3.1.&nbsp;Integer Literal">DecimalIntegerLiteral</a>

+| <a href="def_FloatLiteral.html" title="6.3.2.&nbsp;Float Literal">FloatingPointLiteral</a>  

+| <a href="def_FloatLiteral.html" title="6.3.2.&nbsp;Float Literal">DoubleLiteral</a>  

+| <a href="def_NameLiteral.html" title="6.2.2.&nbsp;Name Literal">NameLiteral</a>      

+| <a href="def_AnnotationLiteral.html" title="6.2.5.&nbsp;Annotation Literal">AnnotationLiteral</a> 

+| <a href="def_StringLiteral.html" title="6.2.4.&nbsp;String Literal">StringLiteral</a>         

+| <a href="def_UpperCaseLiteral.html" title="6.2.3.&nbsp;UpperCase Literal">UpperCaseLiteral</a>  

+| <a href="def_VTCLKeywords.html" title="6.1.2.&nbsp;Keywords">Keywords</a>

+| Other elementary tokens mentioned in the grammar (e.g. <span class="token">;</span>, <span class="token">(</span>, <span class="token">)</span>, etc). 

+</pre></td></tr></table></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_TokensOverview.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_TokensOverview.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_VTCLKeywords.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">6.1.&nbsp;VTCL tokens: An Overview&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;6.1.2.&nbsp;Keywords</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_TryRule.html b/org.eclipse.viatra2.help/def_TryRule.html
new file mode 100644
index 0000000..a4f6058
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_TryRule.html
@@ -0,0 +1,25 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.3.10.&nbsp;Try Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMCompoundRules.html" title="4.3.&nbsp;Compound ASM Rules"><link rel="prev" href="def_IfRule.html" title="4.3.9.&nbsp;If Rule"><link rel="next" href="sec_ASMModelManipulationRules.html" title="4.4.&nbsp;Model Manipulation Rules"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.3.10.&nbsp;Try Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_IfRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.3.&nbsp;Compound ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_ASMModelManipulationRules.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_TryRule"></a>4.3.10.&nbsp;Try Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_TryRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>try rule</strong></span><a name="N11AB5" class="indexterm"></a> is used for catching the 

+failure of a rule (similarly to catching an exception in traditional programming languages). 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_TryRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+TryRuleAST ::= <span class="token">try</span> <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">AsmRuleAST</a>

+             | <span class="token">try</span> <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">AsmRuleAST</a> <span class="token">else</span> <a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">AsmRuleAST</a>

+</pre><p>

+The <span class="strong"><strong>try rule</strong></span> has a mandatory (body) and an optional (else) 

+<a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rule</a>. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_TryRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The <span class="strong"><strong>try rule</strong></span> attempts to execute its body rule (the first 

+<a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rule</a>), and executes the else part (the second 

+<a href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation">ASM rule</a>) if the execution of the body rule fails. It is 

+conceptually similar to exception handling in Java (but without <span class="emphasis"><em>finally</em></span>

+block). 

+</p></td></tr></table></div><div class="highlights"><a name="def_TryRule_Remark"></a><p><b>Remark.&nbsp;</b>

+A rule can fail in the following situations: 

+<div class="itemizedlist"><ul type="disc"><li><p>it is the <a href="def_FailRule.html" title="4.2.4.&nbsp;Fail Rule">fail rule</a> itself, 

+</p></li><li><p>it is the <a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a> and no matching is found, 

+</p></li><li><p>it is a <a href="def_CompoundRule.html" title="4.3.1.&nbsp;Compound Rule">compound rule</a> and an executed contained rule fails. 

+</p></li></ul></div></p></div><div class="highlights"><a name="def_TryRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_CompoundRule.html" title="4.3.1.&nbsp;Compound Rule">compound rule</a>

+</p></div><div class="highlights"><a name="def_TryRule_SeeAlso"></a><p><b>See Also:&nbsp;</b>

+<a href="def_FailRule.html" title="4.2.4.&nbsp;Fail Rule">fail rule</a>, <a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>, <a href="def_IterateRule.html" title="4.3.8.&nbsp;Iterate Rule">iterate   rule</a>, <a href="def_IfRule.html" title="4.3.9.&nbsp;If Rule">if rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_IfRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMCompoundRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_ASMModelManipulationRules.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.3.9.&nbsp;If Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.4.&nbsp;Model Manipulation Rules</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_UnaryArithmeticTerm.html b/org.eclipse.viatra2.help/def_UnaryArithmeticTerm.html
new file mode 100644
index 0000000..94d5bad
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_UnaryArithmeticTerm.html
@@ -0,0 +1,27 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.3.3.&nbsp;Unary Arithmetic Term</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMArithmeticTerms.html" title="5.3.&nbsp;Arithmetic Terms"><link rel="prev" href="def_MultArithmeticTerm.html" title="5.3.2.&nbsp;Multiplicative Arithmetic Term"><link rel="next" href="def_BaseArithmeticTerm.html" title="5.3.4.&nbsp;Base Arithmetic Term"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.3.3.&nbsp;Unary Arithmetic Term</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_MultArithmeticTerm.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.3.&nbsp;Arithmetic Terms</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_BaseArithmeticTerm.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_UnaryArithmeticTerm"></a>5.3.3.&nbsp;Unary Arithmetic Term</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_UnaryArithmeticTerm_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>unary arithmetic term</strong></span>

+<a name="N126B6" class="indexterm"></a>

+<a name="N126BB" class="indexterm"></a> is an ASM term 

+constituted from negation and minus operators. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_UnaryArithmeticTerm_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+UnaryArithmeticTermAST ::= BaseArithmeticTermAST  

+                        | <span class="token">-</span> BaseArithmeticTermAST  

+                        | <span class="token">!</span> BaseArithmeticTermAST   

+</pre><p>

+A <span class="strong"><strong>unary arithmetic term</strong></span> is composed of 

+<a href="def_BaseArithmeticTerm.html" title="5.3.4.&nbsp;Base Arithmetic Term">base arithmetic terms</a> with a 

+negation (<code class="computeroutput">!</code>) and the (unary) minus (<code class="computeroutput">-</code>) 

+operators. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_UnaryArithmeticTerm_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The evaluation of unary arithmetic terms are evaluated according to 

+<a href="def_UnaryArithmeticTerm.html#tab_NegOp" title="Table&nbsp;2.10.&nbsp;Negation (!) operator">Table&nbsp;2.10, &ldquo;Negation (<code class="computeroutput">!</code>) operator &rdquo;</a> and <a href="def_UnaryArithmeticTerm.html#tab_MinusOp" title="Table&nbsp;2.11.&nbsp;Minus (-) operator">Table&nbsp;2.11, &ldquo;Minus (<code class="computeroutput">-</code>) operator &rdquo;</a>, 

+which shows the type of the output with respect to the types of each operand. 

+</p><p>

+If any operation has an <code class="computeroutput">undef</code> value among its operands, the result 

+is always <code class="computeroutput">undef</code>, no matter what the type of the other operand is. 

+</p><div class="table"><a name="tab_NegOp"></a><p class="title"><b>Table&nbsp;2.10.&nbsp;Negation (<code class="computeroutput">!</code>) operator </b></p><div class="table-contents"><table summary="Negation (!) operator " border="1"><colgroup><col><col><col><col><col><col><col></colgroup><thead><tr><th align="center">Undef</th><th align="center">Boolean</th><th align="center">String</th><th align="center">Integer</th><th align="center">Double</th><th align="center">ModelElement</th><th align="center">Multiplicity</th></tr></thead><tbody><tr><td align="center">Undef</td><td align="center">Bool</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr></tbody></table></div><p></p></div><br class="table-break"><div class="table"><a name="tab_MinusOp"></a><p class="title"><b>Table&nbsp;2.11.&nbsp;Minus (<code class="computeroutput">-</code>) operator </b></p><div class="table-contents"><table summary="Minus (-) operator " border="1"><colgroup><col><col><col><col><col><col><col></colgroup><thead><tr><th align="center">Undef</th><th align="center">Boolean</th><th align="center">String</th><th align="center">Integer</th><th align="center">Double</th><th align="center">ModelElement</th><th align="center">Multiplicity</th></tr></thead><tbody><tr><td align="center">Undef</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td><td align="center">Int</td><td align="center">Double</td><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr></tbody></table></div><p></p></div><br class="table-break"></td></tr></table></div><div class="highlights"><a name="def_UnaryArithmeticTerm_Remark"></a><p><b>Remark.&nbsp;</b>

+There is no implicit type casting on the input of the operands; conversion 

+operators have to be used if casting is required. 

+</p></div><div class="highlights"><a name="def_UnaryArithmeticTerm_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_MultArithmeticTerm.html" title="5.3.2.&nbsp;Multiplicative Arithmetic Term">multiplicative arithmetic term</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_MultArithmeticTerm.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMArithmeticTerms.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_BaseArithmeticTerm.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.3.2.&nbsp;Multiplicative   Arithmetic Term&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.3.4.&nbsp;Base Arithmetic Term</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_UndefinedValue.html b/org.eclipse.viatra2.help/def_UndefinedValue.html
new file mode 100644
index 0000000..53905cb
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_UndefinedValue.html
@@ -0,0 +1,18 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.4.2.&nbsp;Undefined Value</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMConstants.html" title="5.4.&nbsp;Constants"><link rel="prev" href="def_AsmConstant.html" title="5.4.1.&nbsp;ASM Constant (Value)"><link rel="next" href="def_BooleanConstant.html" title="5.4.3.&nbsp;Boolean Constant"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.4.2.&nbsp;Undefined Value</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_AsmConstant.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.4.&nbsp;Constants</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_BooleanConstant.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_UndefinedValue"></a>5.4.2.&nbsp;Undefined Value</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_UndefinedValue_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+<span class="strong"><strong>Undefined value</strong></span> 

+<a name="N1285F" class="indexterm"></a>

+<a name="N12866" class="indexterm"></a>

+is a constant, which is used when the value of a term (e.g. a variable)

+is not known. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_UndefinedValue_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+UndefValueAST ::= undef

+</pre><p>

+The undefined value is identified by the <code class="computeroutput">undef</code> keyword. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_UndefinedValue_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The undefined value is assigned to a term, if no value has been assigned to it.  

+</p></td></tr></table></div><div class="highlights"><a name="def_UndefinedValue_Remark"></a><p><b>Remark.&nbsp;</b>

+Undefined values are frequently used in the <a href="def_LetRule.html" title="4.3.5.&nbsp;Let Rule">let rule</a>,

+when the initialization of a variable is irrelevant at a certain stage.

+</p></div><div class="highlights"><a name="def_UndefinedValue_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_AsmConstant.html" title="5.4.1.&nbsp;ASM Constant (Value)">ASM constant</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_AsmConstant.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMConstants.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_BooleanConstant.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.4.1.&nbsp;ASM Constant (Value)&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.4.3.&nbsp;Boolean Constant</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_UpdateRule.html b/org.eclipse.viatra2.help/def_UpdateRule.html
new file mode 100644
index 0000000..340b57a
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_UpdateRule.html
@@ -0,0 +1,25 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.2.5.&nbsp;Update Rule</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMSimpleRules.html" title="4.2.&nbsp;Simple ASM Rules"><link rel="prev" href="def_FailRule.html" title="4.2.4.&nbsp;Fail Rule"><link rel="next" href="def_PrintRule.html" title="4.2.6.&nbsp;Print Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.2.5.&nbsp;Update Rule</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_FailRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.2.&nbsp;Simple ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_PrintRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_UpdateRule"></a>4.2.5.&nbsp;Update Rule</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_UpdateRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+An <span class="strong"><strong>update rule</strong></span><a name="N11368" class="indexterm"></a>is used to modify the value of an already defined 

+variable or the value assigned to a specific location of an ASM function. 

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_UpdateRule_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+UpdateRuleAST ::= <span class="token">update</span> <a href="def_Variable.html" title="5.7.2.&nbsp;Variable">VariableRefAST</a> <span class="token">=</span> <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a> <span class="token">;</span>

+                | <span class="token">update</span> AsmFunctionUpdateLocationAST <span class="token">=</span> <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">ArithmeticTermAST</a> <span class="token">;</span>

+

+AsmFunctionUpdateLocationAST ::= ASMFunctionNameAST <a href="def_ActualParameter.html" title="5.8.3.&nbsp;Actual Parameters">ActualParameterDefAST</a>

+

+ASMFunctionNameAST ::= <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">ValueQualifiedNameAST</a>

+</pre></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_UpdateRule_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+The value of the <a href="def_Variable.html" title="5.7.2.&nbsp;Variable">variable</a> or the <a href="def_AsmFunctionLocation.html" title="5.5.3.&nbsp;ASM Function Location">ASM function location</a>referred by the <span class="strong"><strong>update rule</strong></span><a name="N113AB" class="indexterm"></a>is updated to the value 

+resulting from the evaluation of the ASM <a href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term">arithmetic term</a>. 

+</p></td></tr></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Constraints"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left"><a name="def_UpdateRule_Constraints"></a>Constraints</th></tr><tr><td valign="top" align="left"><p>

+The variable in the <span class="strong"><strong>update rule</strong></span> must be previously defined 

+in a <a href="def_LetRule.html" title="4.3.5.&nbsp;Let Rule">let rule</a>, <a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>, 

+<a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>, or in a <a href="def_FormalParameter.html" title="5.8.1.&nbsp;Formal Parameters">formal parameter list</a>.

+otherwise a compile-time error occurs. 

+</p><p>

+The same restriction applies for the <a href="def_AsmFunctionLocation.html" title="5.5.3.&nbsp;ASM Function Location">ASM function location</a>: the referred 

+ASM function must be already defined in one of the loaded machines otherwise a compile-time error occurs. 

+Initialization of the corresponding ASM function is always given at the defining transformation module. 

+</p></td></tr></table></div><div class="highlights"><a name="def_UpdateRule_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_SimpleRule.html" title="4.2.1.&nbsp;Simple Rule">simple rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_FailRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMSimpleRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_PrintRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.2.4.&nbsp;Fail Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.2.6.&nbsp;Print Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_UpperCaseLiteral.html b/org.eclipse.viatra2.help/def_UpperCaseLiteral.html
new file mode 100644
index 0000000..320d7a5
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_UpperCaseLiteral.html
@@ -0,0 +1,26 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>6.2.3.&nbsp;UpperCase Literal</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_NameTokens.html" title="6.2.&nbsp;Tokens for names and strings"><link rel="prev" href="def_NameLiteral.html" title="6.2.2.&nbsp;Name Literal"><link rel="next" href="def_StringLiteral.html" title="6.2.4.&nbsp;String Literal"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">6.2.3.&nbsp;UpperCase Literal</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_NameLiteral.html">Prev</a>&nbsp;</td><th align="center" width="60%">6.2.&nbsp;Tokens for names and strings</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_StringLiteral.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_UpperCaseLiteral"></a>6.2.3.&nbsp;UpperCase Literal</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_UpperCaseLiteral_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+An <span class="strong"><strong>upper case literal</strong></span> 

+<a name="N1323E" class="indexterm"></a>

+<a name="N13245" class="indexterm"></a>

+is an alphanumeric token starting with an upper case letter.

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_UpperCaseLiteral_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+UpperCaseLiteral -&gt; UpperCaseLetter

+                  | UpperCaseLetter Alphanum

+

+Alphanum -&gt;  Letter | Digit

+           | Alphanum Letter 

+           | Alphanum Digit 

+

+Letter -&gt; LowerCaseLetter

+        | UpperCaseLetter

+        | _

+        | '$'

+        | AfterASCII

+

+LowerCaseLetter -&gt; <span class="token">a..z</span>

+UpperCaseLetter -&gt; <span class="token">A..Z</span>

+Digit -&gt; 0..9	

+AfterASCII   -&gt; <span class="token">\u0080..\ufffe</span>

+</pre></td></tr></table></div><div class="highlights"><a name="def_UpperCaseLiteral_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_Token.html" title="6.1.1.&nbsp;Tokens">Token</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_NameLiteral.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_NameTokens.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_StringLiteral.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">6.2.2.&nbsp;Name Literal&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;6.2.4.&nbsp;String Literal</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_VTCLKeywords.html b/org.eclipse.viatra2.help/def_VTCLKeywords.html
new file mode 100644
index 0000000..43b4fda
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_VTCLKeywords.html
@@ -0,0 +1,35 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>6.1.2.&nbsp;Keywords</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_TokensOverview.html" title="6.1.&nbsp;VTCL tokens: An Overview"><link rel="prev" href="def_Token.html" title="6.1.1.&nbsp;Tokens"><link rel="next" href="sec_NameTokens.html" title="6.2.&nbsp;Tokens for names and strings"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">6.1.2.&nbsp;Keywords</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_Token.html">Prev</a>&nbsp;</td><th align="center" width="60%">6.1.&nbsp;VTCL tokens: An Overview</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_NameTokens.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_VTCLKeywords"></a>6.1.2.&nbsp;Keywords</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_VTCLKeywords_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+The A <span class="strong"><strong>keywords</strong></span> of the VTCL language are listed below.

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_VTCLKeywords_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+    namespace import machine pattern or neg find check supertypeOf subtypeOf

+    typeOf instanceOf gtrule precondition postcondition action apply xor

+    asmfunction rule skip fail call update print println log debug info warning

+    error fatal seq random let in below choose forall with do iterate if try else

+    new delete delete_content move_content copy copy_boundary_edges

+    skip_boundary_edges move rename setValue setFrom setTo setMultiplicity

+    setAggregation setInverse undef true false one_to_one one_to_many

+    many_to_one many_to_many ref fqn name value source target multiplicity

+    aggregation inverse toBoolean toString toInteger toDouble toMultiplicity out inout

+    parallel

+</pre></td></tr></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Constraints"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left"><a name="def_VTCLKeywords_Constraints"></a>Constraints</th></tr><tr><td valign="top" align="left"><p>

+  	Most of these keywords can be used as <a href="def_Identifier.html" title="6.2.1.&nbsp;Identifier">identifiers</a> in <a href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name">model element names</a>.

+  	Keywords disallowed as identifiers are the following:

+  	<code class="computeroutput">check</code>, <code class="computeroutput">supertypeOf</code>, <code class="computeroutput">subtypeOf</code>,

+  	<code class="computeroutput">typeOf</code>, <code class="computeroutput">instanceOf</code>,

+  	</p><pre class="programlisting">

+	KeywordAsIdentifier ::= 

+    namespace | import | machine | pattern | neg | find |  

+    gtrule | precondition | postcondition | action | apply | xor |

+    asmfunction | rule | skip | fail | call | update | print | println | log | debug | info | warning |

+    error | fatal | seq | random | let | in | below | choose | forall | with | do | iterate | if | try | else |

+    new | delete | delete_content | move_content | copy | copy_boundary_edges |

+    skip_boundary_edges | move | rename | setValue | setFrom | setTo | setMultiplicity |

+    setAggregation | setInverse | undef | true | false | one_to_one | one_to_many |

+    many_to_one | many_to_many | ref | fqn | name | value | source | target | multiplicity | 

+    aggregation | inverse | toBoolean | toString | toInteger | toDouble | toMultiplicity | out | inout

+-- The following keywords conflict with entity definition, so they are disallowed without ''s 

+--    check | supertypeOf | subtypeOf |  typeOf | instanceOf | 

+

+</pre></td></tr></table></div><div class="highlights"><a name="def_Keywords_DefinedIn"></a><p><b>Defined In:&nbsp;</b>

+<a href="def_Token.html" title="6.1.1.&nbsp;Tokens">Token</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_Token.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_TokensOverview.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_NameTokens.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">6.1.1.&nbsp;Tokens&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;6.2.&nbsp;Tokens for names and strings</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_Variable.html b/org.eclipse.viatra2.help/def_Variable.html
new file mode 100644
index 0000000..f5c5e3c
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_Variable.html
@@ -0,0 +1,60 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.7.2.&nbsp;Variable</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_NamingVariables.html" title="5.7.&nbsp;Naming and Variables"><link rel="prev" href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name"><link rel="next" href="sec_Parameters.html" title="5.8.&nbsp;Parameters and Variable Lists"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.7.2.&nbsp;Variable</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_ModelElementName.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.7.&nbsp;Naming and Variables</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_Parameters.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_Variable"></a>5.7.2.&nbsp;Variable</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_Variable_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+A <span class="strong"><strong>ASM variable</strong></span>

+<a name="N12EA2" class="indexterm"></a> can be 

+defined and used in ASM programs. It is a run-time placeholder for an <a href="def_Term.html" title="5.1.1.&nbsp;ASM Term">ASM term</a>.

+A variable always have to be defined prior to its first use.

+</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_Variable_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+VariableRefAST ::= <a href="def_UpperCaseLiteral.html" title="6.2.3.&nbsp;UpperCase Literal">UpperCaseLiteral</a>	

+VariableDefAST ::= <a href="def_UpperCaseLiteral.html" title="6.2.3.&nbsp;UpperCase Literal">UpperCaseLiteral</a>	

+</pre><p>

+A <span class="strong"><strong>variable</strong></span> is an <a href="def_UpperCaseLiteral.html" title="6.2.3.&nbsp;UpperCase Literal">upper case literal</a>, i.e.

+it begins with an uppercase letter that can be 

+followed by an arbitrary number of alphanumeric characters. 

+</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_Variable_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+A variable always has to defined prior to its first use. A new ASM variable can be

+defined by a <a href="def_LetRule.html" title="4.3.5.&nbsp;Let Rule">let rule</a>, 

+a <a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>, 

+a <a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>,  or as a 

+<a href="def_FormalParameter.html" title="5.8.1.&nbsp;Formal Parameters">formal parameter</a> of an 

+<a href="def_AsmRuleDef.html" title="4.1.1.&nbsp;ASM Rule Definition">ASM rule</a>.

+</p><p>

+ASM variables are untyped at compile-time, i.e. we cannot assign types at 

+compile-time. Thus the type of a variable is induced at run-time, and this 

+run-time type may change during execution, i.e. the same variable may 

+store once an integer value and then a string, for instance, but, of course, 

+it is not a good practice for writing transformations. 

+</p><p>

+Variables can contain constants of the following types: <span class="emphasis"><em>string</em></span>, 

+<span class="emphasis"><em>integer</em></span>, <span class="emphasis"><em>float</em></span>, <span class="emphasis"><em>boolean</em></span>, and <span class="emphasis"><em>model elements</em></span>. 

+</p><p>

+The <span class="emphasis"><em>scope of an ASM variable</em></span> can be defined according to the 

+place where the variable was defined first, thus it can be 

+<span class="emphasis"><em>rule-scope</em></span>or <span class="emphasis"><em>block-scope</em></span>. ASM rules that define 

+variables with block-scope are the <a href="def_LetRule.html" title="4.3.5.&nbsp;Let Rule">let rule</a>, the 

+<a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>and the <a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>. 

+</p><p>

+Each variable is visible and accessible anywhere inside its scope including 

+sub-blocks at arbitrary depth, but it becomes undefined outside its scope. 

+As a result, ASM variables that are undefined within a certain scope cause 

+compilation errors. 

+</p><p>

+A variable can be defined only by the <a href="def_LetRule.html" title="4.3.5.&nbsp;Let Rule">let rule</a>, 

+<a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>and <a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>or in a formal 

+parameter list ( <a href="def_FormalParameter.html" title="5.8.1.&nbsp;Formal Parameters">formal params</a>, <a href="def_DirectedFormalParameter.html" title="5.8.2.&nbsp;Directed Formal Parameters">directed formal   params</a>). 

+</p></td></tr></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Constraints"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left"><a name="def_Variable_Constraints"></a>Constraints</th></tr><tr><td valign="top" align="left"><p>

+ASM variables cannot be redefined within an internal scope. For instance,

+the following piece of VTCL code causes a compile error due to the

+invalid redefinition of variable <code class="computeroutput">X</code>.

+</p><pre class="programlisting">

+let X = 3 in

+  choose X with find myPattern(X) do skip;

+</pre></td></tr></table></div><div class="highlights"><a name="def_Variable_UsedBy"></a><p><b>Used By:&nbsp;</b>

+<a href="def_FormalParameter.html" title="5.8.1.&nbsp;Formal Parameters">formal parameter</a>, 

+<a href="def_DirectedFormalParameter.html" title="5.8.2.&nbsp;Directed Formal Parameters">directed formal parameter</a>, 

+<a href="def_ConstrainedVariableList.html" title="5.8.4.&nbsp;Constrained Variable List">constrained variable list</a>

+

+<a href="def_UpdateRule.html" title="4.2.5.&nbsp;Update Rule">update rule</a>, 

+<a href="def_LetRule.html" title="4.3.5.&nbsp;Let Rule">let rule</a>, 

+<a href="def_CreateRule.html" title="4.4.2.&nbsp;Create Rule">create rule</a>, 

+<a href="def_CopyRule.html" title="4.4.4.&nbsp;Copy Rule">copy rule</a>

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_ModelElementName.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_NamingVariables.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_Parameters.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.7.1.&nbsp;Model Element Name&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.8.&nbsp;Parameters and Variable Lists</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/def_VtclFile.html b/org.eclipse.viatra2.help/def_VtclFile.html
new file mode 100644
index 0000000..78ae87e
--- /dev/null
+++ b/org.eclipse.viatra2.help/def_VtclFile.html
@@ -0,0 +1,36 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>1.1.1.&nbsp;VTCL file</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_VtclFile.html" title="1.1.&nbsp;VTCL Files"><link rel="prev" href="sec_VtclFile.html" title="1.1.&nbsp;VTCL Files"><link rel="next" href="def_NamespaceDefinition.html" title="1.1.2.&nbsp;Namespace Definition"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">1.1.1.&nbsp;VTCL file</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_VtclFile.html">Prev</a>&nbsp;</td><th align="center" width="60%">1.1.&nbsp;VTCL Files</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_NamespaceDefinition.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="def_VtclFile"></a>1.1.1.&nbsp;VTCL file</h4></div></div></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_VtclFile_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+			A VTCL file contains the definition of one GTASM machine 

+			(i.e. transformation) in the default or in the explicitly defined

+			namespace. Other namespaces can be imported for direct

+			accessibility of the elements defined there.

+		</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important: Syntax"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left"><a name="def_VtclFile_Syntax"></a>Syntax</th></tr><tr><td valign="top" align="left"><pre class="programlisting">

+VTCLFile ::= <a href="def_NamespaceDefinition.html" title="1.1.2.&nbsp;Namespace Definition">NamespaceDefAST</a> <a href="def_NamespaceImport.html" title="1.1.3.&nbsp;Namespace Import">NamespaceImportsAST</a> <a href="def_Machine.html" title="1.2.1.&nbsp;GTASM Machine Definition">GTASMDefAST</a>

+</pre><p>

+

+			A <span class="strong"><strong>VTCL file</strong></span><a name="N100A8" class="indexterm"></a>

+			contains an optional 

+			(<a href="def_NamespaceDefinition.html" title="1.1.2.&nbsp;Namespace Definition">namespace definition</a>), zero or more

+			<a href="def_NamespaceImport.html" title="1.1.3.&nbsp;Namespace Import">namespace import</a> and (at least) one 

+			(<a href="def_Machine.html" title="1.2.1.&nbsp;GTASM Machine Definition">transformation definition</a>).

+		</p><p>

+			In addition, a VTCL file can contain comments. The part of

+			the VTCL file is handled as comment that is 

+			<div class="itemizedlist"><ul type="disc"><li><p>

+			after two slashes ("//") in a single line,

+			</p></li><li><p>

+			between the marks "/*" and "*/" even through multiple lines.

+			</p></li></ul></div>

+		</p></td></tr></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Semantics"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left"><a name="def_VtclFile_Semantics"></a>Semantics</th></tr><tr><td valign="top" align="left"><p>

+	If a namespace is defined explicitly then all GTASMs defined in the file are

+	interpreted as parts of this namespace, otherwise GTASMs are part of the

+	default namespace. The default namespace for a <span class="strong"><strong>VTCL file</strong></span> 

+	is the <span class="emphasis"><em>root namespace</em></span>.

+		</p><p>

+	Arbitrary number of other namespaces can also be imported; in this case all

+	model elements defined in or below these namespaces can be referenced

+	inside of the machine(s) defined in the file with their local names or

+	qualified names local to the given namespace.

+		</p></td></tr></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution: Constraints"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Caution]" src="images/caution.png"></td><th align="left">Constraints</th></tr><tr><td valign="top" align="left"><p>

+	It is strongly recommended to define a single machine within a VTCL file, which

+	might be enforced by future VTCL versions.

+	</p></td></tr></table></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_VtclFile.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_VtclFile.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_NamespaceDefinition.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">1.1.&nbsp;VTCL Files&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;1.1.2.&nbsp;Namespace Definition</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/images/NamespaceDef.png b/org.eclipse.viatra2.help/images/NamespaceDef.png
new file mode 100644
index 0000000..689b8d4
--- /dev/null
+++ b/org.eclipse.viatra2.help/images/NamespaceDef.png
Binary files differ
diff --git a/org.eclipse.viatra2.help/images/VtclFile.png b/org.eclipse.viatra2.help/images/VtclFile.png
new file mode 100644
index 0000000..9606b46
--- /dev/null
+++ b/org.eclipse.viatra2.help/images/VtclFile.png
Binary files differ
diff --git a/org.eclipse.viatra2.help/images/logo_en_kicsi.jpg b/org.eclipse.viatra2.help/images/logo_en_kicsi.jpg
new file mode 100644
index 0000000..4262cc3
--- /dev/null
+++ b/org.eclipse.viatra2.help/images/logo_en_kicsi.jpg
Binary files differ
diff --git a/org.eclipse.viatra2.help/images/others/NamespaceStruct.png b/org.eclipse.viatra2.help/images/others/NamespaceStruct.png
new file mode 100644
index 0000000..64bc410
--- /dev/null
+++ b/org.eclipse.viatra2.help/images/others/NamespaceStruct.png
Binary files differ
diff --git a/org.eclipse.viatra2.help/images/others/NamespaceStructExpl.png b/org.eclipse.viatra2.help/images/others/NamespaceStructExpl.png
new file mode 100644
index 0000000..fd27742
--- /dev/null
+++ b/org.eclipse.viatra2.help/images/others/NamespaceStructExpl.png
Binary files differ
diff --git a/org.eclipse.viatra2.help/images/others/ParamRelations.png b/org.eclipse.viatra2.help/images/others/ParamRelations.png
new file mode 100644
index 0000000..a591ff4
--- /dev/null
+++ b/org.eclipse.viatra2.help/images/others/ParamRelations.png
Binary files differ
diff --git a/org.eclipse.viatra2.help/index.html b/org.eclipse.viatra2.help/index.html
new file mode 100644
index 0000000..9aa8e1b
--- /dev/null
+++ b/org.eclipse.viatra2.help/index.html
@@ -0,0 +1,250 @@
+<html>

+<head>

+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

+<title>The VIATRA2 Model Transformation Framework</title>

+<link href="style.css" rel="stylesheet" type="text/css">

+<meta content="DocBook XSL Stylesheets V1.72.0" name="generator">

+<link rel="start" href="index.html"

+	title="The VIATRA2 Model Transformation Framework">

+<link rel="next" href="sec_UsersGuide.html"

+	title="Chapter&nbsp;1.&nbsp;VIATRA Users Guide">

+</head>

+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"

+	alink="#0000FF">

+<div class="navheader">

+<table summary="Navigation header" width="100%">

+	<tr>

+		<th align="center" colspan="3">The VIATRA2 Model Transformation

+		Framework</th>

+	</tr>

+	<tr>

+		<td align="left" width="20%">&nbsp;</td>

+		<th align="center" width="60%">&nbsp;</th>

+		<td align="right" width="20%">&nbsp;<a accesskey="n"

+			href="sec_UsersGuide.html">Next</a></td>

+	</tr>

+</table>

+<hr>

+</div>

+<div class="book" lang="en">

+<div class="titlepage">

+<div>

+<div>

+<h1 class="title"><a name="N10001"></a>The VIATRA2 Model

+Transformation Framework</h1>

+</div>

+<div>

+<h2 class="subtitle">Users Guide and Transformation Language

+Specification</h2>

+</div>

+<div>

+<p class="releaseinfo">Release 3.0</p>

+</div>

+<div>

+<p class="copyright">Copyright &copy; 2008 OptXware Ltd.</p>

+</div>

+<div>

+<div class="legalnotice"><a name="N10024"></a>

+<p class="legalnotice-title"><b>Copyright notice</b></p>

+<p>All rights reserved. This program and the accompanying materials

+are made available under the terms of the Eclipse Public License v1.0

+which accompanies this distribution, and is available at <a href="">http://www.eclipse.org/legal/epl-v10.html</a>

+

+</p>

+</div>

+</div>

+</div>

+<hr>

+</div>

+<div class="toc">

+<p><b>Table of Contents</b></p>

+<dl>

+	<dt><span class="chapter"><a href="sec_VTCLSpec.html">2.

+	Viatra Textual Command Language (VTCL) Specification</a></span></dt>

+	<dd>

+	<dl>

+		<dt><span class="sect1"><a

+			href="sec_MainVtclConcepts.html">1. VTCL Files and Machines

+		(Transformations)</a></span></dt>

+		<dd>

+		<dl>

+			<dt><span class="sect2"><a href="sec_VtclFile.html">1.1.

+			VTCL Files</a></span></dt>

+			<dt><span class="sect2"><a

+				href="sec_MachineDefinition.html">1.2. Machine Definition</a></span></dt>

+		</dl>

+		</dd>

+		<dt><span class="sect1"><a href="sec_GraphPatterns.html">2.

+		Graph Patterns</a></span></dt>

+		<dd>

+		<dl>

+			<dt><span class="sect2"><a

+				href="sec_PatternDefinition.html">2.1. Pattern Definition</a></span></dt>

+			<dt><span class="sect2"><a

+				href="sec_LocalPatternlElementDescription.html">2.2. Local

+			Pattern Body Elements</a></span></dt>

+		</dl>

+		</dd>

+		<dt><span class="sect1"><a

+			href="sec_GraphTransformations.html">3. Graph Transformation

+		Rules</a></span></dt>

+		<dd>

+		<dl>

+			<dt><span class="sect2"><a href="sec_DefGTRule.html">3.1.

+			Definition of Graph Transformation Rules</a></span></dt>

+			<dt><span class="sect2"><a href="sec_GTParamPass.html">3.2.

+			Parameter passing at Graph Transformation Rules</a></span></dt>

+			<dt><span class="sect2"><a

+				href="sec_GTRuleBehaviour.html">3.3. Behavioural Specification

+			of Graph Transformation Rules</a></span></dt>

+			<dt><span class="sect2"><a href="sec_InvokeGTRule.html">3.4.

+			Invocation of Graph Transformation Rules</a></span></dt>

+		</dl>

+		</dd>

+		<dt><span class="sect1"><a href="sec_ASMRules.html">4.

+		ASM Rules</a></span></dt>

+		<dd>

+		<dl>

+			<dt><span class="sect2"><a href="sec_DefASMRule.html">4.1.

+			ASM Rule Definition and Invocation</a></span></dt>

+			<dt><span class="sect2"><a href="sec_ASMSimpleRules.html">4.2.

+			Simple ASM Rules</a></span></dt>

+			<dt><span class="sect2"><a

+				href="sec_ASMCompoundRules.html">4.3. Compound ASM Rules</a></span></dt>

+			<dt><span class="sect2"><a

+				href="sec_ASMModelManipulationRules.html">4.4. Model

+			Manipulation Rules</a></span></dt>

+		</dl>

+		</dd>

+		<dt><span class="sect1"><a

+			href="sec_ASMTermsFormulas.html">5. ASM Terms and ASM Functions</a></span></dt>

+		<dd>

+		<dl>

+			<dt><span class="sect2"><a href="sec_ASMTerms.html">5.1.

+			ASM Terms: An Overview</a></span></dt>

+			<dt><span class="sect2"><a

+				href="sec_ASMLogicalTerms.html">5.2. Logical Terms</a></span></dt>

+			<dt><span class="sect2"><a

+				href="sec_ASMArithmeticTerms.html">5.3. Arithmetic Terms</a></span></dt>

+			<dt><span class="sect2"><a href="sec_ASMConstants.html">5.4.

+			Constants</a></span></dt>

+			<dt><span class="sect2"><a href="sec_ASMFunctions.html">5.5.

+			ASM Functions</a></span></dt>

+			<dt><span class="sect2"><a

+				href="sec_PredefinedFunctions.html">5.6. Predefined Functions</a></span></dt>

+			<dt><span class="sect2"><a

+				href="sec_NamingVariables.html">5.7. Naming and Variables</a></span></dt>

+			<dt><span class="sect2"><a href="sec_Parameters.html">5.8.

+			Parameters and Variable Lists</a></span></dt>

+		</dl>

+		</dd>

+		<dt><span class="sect1"><a href="sec_VTCLTokens.html">6.

+		Tokens in the VTCL Language</a></span></dt>

+		<dd>

+		<dl>

+			<dt><span class="sect2"><a href="sec_TokensOverview.html">6.1.

+			VTCL tokens: An Overview</a></span></dt>

+			<dt><span class="sect2"><a href="sec_NameTokens.html">6.2.

+			Tokens for names and strings</a></span></dt>

+			<dt><span class="sect2"><a href="sec_NumberTokens.html">6.3.

+			Tokens for numbers</a></span></dt>

+		</dl>

+		</dd>

+	</dl>

+	</dd>

+	<dt><span class="index"><a href="sec_index.html">Index</a></span></dt>

+</dl>

+</div>

+<div class="list-of-figures">

+<p><b>List of Figures</b></p>

+<dl>

+	<dt>2.1. <a

+		href="def_NamespaceDefinition.html#fig:NamespaceStruct">Recommended

+	structure of namespaces</a></dt>

+	<dt>2.2. <a href="sec_GTParamPass.html#fig:VTCL_ParamRelations">Relations

+	of parameters of the parts of a GT rule</a></dt>

+</dl>

+</div>

+<div class="list-of-tables">

+<p><b>List of Tables</b></p>

+<dl>

+	<dt>2.1. <a

+		href="sec_ConflictHandling.html#tab:VTCL_EntManipBehav">Behavior

+	table for entity manipulation</a></dt>

+	<dt>2.2. <a

+		href="sec_ConflictHandling.html#tab:VTCL_RelManipBehav">Behavior

+	table for relation manipulation (both the source A and target B are

+	entities)</a></dt>

+	<dt>2.3. <a href="def_LogicalTerm.html#tab_LogicalOp">Logical

+	operators (AND, OR, XOR)</a></dt>

+	<dt>2.4. <a href="def_BaseLogicalTerm.html#tab_EqualNotEqual">Equal

+	(<code class="computeroutput">==</code>) and Not Equal (<code

+		class="computeroutput">!=</code>) operators </a></dt>

+	<dt>2.5. <a href="def_BaseLogicalTerm.html#tab_Inequality">Other

+	relational inequality operators (<code class="computeroutput">&lt;,

+	&gt;, &lt;=, &gt;=</code>) and Not Equal (<code class="computeroutput">!=</code>)

+	operators </a></dt>

+	<dt>2.6. <a href="def_ArithmeticTerm.html#tab_AddOp">Add (<code

+		class="computeroutput">+</code>) operator </a></dt>

+	<dt>2.7. <a href="def_ArithmeticTerm.html#tab_SubtractOp">Subtract

+	(<code class="computeroutput">-</code>) operator </a></dt>

+	<dt>2.8. <a href="def_MultArithmeticTerm.html#tab_MultDivOp">Multiply

+	(<code class="computeroutput">*</code>) and Divide (<code

+		class="computeroutput">/</code>) operators </a></dt>

+	<dt>2.9. <a href="def_MultArithmeticTerm.html#tab_RemainderOp">Remainder

+	(<code class="computeroutput">%</code>) operator </a></dt>

+	<dt>2.10. <a href="def_UnaryArithmeticTerm.html#tab_NegOp">Negation

+	(<code class="computeroutput">!</code>) operator </a></dt>

+	<dt>2.11. <a href="def_UnaryArithmeticTerm.html#tab_MinusOp">Minus

+	(<code class="computeroutput">-</code>) operator </a></dt>

+	<dt>2.12. <a href="def_StringConstant.html#tab_EscapeSequences">Escape

+	sequences and special characters in string constants</a></dt>

+</dl>

+</div>

+<div class="list-of-examples">

+<p><b>List of Examples</b></p>

+<dl>

+	<dt>2.1. <a

+		href="def_NamespaceImport.html#def_NamespaceImport_Example">Sample

+	namespace import</a></dt>

+	<dt>2.2. <a href="def_Machine.html#def_Machine_Example">Hello

+	World Machine</a></dt>

+	<dt>2.3. <a href="def_PatternBody.html#def_PatternBody_Example">Overview

+	of pattern body contents</a></dt>

+	<dt>2.4. <a href="def_ChooseRule.html#def_ChooseRule_Example1">Different

+	invocations of a choose rule</a></dt>

+	<dt>2.5. <a href="def_ChooseRule.html#def_ChooseRule_Example2">Quantification

+	of variables passed to a choose rule</a></dt>

+	<dt>2.6. <a href="def_ForallRule.html#def_ForallRule_Example1">Different

+	invocations of a forall rule</a></dt>

+	<dt>2.7. <a href="def_ForallRule.html#def_ForallRule_Example2">Counting

+	with a forall rule</a></dt>

+	<dt>2.8. <a href="def_ForallRule.html#def_ForallRule_Example3">Quantification

+	of unbound variables passed to a forall rule</a></dt>

+	<dt>2.9. <a href="def_ForallRule.html#def_ForallRule_Example4">Forall

+	rule used in the context of ASM functions</a></dt>

+	<dt>2.10. <a

+		href="def_FloatConstant.html#def_FloatConstant_Example">Floating

+	point constants</a></dt>

+</dl>

+</div>

+</div>

+<div class="navfooter">

+<hr>

+<table summary="Navigation footer" width="100%">

+	<tr>

+		<td align="left" width="40%">&nbsp;</td>

+		<td align="center" width="20%">&nbsp;</td>

+		<td align="right" width="40%">&nbsp;<a accesskey="n"

+			href="sec_UsersGuide.html">Next</a></td>

+	</tr>

+	<tr>

+		<td valign="top" align="left" width="40%">&nbsp;</td>

+		<td align="center" width="20%">&nbsp;</td>

+		<td valign="top" align="right" width="40%">&nbsp;Chapter&nbsp;1.&nbsp;VIATRA

+		Users Guide</td>

+	</tr>

+</table>

+</div>

+</body>

+</html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/plugin.xml b/org.eclipse.viatra2.help/plugin.xml
new file mode 100644
index 0000000..edc17c3
--- /dev/null
+++ b/org.eclipse.viatra2.help/plugin.xml
@@ -0,0 +1 @@
+<plugin><extension point="org.eclipse.help.toc"><toc primary="true" file="toc.xml"></toc></extension></plugin>
diff --git a/org.eclipse.viatra2.help/sec_ASMArithmeticTerms.html b/org.eclipse.viatra2.help/sec_ASMArithmeticTerms.html
new file mode 100644
index 0000000..ff70ba8
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_ASMArithmeticTerms.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.3.&nbsp;Arithmetic Terms</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMTermsFormulas.html" title="5.&nbsp;ASM Terms and ASM Functions"><link rel="prev" href="def_BaseLogicalTerm.html" title="5.2.3.&nbsp;Base Logical Term"><link rel="next" href="def_ArithmeticTerm.html" title="5.3.1.&nbsp;Arithmetic Term"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.3.&nbsp;Arithmetic Terms</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_BaseLogicalTerm.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.&nbsp;ASM Terms and ASM Functions</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_ArithmeticTerm.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_ASMArithmeticTerms"></a>5.3.&nbsp;Arithmetic Terms</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_ArithmeticTerm.html">5.3.1. Arithmetic Term</a></span></dt><dt><span class="sect3"><a href="def_MultArithmeticTerm.html">5.3.2. Multiplicative   Arithmetic Term</a></span></dt><dt><span class="sect3"><a href="def_UnaryArithmeticTerm.html">5.3.3. Unary Arithmetic Term</a></span></dt><dt><span class="sect3"><a href="def_BaseArithmeticTerm.html">5.3.4. Base Arithmetic Term</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_BaseLogicalTerm.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMTermsFormulas.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_ArithmeticTerm.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.2.3.&nbsp;Base Logical Term&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.3.1.&nbsp;Arithmetic Term</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_ASMCompoundRules.html b/org.eclipse.viatra2.help/sec_ASMCompoundRules.html
new file mode 100644
index 0000000..2be26e6
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_ASMCompoundRules.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.3.&nbsp;Compound ASM Rules</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMRules.html" title="4.&nbsp;ASM Rules"><link rel="prev" href="def_LogRule.html" title="4.2.7.&nbsp;Log Rule"><link rel="next" href="def_CompoundRule.html" title="4.3.1.&nbsp;Compound Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.3.&nbsp;Compound ASM Rules</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_LogRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.&nbsp;ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_CompoundRule.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_ASMCompoundRules"></a>4.3.&nbsp;Compound ASM Rules</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_CompoundRule.html">4.3.1. Compound Rule</a></span></dt><dt><span class="sect3"><a href="def_SequentialRule.html">4.3.2. Sequential Rule</a></span></dt><dt><span class="sect3"><a href="def_ParallelRule.html">4.3.3. Parallel Rule</a></span></dt><dt><span class="sect3"><a href="def_RandomRule.html">4.3.4. Random Rule</a></span></dt><dt><span class="sect3"><a href="def_LetRule.html">4.3.5. Let Rule</a></span></dt><dt><span class="sect3"><a href="def_ChooseRule.html">4.3.6. Choose Rule</a></span></dt><dt><span class="sect3"><a href="def_ForallRule.html">4.3.7. Forall Rule</a></span></dt><dt><span class="sect3"><a href="def_IterateRule.html">4.3.8. Iterate Rule</a></span></dt><dt><span class="sect3"><a href="def_IfRule.html">4.3.9. If Rule</a></span></dt><dt><span class="sect3"><a href="def_TryRule.html">4.3.10. Try Rule</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_LogRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_CompoundRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.2.7.&nbsp;Log Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.3.1.&nbsp;Compound Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_ASMConstants.html b/org.eclipse.viatra2.help/sec_ASMConstants.html
new file mode 100644
index 0000000..5e5d0f1
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_ASMConstants.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.4.&nbsp;Constants</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMTermsFormulas.html" title="5.&nbsp;ASM Terms and ASM Functions"><link rel="prev" href="def_BaseArithmeticTerm.html" title="5.3.4.&nbsp;Base Arithmetic Term"><link rel="next" href="def_AsmConstant.html" title="5.4.1.&nbsp;ASM Constant (Value)"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.4.&nbsp;Constants</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_BaseArithmeticTerm.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.&nbsp;ASM Terms and ASM Functions</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_AsmConstant.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_ASMConstants"></a>5.4.&nbsp;Constants</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_AsmConstant.html">5.4.1. ASM Constant (Value)</a></span></dt><dt><span class="sect3"><a href="def_UndefinedValue.html">5.4.2. Undefined Value</a></span></dt><dt><span class="sect3"><a href="def_BooleanConstant.html">5.4.3. Boolean Constant</a></span></dt><dt><span class="sect3"><a href="def_MultiplicityConstant.html">5.4.4. Multiplicity Constant</a></span></dt><dt><span class="sect3"><a href="def_StringConstant.html">5.4.5. String Constant</a></span></dt><dt><span class="sect3"><a href="def_IntConstant.html">5.4.6. Integer Constants</a></span></dt><dt><span class="sect3"><a href="def_FloatConstant.html">5.4.7. Float Constant</a></span></dt><dt><span class="sect3"><a href="def_ModelElementConstant.html">5.4.8. Model Element Constant</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_BaseArithmeticTerm.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMTermsFormulas.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_AsmConstant.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.3.4.&nbsp;Base Arithmetic Term&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.4.1.&nbsp;ASM Constant (Value)</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_ASMFunctions.html b/org.eclipse.viatra2.help/sec_ASMFunctions.html
new file mode 100644
index 0000000..db7c94c
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_ASMFunctions.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.5.&nbsp;ASM Functions</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMTermsFormulas.html" title="5.&nbsp;ASM Terms and ASM Functions"><link rel="prev" href="def_ModelElementConstant.html" title="5.4.8.&nbsp;Model Element Constant"><link rel="next" href="def_AsmFunctionDef.html" title="5.5.1.&nbsp;ASM Function Definition"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.5.&nbsp;ASM Functions</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_ModelElementConstant.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.&nbsp;ASM Terms and ASM Functions</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_AsmFunctionDef.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_ASMFunctions"></a>5.5.&nbsp;ASM Functions</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_AsmFunctionDef.html">5.5.1. ASM Function Definition</a></span></dt><dt><span class="sect3"><a href="def_InitialValue.html">5.5.2. Initial Value</a></span></dt><dt><span class="sect3"><a href="def_AsmFunctionLocation.html">5.5.3. ASM Function Location</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_ModelElementConstant.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMTermsFormulas.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_AsmFunctionDef.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.4.8.&nbsp;Model Element Constant&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.5.1.&nbsp;ASM Function Definition</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_ASMLogicalTerms.html b/org.eclipse.viatra2.help/sec_ASMLogicalTerms.html
new file mode 100644
index 0000000..3f05fcf
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_ASMLogicalTerms.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.2.&nbsp;Logical Terms</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMTermsFormulas.html" title="5.&nbsp;ASM Terms and ASM Functions"><link rel="prev" href="def_Term.html" title="5.1.1.&nbsp;ASM Term"><link rel="next" href="def_LogicalTerm.html" title="5.2.1.&nbsp;Logical Term"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.2.&nbsp;Logical Terms</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_Term.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.&nbsp;ASM Terms and ASM Functions</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_LogicalTerm.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_ASMLogicalTerms"></a>5.2.&nbsp;Logical Terms</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_LogicalTerm.html">5.2.1. Logical Term</a></span></dt><dt><span class="sect3"><a href="def_ConjLogicalTerm.html">5.2.2. Conjunctive Logical Term (Logical And Term)</a></span></dt><dt><span class="sect3"><a href="def_BaseLogicalTerm.html">5.2.3. Base Logical Term</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_Term.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMTermsFormulas.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_LogicalTerm.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.1.1.&nbsp;ASM Term&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.2.1.&nbsp;Logical Term</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_ASMModelManipulationRules.html b/org.eclipse.viatra2.help/sec_ASMModelManipulationRules.html
new file mode 100644
index 0000000..7d190e9
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_ASMModelManipulationRules.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.4.&nbsp;Model Manipulation Rules</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMRules.html" title="4.&nbsp;ASM Rules"><link rel="prev" href="def_TryRule.html" title="4.3.10.&nbsp;Try Rule"><link rel="next" href="def_ModelManipulationRule.html" title="4.4.1.&nbsp;Model Manipulation Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.4.&nbsp;Model Manipulation Rules</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_TryRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.&nbsp;ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_ModelManipulationRule.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_ASMModelManipulationRules"></a>4.4.&nbsp;Model Manipulation Rules</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_ModelManipulationRule.html">4.4.1. Model Manipulation Rule</a></span></dt><dt><span class="sect3"><a href="def_CreateRule.html">4.4.2. Create Rule</a></span></dt><dt><span class="sect3"><a href="def_DeleteRule.html">4.4.3. Delete Rule</a></span></dt><dt><span class="sect3"><a href="def_CopyRule.html">4.4.4. Copy Rule</a></span></dt><dt><span class="sect3"><a href="def_MoveRule.html">4.4.5. Move Rule</a></span></dt><dt><span class="sect3"><a href="def_ElementUpdateRule.html">4.4.6. Element Update   Rule</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_TryRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_ModelManipulationRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.3.10.&nbsp;Try Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.4.1.&nbsp;Model Manipulation Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_ASMRules.html b/org.eclipse.viatra2.help/sec_ASMRules.html
new file mode 100644
index 0000000..d1f6479
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_ASMRules.html
@@ -0,0 +1,5 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.&nbsp;ASM Rules</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_VTCLSpec.html" title="Chapter&nbsp;2.&nbsp;Viatra Textual Command Language (VTCL) Specification"><link rel="prev" href="def_GTRuleCall.html" title="3.4.1.&nbsp;GTRule Call"><link rel="next" href="sec_DefASMRule.html" title="4.1.&nbsp;ASM Rule Definition and Invocation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.&nbsp;ASM Rules</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_GTRuleCall.html">Prev</a>&nbsp;</td><th align="center" width="60%">Chapter&nbsp;2.&nbsp;Viatra Textual Command Language (VTCL) Specification</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_DefASMRule.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec_ASMRules"></a>4.&nbsp;ASM Rules</h2></div></div></div><div class="toc"><dl><dt><span class="sect2"><a href="sec_DefASMRule.html">4.1. ASM Rule Definition and Invocation</a></span></dt><dt><span class="sect2"><a href="sec_ASMSimpleRules.html">4.2. Simple ASM Rules</a></span></dt><dt><span class="sect2"><a href="sec_ASMCompoundRules.html">4.3. Compound ASM Rules</a></span></dt><dt><span class="sect2"><a href="sec_ASMModelManipulationRules.html">4.4. Model Manipulation Rules</a></span></dt></dl></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip: Description"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left"><a name="def_ASMRule_Description"></a>Description</th></tr><tr><td valign="top" align="left"><p>

+An ASM rule is the building block of an ASM program. It can be defined either 

+<span class="emphasis"><em>user-defined</em></span> or <span class="emphasis"><em>built-in (nested)</em></span>

+as a part of another ASM rule. 

+</p></td></tr></table></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_GTRuleCall.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_VTCLSpec.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_DefASMRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">3.4.1.&nbsp;GTRule Call&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.1.&nbsp;ASM Rule Definition and Invocation</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_ASMSimpleRules.html b/org.eclipse.viatra2.help/sec_ASMSimpleRules.html
new file mode 100644
index 0000000..6150304
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_ASMSimpleRules.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.2.&nbsp;Simple ASM Rules</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMRules.html" title="4.&nbsp;ASM Rules"><link rel="prev" href="def_AsmRuleInvoc.html" title="4.1.2.&nbsp;ASM Rule Invocation"><link rel="next" href="def_SimpleRule.html" title="4.2.1.&nbsp;Simple Rule"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.2.&nbsp;Simple ASM Rules</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_AsmRuleInvoc.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.&nbsp;ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_SimpleRule.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_ASMSimpleRules"></a>4.2.&nbsp;Simple ASM Rules</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_SimpleRule.html">4.2.1. Simple Rule</a></span></dt><dt><span class="sect3"><a href="def_CallRule.html">4.2.2. Call Rule</a></span></dt><dt><span class="sect3"><a href="def_SkipRule.html">4.2.3. Skip Rule</a></span></dt><dt><span class="sect3"><a href="def_FailRule.html">4.2.4. Fail Rule</a></span></dt><dt><span class="sect3"><a href="def_UpdateRule.html">4.2.5. Update Rule</a></span></dt><dt><span class="sect3"><a href="def_PrintRule.html">4.2.6. Print Rule</a></span></dt><dt><span class="sect3"><a href="def_LogRule.html">4.2.7. Log Rule</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_AsmRuleInvoc.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_SimpleRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.1.2.&nbsp;ASM Rule Invocation&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.2.1.&nbsp;Simple Rule</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_ASMTerms.html b/org.eclipse.viatra2.help/sec_ASMTerms.html
new file mode 100644
index 0000000..8d0f8f6
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_ASMTerms.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.1.&nbsp;ASM Terms: An Overview</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMTermsFormulas.html" title="5.&nbsp;ASM Terms and ASM Functions"><link rel="prev" href="sec_ASMTermsFormulas.html" title="5.&nbsp;ASM Terms and ASM Functions"><link rel="next" href="def_Term.html" title="5.1.1.&nbsp;ASM Term"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.1.&nbsp;ASM Terms: An Overview</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_ASMTermsFormulas.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.&nbsp;ASM Terms and ASM Functions</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_Term.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_ASMTerms"></a>5.1.&nbsp;ASM Terms: An Overview</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_Term.html">5.1.1. ASM Term</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_ASMTermsFormulas.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMTermsFormulas.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_Term.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.&nbsp;ASM Terms and ASM Functions&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.1.1.&nbsp;ASM Term</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_ASMTermsFormulas.html b/org.eclipse.viatra2.help/sec_ASMTermsFormulas.html
new file mode 100644
index 0000000..1d869c4
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_ASMTermsFormulas.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.&nbsp;ASM Terms and ASM Functions</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_VTCLSpec.html" title="Chapter&nbsp;2.&nbsp;Viatra Textual Command Language (VTCL) Specification"><link rel="prev" href="def_ElementUpdateRule.html" title="4.4.6.&nbsp;Element Update Rule"><link rel="next" href="sec_ASMTerms.html" title="5.1.&nbsp;ASM Terms: An Overview"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.&nbsp;ASM Terms and ASM Functions</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_ElementUpdateRule.html">Prev</a>&nbsp;</td><th align="center" width="60%">Chapter&nbsp;2.&nbsp;Viatra Textual Command Language (VTCL) Specification</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_ASMTerms.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec_ASMTermsFormulas"></a>5.&nbsp;ASM Terms and ASM Functions</h2></div></div></div><div class="toc"><dl><dt><span class="sect2"><a href="sec_ASMTerms.html">5.1. ASM Terms: An Overview</a></span></dt><dt><span class="sect2"><a href="sec_ASMLogicalTerms.html">5.2. Logical Terms</a></span></dt><dt><span class="sect2"><a href="sec_ASMArithmeticTerms.html">5.3. Arithmetic Terms</a></span></dt><dt><span class="sect2"><a href="sec_ASMConstants.html">5.4. Constants</a></span></dt><dt><span class="sect2"><a href="sec_ASMFunctions.html">5.5. ASM Functions</a></span></dt><dt><span class="sect2"><a href="sec_PredefinedFunctions.html">5.6. Predefined Functions</a></span></dt><dt><span class="sect2"><a href="sec_NamingVariables.html">5.7. Naming and Variables</a></span></dt><dt><span class="sect2"><a href="sec_Parameters.html">5.8. Parameters and Variable Lists</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_ElementUpdateRule.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_VTCLSpec.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_ASMTerms.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.4.6.&nbsp;Element Update   Rule&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.1.&nbsp;ASM Terms: An Overview</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_ConflictHandling.html b/org.eclipse.viatra2.help/sec_ConflictHandling.html
new file mode 100644
index 0000000..1f6d07a
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_ConflictHandling.html
@@ -0,0 +1,88 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3.3.3.&nbsp;Handling of conflicts</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_GTRuleBehaviour.html" title="3.3.&nbsp;Behavioural Specification of Graph Transformation Rules"><link rel="prev" href="sec_PostconditionSpec.html" title="3.3.2.&nbsp;Complete behavioral specification of postcondition patterns"><link rel="next" href="sec_InvokeGTRule.html" title="3.4.&nbsp;Invocation of Graph Transformation Rules"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">3.3.3.&nbsp;Handling of conflicts</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_PostconditionSpec.html">Prev</a>&nbsp;</td><th align="center" width="60%">3.3.&nbsp;Behavioural Specification of Graph Transformation Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_InvokeGTRule.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="sec_ConflictHandling"></a>3.3.3.&nbsp;Handling of conflicts</h4></div></div></div><p>

+If conflicting behavior is defined for a model element in the effect set, then 

+it is a run-time exception, and the execution is terminated. Conflicts and 

+ambiguities arise between the following elementary operations: 

+</p><div class="itemizedlist"><ul type="disc"><li><p>

+				<code class="computeroutput">keep(X)</code>

+				and

+				<code class="computeroutput">deleteEntity(X)</code>

+				or

+				<code class="computeroutput">deleteRelation(R)</code>

+				(delete-use conflict)

+			</p></li><li><p>

+				<code class="computeroutput">newRelation(R, A, B)</code>

+				and

+				<code class="computeroutput">deleteEntity(A)</code>

+				or

+				<code class="computeroutput">deleteEntity(B)</code>

+				(or

+				<code class="computeroutput">deleteRelation(A)</code>

+				or

+				<code class="computeroutput">deleteRelation(B)</code>

+				) (create-delete conflict)

+			</p></li><li><p>

+				<code class="computeroutput">move(X, A)</code>

+				and

+				<code class="computeroutput">move(X,B)</code>

+				if

+				<code class="computeroutput">A B</code>

+			</p></li><li><p>

+				<code class="computeroutput">setFrom(R,A)</code>

+				and

+				<code class="computeroutput">setFrom(R,B)</code>

+				if

+				<code class="computeroutput">A B</code>

+			</p></li><li><p>

+				<code class="computeroutput">setTo(R,A)</code>

+				and

+				<code class="computeroutput">setTo(R,B)</code>

+				if

+				<code class="computeroutput">A B</code>

+			</p></li><li><p>

+				<code class="computeroutput">newEntity(X)</code>

+				and no

+				<code class="computeroutput">move(X,A)</code>

+				in the effect set (thus when creating an entity, it should be assigned to a parent entity)

+			</p></li></ul></div><p>

+It is also a run-time exception if a constraint in the <span class="emphasis"><em>check set</em></span> is 

+violated after resolving the postcondition pattern. Here constraint violation is 

+caused in the following cases: 

+</p><div class="itemizedlist"><ul type="disc"><li><p>

+				<code class="computeroutput">move(X, A)</code>

+				and

+				<code class="computeroutput">descendantOf(X,B)</code>

+				if

+				<code class="computeroutput">A</code>

+				is not a descendant of

+				<code class="computeroutput">B</code>

+			</p></li><li><p>

+				<code class="computeroutput">newInstanceOf(X,A)</code>

+				and

+				<code class="computeroutput">instanceOf(X,B)</code>

+				if

+				<code class="computeroutput">A B</code>

+			</p></li></ul></div><p>

+Note that the pattern matching phase and the model manipulation phase (i.e 

+handling of precondition and postcondition patterns, respectively) are separate 

+phases, and a conflict only arises if the model manipulation part contains 

+ambiguous modifications. 

+</p><div class="highlights"><a name="def_GTRuleBehaviour_Remark"></a><p><b>Remark.&nbsp;</b>

+In theory, the effect set and check set is passed to the action part of a GT 

+rule to enable the detection of conflicts between the postcondition pattern 

+and ASM model manipulation rules in the action part. However, this is not 

+checked in the current release. 

+

+Furthermore, since transaction handling is also not part of the current 

+release, not all conflicts are guaranteed to be detected by the 

+engine at run-time. 

+

+However, as a main rule of thumb, non-deleting GT rules invoked by a 

+<a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a> are deterministic and free of undetectable 

+conflicts (by their construction) already in the current release. 

+</p></div><p>

+<a href="sec_ConflictHandling.html#tab:VTCL_EntManipBehav" title="Table&nbsp;2.1.&nbsp;Behavior table for entity manipulation">Table&nbsp;2.1, &ldquo;Behavior table for entity manipulation&rdquo;</a> and <a href="sec_ConflictHandling.html#tab:VTCL_RelManipBehav" title="Table&nbsp;2.2.&nbsp;Behavior table for relation manipulation (both the source A and target B are entities)">Table&nbsp;2.2, &ldquo;Behavior table for relation manipulation (both the source A and target B are entities)&rdquo;</a>

+below summarizes how model manipulation can be carried out by the 

+postcondition. 

+</p><p>

+

+</p><div class="table"><a name="tab:VTCL_EntManipBehav"></a><p class="title"><b>Table&nbsp;2.1.&nbsp;Behavior table for entity manipulation</b></p><div class="table-contents"><table summary="Behavior table for entity manipulation" border="1"><colgroup><col><col><col></colgroup><thead><tr><th><span class="strong"><strong>Effect</strong></span></th><th><span class="strong"><strong>Pattern body (Post)</strong></span></th><th><span class="strong"><strong>Pattern parameters (Post)</strong></span></th><th><span class="strong"><strong>Further Conditions on X</strong></span></th><th><span class="strong"><strong>Conditions on M</strong></span></th><th><span class="strong"><strong>Side effects</strong></span></th></tr></thead><tbody><tr><td><span class="strong"><strong>Leaves entity X unchanged</strong></span></td><td>entity(X) in M; </td><td>X is a ground parameter of Post </td><td>The parent of X is (already) M prior to rule application </td><td>M is bound to an entity </td><td>None </td></tr><tr><td><span class="strong"><strong>Moves entity X to new parent M</strong></span></td><td>entity(X) in M; </td><td>X is a ground parameter of Post </td><td>The parent of X is not M prior to rule application </td><td>M is bound to an entity or entity M is to be created by Post </td><td>None </td></tr><tr><td><span class="strong"><strong>Creates new entity X with M as parent</strong></span></td><td>entity(X) in M; </td><td>X is <span class="emphasis"><em>not</em></span> a parameter of Post, or if so, it is <span class="emphasis"><em>not</em></span> ground </td><td>None </td><td>M is either bound to an entity or entity M is to be created by Post </td><td>None </td></tr><tr><td><span class="emphasis"><em>move_content</em></span> <span class="strong"><strong>Deletes entity X (with  semantics)</strong></span></td><td>X does not appear in pattern body </td><td>X is a ground parameter of Post </td><td>X is bound to an entity </td><td>None </td><td>delete(X) ASM rule is called with move_contents semantics, i.e. all incoming and outgoing relations and relationships are also deleted, but the children of X are preserved </td></tr></tbody></table></div><p></p></div><br class="table-break"><div class="table"><a name="tab:VTCL_RelManipBehav"></a><p class="title"><b>Table&nbsp;2.2.&nbsp;Behavior table for relation manipulation (both the source A and target B are entities)</b></p><div class="table-contents"><table summary="Behavior table for relation manipulation (both the source A and target B are entities)" border="1"><colgroup><col><col><col></colgroup><thead><tr><th><span class="strong"><strong>Effect</strong></span></th><th><span class="strong"><strong>Pattern body (Post)</strong></span></th><th><span class="strong"><strong>Pattern parameters (Post)</strong></span></th><th><span class="strong"><strong>Further Conditions on R</strong></span></th><th><span class="strong"><strong>Conditions on source (A) and target (B)</strong></span></th><th><span class="strong"><strong>Side effects</strong></span></th></tr></thead><tbody><tr><td><span class="strong"><strong>Leaves relation R unchanged</strong></span></td><td>relation(R, A, B); </td><td>R is a ground parameter of Post </td><td>A and B is (already) the source and target of R prior to rule application </td><td>(1) A and B are ground variables, (2) none of them is to be deleted by Post </td><td>None </td></tr><tr><td><span class="strong"><strong>Redirects relation R to lead out from A (setFrom)</strong></span></td><td>relation(R, A, B); </td><td>R is a ground parameter of Post </td><td>A is not the source of R prior to rule application </td><td>(1) A and B are ground variables, or (2) they are created by Post, (3) none of them is to be deleted by Post </td><td>If the type of R is an aggregation, then B is moved to the new parent A </td></tr><tr><td><span class="strong"><strong>Redirects relation R to lead into B (setTo)</strong></span></td><td>relation(R, A, B); </td><td>R is a ground parameter of Post </td><td>B is not the target of R prior to rule application </td><td>(1) A and B are ground variables, or (2) they are created by Post, (3) none of them is to be deleted by Post </td><td>If the type of R is an aggregation, then B is moved to parent A </td></tr><tr><td><span class="strong"><strong>Creates relation R with A as source and B as target</strong></span></td><td>relation(R, A, B); </td><td>R is <span class="emphasis"><em>not</em></span> a parameter of Post, or if so, it is <span class="emphasis"><em>not</em></span> ground </td><td>None </td><td>(1) A and B are ground variables, or (2) they are created by Post, (3) none of them is to be deleted by Post </td><td>If the type of R is an aggregation, then B is moved to parent A </td></tr><tr><td><span class="strong"><strong>Deletes relation R</strong></span></td><td>R does not appear in pattern body </td><td>R is a ground parameter of Post </td><td>R is bound to a relation </td><td>None </td><td>None, i.e. B is not moved from A </td></tr></tbody></table></div><p></p></div><br class="table-break"></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_PostconditionSpec.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_GTRuleBehaviour.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_InvokeGTRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">3.3.2.&nbsp;Complete behavioral specification of postcondition patterns&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;3.4.&nbsp;Invocation of Graph Transformation Rules</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_DefASMRule.html b/org.eclipse.viatra2.help/sec_DefASMRule.html
new file mode 100644
index 0000000..7d01602
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_DefASMRule.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.1.&nbsp;ASM Rule Definition and Invocation</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMRules.html" title="4.&nbsp;ASM Rules"><link rel="prev" href="sec_ASMRules.html" title="4.&nbsp;ASM Rules"><link rel="next" href="def_AsmRuleDef.html" title="4.1.1.&nbsp;ASM Rule Definition"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">4.1.&nbsp;ASM Rule Definition and Invocation</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_ASMRules.html">Prev</a>&nbsp;</td><th align="center" width="60%">4.&nbsp;ASM Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_AsmRuleDef.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_DefASMRule"></a>4.1.&nbsp;ASM Rule Definition and Invocation</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_AsmRuleDef.html">4.1.1. ASM Rule Definition</a></span></dt><dt><span class="sect3"><a href="def_AsmRuleInvoc.html">4.1.2. ASM Rule Invocation</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_ASMRules.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMRules.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_AsmRuleDef.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">4.&nbsp;ASM Rules&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;4.1.1.&nbsp;ASM Rule Definition</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_DefGTRule.html b/org.eclipse.viatra2.help/sec_DefGTRule.html
new file mode 100644
index 0000000..14aaaf1
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_DefGTRule.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3.1.&nbsp;Definition of Graph Transformation Rules</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_GraphTransformations.html" title="3.&nbsp;Graph Transformation Rules"><link rel="prev" href="sec_GraphTransformations.html" title="3.&nbsp;Graph Transformation Rules"><link rel="next" href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">3.1.&nbsp;Definition of Graph Transformation Rules</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_GraphTransformations.html">Prev</a>&nbsp;</td><th align="center" width="60%">3.&nbsp;Graph Transformation Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_GTRuleDef.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_DefGTRule"></a>3.1.&nbsp;Definition of Graph Transformation Rules</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_GTRuleDef.html">3.1.1. Graph Transformation Rule Definition</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_GraphTransformations.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_GraphTransformations.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_GTRuleDef.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">3.&nbsp;Graph Transformation Rules&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;3.1.1.&nbsp;Graph Transformation Rule Definition</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_GTParamPass.html b/org.eclipse.viatra2.help/sec_GTParamPass.html
new file mode 100644
index 0000000..6bbf974
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_GTParamPass.html
@@ -0,0 +1,58 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3.2.&nbsp;Parameter passing at Graph Transformation Rules</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_GraphTransformations.html" title="3.&nbsp;Graph Transformation Rules"><link rel="prev" href="def_GTRuleDef.html" title="3.1.1.&nbsp;Graph Transformation Rule Definition"><link rel="next" href="sec_GTRuleBehaviour.html" title="3.3.&nbsp;Behavioural Specification of Graph Transformation Rules"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">3.2.&nbsp;Parameter passing at Graph Transformation Rules</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_GTRuleDef.html">Prev</a>&nbsp;</td><th align="center" width="60%">3.&nbsp;Graph Transformation Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_GTRuleBehaviour.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_GTParamPass"></a>3.2.&nbsp;Parameter passing at Graph Transformation Rules</h3></div></div></div><p>

+		Information flow between graph transformation rules and their precondition and postcondition patterns is carried

+		out by parameter passing.

+	</p><p>

+		Like in case of ASM rules, formal parameters of graph transformation rules can be grouped into three categories.

+		Note that this categorization is independent from the fact whether a given parameter is bound or unbound when

+		applying a GT rule.

+	</p><div class="itemizedlist"><ul type="disc"><li><p>

+				<span class="emphasis"><em>in</em></span>: The values of

+				<span class="strong"><strong>input parameters</strong></span>

+				<a name="N10D39" class="indexterm"></a>

+				passed to a graph transformation rule will be restored after applying the rule, i.e. if a new value is

+				assigned to an input variable during the application of a GT rule, this value will no longer be visible

+				after rule application. Its typical usage is that an initial match of a GT rule is assigned this way.

+			</p><p>It is a run-time error if an input parameter is unbound when calling a GT rule.</p></li><li><p>

+				<span class="emphasis"><em>out</em></span>: The values of

+				<span class="strong"><strong>output parameters</strong></span>

+				<a name="N10D4C" class="indexterm"></a>

+				passed to a graph transformation rule will be ignored when initiating pattern matching for the

+				precondition pattern, i.e. these parameters are treated during pattern matching as if they were unbound.

+				However, these values are passed back to the caller environment to make the new values accessible.

+			</p></li><li><p>

+				<span class="emphasis"><em>inout</em></span>: The values of

+				<span class="strong"><strong>inout parameters</strong></span>

+				<a name="N10D5D" class="indexterm"></a>

+				of a graph transformation rule are passed to a graph pattern matching engine (as in case of

+				<span class="strong"><strong>input parameters</strong></span>), and they are also passed back to the caller environment 

+				(as in case of	<span class="strong"><strong>output parameters</strong></span>).

+			</p><p>It is a run-time error if an input parameter is unbound when calling a GT rule.</p></li></ul></div><p>

+		Note that this interpretation of input and output variables is a change from previous release, where input and

+		output parameters of a GT rule were interpreted after the pattern matching phase.

+	</p><p>

+		As illustrated by <a href="sec_GTParamPass.html#fig:VTCL_ParamRelations" title="Figure&nbsp;2.2.&nbsp;Relations of parameters of the parts of a GT rule">Figure&nbsp;2.2, &ldquo;Relations of parameters of the parts of a GT rule&rdquo;</a>, a parameter of a graph transformation rule can be used 

+		(i) in the precondition	pattern, (ii) in the postcondition pattern, or in the action part (or in any combination of these) 

+		provided that	they are listed in the parameter list(s) of the corresponding patterns. In case of the action part, all

+		parameters of the GT rule itself of the precondition and postcondition patterns can be used (i.e. all these

+		variables are part of an implicit parameter list of the action part).

+	</p><div class="figure"><a name="fig:VTCL_ParamRelations"></a><p class="title"><b>Figure&nbsp;2.2.&nbsp;Relations of parameters of the parts of a GT rule</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="images/others/ParamRelations.png" align="middle" width="500" alt="Relations of parameters of the parts of a GT rule"></div></div><p></p></div><br class="figure-break"><div class="itemizedlist"><ul type="disc"><li><p>

+				Bound parameters of the precondition pattern are called

+				<span class="emphasis"><em>input parameters of the precondition</em></span>, 

+				while unbound parameters of the postcondition are called

+				<span class="emphasis"><em>output parameters of the precondition</em></span>. 

+				Input parameters are either parameters of the precondition pattern, 

+				or they are	<span class="emphasis"><em>input</em></span>

+				or <span class="emphasis"><em>inout</em></span>

+				parameters of the GT rule itself.

+			</p></li><li><p>

+				Bound parameters of the postcondition pattern are called

+				<span class="emphasis"><em>input parameters of the postcondition</em></span>, 

+				while unbound parameters of the postcondition are called

+				<span class="emphasis"><em>output parameters of the precondition</em></span>. 

+				Input parameters are <span class="emphasis"><em>input</em></span> or	<span class="emphasis"><em>inout</em></span>

+				parameters of the GT rule itself.

+			</p></li></ul></div><p>

+		In the rare case when values are assigned multiple times to the same output parameter, assignments in the

+		precondition pattern are overridden by assignments defined by the postcondition pattern, which, in turn, are

+		overridden by assignments in the action part.

+	</p></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_GTRuleDef.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_GraphTransformations.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_GTRuleBehaviour.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">3.1.1.&nbsp;Graph Transformation Rule Definition&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;3.3.&nbsp;Behavioural Specification of Graph Transformation Rules</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_GTRuleBehaviour.html b/org.eclipse.viatra2.help/sec_GTRuleBehaviour.html
new file mode 100644
index 0000000..597bc7b
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_GTRuleBehaviour.html
@@ -0,0 +1,82 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3.3.&nbsp;Behavioural Specification of Graph Transformation Rules</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_GraphTransformations.html" title="3.&nbsp;Graph Transformation Rules"><link rel="prev" href="sec_GTParamPass.html" title="3.2.&nbsp;Parameter passing at Graph Transformation Rules"><link rel="next" href="sec_PostconditionRestriction.html" title="3.3.1.&nbsp;Restrictions of model elements used in postcondition patterns"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">3.3.&nbsp;Behavioural Specification of Graph Transformation Rules</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_GTParamPass.html">Prev</a>&nbsp;</td><th align="center" width="60%">3.&nbsp;Graph Transformation Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_PostconditionRestriction.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_GTRuleBehaviour"></a>3.3.&nbsp;Behavioural Specification of Graph Transformation Rules</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="sec_PostconditionRestriction.html">3.3.1. Restrictions of model elements used in postcondition patterns</a></span></dt><dt><span class="sect3"><a href="sec_PostconditionSpec.html">3.3.2. Complete behavioral specification of postcondition patterns</a></span></dt><dt><span class="sect3"><a href="sec_ConflictHandling.html">3.3.3. Handling of conflicts</a></span></dt></dl></div><p>

+The behaviour of a graph transformation rule can be divided into two distinct 

+phases. 

+</p><div class="variablelist"><dl><dt><span class="term"><span class="strong"><strong>Precondition</strong></span></span></dt><dd><p>

+The precondition pattern defines a 

+condition which needs to be satisfied in order to successfully apply the 

+GT rule (called also as left-hand side pattern - LHS). This is carried out 

+by graph pattern matching, which collects all the matches of the 

+precondition pattern. 

+</p><p>

+Parameters of the <span class="emphasis"><em>precondition pattern</em></span> can be bound or unbound before 

+the execution of this part. After successful graph pattern matching, all 

+parameters of the precondition pattern become bound. 

+</p><p>

+If graph pattern matching fails then the GT rule is free of 

+side-effects, (i.e. neither the postcondition nor the action part is 

+executed). Furthermore, the GT rule reports a failure towards its caller 

+environment (which can still mask this failure as in case of 

+<a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>). 

+</p></dd><dt><span class="term"><span class="strong"><strong>Postcondition</strong></span></span></dt><dd><p>

+The postcondition pattern (right-hand side pattern - 

+RHS) describes declaratively what conditions should hold as a result of 

+applying the GT rule. In general, a GT rule calculates the difference of the 

+postcondition and precondition for one or more matches in an atomic step. 

+</p><p>

+When invoking a GT rule from a <a href="def_ChooseRule.html" title="4.3.6.&nbsp;Choose Rule">choose rule</a>, 

+then the rule is applied on a single match, while in case of a 

+<a href="def_ForallRule.html" title="4.3.7.&nbsp;Forall Rule">forall rule</a>, all matches of the precondition 

+pattern are processed in a pseudo-parallel way independently from each 

+other. 

+</p><p>

+The postcondition may prescribe four different operations on the model space. 

+</p><div class="itemizedlist"><ul type="disc"><li><p>

+				<span class="emphasis"><em>Preservation.</em></span>

+				If an input parameter of the postcondition also appears in the pattern itself, then the matching model

+				element is preserved. This behavior is denoted by

+				<code class="computeroutput">keep(X)</code>.

+			</p></li><li><p>

+				<span class="emphasis"><em>Deletion.</em></span>

+				If an input parameter of the postcondition does not appear in the postcondition pattern itself then the

+				matching model element is deleted. In such a case, the

+				<span class="emphasis"><em>undef</em></span>

+				value will be assigned to the parameter, thus it becomes unbound. This behavior is denoted by

+				<code class="computeroutput">deleteEntity(X)</code>

+				or

+				<code class="computeroutput">deleteRelation(X)</code>.

+			</p></li><li><p>

+				<span class="emphasis"><em>Creation.</em></span>

+				If a variable which appears in the body of the postcondition pattern is an output parameter of the

+				postcondition, then a new model element is created, and the variable is bound to this new model element.

+				This behavior is denoted by

+				<code class="computeroutput">newEntity(X))</code>

+				or

+				<code class="computeroutput">newRelation(R, A, B))</code>

+				(in the latter case,

+				<code class="computeroutput">A</code>

+				is the source and

+				<code class="computeroutput">B</code>

+				is the target of that relation).

+			</p></li><li><p>

+				<span class="emphasis"><em>Move.</em></span>

+				If a

+				<a href="def_ContainmentConstraint.html" title="2.1.9.&nbsp;Containment Constraint">containment constraint</a>

+				is defined for an entity in the postcondition pattern, then the entity is moved to as a child of the new

+				container entity. This behavior is denoted by

+				<code class="computeroutput">move(X, Par)</code>

+				where

+				<code class="computeroutput">keep(Par)</code>

+				is the new container entity.

+			</p></li></ul></div></dd><dt><span class="term"><span class="strong"><strong>Action</strong></span></span></dt><dd><p>After pattern matching and the resolution of the 

+postcondition pattern is carried out, a GT rule will execute a sequence of 

+additional actions defined as ordinary ASM rules. 

+</p><p>

+All parameters of both the precondition and the postcondition 

+can be used in the action part, but internal pattern variables 

+(i.e. those that does not appear as a parameter of the pattern) are not 

+visible in the action part. Naturally, all parameters of the GT rule itself 

+can also be used in the action part. 

+</p></dd></dl></div><p>

+After these general rules, a detailed description follows on the specificities 

+of resolving the postcondition pattern. 

+</p></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_GTParamPass.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_GraphTransformations.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_PostconditionRestriction.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">3.2.&nbsp;Parameter passing at Graph Transformation Rules&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;3.3.1.&nbsp;Restrictions of model elements used in postcondition patterns</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_GraphPatterns.html b/org.eclipse.viatra2.help/sec_GraphPatterns.html
new file mode 100644
index 0000000..e83e190
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_GraphPatterns.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>2.&nbsp;Graph Patterns</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_VTCLSpec.html" title="Chapter&nbsp;2.&nbsp;Viatra Textual Command Language (VTCL) Specification"><link rel="prev" href="def_Annotation.html" title="1.2.2.&nbsp;Annotation"><link rel="next" href="sec_PatternDefinition.html" title="2.1.&nbsp;Pattern Definition"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">2.&nbsp;Graph Patterns</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_Annotation.html">Prev</a>&nbsp;</td><th align="center" width="60%">Chapter&nbsp;2.&nbsp;Viatra Textual Command Language (VTCL) Specification</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_PatternDefinition.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec_GraphPatterns"></a>2.&nbsp;Graph Patterns</h2></div></div></div><div class="toc"><dl><dt><span class="sect2"><a href="sec_PatternDefinition.html">2.1. Pattern Definition</a></span></dt><dt><span class="sect2"><a href="sec_LocalPatternlElementDescription.html">2.2. Local Pattern Body Elements</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_Annotation.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_VTCLSpec.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_PatternDefinition.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">1.2.2.&nbsp;Annotation&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;2.1.&nbsp;Pattern Definition</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_GraphTransformations.html b/org.eclipse.viatra2.help/sec_GraphTransformations.html
new file mode 100644
index 0000000..ceeb0f0
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_GraphTransformations.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3.&nbsp;Graph Transformation Rules</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_VTCLSpec.html" title="Chapter&nbsp;2.&nbsp;Viatra Textual Command Language (VTCL) Specification"><link rel="prev" href="def_Relationship.html" title="2.2.3.&nbsp;Relationships"><link rel="next" href="sec_DefGTRule.html" title="3.1.&nbsp;Definition of Graph Transformation Rules"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">3.&nbsp;Graph Transformation Rules</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_Relationship.html">Prev</a>&nbsp;</td><th align="center" width="60%">Chapter&nbsp;2.&nbsp;Viatra Textual Command Language (VTCL) Specification</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_DefGTRule.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec_GraphTransformations"></a>3.&nbsp;Graph Transformation Rules</h2></div></div></div><div class="toc"><dl><dt><span class="sect2"><a href="sec_DefGTRule.html">3.1. Definition of Graph Transformation Rules</a></span></dt><dt><span class="sect2"><a href="sec_GTParamPass.html">3.2. Parameter passing at Graph Transformation Rules</a></span></dt><dt><span class="sect2"><a href="sec_GTRuleBehaviour.html">3.3. Behavioural Specification of Graph Transformation Rules</a></span></dt><dt><span class="sect2"><a href="sec_InvokeGTRule.html">3.4. Invocation of Graph Transformation Rules</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_Relationship.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_VTCLSpec.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_DefGTRule.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">2.2.3.&nbsp;Relationships&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;3.1.&nbsp;Definition of Graph Transformation Rules</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_InvokeGTRule.html b/org.eclipse.viatra2.help/sec_InvokeGTRule.html
new file mode 100644
index 0000000..bcc19ba
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_InvokeGTRule.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3.4.&nbsp;Invocation of Graph Transformation Rules</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_GraphTransformations.html" title="3.&nbsp;Graph Transformation Rules"><link rel="prev" href="sec_ConflictHandling.html" title="3.3.3.&nbsp;Handling of conflicts"><link rel="next" href="def_GTRuleCall.html" title="3.4.1.&nbsp;GTRule Call"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">3.4.&nbsp;Invocation of Graph Transformation Rules</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_ConflictHandling.html">Prev</a>&nbsp;</td><th align="center" width="60%">3.&nbsp;Graph Transformation Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_GTRuleCall.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_InvokeGTRule"></a>3.4.&nbsp;Invocation of Graph Transformation Rules</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_GTRuleCall.html">3.4.1. GTRule Call</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_ConflictHandling.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_GraphTransformations.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_GTRuleCall.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">3.3.3.&nbsp;Handling of conflicts&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;3.4.1.&nbsp;GTRule Call</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_LocalPatternlElementDescription.html b/org.eclipse.viatra2.help/sec_LocalPatternlElementDescription.html
new file mode 100644
index 0000000..5751867
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_LocalPatternlElementDescription.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>2.2.&nbsp;Local Pattern Body Elements</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_GraphPatterns.html" title="2.&nbsp;Graph Patterns"><link rel="prev" href="def_ContainmentConstraint.html" title="2.1.9.&nbsp;Containment Constraint"><link rel="next" href="def_Entity.html" title="2.2.1.&nbsp;Entity"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">2.2.&nbsp;Local Pattern Body Elements</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_ContainmentConstraint.html">Prev</a>&nbsp;</td><th align="center" width="60%">2.&nbsp;Graph Patterns</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_Entity.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_LocalPatternlElementDescription"></a>2.2.&nbsp;Local Pattern Body Elements</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_Entity.html">2.2.1. Entity</a></span></dt><dt><span class="sect3"><a href="def_Relation.html">2.2.2. Relation</a></span></dt><dt><span class="sect3"><a href="def_Relationship.html">2.2.3. Relationships</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_ContainmentConstraint.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_GraphPatterns.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_Entity.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">2.1.9.&nbsp;Containment Constraint&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;2.2.1.&nbsp;Entity</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_MachineDefinition.html b/org.eclipse.viatra2.help/sec_MachineDefinition.html
new file mode 100644
index 0000000..e310d1f
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_MachineDefinition.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>1.2.&nbsp;Machine Definition</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_MainVtclConcepts.html" title="1.&nbsp;VTCL Files and Machines (Transformations)"><link rel="prev" href="def_NamespaceImport.html" title="1.1.3.&nbsp;Namespace Import"><link rel="next" href="def_Machine.html" title="1.2.1.&nbsp;GTASM Machine Definition"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">1.2.&nbsp;Machine Definition</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_NamespaceImport.html">Prev</a>&nbsp;</td><th align="center" width="60%">1.&nbsp;VTCL Files and Machines (Transformations)</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_Machine.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_MachineDefinition"></a>1.2.&nbsp;Machine Definition</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_Machine.html">1.2.1. GTASM Machine Definition</a></span></dt><dt><span class="sect3"><a href="def_Annotation.html">1.2.2. Annotation</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_NamespaceImport.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_MainVtclConcepts.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_Machine.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">1.1.3.&nbsp;Namespace Import&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;1.2.1.&nbsp;GTASM Machine Definition</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_MainVtclConcepts.html b/org.eclipse.viatra2.help/sec_MainVtclConcepts.html
new file mode 100644
index 0000000..4df11fe
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_MainVtclConcepts.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>1.&nbsp;VTCL Files and Machines (Transformations)</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_VTCLSpec.html" title="Chapter&nbsp;2.&nbsp;Viatra Textual Command Language (VTCL) Specification"><link rel="prev" href="sec_VTCLSpec.html" title="Chapter&nbsp;2.&nbsp;Viatra Textual Command Language (VTCL) Specification"><link rel="next" href="sec_VtclFile.html" title="1.1.&nbsp;VTCL Files"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">1.&nbsp;VTCL Files and Machines (Transformations)</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_VTCLSpec.html">Prev</a>&nbsp;</td><th align="center" width="60%">Chapter&nbsp;2.&nbsp;Viatra Textual Command Language (VTCL) Specification</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_VtclFile.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec_MainVtclConcepts"></a>1.&nbsp;VTCL Files and Machines (Transformations)</h2></div></div></div><div class="toc"><dl><dt><span class="sect2"><a href="sec_VtclFile.html">1.1. VTCL Files</a></span></dt><dt><span class="sect2"><a href="sec_MachineDefinition.html">1.2. Machine Definition</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_VTCLSpec.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_VTCLSpec.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_VtclFile.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">Chapter&nbsp;2.&nbsp;Viatra Textual Command Language (VTCL) Specification&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;1.1.&nbsp;VTCL Files</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_NameTokens.html b/org.eclipse.viatra2.help/sec_NameTokens.html
new file mode 100644
index 0000000..da159cb
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_NameTokens.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>6.2.&nbsp;Tokens for names and strings</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_VTCLTokens.html" title="6.&nbsp;Tokens in the VTCL Language"><link rel="prev" href="def_VTCLKeywords.html" title="6.1.2.&nbsp;Keywords"><link rel="next" href="def_Identifier.html" title="6.2.1.&nbsp;Identifier"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">6.2.&nbsp;Tokens for names and strings</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_VTCLKeywords.html">Prev</a>&nbsp;</td><th align="center" width="60%">6.&nbsp;Tokens in the VTCL Language</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_Identifier.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_NameTokens"></a>6.2.&nbsp;Tokens for names and strings</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_Identifier.html">6.2.1. Identifier</a></span></dt><dt><span class="sect3"><a href="def_NameLiteral.html">6.2.2. Name Literal</a></span></dt><dt><span class="sect3"><a href="def_UpperCaseLiteral.html">6.2.3. UpperCase Literal</a></span></dt><dt><span class="sect3"><a href="def_StringLiteral.html">6.2.4. String Literal</a></span></dt><dt><span class="sect3"><a href="def_AnnotationLiteral.html">6.2.5. Annotation Literal</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_VTCLKeywords.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_VTCLTokens.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_Identifier.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">6.1.2.&nbsp;Keywords&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;6.2.1.&nbsp;Identifier</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_NamingVariables.html b/org.eclipse.viatra2.help/sec_NamingVariables.html
new file mode 100644
index 0000000..7acd91c
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_NamingVariables.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.7.&nbsp;Naming and Variables</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMTermsFormulas.html" title="5.&nbsp;ASM Terms and ASM Functions"><link rel="prev" href="def_PredefinedFunctionCall.html" title="5.6.1.&nbsp;Predefined Function Call"><link rel="next" href="def_ModelElementName.html" title="5.7.1.&nbsp;Model Element Name"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.7.&nbsp;Naming and Variables</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_PredefinedFunctionCall.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.&nbsp;ASM Terms and ASM Functions</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_ModelElementName.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_NamingVariables"></a>5.7.&nbsp;Naming and Variables</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_ModelElementName.html">5.7.1. Model Element Name</a></span></dt><dt><span class="sect3"><a href="def_Variable.html">5.7.2. Variable</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_PredefinedFunctionCall.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMTermsFormulas.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_ModelElementName.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.6.1.&nbsp;Predefined Function Call&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.7.1.&nbsp;Model Element Name</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_NumberTokens.html b/org.eclipse.viatra2.help/sec_NumberTokens.html
new file mode 100644
index 0000000..e285acc
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_NumberTokens.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>6.3.&nbsp;Tokens for numbers</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_VTCLTokens.html" title="6.&nbsp;Tokens in the VTCL Language"><link rel="prev" href="def_AnnotationLiteral.html" title="6.2.5.&nbsp;Annotation Literal"><link rel="next" href="def_IntegerLiteral.html" title="6.3.1.&nbsp;Integer Literal"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">6.3.&nbsp;Tokens for numbers</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_AnnotationLiteral.html">Prev</a>&nbsp;</td><th align="center" width="60%">6.&nbsp;Tokens in the VTCL Language</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_IntegerLiteral.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_NumberTokens"></a>6.3.&nbsp;Tokens for numbers</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_IntegerLiteral.html">6.3.1. Integer Literal</a></span></dt><dt><span class="sect3"><a href="def_FloatLiteral.html">6.3.2. Float Literal</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_AnnotationLiteral.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_VTCLTokens.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_IntegerLiteral.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">6.2.5.&nbsp;Annotation Literal&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;6.3.1.&nbsp;Integer Literal</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_Parameters.html b/org.eclipse.viatra2.help/sec_Parameters.html
new file mode 100644
index 0000000..33164db
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_Parameters.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.8.&nbsp;Parameters and Variable Lists</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMTermsFormulas.html" title="5.&nbsp;ASM Terms and ASM Functions"><link rel="prev" href="def_Variable.html" title="5.7.2.&nbsp;Variable"><link rel="next" href="def_FormalParameter.html" title="5.8.1.&nbsp;Formal Parameters"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.8.&nbsp;Parameters and Variable Lists</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_Variable.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.&nbsp;ASM Terms and ASM Functions</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_FormalParameter.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_Parameters"></a>5.8.&nbsp;Parameters and Variable Lists</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_FormalParameter.html">5.8.1. Formal Parameters</a></span></dt><dt><span class="sect3"><a href="def_DirectedFormalParameter.html">5.8.2. Directed Formal Parameters</a></span></dt><dt><span class="sect3"><a href="def_ActualParameter.html">5.8.3. Actual Parameters</a></span></dt><dt><span class="sect3"><a href="def_ConstrainedVariableList.html">5.8.4. Constrained Variable List</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_Variable.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMTermsFormulas.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_FormalParameter.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.7.2.&nbsp;Variable&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.8.1.&nbsp;Formal Parameters</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_PatternDefinition.html b/org.eclipse.viatra2.help/sec_PatternDefinition.html
new file mode 100644
index 0000000..d4d1293
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_PatternDefinition.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>2.1.&nbsp;Pattern Definition</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_GraphPatterns.html" title="2.&nbsp;Graph Patterns"><link rel="prev" href="sec_GraphPatterns.html" title="2.&nbsp;Graph Patterns"><link rel="next" href="def_GraphPatternDef.html" title="2.1.1.&nbsp;Graph Pattern Definition"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">2.1.&nbsp;Pattern Definition</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_GraphPatterns.html">Prev</a>&nbsp;</td><th align="center" width="60%">2.&nbsp;Graph Patterns</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_GraphPatternDef.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_PatternDefinition"></a>2.1.&nbsp;Pattern Definition</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_GraphPatternDef.html">2.1.1. Graph Pattern Definition</a></span></dt><dt><span class="sect3"><a href="def_PatternBody.html">2.1.2. Pattern Body</a></span></dt><dt><span class="sect3"><a href="def_NegativePattern.html">2.1.3. Negative Pattern</a></span></dt><dt><span class="sect3"><a href="def_GraphPatternCall.html">2.1.4. Graph Pattern Call</a></span></dt><dt><span class="sect3"><a href="def_PatternComposition.html">2.1.5. Pattern Composition</a></span></dt><dt><span class="sect3"><a href="def_PatternVariable.html">2.1.6. Pattern Variable</a></span></dt><dt><span class="sect3"><a href="def_PatternVariableAssignment.html">2.1.7. Pattern Variable Assignment</a></span></dt><dt><span class="sect3"><a href="def_CheckCondition.html">2.1.8. Check Condition</a></span></dt><dt><span class="sect3"><a href="def_ContainmentConstraint.html">2.1.9. Containment Constraint</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_GraphPatterns.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_GraphPatterns.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_GraphPatternDef.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">2.&nbsp;Graph Patterns&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;2.1.1.&nbsp;Graph Pattern Definition</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_PostconditionRestriction.html b/org.eclipse.viatra2.help/sec_PostconditionRestriction.html
new file mode 100644
index 0000000..3e4e790
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_PostconditionRestriction.html
@@ -0,0 +1,54 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3.3.1.&nbsp;Restrictions of model elements used in postcondition patterns</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_GTRuleBehaviour.html" title="3.3.&nbsp;Behavioural Specification of Graph Transformation Rules"><link rel="prev" href="sec_GTRuleBehaviour.html" title="3.3.&nbsp;Behavioural Specification of Graph Transformation Rules"><link rel="next" href="sec_PostconditionSpec.html" title="3.3.2.&nbsp;Complete behavioral specification of postcondition patterns"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">3.3.1.&nbsp;Restrictions of model elements used in postcondition patterns</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_GTRuleBehaviour.html">Prev</a>&nbsp;</td><th align="center" width="60%">3.3.&nbsp;Behavioural Specification of Graph Transformation Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_PostconditionSpec.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="sec_PostconditionRestriction"></a>3.3.1.&nbsp;Restrictions of model elements used in postcondition patterns</h4></div></div></div><p>

+Compared to the precondition <a href="def_PatternBody.html" title="2.1.2.&nbsp;Pattern Body">pattern body</a> processed by the pattern matching 

+engine, the body of postcondition pattern is allowed to use a restricted set of 

+model elements. The following elements are not allowed to appear in the pattern 

+body. 

+</p><div class="itemizedlist"><ul type="disc"><li><p>

+				<span class="emphasis"><em>Relationship definitions</em></span>

+				(i.e.	<code class="computeroutput">supertypeOf</code>,

+				<code class="computeroutput">subtypeOf</code>,

+				<code class="computeroutput">instanceOf</code>,

+				<code class="computeroutput">typeOf</code>). 

+				As a consequence, the manipulation of relationships can only be carried out in the action part of a

+				GT rule by ASM model manipulation rules.

+			</p></li><li><p>

+				<span class="emphasis"><em>Negative patterns</em></span>;

+			</p></li><li><p>

+				<span class="emphasis"><em>OR patterns</em></span>;

+			</p></li><li><p>

+				<span class="emphasis"><em>Recursive pattern composition</em></span>;

+			</p></li><li><p>

+				<span class="emphasis"><em>Pattern variable assignments</em></span>;

+			</p></li><li><p>

+				<span class="emphasis"><em>Check conditions</em></span>;

+			</p></li></ul></div><p>

+If any of these forbidden constructs are used locally in the 

+postcondition pattern, then the parser should issue an error message. 

+However, in order to facilitate reuse of predefined patterns, if forbidden 

+constructs appear in a predefined pattern used in the postcondition, then 

+these constructs are ignored during execution, and a warning is issued at 

+compile time. 

+</p><p>

+In other terms, the postcondition pattern may contain an <a href="def_Entity.html" title="2.2.1.&nbsp;Entity">entity</a>, 

+a <a href="def_Relation.html" title="2.2.2.&nbsp;Relation">relation</a>, <a href="def_ContainmentConstraint.html" title="2.1.9.&nbsp;Containment Constraint">containment constraints</a> and 

+(non-recursive) <a href="def_PatternComposition.html" title="2.1.5.&nbsp;Pattern Composition">pattern composition</a>. 

+</p><p>

+The only part where the postcondition pattern is more permissive compared to the 

+precondition pattern is related to containment constraints. The following piece 

+of VTCL code is valid in the precondition only if <code class="computeroutput">X </code>is a priori ground. 

+</p><pre class="programlisting">

+entity(X); 

+entity(Y) in X; 

+</pre><p>

+However, in case of postcondition patterns, both entity <code class="computeroutput">X </code>and <code class="computeroutput">Y </code>can be 

+unbound, i.e. they are created within the same step, and <code class="computeroutput">X </code>can be set as the 

+parent of <code class="computeroutput">Y </code>. 

+</p><p>

+In case of (non-recursive) pattern composition appearing in the postcondition, 

+the behaviour is equivalent to as if we had a flattened pattern by copying and 

+merging model elements from the subpatterns. 

+</p><p>

+In the sequel, we assume that this flattening is already carried out, and we 

+refer to any of these elements as part of the postcondition (and not only 

+locally defined ones). 

+</p></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_GTRuleBehaviour.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_GTRuleBehaviour.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_PostconditionSpec.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">3.3.&nbsp;Behavioural Specification of Graph Transformation Rules&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;3.3.2.&nbsp;Complete behavioral specification of postcondition patterns</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_PostconditionSpec.html b/org.eclipse.viatra2.help/sec_PostconditionSpec.html
new file mode 100644
index 0000000..95d53d2
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_PostconditionSpec.html
@@ -0,0 +1,113 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3.3.2.&nbsp;Complete behavioral specification of postcondition patterns</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_GTRuleBehaviour.html" title="3.3.&nbsp;Behavioural Specification of Graph Transformation Rules"><link rel="prev" href="sec_PostconditionRestriction.html" title="3.3.1.&nbsp;Restrictions of model elements used in postcondition patterns"><link rel="next" href="sec_ConflictHandling.html" title="3.3.3.&nbsp;Handling of conflicts"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">3.3.2.&nbsp;Complete behavioral specification of postcondition patterns</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_PostconditionRestriction.html">Prev</a>&nbsp;</td><th align="center" width="60%">3.3.&nbsp;Behavioural Specification of Graph Transformation Rules</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_ConflictHandling.html">Next</a></td></tr></table><hr></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="sec_PostconditionSpec"></a>3.3.2.&nbsp;Complete behavioral specification of postcondition patterns</h4></div></div></div><p>

+The behavior defined by a (flattened) postcondition pattern can be specified 

+based upon (i) the model elements of the pattern body (ii) variable bindings, 

+and (iii) containment constraints. 

+</p><p>

+An <span class="emphasis"><em>effect set</em></span> will contain elementary model manipulations 

+prescribed by the postcondition of the GT rule. Furthermore, the <span class="emphasis"><em>check set</em></span>

+contains additional constraints that need to be validated after executing 

+the model manipulations steps prescribed by the postcondition pattern. If both 

+sets are free of conflicts, then the GT rule has a valid result, otherwise a 

+run-time exception is thrown. 

+</p><p>

+As the first step, the manipulation of entities are handled in the following 

+way: 

+</p><pre class="programlisting">

+// Handling of entities 

+if (X is a parameter of the postcondition pattern bound to an entity) 

+  if (myEntityType(X) appears in the pattern body) 

+    add keep(X) to the effect set 

+    add instanceOf(X, myEntityType) to the check set 

+  else 

+    add deleteEntity(X) to the effect set 

+    // Delete all dangling incoming and outgoing relations 

+    forall R with (R.from = X OR R.to = X) do 

+       add deleteRelation(R) // move_content semantics: the children of X are preserved 

+    // Delete all dangling relationships 

+    forall Y with (supertypeOf(X,Y)) do 

+       add 'deleteSupertypeOf(X, Y)' to the effect set 

+    forall Y with (supertypeOf(Y,X)) do 

+       add 'deleteSupertypeOf(Y, X)' to the effect set 

+    forall Y with (instanceOf(X,Y)) do

+       add 'deleteInstanceOf(X, Y)' to the effect set 

+    forall Y with (instanceOf(Y,X)) do 

+       add 'deleteInstanceOf(Y, X)' to the effect set 

+else if (X is not a parameter of the postcondition pattern OR 

+         X is a parameter of the postcondition but not ground) 

+  if (myEntityType(X) appears in the pattern body) 

+    parameter X becomes ground to a new unique name 

+    add 'newEntity(X)' to the effect set 

+    add 'newInstanceOf(X, myEntityType)' to the effect set 

+</pre><p>

+As a second step, relations are resolved by iterating the following steps. 

+</p><pre class="programlisting">

+// Handling of relations 

+if (R is a parameter of the postcondition pattern bound to a relation) 

+  if (myRelationType(R, A, B) appears in the pattern body) 

+    if (A and B are ground parameters) 

+      add keep(R) to the effect set 

+      if (A != R.from) add 'setFrom(R, A)' to the effect set 

+      if (B != R.to) add 'setTo(R, B)' to the effect set 

+      add 'instanceOf(R, myRelationType)' to the check set 

+// The following lines handle aggregation relations 

+    if (myRelationType is an aggregation AND both A and B are entities) 

+      add 'move(B, A)' to the effect set // A becomes parent of B 

+    else 

+      RuntimeException: A/B is not ground to a valid model element 

+  else 

+    add 'deleteRelation(R)' to the effect set 

+else if (R is not a parameter of the postcondition pattern OR 

+         R is a parameter of the postcondition but not ground) 

+  if (myRelationType(R, A, B) appears in the pattern body AND 

+      both A and B are ground) 

+    parameter R becomes ground to a new unique name 

+    add 'newRelation(R, A, B)' to the effect set 

+    add 'newInstanceOf(R, myRelationType)' to the effect set 

+// The following lines handle aggregation relations 

+    if (myRelationType is an aggregation AND both A and B are entities) 

+      add 'move(B, A)' to the effect set // A becomes parent of B 

+  else 

+    RuntimeException: A/B is not ground to a valid model element 

+</pre><p>

+Finally, entities are moved to appropriate parents in the containment 

+hierarchy according to the containment constraints. It is worth pointing out 

+that if the creation of an entity is prescribed by the 

+rule, then there is only a single <code class="computeroutput">below</code>

+containment constraint 

+defined for this model element, then the new element is assigned like in case of 

+an <code class="computeroutput">below</code>

+containment constraint. 

+</p><pre class="programlisting">

+// Moving entities 

+if (myEntityType(X) in M appears in the pattern body) 

+  add 'move(X,M)' to the effect set 

+if (myEntityType(X) below M appears in the pattern body) 

+  if (there are no move operations in the effect set AND 

+      there are no other below constraints defined for X AND 

+      entity X is created by the rule) 

+    add 'move(X,M)' to the effect set 

+  else 

+    add 'ancestorOf(X,M)' to the check set 

+</pre><p>

+The GT engine first collects all the effects prescribed in the <span class="emphasis"><em>effect set</em></span>

+for a certain matching, and executes them as a single atomic step. Within this 

+atomic step, causalities of creations are respected, i.e. a relation can be 

+created even if its source or target is created within the same step. 

+</p><p>

+Relationship definitions (i.e. <code class="computeroutput">supertypeOf</code>, 

+<code class="computeroutput">subtypeOf</code>, 

+<code class="computeroutput">instanceOf</code>, 

+<code class="computeroutput">typeOf</code>) can be checked by the postcondition, 

+but they can only be manipulated explicitly in the action part. However, if a 

+model element (entity or relation) is deleted then all incoming and outgoing 

+relationships are implicitly removed as well to avoid dangling relationships 

+leading out or into a non-existing model element. Furthermore, a new 

+<code class="computeroutput">instanceOf</code>

+relationship is created whenever creating a new model 

+element corresponding to its type. 

+</p><div class="highlights"><a name="def_GTRuleBehaviour_Remark"></a><p><b>Remark.&nbsp;</b>

+Note that if two model elements appear in both the precondition and the 

+postcondition with identical variable names, they are only identical, if both 

+variables appear as parameters of the precondition and the postcondition 

+pattern. Otherwise, a new model element is created. 

+</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_PostconditionRestriction.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_GTRuleBehaviour.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_ConflictHandling.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">3.3.1.&nbsp;Restrictions of model elements used in postcondition patterns&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;3.3.3.&nbsp;Handling of conflicts</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_PredefinedFunctions.html b/org.eclipse.viatra2.help/sec_PredefinedFunctions.html
new file mode 100644
index 0000000..4725dae
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_PredefinedFunctions.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.6.&nbsp;Predefined Functions</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_ASMTermsFormulas.html" title="5.&nbsp;ASM Terms and ASM Functions"><link rel="prev" href="def_AsmFunctionLocation.html" title="5.5.3.&nbsp;ASM Function Location"><link rel="next" href="def_PredefinedFunctionCall.html" title="5.6.1.&nbsp;Predefined Function Call"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.6.&nbsp;Predefined Functions</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_AsmFunctionLocation.html">Prev</a>&nbsp;</td><th align="center" width="60%">5.&nbsp;ASM Terms and ASM Functions</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_PredefinedFunctionCall.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_PredefinedFunctions"></a>5.6.&nbsp;Predefined Functions</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_PredefinedFunctionCall.html">5.6.1. Predefined Function Call</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_AsmFunctionLocation.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_ASMTermsFormulas.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_PredefinedFunctionCall.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.5.3.&nbsp;ASM Function Location&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;5.6.1.&nbsp;Predefined Function Call</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_TokensOverview.html b/org.eclipse.viatra2.help/sec_TokensOverview.html
new file mode 100644
index 0000000..c922a48
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_TokensOverview.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>6.1.&nbsp;VTCL tokens: An Overview</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_VTCLTokens.html" title="6.&nbsp;Tokens in the VTCL Language"><link rel="prev" href="sec_VTCLTokens.html" title="6.&nbsp;Tokens in the VTCL Language"><link rel="next" href="def_Token.html" title="6.1.1.&nbsp;Tokens"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">6.1.&nbsp;VTCL tokens: An Overview</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_VTCLTokens.html">Prev</a>&nbsp;</td><th align="center" width="60%">6.&nbsp;Tokens in the VTCL Language</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_Token.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_TokensOverview"></a>6.1.&nbsp;VTCL tokens: An Overview</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_Token.html">6.1.1. Tokens</a></span></dt><dt><span class="sect3"><a href="def_VTCLKeywords.html">6.1.2. Keywords</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_VTCLTokens.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_VTCLTokens.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_Token.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">6.&nbsp;Tokens in the VTCL Language&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;6.1.1.&nbsp;Tokens</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_VTCLSpec.html b/org.eclipse.viatra2.help/sec_VTCLSpec.html
new file mode 100644
index 0000000..ca02ff7
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_VTCLSpec.html
@@ -0,0 +1,9 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter&nbsp;2.&nbsp;Viatra Textual Command Language (VTCL) Specification</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="prev" href="sec_FAQ.html" title="2.2.&nbsp;Frequently Asked Questions (FAQ)"><link rel="next" href="sec_MainVtclConcepts.html" title="1.&nbsp;VTCL Files and Machines (Transformations)"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">Chapter&nbsp;2.&nbsp;Viatra Textual Command Language (VTCL) Specification</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_FAQ.html">Prev</a>&nbsp;</td><th align="center" width="60%">&nbsp;</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_MainVtclConcepts.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="sec_VTCLSpec"></a>Chapter&nbsp;2.&nbsp;Viatra Textual Command Language (VTCL) Specification</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="sec_MainVtclConcepts.html">1. VTCL Files and Machines (Transformations)</a></span></dt><dd><dl><dt><span class="sect2"><a href="sec_VtclFile.html">1.1. VTCL Files</a></span></dt><dt><span class="sect2"><a href="sec_MachineDefinition.html">1.2. Machine Definition</a></span></dt></dl></dd><dt><span class="sect1"><a href="sec_GraphPatterns.html">2. Graph Patterns</a></span></dt><dd><dl><dt><span class="sect2"><a href="sec_PatternDefinition.html">2.1. Pattern Definition</a></span></dt><dt><span class="sect2"><a href="sec_LocalPatternlElementDescription.html">2.2. Local Pattern Body Elements</a></span></dt></dl></dd><dt><span class="sect1"><a href="sec_GraphTransformations.html">3. Graph Transformation Rules</a></span></dt><dd><dl><dt><span class="sect2"><a href="sec_DefGTRule.html">3.1. Definition of Graph Transformation Rules</a></span></dt><dt><span class="sect2"><a href="sec_GTParamPass.html">3.2. Parameter passing at Graph Transformation Rules</a></span></dt><dt><span class="sect2"><a href="sec_GTRuleBehaviour.html">3.3. Behavioural Specification of Graph Transformation Rules</a></span></dt><dt><span class="sect2"><a href="sec_InvokeGTRule.html">3.4. Invocation of Graph Transformation Rules</a></span></dt></dl></dd><dt><span class="sect1"><a href="sec_ASMRules.html">4. ASM Rules</a></span></dt><dd><dl><dt><span class="sect2"><a href="sec_DefASMRule.html">4.1. ASM Rule Definition and Invocation</a></span></dt><dt><span class="sect2"><a href="sec_ASMSimpleRules.html">4.2. Simple ASM Rules</a></span></dt><dt><span class="sect2"><a href="sec_ASMCompoundRules.html">4.3. Compound ASM Rules</a></span></dt><dt><span class="sect2"><a href="sec_ASMModelManipulationRules.html">4.4. Model Manipulation Rules</a></span></dt></dl></dd><dt><span class="sect1"><a href="sec_ASMTermsFormulas.html">5. ASM Terms and ASM Functions</a></span></dt><dd><dl><dt><span class="sect2"><a href="sec_ASMTerms.html">5.1. ASM Terms: An Overview</a></span></dt><dt><span class="sect2"><a href="sec_ASMLogicalTerms.html">5.2. Logical Terms</a></span></dt><dt><span class="sect2"><a href="sec_ASMArithmeticTerms.html">5.3. Arithmetic Terms</a></span></dt><dt><span class="sect2"><a href="sec_ASMConstants.html">5.4. Constants</a></span></dt><dt><span class="sect2"><a href="sec_ASMFunctions.html">5.5. ASM Functions</a></span></dt><dt><span class="sect2"><a href="sec_PredefinedFunctions.html">5.6. Predefined Functions</a></span></dt><dt><span class="sect2"><a href="sec_NamingVariables.html">5.7. Naming and Variables</a></span></dt><dt><span class="sect2"><a href="sec_Parameters.html">5.8. Parameters and Variable Lists</a></span></dt></dl></dd><dt><span class="sect1"><a href="sec_VTCLTokens.html">6. Tokens in the VTCL Language</a></span></dt><dd><dl><dt><span class="sect2"><a href="sec_TokensOverview.html">6.1. VTCL tokens: An Overview</a></span></dt><dt><span class="sect2"><a href="sec_NameTokens.html">6.2. Tokens for names and strings</a></span></dt><dt><span class="sect2"><a href="sec_NumberTokens.html">6.3. Tokens for numbers</a></span></dt></dl></dd></dl></div><p>

+		The Viatra Textual Command Language (VTCL) is the primary

+		transformation definition language for the VIATRA2 framework. 

+		Developers can use this language for the definition of model

+		transformations and code generators. The language combines the 

+		formalism of graph transformation (GT) rules and Abstract State Machine (ASM) rule

+		into a single paradigm. This chapter introduces the constructs

+		of the language.

+	</p></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_FAQ.html">Prev</a>&nbsp;</td><td align="center" width="20%">&nbsp;</td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_MainVtclConcepts.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">2.2.&nbsp;Frequently Asked Questions (FAQ)&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;1.&nbsp;VTCL Files and Machines (Transformations)</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_VTCLTokens.html b/org.eclipse.viatra2.help/sec_VTCLTokens.html
new file mode 100644
index 0000000..8c87990
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_VTCLTokens.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>6.&nbsp;Tokens in the VTCL Language</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_VTCLSpec.html" title="Chapter&nbsp;2.&nbsp;Viatra Textual Command Language (VTCL) Specification"><link rel="prev" href="def_ConstrainedVariableList.html" title="5.8.4.&nbsp;Constrained Variable List"><link rel="next" href="sec_TokensOverview.html" title="6.1.&nbsp;VTCL tokens: An Overview"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">6.&nbsp;Tokens in the VTCL Language</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_ConstrainedVariableList.html">Prev</a>&nbsp;</td><th align="center" width="60%">Chapter&nbsp;2.&nbsp;Viatra Textual Command Language (VTCL) Specification</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="sec_TokensOverview.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec_VTCLTokens"></a>6.&nbsp;Tokens in the VTCL Language</h2></div></div></div><div class="toc"><dl><dt><span class="sect2"><a href="sec_TokensOverview.html">6.1. VTCL tokens: An Overview</a></span></dt><dt><span class="sect2"><a href="sec_NameTokens.html">6.2. Tokens for names and strings</a></span></dt><dt><span class="sect2"><a href="sec_NumberTokens.html">6.3. Tokens for numbers</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_ConstrainedVariableList.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_VTCLSpec.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="sec_TokensOverview.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">5.8.4.&nbsp;Constrained Variable List&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;6.1.&nbsp;VTCL tokens: An Overview</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_VtclFile.html b/org.eclipse.viatra2.help/sec_VtclFile.html
new file mode 100644
index 0000000..5ef1c76
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_VtclFile.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>1.1.&nbsp;VTCL Files</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="sec_MainVtclConcepts.html" title="1.&nbsp;VTCL Files and Machines (Transformations)"><link rel="prev" href="sec_MainVtclConcepts.html" title="1.&nbsp;VTCL Files and Machines (Transformations)"><link rel="next" href="def_VtclFile.html" title="1.1.1.&nbsp;VTCL file"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">1.1.&nbsp;VTCL Files</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="sec_MainVtclConcepts.html">Prev</a>&nbsp;</td><th align="center" width="60%">1.&nbsp;VTCL Files and Machines (Transformations)</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="def_VtclFile.html">Next</a></td></tr></table><hr></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sec_VtclFile"></a>1.1.&nbsp;VTCL Files</h3></div></div></div><div class="toc"><dl><dt><span class="sect3"><a href="def_VtclFile.html">1.1.1. VTCL file</a></span></dt><dt><span class="sect3"><a href="def_NamespaceDefinition.html">1.1.2. Namespace Definition</a></span></dt><dt><span class="sect3"><a href="def_NamespaceImport.html">1.1.3. Namespace Import</a></span></dt></dl></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="sec_MainVtclConcepts.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="sec_MainVtclConcepts.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="def_VtclFile.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">1.&nbsp;VTCL Files and Machines (Transformations)&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;1.1.1.&nbsp;VTCL file</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/sec_index.html b/org.eclipse.viatra2.help/sec_index.html
new file mode 100644
index 0000000..a5d027a
--- /dev/null
+++ b/org.eclipse.viatra2.help/sec_index.html
@@ -0,0 +1 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Index</title><link href="style.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.72.0" name="generator"><link rel="start" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="up" href="index.html" title="The VIATRA2 Model Transformation Framework"><link rel="prev" href="def_FloatLiteral.html" title="6.3.2.&nbsp;Float Literal"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">Index</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="def_FloatLiteral.html">Prev</a>&nbsp;</td><th align="center" width="60%">&nbsp;</th><td align="right" width="20%">&nbsp;</td></tr></table><hr></div><div class="index"><div class="titlepage"><div><div><h2 class="title"><a name="sec_index"></a>Index</h2></div></div></div><div class="index"><div class="indexdiv"><h3>A</h3><dl><dt>action, <a href="def_GTRuleDef.html">Graph Transformation Rule Definition</a></dt><dt>actions, <a href="def_GTRuleDef.html">Graph Transformation Rule Definition</a></dt><dt>actual parameter, <a href="def_ActualParameter.html">Actual Parameters</a></dt><dt>annotation, <a href="def_Annotation.html">Annotation</a></dt><dt>arithmetic term, <a href="def_ArithmeticTerm.html">Arithmetic Term</a></dt><dd><dl><dt>multiplicative, <a href="def_MultArithmeticTerm.html">Multiplicative   Arithmetic Term</a></dt><dt>unary, <a href="def_UnaryArithmeticTerm.html">Unary Arithmetic Term</a></dt></dl></dd><dt>arity, <a href="def_GraphPatternCall.html">Graph Pattern Call</a>, <a href="def_AsmFunctionDef.html">ASM Function Definition</a></dt><dt>ASM constant, <a href="def_AsmConstant.html">ASM Constant (Value)</a></dt><dd><dl><dt>boolean, <a href="def_BooleanConstant.html">Boolean Constant</a></dt><dt>float, <a href="def_FloatConstant.html">Float Constant</a></dt><dt>integer, <a href="def_IntConstant.html">Integer Constants</a></dt><dt>model element, <a href="def_ModelElementConstant.html">Model Element Constant</a></dt><dt>multiplicity, <a href="def_MultiplicityConstant.html">Multiplicity Constant</a></dt><dt>string, <a href="def_StringConstant.html">String Constant</a></dt></dl></dd><dt>ASM function</dt><dd><dl><dt>arity, <a href="def_AsmFunctionDef.html">ASM Function Definition</a></dt><dt>definition, <a href="def_AsmFunctionDef.html">ASM Function Definition</a></dt><dt>location, <a href="def_AsmFunctionLocation.html">ASM Function Location</a></dt><dt>native, <a href="def_PredefinedFunctionCall.html">Predefined Function Call</a></dt></dl></dd><dt>ASM rule</dt><dd><dl><dt>definition, <a href="def_AsmRuleDef.html">ASM Rule Definition</a></dt><dt>invocation, <a href="def_AsmRuleInvoc.html">ASM Rule Invocation</a></dt><dt>simple, <a href="def_SimpleRule.html">Simple Rule</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>B</h3><dl><dt>base arithmetic term, <a href="def_BaseArithmeticTerm.html">Base Arithmetic Term</a></dt><dt>base logical term, <a href="def_BaseLogicalTerm.html">Base Logical Term</a></dt><dt>boolean constant, <a href="def_BooleanConstant.html">Boolean Constant</a></dt></dl></div><div class="indexdiv"><h3>C</h3><dl><dt>call rule, <a href="def_CallRule.html">Call Rule</a></dt><dt>check condition, <a href="def_CheckCondition.html">Check Condition</a></dt><dt>choose rule, <a href="def_GraphPatternDef.html">Graph Pattern Definition</a>, <a href="def_ChooseRule.html">Choose Rule</a></dt><dt>compound rule, <a href="def_CompoundRule.html">Compound Rule</a></dt><dt>constant</dt><dd><dl><dt>undefined, <a href="def_UndefinedValue.html">Undefined Value</a></dt></dl></dd><dt>constrained variable list, <a href="def_ConstrainedVariableList.html">Constrained Variable List</a></dt><dt>container, <a href="def_ContainmentConstraint.html">Containment Constraint</a>, <a href="def_Entity.html">Entity</a></dt><dt>containment constraint, <a href="def_ContainmentConstraint.html">Containment Constraint</a></dt><dt>copy semantics, <a href="def_CopyRule.html">Copy Rule</a></dt><dt>create rule, <a href="def_CreateRule.html">Create Rule</a></dt></dl></div><div class="indexdiv"><h3>D</h3><dl><dt>delete rule, <a href="def_DeleteRule.html">Delete Rule</a></dt><dt>delete semantics, <a href="def_DeleteRule.html">Delete Rule</a></dt><dt>directed formal parameter, <a href="def_DirectedFormalParameter.html">Directed Formal Parameters</a></dt></dl></div><div class="indexdiv"><h3>E</h3><dl><dt>element update rule, <a href="def_ElementUpdateRule.html">Element Update   Rule</a></dt><dt>entity, <a href="def_Entity.html">Entity</a></dt><dt>entity type, <a href="def_Entity.html">Entity</a></dt><dt>escape sequences</dt><dd><dl><dt>string, <a href="def_StringConstant.html">String Constant</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>F</h3><dl><dt>fail rule, <a href="def_FailRule.html">Fail Rule</a></dt><dt>Float constant, <a href="def_FloatConstant.html">Float Constant</a></dt><dt>float literal, <a href="def_FloatLiteral.html">Float Literal</a></dt><dt>forall rule, <a href="def_GraphPatternDef.html">Graph Pattern Definition</a>, <a href="def_ForallRule.html">Forall Rule</a></dt><dt>formal parameter, <a href="def_FormalParameter.html">Formal Parameters</a></dt></dl></div><div class="indexdiv"><h3>G</h3><dl><dt>graph pattern call, <a href="def_GraphPatternCall.html">Graph Pattern Call</a></dt><dt>graph pattern name, <a href="def_GraphPatternCall.html">Graph Pattern Call</a></dt><dt>Graph transformation, <a href="def_GTRuleDef.html">Graph Transformation Rule Definition</a></dt><dt>GT rule</dt><dd><dl><dt>name, <a href="def_GTRuleCall.html">GTRule Call</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>I</h3><dl><dt>identifier, <a href="def_Identifier.html">Identifier</a></dt><dt>if rule, <a href="def_IfRule.html">If Rule</a></dt><dt>initial value, <a href="def_InitialValue.html">Initial Value</a></dt><dt>Integer constant, <a href="def_IntConstant.html">Integer Constants</a></dt><dt>integer literal, <a href="def_IntegerLiteral.html">Integer Literal</a></dt><dt>iterate rule, <a href="def_IterateRule.html">Iterate Rule</a></dt></dl></div><div class="indexdiv"><h3>L</h3><dl><dt>let rule, <a href="def_LetRule.html">Let Rule</a></dt><dt>literal</dt><dd><dl><dt>float, <a href="def_FloatLiteral.html">Float Literal</a></dt><dt>integer, <a href="def_IntegerLiteral.html">Integer Literal</a></dt><dt>string, <a href="def_StringLiteral.html">String Literal</a></dt><dt>upper case, <a href="def_UpperCaseLiteral.html">UpperCase Literal</a></dt></dl></dd><dt>local pattern body elements, <a href="def_PatternBody.html">Pattern Body</a></dt><dt>logical term, <a href="def_LogicalTerm.html">Logical Term</a></dt><dd><dl><dt>base, <a href="def_BaseLogicalTerm.html">Base Logical Term</a></dt><dt>conjunctive, <a href="def_ConjLogicalTerm.html">Conjunctive Logical Term (Logical And Term)</a></dt></dl></dd><dt>log level, <a href="def_LogRule.html">Log Rule</a></dt><dt>log rule, <a href="def_LogRule.html">Log Rule</a></dt></dl></div><div class="indexdiv"><h3>M</h3><dl><dt>model element, <a href="def_PatternBody.html">Pattern Body</a></dt><dt>model element constant, <a href="def_ModelElementConstant.html">Model Element Constant</a></dt><dt>model element name, <a href="def_ModelElementName.html">Model Element Name</a></dt><dt>Model elements, <a href="def_PatternBody.html">Pattern Body</a></dt><dt>move rule, <a href="def_MoveRule.html">Move Rule</a></dt><dt>multiplicity constant, <a href="def_MultiplicityConstant.html">Multiplicity Constant</a></dt></dl></div><div class="indexdiv"><h3>N</h3><dl><dt>namespace</dt><dd><dl><dt>definition, <a href="def_NamespaceDefinition.html">Namespace Definition</a></dt><dt>import, <a href="def_NamespaceImport.html">Namespace Import</a></dt></dl></dd><dt>native function, <a href="def_PredefinedFunctionCall.html">Predefined Function Call</a></dt><dt>negative pattern, <a href="def_NegativePattern.html">Negative Pattern</a></dt></dl></div><div class="indexdiv"><h3>O</h3><dl><dt>octal digit, <a href="def_IntConstant.html">Integer Constants</a></dt></dl></div><div class="indexdiv"><h3>P</h3><dl><dt>parallel rule, <a href="def_ParallelRule.html">Parallel Rule</a></dt><dt>parameter</dt><dd><dl><dt>actual, <a href="def_ActualParameter.html">Actual Parameters</a></dt><dt>directed formal, <a href="def_DirectedFormalParameter.html">Directed Formal Parameters</a></dt><dt>formal, <a href="def_FormalParameter.html">Formal Parameters</a></dt><dt>inout, <a href="sec_GTParamPass.html">Parameter passing at Graph Transformation Rules</a></dt><dt>input, <a href="sec_GTParamPass.html">Parameter passing at Graph Transformation Rules</a></dt><dt>output, <a href="sec_GTParamPass.html">Parameter passing at Graph Transformation Rules</a></dt></dl></dd><dt>Pattern body, <a href="def_PatternBody.html">Pattern Body</a></dt><dt>pattern body, <a href="def_PatternBody.html">Pattern Body</a></dt><dt>Pattern composition, <a href="def_PatternComposition.html">Pattern Composition</a></dt><dt>pattern composition, <a href="def_PatternComposition.html">Pattern Composition</a></dt><dt>Pattern variable, <a href="def_PatternVariable.html">Pattern Variable</a></dt><dt>pattern variable, <a href="def_PatternVariable.html">Pattern Variable</a></dt><dd><dl><dt>definition, <a href="def_PatternVariable.html">Pattern Variable</a></dt><dt>reference, <a href="def_PatternVariable.html">Pattern Variable</a></dt></dl></dd><dt>pattern variable assignment, <a href="def_PatternVariableAssignment.html">Pattern Variable Assignment</a></dt><dt>postcondition, <a href="def_GTRuleDef.html">Graph Transformation Rule Definition</a></dt><dt>precondition, <a href="def_GTRuleDef.html">Graph Transformation Rule Definition</a></dt><dt>print rule, <a href="def_PrintRule.html">Print Rule</a></dt></dl></div><div class="indexdiv"><h3>R</h3><dl><dt>random rule, <a href="def_RandomRule.html">Random Rule</a></dt><dt>relation, <a href="def_Relation.html">Relation</a></dt><dd><dl><dt>type, <a href="def_Relation.html">Relation</a></dt></dl></dd><dt>relationship, <a href="def_Relationship.html">Relationships</a></dt><dd><dl><dt>inheritance, <a href="def_Relationship.html">Relationships</a></dt><dt>instantiation, <a href="def_Relationship.html">Relationships</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>S</h3><dl><dt>sequential rule, <a href="def_SequentialRule.html">Sequential Rule</a></dt><dt>skip rule, <a href="def_SkipRule.html">Skip Rule</a></dt><dt>string constant, <a href="def_StringConstant.html">String Constant</a></dt><dt>string literal, <a href="def_StringLiteral.html">String Literal</a></dt></dl></div><div class="indexdiv"><h3>T</h3><dl><dt>term</dt><dd><dl><dt>arithmetic, <a href="def_ArithmeticTerm.html">Arithmetic Term</a></dt><dt>logical, <a href="def_LogicalTerm.html">Logical Term</a></dt></dl></dd><dt>token, <a href="def_Token.html">Tokens</a></dt><dt>try rule, <a href="def_TryRule.html">Try Rule</a></dt></dl></div><div class="indexdiv"><h3>U</h3><dl><dt>unary arithmetic term, <a href="def_UnaryArithmeticTerm.html">Unary Arithmetic Term</a></dt><dt>undefined value, <a href="def_UndefinedValue.html">Undefined Value</a></dt><dt>update rule, <a href="def_UpdateRule.html">Update Rule</a></dt><dt>upper case literal, <a href="def_UpperCaseLiteral.html">UpperCase Literal</a></dt></dl></div><div class="indexdiv"><h3>V</h3><dl><dt>value, <a href="def_Entity.html">Entity</a></dt><dt>variable</dt><dd><dl><dt>ASM, <a href="def_Variable.html">Variable</a></dt><dt>pattern, <a href="def_PatternVariable.html">Pattern Variable</a></dt></dl></dd><dt>Variable, <a href="def_PatternVariable.html">Pattern Variable</a></dt><dt>VTCL file, <a href="def_VtclFile.html">VTCL file</a></dt></dl></div></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="def_FloatLiteral.html">Prev</a>&nbsp;</td><td align="center" width="20%">&nbsp;</td><td align="right" width="40%">&nbsp;</td></tr><tr><td valign="top" align="left" width="40%">6.3.2.&nbsp;Float Literal&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;</td></tr></table></div></body></html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/style.css b/org.eclipse.viatra2.help/style.css
new file mode 100644
index 0000000..3ed4565
--- /dev/null
+++ b/org.eclipse.viatra2.help/style.css
@@ -0,0 +1,341 @@
+/* VIATRA2 stylesheet for DocBook generated HTML                             */
+body
+{
+	color: #000;
+	background-color: #fff;
+
+	margin: auto;
+	padding: 24px;
+	width: auto;
+
+	text-align: justify;
+}
+
+
+body, p, dt, dd, td, li 
+{
+	font: 12px/18px Verdana, Helvetica, Arial;

+}
+
+
+p
+{
+	font: 12px/18px Verdana, Helvetica, Arial;
+  margin: 6pt 12px 6pt 12px;

+  padding-bottom: 6pt
+}
+

+
+img
+{
+  margin: 0;
+  padding: 3pt;
+  border: 0;
+}
+
+
+em
+{
+  font-weight: 600;
+  font-style: italic;
+}
+
+
+h2
+{
+	font-family: Verdana, Arial, Helvetica;
+	font-size: 125%;
+	font-weight: 600;
+	text-decoration: none;
+
+	/* foreground color: dark blue */
+	color: #009;
+
+	/* background color: gray */
+	/*background-color: #e8e8e8;*/ 
+	border-bottom: solid 2px;
+
+	margin: 15px 0 15px 0;
+
+	padding: 12px 15px 12px 15px;
+}
+
+

+/*
+div[class=section] * h2
+{
+	font-family: Verdana, Arial, Helvetica;
+	font-size: 110%;
+	font-weight: 600;
+	text-decoration: none;
+
+	color: #00A;
+
+	border-bottom: solid 1px;
+
+	padding: 0 0 0 15px;
+}
+*/

+
+h3
+{
+	font-family: Verdana, Arial, Helvetica;
+	font-size: 110%;
+	font-weight: 600;
+	text-decoration: underline;
+	color: #009;
+	/*background-color: #f0f0f0;*/ 
+	/*background-color: #ddd;*/ 

+	padding: 0 0 0 15px;
+}
+
+
+h4
+{
+	font-family: Verdana, Arial, Helvetica;
+	font-size: 100%;
+	font-weight: 600;
+	text-decoration: underline ;
+	color: #009;
+	/* background-color: #fefefe; */
+	padding: 0 0 0 15px;
+}
+
+
+h5
+{
+	font-family: Verdana, Arial, Helvetica;
+	font-size: 100%;
+	font-weight: 400;
+	text-decoration: underline  ;
+	color: #009;
+	/* background-color: #fefefe; */
+	padding: 0 0 0 15px;
+}
+
+
+
+.mediaobject
+{
+  text-align: center;
+}
+
+
+.calloutlist, .figure, .table
+{
+  margin: 15px 30px 15px 30px;
+}
+
+
+.itemizedlist, .variablelist {
+  margin: 15px 30px 15px 15px;
+}
+
+.blockquote
+{
+  margin-bottom: 30px;
+}
+
+.blockquote p, .blockquote td
+{
+	font: 12px/18px Verdana, Arial, Helvetica;
+  font-weight: 450;
+}
+
+
+.epigraph
+{
+  margin-bottom: 30px;
+}
+
+.epigraph p, .epigraph td
+{
+	font: 10px/14px Verdana, Arial, Helvetica;
+  font-weight: 600;
+}
+
+
+.navheader th, .navheader td, .navfooter th, .navfooter td, .navheader table, .navfooter table
+{
+  font-size: 11px;
+  font-weight: 450;
+  /*background-color: #def;*/

+  background-color: #bdd;

+  padding-bottom: 2pt;

+  padding-top: 2pt;

+  /*border-color: #fff;*/

+}
+
+
+.toc, .list-of-figures, .list-of-tables
+{
+  margin: 15px 30px 15px 15px;
+}
+
+
+.toc p, .list-of-figures p, .list-of-tables p
+{
+  margin: 0;
+}
+
+
+.figure
+{
+  margin: 5px 5px 5px 5px;
+  padding: 0;
+  border: 0;
+  text-align: center;
+}
+
+
+.figure p, .table p, .example p
+{
+  font-size: 80%;
+}
+
+pre.programlisting

+{

+	font-family: "Courier New", Courier, Monospace;

+	color: #000;

+  background-color: #ddd;

+	margin: 6pt;

+	border: 1px solid #ddd;

+	padding: 6px 6px 6px 6px;

+}

+

+/* title page */

+h1

+{

+	font-family: Verdana, Arial, Helvetica, Sans-Serif;

+	font-size: 150%;

+	font-weight: 600;

+	line-height: 250%;

+	text-align: center;

+	color: #009;

+	/*background-color: #ddd;*/

+	margin: 15px 0 15px 0;

+	padding: 0;

+}

+h3.author

+{

+	font: 12px/18px Verdana, Arial, Helvetica;

+	font-weight: 600;

+	text-decoration: none;

+	text-align: center;

+	color: #000;

+	background-color: #fefefe;

+  margin: 0 15px 15px 15px;

+  padding: 0;

+  border: 0;

+}

+.copyright, .pubdate

+{

+	font-family: Verdana, Arial, Helvetica;

+	font-size: 90%;

+  text-align: center;

+  margin: 15px 15px 15px 15px;

+  padding: 0;

+  border: 0;

+}

+

+div.legalnotice

+{

+	font-family: Verdana, Arial, Helvetica;

+  font-size: 80%;

+  color: #000;

+  background-color: #ccc;

+  margin: 15px 65px 15px 65px;

+  padding: 10px 10px 10px 10px;

+  border: 1px solid #000;

+}

+
+/* admonition headings */
+div.note, div.important, div.warning, div.caution, div.tip
+{
+  padding: 0px 15px 0px 0px;
+}
+
+div.note th, div.important th, div.warning th, div.caution th, div.tip th
+{
+	font: 12px/18px Verdana, Arial, Helvetica;
+  font-weight: 600;
+  text-decoration: underline;
+  text-align: left;
+}
+
+.note p, .important p, .warning p, .caution p, .tip p
+{
+  margin: 0;
+}
+
+.note img, .important img, .warning img, .caution img, .tip img
+{
+  margin: 0px 15px 0px 15px;
+}
+
+

+div.important

+{

+/*  background-color: #fff0f5;*/

+	background-color: #ffd;

+  border-style: solid;

+  border-width: 1px;

+  padding : 10px 10px 10px 10px;

+}

+

+div.note

+{

+  /*background-color: #eeeee0;*/

+  background-color: #eee;

+  border-style: solid;

+  border-width: 1px;

+  padding : 10px 10px 10px 10px;

+}

+

+div.warning

+{

+  background-color: #ffe4e1;

+  border-style: solid;

+  border-width: 1px;

+  padding : 10px 10px 10px 10px;

+}

+

+div.tip

+{

+	background-color: #dff;

+	/*background-color: #f0ffff;*/

+  border-style: solid;

+  border-width: 1px;

+  padding : 10px 10px 10px 10px;

+}

+

+div.caution

+{

+  background-color: #ffdab9;

+  border-style: solid;

+  border-width: 1px;

+  padding : 10px 10px 10px 10px;

+}

+

+div.highlights

+{

+  background-color: #ffffff;

+  border-style: solid;

+  border-width: 1px;

+  padding : 10px 10px 10px 10px;

+	margin-top: 6pt;

+}

+div.example 

+{

+  background-color: #ffffff;

+  border-style: solid;

+  border-width: 1px;

+  padding : 10px 10px 10px 10px;

+	margin-top: 6pt;

+}

+span.token 

+{

+	color: #00aa00;

+	font-weight: 600;

+	

+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.help/toc.xml b/org.eclipse.viatra2.help/toc.xml
new file mode 100644
index 0000000..7c8dc8e
--- /dev/null
+++ b/org.eclipse.viatra2.help/toc.xml
@@ -0,0 +1,149 @@
+<toc topic="index.html" label="The VIATRA2 Model Transformation Framework">

+	<topic href="sec_VTCLSpec.html"

+		label="Viatra Textual Command Language (VTCL) Specification">

+		<topic href="sec_MainVtclConcepts.html" label="VTCL Files and Machines (Transformations)">

+			<topic href="sec_VtclFile.html" label="VTCL Files">

+				<topic href="def_VtclFile.html" label="VTCL file"></topic>

+				<topic href="def_NamespaceDefinition.html" label="Namespace Definition"></topic>

+				<topic href="def_NamespaceImport.html" label="Namespace Import"></topic>

+			</topic>

+			<topic href="sec_MachineDefinition.html" label="Machine Definition">

+				<topic href="def_Machine.html" label="GTASM Machine Definition"></topic>

+				<topic href="def_Annotation.html" label="Annotation"></topic>

+			</topic>

+		</topic>

+		<topic href="sec_GraphPatterns.html" label="Graph Patterns">

+			<topic href="sec_PatternDefinition.html" label="Pattern Definition">

+				<topic href="def_GraphPatternDef.html" label="Graph Pattern Definition"></topic>

+				<topic href="def_PatternBody.html" label="Pattern Body"></topic>

+				<topic href="def_NegativePattern.html" label="Negative Pattern"></topic>

+				<topic href="def_GraphPatternCall.html" label="Graph Pattern Call"></topic>

+				<topic href="def_PatternComposition.html" label="Pattern Composition"></topic>

+				<topic href="def_PatternVariable.html" label="Pattern Variable"></topic>

+				<topic href="def_PatternVariableAssignment.html" label="Pattern Variable Assignment"></topic>

+				<topic href="def_CheckCondition.html" label="Check Condition"></topic>

+				<topic href="def_ContainmentConstraint.html" label="Containment Constraint"></topic>

+			</topic>

+			<topic href="sec_LocalPatternlElementDescription.html" label="Local Pattern Body Elements">

+				<topic href="def_Entity.html" label="Entity"></topic>

+				<topic href="def_Relation.html" label="Relation"></topic>

+				<topic href="def_Relationship.html" label="Relationships"></topic>

+			</topic>

+		</topic>

+		<topic href="sec_GraphTransformations.html" label="Graph Transformation Rules">

+			<topic href="sec_DefGTRule.html" label="Definition of Graph Transformation Rules">

+				<topic href="def_GTRuleDef.html" label="Graph Transformation Rule Definition"></topic>

+			</topic>

+			<topic href="sec_GTParamPass.html" label="Parameter passing at Graph Transformation Rules"></topic>

+			<topic href="sec_GTRuleBehaviour.html"

+				label="Behavioural Specification of Graph Transformation Rules">

+				<topic href="sec_PostconditionRestriction.html"

+					label="Restrictions of model elements used in postcondition patterns"></topic>

+				<topic href="sec_PostconditionSpec.html"

+					label="Complete behavioral specification of postcondition patterns"></topic>

+				<topic href="sec_ConflictHandling.html" label="Handling of conflicts"></topic>

+			</topic>

+			<topic href="sec_InvokeGTRule.html" label="Invocation of Graph Transformation Rules">

+				<topic href="def_GTRuleCall.html" label="GTRule Call"></topic>

+			</topic>

+		</topic>

+		<topic href="sec_ASMRules.html" label="ASM Rules">

+			<topic href="sec_DefASMRule.html" label="ASM Rule Definition and Invocation">

+				<topic href="def_AsmRuleDef.html" label="ASM Rule Definition"></topic>

+				<topic href="def_AsmRuleInvoc.html" label="ASM Rule Invocation"></topic>

+			</topic>

+			<topic href="sec_ASMSimpleRules.html" label="Simple ASM Rules">

+				<topic href="def_SimpleRule.html" label="Simple Rule"></topic>

+				<topic href="def_CallRule.html" label="Call Rule"></topic>

+				<topic href="def_SkipRule.html" label="Skip Rule"></topic>

+				<topic href="def_FailRule.html" label="Fail Rule"></topic>

+				<topic href="def_UpdateRule.html" label="Update Rule"></topic>

+				<topic href="def_PrintRule.html" label="Print Rule"></topic>

+				<topic href="def_LogRule.html" label="Log Rule"></topic>

+			</topic>

+			<topic href="sec_ASMCompoundRules.html" label="Compound ASM Rules">

+				<topic href="def_CompoundRule.html" label="Compound Rule"></topic>

+				<topic href="def_SequentialRule.html" label="Sequential Rule"></topic>

+				<topic href="def_ParallelRule.html" label="Parallel Rule"></topic>

+				<topic href="def_RandomRule.html" label="Random Rule"></topic>

+				<topic href="def_LetRule.html" label="Let Rule"></topic>

+				<topic href="def_ChooseRule.html" label="Choose Rule"></topic>

+				<topic href="def_ForallRule.html" label="Forall Rule"></topic>

+				<topic href="def_IterateRule.html" label="Iterate Rule"></topic>

+				<topic href="def_IfRule.html" label="If Rule"></topic>

+				<topic href="def_TryRule.html" label="Try Rule"></topic>

+			</topic>

+			<topic href="sec_ASMModelManipulationRules.html" label="Model Manipulation Rules">

+				<topic href="def_ModelManipulationRule.html" label="Model Manipulation Rule"></topic>

+				<topic href="def_CreateRule.html" label="Create Rule"></topic>

+				<topic href="def_DeleteRule.html" label="Delete Rule"></topic>

+				<topic href="def_CopyRule.html" label="Copy Rule"></topic>

+				<topic href="def_MoveRule.html" label="Move Rule"></topic>

+				<topic href="def_ElementUpdateRule.html" label="Element Update   Rule"></topic>

+			</topic>

+		</topic>

+		<topic href="sec_ASMTermsFormulas.html" label="ASM Terms and ASM Functions">

+			<topic href="sec_ASMTerms.html" label="ASM Terms: An Overview">

+				<topic href="def_Term.html" label="ASM Term"></topic>

+			</topic>

+			<topic href="sec_ASMLogicalTerms.html" label="Logical Terms">

+				<topic href="def_LogicalTerm.html" label="Logical Term"></topic>

+				<topic href="def_ConjLogicalTerm.html" label="Conjunctive Logical Term (Logical And Term)"></topic>

+				<topic href="def_BaseLogicalTerm.html" label="Base Logical Term"></topic>

+			</topic>

+			<topic href="sec_ASMArithmeticTerms.html" label="Arithmetic Terms">

+				<topic href="def_ArithmeticTerm.html" label="Arithmetic Term"></topic>

+				<topic href="def_MultArithmeticTerm.html" label="Multiplicative   Arithmetic Term"></topic>

+				<topic href="def_UnaryArithmeticTerm.html" label="Unary Arithmetic Term"></topic>

+				<topic href="def_BaseArithmeticTerm.html" label="Base Arithmetic Term"></topic>

+			</topic>

+			<topic href="sec_ASMConstants.html" label="Constants">

+				<topic href="def_AsmConstant.html" label="ASM Constant (Value)"></topic>

+				<topic href="def_UndefinedValue.html" label="Undefined Value"></topic>

+				<topic href="def_BooleanConstant.html" label="Boolean Constant"></topic>

+				<topic href="def_MultiplicityConstant.html" label="Multiplicity Constant"></topic>

+				<topic href="def_StringConstant.html" label="String Constant"></topic>

+				<topic href="def_IntConstant.html" label="Integer Constants"></topic>

+				<topic href="def_FloatConstant.html" label="Float Constant"></topic>

+				<topic href="def_ModelElementConstant.html" label="Model Element Constant"></topic>

+			</topic>

+			<topic href="sec_ASMFunctions.html" label="ASM Functions">

+				<topic href="def_AsmFunctionDef.html" label="ASM Function Definition"></topic>

+				<topic href="def_InitialValue.html" label="Initial Value"></topic>

+				<topic href="def_AsmFunctionLocation.html" label="ASM Function Location"></topic>

+			</topic>

+			<topic href="sec_PredefinedFunctions.html" label="Predefined Functions">

+				<topic href="def_PredefinedFunctionCall.html" label="Predefined Function Call"></topic>

+			</topic>

+			<topic href="sec_NamingVariables.html" label="Naming and Variables">

+				<topic href="def_ModelElementName.html" label="Model Element Name"></topic>

+				<topic href="def_Variable.html" label="Variable"></topic>

+			</topic>

+			<topic href="sec_Parameters.html" label="Parameters and Variable Lists">

+				<topic href="def_FormalParameter.html" label="Formal Parameters"></topic>

+				<topic href="def_DirectedFormalParameter.html" label="Directed Formal Parameters"></topic>

+				<topic href="def_ActualParameter.html" label="Actual Parameters"></topic>

+				<topic href="def_ConstrainedVariableList.html" label="Constrained Variable List"></topic>

+			</topic>

+		</topic>

+		<topic href="sec_VTCLTokens.html" label="Tokens in the VTCL Language">

+			<topic href="sec_TokensOverview.html" label="VTCL tokens: An Overview">

+				<topic href="def_Token.html" label="Tokens"></topic>

+				<topic href="def_VTCLKeywords.html" label="Keywords"></topic>

+			</topic>

+			<topic href="sec_NameTokens.html" label="Tokens for names and strings">

+				<topic href="def_Identifier.html" label="Identifier"></topic>

+				<topic href="def_NameLiteral.html" label="Name Literal"></topic>

+				<topic href="def_UpperCaseLiteral.html" label="UpperCase Literal"></topic>

+				<topic href="def_StringLiteral.html" label="String Literal"></topic>

+				<topic href="def_AnnotationLiteral.html" label="Annotation Literal"></topic>

+			</topic>

+			<topic href="sec_NumberTokens.html" label="Tokens for numbers">

+				<topic href="def_IntegerLiteral.html" label="Integer Literal"></topic>

+				<topic href="def_FloatLiteral.html" label="Float Literal"></topic>

+			</topic>

+		</topic>

+	</topic>

+	<topic href="sec_index.html" label="Index"></topic>

+	<anchor id="contribution" />

+</toc>

diff --git a/org.eclipse.viatra2.imports.vtml/.classpath b/org.eclipse.viatra2.imports.vtml/.classpath
new file mode 100644
index 0000000..ad32c83
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.viatra2.imports.vtml/.externalToolBuilders/JavaCCy.launch b/org.eclipse.viatra2.imports.vtml/.externalToolBuilders/JavaCCy.launch
new file mode 100644
index 0000000..c80abe3
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/.externalToolBuilders/JavaCCy.launch
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;launchConfigurationWorkingSet editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot; factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; name=&quot;workingSet&quot;&gt;&#13;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.viatra2.imports.vtml/src/hu/bme/mit/viatra/imports/vtml/VTMLParser.jj&quot; type=&quot;1&quot;/&gt;&#13;&#10;&lt;/launchConfigurationWorkingSet&gt;&#13;&#10;}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="${workspace_loc}\${resource_path}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/org.eclipse.viatra2.imports.vtml/src/hu/bme/mit/viatra/imports/vtml}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="C:\software\javacc\bin\javacc.bat"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+</launchConfiguration>
diff --git a/org.eclipse.viatra2.imports.vtml/.project b/org.eclipse.viatra2.imports.vtml/.project
new file mode 100644
index 0000000..a6ef0ae
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/.project
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.viatra2.imports.vtml</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+			<triggers>auto,full,incremental,</triggers>
+			<arguments>
+				<dictionary>
+					<key>LaunchConfigHandle</key>
+					<value>&lt;project&gt;/.externalToolBuilders/JavaCCy.launch</value>
+				</dictionary>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.viatra2.imports.vtml/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra2.imports.vtml/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..0b95e47
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Mon Jan 31 22:00:48 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.6
diff --git a/org.eclipse.viatra2.imports.vtml/META-INF/MANIFEST.MF b/org.eclipse.viatra2.imports.vtml/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..8d43250
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.viatra2.imports.vtml;singleton:=true
+Bundle-Name: VIATRA2 R3 VTML Importer Plug-in
+Bundle-Version: 3.3.0.qualifier
+Bundle-Vendor: BUTE-FTSRG / Andras Balogh
+Bundle-Activator: org.eclipse.viatra2.imports.vtml.VtmlPlugin
+Bundle-ClassPath: .
+Export-Package: org.eclipse.viatra2.imports.vtml
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.viatra2.core2
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/org.eclipse.viatra2.imports.vtml/about.html b/org.eclipse.viatra2.imports.vtml/about.html
new file mode 100644
index 0000000..1262b8c
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/about.html
@@ -0,0 +1,28 @@
+<!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>About</title>

+</head>

+<body lang="EN-US">

+<h2>About This Content</h2>

+ 

+<p>July 4th, 2008</p>	

+<h3>License</h3>

+

+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 

+indicated below, the Content 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 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>If you did not receive this Content directly from the Eclipse Foundation, the Content is 

+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may

+apply to your use of any object code in the Content.  Check the Redistributor's license that was 

+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise

+indicated below, the terms and conditions of the EPL still apply to any source code in the Content

+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>

+

+</body>

+</html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.imports.vtml/build.properties b/org.eclipse.viatra2.imports.vtml/build.properties
new file mode 100644
index 0000000..2639302
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+               META-INF/,\
+               .
\ No newline at end of file
diff --git a/org.eclipse.viatra2.imports.vtml/plugin.xml b/org.eclipse.viatra2.imports.vtml/plugin.xml
new file mode 100644
index 0000000..b8bb375
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/plugin.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+   <extension
+         point="org.eclipse.viatra2.core2.modelimport">
+          <importer
+                class="org.eclipse.viatra2.imports.vtml.VTMLImportFactory"
+                fileExtensionList="vtml"
+                id="org.eclipse.viatra2.imports.vtml.VTMLImport"
+                name="Viatra Textual Metamodeling Language Importer"/>
+   </extension>
+
+</plugin>
diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/ASMFunction.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/ASMFunction.java
new file mode 100644
index 0000000..db27ae7
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/ASMFunction.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import java.util.Vector;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMCoreException;
+

+/**

+ * @author babo

+ *

+ * TODO To change the template for this generated type comment go to

+ * Window - Preferences - Java - Code Style - Code Templates

+ */

+public class ASMFunction extends ASTNode {

+

+	String name;

+	Vector locations;

+	IEntity element;

+	

+	public IEntity getElement()

+	{

+		if (element==null)

+		{

+			//element = VTCLMetaModelHelper.getInstance().newASMFunction(this);

+		}

+		return element;

+	}

+	public ASMFunction(int l, String nam, Vector locs)

+	{

+		setLine(l);

+		name = nam;

+		locations=locs;

+		

+	}

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#checkDefintion(org.eclipse.viatra2.imports.vtcl.ASTBuilder, org.eclipse.viatra2.core.IModelSpace)

+	 */

+	public boolean checkDefintion(ASTBuilder ab, IModelSpace m) {

+		// TODO Auto-generated method stub

+		return true;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#generateElements(org.eclipse.viatra2.imports.vtcl.ASTBuilder, org.eclipse.viatra2.core.IModelSpace, org.eclipse.viatra2.core.IEntity)

+	 */

+	public void generateElements(ASTBuilder ab, IModelSpace m, IEntity temp)

+			throws VPMCoreException {

+		

+

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#resolveReferences(org.eclipse.viatra2.imports.vtcl.ASTBuilder)

+	 */

+	public void resolveReferences(ASTBuilder ab) throws VPMCoreException {

+	

+

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#updateModelspace(org.eclipse.viatra2.imports.vtcl.ASTBuilder, org.eclipse.viatra2.core.IModelSpace)

+	 */

+	public void updateModelspace(ASTBuilder ab, IModelSpace m)

+			throws VPMCoreException {

+		getElement();

+

+	}

+

+	/**

+	 * @return Returns the locations.

+	 */

+	public Vector getLocations() {

+		return locations;

+	}

+	/**

+	 * @param locations The locations to set.

+	 */

+	public void setLocations(Vector locations) {

+		this.locations = locations;

+	}

+	/**

+	 * @return Returns the name.

+	 */

+	public String getName() {

+		return name;

+	}

+	/**

+	 * @param name The name to set.

+	 */

+	public void setName(String name) {

+		this.name = name;

+	}

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/ASTBuilder.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/ASTBuilder.java
new file mode 100644
index 0000000..4f142ac
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/ASTBuilder.java
@@ -0,0 +1,669 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Vector;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.logger.Logger;
+/**

+ * @author babo

+ *

+*/

+public class ASTBuilder {

+

+

+	Vector imps;

+	String namespac = null;

+	public Logger log;

+	Vector machines;

+	

+	IEntity ent;

+	//Vector elemdefs;

+	Vector reldefs;

+	IModelSpace ms;

+	

+	HashSet<EntityDefinition> entities = null;

+	

+	HashSet<EntityDefinition> entity_tmp = null;

+	HashSet<RelationDefinition> relation_tmp = null;

+	

+	

+	

+	public String getNamespace()

+	{

+		return namespac;

+	}

+

+	public void init(Logger l, IModelSpace m)

+	{

+		ms = m;

+		imps = new Vector();

+		

+		entities = new HashSet<EntityDefinition>();

+		entity_tmp = new HashSet<EntityDefinition>();

+		relation_tmp =new HashSet<RelationDefinition>();

+		//elemdefs = new Vector();

+		reldefs = new Vector();

+		machines = new Vector();

+		

+		namespac = "";

+		

+		mm = m.getModelManager();

+		log=l;

+		

+		try

+		{

+		VTMLMetaModelHelper.init(l,m,this);

+		}

+		catch (Exception e)

+		{

+			log.fatal("VTML Importer initialization failed. All further imports will fail. Cause : "+e.getLocalizedMessage());

+		}

+	}

+	

+

+	public void addSupertypeDefinition(int l, String ns, String m, String s)

+	{

+		

+			reldefs.add(new SupertypeDefinition(l,ns,m,s));

+		

+	}

+

+	public void addTypeDefinition(int l, String ns, String m, String s)

+	{

+		

+			reldefs.add(new TypeDefinition(l,ns,m,s));

+		

+	}	

+	

+	public void addIsFinalTypeDefinition(int l, String ns,String n, boolean b)

+	{

+		reldefs.add(new FinalTypeDefinition(l,ns,n,b));

+	}

+	

+	public void addIsAggregationDefinition(int l,String ns, String n, boolean b)

+	{

+		reldefs.add(new AggregationDefinition(l,ns,n,b));

+	}	

+	

+	public void addIsAnySourceDefinition(int l,String ns, String n, boolean b)

+	{

+		reldefs.add(new AnySourceDefinition(l,ns,n,b));

+	}	

+	

+	public void addIsAnyTargetDefinition(int l,String ns, String n, boolean b)

+	{

+		reldefs.add(new AnyTargetDefinition(l,ns,n,b));

+	}	

+	

+	public void addInverseDefinition(int l, String ns,String n, String i)

+	{

+		reldefs.add(new InverseDefinition(l,ns,n,i));

+	}	

+	

+	public void addMultiplicityDefinition(int l, String ns,String n, String i)

+	{

+		reldefs.add(new MultiplicityDefinition(l,ns,n,i));

+	}

+	

+	public IEntity lookupNamespace(String ns)

+	{

+		IEntity e = null;

+		if (ns.equals("")) return mm.getRoot(); 

+		e = mm.getEntityByName(ns);

+		if (e!=null) return e;

+		//if (!namespac.equals("")) e = mm.getEntityByName(namespac+"."+ns);

+		//if (e!=null) return e;

+		for (int i=0;i<imps.size();i++)

+		{

+			NamespaceImport ni = (NamespaceImport)imps.get(i);

+			e = mm.getEntityByName(ni.getName()+"."+ns);

+			if (e!=null) return e;

+		}

+		

+		return null;

+	}

+	private boolean preamb(String n, String e)

+	{

+		return ((n.startsWith(e)) && (n.length()>e.length()) && (n.charAt(e.length())=='.'));

+	}

+	private EntityDefinition getEntityByQN(String n, HashSet<EntityDefinition> hs)

+	{

+		for (EntityDefinition e : hs)

+		{

+			//log.info("n = '"+n+"'  e.fqn='"+e.getFQN()+"'");

+			if (n.equals(e.getFQN())) return e;

+			if (preamb(n,e.getFQN()))

+			{

+				return getEntityByQN(n,e.getContent());

+			}

+		}

+		return null;

+	}

+	

+	public EntityDefinition lookupDuplicateEntity(EntityDefinition ed)

+	{

+		return getEntityByQN(ed.getFQN(),entities,ed);

+	}

+	private EntityDefinition getEntityByQN(String n, HashSet<EntityDefinition> hs,EntityDefinition self)

+	{

+		for (EntityDefinition e : hs)

+		{

+			if ((n.equals(e.getFQN())) && (e!=self)) return e;

+			if (preamb(n,e.getFQN()))

+			{

+				return getEntityByQN(n,e.getContent(),self);

+			}

+		}

+		return null;

+	}

+	

+	public EntityDefinition getEntityWithLookup(String ns,String n)

+	{

+		log.debug("called entityWithlookup: "+ns+" name: "+n);

+		log.debug("lookup ns: "+ns+" name: "+n);

+		EntityDefinition ed = null;

+		if (n==null) return null;

+		if (n.indexOf('.')>=0) 

+		{

+			ed = getEntityByQN(n,entities);

+			log.debug("lookup: "+n+" res: "+ed);

+			if  (ed!=null) return ed;

+		}

+		while ((ed==null)&& ( ns!=null))

+		{

+			

+			ed = getEntityByQN(fqn(ns,n),entities);

+			if (ed!=null) return ed;

+			ns = parentName(ns);

+		}

+		IEntity ee = mm.getEntityByName(fqn(ns,n));

+		if (ee!=null)

+		{

+			ed = new EntityDefinition(ee);

+			try

+			{

+			buildEntityTree(ed);

+			}

+			catch (Exception e)

+			{

+				e.printStackTrace();

+			}

+			return ed;

+		}

+		for (int i=0;i<imps.size();i++)

+		{

+			NamespaceImport ni = (NamespaceImport)imps.get(i);

+			log.debug("lookup import: "+ni.getName()+" name: "+n);

+			IEntity e = mm.getEntityByName(ni.getName()+"."+n);

+			if (e!=null)

+			{

+				ed = new EntityDefinition(e);

+				try

+				{

+				buildEntityTree(ed);

+				}

+				catch (Exception exc)

+				{

+					//TODO

+					exc.printStackTrace();

+				}

+				return ed;

+			}

+		}

+		

+		

+		return null;

+	}

+	

+	

+	public ElementDefinition getElementWithLookup(String ns, String n)

+	{

+		ElementDefinition ed = getEntityWithLookup(ns,n);

+		if (ed!=null) return ed;

+		return getRelationWithLookup(ns,n);

+	}

+	public RelationDefinition getRelationWithLookup(String ns,String n)

+	{

+		RelationDefinition ed = null;

+		if (n.indexOf('.')>=0) 

+			{

+			ElementDefinition ted = getElementByQN(n,entities);

+			if ((ted!=null) && (ted instanceof RelationDefinition)) return (RelationDefinition)ted;

+			

+			}

+		String nstmp = ns;

+		while ((ed==null)&& ( nstmp!=null))

+		{

+			

+			ElementDefinition ted = getElementByQN(fqn(nstmp,n),entities);

+			if ((ted!=null) && (ted instanceof RelationDefinition)) return (RelationDefinition)ted;

+			nstmp = parentName(nstmp);

+		}

+		

+		IRelation ee = mm.getRelationByName(fqn(ns,n));

+		if (ee!=null)

+		{

+			ed = new RelationDefinition(ee);

+			try

+			{

+			addRelationToTree(ed);

+			}

+			catch (Exception e)

+			{

+				e.printStackTrace();

+			}

+			return ed;

+		}

+		ee = mm.getRelationByName(n);

+		if (ee!=null)

+		{

+			ed = new RelationDefinition(ee);

+			try

+			{

+			addRelationToTree(ed);

+			}

+			catch (Exception e)

+			{

+				e.printStackTrace();

+			}

+			return ed;

+		}

+		for (int i=0;i<imps.size();i++)

+		{

+			NamespaceImport ni = (NamespaceImport)imps.get(i);

+			IRelation e = mm.getRelationByName(ni.getName()+"."+n);

+			if (e!=null)

+			{

+				ed = new RelationDefinition(e);

+				try

+				{

+					addRelationToTree(ed);

+				}

+				catch (Exception exc)

+				{

+					//TODO

+				}

+				return ed;

+			}

+		}

+		

+		

+		return null;

+	}

+	/*

+	 * 		for (int i=0;i<imps.size();i++)

+		{

+			NamespaceImport ni = (NamespaceImport)imps.get(i);

+			e = mm.getEntityByName(ni.getName()+"."+n);

+			if (e!=null) return e;

+		}

+	 */

+	

+	private RelationDefinition getRelationByQN(String n, HashSet<RelationDefinition> hs)

+	{

+		for (RelationDefinition e : hs)

+		{

+			if (n.equals(e.getFQN())) return e;

+			if (preamb(n,e.getFQN()))

+			{

+				return getRelationByQN(n,e.getRelations());

+			}

+		}

+		return null;

+	}

+	

+	private ElementDefinition getElementByQN(String n, HashSet<EntityDefinition> hs)

+	{

+		for (EntityDefinition e : hs)

+		{

+			if (n.equals(e.getFQN())) return e;

+			//String tmp = n.substring(e.getFQN().length());

+			

+			if (n.startsWith(e.getFQN()))

+			{

+				ElementDefinition ed =  getElementByQN(n,e.getContent());

+				if (ed==null)

+				{

+					for (RelationDefinition r : e.relations)

+					{

+						if (r.getFQN().equals(n)) return r;

+						if (r.getFQN().startsWith(n))

+						{

+							RelationDefinition rtmp = getRelationByQN(n,r.getRelations());

+							if (rtmp!=null) return rtmp;

+						}

+					}

+				} else return ed;

+			}

+		}

+		return null;

+	}

+	public boolean namespaceExists(String ns)

+	{

+		if (ns.equals("")) return true;

+		if (lookupNamespace(ns)!=null) return true;

+		

+		return (getEntityByQN(ns,entities)!=null);

+		

+	}

+

+	

+

+	

+	

+

+	

+	public String fqn(String ns, String n)

+	{

+		if (ns==null) return n;

+		if (ns.length()==0) return n;

+		//if (n.indexOf('.')>=0) return n;

+		return ns+"."+n;

+	}

+	public void addEntityDef(int l, String ns, String n, String t, String v)

+	{

+	

+			

+		 entity_tmp.add(new EntityDefinition(l,ns,n,t,v));

+		

+	}

+	public void addRelationDef(int l, String ns, String n, String t, String s,String ta)

+	{

+		RelationDefinition rd = new RelationDefinition(l,ns,n,t,s,ta);

+	

+			relation_tmp.add(rd);

+		

+	}

+	

+	

+	public void addImport(int l,String s)

+	{ 

+		imps.add(new NamespaceImport(l,s));

+	}

+	

+	public void setNamespace(String s)

+	{

+		namespac = s;

+	}

+	

+	public void debug()

+	{

+		log.debug("Module namespace : "+namespac);

+		log.debug("\nimports:");

+		printEntities(entities,0);

+		for (int i=0;i<imps.size();i++) log.debug("     "+((NamespaceImport)imps.get(i)).getName());

+		//for (int i=0;i<elemdefs.size();i++) log.debug("Elem : "+elemdefs.get(i).toString());

+	}

+	

+	public void printEntities(HashSet<EntityDefinition> e, int i)

+	{

+		for (EntityDefinition ed : e)

+		{

+			log.debug("                                                                                                                    ".substring(0,i)+ed.getFQN());

+			printEntities(ed.getContent(),i+2);

+		}

+	}

+	

+	IModelManager mm = null;

+	

+	public String parentName(String fqn)

+	{

+		if (fqn==null) return null;

+		if (fqn.equals("")) return null;

+		int i = fqn.lastIndexOf('.');

+		if (i<0) return "";

+		return fqn.substring(0,i);

+	}

+	

+	public EntityDefinition getFromTmp(String _fqn)

+	{

+		for (EntityDefinition e : entity_tmp)

+		{

+			if (_fqn.equals(fqn(e.getNamespace(),e.getName()))) return e;

+		}

+		

+		return null;

+	}

+	public void buildEntityTree(EntityDefinition ed) throws VPMRuntimeException

+	{

+		String ns = ed.getNamespace();

+		String n = ed.getName();

+		String fqn = fqn(ns,n);

+		ed.setProcessed(true);

+		

+		if ((mm.getEntityByName(fqn)!=null) && ((!ed.isNative)))

+		{

+		

+			log.error("duplicate entity found! ("+fqn+") error in line "+ed.getLine());

+			throw new VPMRuntimeException("duplicate entity found! ("+fqn+") error in line "+ed.getLine());

+		}

+		EntityDefinition etmp = getEntityByQN(fqn,entities);

+		if ((etmp!=null) && (ed!=etmp) && !(ed.isNative && etmp.isNative))

+		{

+			//debug();

+			log.error("duplicate entity found! ("+fqn+") error in line "+ed.getLine());

+			throw new VPMRuntimeException("duplicate entity found! ("+fqn+") error in line "+ed.getLine());

+		}

+		

+		if (etmp!=null) return;

+		else 

+		{

+			String par = parentName(fqn);

+			if ((par==null) || (par.equals("")))

+			{

+				entities.add(ed);

+				return;

+			}

+			EntityDefinition ep = getFromTmp(par);

+

+			if (ep==null) ep = getEntityByQN(par,entities);

+			if (ep==null)

+			{

+				IEntity ee = mm.getEntityByName(par);

+				if (ee==null)

+				{

+					log.error("parent entity "+par+" for entity "+fqn+" is undefined.");

+					throw new VPMRuntimeException("entity undefined: "+fqn);

+				}

+				ep = new EntityDefinition(ee);

+				buildEntityTree(ep);

+				

+			}

+			

+			ep.addContent(ed);

+		}

+		

+	}

+	

+	public String localName(String s)

+	{

+		int i = s.lastIndexOf('.');

+		if (i<0) return s;

+		return s.substring(i+1);

+	}

+	/**

+	 * @param d

+	 * @throws VPMRuntimeException

+	 */

+	private void addRelationToTree(RelationDefinition d) throws VPMRuntimeException

+	{

+		String ns = d.getNamespace();

+		String n  = d.getName();

+		String en = d.getSource();

+		String sfqn = fqn(ns,en);

+		

+		String tmpns = ns;

+		String realFqn = fqn(sfqn,localName(n));

+		ElementDefinition ed = null;

+		d.setProcessed(true);

+		ed = getElementByQN(fqn(ns,n),entities);

+		

+		if ((mm.getRelationByName(realFqn)!=null) && (!d.isNativ))

+		{

+			log.error("Duplicate relation ("+fqn(ns,n)+") found. Error in line "+d.getLine());

+		}

+		if ((ed!=null) && ((ed!=d)))

+		{

+			log.error("Duplicate relation ("+ed.getFQN()+") found. Error in line "+d.getLine());

+		}

+		

+		while ((ed==null) && (tmpns!=null))

+		{

+			

+			ed = getElementByQN(fqn(tmpns,en),entities);

+			

+			tmpns=parentName(tmpns);

+			

+		}

+		

+		if (ed==null)

+		{

+			for (RelationDefinition rr : relation_tmp)

+			{

+				if (!rr.isProcessed())

+				{

+				

+				if (rr.getName().equals(localName(en)))

+				{

+					addRelationToTree(rr);

+					ed = getElementByQN(en,entities);

+					if (ed!=null) break;

+				}

+				}

+			}

+			if (ed==null)

+			{

+				

+				

+				ed = getElementWithLookup(ns,en);

+				

+				if (ed==null)

+				{

+					log.error("Source ("+sfqn+") for relation "+n+" undefined.");

+					throw new VPMRuntimeException("error. relation source undefined.");

+				}

+//				if (ee instanceof IEntity)

+//				{

+//					ed = new EntityDefinition((IEntity)ee);

+//					buildEntityTree((EntityDefinition)ed);

+//				}

+//				else

+//				{

+//					ed = new RelationDefinition((IRelation)ee);

+//					addRelationToTree((RelationDefinition)ed);

+//				}

+			}

+		}

+		ed.addRelation(d);

+	}

+	public boolean checkDefinition()

+	{

+		

+		

+		

+		if (mm.getEntityByName(namespac)==null)

+		{

+			log.error("Namespace "+namespac+" not found. Invalid namespace reference.");

+			return false;

+		}

+		

+		for (int i=0;i<imps.size();i++)

+		{

+			NamespaceImport ni = (NamespaceImport)imps.get(i);

+			if (!ni.checkDefintion(this,ms)) return false;

+		}

+		for (EntityDefinition e : entity_tmp)

+		{

+			e.normalizeName(this);

+		}

+		

+		for (EntityDefinition e : entity_tmp)

+		{

+			try

+			{

+			 if (!e.isProcessed()) buildEntityTree(e);

+			}

+			catch (VPMRuntimeException ex)

+			{

+				return false;

+			}

+		}

+		

+		for (RelationDefinition r : relation_tmp)

+		{

+			try

+			{

+				if (!r.isProcessed()) addRelationToTree(r);

+			}

+			catch (VPMRuntimeException ex)

+			{

+				return false;

+			}

+		}

+		

+		Collection<EntityDefinition> eetmp = (Collection<EntityDefinition>)entities.clone();	

+		for (EntityDefinition e : eetmp)

+		{

+			

+				if (!e.checkDefintion(this,ms)) return false;

+			

+		

+		}

+		

+		for (int i=0;i<reldefs.size();i++)

+		{

+			if (reldefs.get(i) instanceof RelationshipDefinition)

+			{

+				RelationshipDefinition ni = (RelationshipDefinition)reldefs.get(i);

+				if (!ni.checkDefintion(this,ms)) return false;

+			}

+		}

+		log.debug("end "+mm.getElementByName("reldb"));

+		return true;

+	}

+

+	public void generateElements() throws VPMCoreException

+	{

+		//IEntity tmp = mm.newEntity();

+

+		for (EntityDefinition e : entities)

+		{

+			e.updateModelspace(this,ms);

+		}

+	

+		for (int i=0;i<reldefs.size();i++)

+		{

+			if (reldefs.get(i) instanceof RelationshipDefinition)

+			{

+				RelationshipDefinition ni = (RelationshipDefinition)reldefs.get(i);

+				ni.resolveReferences(this);

+			}

+		}	

+	}

+	

+	

+	

+	int nameID= 1;

+	public String nameGenerator()

+	{

+		return "_tmp"+((nameID++));

+	}

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/ASTNode.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/ASTNode.java
new file mode 100644
index 0000000..bc2700c
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/ASTNode.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMCoreException;
+

+/**

+ * @author babo

+ *

+ * TODO To change the template for this generated type comment go to

+ * Window - Preferences - Java - Code Style - Code Templates

+ */

+public abstract class ASTNode {

+	

+	int line;

+	int UID;

+	

+

+	/**

+	 * @return Returns the line.

+	 */

+	public int getLine() {

+		return line;

+	}

+	/**

+	 * @param line The line to set.

+	 */

+	public void setLine(int line) {

+		this.line = line;

+	}

+	

+	public abstract boolean checkDefintion(ASTBuilder ab, IModelSpace m);

+	

+	public abstract void generateElements(ASTBuilder ab, IModelSpace m,IEntity temp) throws VPMCoreException;

+	public abstract void resolveReferences(ASTBuilder ab) throws VPMCoreException;

+	

+	public abstract void updateModelspace(ASTBuilder ab, IModelSpace m) throws VPMCoreException;

+	

+	public int getUID() {

+		return UID;

+	}

+	public void setUID(int uid) {

+		UID = uid;

+	}

+	

+	

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/AggregationDefinition.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/AggregationDefinition.java
new file mode 100644
index 0000000..f20ea79
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/AggregationDefinition.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+

+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.errors.VPMCoreException;
+

+public class AggregationDefinition extends RelationshipDefinition {

+

+	boolean isAggregate = true;

+	public AggregationDefinition(int l, String ns, String n, boolean is)

+	{

+		super(l,ns,n,null);

+		isAggregate=is;

+		

+	}

+	@Override

+	public boolean checkDefintion(ASTBuilder ab, IModelSpace m) {

+		// TODO Auto-generated method stub

+		boolean tmp = super.checkDefintion(ab, m);

+		if (tmp)

+		{

+			if (_mstr instanceof EntityDefinition)

+			{

+				ab.log.error("Aggregation can be specified only for relations. Error in line "+getLine());

+				return false;

+			}

+		}

+		return tmp;

+	}

+

+	@Override

+	public void resolveReferences(ASTBuilder ab) throws VPMCoreException {

+		

+		ab.mm.setRelationIsAggregation((IRelation)_mstr.getElement(),isAggregate);

+		

+	}

+	

+

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/AnySourceDefinition.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/AnySourceDefinition.java
new file mode 100644
index 0000000..f2fa62a
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/AnySourceDefinition.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.errors.VPMCoreException;
+

+public class AnySourceDefinition extends RelationshipDefinition{

+	

+	boolean isAny = true;

+	public AnySourceDefinition(int l, String ns, String n, boolean is)

+	{

+		super(l,ns,n,null);

+		isAny=is;

+		

+	}

+	@Override

+	public boolean checkDefintion(ASTBuilder ab, IModelSpace m) {

+		// TODO Auto-generated method stub

+		boolean tmp = super.checkDefintion(ab, m);

+		if (tmp)

+		{

+			if (_mstr instanceof EntityDefinition)

+			{

+				ab.log.error("Any source property can be specified only for relations. Error in line "+getLine());

+				return false;

+			}

+		}

+		return tmp;

+	}

+

+	@Override

+	public void resolveReferences(ASTBuilder ab) throws VPMCoreException {

+		

+		ab.mm.setIsAnyFrom((IRelation)_mstr.getElement(),isAny);

+		

+	}

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/AnyTargetDefinition.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/AnyTargetDefinition.java
new file mode 100644
index 0000000..6a47847
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/AnyTargetDefinition.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.errors.VPMCoreException;
+

+public class AnyTargetDefinition extends RelationshipDefinition {

+	

+	boolean isAny = true;

+	public AnyTargetDefinition(int l, String ns, String n, boolean is)

+	{

+		super(l,ns,n,null);

+		isAny=is;

+		

+	}

+	@Override

+	public boolean checkDefintion(ASTBuilder ab, IModelSpace m) {

+		// TODO Auto-generated method stub

+		boolean tmp = super.checkDefintion(ab, m);

+		if (tmp)

+		{

+			if (_mstr instanceof EntityDefinition)

+			{

+				ab.log.error("Any target property can be specified only for relations. Error in line "+getLine());

+				return false;

+			}

+		}

+		return tmp;

+	}

+

+	@Override

+	public void resolveReferences(ASTBuilder ab) throws VPMCoreException {

+		

+		ab.mm.setIsAnyTo((IRelation)_mstr.getElement(),isAny);

+		

+	}

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/ElementDefinition.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/ElementDefinition.java
new file mode 100644
index 0000000..f364128
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/ElementDefinition.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import java.util.HashSet;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMCoreException;
+

+/**

+ * @author babo

+ *

+ */

+public class ElementDefinition extends ASTNode {

+	public String fqn(String ns, String n)

+	{

+		if (ns==null) return n;

+		if (ns.length()==0) return n;

+		if (n.indexOf('.')>=0) return n;

+		return ns+"."+n;

+	}

+	protected final static String DBUG = "-------------------------------------------------------------------------------------------------------------------------------------------------";

+	public void printDebug(int i)

+	{

+		System.out.println(DBUG.substring(0,i)+getFQN());

+		for (RelationDefinition e : relations)

+		{

+			e.printDebug(i+3);

+		}

+	}

+	

+	HashSet<RelationDefinition> relations = new HashSet<RelationDefinition>();

+	/**

+	 * @return Returns the relations.

+	 */

+	public HashSet<RelationDefinition> getRelations() {

+		return relations;

+	}

+	

+	public IModelElement getElement(){

+		return null;

+	}

+	

+	

+	boolean processed = false;

+	public String getFQN()

+	{

+		return "";

+	}

+	public void addRelation(RelationDefinition r)

+	{

+		r.setNamespace(getFQN());

+		r.setSource(getFQN());

+		relations.add(r);

+	}

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#checkDefintion(org.eclipse.viatra2.imports.vtcl.ASTBuilder, org.eclipse.viatra2.core.IModelSpace)

+	 */

+	public boolean checkDefintion(ASTBuilder ab, IModelSpace m) {

+		// TODO Auto-generated method stub

+		return false;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#generateElements(org.eclipse.viatra2.imports.vtcl.ASTBuilder, org.eclipse.viatra2.core.IModelSpace, org.eclipse.viatra2.core.IEntity)

+	 */

+	public void generateElements(ASTBuilder ab, IModelSpace m, IEntity temp)

+			throws VPMCoreException {

+		// TODO Auto-generated method stub

+

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#resolveReferences(org.eclipse.viatra2.imports.vtcl.ASTBuilder)

+	 */

+	public void resolveReferences(ASTBuilder ab) throws VPMCoreException {

+		// TODO Auto-generated method stub

+

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#updateModelspace(org.eclipse.viatra2.imports.vtcl.ASTBuilder, org.eclipse.viatra2.core.IModelSpace)

+	 */

+	public void updateModelspace(ASTBuilder ab, IModelSpace m)

+			throws VPMCoreException {

+		// TODO Auto-generated method stub

+

+	}

+

+	/**

+	 * @return Returns the processed.

+	 */

+	public boolean isProcessed() {

+		return processed;

+	}

+	/**

+	 * @param processed The processed to set.

+	 */

+	public void setProcessed(boolean processed) {

+		this.processed = processed;

+	}

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/EntityDefinition.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/EntityDefinition.java
new file mode 100644
index 0000000..6f4443d
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/EntityDefinition.java
@@ -0,0 +1,267 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import java.util.HashSet;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMCoreException;
+

+/**

+ * @author babo

+ *

+ * TODO To change the template for this generated type comment go to

+ * Window - Preferences - Java - Code Style - Code Templates

+ */

+public class EntityDefinition extends ElementDefinition {

+	

+	/* (non-Javadoc)

+	 * @see java.lang.Object#toString()

+	 */

+	IEntity element = null;

+	public IModelElement getElement()

+	{

+		if (element==null)

+		{

+			elemGen(VTMLMetaModelHelper.getInstance().getMSpace());

+		}

+		return element;

+	}

+	public String toString() {

+		// TODO Auto-generated method stub

+		return "entity name : "+name+" type : "+type+" namespace : "+namespace+" value : "+value;

+	}

+	String namespace;

+	String type;

+	String name;

+	String value;

+	

+	IEntity ns;

+	IModelElement typ;

+	

+	HashSet<EntityDefinition> content = new HashSet<EntityDefinition>();

+	

+

+	

+	public void addContent(EntityDefinition e)

+	{

+		content.add(e);

+	}

+	

+

+	public boolean isNative = false;

+	

+	public EntityDefinition(IEntity e)

+	{

+		element = e;

+		name = e.getFullyQualifiedName();

+		namespace = "";

+		isNative = true;

+	}

+	public EntityDefinition(int l, String ns, String n, String t, String v)

+	{

+		setLine(l);

+		namespace = ns;

+		name = n;

+		type = t;

+		value = v;

+	}

+

+	/**

+	 * @return Returns the name.

+	 */

+	public String getName() {

+		return name;

+	}

+	/**

+	 * @param name The name to set.

+	 */

+	public void setName(String name) {

+		this.name = name;

+	}

+	/**

+	 * @return Returns the namespace.

+	 */

+	public String getNamespace() {

+		return namespace;

+	}

+	/**

+	 * @param namespace The namespace to set.

+	 */

+	public void setNamespace(String namespace) {

+		this.namespace = namespace;

+	}

+	/**

+	 * @return Returns the type.

+	 */

+	public String getType() {

+		return type;

+	}

+	/**

+	 * @param type The type to set.

+	 */

+	public void setType(String type) {

+		this.type = type;

+	}

+	/**

+	 * @return Returns the value.

+	 */

+	public String getValue() {

+		return value;

+	}

+	

+	public String getFQN()

+	{

+		return fqn(namespace,name);

+	}

+	/**

+	 * @param value The value to set.

+	 */

+	public void setValue(String value) {

+		this.value = value;

+	}

+	

+	EntityDefinition _type =null;

+	EntityDefinition _namespace =null;

+	

+	public void normalizeName(ASTBuilder ab)

+	{

+		if (name.indexOf('.')>=0) 

+		{

+			namespace = ab.parentName(name);

+			name  =  ab.localName(name);

+		}

+	}

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#checkDefintion(org.eclipse.viatra2.imports.vtcl.ASTBuilder, org.eclipse.viatra2.core.IModelSpace)

+	 */

+	public boolean checkDefintion(ASTBuilder ab, IModelSpace m) {

+		if (!isNative)

+		{

+		String tmp = null;

+		tmp = ab.fqn(namespace,name);

+		namespace = ab.parentName(tmp);

+		name = ab.localName(tmp);

+		_namespace = ab.getEntityWithLookup("",namespace);

+		_type = ab.getEntityWithLookup(namespace,type);

+		if ((_type==null) && ((type==null) || (!type.equals("entity"))))

+		{

+			ab.log.error("type "+type+" for entity "+name+" not found. Error in line "+getLine());

+			return false;

+		}

+		if (ab.lookupDuplicateEntity(this)!=null)

+		{

+			ab.log.error("Entity "+name+" in namespace "+namespace+" already defined. Error in line "+getLine());

+			return false;

+		}

+		}

+		for (EntityDefinition e : ((HashSet<EntityDefinition>)content.clone()))

+		{

+			

+			boolean b = e.checkDefintion(ab,m);

+			if (!b) return b;

+		}

+		for (RelationDefinition r : relations)

+		{

+			boolean btm = r.checkDefintion(ab,m);

+			if (!btm) return false;

+		}

+		return true;

+		

+	}

+	IEntity me,tmp;

+	String tmpName;

+	IModelManager mm;

+	public  void generateElements(ASTBuilder ab, IModelSpace m,IEntity temp) throws VPMCoreException

+	{

+		

+		mm=m.getModelManager();tmp=temp;

+		tmpName = ab.nameGenerator();

+		if (value!=null)

+		me = m.getModelManager().newEntity(tmpName,value,temp);

+		else

+			me = m.getModelManager().newEntity(tmpName,temp);

+	}

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#resolveReferences(org.eclipse.viatra2.imports.vtcl.ASTBuilder)

+	 */

+	public void resolveReferences(ASTBuilder ab) throws VPMCoreException {

+		

+

+	}

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#updateModelspace(org.eclipse.viatra2.imports.vtcl.ASTBuilder, org.eclipse.viatra2.core.IModelSpace)

+	 */

+	public void updateModelspace(ASTBuilder ab, IModelSpace m) throws VPMCoreException {

+		

+		elemGen(m);

+		

+		for (EntityDefinition e : content)

+		{

+			e.updateModelspace(ab,m);

+		}

+		for (RelationDefinition r : relations)

+		{

+			r.updateModelspace(ab,m);

+		}

+		

+		

+	}

+	

+	public void elemGen(IModelSpace m)

+	{

+		try

+		{

+		if (element==null)

+		{

+			if (_namespace!=null)

+			{

+				element = m.getModelManager().newEntity(name,(IEntity)_namespace.getElement());

+			}

+			else

+			{

+				

+				element = m.getModelManager().newEntity(name);

+			}

+			if (value!=null) m.getModelManager().setValue(element,value);

+			

+			if( _type!=null) m.getModelManager().newInstanceOf(_type.getElement(),element);

+		}

+		}

+		catch (Exception e)

+		{

+		 //TODO

+			e.printStackTrace();

+		}

+	}

+	/**

+	 * @return Returns the content.

+	 */

+	public HashSet<EntityDefinition> getContent() {

+		return content;

+	}

+	public void printDebug(int i)

+	{

+		System.out.println(DBUG.substring(0,i)+getFQN());

+		for (EntityDefinition e : content)

+		{

+			e.printDebug(i+3);

+		}

+		for (RelationDefinition e : relations)

+		{

+			e.printDebug(i+3);

+		}

+	}

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/FinalTypeDefinition.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/FinalTypeDefinition.java
new file mode 100644
index 0000000..7c9f870
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/FinalTypeDefinition.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import org.eclipse.viatra2.errors.VPMCoreException;
+

+public class FinalTypeDefinition extends RelationshipDefinition {

+

+	

+	boolean isFinal = true; 

+	public FinalTypeDefinition(int l, String n, String m, boolean is)

+	{

+		super(l,n,m,null);

+		isFinal = is;

+	}

+	@Override

+	public void resolveReferences(ASTBuilder ab) throws VPMCoreException {

+		

+		ab.mm.setIsFinalType(_mstr.getElement(),isFinal);

+

+	}

+

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/FunctionLocation.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/FunctionLocation.java
new file mode 100644
index 0000000..14cddce
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/FunctionLocation.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+

+/**

+ * @author babo

+ *

+ * TODO To change the template for this generated type comment go to

+ * Window - Preferences - Java - Code Style - Code Templates

+ */

+public class FunctionLocation  {

+

+	String location;

+	String value;

+	int line;

+	

+	/**

+	 * @return Returns the line.

+	 */

+	public int getLine() {

+		return line;

+	}

+	/**

+	 * @param line The line to set.

+	 */

+	public void setLine(int line) {

+		this.line = line;

+	}

+	/**

+	 * @return Returns the location.

+	 */

+	public String getLocation() {

+		return location;

+	}

+	/**

+	 * @param location The location to set.

+	 */

+	public void setLocation(String location) {

+		this.location = location;

+	}

+	/**

+	 * @return Returns the value.

+	 */

+	public String getValue() {

+		return value;

+	}

+	/**

+	 * @param value The value to set.

+	 */

+	public void setValue(String value) {

+		this.value = value;

+	}

+	public FunctionLocation(int l, String loc, String val)

+	{

+		setLine(l);

+		location=loc;

+		value=val;

+	}

+

+

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/InverseDefinition.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/InverseDefinition.java
new file mode 100644
index 0000000..b601b32
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/InverseDefinition.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.errors.VPMCoreException;
+

+public class InverseDefinition extends RelationshipDefinition{

+	

+	

+	public InverseDefinition(int l, String ns, String n, String s)

+	{

+		super(l,ns,n,s);

+		

+		

+	}

+	@Override

+	public boolean checkDefintion(ASTBuilder ab, IModelSpace m) {

+		// TODO Auto-generated method stub

+		boolean tmp = super.checkDefintion(ab, m);

+		if (tmp)

+		{

+			if (_mstr instanceof EntityDefinition)

+			{

+				ab.log.error("Inverse relationship can only be specified between relations. Error in line "+getLine());

+				return false;

+			}

+			if (_slv instanceof EntityDefinition)

+			{

+				ab.log.error("Inverse relationship can only be specified between relations. Error in line "+getLine());

+				return false;

+			}

+		}

+		return tmp;

+	}

+

+	@Override

+	public void resolveReferences(ASTBuilder ab) throws VPMCoreException {

+		

+		ab.mm.setRelationInverse((IRelation)_mstr.getElement(),(IRelation)_slv.getElement());

+		ab.mm.setRelationInverse((IRelation)_slv.getElement(),(IRelation)_mstr.getElement());

+		

+	}

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/JavaCharStream.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/JavaCharStream.java
new file mode 100644
index 0000000..a1b28d4
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/JavaCharStream.java
@@ -0,0 +1,561 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+/**

+ * An implementation of interface CharStream, where the stream is assumed to

+ * contain only ASCII characters (with java-like unicode escape processing).

+ */

+

+public class JavaCharStream

+{

+  public static final boolean staticFlag = true;

+  static final int hexval(char c) throws java.io.IOException {

+    switch(c)

+    {

+       case '0' :

+          return 0;

+       case '1' :

+          return 1;

+       case '2' :

+          return 2;

+       case '3' :

+          return 3;

+       case '4' :

+          return 4;

+       case '5' :

+          return 5;

+       case '6' :

+          return 6;

+       case '7' :

+          return 7;

+       case '8' :

+          return 8;

+       case '9' :

+          return 9;

+

+       case 'a' :

+       case 'A' :

+          return 10;

+       case 'b' :

+       case 'B' :

+          return 11;

+       case 'c' :

+       case 'C' :

+          return 12;

+       case 'd' :

+       case 'D' :

+          return 13;

+       case 'e' :

+       case 'E' :

+          return 14;

+       case 'f' :

+       case 'F' :

+          return 15;

+    }

+

+    throw new java.io.IOException(); // Should never come here

+  }

+

+  static public int bufpos = -1;

+  static int bufsize;

+  static int available;

+  static int tokenBegin;

+  static protected int bufline[];

+  static protected int bufcolumn[];

+

+  static protected int column = 0;

+  static protected int line = 1;

+

+  static protected boolean prevCharIsCR = false;

+  static protected boolean prevCharIsLF = false;

+

+  static protected java.io.Reader inputStream;

+

+  static protected char[] nextCharBuf;

+  static protected char[] buffer;

+  static protected int maxNextCharInd = 0;

+  static protected int nextCharInd = -1;

+  static protected int inBuf = 0;

+

+  static protected void ExpandBuff(boolean wrapAround)

+  {

+     char[] newbuffer = new char[bufsize + 2048];

+     int newbufline[] = new int[bufsize + 2048];

+     int newbufcolumn[] = new int[bufsize + 2048];

+

+     try

+     {

+        if (wrapAround)

+        {

+           System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);

+           System.arraycopy(buffer, 0, newbuffer,

+                                             bufsize - tokenBegin, bufpos);

+           buffer = newbuffer;

+

+           System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);

+           System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);

+           bufline = newbufline;

+

+           System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);

+           System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);

+           bufcolumn = newbufcolumn;

+

+           bufpos += (bufsize - tokenBegin);

+        }

+        else

+        {

+           System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);

+           buffer = newbuffer;

+

+           System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);

+           bufline = newbufline;

+

+           System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);

+           bufcolumn = newbufcolumn;

+

+           bufpos -= tokenBegin;

+        }

+     }

+     catch (Throwable t)

+     {

+        throw new Error(t.getMessage());

+     }

+

+     available = (bufsize += 2048);

+     tokenBegin = 0;

+  }

+

+  static protected void FillBuff() throws java.io.IOException

+  {

+     int i;

+     if (maxNextCharInd == 4096)

+        maxNextCharInd = nextCharInd = 0;

+

+     try {

+        if ((i = inputStream.read(nextCharBuf, maxNextCharInd,

+                                            4096 - maxNextCharInd)) == -1)

+        {

+           inputStream.close();

+           throw new java.io.IOException();

+        }

+        else

+           maxNextCharInd += i;

+        return;

+     }

+     catch(java.io.IOException e) {

+        if (bufpos != 0)

+        {

+           --bufpos;

+           backup(0);

+        }

+        else

+        {

+           bufline[bufpos] = line;

+           bufcolumn[bufpos] = column;

+        }

+        throw e;

+     }

+  }

+

+  static protected char ReadByte() throws java.io.IOException

+  {

+     if (++nextCharInd >= maxNextCharInd)

+        FillBuff();

+

+     return nextCharBuf[nextCharInd];

+  }

+

+  static public char BeginToken() throws java.io.IOException

+  {     

+     if (inBuf > 0)

+     {

+        --inBuf;

+

+        if (++bufpos == bufsize)

+           bufpos = 0;

+

+        tokenBegin = bufpos;

+        return buffer[bufpos];

+     }

+

+     tokenBegin = 0;

+     bufpos = -1;

+

+     return readChar();

+  }     

+

+  static protected void AdjustBuffSize()

+  {

+     if (available == bufsize)

+     {

+        if (tokenBegin > 2048)

+        {

+           bufpos = 0;

+           available = tokenBegin;

+        }

+        else

+           ExpandBuff(false);

+     }

+     else if (available > tokenBegin)

+        available = bufsize;

+     else if ((tokenBegin - available) < 2048)

+        ExpandBuff(true);

+     else

+        available = tokenBegin;

+  }

+

+  static protected void UpdateLineColumn(char c)

+  {

+     column++;

+

+     if (prevCharIsLF)

+     {

+        prevCharIsLF = false;

+        line += (column = 1);

+     }

+     else if (prevCharIsCR)

+     {

+        prevCharIsCR = false;

+        if (c == '\n')

+        {

+           prevCharIsLF = true;

+        }

+        else

+           line += (column = 1);

+     }

+

+     switch (c)

+     {

+        case '\r' :

+           prevCharIsCR = true;

+           break;

+        case '\n' :

+           prevCharIsLF = true;

+           break;

+        case '\t' :

+           column--;

+           column += (8 - (column & 07));

+           break;

+        default :

+           break;

+     }

+

+     bufline[bufpos] = line;

+     bufcolumn[bufpos] = column;

+  }

+

+  static public char readChar() throws java.io.IOException

+  {

+     if (inBuf > 0)

+     {

+        --inBuf;

+

+        if (++bufpos == bufsize)

+           bufpos = 0;

+

+        return buffer[bufpos];

+     }

+

+     char c;

+

+     if (++bufpos == available)

+        AdjustBuffSize();

+

+     if ((buffer[bufpos] = c = ReadByte()) == '\\')

+     {

+        UpdateLineColumn(c);

+

+        int backSlashCnt = 1;

+

+        for (;;) // Read all the backslashes

+        {

+           if (++bufpos == available)

+              AdjustBuffSize();

+

+           try

+           {

+              if ((buffer[bufpos] = c = ReadByte()) != '\\')

+              {

+                 UpdateLineColumn(c);

+                 // found a non-backslash char.

+                 if ((c == 'u') && ((backSlashCnt & 1) == 1))

+                 {

+                    if (--bufpos < 0)

+                       bufpos = bufsize - 1;

+

+                    break;

+                 }

+

+                 backup(backSlashCnt);

+                 return '\\';

+              }

+           }

+           catch(java.io.IOException e)

+           {

+              if (backSlashCnt > 1)

+                 backup(backSlashCnt);

+

+              return '\\';

+           }

+

+           UpdateLineColumn(c);

+           backSlashCnt++;

+        }

+

+        // Here, we have seen an odd number of backslash's followed by a 'u'

+        try

+        {

+           while ((c = ReadByte()) == 'u')

+              ++column;

+

+           buffer[bufpos] = c = (char)(hexval(c) << 12 |

+                                       hexval(ReadByte()) << 8 |

+                                       hexval(ReadByte()) << 4 |

+                                       hexval(ReadByte()));

+

+           column += 4;

+        }

+        catch(java.io.IOException e)

+        {

+           throw new Error("Invalid escape character at line " + line +

+                                         " column " + column + ".");

+        }

+

+        if (backSlashCnt == 1)

+           return c;

+        else

+        {

+           backup(backSlashCnt - 1);

+           return '\\';

+        }

+     }

+     else

+     {

+        UpdateLineColumn(c);

+        return (c);

+     }

+  }

+

+  /**

+   * @deprecated 

+   * @see #getEndColumn

+   */

+

+  static public int getColumn() {

+     return bufcolumn[bufpos];

+  }

+

+  /**

+   * @deprecated 

+   * @see #getEndLine

+   */

+

+  static public int getLine() {

+     return bufline[bufpos];

+  }

+

+  static public int getEndColumn() {

+     return bufcolumn[bufpos];

+  }

+

+  static public int getEndLine() {

+     return bufline[bufpos];

+  }

+

+  static public int getBeginColumn() {

+     return bufcolumn[tokenBegin];

+  }

+

+  static public int getBeginLine() {

+     return bufline[tokenBegin];

+  }

+

+  static public void backup(int amount) {

+

+    inBuf += amount;

+    if ((bufpos -= amount) < 0)

+       bufpos += bufsize;

+  }

+

+  public JavaCharStream(java.io.Reader dstream,

+                 int startline, int startcolumn, int buffersize)

+  {

+    if (inputStream != null)

+       throw new Error("\n   ERROR: Second call to the constructor of a static JavaCharStream.  You must\n" +

+       "       either use ReInit() or set the JavaCC option STATIC to false\n" +

+       "       during the generation of this class.");

+    inputStream = dstream;

+    line = startline;

+    column = startcolumn - 1;

+

+    available = bufsize = buffersize;

+    buffer = new char[buffersize];

+    bufline = new int[buffersize];

+    bufcolumn = new int[buffersize];

+    nextCharBuf = new char[4096];

+  }

+

+  public JavaCharStream(java.io.Reader dstream,

+                                        int startline, int startcolumn)

+  {

+     this(dstream, startline, startcolumn, 4096);

+  }

+

+  public JavaCharStream(java.io.Reader dstream)

+  {

+     this(dstream, 1, 1, 4096);

+  }

+  public void ReInit(java.io.Reader dstream,

+                 int startline, int startcolumn, int buffersize)

+  {

+    inputStream = dstream;

+    line = startline;

+    column = startcolumn - 1;

+

+    if (buffer == null || buffersize != buffer.length)

+    {

+      available = bufsize = buffersize;

+      buffer = new char[buffersize];

+      bufline = new int[buffersize];

+      bufcolumn = new int[buffersize];

+      nextCharBuf = new char[4096];

+    }

+    prevCharIsLF = prevCharIsCR = false;

+    tokenBegin = inBuf = maxNextCharInd = 0;

+    nextCharInd = bufpos = -1;

+  }

+

+  public void ReInit(java.io.Reader dstream,

+                                        int startline, int startcolumn)

+  {

+     ReInit(dstream, startline, startcolumn, 4096);

+  }

+

+  public void ReInit(java.io.Reader dstream)

+  {

+     ReInit(dstream, 1, 1, 4096);

+  }

+  public JavaCharStream(java.io.InputStream dstream, int startline,

+  int startcolumn, int buffersize)

+  {

+     this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);

+  }

+

+  public JavaCharStream(java.io.InputStream dstream, int startline,

+                                                           int startcolumn)

+  {

+     this(dstream, startline, startcolumn, 4096);

+  }

+

+  public JavaCharStream(java.io.InputStream dstream)

+  {

+     this(dstream, 1, 1, 4096);

+  }

+

+  public void ReInit(java.io.InputStream dstream, int startline,

+  int startcolumn, int buffersize)

+  {

+     ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);

+  }

+  public void ReInit(java.io.InputStream dstream, int startline,

+                                                           int startcolumn)

+  {

+     ReInit(dstream, startline, startcolumn, 4096);

+  }

+  public void ReInit(java.io.InputStream dstream)

+  {

+     ReInit(dstream, 1, 1, 4096);

+  }

+

+  static public String GetImage()

+  {

+     if (bufpos >= tokenBegin)

+        return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);

+     else

+        return new String(buffer, tokenBegin, bufsize - tokenBegin) +

+                              new String(buffer, 0, bufpos + 1);

+  }

+

+  static public char[] GetSuffix(int len)

+  {

+     char[] ret = new char[len];

+

+     if ((bufpos + 1) >= len)

+        System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);

+     else

+     {

+        System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,

+                                                          len - bufpos - 1);

+        System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);

+     }

+

+     return ret;

+  }

+

+  static public void Done()

+  {

+     nextCharBuf = null;

+     buffer = null;

+     bufline = null;

+     bufcolumn = null;

+  }

+

+  /**

+   * Method to adjust line and column numbers for the start of a token.

+   */

+  static public void adjustBeginLineColumn(int newLine, int newCol)

+  {

+     int start = tokenBegin;

+     int len;

+

+     if (bufpos >= tokenBegin)

+     {

+        len = bufpos - tokenBegin + inBuf + 1;

+     }

+     else

+     {

+        len = bufsize - tokenBegin + bufpos + 1 + inBuf;

+     }

+

+     int i = 0, j = 0, k = 0;

+     int nextColDiff = 0, columnDiff = 0;

+

+     while (i < len &&

+            bufline[j = start % bufsize] == bufline[k = ++start % bufsize])

+     {

+        bufline[j] = newLine;

+        nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];

+        bufcolumn[j] = newCol + columnDiff;

+        columnDiff = nextColDiff;

+        i++;

+     } 

+

+     if (i < len)

+     {

+        bufline[j] = newLine++;

+        bufcolumn[j] = newCol + columnDiff;

+

+        while (i++ < len)

+        {

+           if (bufline[j = start % bufsize] != bufline[++start % bufsize])

+              bufline[j] = newLine++;

+           else

+              bufline[j] = newLine;

+        }

+     }

+

+     line = bufline[j];

+     column = bufcolumn[j];

+  }

+

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/MultiplicityDefinition.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/MultiplicityDefinition.java
new file mode 100644
index 0000000..101669e
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/MultiplicityDefinition.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import org.eclipse.viatra2.core.EMultiplicityKind;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.errors.VPMCoreException;
+

+public class MultiplicityDefinition extends RelationshipDefinition{

+	

+	String multiplicity = "";

+	public MultiplicityDefinition(int l, String ns, String n, String s)

+	{

+		super(l,ns,n,null);

+		multiplicity = s;

+		

+	}

+	@Override

+	public boolean checkDefintion(ASTBuilder ab, IModelSpace m) {

+		// TODO Auto-generated method stub

+		boolean tmp = super.checkDefintion(ab, m);

+		if (tmp)

+		{

+			if (_mstr instanceof EntityDefinition)

+			{

+				ab.log.error("Multiplicity can only be specified for relations. Error in line "+getLine());

+				return false;

+			}

+			

+		}

+		return tmp;

+	}

+

+	@Override

+	public void resolveReferences(ASTBuilder ab) throws VPMCoreException {

+		

+		EMultiplicityKind mk = EMultiplicityKind.MANY_TO_MANY;

+		

+		if (multiplicity.equals("one_to_one")) mk = EMultiplicityKind.ONE_TO_ONE;

+		if (multiplicity.equals("one_to_many")) mk = EMultiplicityKind.ONE_TO_MANY;

+		if (multiplicity.equals("many_to_one")) mk = EMultiplicityKind.MANY_TO_ONE;

+		

+		ab.mm.setRelationMultiplicity((IRelation)_mstr.getElement(),mk);

+		

+	}

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/NamespaceImport.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/NamespaceImport.java
new file mode 100644
index 0000000..a6731a4
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/NamespaceImport.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMCoreException;
+

+/**

+ * @author babo

+ *

+ * TODO To change the template for this generated type comment go to

+ * Window - Preferences - Java - Code Style - Code Templates

+ */

+public class NamespaceImport extends ASTNode {

+	

+	public NamespaceImport(int l, String n)

+	{

+		name = n;

+		setLine(l);

+	}

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#checkDefintion(org.eclipse.viatra2.imports.vtcl.ASTBuilder, org.eclipse.viatra2.core.IModelSpace)

+	 */

+	public boolean checkDefintion(ASTBuilder ab, IModelSpace m) {

+		if (!ab.namespaceExists(name))

+		{

+			ab.log.error("Namespace "+name+" does not exists. Error in line "+getLine());

+			return false;

+		}

+		return true;

+	}

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#resolveReferences(org.eclipse.viatra2.imports.vtcl.ASTBuilder)

+	 */

+	public void resolveReferences(ASTBuilder ab) throws VPMCoreException {

+		// TODO Auto-generated method stub

+

+	}

+	public  void generateElements(ASTBuilder ab, IModelSpace m,IEntity temp) throws VPMCoreException

+	{

+		

+	}

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#updateModelspace(org.eclipse.viatra2.imports.vtcl.ASTBuilder, org.eclipse.viatra2.core.IModelSpace)

+	 */

+	public void updateModelspace(ASTBuilder ab, IModelSpace m) throws VPMCoreException {

+		// TODO Auto-generated method stub

+

+	}

+	/**

+	 * @return Returns the name.

+	 */

+	public String getName() {

+		return name;

+	}

+	/**

+	 * @param name The name to set.

+	 */

+	public void setName(String name) {

+		this.name = name;

+	}

+	String name;

+

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/ParseException.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/ParseException.java
new file mode 100644
index 0000000..ceb7d76
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/ParseException.java
@@ -0,0 +1,202 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+/**

+ * This exception is thrown when parse errors are encountered.

+ * You can explicitly create objects of this exception type by

+ * calling the method generateParseException in the generated

+ * parser.

+ *

+ * You can modify this class to customize your error reporting

+ * mechanisms so long as you retain the public fields.

+ */

+public class ParseException extends Exception {

+

+  /**

+   * This constructor is used by the method "generateParseException"

+   * in the generated parser.  Calling this constructor generates

+   * a new object of this type with the fields "currentToken",

+   * "expectedTokenSequences", and "tokenImage" set.  The boolean

+   * flag "specialConstructor" is also set to true to indicate that

+   * this constructor was used to create this object.

+   * This constructor calls its super class with the empty string

+   * to force the "toString" method of parent class "Throwable" to

+   * print the error message in the form:

+   *     ParseException: <result of getMessage>

+   */

+  public ParseException(Token currentTokenVal,

+                        int[][] expectedTokenSequencesVal,

+                        String[] tokenImageVal

+                       )

+  {

+    super("");

+    specialConstructor = true;

+    currentToken = currentTokenVal;

+    expectedTokenSequences = expectedTokenSequencesVal;

+    tokenImage = tokenImageVal;

+  }

+

+  /**

+   * The following constructors are for use by you for whatever

+   * purpose you can think of.  Constructing the exception in this

+   * manner makes the exception behave in the normal way - i.e., as

+   * documented in the class "Throwable".  The fields "errorToken",

+   * "expectedTokenSequences", and "tokenImage" do not contain

+   * relevant information.  The JavaCC generated code does not use

+   * these constructors.

+   */

+

+  public ParseException() {

+    super();

+    specialConstructor = false;

+  }

+

+  public ParseException(String message) {

+    super(message);

+    specialConstructor = false;

+  }

+

+  /**

+   * This variable determines which constructor was used to create

+   * this object and thereby affects the semantics of the

+   * "getMessage" method (see below).

+   */

+  protected boolean specialConstructor;

+

+  /**

+   * This is the last token that has been consumed successfully.  If

+   * this object has been created due to a parse error, the token

+   * followng this token will (therefore) be the first error token.

+   */

+  public Token currentToken;

+

+  /**

+   * Each entry in this array is an array of integers.  Each array

+   * of integers represents a sequence of tokens (by their ordinal

+   * values) that is expected at this point of the parse.

+   */

+  public int[][] expectedTokenSequences;

+

+  /**

+   * This is a reference to the "tokenImage" array of the generated

+   * parser within which the parse error occurred.  This array is

+   * defined in the generated ...Constants interface.

+   */

+  public String[] tokenImage;

+

+  /**

+   * This method has the standard behavior when this object has been

+   * created using the standard constructors.  Otherwise, it uses

+   * "currentToken" and "expectedTokenSequences" to generate a parse

+   * error message and returns it.  If this object has been created

+   * due to a parse error, and you do not catch it (it gets thrown

+   * from the parser), then this method is called during the printing

+   * of the final stack trace, and hence the correct error message

+   * gets displayed.

+   */

+  public String getMessage() {

+    if (!specialConstructor) {

+      return super.getMessage();

+    }

+    String expected = "";

+    int maxSize = 0;

+    for (int i = 0; i < expectedTokenSequences.length; i++) {

+      if (maxSize < expectedTokenSequences[i].length) {

+        maxSize = expectedTokenSequences[i].length;

+      }

+      for (int j = 0; j < expectedTokenSequences[i].length; j++) {

+        expected += tokenImage[expectedTokenSequences[i][j]] + " ";

+      }

+      if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {

+        expected += "...";

+      }

+      expected += eol + "    ";

+    }

+    String retval = "Encountered \"";

+    Token tok = currentToken.next;

+    for (int i = 0; i < maxSize; i++) {

+      if (i != 0) retval += " ";

+      if (tok.kind == 0) {

+        retval += tokenImage[0];

+        break;

+      }

+      retval += add_escapes(tok.image);

+      tok = tok.next; 

+    }

+    retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;

+    retval += "." + eol;

+    if (expectedTokenSequences.length == 1) {

+      retval += "Was expecting:" + eol + "    ";

+    } else {

+      retval += "Was expecting one of:" + eol + "    ";

+    }

+    retval += expected;

+    return retval;

+  }

+

+  /**

+   * The end of line string for this machine.

+   */

+  protected String eol = System.getProperty("line.separator", "\n");

+ 

+  /**

+   * Used to convert raw characters to their escaped version

+   * when these raw version cannot be used as part of an ASCII

+   * string literal.

+   */

+  protected String add_escapes(String str) {

+      StringBuffer retval = new StringBuffer();

+      char ch;

+      for (int i = 0; i < str.length(); i++) {

+        switch (str.charAt(i))

+        {

+           case 0 :

+              continue;

+           case '\b':

+              retval.append("\\b");

+              continue;

+           case '\t':

+              retval.append("\\t");

+              continue;

+           case '\n':

+              retval.append("\\n");

+              continue;

+           case '\f':

+              retval.append("\\f");

+              continue;

+           case '\r':

+              retval.append("\\r");

+              continue;

+           case '\"':

+              retval.append("\\\"");

+              continue;

+           case '\'':

+              retval.append("\\\'");

+              continue;

+           case '\\':

+              retval.append("\\\\");

+              continue;

+           default:

+              if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {

+                 String s = "0000" + Integer.toString(ch, 16);

+                 retval.append("\\u" + s.substring(s.length() - 4, s.length()));

+              } else {

+                 retval.append(ch);

+              }

+              continue;

+        }

+      }

+      return retval.toString();

+   }

+

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/RelationDefinition.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/RelationDefinition.java
new file mode 100644
index 0000000..34e52d7
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/RelationDefinition.java
@@ -0,0 +1,257 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.errors.VPMCoreException;
+

+/**

+ * @author babo

+ *

+ */

+public class RelationDefinition extends ElementDefinition {

+

+	IRelation element = null;

+	public IModelElement getElement()

+	{

+		if (element==null)

+		{

+			//System.out.println("GETELEMENT: "+this.toString());

+			elemGen(VTMLMetaModelHelper.getInstance().getMSpace());

+		}

+		return element;

+	}	

+	/* (non-Javadoc)

+	 * @see java.lang.Object#toString()

+	 */

+	public String toString() {

+		// TODO Auto-generated method stub

+		return "relation name : "+name+" type : "+type+" src : "+source+" trg: "+target+" namespace: "+namespace;

+	}

+	String name;

+	String namespace;

+	String defns;

+	String type;

+	String source;

+	String target;

+	

+	IModelElement tar;

+	IModelElement src;

+	IModelElement typ;

+	IEntity ns;

+	

+	public boolean isNativ = false;

+	

+	public RelationDefinition(IRelation r)

+	{

+		defns="";

+		name = r.getName();

+		namespace = r.getNamespace().getFullyQualifiedName();

+		source = r.getFrom().getFullyQualifiedName();

+		target = r.getTo().getFullyQualifiedName();

+		element = r;

+		type = null;

+		isNativ = true;

+	}

+	

+	public RelationDefinition(int l, String ns, String n, String t, String s, String tar)

+	{

+		name = n;

+		if (name.indexOf(".")>0) name = name.substring(name.lastIndexOf(".")+1);

+		namespace = ns;

+		defns = ns;

+		type = t;

+		source = s;

+		target = tar;

+		setLine(l);

+		isNativ=false;

+	}

+	

+	RelationDefinition _type = null;

+	ElementDefinition _source  = null;

+	ElementDefinition _target = null;

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#checkDefintion(org.eclipse.viatra2.imports.vtcl.ASTBuilder, org.eclipse.viatra2.core.IModelSpace)

+	 */

+	public boolean checkDefintion(ASTBuilder ab, IModelSpace m) {

+		String tmp = null;

+		if (!isNativ)

+		{

+		

+		_type = ab.getRelationWithLookup(defns,type);

+		if ((_type==null) && (!type.equals("relation")))

+		{

+			ab.log.error("type "+type+" for relation "+name+" not found. Error in line "+getLine());

+			return false;

+		}

+		

+		_source = ab.getElementWithLookup(defns,source);

+		

+		if (_source==null)

+		{

+			ab.log.error("Source "+source+" for relation "+name+" not found. Error in line "+getLine());

+			return false;

+		} else source = tmp;

+		

+		_target = ab.getElementWithLookup(defns,target);

+		

+		if (_target==null)

+		{

+			ab.log.error("Target "+target+" for relation "+name+" not found. Error in line "+getLine());

+			return false;

+		} else target = tmp;

+		if (_target==this || _source==this)

+		{

+			ab.log.error("Relation cannot start or end in itself. Error in line "+getLine());

+			return false;

+		}

+		}

+		for (RelationDefinition r : relations)

+		{

+			boolean btm = r.checkDefintion(ab,m);

+			if (!btm) return false;

+		}

+		return true;

+		

+	}

+

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#resolveReferences(org.eclipse.viatra2.imports.vtcl.ASTBuilder)

+	 */

+	public void resolveReferences(ASTBuilder ab)   throws VPMCoreException{

+		

+	

+		

+

+	}

+

+	public String getFQN()

+	{

+		return namespace+"."+name;

+		//if (namespace.length()==0) return name; else return namespace+"."+name;

+	}

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#updateModelspace(org.eclipse.viatra2.imports.vtcl.ASTBuilder, org.eclipse.viatra2.core.IModelSpace)

+	 */

+	public void updateModelspace(ASTBuilder ab, IModelSpace m)  throws VPMCoreException{

+		elemGen(m);

+		for (RelationDefinition r : relations)

+		{

+			r.updateModelspace(ab,m);

+		}

+

+	}

+

+	String tmpName;

+	IRelation me;

+	IEntity tmp;

+	boolean amIFun=false;

+	IModelManager mm;

+	public  void generateElements(ASTBuilder ab, IModelSpace m,IEntity temp) throws VPMCoreException

+	{

+		

+	}

+	

+	public void elemGen(IModelSpace m)

+	{

+		if (element==null)

+		{

+		try

+		{

+			mm = m.getModelManager();

+		//	System.out.println("<DEBUG>"+name+"  "+isNativ+"   "+_source+"   "+_target);

+			element = mm.newRelation(name,_source.getElement(),_target.getElement());

+			if (_type!=null) mm.newInstanceOf(_type.getElement(),element);

+		}

+		catch (Exception e)

+		{

+			e.printStackTrace();

+		}

+		}

+	}

+	/**

+	 * @return Returns the name.

+	 */

+	public String getName() {

+		if (isNativ)

+			return element.getName();

+		else		

+		return name;

+	}

+	/**

+	 * @param name The name to set.

+	 */

+	public void setName(String name) {

+		this.name = name;

+	}

+	/**

+	 * @return Returns the namespace.

+	 */

+	public String getNamespace() {

+		if (isNativ)

+			if (element.getFrom().getNamespace()!=null)

+			return element.getFrom().getNamespace().getFullyQualifiedName();

+			else return "";

+		else

+		return namespace;

+	}

+	/**

+	 * @param namespace The namespace to set.

+	 */

+	public void setNamespace(String namespace) {

+		this.namespace = namespace;

+	}

+	/**

+	 * @return Returns the source.

+	 */

+	public String getSource() {

+		if (isNativ)

+			return element.getFrom().getName();

+		else

+		return source;

+	}

+	/**

+	 * @param source The source to set.

+	 */

+	public void setSource(String source) {

+		this.source = source;

+	}

+	/**

+	 * @return Returns the target.

+	 */

+	public String getTarget() {

+		return target;

+	}

+	/**

+	 * @param target The target to set.

+	 */

+	public void setTarget(String target) {

+		this.target = target;

+	}

+	/**

+	 * @return Returns the type.

+	 */

+	public String getType() {

+		return type;

+	}

+	/**

+	 * @param type The type to set.

+	 */

+	public void setType(String type) {

+		this.type = type;

+	}

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/RelationshipDefinition.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/RelationshipDefinition.java
new file mode 100644
index 0000000..429da4e
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/RelationshipDefinition.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMCoreException;
+import org.eclipse.viatra2.logger.Logger;
+

+/**

+ * @author babo

+ *

+ * TODO To change the template for this generated type comment go to

+ * Window - Preferences - Java - Code Style - Code Templates

+ */

+public abstract class RelationshipDefinition extends ASTNode {

+	IEntity element = null;

+

+	

+	public RelationshipDefinition(int l,String n,String m, String s)

+	{

+		master = m;

+		slave = s;

+		setLine(l);

+		ns = n;

+	}

+	String master;

+	String slave;

+	String ns;

+	ElementDefinition _mstr = null;

+	ElementDefinition _slv = null;

+	

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#checkDefintion(org.eclipse.viatra2.imports.vtcl.ASTBuilder, org.eclipse.viatra2.core.IModelSpace)

+	 */

+	public boolean checkDefintion(ASTBuilder ab, IModelSpace m) {

+		Logger log = ab.log;

+		_mstr = ab.getElementWithLookup(ns,master);

+		if (_mstr==null)

+		{

+			log.error("Supplier end of relationship ("+master+") does not exists in the modelspace. Error in line "+getLine());

+			return false;

+		}

+		

+		if (slave!=null)

+		{

+		_slv = ab.getElementWithLookup(ns,slave);

+		if (_slv==null)

+		{

+			log.error("Client end of relationship ("+slave+") does not exists in the modelspace. Error in line "+getLine());

+			return false;

+		}

+		}

+		return true;

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#generateElements(org.eclipse.viatra2.imports.vtcl.ASTBuilder, org.eclipse.viatra2.core.IModelSpace, org.eclipse.viatra2.core.IEntity)

+	 */

+	public void generateElements(ASTBuilder ab, IModelSpace m, IEntity temp)

+			throws VPMCoreException {

+		

+	}

+

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#updateModelspace(org.eclipse.viatra2.imports.vtcl.ASTBuilder, org.eclipse.viatra2.core.IModelSpace)

+	 */

+	IModelManager mm;

+	public void updateModelspace(ASTBuilder ab, IModelSpace m)

+			throws VPMCoreException {

+		

+		

+	}

+

+	/**

+	 * @return Returns the master.

+	 */

+	public String getMaster() {

+		return master;

+	}

+	/**

+	 * @param master The master to set.

+	 */

+	public void setMaster(String master) {

+		this.master = master;

+	}

+	/**

+	 * @return Returns the slave.

+	 */

+	public String getSlave() {

+		return slave;

+	}

+	/**

+	 * @param slave The slave to set.

+	 */

+	public void setSlave(String slave) {

+		this.slave = slave;

+	}

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/SupertypeDefinition.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/SupertypeDefinition.java
new file mode 100644
index 0000000..a5e7060
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/SupertypeDefinition.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import org.eclipse.viatra2.errors.VPMCoreException;
+

+/**

+ * @author babo

+ *

+ * TODO To change the template for this generated type comment go to

+ * Window - Preferences - Java - Code Style - Code Templates

+ */

+public class SupertypeDefinition extends RelationshipDefinition {

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#resolveReferences(org.eclipse.viatra2.imports.vtcl.ASTBuilder)

+	 */

+	public void resolveReferences(ASTBuilder ab) throws VPMCoreException {

+		ab.mm.newSupertypeOf(_mstr.getElement(),_slv.getElement());

+	}

+	public SupertypeDefinition(int l,String n,String m, String s)

+	{

+		super(l,n,m,s);

+	}

+

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/Token.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/Token.java
new file mode 100644
index 0000000..f80970034
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/Token.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+/**

+ * Describes the input token stream.

+ */

+

+public class Token {

+

+  /**

+   * An integer that describes the kind of this token.  This numbering

+   * system is determined by JavaCCParser, and a table of these numbers is

+   * stored in the file ...Constants.java.

+   */

+  public int kind;

+

+  /**

+   * beginLine and beginColumn describe the position of the first character

+   * of this token; endLine and endColumn describe the position of the

+   * last character of this token.

+   */

+  public int beginLine, beginColumn, endLine, endColumn;

+

+  /**

+   * The string image of the token.

+   */

+  public String image;

+

+  /**

+   * A reference to the next regular (non-special) token from the input

+   * stream.  If this is the last token from the input stream, or if the

+   * token manager has not read tokens beyond this one, this field is

+   * set to null.  This is true only if this token is also a regular

+   * token.  Otherwise, see below for a description of the contents of

+   * this field.

+   */

+  public Token next;

+

+  /**

+   * This field is used to access special tokens that occur prior to this

+   * token, but after the immediately preceding regular (non-special) token.

+   * If there are no such special tokens, this field is set to null.

+   * When there are more than one such special token, this field refers

+   * to the last of these special tokens, which in turn refers to the next

+   * previous special token through its specialToken field, and so on

+   * until the first special token (whose specialToken field is null).

+   * The next fields of special tokens refer to other special tokens that

+   * immediately follow it (without an intervening regular token).  If there

+   * is no such token, this field is null.

+   */

+  public Token specialToken;

+

+  /**

+   * Returns the image.

+   */

+  public String toString()

+  {

+     return image;

+  }

+

+  /**

+   * Returns a new Token object, by default. However, if you want, you

+   * can create and return subclass objects based on the value of ofKind.

+   * Simply add the cases to the switch for all those special cases.

+   * For example, if you have a subclass of Token called IDToken that

+   * you want to create if ofKind is ID, simlpy add something like :

+   *

+   *    case MyParserConstants.ID : return new IDToken();

+   *

+   * to the following switch statement. Then you can cast matchedToken

+   * variable to the appropriate type and use it in your lexical actions.

+   */

+  public static final Token newToken(int ofKind)

+  {

+     switch(ofKind)

+     {

+       default : return new Token();

+     }

+  }

+

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/TokenMgrError.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/TokenMgrError.java
new file mode 100644
index 0000000..743f4c6
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/TokenMgrError.java
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+public class TokenMgrError extends Error

+{

+   /*

+    * Ordinals for various reasons why an Error of this type can be thrown.

+    */

+

+   /**

+    * Lexical error occured.

+    */

+   static final int LEXICAL_ERROR = 0;

+

+   /**

+    * An attempt wass made to create a second instance of a static token manager.

+    */

+   static final int STATIC_LEXER_ERROR = 1;

+

+   /**

+    * Tried to change to an invalid lexical state.

+    */

+   static final int INVALID_LEXICAL_STATE = 2;

+

+   /**

+    * Detected (and bailed out of) an infinite loop in the token manager.

+    */

+   static final int LOOP_DETECTED = 3;

+

+   /**

+    * Indicates the reason why the exception is thrown. It will have

+    * one of the above 4 values.

+    */

+   int errorCode;

+

+   /**

+    * Replaces unprintable characters by their espaced (or unicode escaped)

+    * equivalents in the given string

+    */

+   protected static final String addEscapes(String str) {

+      StringBuffer retval = new StringBuffer();

+      char ch;

+      for (int i = 0; i < str.length(); i++) {

+        switch (str.charAt(i))

+        {

+           case 0 :

+              continue;

+           case '\b':

+              retval.append("\\b");

+              continue;

+           case '\t':

+              retval.append("\\t");

+              continue;

+           case '\n':

+              retval.append("\\n");

+              continue;

+           case '\f':

+              retval.append("\\f");

+              continue;

+           case '\r':

+              retval.append("\\r");

+              continue;

+           case '\"':

+              retval.append("\\\"");

+              continue;

+           case '\'':

+              retval.append("\\\'");

+              continue;

+           case '\\':

+              retval.append("\\\\");

+              continue;

+           default:

+              if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {

+                 String s = "0000" + Integer.toString(ch, 16);

+                 retval.append("\\u" + s.substring(s.length() - 4, s.length()));

+              } else {

+                 retval.append(ch);

+              }

+              continue;

+        }

+      }

+      return retval.toString();

+   }

+

+   /**

+    * Returns a detailed message for the Error when it is thrown by the

+    * token manager to indicate a lexical error.

+    * Parameters : 

+    *    EOFSeen     : indicates if EOF caused the lexicl error

+    *    curLexState : lexical state in which this error occured

+    *    errorLine   : line number when the error occured

+    *    errorColumn : column number when the error occured

+    *    errorAfter  : prefix that was seen before this error occured

+    *    curchar     : the offending character

+    * Note: You can customize the lexical error message by modifying this method.

+    */

+   protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {

+      return("Lexical error at line " +

+           errorLine + ", column " +

+           errorColumn + ".  Encountered: " +

+           (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +

+           "after : \"" + addEscapes(errorAfter) + "\"");

+   }

+

+   /**

+    * You can also modify the body of this method to customize your error messages.

+    * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not

+    * of end-users concern, so you can return something like : 

+    *

+    *     "Internal Error : Please file a bug report .... "

+    *

+    * from this method for such cases in the release version of your parser.

+    */

+   public String getMessage() {

+      return super.getMessage();

+   }

+

+   /*

+    * Constructors of various flavors follow.

+    */

+

+   public TokenMgrError() {

+   }

+

+   public TokenMgrError(String message, int reason) {

+      super(message);

+      errorCode = reason;

+   }

+

+   public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {

+      this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);

+   }

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/TypeDefinition.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/TypeDefinition.java
new file mode 100644
index 0000000..95f3d4e
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/TypeDefinition.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import org.eclipse.viatra2.errors.VPMCoreException;
+

+/**

+ * @author babo

+ *

+ * TODO To change the template for this generated type comment go to

+ * Window - Preferences - Java - Code Style - Code Templates

+ */

+public class TypeDefinition extends RelationshipDefinition {

+	public TypeDefinition(int l,String n,String m, String s)

+	{

+		super(l,n,m,s);

+	}

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.vtcl.ASTNode#resolveReferences(org.eclipse.viatra2.imports.vtcl.ASTBuilder)

+	 */

+	public void resolveReferences(ASTBuilder ab) throws VPMCoreException {

+		

+		ab.mm.newInstanceOf(_mstr.getElement(),_slv.getElement());

+

+	}

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTCLMetaModelHelper.java.backup b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTCLMetaModelHelper.java.backup
new file mode 100644
index 0000000..3647e72
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTCLMetaModelHelper.java.backup
@@ -0,0 +1,3328 @@
+/*

+ * Created on 2005.01.04.

+ *

+ * TODO To change the template for this generated file go to

+ * Window - Preferences - Java - Code Style - Code Templates

+ */

+package org.eclipse.viatra2.imports.vtcl;

+

+import java.util.Collection;

+import java.util.Iterator;

+import java.util.Stack;

+import java.util.StringTokenizer;

+import java.util.Vector;

+

+import org.eclipse.viatra2.logger.Logger;

+

+import org.eclipse.viatra2.core.*;

+import org.eclipse.viatra2.errors.VPMCoreException;

+import org.eclipse.viatra2.errors.VPMRuntimeException;

+/*

+import org.eclipse.viatra2.imports.vtcl.asmrules.ASMRuleDef;

+import org.eclipse.viatra2.imports.vtcl.asmrules.CallRule;

+import org.eclipse.viatra2.imports.vtcl.asmrules.DeleteElementRule;

+import org.eclipse.viatra2.imports.vtcl.asmrules.DeleteRelationshipRule;

+import org.eclipse.viatra2.imports.vtcl.asmrules.LogRule;

+import org.eclipse.viatra2.imports.vtcl.asmrules.MoveRule;

+import org.eclipse.viatra2.imports.vtcl.asmrules.NewEntityRule;

+import org.eclipse.viatra2.imports.vtcl.asmrules.NewRelationRule;

+import org.eclipse.viatra2.imports.vtcl.asmrules.NewRelationshipRule;

+import org.eclipse.viatra2.imports.vtcl.asmrules.RenameRule;

+import org.eclipse.viatra2.imports.vtcl.asmrules.SetValueRule;

+import org.eclipse.viatra2.imports.vtcl.gt.GTPatternCallDef;

+import org.eclipse.viatra2.imports.vtcl.gt.GTPatternDef;

+import org.eclipse.viatra2.imports.vtcl.gt.GTRuleCallDef;

+import org.eclipse.viatra2.imports.vtcl.gt.GTRuleDef;

+

+import org.eclipse.viatra2.imports.vtcl.terms.FormulaDef;

+import org.eclipse.viatra2.imports.vtcl.terms.TermDef;*/

+/**

+ * @author babo

+ *

+ * TODO To change the template for this generated type comment go to

+ * Window - Preferences - Java - Code Style - Code Templates

+ */

+public class VTCLMetaModelHelper {

+	

+	private static VTCLMetaModelHelper instance;

+	

+	private static Logger log = null;

+	private IModelSpace modsp;

+	private IModelManager mm;

+	

+	public IModelSpace getMSpace() { return modsp;}

+	

+	

+	/* %modelelement to variable mapping start% 

+	  ASM.metamodel ASM_metamodel 

+	  ASM.metamodel.ASMRules ASM_metamodel_ASMRules 

+	  ASM.metamodel.terms.Constant termConstant 

+	  datatypes.Integer typeInteger 

+	  datatypes.String typeString 

+	 %modelelement to variable mapping end% */

+	

+	/* %fqn of model start%

+	ASM

+	datatypes

+	%fqn of model end% */

+	

+	

+

+

+	/* %auto generated modelelement variable definitions start% */

+	/* %auto generated modelelement variable definitions end% */

+	

+	

+	

+	/*	IEntity VARIABLE = null ;

+	IEntity TERM = null ;

+	IFunction TERM_NEXTPARAM = null ;

+	IEntity UPDATERULE = null ;

+	IFunction UPDATERULE_FUNCTION = null ;

+	IFunction UPDATERULE_VALUE = null ;

+	IFunction UPDATERULE_LOCATION = null ;

+	IFunction UPDATERULE_VARIABLE = null ;

+	IEntity UNARYOPERATION = null ;

+	IFunction UNARYOPERATION_FORMULA = null ;

+	IEntity SETVALUERULE = null ;

+	IFunction SETVALUERULE_VALUE = null ;

+	IFunction SETVALUERULE_ELEMENTREF = null ;

+	IEntity RELATIONSHIPTYPE = null ;

+	IEntity RELATIONCREATERULE = null ;

+	IFunction RELATIONCREATERULE_SOURCE = null ;

+	IFunction RELATIONCREATERULE_TARGET = null ;

+	IEntity RELATIONSHIPCREATERULE = null ;

+	IFunction RELATIONSHIPCREATERULE_FROMREF = null ;

+	IFunction RELATIONSHIPCREATERULE_TOREF = null ;

+	IFunction RELATIONSHIPCREATERULE_TYPE = null ;

+	IEntity RULEPARAMETER = null ;

+	IFunction RULEPARAMETER_NEXTPARAM = null ;

+	IFunction RULEPARAMETER_DIRECTION = null ;

+	IFunction RULEPARAMETER_VARIABLE = null ;

+	IEntity RENAMERULE = null ;

+	IFunction RENAMERULE_ELEMENT = null ;

+	IFunction RENAMERULE_NAME = null ;

+	IEntity RANDOMRULE = null ;

+	IEntity QUALIFIEDFORMULA = null ;

+	IFunction QUALIFIEDFORMULA_VARIABLE = null ;

+	IEntity SKIPRULE = null ;

+	IEntity SEQUENTIALRULE = null ;

+	IFunction SEQUENTIALRULE_FIRSTRULE = null ;

+	IEntity RELATIONSHIPDELETERULE = null ;

+	IFunction RELATIONSHIPDELETERULE_FROM = null ;

+	IFunction RELATIONSHIPDELETERULE_TO = null ;

+	IFunction RELATIONSHIPDELETERULE_TYPE = null ;

+	IEntity RELATIONALOPERATION = null ;

+	IFunction RELATIONALOPERATION_LEFTSIDE = null ;

+	IFunction RELATIONALOPERATION_RIGHTSIDE = null ;

+	IEntity PARALLELRULE = null ;

+	IEntity PRINTRULE = null ;

+	IFunction PRINTRULE_OUT = null ;

+	IEntity OR = null ;

+	IEntity NOTEQUALS = null ;

+	IEntity NOT = null ;

+	IEntity NESTEDRULE = null ;

+	IEntity NATIVEIMPLEMENTATION = null ;

+	IEntity NATIVEFUNCTION = null ;

+	IFunction NATIVEFUNCTION_IMPLEMENTATION = null ;

+	IEntity MODELMANIPULATIONRULE = null ;

+	IEntity MOVERULE = null ;

+	IFunction MOVERULE_FROM = null ;

+	IFunction MOVERULE_TO = null ;

+	IFunction MOVERULE_ELEMENT = null ;

+	IEntity MODELELEMENT = null ;

+	IEntity LOGRULE = null ;

+	IFunction LOGRULE_OUT = null ;

+	IFunction LOGRULE_LEVEL = null ;

+	IEntity LESSTHAN = null ;

+	IEntity LEVEL = null ;

+	IEntity LOCATION = null ;

+	IEntity LETRULE = null ;

+	IFunction LETRULE_VARIABLE = null ;

+	IFunction LETRULE_VALUE = null ;

+	IEntity ITERATERULE = null ;

+	IEntity GTRULEINVOCATION = null ;

+	IFunction GTRULEINVOCATION_RULE = null ;

+	IFunction GTRULEINVOCATION_FIRSTPARAM = null ;

+	IEntity IMPLICATION = null ;

+	IEntity GTRULE = null ;

+	IFunction GTRULE_ACTION = null ;

+	//IFunction GTRULE_PATTERN = null ;

+	IFunction GTRULE_FIRSTPARAM = null ;

+	IEntity GTPATTERN = null ;

+	IFunction GTPATTERN_PATTERNCALL = null ;

+	IFunction GTPATTERN_CHECK = null ;

+	IFunction GTPATTERN_FIRSTPARAMETER = null ;

+	IEntity FORMULA = null ;

+	IEntity EXISTS = null ;

+	IEntity EQUALS = null ;

+	IEntity FORALLRULE = null ;

+	IFunction FORALLRULE_FORMULA = null ;

+	IEntity FUNCTIONINVOCATION = null ;

+	IFunction FUNCTIONINVOCATION_FIRSTPARAM = null ;

+	IFunction FUNCTIONINVOCATION_FUNCTION = null ;

+	IEntity GREATERTHAN = null ;

+	IEntity ACTUALPARAMETER = null ;

+	IFunction ACTUALPARAMETER_NEXT = null ;

+	IFunction ACTUALPARAMETER_VALUE = null ;

+	IFunction ACTUALPARAMETER_VARIABLE = null ;

+	IEntity ENTITY = null ;

+	IEntity ELEMENTREFERENCE = null ;

+	IEntity CALLRULE = null ;

+	IFunction CALLRULE_RULE = null ;

+	IFunction CALLRULE_FIRSTPARAMETER = null ;

+	IEntity BINARYOPERATION = null ;

+	IFunction BINARYOPERATION_LEFT = null ;

+	IFunction BINARYOPERATION_RIGHT = null ;

+	IEntity CONDITIONALRULE = null ;

+	IFunction CONDITIONALRULE_CONDITION = null ;

+	IFunction CONDITIONALRULE_GTRULE = null ;

+	IFunction CONDITIONALRULE_RULE1 = null ;

+	IFunction CONDITIONALRULE_RULE2 = null ;

+	IEntity ELEMENTCREATERULE = null ;

+	IFunction ELEMENTCREATERULE_TYPE = null ;

+	IFunction ELEMENTCREATERULE_ELEMENT = null ;

+	IFunction ELEMENTCREATERULE_CONTAINERREF = null ;

+	IEntity CHOOSERULE = null ;

+	IFunction CHOOSERULE_FORMULA = null ;

+	IEntity CONSTANT = null ;

+	IEntity BLOCKRULE = null ;

+	IFunction BLOCKRULE_RULE = null ;

+	IFunction BLOCKRULE_GTRULE = null ;

+	IEntity ASMFUNCTION = null ;

+	IEntity ASMRULEINVOCATION = null ;

+	IFunction ASMRULEINVOCATION_RULE = null ;

+	IFunction ASMRULEINVOCATION_FIRSTPARAM = null ;

+	IEntity ELEMENTDELETERULE = null ;

+	IFunction ELEMENTDELETERULE_ELEMENT = null ;

+	IEntity ASMRULE = null ;

+	IFunction ASMRULE_FIRSTPARAM = null ;

+	IEntity AND = null ;

+	IEntity ALL = null ;

+	IRelation RULE = null ;

+	IRelation LOCATION_REL = null ;

+	IRelation NEGATIVE = null ;

+	IRelation NEXTRULE = null ;

+

+	*/

+	/*

+	 * Manual extensions

+	 */

+	

+	IEntity LEVEL_FATAL = null;

+	IEntity LEVEL_ERROR = null;

+	IEntity LEVEL_WARNING = null;

+	IEntity LEVEL_INFO = null;

+	IEntity LEVEL_DEBUG = null;

+	IEntity STRING = null;

+	

+	IEntity RULEDEFINITION = null;

+/*	IFunction RULEDEFINITION_RULE = null;

+	

+	IEntity GTPATTERNCALL = null;

+	IFunction GTPATTERNCALL_PATTERN = null;

+	IFunction GTPATTERNCALL_FIRSTPARAMETER=null;

+	

+	IFunction GTRULE_POSTCONDITION = null;

+	IFunction GTRULE_PRECONDITION = null;

+	

+	IFunction ANNOTATION = null;

+	

+	/*

+	 * New elements regarding to metamodel revision on 01/03/2005

+	 */

+	/*

+	IFunction GTPATTERNCALL_SCOPE = null;

+	IFunction GTPATTERNCALL_MODE  = null;

+	

+	IFunction GTRULEINVOCATION_SCOPE = null;

+	IFunction GTRULEINVOCATION_MODE = null;

+	

+	IEntity SCOPEDPARAMETER = null;

+	IFunction SCOPEDPARAMETER_NAME = null;

+	IFunction SCOPEDPARAMETER_MODE = null;

+	IFunction SCOPEDPARAMETER_NEXT = null;

+	IFunction SCOPEDPARAMETER_BASE = null;

+	

+	IFunction BLOCKRULE_FIRSTVARIABLE = null;

+	

+	*/

+	

+	Stack conts = new Stack();

+	

+	public void addContainer(IEntity e)

+	{

+		conts.push(e);

+	}

+	public IEntity currentContainer()

+	{

+		return (IEntity)conts.peek();

+	}

+	public IEntity removeContainer()

+	{

+		return (IEntity)conts.pop();

+	}

+	public static VTCLMetaModelHelper getInstance() {

+		if (instance==null) instance = new VTCLMetaModelHelper();

+		if (instance.log==null) return null;

+		return instance;

+	}

+	

+	private VTCLMetaModelHelper()

+	{

+		

+	}

+	

+	public static void init(Logger l, IModelSpace ms, ASTBuilder a) throws VPMRuntimeException

+	{

+		log = l;

+		getInstance().modsp = ms;

+		getInstance().mm = ms.getModelManager();

+		getInstance().ab=a;

+		getInstance().loadMetaModel();

+	}

+	

+	public static void deleteInstance()

+	{

+		instance = null;

+	}

+	

+	private void loadMetaModel() throws VPMRuntimeException

+	{

+		/* %auto generated modelelement load start% */

+		

+		/* %auto generated modelelement load end% */

+		

+		

+		/*

+		VARIABLE = mm.getEntityByName("ASM.metamodel.Variable");

+		if (VARIABLE==null) {

+			log.error("ASM metamodel element ASM.metamodel.Variable not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		TERM = mm.getEntityByName("ASM.metamodel.Term");

+		if (TERM==null) {

+			log.error("ASM metamodel element ASM.metamodel.Term not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		TERM_NEXTPARAM = mm.getFunctionByName("ASM.metamodel.Term.nextParam");

+		if (TERM_NEXTPARAM==null) {

+			log.error("ASM metamodel element ASM.metamodel.Term.nextParam not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		UPDATERULE = mm.getEntityByName("ASM.metamodel.UpdateRule");

+		if (UPDATERULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.UpdateRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		UPDATERULE_FUNCTION = mm.getFunctionByName("ASM.metamodel.UpdateRule.function");

+		if (UPDATERULE_FUNCTION==null) {

+			log.error("ASM metamodel element ASM.metamodel.UpdateRule.function not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		UPDATERULE_VALUE = mm.getFunctionByName("ASM.metamodel.UpdateRule.value");

+		if (UPDATERULE_VALUE==null) {

+			log.error("ASM metamodel element ASM.metamodel.UpdateRule.value not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		UPDATERULE_LOCATION = mm.getFunctionByName("ASM.metamodel.UpdateRule.location");

+		if (UPDATERULE_LOCATION==null) {

+			log.error("ASM metamodel element ASM.metamodel.UpdateRule.location not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		UPDATERULE_VARIABLE = mm.getFunctionByName("ASM.metamodel.UpdateRule.variable");

+		if (UPDATERULE_VARIABLE==null) {

+			log.error("ASM metamodel element ASM.metamodel.UpdateRule.variable not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		UNARYOPERATION = mm.getEntityByName("ASM.metamodel.UnaryOperation");

+		if (UNARYOPERATION==null) {

+			log.error("ASM metamodel element ASM.metamodel.UnaryOperation not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		UNARYOPERATION_FORMULA = mm.getFunctionByName("ASM.metamodel.UnaryOperation.formula");

+		if (UNARYOPERATION_FORMULA==null) {

+			log.error("ASM metamodel element ASM.metamodel.UnaryOperation.formula not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		SETVALUERULE = mm.getEntityByName("ASM.metamodel.SetValueRule");

+		if (SETVALUERULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.SetValueRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		SETVALUERULE_VALUE = mm.getFunctionByName("ASM.metamodel.SetValueRule.value");

+		if (SETVALUERULE_VALUE==null) {

+			log.error("ASM metamodel element ASM.metamodel.SetValueRule.value not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		SETVALUERULE_ELEMENTREF = mm.getFunctionByName("ASM.metamodel.SetValueRule.elementRef");

+		if (SETVALUERULE_ELEMENTREF==null) {

+			log.error("ASM metamodel element ASM.metamodel.SetValueRule.elementRef not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RELATIONSHIPTYPE = mm.getEntityByName("ASM.metamodel.RelationshipType");

+		if (RELATIONSHIPTYPE==null) {

+			log.error("ASM metamodel element ASM.metamodel.RelationshipType not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RELATIONCREATERULE = mm.getEntityByName("ASM.metamodel.RelationCreateRule");

+		if (RELATIONCREATERULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.RelationCreateRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RELATIONCREATERULE_SOURCE = mm.getFunctionByName("ASM.metamodel.RelationCreateRule.source");

+		if (RELATIONCREATERULE_SOURCE==null) {

+			log.error("ASM metamodel element ASM.metamodel.RelationCreateRule.source not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RELATIONCREATERULE_TARGET = mm.getFunctionByName("ASM.metamodel.RelationCreateRule.target");

+		if (RELATIONCREATERULE_TARGET==null) {

+			log.error("ASM metamodel element ASM.metamodel.RelationCreateRule.target not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RELATIONSHIPCREATERULE = mm.getEntityByName("ASM.metamodel.RelationshipCreateRule");

+		if (RELATIONSHIPCREATERULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.RelationshipCreateRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RELATIONSHIPCREATERULE_FROMREF = mm.getFunctionByName("ASM.metamodel.RelationshipCreateRule.fromRef");

+		if (RELATIONSHIPCREATERULE_FROMREF==null) {

+			log.error("ASM metamodel element ASM.metamodel.RelationshipCreateRule.fromRef not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RELATIONSHIPCREATERULE_TOREF = mm.getFunctionByName("ASM.metamodel.RelationshipCreateRule.toRef");

+		if (RELATIONSHIPCREATERULE_TOREF==null) {

+			log.error("ASM metamodel element ASM.metamodel.RelationshipCreateRule.toRef not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RELATIONSHIPCREATERULE_TYPE = mm.getFunctionByName("ASM.metamodel.RelationshipCreateRule.type");

+		if (RELATIONSHIPCREATERULE_TYPE==null) {

+			log.error("ASM metamodel element ASM.metamodel.RelationshipCreateRule.type not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RULEPARAMETER = mm.getEntityByName("ASM.metamodel.RuleParameter");

+		if (RULEPARAMETER==null) {

+			log.error("ASM metamodel element ASM.metamodel.RuleParameter not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RULEPARAMETER_NEXTPARAM = mm.getFunctionByName("ASM.metamodel.RuleParameter.nextParam");

+		if (RULEPARAMETER_NEXTPARAM==null) {

+			log.error("ASM metamodel element ASM.metamodel.RuleParameter.nextParam not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RULEPARAMETER_DIRECTION = mm.getFunctionByName("ASM.metamodel.RuleParameter.direction");

+		if (RULEPARAMETER_DIRECTION==null) {

+			log.error("ASM metamodel element ASM.metamodel.RuleParameter.direction not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RULEPARAMETER_VARIABLE = mm.getFunctionByName("ASM.metamodel.RuleParameter.variable");

+		if (RULEPARAMETER_VARIABLE==null) {

+			log.error("ASM metamodel element ASM.metamodel.RuleParameter.variable not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RENAMERULE = mm.getEntityByName("ASM.metamodel.RenameRule");

+		if (RENAMERULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.RenameRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RENAMERULE_ELEMENT = mm.getFunctionByName("ASM.metamodel.RenameRule.element");

+		if (RENAMERULE_ELEMENT==null) {

+			log.error("ASM metamodel element ASM.metamodel.RenameRule.element not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RENAMERULE_NAME = mm.getFunctionByName("ASM.metamodel.RenameRule.name");

+		if (RENAMERULE_NAME==null) {

+			log.error("ASM metamodel element ASM.metamodel.RenameRule.name not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RANDOMRULE = mm.getEntityByName("ASM.metamodel.RandomRule");

+		if (RANDOMRULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.RandomRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		QUALIFIEDFORMULA = mm.getEntityByName("ASM.metamodel.QualifiedFormula");

+		if (QUALIFIEDFORMULA==null) {

+			log.error("ASM metamodel element ASM.metamodel.QualifiedFormula not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		QUALIFIEDFORMULA_VARIABLE = mm.getFunctionByName("ASM.metamodel.QualifiedFormula.variable");

+		if (QUALIFIEDFORMULA_VARIABLE==null) {

+			log.error("ASM metamodel element ASM.metamodel.QualifiedFormula.variable not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		SKIPRULE = mm.getEntityByName("ASM.metamodel.SkipRule");

+		if (SKIPRULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.SkipRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		SEQUENTIALRULE = mm.getEntityByName("ASM.metamodel.SequentialRule");

+		if (SEQUENTIALRULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.SequentialRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		SEQUENTIALRULE_FIRSTRULE = mm.getFunctionByName("ASM.metamodel.SequentialRule.firstRule");

+		if (SEQUENTIALRULE_FIRSTRULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.SequentialRule.firstRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RELATIONSHIPDELETERULE = mm.getEntityByName("ASM.metamodel.RelationshipDeleteRule");

+		if (RELATIONSHIPDELETERULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.RelationshipDeleteRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RELATIONSHIPDELETERULE_FROM = mm.getFunctionByName("ASM.metamodel.RelationshipDeleteRule.from");

+		if (RELATIONSHIPDELETERULE_FROM==null) {

+			log.error("ASM metamodel element ASM.metamodel.RelationshipDeleteRule.from not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RELATIONSHIPDELETERULE_TO = mm.getFunctionByName("ASM.metamodel.RelationshipDeleteRule.to");

+		if (RELATIONSHIPDELETERULE_TO==null) {

+			log.error("ASM metamodel element ASM.metamodel.RelationshipDeleteRule.to not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RELATIONSHIPDELETERULE_TYPE = mm.getFunctionByName("ASM.metamodel.RelationshipDeleteRule.type");

+		if (RELATIONSHIPDELETERULE_TYPE==null) {

+			log.error("ASM metamodel element ASM.metamodel.RelationshipDeleteRule.type not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RELATIONALOPERATION = mm.getEntityByName("ASM.metamodel.RelationalOperation");

+		if (RELATIONALOPERATION==null) {

+			log.error("ASM metamodel element ASM.metamodel.RelationalOperation not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RELATIONALOPERATION_LEFTSIDE = mm.getFunctionByName("ASM.metamodel.RelationalOperation.leftSide");

+		if (RELATIONALOPERATION_LEFTSIDE==null) {

+			log.error("ASM metamodel element ASM.metamodel.RelationalOperation.leftSide not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RELATIONALOPERATION_RIGHTSIDE = mm.getFunctionByName("ASM.metamodel.RelationalOperation.rightSide");

+		if (RELATIONALOPERATION_RIGHTSIDE==null) {

+			log.error("ASM metamodel element ASM.metamodel.RelationalOperation.rightSide not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		PARALLELRULE = mm.getEntityByName("ASM.metamodel.ParallelRule");

+		if (PARALLELRULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.ParallelRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		PRINTRULE = mm.getEntityByName("ASM.metamodel.PrintRule");

+		if (PRINTRULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.PrintRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		PRINTRULE_OUT = mm.getFunctionByName("ASM.metamodel.PrintRule.out");

+		if (PRINTRULE_OUT==null) {

+			log.error("ASM metamodel element ASM.metamodel.PrintRule.out not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		OR = mm.getEntityByName("ASM.metamodel.Or");

+		if (OR==null) {

+			log.error("ASM metamodel element ASM.metamodel.Or not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		NOTEQUALS = mm.getEntityByName("ASM.metamodel.NotEquals");

+		if (NOTEQUALS==null) {

+			log.error("ASM metamodel element ASM.metamodel.NotEquals not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		NOT = mm.getEntityByName("ASM.metamodel.Not");

+		if (NOT==null) {

+			log.error("ASM metamodel element ASM.metamodel.Not not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		NESTEDRULE = mm.getEntityByName("ASM.metamodel.NestedRule");

+		if (NESTEDRULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.NestedRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		NATIVEIMPLEMENTATION = mm.getEntityByName("ASM.metamodel.NativeImplementation");

+		if (NATIVEIMPLEMENTATION==null) {

+			log.error("ASM metamodel element ASM.metamodel.NativeImplementation not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		NATIVEFUNCTION = mm.getEntityByName("ASM.metamodel.NativeFunction");

+		if (NATIVEFUNCTION==null) {

+			log.error("ASM metamodel element ASM.metamodel.NativeFunction not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		NATIVEFUNCTION_IMPLEMENTATION = mm.getFunctionByName("ASM.metamodel.NativeFunction.implementation");

+		if (NATIVEFUNCTION_IMPLEMENTATION==null) {

+			log.error("ASM metamodel element ASM.metamodel.NativeFunction.implementation not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		MODELMANIPULATIONRULE = mm.getEntityByName("ASM.metamodel.ModelManipulationRule");

+		if (MODELMANIPULATIONRULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.ModelManipulationRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		MOVERULE = mm.getEntityByName("ASM.metamodel.MoveRule");

+		if (MOVERULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.MoveRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		MOVERULE_FROM = mm.getFunctionByName("ASM.metamodel.MoveRule.from");

+		if (MOVERULE_FROM==null) {

+			log.error("ASM metamodel element ASM.metamodel.MoveRule.from not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		MOVERULE_TO = mm.getFunctionByName("ASM.metamodel.MoveRule.to");

+		if (MOVERULE_TO==null) {

+			log.error("ASM metamodel element ASM.metamodel.MoveRule.to not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		MOVERULE_ELEMENT = mm.getFunctionByName("ASM.metamodel.MoveRule.element");

+		if (MOVERULE_ELEMENT==null) {

+			log.error("ASM metamodel element ASM.metamodel.MoveRule.element not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		MODELELEMENT = mm.getEntityByName("ASM.metamodel.ModelElement");

+		if (MODELELEMENT==null) {

+			log.error("ASM metamodel element ASM.metamodel.ModelElement not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		LOGRULE = mm.getEntityByName("ASM.metamodel.LogRule");

+		if (LOGRULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.LogRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		LOGRULE_OUT = mm.getFunctionByName("ASM.metamodel.LogRule.out");

+		if (LOGRULE_OUT==null) {

+			log.error("ASM metamodel element ASM.metamodel.LogRule.out not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		LOGRULE_LEVEL = mm.getFunctionByName("ASM.metamodel.LogRule.level");

+		if (LOGRULE_LEVEL==null) {

+			log.error("ASM metamodel element ASM.metamodel.LogRule.level not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		LESSTHAN = mm.getEntityByName("ASM.metamodel.LessThan");

+		if (LESSTHAN==null) {

+			log.error("ASM metamodel element ASM.metamodel.LessThan not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		LEVEL = mm.getEntityByName("ASM.metamodel.Level");

+		if (LEVEL==null) {

+			log.error("ASM metamodel element ASM.metamodel.Level not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		LOCATION = mm.getEntityByName("ASM.metamodel.Location");

+		if (LOCATION==null) {

+			log.error("ASM metamodel element ASM.metamodel.Location not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		LETRULE = mm.getEntityByName("ASM.metamodel.LetRule");

+		if (LETRULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.LetRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		LETRULE_VARIABLE = mm.getFunctionByName("ASM.metamodel.LetRule.variable");

+		if (LETRULE_VARIABLE==null) {

+			log.error("ASM metamodel element ASM.metamodel.LetRule.variable not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		LETRULE_VALUE = mm.getFunctionByName("ASM.metamodel.LetRule.value");

+		if (LETRULE_VALUE==null) {

+			log.error("ASM metamodel element ASM.metamodel.LetRule.value not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ITERATERULE = mm.getEntityByName("ASM.metamodel.IterateRule");

+		if (ITERATERULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.IterateRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		GTRULEINVOCATION = mm.getEntityByName("ASM.metamodel.GTRuleInvocation");

+		if (GTRULEINVOCATION==null) {

+			log.error("ASM metamodel element ASM.metamodel.GTRuleInvocation not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		GTRULEINVOCATION_RULE = mm.getFunctionByName("ASM.metamodel.GTRuleInvocation.rule");

+		if (GTRULEINVOCATION_RULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.GTRuleInvocation.rule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		GTRULEINVOCATION_FIRSTPARAM = mm.getFunctionByName("ASM.metamodel.GTRuleInvocation.firstParam");

+		if (GTRULEINVOCATION_FIRSTPARAM==null) {

+			log.error("ASM metamodel element ASM.metamodel.GTRuleInvocation.firstParam not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		IMPLICATION = mm.getEntityByName("ASM.metamodel.Implication");

+		if (IMPLICATION==null) {

+			log.error("ASM metamodel element ASM.metamodel.Implication not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		GTRULE = mm.getEntityByName("ASM.metamodel.GTRule");

+		if (GTRULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.GTRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		GTRULE_ACTION = mm.getFunctionByName("ASM.metamodel.GTRule.action");

+		if (GTRULE_ACTION==null) {

+			log.error("ASM metamodel element ASM.metamodel.GTRule.action not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		GTRULE_PRECONDITION = mm.getFunctionByName("ASM.metamodel.GTRule.precondition");

+		if (GTRULE_PRECONDITION==null) {

+			log.error("ASM metamodel element ASM.metamodel.GTRule.precondition not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		GTRULE_POSTCONDITION = mm.getFunctionByName("ASM.metamodel.GTRule.postcondition");

+		if (GTRULE_POSTCONDITION==null) {

+			log.error("ASM metamodel element ASM.metamodel.GTRule.postcondition not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}		

+		GTRULE_FIRSTPARAM = mm.getFunctionByName("ASM.metamodel.GTRule.firstParam");

+		if (GTRULE_FIRSTPARAM==null) {

+			log.error("ASM metamodel element ASM.metamodel.GTRule.firstParam not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		GTPATTERN = mm.getEntityByName("ASM.metamodel.GTPattern");

+		if (GTPATTERN==null) {

+			log.error("ASM metamodel element ASM.metamodel.GTPattern not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		GTPATTERN_PATTERNCALL = mm.getFunctionByName("ASM.metamodel.GTPattern.patternCall");

+		if (GTPATTERN_PATTERNCALL==null) {

+			log.error("ASM metamodel element ASM.metamodel.GTPattern.patternCall not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		GTPATTERN_CHECK = mm.getFunctionByName("ASM.metamodel.GTPattern.check");

+		if (GTPATTERN_CHECK==null) {

+			log.error("ASM metamodel element ASM.metamodel.GTPattern.check not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		GTPATTERN_FIRSTPARAMETER = mm.getFunctionByName("ASM.metamodel.GTPattern.firstParameter");

+		if (GTPATTERN_FIRSTPARAMETER==null) {

+			log.error("ASM metamodel element ASM.metamodel.GTPattern.firstParameter not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		FORMULA = mm.getEntityByName("ASM.metamodel.Formula");

+		if (FORMULA==null) {

+			log.error("ASM metamodel element ASM.metamodel.Formula not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		EXISTS = mm.getEntityByName("ASM.metamodel.Exists");

+		if (EXISTS==null) {

+			log.error("ASM metamodel element ASM.metamodel.Exists not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		EQUALS = mm.getEntityByName("ASM.metamodel.Equals");

+		if (EQUALS==null) {

+			log.error("ASM metamodel element ASM.metamodel.Equals not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		FORALLRULE = mm.getEntityByName("ASM.metamodel.ForallRule");

+		if (FORALLRULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.ForallRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		FORALLRULE_FORMULA = mm.getFunctionByName("ASM.metamodel.ForallRule.formula");

+		if (FORALLRULE_FORMULA==null) {

+			log.error("ASM metamodel element ASM.metamodel.ForallRule.formula not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		FUNCTIONINVOCATION = mm.getEntityByName("ASM.metamodel.FunctionInvocation");

+		if (FUNCTIONINVOCATION==null) {

+			log.error("ASM metamodel element ASM.metamodel.FunctionInvocation not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		FUNCTIONINVOCATION_FIRSTPARAM = mm.getFunctionByName("ASM.metamodel.FunctionInvocation.firstParam");

+		if (FUNCTIONINVOCATION_FIRSTPARAM==null) {

+			log.error("ASM metamodel element ASM.metamodel.FunctionInvocation.firstParam not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		FUNCTIONINVOCATION_FUNCTION = mm.getFunctionByName("ASM.metamodel.FunctionInvocation.function");

+		if (FUNCTIONINVOCATION_FUNCTION==null) {

+			log.error("ASM metamodel element ASM.metamodel.FunctionInvocation.function not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		GREATERTHAN = mm.getEntityByName("ASM.metamodel.GreaterThan");

+		if (GREATERTHAN==null) {

+			log.error("ASM metamodel element ASM.metamodel.GreaterThan not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ACTUALPARAMETER = mm.getEntityByName("ASM.metamodel.ActualParameter");

+		if (ACTUALPARAMETER==null) {

+			log.error("ASM metamodel element ASM.metamodel.ActualParameter not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ACTUALPARAMETER_NEXT = mm.getFunctionByName("ASM.metamodel.ActualParameter.next");

+		if (ACTUALPARAMETER_NEXT==null) {

+			log.error("ASM metamodel element ASM.metamodel.ActualParameter.next not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ACTUALPARAMETER_VALUE = mm.getFunctionByName("ASM.metamodel.ActualParameter.value");

+		if (ACTUALPARAMETER_VALUE==null) {

+			log.error("ASM metamodel element ASM.metamodel.ActualParameter.value not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ACTUALPARAMETER_VARIABLE = mm.getFunctionByName("ASM.metamodel.ActualParameter.variable");

+		if (ACTUALPARAMETER_VARIABLE==null) {

+			log.error("ASM metamodel element ASM.metamodel.ActualParameter.variable not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ENTITY = mm.getEntityByName("ASM.metamodel.Entity");

+		if (ENTITY==null) {

+			log.error("ASM metamodel element ASM.metamodel.Entity not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ELEMENTREFERENCE = mm.getEntityByName("ASM.metamodel.ElementReference");

+		if (ELEMENTREFERENCE==null) {

+			log.error("ASM metamodel element ASM.metamodel.ElementReference not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		CALLRULE = mm.getEntityByName("ASM.metamodel.CallRule");

+		if (CALLRULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.CallRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		CALLRULE_RULE = mm.getFunctionByName("ASM.metamodel.CallRule.rule");

+		if (CALLRULE_RULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.CallRule.rule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		CALLRULE_FIRSTPARAMETER = mm.getFunctionByName("ASM.metamodel.CallRule.firstParameter");

+		if (CALLRULE_FIRSTPARAMETER==null) {

+			log.error("ASM metamodel element ASM.metamodel.CallRule.firstParameter not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		BINARYOPERATION = mm.getEntityByName("ASM.metamodel.BinaryOperation");

+		if (BINARYOPERATION==null) {

+			log.error("ASM metamodel element ASM.metamodel.BinaryOperation not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		BINARYOPERATION_LEFT = mm.getFunctionByName("ASM.metamodel.BinaryOperation.left");

+		if (BINARYOPERATION_LEFT==null) {

+			log.error("ASM metamodel element ASM.metamodel.BinaryOperation.left not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		BINARYOPERATION_RIGHT = mm.getFunctionByName("ASM.metamodel.BinaryOperation.right");

+		if (BINARYOPERATION_RIGHT==null) {

+			log.error("ASM metamodel element ASM.metamodel.BinaryOperation.right not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		CONDITIONALRULE = mm.getEntityByName("ASM.metamodel.ConditionalRule");

+		if (CONDITIONALRULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.ConditionalRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		CONDITIONALRULE_CONDITION = mm.getFunctionByName("ASM.metamodel.ConditionalRule.condition");

+		if (CONDITIONALRULE_CONDITION==null) {

+			log.error("ASM metamodel element ASM.metamodel.ConditionalRule.condition not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		CONDITIONALRULE_GTRULE = mm.getFunctionByName("ASM.metamodel.ConditionalRule.gtrule");

+		if (CONDITIONALRULE_GTRULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.ConditionalRule.gtrule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		CONDITIONALRULE_RULE1 = mm.getFunctionByName("ASM.metamodel.ConditionalRule.rule1");

+		if (CONDITIONALRULE_RULE1==null) {

+			log.error("ASM metamodel element ASM.metamodel.ConditionalRule.rule1 not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		CONDITIONALRULE_RULE2 = mm.getFunctionByName("ASM.metamodel.ConditionalRule.rule2");

+		if (CONDITIONALRULE_RULE2==null) {

+			log.error("ASM metamodel element ASM.metamodel.ConditionalRule.rule2 not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ELEMENTCREATERULE = mm.getEntityByName("ASM.metamodel.ElementCreateRule");

+		if (ELEMENTCREATERULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.ElementCreateRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ELEMENTCREATERULE_TYPE = mm.getFunctionByName("ASM.metamodel.ElementCreateRule.type");

+		if (ELEMENTCREATERULE_TYPE==null) {

+			log.error("ASM metamodel element ASM.metamodel.ElementCreateRule.type not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ELEMENTCREATERULE_ELEMENT = mm.getFunctionByName("ASM.metamodel.ElementCreateRule.element");

+		if (ELEMENTCREATERULE_ELEMENT==null) {

+			log.error("ASM metamodel element ASM.metamodel.ElementCreateRule.element not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ELEMENTCREATERULE_CONTAINERREF = mm.getFunctionByName("ASM.metamodel.ElementCreateRule.containerRef");

+		if (ELEMENTCREATERULE_CONTAINERREF==null) {

+			log.error("ASM metamodel element ASM.metamodel.ElementCreateRule.containerRef not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		CHOOSERULE = mm.getEntityByName("ASM.metamodel.ChooseRule");

+		if (CHOOSERULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.ChooseRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		CHOOSERULE_FORMULA = mm.getFunctionByName("ASM.metamodel.ChooseRule.formula");

+		if (CHOOSERULE_FORMULA==null) {

+			log.error("ASM metamodel element ASM.metamodel.ChooseRule.formula not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		CONSTANT = mm.getEntityByName("ASM.metamodel.Constant");

+		if (CONSTANT==null) {

+			log.error("ASM metamodel element ASM.metamodel.Constant not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		BLOCKRULE = mm.getEntityByName("ASM.metamodel.BlockRule");

+		if (BLOCKRULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.BlockRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		BLOCKRULE_RULE = mm.getFunctionByName("ASM.metamodel.BlockRule.rule");

+		if (BLOCKRULE_RULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.BlockRule.rule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		

+		BLOCKRULE_GTRULE = mm.getFunctionByName("ASM.metamodel.BlockRule.gtrule");

+		if (BLOCKRULE_GTRULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.BlockRule.gtrule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ASMFUNCTION = mm.getEntityByName("ASM.metamodel.ASMFunction");

+		if (ASMFUNCTION==null) {

+			log.error("ASM metamodel element ASM.metamodel.ASMFunction not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ASMRULEINVOCATION = mm.getEntityByName("ASM.metamodel.ASMRuleInvocation");

+		if (ASMRULEINVOCATION==null) {

+			log.error("ASM metamodel element ASM.metamodel.ASMRuleInvocation not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ASMRULEINVOCATION_RULE = mm.getFunctionByName("ASM.metamodel.ASMRuleInvocation.rule");

+		if (ASMRULEINVOCATION_RULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.ASMRuleInvocation.rule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ASMRULEINVOCATION_FIRSTPARAM = mm.getFunctionByName("ASM.metamodel.ASMRuleInvocation.firstParam");

+		if (ASMRULEINVOCATION_FIRSTPARAM==null) {

+			log.error("ASM metamodel element ASM.metamodel.ASMRuleInvocation.firstParam not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ELEMENTDELETERULE = mm.getEntityByName("ASM.metamodel.ElementDeleteRule");

+		if (ELEMENTDELETERULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.ElementDeleteRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ELEMENTDELETERULE_ELEMENT = mm.getFunctionByName("ASM.metamodel.ElementDeleteRule.element");

+		if (ELEMENTDELETERULE_ELEMENT==null) {

+			log.error("ASM metamodel element ASM.metamodel.ElementDeleteRule.element not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ASMRULE = mm.getEntityByName("ASM.metamodel.ASMRule");

+		if (ASMRULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.ASMRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ASMRULE_FIRSTPARAM = mm.getFunctionByName("ASM.metamodel.ASMRule.firstParam");

+		if (ASMRULE_FIRSTPARAM==null) {

+			log.error("ASM metamodel element ASM.metamodel.ASMRule.firstParam not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		AND = mm.getEntityByName("ASM.metamodel.And");

+		if (AND==null) {

+			log.error("ASM metamodel element ASM.metamodel.And not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ALL = mm.getEntityByName("ASM.metamodel.All");

+		if (ALL==null) {

+			log.error("ASM metamodel element ASM.metamodel.All not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		RULE = mm.getRelationByName("ASM.metamodel.rule");

+		if (RULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.rule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+	LOCATION_REL = mm.getRelationByName("ASM.metamodel.location");

+		if (LOCATION_REL==null) {

+			log.error("ASM metamodel element ASM.metamodel.location not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		NEGATIVE = mm.getRelationByName("ASM.metamodel.negative");

+		if (NEGATIVE==null) {

+			log.error("ASM metamodel element ASM.metamodel.negative not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		NEXTRULE = mm.getRelationByName("ASM.metamodel.nextRule");

+		if (NEXTRULE==null) {

+			log.error("ASM metamodel element ASM.metamodel.nextRule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+	

+		/**********************************

+		 * MANUAL EXTENSIONS

+		 */

+	/*	LEVEL_FATAL = mm.getEntityByName("ASM.metamodel.Level.fatal");

+		

+		if (LEVEL_FATAL==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.level.fatal not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		LEVEL_ERROR = mm.getEntityByName("ASM.metamodel.Level.error");

+		

+		if (LEVEL_ERROR==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.level.error not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		LEVEL_WARNING = mm.getEntityByName("ASM.metamodel.Level.warning");

+		

+		if (LEVEL_WARNING==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.level.warning not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		LEVEL_INFO = mm.getEntityByName("ASM.metamodel.Level.info");

+		

+		if (LEVEL_INFO==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.level.info not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		LEVEL_DEBUG = mm.getEntityByName("ASM.metamodel.Level.debug");

+		

+		if (LEVEL_DEBUG==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.level.debug not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		

+		STRING = mm.getEntityByName("datatypes.String");

+		

+		if (STRING==null)

+		{

+			log.error("ASM metamodel element String not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		

+		RULEDEFINITION = mm.getEntityByName("ASM.metamodel.RuleDefinition");

+		if (RULEDEFINITION==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.RuleDefinition not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		

+		RULEDEFINITION_RULE = mm.getFunctionByName("ASM.metamodel.RuleDefinition.rule");

+		if (RULEDEFINITION_RULE==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.RuleDefinition.rule not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		GTPATTERNCALL = mm.getEntityByName("ASM.metamodel.GTPatternCall");

+		if (GTPATTERNCALL==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.GTPatternCall not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		GTPATTERNCALL_PATTERN = mm.getFunctionByName("ASM.metamodel.GTPatternCall.pattern");

+		if (GTPATTERNCALL_PATTERN==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.GTPatternCall.pattern not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		GTPATTERNCALL_FIRSTPARAMETER = mm.getFunctionByName("ASM.metamodel.GTPatternCall.firstParameter");

+		if (GTPATTERNCALL_FIRSTPARAMETER==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.GTPatternCall.firstParameter not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		GTPATTERNCALL_SCOPE = mm.getFunctionByName("ASM.metamodel.GTPatternCall.scope");

+		if (GTPATTERNCALL_SCOPE==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.GTPatternCall.scope not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}		

+		GTPATTERNCALL_MODE = mm.getFunctionByName("ASM.metamodel.GTPatternCall.mode");

+		if (GTPATTERNCALL_MODE==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.GTPatternCall.mode not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		GTRULEINVOCATION_SCOPE = mm.getFunctionByName("ASM.metamodel.GTRuleInvocation.scope");

+		if (GTRULEINVOCATION_SCOPE==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.GTRuleInvocation.scope not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}		

+		GTRULEINVOCATION_MODE = mm.getFunctionByName("ASM.metamodel.GTRuleInvocation.mode");

+		if (GTRULEINVOCATION_MODE==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.GTRuleInvocation.mode not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		

+		SCOPEDPARAMETER = mm.getEntityByName("ASM.metamodel.ScopedParameter");

+		if (SCOPEDPARAMETER==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.ScopedParameter not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		SCOPEDPARAMETER_BASE = mm.getFunctionByName("ASM.metamodel.ScopedParameter.base");

+		if (SCOPEDPARAMETER_BASE==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.ScopedParameter.base not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}		

+		SCOPEDPARAMETER_NEXT = mm.getFunctionByName("ASM.metamodel.ScopedParameter.next");

+		if (SCOPEDPARAMETER_NEXT==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.ScopedParameter.next not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		SCOPEDPARAMETER_MODE = mm.getFunctionByName("ASM.metamodel.ScopedParameter.mode");

+		if (SCOPEDPARAMETER_MODE==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.ScopedParameter.mode not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		SCOPEDPARAMETER_NAME = mm.getFunctionByName("ASM.metamodel.ScopedParameter.name");

+		if (SCOPEDPARAMETER_NAME==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.ScopedParameter.name not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		BLOCKRULE_FIRSTVARIABLE = mm.getFunctionByName("ASM.metamodel.BlockRule.firstVariable");

+		if (BLOCKRULE_FIRSTVARIABLE==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.BlockRule.firstVariable not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}

+		ANNOTATION = mm.getFunctionByName("ASM.metamodel.Annotation");

+		if (ANNOTATION==null)

+		{

+			log.error("ASM metamodel element ASM.metamodel.Annotation not found.");

+			throw new VPMRuntimeException("Metamodel incomplete.");

+		}*/

+		

+	}

+/*

+ * 	IEntity SCOPEDPARAMETER = null;

+	IFunction SCOPEDPARAMETER_NAME = null;

+	IFunction SCOPEDPARAMETER_MODE = null;

+	IFunction SCOPEDPARAMETER_NEXT = null;

+	IFunction SCOPEDPARAMETER_BASE = null;

+ */	

+	IEntity machine;

+	ASTBuilder ab;

+	public ASTBuilder getASTBuilder()

+	{

+		return ab;

+	}

+	

+/*	public IEntity newConstant( String name)

+	{

+	

+		try

+		{

+			IEntity e = mm.newEntity(currentContainer());

+			mm.newInstanceOf(CONSTANT,e);

+			mm.setValue(e,name);

+		

+		

+			return e;

+		}

+		catch (Exception e)

+		{

+			log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+			e.printStackTrace();

+			return null;

+		}

+	}

+	public IEntity newVariableTerm( String name)

+	{

+	

+		try

+		{

+			IEntity e = mm.newEntity(currentContainer());

+			mm.newInstanceOf(VARIABLE,e);

+			mm.setValue(e,name);

+		

+		

+			return e;

+		}

+		catch (Exception e)

+		{

+			log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+			e.printStackTrace();

+			return null;

+		}

+	}	

+	public IEntity newElementReferenceTerm( String name)

+	{

+	

+		try

+		{

+			IEntity e = mm.newEntity(currentContainer());

+			mm.newInstanceOf(ELEMENTREFERENCE,e);

+			mm.setValue(e,name);

+		

+		

+			return e;

+		}

+		catch (Exception e)

+		{

+			log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+			e.printStackTrace();

+			return null;

+		}

+	}	

+	public IEntity newRelationalOp(int li,String op, TermDef l, TermDef r)

+	{

+	

+		try

+		{

+			IEntity e = mm.newEntity(currentContainer());

+			addContainer(e);

+			generateAnnotation(li);

+			

+			if (op.equals("==")) mm.newInstanceOf(EQUALS,e);

+			if (op.equals("!=")) mm.newInstanceOf(NOTEQUALS,e);

+			if (op.equals("<")) mm.newInstanceOf(LESSTHAN,e);

+			if (op.equals(">")) mm.newInstanceOf(GREATERTHAN,e);

+			if (op.equals("")) mm.newInstanceOf(VARIABLE,e);

+			mm.setValue(e,op);

+			

+			IFunction fl = mm.newFunction(e,l.getElement(),currentContainer());

+			mm.newInstanceOf(RELATIONALOPERATION_LEFTSIDE,fl);

+			IFunction fr = mm.newFunction(e,r.getElement(),currentContainer());

+			mm.newInstanceOf(RELATIONALOPERATION_RIGHTSIDE,fr);

+				

+		

+			removeContainer();

+			return e;

+		}

+		catch (Exception e)

+		{

+			log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+			e.printStackTrace();

+			return null;

+		}

+	}	

+	public IEntity newBinaryOp(int li,String op, FormulaDef l, FormulaDef r)

+	{

+	

+		try

+		{

+			IEntity e = mm.newEntity(currentContainer());

+			

+			addContainer(e);

+			generateAnnotation(li);

+			if (op.equals("&&")) mm.newInstanceOf(AND,e);

+			if (op.equals("||")) mm.newInstanceOf(OR,e);

+			if (op.equals("->")) mm.newInstanceOf(IMPLICATION,e);

+

+			mm.setValue(e,op);

+			

+			IFunction fl = mm.newFunction(e,l.getElement(),currentContainer());

+			mm.newInstanceOf(BINARYOPERATION_LEFT,fl);

+			IFunction fr = mm.newFunction(e,r.getElement(),currentContainer());

+			mm.newInstanceOf(BINARYOPERATION_RIGHT,fr);

+				

+		

+			removeContainer();

+			return e;

+		}

+		catch (Exception e)

+		{

+			log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+			e.printStackTrace();

+			return null;

+		}

+	}	

+	public boolean checkMachine(String n, Vector funs, Vector rules,Vector patts, Vector gtrules)

+	{

+		try

+		{

+

+			Iterator i = rules.iterator();

+			while (i.hasNext())

+			{

+				ASMRuleDef a = (ASMRuleDef)i.next();

+				if (!a.checkDefintion(ab,modsp)) return false;

+			}

+			i = patts.iterator();

+			while (i.hasNext())

+			{

+				GTPatternDef a = (GTPatternDef)i.next();

+				if (!a.checkDefintion(ab,modsp)) return false;

+			}

+			i = gtrules.iterator();

+			while (i.hasNext())

+			{

+				GTRuleDef a = (GTRuleDef)i.next();

+				if (!a.checkDefintion(ab,modsp)) return false;

+			}

+	

+			return true;

+		}

+		catch (Exception e)

+		{

+			log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+			e.printStackTrace();

+			return false;

+		}

+	}		

+	IEntity implicit = null;

+	public IEntity newGTPatternCall(int li,GTPatternDef pn, Vector pars,TermDef scope, int mode)

+	{

+		try

+		{

+		IEntity e = mm.newEntity(currentContainer());

+		addContainer(e);

+		generateAnnotation(li);

+		mm.newInstanceOf(GTPATTERNCALL,e);

+		IFunction fup = mm.newFunction(e,pn.getElement(),e);

+		mm.newInstanceOf(GTPATTERNCALL_PATTERN,fup);

+		if (scope!=null)

+		{

+			IFunction scopf = mm.newFunction(e,scope.getElement(),e);

+			mm.newInstanceOf(GTPATTERNCALL_SCOPE,scopf);

+			String s = "below";

+			if (mode==1) s = "in";

+			IEntity mod = mm.newEntity(e);

+			mm.newInstanceOf(STRING,mod);

+			mm.setValue(mod,s);

+			IFunction modf = mm.newFunction(e,mod,e);

+			mm.newInstanceOf(GTPATTERNCALL_MODE,modf);			

+			

+		}

+		if (pars!=null)

+		{

+			IEntity old = null;

+			for (int i=0;i<pars.size();i++)

+			{

+				TermDef t = (TermDef)pars.get(i);

+				if (i==0)

+				{

+					IEntity ee = mm.newEntity(e);

+					addContainer(ee);

+					mm.newInstanceOf(ACTUALPARAMETER,ee);

+					IFunction pv = mm.newFunction(ee,t.getElement(),currentContainer());

+					mm.newInstanceOf(ACTUALPARAMETER_VALUE,pv);

+					IFunction fir = mm.newFunction(e,ee,e);

+					mm.newInstanceOf(GTPATTERNCALL_FIRSTPARAMETER,fir);

+					old = ee;

+					removeContainer();

+				}

+				else

+				{

+					IEntity ee = mm.newEntity(e);

+					addContainer(ee);

+					mm.newInstanceOf(ACTUALPARAMETER,ee);

+					IFunction pv = mm.newFunction(ee,t.getElement(),currentContainer());

+					mm.newInstanceOf(ACTUALPARAMETER_VALUE,pv);

+					IFunction fir = mm.newFunction(old,ee,old);

+					mm.newInstanceOf(ACTUALPARAMETER_NEXT,fir);

+					old = ee;	

+					removeContainer();

+				}

+			}

+		}

+		removeContainer();

+		return e;

+		}

+		catch (Exception e)

+		{

+			log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+			e.printStackTrace();

+			return null;

+		}		

+	}

+	public IEntity newGTRuleCall(int li,GTRuleDef pn, Vector pars,TermDef scope, int mode)

+	{

+		try

+		{

+		IEntity e = mm.newEntity(currentContainer());

+		addContainer(e);

+		generateAnnotation(li);

+		mm.newInstanceOf(GTRULEINVOCATION,e);

+		IEntity gtrule_inv;

+		if ((machine.getContentByName(pn.getName())!=null) && (machine.getContentByName(pn.getName()) instanceof IEntity)) gtrule_inv=(IEntity)machine.getContentByName(pn.getName()); else gtrule_inv = pn.getElement();

+		IFunction fup = mm.newFunction(e,gtrule_inv,e);

+		mm.newInstanceOf(GTRULEINVOCATION_RULE,fup);

+		if (scope!=null)

+		{

+			IFunction scopf = mm.newFunction(e,scope.getElement(),e);

+			mm.newInstanceOf(GTRULEINVOCATION_SCOPE,scopf);

+			String s = "below";

+			if (mode==1) s = "in";

+			IEntity mod = mm.newEntity(e);

+			mm.newInstanceOf(STRING,mod);

+			mm.setValue(mod,s);

+			IFunction modf = mm.newFunction(e,mod,e);

+			mm.newInstanceOf(GTRULEINVOCATION_MODE,modf);			

+			

+		}		

+		if (pars!=null)

+		{

+			IEntity old = null;

+			for (int i=0;i<pars.size();i++)

+			{

+				TermDef t = (TermDef)pars.get(i);

+				if (i==0)

+				{

+					IEntity ee = mm.newEntity(e);

+					addContainer(ee);

+					mm.newInstanceOf(ACTUALPARAMETER,ee);

+					IFunction pv = mm.newFunction(ee,t.getElement(),e);

+					mm.newInstanceOf(ACTUALPARAMETER_VALUE,pv);

+					IFunction fir = mm.newFunction(e,ee,ee);

+					mm.newInstanceOf(GTRULEINVOCATION_FIRSTPARAM,fir);

+					old = ee;

+					removeContainer();

+				}

+				else

+				{

+					IEntity ee = mm.newEntity(e);

+					addContainer(ee);

+					mm.newInstanceOf(ACTUALPARAMETER,ee);

+					IFunction pv = mm.newFunction(ee,t.getElement(),e);

+					mm.newInstanceOf(ACTUALPARAMETER_VALUE,pv);

+					IFunction fir = mm.newFunction(old,ee,e);

+					mm.newInstanceOf(ACTUALPARAMETER_NEXT,fir);

+					old = ee;	

+					removeContainer();

+				}

+			}

+		}

+		removeContainer();

+		return e;

+		}

+		catch (Exception e)

+		{

+			log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+			e.printStackTrace();

+			return null;

+		}		

+	}

+	

+	Stack actpatt = new Stack();

+	

+	public IEntity currentPattern()

+	{

+		if (actpatt.isEmpty()) return null;

+		return (IEntity)actpatt.peek();

+	}

+	

+	public void addPattern(IEntity e)

+	{

+		actpatt.push(e);

+	}

+	

+	public void removePattern()

+	{

+		if (!actpatt.isEmpty()) actpatt.pop();

+	}

+	public IEntity newGTPattern(int li,String n, Vector par, GTPatternCallDef cal, FormulaDef check, Vector negc, Vector negp, Vector el)

+	{

+		try

+		{

+			

+		IEntity e;

+		if (currentPattern()!=null) 

+		{

+			 e = mm.newEntity(n,currentPattern());

+		}

+		else 

+			{

+			if (act_gtrule!=null) e = mm.newEntity(n,act_gtrule);

+				else e = mm.newEntity(n,machine);

+			}

+		addContainer(e);

+		addPattern(e);

+		generateAnnotation(li);

+		mm.newInstanceOf(GTPATTERN,e);

+		

+		if (cal!=null)

+		{

+		IFunction caf = mm.newFunction(e,cal.getElement(),e);

+		mm.newInstanceOf(GTPATTERN_PATTERNCALL,caf);

+		}

+		if (check!=null)

+		{

+		IFunction cef = mm.newFunction(e,check.getElement(),e);

+		mm.newInstanceOf(GTPATTERN_CHECK,cef);

+		}

+		if (par!=null)

+		{

+			generateGTParlist(par,e);

+		}

+		if (negc!=null)

+		{

+			Iterator i = negc.iterator();

+			while (i.hasNext())

+			{

+				GTPatternCallDef cd = (GTPatternCallDef)i.next();

+				IRelation nege = mm.newRelation(e,cd.getElement(),e);

+				mm.newInstanceOf(NEGATIVE,nege);

+			}

+		}

+		if (negp!=null)

+		{

+			Iterator i = negp.iterator();

+			while (i.hasNext())

+			{

+				GTPatternDef cd = (GTPatternDef)i.next();

+				IEntity npp = mm.newEntity(e);

+				mm.newInstanceOf(GTPATTERNCALL,npp);

+				IFunction fnpp = mm.newFunction(npp,cd.getElement(),npp);

+				mm.newInstanceOf(GTPATTERNCALL_PATTERN,fnpp);

+				IRelation nege = mm.newRelation(e,npp,e);

+				mm.newInstanceOf(NEGATIVE,nege);

+			}

+		}

+		actcont = mm.newEntity("pattern",currentContainer());

+		actset=el;

+		Iterator i = el.iterator();

+		while (i.hasNext())

+		{

+			Object o = i.next();

+			if (o instanceof EntityDefinition)

+			{

+				EntityDefinition ed = (EntityDefinition)o;

+				newEntityInPattern(ed);

+				

+				

+				continue;

+			}

+			if (o instanceof RelationDefinition)

+			{

+				RelationDefinition r = (RelationDefinition)o;

+				newRelationInPattern(r);

+				continue;

+			}

+		}

+		i = el.iterator();

+		while (i.hasNext())

+		{

+			Object o = i.next();

+			if (o instanceof TypeDefinition)

+			{

+				TypeDefinition d = (TypeDefinition)o;

+//				if (!elementExists(d.getMaster()) && (!ab.elementExists("",d.getMaster())))

+				IModelElement mast = mm.getElementByName(d.getMaster());

+				if (mast==null) mast = mm.getElementByName(actcont.getFullyQualifiedName()+"."+d.getMaster());

+				IModelElement slav = mm.getElementByName(d.getSlave());

+				if (slav==null) slav = mm.getElementByName(actcont.getFullyQualifiedName()+"."+d.getSlave());

+				if ((mast==null) || (slav==null))

+						{

+								log.error("model integrity error while creating relationships.");

+								return null;

+						}

+				try

+				{

+				mm.newInstanceOf(mast,slav);

+				}

+				catch (Exception exe)

+				{

+					log.error("Problems with instanceof! master: "+mast.getFullyQualifiedName()+"   slave: "+slav.getFullyQualifiedName());

+				}

+				

+				continue;

+			}

+			if (o instanceof SupertypeDefinition)

+			{

+				SupertypeDefinition d = (SupertypeDefinition)o;

+				

+				IModelElement mast = mm.getElementByName(d.getMaster());

+				if (mast==null) mast = mm.getElementByName(actcont.getFullyQualifiedName()+"."+d.getMaster());

+				IModelElement slav = mm.getElementByName(d.getSlave());

+				if (slav==null) slav = mm.getElementByName(actcont.getFullyQualifiedName()+"."+d.getSlave());

+				if ((mast==null) || (slav==null))

+						{

+								log.error("model integrity error while creating relationships.");

+								return null;

+						}

+				mm.newSupertypeOf(mast,slav);

+				

+				

+				continue;

+			}

+			if (o instanceof ContainmentDefinition)

+			{

+				ContainmentDefinition d = (ContainmentDefinition)o;

+				IModelElement mast = mm.getElementByName(d.getMaster());

+				if (mast==null) mast = mm.getElementByName(actcont.getFullyQualifiedName()+"."+d.getMaster());

+				IModelElement slav = mm.getElementByName(d.getSlave());

+				if (slav==null) slav = mm.getElementByName(actcont.getFullyQualifiedName()+"."+d.getSlave());

+				if ((mast==null) || (slav==null) || (!(mast instanceof IEntity)))

+						{

+								log.error("model integrity error while creating relationships.");

+								return null;

+						}

+				mm.newContainment((IEntity)mast,slav);

+				

+				continue;

+			}

+			

+			

+		}

+		removeContainer();

+		removePattern();

+		return e;

+		}

+		catch (Exception e)

+		{

+			log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+			e.printStackTrace();

+			return null;

+		}

+	}*/

+	IEntity actcont;

+	Vector actset;

+	//public IEntity lookupEntity(Vector el, )

+

+	public EntityDefinition lookupEntityByName(String n)

+	{

+		Iterator i = actset.iterator();

+		while (i.hasNext())

+		{

+			Object o = i.next();

+			if (o instanceof EntityDefinition)

+			{

+				EntityDefinition e = (EntityDefinition)o;

+				if (e.getFQN().equals(n)) return e;

+				if (e.getName().equals(n)) return e;

+			}

+		}

+		return null;

+	}

+	

+	public RelationDefinition lookupRelationByName(String n)

+	{

+		Iterator i = actset.iterator();

+		while (i.hasNext())

+		{

+			Object o = i.next();

+			if (o instanceof RelationDefinition)

+			{

+				RelationDefinition e = (RelationDefinition)o;

+				if (e.getFQN().equals(n)) return e;

+				if (e.getName().equals(n)) return e;

+			}

+		}

+		return null;

+	}

+	

+/*	public IEntity newEntityInPattern(EntityDefinition d)

+	{

+

+		try{

+			

+		IEntity e = mm.getEntityByName(actcont.getFullyQualifiedName()+"."+d.getFQN());

+		if (e==null)

+		{

+			

+			StringTokenizer st = new StringTokenizer(d.getFQN(),".");

+			IEntity base = actcont;

+			String z = "";

+			while (st.hasMoreTokens())

+			{

+				

+				String s = st.nextToken();

+				if (!z.equals("")) z=z+"."+s; else z=s;

+				IModelElement tmp = base.getContentByName(s);

+				if ((tmp!=null) && (tmp instanceof IEntity))

+				{

+					base = (IEntity)tmp;

+				}

+				else

+				{

+				base = mm.newEntity(s,base);

+				IEntity typ = mm.getEntityByName(lookupEntityByName(z).getType());

+				if (typ==null) typ=newEntityInPattern(lookupEntityByName(z));

+				mm.newInstanceOf(typ,base);

+				}

+				

+				

+				

+			}

+			e = base;

+			log.debug("Created entity name = "+z+" in container "+base.getName());

+		}

+		return e;

+		} catch (VPMCoreException e)

+		{

+			e.printStackTrace();

+			log.error("Error creating pattern elements.");

+			

+			return null;

+		}

+	}

+	public EntityDefinition lookupPatternEntityByName(String n)

+	{

+		Iterator i = actset.iterator();

+		while (i.hasNext())

+		{

+			Object o = i.next();

+			if (o instanceof EntityDefinition)

+			{

+				EntityDefinition e = (EntityDefinition)o;

+				log.debug("Looking up "+n+", currently found : "+e.getFQN());

+				if (e.getFQN().equals(n)) return e;

+				if (e.getName().equals(n)) return e;

+			}

+		}

+		return null;

+	}

+	public IRelation newRelationInPattern(RelationDefinition d)

+	{

+		try{

+			IRelation e = mm.getRelationByName(actcont.getFullyQualifiedName()+"."+d.getFQN());

+			if (e==null) e = mm.getFunctionByName(actcont.getFullyQualifiedName()+"."+d.getFQN());

+			if (e==null)

+			{

+				

+				StringTokenizer st = new StringTokenizer(d.getFQN(),".");

+				IEntity base = actcont;

+				String z="";

+				String s = d.getName();

+				if (s.indexOf(".")>0) s = s.substring(s.lastIndexOf(".")+1);

+				//Lookup container

+				z = d.getNamespace();

+				if (!z.equals(""))

+				{

+					EntityDefinition edtmp = lookupPatternEntityByName(z);

+					base = newEntityInPattern(edtmp);

+				}

+					

+				//Check whether the relation already exists in the container

+				IRelation rel = base.getRelationByName(s);

+				if (rel==null) rel = base.getFunctionByName(s);

+				if (rel==null) //No, create it

+				{

+					//Looking up type element

+					IRelation typ = mm.getRelationByName(d.getType()); 

+					if (typ==null) typ=mm.getFunctionByName(d.getType());

+					//Type does not exists, let's create it

+					if (typ==null)

+					{

+						typ = newRelationInPattern(lookupRelationByName(z));

+					}

+					//Looking up source

+					IEntity src = mm.getEntityByName(d.getSource());

+					if (src==null) src = newEntityInPattern(lookupPatternEntityByName(d.getSource()));

+					//Looking up target

+					IEntity trg = mm.getEntityByName(d.getTarget());

+					if (trg==null) trg = newEntityInPattern(lookupPatternEntityByName(d.getTarget()));

+					//Creating the new element

+					if (typ instanceof IFunction)

+					{

+						rel = mm.newFunction(s,src,trg,base);									

+					}

+					else

+					{

+						

+						rel = mm.newRelation(s,src,trg,base);

+					}

+					mm.newInstanceOf(typ,rel);

+					e = rel;

+				}

+					

+					

+			

+				log.debug("Created relation name = "+z+" in container "+base.getName());

+			}

+			return e;

+			} catch (VPMCoreException e)

+			{

+				e.printStackTrace();

+				log.error("Error creating pattern elements.");

+				return null;

+			}

+

+	}

+	IEntity act_gtrule = null;

+	public IEntity newGTRule(GTRuleDef gtr)

+	{

+		try

+		{

+		IEntity e = mm.newEntity(gtr.getName(),machine);

+		mm.newInstanceOf(GTRULE,e);

+		

+		addContainer(e);

+		generateAnnotation(gtr.getLine());

+		if (gtr.getParameters()!=null) generateGTRuleParlist(gtr.getParameters(),e);

+		act_gtrule = e;

+		if (gtr.getPrecondcall()!=null)

+		{

+			

+				

+				IFunction nege = mm.newFunction(e,gtr.getPrecondcall().getElement(),e);

+				mm.newInstanceOf(GTRULE_PRECONDITION,nege);

+			

+		}

+		if (gtr.getPrecondpatt()!=null)

+		{

+	

+				IEntity npp = mm.newEntity(e);

+				mm.newInstanceOf(GTPATTERNCALL,npp);

+				IFunction fnpp = mm.newFunction(npp,gtr.getPrecondpatt().getElement(),npp);

+				mm.newInstanceOf(GTPATTERNCALL_PATTERN,fnpp);

+				IFunction nege = mm.newFunction(e,npp,e);

+				mm.newInstanceOf(GTRULE_PRECONDITION,nege);

+

+		}

+		if (gtr.getPostcondcall()!=null)

+		{

+			

+				IFunction nege = mm.newFunction(e,gtr.getPostcondcall().getElement(),e);

+				mm.newInstanceOf(GTRULE_POSTCONDITION,nege);

+			

+		}

+		if (gtr.getPostcondpatt()!=null)

+		{

+	

+				IEntity npp = mm.newEntity(e);

+				mm.newInstanceOf(GTPATTERNCALL,npp);

+				IFunction fnpp = mm.newFunction(npp,gtr.getPostcondpatt().getElement(),npp);

+				mm.newInstanceOf(GTPATTERNCALL_PATTERN,fnpp);

+				IFunction nege = mm.newFunction(e,npp,e);

+				mm.newInstanceOf(GTRULE_POSTCONDITION,nege);

+

+		}		

+		if (gtr.getActions()!=null)

+		{

+			IEntity seqr = newSequentialRule(gtr.getLine(),null,null,gtr.getActions());

+			IFunction acfu = mm.newFunction(e,seqr,e);

+			mm.newInstanceOf(GTRULE_ACTION,acfu);

+		}	

+		removeContainer();

+		act_gtrule = null;

+		return e;

+		}

+		catch (Exception e)

+		{

+			log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+			e.printStackTrace();

+			return null;

+		}

+	}

+	public IEntity newMachine(String n, Vector funs, Vector rules, Vector gtpatterns, Vector gtrules)

+	{

+		try

+		{

+			IEntity e;

+				e = null;

+				IEntity base = null;

+				StringTokenizer st = new StringTokenizer(n,".");

+				while (st.hasMoreTokens())

+				{

+					String s = st.nextToken();

+					IEntity nb = null;

+					if (base==null)

+					{

+						nb = mm.getEntityByName(s);

+					}

+					else

+					{

+						nb = mm.getEntityByName(base.getFullyQualifiedName()+"."+s);

+					}

+					if (nb==null)

+					{

+						if (base == null)

+							nb = mm.newEntity(s);

+						else

+							nb = mm.newEntity(s,base);

+					}

+					base = nb;

+				}

+				e = base;

+

+			

+			log.debug("Creating machine : "+e.getName());	

+			

+			mm.newInstanceOf(mm.getEntityByName("ASM"),e);

+			machine = e;

+			implicit = mm.newEntity("implicits",e);

+			addContainer(e);

+			Iterator i = funs.iterator();

+			while (i.hasNext())

+			{

+				ASMFunction af = (ASMFunction)i.next();

+				

+				log.debug("processing asmfunction "+af.getName()+" at line "+af.getLine());

+				af.updateModelspace(ab,modsp);

+			}

+

+			i = gtpatterns.iterator();

+			while (i.hasNext())

+			{

+				GTPatternDef a = (GTPatternDef)i.next();

+				if (!a.isEmbedded())

+				{

+				log.debug("processing pattern "+a.getName()+" at line "+a.getLine());

+				a.updateModelspace(ab,modsp);

+				}

+			}

+			i = gtrules.iterator();

+			while (i.hasNext())

+			{

+				GTRuleDef a = (GTRuleDef)i.next();

+				

+					log.debug("processing gtrule "+a.getName()+" at line "+a.getLine());

+					a.updateModelspace(ab,modsp);

+				

+			}

+			i = rules.iterator();

+			while (i.hasNext())

+			{

+				ASMRuleDef a = (ASMRuleDef)i.next();

+				if (a.getName()!=null)

+				{

+				log.debug("processing rule "+a.getName()+" at line "+a.getLine());

+				a.updateModelspace(ab,modsp);

+				}

+			}

+

+			removeContainer();

+			machine=null;

+			return e;

+		}

+		catch (Exception e)

+		{

+			log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+			e.printStackTrace();

+			return null;

+		}

+	}		

+	public IEntity newConditionalRule(int li,String n,Vector rp, FormulaDef f, GTRuleCallDef gt, ASMRuleDef rule1, ASMRuleDef rule2)

+	{

+		

+			try

+			{

+				IEntity e;

+				if (n==null) e = mm.newEntity(currentContainer());

+					else 

+					{

+						IEntity rd = mm.newEntity(n,machine);

+						mm.newInstanceOf(RULEDEFINITION,rd);

+						generateParlist(rp,rd);

+						e = mm.newEntity(rd);

+						IFunction rdr = mm.newFunction(rd,e,rd);

+						mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+					}

+				

+				mm.newInstanceOf(CONDITIONALRULE,e);

+				

+				

+				

+				addContainer(e);

+				generateAnnotation(li);

+				

+				if (f!=null)

+				{			

+					IFunction fl = mm.newFunction(e,f.getElement(),currentContainer());

+					mm.newInstanceOf(CONDITIONALRULE_CONDITION,fl);

+				}

+				else

+				{

+					IFunction fl = mm.newFunction(e,gt.getElement(),currentContainer());

+					mm.newInstanceOf(CONDITIONALRULE_GTRULE,fl);

+				}

+				IEntity ri;

+				if (rule1 instanceof CallRule)

+				{

+					ri = rule1.getElement();

+				}

+				else

+				{

+					ri = mm.newEntity(currentContainer());

+					mm.newInstanceOf(ASMRULEINVOCATION,ri);

+					IFunction rif = mm.newFunction(ri,rule1.getElement(),ri);

+					mm.newInstanceOf(ASMRULEINVOCATION_RULE,rif);

+				}

+				IFunction fr1 = mm.newFunction(e,ri,currentContainer());

+				mm.newInstanceOf(CONDITIONALRULE_RULE1,fr1);

+			

+				if (rule2!=null)

+				{

+					IEntity ri2;

+					if (rule2 instanceof CallRule)

+					{

+						ri2 = rule2.getElement();

+					}

+					else

+					{

+						ri2 = mm.newEntity(currentContainer());

+						mm.newInstanceOf(ASMRULEINVOCATION,ri2);

+						IFunction rif2 = mm.newFunction(ri2,rule2.getElement(),ri2);

+						mm.newInstanceOf(ASMRULEINVOCATION_RULE,rif2);

+					}

+					IFunction fr2 = mm.newFunction(e,ri2,currentContainer());

+					mm.newInstanceOf(CONDITIONALRULE_RULE2,fr2);

+				}

+				removeContainer();

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}			

+

+	public IEntity newPrintRule(int li,String n,Vector rp, TermDef t)

+	{

+		

+			try

+			{

+				IEntity e;

+				if (n==null) e = mm.newEntity(currentContainer());

+				else 

+				{

+					IEntity rd = mm.newEntity(n,machine);

+					mm.newInstanceOf(RULEDEFINITION,rd);

+					generateParlist(rp,rd);

+					e = mm.newEntity(rd);

+					IFunction rdr = mm.newFunction(rd,e,rd);

+					mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+				}

+				mm.newInstanceOf(PRINTRULE,e);

+				addContainer(e);

+				generateAnnotation(li);

+	

+				IFunction fl = mm.newFunction(e,t.getElement(),currentContainer());

+				mm.newInstanceOf(PRINTRULE_OUT,fl);

+

+				removeContainer();

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}	

+	public void generateGTRuleParlist(Vector rp, IEntity e) throws VPMCoreException

+	{

+		if (rp!=null)

+		{

+			

+			IEntity oldpar = null;

+			for (int j=0;j<rp.size();j++)

+			{

+				RuleParameter rupa = (RuleParameter)rp.get(j);

+				IEntity newpar = mm.newEntity(e);

+				addContainer(newpar);

+				mm.newInstanceOf(RULEPARAMETER,newpar);

+				IEntity pardir = mm.newEntity(newpar);

+				mm.newInstanceOf(STRING,pardir);

+				mm.setValue(pardir,rupa.getDirection());

+				IFunction pardirf = mm.newFunction(newpar,pardir,newpar);

+				mm.newInstanceOf(RULEPARAMETER_DIRECTION,pardirf);

+				

+				IFunction parvarf = mm.newFunction(newpar,newVariableTerm(rupa.getVariable()),newpar);

+				mm.newInstanceOf(RULEPARAMETER_VARIABLE,parvarf);

+				removeContainer();

+				if (j==0)

+				{

+					IFunction firpar = mm.newFunction(e,newpar,e);

+					mm.newInstanceOf(GTRULE_FIRSTPARAM,firpar);

+				}

+				else

+				{

+					IFunction firpar = mm.newFunction(oldpar,newpar,oldpar);

+					mm.newInstanceOf(RULEPARAMETER_NEXTPARAM,firpar);

+					

+				}

+				oldpar= newpar;

+			}

+		}

+	}	

+	public void generateParlist(Vector rp, IEntity e) throws VPMCoreException

+	{

+		if (rp!=null)

+		{

+			

+			IEntity oldpar = null;

+			for (int j=0;j<rp.size();j++)

+			{

+				RuleParameter rupa = (RuleParameter)rp.get(j);

+				IEntity newpar = mm.newEntity(e);

+				addContainer(newpar);

+				mm.newInstanceOf(RULEPARAMETER,newpar);

+				IEntity pardir = mm.newEntity(newpar);

+				mm.newInstanceOf(STRING,pardir);

+				mm.setValue(pardir,rupa.getDirection());

+				IFunction pardirf = mm.newFunction(newpar,pardir,newpar);

+				mm.newInstanceOf(RULEPARAMETER_DIRECTION,pardirf);

+				

+				IFunction parvarf = mm.newFunction(newpar,newVariableTerm(rupa.getVariable()),newpar);

+				mm.newInstanceOf(RULEPARAMETER_VARIABLE,parvarf);

+				removeContainer();

+				if (j==0)

+				{

+					IFunction firpar = mm.newFunction(e,newpar,e);

+					mm.newInstanceOf(ASMRULE_FIRSTPARAM,firpar);

+				}

+				else

+				{

+					IFunction firpar = mm.newFunction(oldpar,newpar,oldpar);

+					mm.newInstanceOf(RULEPARAMETER_NEXTPARAM,firpar);

+					

+				}

+				oldpar= newpar;

+			}

+		}

+	}

+	public void generateGTParlist(Vector rp, IEntity e) throws VPMCoreException

+	{

+		if (rp!=null)

+		{

+			

+			IEntity oldpar = null;

+			for (int j=0;j<rp.size();j++)

+			{

+				String rupa = (String)rp.get(j);

+				IEntity newpar = mm.newEntity(e);

+				addContainer(newpar);

+				mm.newInstanceOf(RULEPARAMETER,newpar);

+				

+				IFunction parvarf = mm.newFunction(newpar,newVariableTerm(rupa),newpar);

+				mm.newInstanceOf(RULEPARAMETER_VARIABLE,parvarf);

+				removeContainer();

+				if (j==0)

+				{

+					IFunction firpar = mm.newFunction(e,newpar,e);

+					mm.newInstanceOf(GTPATTERN_FIRSTPARAMETER,firpar);

+				}

+				else

+				{

+					IFunction firpar = mm.newFunction(oldpar,newpar,oldpar);

+					mm.newInstanceOf(RULEPARAMETER_NEXTPARAM,firpar);

+					

+				}

+				oldpar= newpar;

+			}

+		}

+	}

+

+	public void generateAnnotation(int i) throws VPMCoreException

+	{

+		IEntity e = mm.newEntity(currentContainer());

+		mm.newInstanceOf(STRING,e);

+		mm.setValue(e,"line:"+i);

+		IFunction an = mm.newFunction(currentContainer(),e,currentContainer());

+		mm.newInstanceOf(ANNOTATION,an); 

+		

+	}

+	public IEntity newLogRule(int li,String n,Vector rp, int l,TermDef t)

+	{

+		

+			try

+			{

+				IEntity e;

+				if (n==null) e = mm.newEntity(currentContainer());

+				else 

+				{

+					IEntity rd = mm.newEntity(n,machine);

+					mm.newInstanceOf(RULEDEFINITION,rd);

+					generateParlist(rp,rd);

+					e = mm.newEntity(rd);

+					IFunction rdr = mm.newFunction(rd,e,rd);

+					mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+				}

+				mm.newInstanceOf(LOGRULE,e);

+				addContainer(e);

+				generateAnnotation(li);

+				

+				

+				IEntity lev = mm.newEntity(currentContainer());

+				switch (l) 

+				{

+					case 1 :

+					{

+						mm.newInstanceOf(LEVEL_FATAL,lev);

+						break;

+					}

+					case 2 :

+					{

+						mm.newInstanceOf(LEVEL_ERROR,lev);

+						break;

+					}

+					case 3 :

+					{

+						mm.newInstanceOf(LEVEL_WARNING,lev);

+						break;

+					}

+					case 4 :

+					{

+						mm.newInstanceOf(LEVEL_INFO,lev);

+						break;

+					}

+					case 5 :

+					{

+						mm.newInstanceOf(LEVEL_DEBUG,lev);

+						break;

+					}					

+				}

+	

+				IFunction fl = mm.newFunction(e,t.getElement(),currentContainer());

+				mm.newInstanceOf(LOGRULE_OUT,fl);

+				IFunction fle = mm.newFunction(e,lev,currentContainer());

+				mm.newInstanceOf(LOGRULE_LEVEL,fle);

+

+				removeContainer();

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}	

+	public IEntity newSkipRule(int li, String n,Vector rp)

+	{

+		

+			try

+			{

+				IEntity e;

+				if (n==null) e = mm.newEntity(currentContainer());

+				else 

+				{

+					IEntity rd = mm.newEntity(n,machine);

+					mm.newInstanceOf(RULEDEFINITION,rd);

+					generateParlist(rp,rd);

+					e = mm.newEntity(rd);

+					IFunction rdr = mm.newFunction(rd,e,rd);

+					mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+				}

+				mm.newInstanceOf(SKIPRULE,e);

+				addContainer(e);

+				generateAnnotation(li);

+				removeContainer();

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}	

+	

+	public IEntity createScopedList(Vector v) throws VPMCoreException

+	{

+		if (v==null) return null;

+		IEntity first = null;

+		IEntity old = null;

+		for (int i=0;i<v.size();i++)

+		{

+			ScopedParameter sp = (ScopedParameter)v.get(i);

+			if (i==0)

+			{

+				IEntity tmp = mm.newEntity(currentContainer());

+				mm.newInstanceOf(SCOPEDPARAMETER,tmp);

+				addContainer(tmp);

+				if (sp.getTerm()!=null)

+				{

+					String m = "in";

+					if (sp.getMode()==2) m = "below";

+					IEntity mo = mm.newEntity(m,currentContainer());

+					mm.newInstanceOf(STRING,mo);

+					IFunction mf = mm.newFunction(tmp,mo,currentContainer());

+					mm.newInstanceOf(SCOPEDPARAMETER_MODE,mf);

+					IFunction tf = mm.newFunction(tmp,sp.getTerm().getElement(),currentContainer());

+					mm.newInstanceOf(SCOPEDPARAMETER_BASE,tf);

+				}

+				IEntity na = mm.newEntity(sp.getVariable(),currentContainer());

+				mm.newInstanceOf(STRING,na);

+				IFunction nf = mm.newFunction(tmp,na,currentContainer());

+				mm.newInstanceOf(SCOPEDPARAMETER_NAME,nf);

+				old = tmp;

+				first = tmp;

+					

+				

+				

+				removeContainer();

+			}

+			else

+			{

+				IEntity tmp = mm.newEntity(currentContainer());

+				mm.newInstanceOf(SCOPEDPARAMETER,tmp);

+				addContainer(tmp);

+				if (sp.getTerm()!=null)

+				{

+					String m = "in";

+					if (sp.getMode()==2) m = "below";

+					IEntity mo = mm.newEntity(m,currentContainer());

+					mm.newInstanceOf(STRING,mo);

+					IFunction mf = mm.newFunction(tmp,mo,currentContainer());

+					mm.newInstanceOf(SCOPEDPARAMETER_MODE,mf);

+					IFunction tf = mm.newFunction(tmp,sp.getTerm().getElement(),currentContainer());

+					mm.newInstanceOf(SCOPEDPARAMETER_BASE,tf);

+					

+				}

+				IEntity na = mm.newEntity(sp.getVariable(),currentContainer());

+				mm.newInstanceOf(STRING,na);

+				IFunction nf = mm.newFunction(tmp,na,currentContainer());

+				mm.newInstanceOf(SCOPEDPARAMETER_NAME,nf);

+				IFunction xf = mm.newFunction(old,tmp,old);

+				mm.newInstanceOf(SCOPEDPARAMETER_NEXT,xf);

+				old = tmp;

+				

+				removeContainer();

+				

+			}

+

+		}

+		

+		return first;

+	}

+	public IEntity newForallRule(int li,String n, Vector rp,Vector vars, int mod, TermDef base, FormulaDef fo, ASMRuleDef r, GTRuleCallDef gt)

+	{

+		

+			try

+			{

+				IEntity e;

+				if (n==null) e = mm.newEntity(currentContainer());

+				else 

+				{

+					IEntity rd = mm.newEntity(n,machine);

+					mm.newInstanceOf(RULEDEFINITION,rd);

+					generateParlist(rp,rd);

+					e = mm.newEntity(rd);

+					IFunction rdr = mm.newFunction(rd,e,rd);

+					mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+				}

+				mm.newInstanceOf(FORALLRULE,e);

+				

+				addContainer(e);

+				generateAnnotation(li);

+				if (vars!=null)

+				{

+					IEntity vl = createScopedList(vars);

+					IFunction vf = mm.newFunction(e,vl,currentContainer());

+					mm.newInstanceOf(BLOCKRULE_FIRSTVARIABLE,vf);

+				}

+				

+				/*

+				for (int i=0;i<vars.size();i++)

+				{

+					String va = (String)vars.get(i);

+					

+					IRelation fu = mm.newRelation(e,newVariableTerm(va),currentContainer());

+					mm.newInstanceOf(VARIABLE_FORALL,fu);

+				}*//*

+				if (fo!=null)

+				{

+				IFunction form = mm.newFunction(e,fo.getElement(),e);

+				mm.newInstanceOf(FORALLRULE_FORMULA,form);

+				}

+				if (r!=null)

+				{

+					IEntity ri;

+					if (r instanceof CallRule)

+					{

+						ri = r.getElement();

+					}

+					else

+					{

+						ri = mm.newEntity(currentContainer());

+						mm.newInstanceOf(ASMRULEINVOCATION,ri);

+						IFunction rif = mm.newFunction(ri,r.getElement(),ri);

+						mm.newInstanceOf(ASMRULEINVOCATION_RULE,rif);

+					}

+					IFunction fu = mm.newFunction(e,ri,currentContainer());

+					mm.newInstanceOf(BLOCKRULE_RULE,fu);		

+				}

+				else

+				{

+					//IEntity ri = mm.newEntity(currentContainer());

+					//mm.newInstanceOf(GTRULEINVOCATION,ri);

+					//IFunction rif = mm.newFunction(ri,gt.getElement(),ri);

+					//mm.newInstanceOf(GTRULEINVOCATION_RULE,rif);

+					IFunction fu = mm.newFunction(e,gt.getElement(),currentContainer());

+					mm.newInstanceOf(BLOCKRULE_GTRULE,fu);					

+				}

+				

+				

+				

+				

+				removeContainer();

+				

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}

+	public IEntity newManipNewEntityRule(NewEntityRule r)

+	{

+		

+			try

+			{

+				IEntity e;

+				if (r.getName()==null) e = mm.newEntity(currentContainer());

+				else 

+				{

+					IEntity rd = mm.newEntity(r.getName(),machine);

+					mm.newInstanceOf(RULEDEFINITION,rd);

+					generateParlist(r.getVarlist(),rd);

+					e = mm.newEntity(rd);

+					IFunction rdr = mm.newFunction(rd,e,rd);

+					mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+				}

+				mm.newInstanceOf(ELEMENTCREATERULE,e);

+				

+				addContainer(e);

+				generateAnnotation(r.getLine());

+				//IEntity typ = mm.newEntity(e);

+				//mm.setValue(typ,r.getTyperef());

+				//mm.newInstanceOf(ELEMENTREFERENCE,typ);

+				IFunction typr = mm.newFunction(e,r.getTyperef().getElement(),e);

+				mm.newInstanceOf(ELEMENTCREATERULE_TYPE,typr);

+				IFunction nam  = mm.newFunction(e,r.getElname().getElement(),e);

+				mm.newInstanceOf(ELEMENTCREATERULE_ELEMENT,nam);

+				if (r.getContainer()!=null)

+				{

+					IFunction con = mm.newFunction(e,r.getContainer().getElement(),e);

+					mm.newInstanceOf(ELEMENTCREATERULE_CONTAINERREF,con);

+				}

+		

+				removeContainer();

+				

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}	

+	public IEntity newManipNewRelationshipRule(NewRelationshipRule r)

+	{

+		

+			try

+			{

+				IEntity e;

+				if (r.getName()==null) e = mm.newEntity(currentContainer());

+				else 

+				{

+					IEntity rd = mm.newEntity(r.getName(),machine);

+					mm.newInstanceOf(RULEDEFINITION,rd);

+					generateParlist(r.getVarlist(),rd);

+					e = mm.newEntity(rd);

+					IFunction rdr = mm.newFunction(rd,e,rd);

+					mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+				}

+				mm.newInstanceOf(RELATIONSHIPCREATERULE,e);

+				

+				addContainer(e);

+				generateAnnotation(r.getLine());

+								

+				IEntity typ = mm.newEntity(e);

+				mm.setValue(typ,r.getReltype());

+				if (r.getReltype().equals("instanceOf")) mm.newInstanceOf(RELATIONSHIPTYPE.getContentByName("instanceOf"),typ);

+				if (r.getReltype().equals("supertypeOf")) mm.newInstanceOf(RELATIONSHIPTYPE.getContentByName("supertypeOf"),typ);

+				if (r.getReltype().equals("contains")) mm.newInstanceOf(RELATIONSHIPTYPE.getContentByName("contains"),typ);

+				

+				IFunction typr = mm.newFunction(e,typ,e);

+				mm.newInstanceOf(RELATIONSHIPCREATERULE_TYPE,typr);

+				IFunction supe  = mm.newFunction(e,r.getSup().getElement(),e);

+				mm.newInstanceOf(RELATIONSHIPCREATERULE_FROMREF,supe);

+				IFunction slave  = mm.newFunction(e,r.getSlav().getElement(),e);

+				mm.newInstanceOf(RELATIONSHIPCREATERULE_TOREF,slave);

+		

+				removeContainer();

+				

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}	

+	public IEntity newManipDeleteRelationshipRule(DeleteRelationshipRule r)

+	{

+		

+			try

+			{

+				IEntity e;

+				if (r.getName()==null) e = mm.newEntity(currentContainer());

+				else 

+				{

+					IEntity rd = mm.newEntity(r.getName(),machine);

+					mm.newInstanceOf(RULEDEFINITION,rd);

+					generateParlist(r.getVarlist(),rd);

+					e = mm.newEntity(rd);

+					IFunction rdr = mm.newFunction(rd,e,rd);

+					mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+				}

+				mm.newInstanceOf(RELATIONSHIPDELETERULE,e);

+				

+				addContainer(e);

+				generateAnnotation(r.getLine());				

+				IEntity typ = mm.newEntity(e);

+				mm.setValue(typ,r.getReltype());

+				if (r.getReltype().equals("instanceOf")) mm.newInstanceOf(RELATIONSHIPTYPE.getContentByName("instanceOf"),typ);

+				if (r.getReltype().equals("supertypeOf")) mm.newInstanceOf(RELATIONSHIPTYPE.getContentByName("supertypeOf"),typ);

+				if (r.getReltype().equals("contains")) mm.newInstanceOf(RELATIONSHIPTYPE.getContentByName("contains"),typ);

+				

+				IFunction typr = mm.newFunction(e,typ,e);

+				mm.newInstanceOf(RELATIONSHIPDELETERULE_TYPE,typr);

+				IFunction supe  = mm.newFunction(e,r.getSup().getElement(),e);

+				mm.newInstanceOf(RELATIONSHIPDELETERULE_FROM,supe);

+				IFunction slave  = mm.newFunction(e,r.getSlav().getElement(),e);

+				mm.newInstanceOf(RELATIONSHIPDELETERULE_TO,slave);

+		

+				removeContainer();

+				

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}

+	public IEntity newManipDeleteElementRule(DeleteElementRule r)

+	{

+		

+			try

+			{

+				IEntity e;

+				if (r.getName()==null) e = mm.newEntity(currentContainer());

+				else 

+				{

+					IEntity rd = mm.newEntity(r.getName(),machine);

+					mm.newInstanceOf(RULEDEFINITION,rd);

+					generateParlist(r.getVarlist(),rd);

+					e = mm.newEntity(rd);

+					IFunction rdr = mm.newFunction(rd,e,rd);

+					mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+				}

+				mm.newInstanceOf(ELEMENTDELETERULE,e);

+				

+				addContainer(e);

+				generateAnnotation(r.getLine());

+				IFunction typr = mm.newFunction(e,r.getElemref().getElement(),e);

+				mm.newInstanceOf(ELEMENTDELETERULE_ELEMENT,typr);

+				removeContainer();

+				

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}

+	public IEntity newManipSetValueRule(SetValueRule r)

+	{

+		

+			try

+			{

+				IEntity e;

+				if (r.getName()==null) e = mm.newEntity(currentContainer());

+				else 

+				{

+					IEntity rd = mm.newEntity(r.getName(),machine);

+					mm.newInstanceOf(RULEDEFINITION,rd);

+					generateParlist(r.getVarlist(),rd);

+					e = mm.newEntity(rd);

+					IFunction rdr = mm.newFunction(rd,e,rd);

+					mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+				}

+				mm.newInstanceOf(SETVALUERULE,e);

+				

+				addContainer(e);

+				generateAnnotation(r.getLine());

+				IFunction typr = mm.newFunction(e,r.getElemref().getElement(),e);

+				mm.newInstanceOf(SETVALUERULE_ELEMENTREF,typr);

+				IFunction valf = mm.newFunction(e,r.getValue().getElement(),e);

+				mm.newInstanceOf(SETVALUERULE_VALUE,valf);

+				removeContainer();

+				

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}

+	public IEntity newManipMoveRule(MoveRule r)

+	{

+		

+			try

+			{

+				IEntity e;

+				if (r.getName()==null) e = mm.newEntity(currentContainer());

+				else 

+				{

+					IEntity rd = mm.newEntity(r.getName(),machine);

+					mm.newInstanceOf(RULEDEFINITION,rd);

+					generateParlist(r.getVarlist(),rd);

+					e = mm.newEntity(rd);

+					IFunction rdr = mm.newFunction(rd,e,rd);

+					mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+				}

+				mm.newInstanceOf(MOVERULE,e);

+				

+				addContainer(e);

+				generateAnnotation(r.getLine());

+				IFunction typr = mm.newFunction(e,r.getElemref().getElement(),e);

+				mm.newInstanceOf(MOVERULE_ELEMENT,typr);

+				

+				if (r.getFrom()!=null)

+				{

+					IFunction valf = mm.newFunction(e,r.getFrom().getElement(),e);

+					mm.newInstanceOf(MOVERULE_FROM,valf);

+				}

+				

+				IFunction valt = mm.newFunction(e,r.getTo().getElement(),e);

+				mm.newInstanceOf(MOVERULE_TO,valt);

+				

+				removeContainer();

+				

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}

+	public IEntity newManipRenameRule(RenameRule r)

+	{

+		

+			try

+			{

+				IEntity e;

+				if (r.getName()==null) e = mm.newEntity(currentContainer());

+				else 

+				{

+					IEntity rd = mm.newEntity(r.getName(),machine);

+					mm.newInstanceOf(RULEDEFINITION,rd);

+					generateParlist(r.getVarlist(),rd);

+					e = mm.newEntity(rd);

+					IFunction rdr = mm.newFunction(rd,e,rd);

+					mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+				}

+				mm.newInstanceOf(RENAMERULE,e);

+				

+				addContainer(e);

+				generateAnnotation(r.getLine());

+				IFunction typr = mm.newFunction(e,r.getElemref().getElement(),e);

+				mm.newInstanceOf(RENAMERULE_ELEMENT,typr);

+				IFunction valf = mm.newFunction(e,r.getValue().getElement(),e);

+				mm.newInstanceOf(RENAMERULE_NAME,valf);

+				removeContainer();

+				

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}

+	public IEntity newManipNewRelationRule(NewRelationRule r)

+	{

+		

+			try

+			{

+				IEntity e;

+				if (r.getName()==null) e = mm.newEntity(currentContainer());

+				else 

+				{

+					IEntity rd = mm.newEntity(r.getName(),machine);

+					mm.newInstanceOf(RULEDEFINITION,rd);

+					generateParlist(r.getVarlist(),rd);

+					e = mm.newEntity(rd);

+					IFunction rdr = mm.newFunction(rd,e,rd);

+					mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+				}

+				mm.newInstanceOf(RELATIONCREATERULE,e);

+				

+				addContainer(e);

+				generateAnnotation(r.getLine());

+				//IEntity typ = mm.newEntity(e);

+				//mm.setValue(typ,r.getTyperef());

+				//mm.newInstanceOf(ELEMENTREFERENCE,typ);

+				IFunction typr = mm.newFunction(e,r.getTyperef().getElement(),e);

+				mm.newInstanceOf(ELEMENTCREATERULE_TYPE,typr);

+				IFunction nam  = mm.newFunction(e,r.getElname().getElement(),e);

+				mm.newInstanceOf(ELEMENTCREATERULE_ELEMENT,nam);

+				IFunction src = mm.newFunction(e,r.getSource().getElement(),e);

+				mm.newInstanceOf(RELATIONCREATERULE_SOURCE,src);

+				IFunction trg = mm.newFunction(e,r.getTarget().getElement(),e);

+				mm.newInstanceOf(RELATIONCREATERULE_TARGET,trg);

+				if (r.getContainer()!=null)

+				{

+					IFunction con = mm.newFunction(e,r.getContainer().getElement(),e);

+					mm.newInstanceOf(ELEMENTCREATERULE_CONTAINERREF,con);

+				}

+		

+				removeContainer();

+				

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}	

+	public IEntity newChooseRule(int li,String n, Vector rp,Vector vars, int mod, TermDef base, FormulaDef fo, ASMRuleDef r, GTRuleCallDef gt)

+	{

+		

+			try

+			{

+				IEntity e;

+				if (n==null) e = mm.newEntity(currentContainer());

+				else 

+				{

+					IEntity rd = mm.newEntity(n,machine);

+					mm.newInstanceOf(RULEDEFINITION,rd);

+					generateParlist(rp,rd);

+					e = mm.newEntity(rd);

+					IFunction rdr = mm.newFunction(rd,e,rd);

+					mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+				}

+				mm.newInstanceOf(CHOOSERULE,e);

+				

+				addContainer(e);

+				generateAnnotation(li);

+				if (vars!=null)

+				{

+					IEntity vl = createScopedList(vars);

+					IFunction vf = mm.newFunction(e,vl,currentContainer());

+					mm.newInstanceOf(BLOCKRULE_FIRSTVARIABLE,vf);

+				}

+				

+				/*

+				for (int i=0;i<vars.size();i++)

+				{

+					String va = (String)vars.get(i);

+					

+					IRelation fu = mm.newRelation(e,newVariableTerm(va),currentContainer());

+					mm.newInstanceOf(VARIABLE_CHOOSE,fu);

+				}*//*

+		

+				if (fo!=null)

+				{

+				IFunction form = mm.newFunction(e,fo.getElement(),e);

+				mm.newInstanceOf(CHOOSERULE_FORMULA,form);

+				}

+				if (r!=null)

+				{

+					IEntity ri;

+					if (r instanceof CallRule)

+					{

+						ri = r.getElement();

+					}

+					else

+					{

+						ri = mm.newEntity(currentContainer());

+						mm.newInstanceOf(ASMRULEINVOCATION,ri);

+						IFunction rif = mm.newFunction(ri,r.getElement(),ri);

+						mm.newInstanceOf(ASMRULEINVOCATION_RULE,rif);

+					}

+					IFunction fu = mm.newFunction(e,ri,currentContainer());

+					mm.newInstanceOf(BLOCKRULE_RULE,fu);		

+				}

+				else

+				{

+					IEntity ri = mm.newEntity(currentContainer());

+					mm.newInstanceOf(GTRULEINVOCATION,ri);

+					IFunction rif = mm.newFunction(ri,gt.getElement(),ri);

+					mm.newInstanceOf(GTRULEINVOCATION_RULE,rif);

+					IFunction fu = mm.newFunction(e,ri,currentContainer());

+					mm.newInstanceOf(BLOCKRULE_GTRULE,fu);					

+				}

+				

+				

+				

+				

+				removeContainer();

+				

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}

+	public IEntity newIterateRule(int li,String n,  Vector rp,ASMRuleDef r, GTRuleCallDef gt)

+	{

+		

+			try

+			{

+				IEntity e;

+				if (n==null) e = mm.newEntity(currentContainer());

+				else 

+				{

+					IEntity rd = mm.newEntity(n,machine);

+					mm.newInstanceOf(RULEDEFINITION,rd);

+					generateParlist(rp,rd);

+					e = mm.newEntity(rd);

+					IFunction rdr = mm.newFunction(rd,e,rd);

+					mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+				}

+				mm.newInstanceOf(ITERATERULE,e);

+				

+				addContainer(e);

+				generateAnnotation(li);

+

+				if (r!=null)

+				{

+					IEntity ri;

+					if (r instanceof CallRule)

+					{

+						ri = r.getElement();

+					}

+					else

+					{

+						ri = mm.newEntity(currentContainer());

+						mm.newInstanceOf(ASMRULEINVOCATION,ri);

+						IFunction rif = mm.newFunction(ri,r.getElement(),ri);

+						mm.newInstanceOf(ASMRULEINVOCATION_RULE,rif);

+					}

+					IFunction fu = mm.newFunction(e,ri,currentContainer());

+					mm.newInstanceOf(BLOCKRULE_RULE,fu);		

+				}

+				else

+				{

+					IEntity ri = mm.newEntity(currentContainer());

+					mm.newInstanceOf(GTRULEINVOCATION,ri);

+					IFunction rif = mm.newFunction(ri,gt.getElement(),ri);

+					mm.newInstanceOf(GTRULEINVOCATION_RULE,rif);

+					IFunction fu = mm.newFunction(e,ri,currentContainer());

+					mm.newInstanceOf(BLOCKRULE_GTRULE,fu);					

+				}

+				

+				

+				

+				

+				removeContainer();

+				

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}			

+	public IEntity newLetRule(int li,String n, Vector rp, String var, TermDef te, ASMRuleDef r)

+	{

+		

+			try

+			{

+				IEntity e;

+				if (n==null) e = mm.newEntity(currentContainer());

+				else 

+				{

+					IEntity rd = mm.newEntity(n,machine);

+					mm.newInstanceOf(RULEDEFINITION,rd);

+					generateParlist(rp,rd);

+					e = mm.newEntity(rd);

+					IFunction rdr = mm.newFunction(rd,e,rd);

+					mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+				}

+				mm.newInstanceOf(LETRULE,e);

+				

+				addContainer(e);

+				generateAnnotation(li);

+				IEntity ri;

+				if (r instanceof CallRule)

+				{

+					ri = r.getElement();

+				}

+				else

+				{

+					ri = mm.newEntity(currentContainer());

+					mm.newInstanceOf(ASMRULEINVOCATION,ri);

+					IFunction rif = mm.newFunction(ri,r.getElement(),ri);

+					mm.newInstanceOf(ASMRULEINVOCATION_RULE,rif);

+				}

+					IFunction fu = mm.newFunction(e,ri,currentContainer());

+					mm.newInstanceOf(BLOCKRULE_RULE,fu);		

+

+				IFunction varf = mm.newFunction(e,newVariableTerm(var),e);

+				mm.newInstanceOf(LETRULE_VARIABLE,varf);

+				

+				IFunction valf = mm.newFunction(e,te.getElement(),e);

+				mm.newInstanceOf(LETRULE_VALUE,valf);

+				

+				

+				removeContainer();

+				

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}			

+	public IEntity newASMFunction(ASMFunction f)

+	{

+		try

+		{

+			IEntity e = mm.newEntity(f.getName(),machine);

+			mm.newInstanceOf(ASMFUNCTION,e);

+			addContainer(e);

+

+			Iterator i = f.getLocations().iterator();

+			while (i.hasNext())

+			{

+				FunctionLocation fl = (FunctionLocation)i.next();

+				IEntity lc = mm.newEntity(currentContainer());

+				mm.setValue(lc,fl.getValue());

+				mm.newInstanceOf(CONSTANT,lc);

+				IRelation lre = mm.newRelation(fl.getLocation(),e,lc,e);

+				mm.newInstanceOf(LOCATION_REL,lre);

+			}

+			

+			

+			removeContainer();

+			return e;

+		}

+		catch (Exception e)

+		{

+			log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+			e.printStackTrace();

+			return null;

+		}		

+	}

+	public IEntity newCallRule(int li,String n, Vector v, ASMRuleDef rule, Vector actp)

+	{

+		

+			try

+			{

+	

+

+			IEntity ri = mm.newEntity(currentContainer());

+			mm.newInstanceOf(ASMRULEINVOCATION,ri);

+			String rulnam = rule.getName();

+			IEntity rul_to_inv = null;

+			try

+			{

+				rul_to_inv = (IEntity) machine.getContentByName(rulnam);

+			}

+			catch (Exception e)

+			{

+				

+			}

+			addContainer(ri);

+			generateAnnotation(li);

+			removeContainer();

+			if (rul_to_inv==null) rul_to_inv = rule.getElement().getParentByName(rule.getName());

+			

+			IFunction rif = mm.newFunction(ri,rul_to_inv,ri);

+			mm.newInstanceOf(ASMRULEINVOCATION_RULE,rif);

+			IEntity old=null;

+			if (actp!=null)

+			{

+			for (int i=0;i<actp.size();i++)

+			{

+				TermDef s = (TermDef)actp.get(i);

+				if (i==0)

+				{

+					old = mm.newEntity(ri);

+					mm.newInstanceOf(ACTUALPARAMETER,old);

+					addContainer(old);

+					

+					IFunction fu = mm.newFunction(old,s.getElement(),currentContainer());

+					mm.newInstanceOf(ACTUALPARAMETER_VALUE,fu);

+					IFunction ff = mm.newFunction(ri,old,ri);

+					mm.newInstanceOf(ASMRULEINVOCATION_FIRSTPARAM,ff);

+					removeContainer();

+				}

+				else

+				{

+					

+						IEntity ne = mm.newEntity(ri);

+						mm.newInstanceOf(ACTUALPARAMETER,ne);

+						addContainer(ne);

+						IFunction fu = mm.newFunction(ne,s.getElement(),currentContainer());

+						mm.newInstanceOf(ACTUALPARAMETER_VALUE,fu);

+						IFunction ff = mm.newFunction(old,ne,old);

+						mm.newInstanceOf(ACTUALPARAMETER_NEXT,ff);

+						old = ne;

+						removeContainer();

+					

+				}

+			}					

+			}	

+				

+				

+				return ri;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}		

+	public IEntity newParallelRule(int li,String n, Vector rp,Vector v)

+	{

+		

+			try

+			{

+				IEntity e;

+				if (n==null) e = mm.newEntity(currentContainer());

+				else 

+				{

+					IEntity rd = mm.newEntity(n,machine);

+					mm.newInstanceOf(RULEDEFINITION,rd);

+					generateParlist(rp,rd);

+					e = mm.newEntity(rd);

+					IFunction rdr = mm.newFunction(rd,e,rd);

+					mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+				}

+				mm.newInstanceOf(PARALLELRULE,e);

+				

+				addContainer(e);

+				generateAnnotation(li);

+				

+				for (int i=0;i<v.size();i++)

+				{

+					ASMRuleDef r = (ASMRuleDef)v.get(i);

+					IEntity ri = mm.newEntity(currentContainer());

+					mm.newInstanceOf(ASMRULEINVOCATION,ri);

+					IFunction rif = mm.newFunction(ri,r.getElement(),ri);

+					mm.newInstanceOf(ASMRULEINVOCATION_RULE,rif);

+					IRelation fu = mm.newRelation(e,ri,currentContainer());

+					mm.newInstanceOf(RULE,fu);

+				}

+				

+				

+				

+				

+				removeContainer();

+				

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}

+	

+	public IEntity newSequentialRule(int li,String n, Vector rp,Vector v)

+	{

+		

+			try

+			{

+				IEntity e=null;

+				if (n==null) e = mm.newEntity(currentContainer());

+				else 

+				{

+					IEntity rd = mm.newEntity(n,machine);

+					mm.newInstanceOf(RULEDEFINITION,rd);

+					generateParlist(rp,rd);

+					e = mm.newEntity(rd);

+					IFunction rdr = mm.newFunction(rd,e,rd);

+					mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+				}

+				mm.newInstanceOf(SEQUENTIALRULE,e);

+				addContainer(e);

+				generateAnnotation(li);

+				

+				IEntity old = null;

+				for (int i=0;i<v.size();i++)

+				{

+					ASMRuleDef r = (ASMRuleDef)v.get(i);

+					IEntity ri = mm.newEntity(currentContainer());

+					mm.newInstanceOf(ASMRULEINVOCATION,ri);

+					IFunction rif = mm.newFunction(ri,r.getElement(),ri);

+					mm.newInstanceOf(ASMRULEINVOCATION_RULE,rif);

+					IRelation fu = mm.newRelation(e,ri,currentContainer());

+					mm.newInstanceOf(RULE,fu);

+					if (i==0)

+					{

+						IFunction fir = mm.newFunction(e,ri,e);

+						mm.newInstanceOf(SEQUENTIALRULE_FIRSTRULE,fir);

+					}

+					else

+					{

+						IRelation nex = mm.newRelation(old,ri,old);

+						mm.newInstanceOf(NEXTRULE,nex);

+					}

+					old = ri;

+				}

+				

+				

+				

+				

+				removeContainer();

+				

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}

+		

+	public IEntity newRandomRule(int li,String n, Vector rp,Vector v)

+	{

+		

+			try

+			{

+				IEntity e;

+				if (n==null) e = mm.newEntity(currentContainer());

+				else 

+				{

+					IEntity rd = mm.newEntity(n,machine);

+					mm.newInstanceOf(RULEDEFINITION,rd);

+					generateParlist(rp,rd);

+					e = mm.newEntity(rd);

+					IFunction rdr = mm.newFunction(rd,e,rd);

+					mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+				}

+				mm.newInstanceOf(RANDOMRULE,e);

+				

+				addContainer(e);

+				generateAnnotation(li);

+				

+				for (int i=0;i<v.size();i++)

+				{

+					ASMRuleDef r = (ASMRuleDef)v.get(i);

+					IEntity ri = mm.newEntity(currentContainer());

+					mm.newInstanceOf(ASMRULEINVOCATION,ri);

+					IFunction rif = mm.newFunction(ri,r.getElement(),ri);

+					mm.newInstanceOf(ASMRULEINVOCATION_RULE,rif);

+					IRelation fu = mm.newRelation(e,ri,currentContainer());

+					mm.newInstanceOf(RULE,fu);

+				}

+		

+				removeContainer();

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}

+	public IEntity newUpdateRule(int li,String n, Vector rp,String var, String fun, Vector l, TermDef val)

+	{

+		

+			try

+			{

+				IEntity e;

+				if (n==null) e = mm.newEntity(currentContainer());

+				else 

+				{

+					IEntity rd = mm.newEntity(n,machine);

+					mm.newInstanceOf(RULEDEFINITION,rd);

+					generateParlist(rp,rd);

+					e = mm.newEntity(rd);

+					IFunction rdr = mm.newFunction(rd,e,rd);

+					mm.newInstanceOf(RULEDEFINITION_RULE,rdr);

+				}

+				mm.newInstanceOf(UPDATERULE,e);

+				addContainer(e);

+				generateAnnotation(li);

+				

+				IFunction value = mm.newFunction(e,val.getElement(),e);

+				mm.newInstanceOf(UPDATERULE_VALUE,value);

+				if (var!=null)

+				{

+					IFunction varf = mm.newFunction(e,newVariableTerm(var),e);

+					mm.newInstanceOf(UPDATERULE_VARIABLE,varf);

+				}

+				else

+				{

+					IFunction func = mm.newFunction(e,lookupFunction(fun),e);

+					mm.newInstanceOf(UPDATERULE_FUNCTION,func);

+					IEntity old = null;

+					for (int i=0;i<l.size();i++)

+					{

+						TermDef s = (TermDef)l.get(i);

+						if (i==0)

+						{

+							old = mm.newEntity(currentContainer());

+							mm.newInstanceOf(ACTUALPARAMETER,old);

+							addContainer(old);

+							

+							IFunction fu = mm.newFunction(old,s.getElement(),currentContainer());

+							mm.newInstanceOf(ACTUALPARAMETER_VALUE,fu);

+							IFunction ff = mm.newFunction(e,old,e);

+							mm.newInstanceOf(UPDATERULE_LOCATION,ff);

+							removeContainer();

+						}

+						else

+						{

+							

+								IEntity ne = mm.newEntity(currentContainer());

+								mm.newInstanceOf(ACTUALPARAMETER,ne);

+								addContainer(ne);

+								IFunction fu = mm.newFunction(ne,s.getElement(),currentContainer());

+								mm.newInstanceOf(ACTUALPARAMETER_VALUE,fu);

+								IFunction ff = mm.newFunction(old,ne,old);

+								mm.newInstanceOf(ACTUALPARAMETER_NEXT,ff);

+								old = ne;

+								removeContainer();

+							

+						}

+					}				

+				}

+				removeContainer();

+				return e;

+			}

+			catch (Exception e)

+			{

+				log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+				e.printStackTrace();

+				return null;

+			}

+		}		

+	public IEntity newUnaryOp(int li,String op, FormulaDef f, String var)

+	{

+	

+		try

+		{

+			IEntity e = mm.newEntity(currentContainer());

+			

+			addContainer(e);

+			generateAnnotation(li);

+			if (op.equals("!")) mm.newInstanceOf(NOT,e);

+			if (op.equals("all")) mm.newInstanceOf(ALL,e);

+			if (op.equals("exists")) mm.newInstanceOf(EXISTS,e);

+

+			mm.setValue(e,op);

+			

+			IFunction fl = mm.newFunction(e,f.getElement(),currentContainer());

+			mm.newInstanceOf(UNARYOPERATION_FORMULA,fl);

+			

+			if (var!=null)

+				{

+				IEntity vr = newVariableTerm(var);

+				IFunction fr = mm.newFunction(e,vr,currentContainer());

+				mm.newInstanceOf(QUALIFIEDFORMULA_VARIABLE,fr);

+				}

+				

+		

+			removeContainer();

+			return e;

+		}

+		catch (Exception e)

+		{

+			log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+			e.printStackTrace();

+			return null;

+		}

+	}		

+	public IEntity lookupFunction(String n) throws VPMCoreException

+	{

+		Collection c = ASMFUNCTION.getAllSubtypes();

+		Iterator i = c.iterator();

+		while (i.hasNext())

+		{

+			IEntity e = (IEntity)i.next();

+			

+			if ((e.getName().equals(n)))

+					return e;

+			

+			

+		}

+		c = ASMFUNCTION.getAllInstances();

+		i = c.iterator();

+		while (i.hasNext())

+		{

+			IEntity e = (IEntity)i.next();

+			

+			if ((e.getName().equals(n)))

+					return e;

+			

+			

+		}

+		c = NATIVEFUNCTION.getAllInstances();

+		i = c.iterator();

+		while (i.hasNext())

+		{

+			IEntity e = (IEntity)i.next();

+			

+			if ((e.getName().equals(n)))

+					return e;

+			

+		}

+		

+		return null;

+	}

+	public IEntity newFunctionInvoke(int li, String fname, Vector p)

+	{

+	

+		try

+		{

+			IEntity e = mm.newEntity(currentContainer());

+			addContainer(e);

+			generateAnnotation(li);

+			mm.newInstanceOf(FUNCTIONINVOCATION,e);

+			IEntity old = null;

+			IFunction fun = mm.newFunction(e,lookupFunction(fname),currentContainer());

+			mm.newInstanceOf(FUNCTIONINVOCATION_FUNCTION,fun);

+			for (int i=0;i<p.size();i++)

+			{

+				TermDef s = (TermDef)p.get(i);

+				if (i==0)

+				{

+					old = mm.newEntity(currentContainer());

+					mm.newInstanceOf(ACTUALPARAMETER,old);

+					addContainer(old);

+					

+					IFunction fu = mm.newFunction(old,s.getElement(),currentContainer());

+					mm.newInstanceOf(ACTUALPARAMETER_VALUE,fu);

+					IFunction ff = mm.newFunction(e,old,e);

+					mm.newInstanceOf(FUNCTIONINVOCATION_FIRSTPARAM,ff);

+					removeContainer();

+				}

+				else

+				{

+					

+						IEntity ne = mm.newEntity(currentContainer());

+						mm.newInstanceOf(ACTUALPARAMETER,ne);

+						addContainer(ne);

+						IFunction fu = mm.newFunction(ne,s.getElement(),currentContainer());

+						mm.newInstanceOf(ACTUALPARAMETER_VALUE,fu);

+						IFunction ff = mm.newFunction(old,ne,currentContainer());

+						mm.newInstanceOf(ACTUALPARAMETER_NEXT,ff);

+						old = ne;

+						removeContainer();

+					

+				}

+			}

+			

+		

+		    removeContainer();

+			return e;

+		}

+		catch (Exception e)

+		{

+			log.error("Cannot create model elements. Import failed. root cause: "+e.getLocalizedMessage());

+			e.printStackTrace();

+			return null;

+		}

+	}*/

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLImportFactory.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLImportFactory.java
new file mode 100644
index 0000000..6658f94
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLImportFactory.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import java.io.InputStream;
+
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.imports.NativeImporter;
+

+/**

+ * @author babo

+ *

+ * TODO To change the template for this generated type comment go to

+ * Window - Preferences - Java - Code Style - Code Templates

+ */

+public class VTMLImportFactory implements NativeImporter

+{

+	public VTMLLoad getImporterInstance(IFramework f)

+			throws VPMRuntimeException {

+		

+		VTMLLoad vl = new VTMLLoad();

+		vl.init(f.getTopmodel(),f.getLogger());

+		return vl;

+	}

+

+	public void processFile(String f, IFramework fw) throws VPMRuntimeException {

+		VTMLLoad importer=getImporterInstance(fw);

+		importer.processFile(f,fw.getTopmodel(),fw,fw.getLogger());

+	}

+

+	public void process(InputStream f, IFramework fw) throws VPMRuntimeException {

+		VTMLLoad importer=getImporterInstance(fw);

+		importer.process(f,fw.getTopmodel(),fw,fw.getLogger());

+	}

+

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLLoad.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLLoad.java
new file mode 100644
index 0000000..2266071
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLLoad.java
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import java.io.InputStream;
+
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.logger.Logger;
+

+/**

+ * @author babo

+ *

+ * TODO To change the template for this generated type comment go to

+ * Window - Preferences - Java - Code Style - Code Templates

+ */

+public class VTMLLoad{

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.NativeImporter#process(java.io.InputStream, org.eclipse.viatra2.core.IModelSpace, org.eclipse.viatra2.logger.Logger)

+	 */

+	public void process(InputStream f, IModelSpace m, IFramework fw, Logger l) throws VPMRuntimeException {

+		try

+		{

+		init(m,l);

+		VTMLParser p = new VTMLParser();

+		try

+		{

+		p.processFile(f,ab,log);

+		}

+		catch (Exception e)

+		{

+			//log.error("Error parsing file. Parser message: "+e.getLocalizedMessage());

+			VTMLMetaModelHelper.deleteInstance();

+			return;

+		}

+		//ab.debug();

+		if (ab.checkDefinition())

+		{

+			log.info("Reference check ok.");

+			ab.generateElements();

+		}

+		

+		VTMLMetaModelHelper.deleteInstance();

+		}

+		catch (Exception e)

+		{

+			VTMLMetaModelHelper.deleteInstance();

+			log.error("Internal exception during parse.");

+			e.printStackTrace(); //TODO delete this line

+		}

+

+		

+	}

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.NativeImporter#init(org.eclipse.viatra2.core.IModelSpace, org.eclipse.viatra2.logger.Logger)

+	 */

+	public void init(IModelSpace m, Logger l) throws VPMRuntimeException {

+		log = l;

+		mod = m;

+		ab = new ASTBuilder();

+		ab.init(log,m);

+		log.debug("VTML import initialized");

+	}

+	public void deInit() {

+		log=null;

+		mod=null;

+		ab=null;

+	}

+	Logger log;

+	IModelSpace mod;

+	ASTBuilder ab;

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.NativeImporter#getName()

+	 */

+	public String getName() {

+		// TODO Auto-generated method stub

+		return "Viatra Tectual Command Language Parser";

+	}

+

+	/* (non-Javadoc)

+	 * @see org.eclipse.viatra2.imports.NativeImporter#processFile(java.lang.String, org.eclipse.viatra2.core.IModelSpace, org.eclipse.viatra2.logger.Logger)

+	 */

+	public void processFile(String f, IModelSpace m, IFramework fw, Logger l)

+			throws VPMRuntimeException {

+

+		try

+		{

+		init(m,l);

+		VTMLParser p = new VTMLParser();

+		try

+		{

+		p.processFile(f,ab,log);

+		}

+		catch (Exception e)

+		{

+			//log.error("Error parsing file. Parser message: "+e.getLocalizedMessage());

+			VTMLMetaModelHelper.deleteInstance();

+			return;

+		}

+		//ab.debug();

+		if (ab.checkDefinition())

+		{

+			log.info("Reference check ok.");

+			ab.generateElements();

+		}

+		

+	

+		VTMLMetaModelHelper.deleteInstance();

+		}

+		catch (Exception e)

+		{

+			VTMLMetaModelHelper.deleteInstance();

+			log.error("Internal exception during parse.");

+			e.printStackTrace(); //TODO delete this line

+		}

+

+	}

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLMetaModelHelper.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLMetaModelHelper.java
new file mode 100644
index 0000000..c226271
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLMetaModelHelper.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import java.util.Stack;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.logger.Logger;
+

+/**

+ * @author babo

+ *

+ * TODO To change the template for this generated type comment go to

+ * Window - Preferences - Java - Code Style - Code Templates

+ */

+public class VTMLMetaModelHelper {

+	

+	private static VTMLMetaModelHelper instance;

+	

+	private static Logger log = null;

+	private IModelSpace modsp;

+	private IModelManager mm;

+	

+	public IModelSpace getMSpace() { return modsp;}

+	

+	

+	Stack conts = new Stack();

+	

+	public void addContainer(IEntity e)

+	{

+		conts.push(e);

+	}

+	public IEntity currentContainer()

+	{

+		return (IEntity)conts.peek();

+	}

+	public IEntity removeContainer()

+	{

+		return (IEntity)conts.pop();

+	}

+	public static VTMLMetaModelHelper getInstance() {

+		if (instance==null) instance = new VTMLMetaModelHelper();

+		if (instance.log==null) return null;

+		return instance;

+	}

+	

+	private VTMLMetaModelHelper()

+	{

+		

+	}

+	

+	public static void init(Logger l, IModelSpace ms, ASTBuilder a) throws VPMRuntimeException

+	{

+		log = l;

+		getInstance().modsp = ms;

+		getInstance().mm = ms.getModelManager();

+		getInstance().ab=a;

+		getInstance().loadMetaModel();

+	}

+	private IEntity ent(String fqn)

+	{

+		IEntity ret=mm.getEntityByName(fqn);

+		if(ret==null)

+			throw new RuntimeException("invalid model");

+		return ret;

+	}

+	private IRelation rel(String fqn)

+	{

+		IRelation ret=mm.getRelationByName(fqn);

+		if(ret==null)

+			throw new RuntimeException("invalid model");

+		return ret;

+	}

+	public static void deleteInstance()

+	{

+		instance = null;

+	}

+	

+	private void loadMetaModel() throws VPMRuntimeException

+	{

+		

+	}

+

+	IEntity machine;

+	ASTBuilder ab;

+	public ASTBuilder getASTBuilder()

+	{

+		return ab;

+	}

+	

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLParser.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLParser.java
new file mode 100644
index 0000000..0ee757d
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLParser.java
@@ -0,0 +1,758 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import java.io.FileInputStream;
+import java.io.InputStream;
+
+import org.eclipse.viatra2.logger.Logger;
+

+public class VTMLParser implements VTMLParserConstants {

+

+

+

+  public static final String progname = "VPM Parser Version 3.0.1";

+

+  public VTMLParser()

+  {

+

+  }

+

+  static VTMLParser parser = null;

+  static org.eclipse.viatra2.logger.Logger log;

+

+  static int line = 0;

+  static ASTBuilder ab = null;

+

+    public void processFile(InputStream inp,ASTBuilder a, Logger l) throws Exception

+   {

+         log=l;

+         ab = a;

+

+

+                 if (parser==null)

+                 parser = new VTMLParser(inp);

+                 else parser.ReInit(inp);

+

+           try {

+                 parser.specification();

+                 log.info(progname+":  Program parsed successfully.");

+                 inp.close();

+                 ab = null;

+                 log = null;

+           } catch (ParseException e) {

+                 log.error(progname+":  error parsing file. Cause: "+e.getMessage());

+                 inp.close();

+                 ab = null;

+                 log = null;

+                 throw new Exception();

+           }

+           catch (Throwable e)

+           {

+            log.error("Parser error in line: "+line);

+            log.error("Message: "+e.getMessage());

+                         log = null;

+            ab = null;

+            throw new Exception();

+           }

+                 ab = null;

+                 log = null;

+

+   }

+   public void processFile(String f,ASTBuilder a, Logger l) throws Exception

+  {

+        log=l;

+        ab = a;

+        FileInputStream inp = null;

+  try {

+        inp = new java.io.FileInputStream(f);

+                if (parser==null)

+                parser = new VTMLParser(inp);

+                else parser.ReInit(inp);

+          } catch (java.io.FileNotFoundException e) {

+                log.error(progname+":  File " + f + " not found.");

+                ab = null;

+                return;

+  }

+          try {

+                parser.specification();

+                log.info(progname+":  Program parsed successfully.");

+                inp.close();

+                ab = null;

+                log = null;

+          } catch (ParseException e) {

+                log.error(progname+":  error parsing file. Cause: "+e.getMessage());

+                inp.close();

+                ab = null;

+                log = null;

+                throw new Exception();

+          }

+          catch (Throwable e)

+          {

+           log.error("Parser error in line: "+line);

+           log.error("Message: "+e.getMessage());

+                        log = null;

+           ab = null;

+           throw new Exception();

+          }

+                ab = null;

+                log = null;

+

+  }

+

+/* Production 1 */

+  static final public void specification() throws ParseException {

+ String s;

+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {

+    case 10:

+      namespac();

+      break;

+    default:

+      jj_la1[0] = jj_gen;

+      ;

+    }

+    label_1:

+    while (true) {

+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {

+      case 8:

+        ;

+        break;

+      default:

+        jj_la1[1] = jj_gen;

+        break label_1;

+      }

+      namespace_import();

+    }

+    label_2:

+    while (true) {

+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {

+      case 16:

+      case 17:

+      case 18:

+      case 19:

+      case 20:

+      case 23:

+      case 24:

+      case 25:

+      case 26:

+      case 27:

+      case ID:

+      case VARIABLE:

+      case ANYID:

+        ;

+        break;

+      default:

+        jj_la1[2] = jj_gen;

+        break label_2;

+      }

+    s=ab.getNamespace();

+      definition(s);

+    }

+  }

+

+/* Namespace import handling... */

+  static final public void namespace_import() throws ParseException {

+ String s;

+    jj_consume_token(8);

+    s = name();

+    jj_consume_token(9);

+                          ab.addImport(line,s);

+  }

+

+/* Default namespace definition */

+  static final public void namespac() throws ParseException {

+ String s;

+    jj_consume_token(10);

+    s = name();

+    jj_consume_token(9);

+                             ab.setNamespace(s);

+  }

+

+  static final public void definition(String s) throws ParseException {

+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {

+    case ID:

+    case VARIABLE:

+    case ANYID:

+      elemdef(s);

+      break;

+    case 16:

+    case 17:

+    case 18:

+    case 19:

+    case 20:

+    case 23:

+    case 24:

+    case 25:

+    case 26:

+    case 27:

+      relshipdef(s);

+      break;

+    default:

+      jj_la1[3] = jj_gen;

+      jj_consume_token(-1);

+      throw new ParseException();

+    }

+  }

+

+/* VPM element definitions */

+  static final public void elemdef(String ns) throws ParseException {

+ String t,u,v=null,s;

+    t = nameref();

+    jj_consume_token(11);

+    u = name();

+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {

+    case 12:

+      jj_consume_token(12);

+      v = nameref();

+      jj_consume_token(12);

+      s = nameref();

+      jj_consume_token(13);

+                                                     ab.addRelationDef(line,ns,u,t,v,s);

+      jj_consume_token(9);

+      break;

+    case 13:

+      jj_consume_token(13);

+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {

+      case IMPLOP:

+        jj_consume_token(IMPLOP);

+        v = value();

+        break;

+      default:

+        jj_la1[4] = jj_gen;

+        ;

+      }

+                                         ab.addEntityDef(line, ns, u, t, v);

+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {

+      case 14:

+        jj_consume_token(14);

+               if (ns.length()>0) ns = ns+"."+u; else ns = u;

+        label_3:

+        while (true) {

+          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {

+          case 16:

+          case 17:

+          case 18:

+          case 19:

+          case 20:

+          case 23:

+          case 24:

+          case 25:

+          case 26:

+          case 27:

+          case ID:

+          case VARIABLE:

+          case ANYID:

+            ;

+            break;

+          default:

+            jj_la1[5] = jj_gen;

+            break label_3;

+          }

+          definition(ns);

+        }

+        jj_consume_token(15);

+        break;

+      case 9:

+        jj_consume_token(9);

+        break;

+      default:

+        jj_la1[6] = jj_gen;

+        jj_consume_token(-1);

+        throw new ParseException();

+      }

+      break;

+    default:

+      jj_la1[7] = jj_gen;

+      jj_consume_token(-1);

+      throw new ParseException();

+    }

+  }

+

+  static final public void relshipdef(String s) throws ParseException {

+ String t,u;boolean bb;

+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {

+    case 16:

+      jj_consume_token(16);

+      jj_consume_token(11);

+      t = nameref();

+      jj_consume_token(12);

+      u = nameref();

+      jj_consume_token(13);

+      jj_consume_token(9);

+                                                            ab.addTypeDefinition(line,s,u,t);

+      break;

+    case 17:

+      jj_consume_token(17);

+      jj_consume_token(11);

+      t = nameref();

+      jj_consume_token(12);

+      u = nameref();

+      jj_consume_token(13);

+      jj_consume_token(9);

+                                                        ab.addTypeDefinition(line,s,t,u);

+      break;

+    case 18:

+      jj_consume_token(18);

+      jj_consume_token(11);

+      t = nameref();

+      jj_consume_token(12);

+      u = nameref();

+      jj_consume_token(13);

+      jj_consume_token(9);

+                                                             ab.addSupertypeDefinition(line,s,t,u);

+      break;

+    case 19:

+      jj_consume_token(19);

+      jj_consume_token(11);

+      t = nameref();

+      jj_consume_token(12);

+      u = nameref();

+      jj_consume_token(13);

+      jj_consume_token(9);

+                                                          ab.addSupertypeDefinition(line,s,u,t);

+      break;

+    case 20:

+      jj_consume_token(20);

+      jj_consume_token(11);

+      t = nameref();

+      jj_consume_token(12);

+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {

+      case 21:

+        jj_consume_token(21);

+                                               bb=true;

+        break;

+      case 22:

+        jj_consume_token(22);

+                                                                    bb=false;

+        break;

+      default:

+        jj_la1[8] = jj_gen;

+        jj_consume_token(-1);

+        throw new ParseException();

+      }

+      jj_consume_token(13);

+      jj_consume_token(9);

+                                                                                         ab.addIsFinalTypeDefinition(line,s,t,bb);

+      break;

+    case 23:

+      jj_consume_token(23);

+      jj_consume_token(11);

+      t = nameref();

+      jj_consume_token(12);

+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {

+      case 21:

+        jj_consume_token(21);

+                                                 bb=true;

+        break;

+      case 22:

+        jj_consume_token(22);

+                                                                      bb=false;

+        break;

+      default:

+        jj_la1[9] = jj_gen;

+        jj_consume_token(-1);

+        throw new ParseException();

+      }

+      jj_consume_token(13);

+      jj_consume_token(9);

+                                                                                           ab.addIsAggregationDefinition(line,s,t,bb);

+      break;

+    case 24:

+      jj_consume_token(24);

+      jj_consume_token(11);

+      t = nameref();

+      jj_consume_token(12);

+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {

+      case 21:

+        jj_consume_token(21);

+                                               bb=true;

+        break;

+      case 22:

+        jj_consume_token(22);

+                                                                    bb=false;

+        break;

+      default:

+        jj_la1[10] = jj_gen;

+        jj_consume_token(-1);

+        throw new ParseException();

+      }

+      jj_consume_token(13);

+      jj_consume_token(9);

+                                                                                         ab.addIsAnySourceDefinition(line,s,t,bb);

+      break;

+    case 25:

+      jj_consume_token(25);

+      jj_consume_token(11);

+      t = nameref();

+      jj_consume_token(12);

+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {

+      case 21:

+        jj_consume_token(21);

+                                               bb=true;

+        break;

+      case 22:

+        jj_consume_token(22);

+                                                                    bb=false;

+        break;

+      default:

+        jj_la1[11] = jj_gen;

+        jj_consume_token(-1);

+        throw new ParseException();

+      }

+      jj_consume_token(13);

+      jj_consume_token(9);

+                                                                                         ab.addIsAnyTargetDefinition(line,s,t,bb);

+      break;

+    case 26:

+      jj_consume_token(26);

+      jj_consume_token(11);

+      t = nameref();

+      jj_consume_token(12);

+      u = nameref();

+      jj_consume_token(13);

+      jj_consume_token(9);

+                                                       ab.addInverseDefinition(line,s,t,u);

+      break;

+    case 27:

+      jj_consume_token(27);

+      jj_consume_token(11);

+      t = nameref();

+      jj_consume_token(12);

+      u = multiplicity_kind();

+      jj_consume_token(13);

+      jj_consume_token(9);

+                                                                      ab.addMultiplicityDefinition(line,s,t,u);

+      break;

+    default:

+      jj_la1[12] = jj_gen;

+      jj_consume_token(-1);

+      throw new ParseException();

+    }

+  }

+

+  static final public String multiplicity_kind() throws ParseException {

+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {

+    case 28:

+      jj_consume_token(28);

+                {if (true) return "one_to_one" ;}

+      break;

+    case 29:

+      jj_consume_token(29);

+                {if (true) return "one_to_many";}

+      break;

+    case 30:

+      jj_consume_token(30);

+                 {if (true) return "many_to_one";}

+      break;

+    case 31:

+      jj_consume_token(31);

+                  {if (true) return "many_to_many";}

+      break;

+    default:

+      jj_la1[13] = jj_gen;

+      jj_consume_token(-1);

+      throw new ParseException();

+    }

+    throw new Error("Missing return statement in function");

+  }

+

+/* Values */

+  static final public String variable() throws ParseException {

+ Token t;

+    t = jj_consume_token(VARIABLE);

+                  line = t.beginLine; {if (true) return t.toString();}

+    throw new Error("Missing return statement in function");

+  }

+

+  static final public String value() throws ParseException {

+  Token t;

+  String z;

+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {

+    case STRING:

+      t = jj_consume_token(STRING);

+                line = t.beginLine;z=t.toString();z=z.substring(1,z.length()-1);  {if (true) return z;}

+      break;

+    case OCTALINT:

+      t = jj_consume_token(OCTALINT);

+                 line = t.beginLine; {if (true) return t.toString();}

+      break;

+    case DECIMALINT:

+      t = jj_consume_token(DECIMALINT);

+                   line = t.beginLine; {if (true) return t.toString();}

+      break;

+    case HEXADECIMALINT:

+      t = jj_consume_token(HEXADECIMALINT);

+                       line = t.beginLine; {if (true) return t.toString();}

+      break;

+    case FLOATONE:

+      t = jj_consume_token(FLOATONE);

+                 line = t.beginLine; {if (true) return t.toString();}

+      break;

+    case FLOATTWO:

+      t = jj_consume_token(FLOATTWO);

+                 line = t.beginLine; {if (true) return t.toString();}

+      break;

+    default:

+      jj_la1[14] = jj_gen;

+      jj_consume_token(-1);

+      throw new ParseException();

+    }

+    throw new Error("Missing return statement in function");

+  }

+

+/* name references */

+  static final public String nameref() throws ParseException {

+ String s="";

+ Token t;

+    s = name();

+             {if (true) return s;}

+    throw new Error("Missing return statement in function");

+  }

+

+/* FQN names */

+  static final public String name() throws ParseException {

+  Token t;

+String s,z;

+    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {

+    case ANYID:

+      t = jj_consume_token(ANYID);

+      break;

+    case ID:

+      t = jj_consume_token(ID);

+      break;

+    case VARIABLE:

+      t = jj_consume_token(VARIABLE);

+      break;

+    default:

+      jj_la1[15] = jj_gen;

+      jj_consume_token(-1);

+      throw new ParseException();

+    }

+                z = t.toString();

+                line = t.beginLine;

+                if (z.charAt(0)=='\'') z=z.substring(1,z.length()-1);

+                if (z.charAt(0)=='"') z=z.substring(1,z.length()-1);

+                s=z;

+    label_4:

+    while (true) {

+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {

+      case 32:

+        ;

+        break;

+      default:

+        jj_la1[16] = jj_gen;

+        break label_4;

+      }

+      jj_consume_token(32);

+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {

+      case ID:

+        t = jj_consume_token(ID);

+        break;

+      case ANYID:

+        t = jj_consume_token(ANYID);

+        break;

+      case VARIABLE:

+        t = jj_consume_token(VARIABLE);

+        break;

+      default:

+        jj_la1[17] = jj_gen;

+        jj_consume_token(-1);

+        throw new ParseException();

+      }

+                z = t.toString();

+                line = t.beginLine;

+                if (z.charAt(0)=='\'') z=z.substring(1,z.length()-1);

+                if (z.charAt(0)=='"') z=z.substring(1,z.length()-1);

+                s=s+"."+z;

+    }

+     {if (true) return s;}

+    throw new Error("Missing return statement in function");

+  }

+

+  static private boolean jj_initialized_once = false;

+  static public VTMLParserTokenManager token_source;

+  static JavaCharStream jj_input_stream;

+  static public Token token, jj_nt;

+  static private int jj_ntk;

+  static private int jj_gen;

+  static final private int[] jj_la1 = new int[18];

+  static private int[] jj_la1_0;

+  static private int[] jj_la1_1;

+  static {

+      jj_la1_0();

+      jj_la1_1();

+   }

+   private static void jj_la1_0() {

+      jj_la1_0 = new int[] {0x400,0x100,0xf9f0000,0xf9f0000,0x0,0xf9f0000,0x4200,0x3000,0x600000,0x600000,0x600000,0x600000,0xf9f0000,0xf0000000,0x0,0x0,0x0,0x0,};

+   }

+   private static void jj_la1_1() {

+      jj_la1_1 = new int[] {0x0,0x0,0x40c0,0x40c0,0x20,0x40c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f00,0x40c0,0x1,0x40c0,};

+   }

+

+  public VTMLParser(java.io.InputStream stream) {

+    if (jj_initialized_once) {

+      System.out.println("ERROR: Second call to constructor of static parser.  You must");

+      System.out.println("       either use ReInit() or set the JavaCC option STATIC to false");

+      System.out.println("       during parser generation.");

+      throw new Error();

+    }

+    jj_initialized_once = true;

+    jj_input_stream = new JavaCharStream(stream, 1, 1);

+    token_source = new VTMLParserTokenManager(jj_input_stream);

+    token = new Token();

+    jj_ntk = -1;

+    jj_gen = 0;

+    for (int i = 0; i < 18; i++) jj_la1[i] = -1;

+  }

+

+  static public void ReInit(java.io.InputStream stream) {

+    jj_input_stream.ReInit(stream, 1, 1);

+    token_source.ReInit(jj_input_stream);

+    token = new Token();

+    jj_ntk = -1;

+    jj_gen = 0;

+    for (int i = 0; i < 18; i++) jj_la1[i] = -1;

+  }

+

+  public VTMLParser(java.io.Reader stream) {

+    if (jj_initialized_once) {

+      System.out.println("ERROR: Second call to constructor of static parser.  You must");

+      System.out.println("       either use ReInit() or set the JavaCC option STATIC to false");

+      System.out.println("       during parser generation.");

+      throw new Error();

+    }

+    jj_initialized_once = true;

+    jj_input_stream = new JavaCharStream(stream, 1, 1);

+    token_source = new VTMLParserTokenManager(jj_input_stream);

+    token = new Token();

+    jj_ntk = -1;

+    jj_gen = 0;

+    for (int i = 0; i < 18; i++) jj_la1[i] = -1;

+  }

+

+  static public void ReInit(java.io.Reader stream) {

+    jj_input_stream.ReInit(stream, 1, 1);

+    token_source.ReInit(jj_input_stream);

+    token = new Token();

+    jj_ntk = -1;

+    jj_gen = 0;

+    for (int i = 0; i < 18; i++) jj_la1[i] = -1;

+  }

+

+  public VTMLParser(VTMLParserTokenManager tm) {

+    if (jj_initialized_once) {

+      System.out.println("ERROR: Second call to constructor of static parser.  You must");

+      System.out.println("       either use ReInit() or set the JavaCC option STATIC to false");

+      System.out.println("       during parser generation.");

+      throw new Error();

+    }

+    jj_initialized_once = true;

+    token_source = tm;

+    token = new Token();

+    jj_ntk = -1;

+    jj_gen = 0;

+    for (int i = 0; i < 18; i++) jj_la1[i] = -1;

+  }

+

+  public void ReInit(VTMLParserTokenManager tm) {

+    token_source = tm;

+    token = new Token();

+    jj_ntk = -1;

+    jj_gen = 0;

+    for (int i = 0; i < 18; i++) jj_la1[i] = -1;

+  }

+

+  static final private Token jj_consume_token(int kind) throws ParseException {

+    Token oldToken;

+    if ((oldToken = token).next != null) token = token.next;

+    else token = token.next = token_source.getNextToken();

+    jj_ntk = -1;

+    if (token.kind == kind) {

+      jj_gen++;

+      return token;

+    }

+    token = oldToken;

+    jj_kind = kind;

+    throw generateParseException();

+  }

+

+  static final public Token getNextToken() {

+    if (token.next != null) token = token.next;

+    else token = token.next = token_source.getNextToken();

+    jj_ntk = -1;

+    jj_gen++;

+    return token;

+  }

+

+  static final public Token getToken(int index) {

+    Token t = token;

+    for (int i = 0; i < index; i++) {

+      if (t.next != null) t = t.next;

+      else t = t.next = token_source.getNextToken();

+    }

+    return t;

+  }

+

+  static final private int jj_ntk() {

+    if ((jj_nt=token.next) == null)

+      return (jj_ntk = (token.next=token_source.getNextToken()).kind);

+    else

+      return (jj_ntk = jj_nt.kind);

+  }

+

+  static private java.util.Vector jj_expentries = new java.util.Vector();

+  static private int[] jj_expentry;

+  static private int jj_kind = -1;

+

+  static public ParseException generateParseException() {

+    jj_expentries.removeAllElements();

+    boolean[] la1tokens = new boolean[47];

+    for (int i = 0; i < 47; i++) {

+      la1tokens[i] = false;

+    }

+    if (jj_kind >= 0) {

+      la1tokens[jj_kind] = true;

+      jj_kind = -1;

+    }

+    for (int i = 0; i < 18; i++) {

+      if (jj_la1[i] == jj_gen) {

+        for (int j = 0; j < 32; j++) {

+          if ((jj_la1_0[i] & (1<<j)) != 0) {

+            la1tokens[j] = true;

+          }

+          if ((jj_la1_1[i] & (1<<j)) != 0) {

+            la1tokens[32+j] = true;

+          }

+        }

+      }

+    }

+    for (int i = 0; i < 47; i++) {

+      if (la1tokens[i]) {

+        jj_expentry = new int[1];

+        jj_expentry[0] = i;

+        jj_expentries.addElement(jj_expentry);

+      }

+    }

+    int[][] exptokseq = new int[jj_expentries.size()][];

+    for (int i = 0; i < jj_expentries.size(); i++) {

+      exptokseq[i] = (int[])jj_expentries.elementAt(i);

+    }

+    return new ParseException(token, exptokseq, tokenImage);

+  }

+

+  static final public void enable_tracing() {

+  }

+

+  static final public void disable_tracing() {

+  }

+

+  }

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLParser.jj b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLParser.jj
new file mode 100644
index 0000000..a121e60
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLParser.jj
@@ -0,0 +1,292 @@
+

+options {

+  JAVA_UNICODE_ESCAPE = true;

+ // LOOKAHEAD = 4;

+//	DEBUG_PARSER = true;

+//	DEBUG_LOOKAHEAD = true;

+  //FORCE_LA_CHECK = true;

+}

+PARSER_BEGIN(VTMLParser)

+package org.eclipse.viatra2.imports.vtml;

+

+import org.eclipse.viatra2.logger.Logger;

+

+import java.util.*;

+import java.io.InputStream;

+import java.io.FileInputStream;

+ 

+public class VTMLParser {

+

+  

+  

+  public static final String progname = "VPM Parser Version 3.0.1";

+  

+  public VTMLParser()

+  {

+  	

+  }

+

+  static VTMLParser parser = null;

+  static org.eclipse.viatra2.logger.Logger log;

+  

+  static int line = 0;

+  static ASTBuilder ab = null;

+  

+    public void processFile(InputStream inp,ASTBuilder a, Logger l) throws Exception

+   {

+         log=l;

+         ab = a;

+       

+       

+                 if (parser==null)

+                 parser = new VTMLParser(inp);

+                 else parser.ReInit(inp);

+   

+           try {

+                 parser.specification();

+                 log.info(progname+":  Program parsed successfully.");

+                 inp.close();

+                 ab = null;

+                 log = null;

+           } catch (ParseException e) {

+                 log.error(progname+":  error parsing file. Cause: "+e.getMessage());

+                 inp.close();

+                 ab = null;

+                 log = null;

+                 throw new Exception();

+           }

+           catch (Throwable e)

+           {

+            log.error("Parser error in line: "+line);

+            log.error("Message: "+e.getMessage());

+                         log = null;

+            ab = null;

+            throw new Exception();

+           }

+                 ab = null;

+                 log = null;

+

+   }

+   public void processFile(String f,ASTBuilder a, Logger l) throws Exception

+  {

+        log=l;

+        ab = a;

+        FileInputStream inp = null;

+  try {

+  	inp = new java.io.FileInputStream(f);

+                if (parser==null)

+                parser = new VTMLParser(inp);

+                else parser.ReInit(inp);

+          } catch (java.io.FileNotFoundException e) {

+                log.error(progname+":  File " + f + " not found.");

+                ab = null;

+                return;

+  }

+          try {

+                parser.specification();

+                log.info(progname+":  Program parsed successfully.");

+                inp.close();

+                ab = null;

+                log = null;

+          } catch (ParseException e) {

+                log.error(progname+":  error parsing file. Cause: "+e.getMessage());

+                inp.close();

+                ab = null;

+                log = null;

+                throw new Exception();

+          }

+          catch (Throwable e)

+          {

+           log.error("Parser error in line: "+line);

+           log.error("Message: "+e.getMessage());

+			log = null;

+           ab = null;

+           throw new Exception();

+          }

+		ab = null;

+		log = null;

+

+  }

+  }

+

+PARSER_END(VTMLParser)

+

+

+/*

+ * Tokens to ignore in the BNF follow.

+ */

+

+SKIP :

+{

+  < " " >

+| < "\t" >

+| < "\n" >

+| < "\r" >

+| < "//" (~["\n"])* "\n" >

+| <"/*" (~["*"])* "*" (~["/"] (~["*"])* "*")* "/">

+| < "#" ([" ","\t"])* (["0"-"9"])+

+    (([" ","\t"])* "\"" (~["\""])+ "\""

+           ([" ","\t"])* (["0"-"9"])* ([" ","\t"])* (["0"-"9"])*)? "\n" >

+}

+

+/* Production 1 */

+

+void specification() :

+{String s;}

+{

+   ( namespac() )?

+   ( namespace_import() )*

+  ({s=ab.getNamespace();} definition(s) /*| asmdef()*/ )* //TODO

+}

+

+

+/* Namespace import handling... */

+

+void namespace_import():

+{String s;}

+{

+ "import" s = name() ";" {ab.addImport(line,s);}

+}

+

+/* Default namespace definition */

+

+void namespac():

+{String s;}

+{

+ "namespace" s = name() ";" {ab.setNamespace(s);}

+}

+void definition(String s) :

+{}

+{

+  	elemdef(s) |

+  	relshipdef(s) 

+}

+/* VPM element definitions */

+void elemdef(String ns) :

+{String t,u,v=null,s;}

+{

+	t = nameref() "(" ( u = name())

+	(  "," v = nameref() "," s = nameref() ")" { ab.addRelationDef(line,ns,u,t,v,s);} ";" |

+	 ")" ( <IMPLOP> v = value() )? { ab.addEntityDef(line, ns, u, t, v);} 

+	(("{" {if (ns.length()>0) ns = ns+"."+u; else ns = u;} (definition(ns))* "}")| ";"))

+}

+

+

+void relshipdef(String s):

+{String t,u;boolean bb;}

+{

+  "instanceOf" "(" t = nameref() "," u = nameref() ")" ";" {ab.addTypeDefinition(line,s,u,t);} | 

+  "typeOf" "(" t = nameref() "," u = nameref() ")" ";" {ab.addTypeDefinition(line,s,t,u);}|

+  "supertypeOf" "(" t = nameref() "," u = nameref() ")" ";" {ab.addSupertypeDefinition(line,s,t,u);}|

+  "subtypeOf" "(" t = nameref() "," u = nameref() ")" ";"{ab.addSupertypeDefinition(line,s,u,t);} |

+  "isFinalType" "(" t = nameref() "," ("true" {bb=true;} | "false" {bb=false;}) ")" ";" {ab.addIsFinalTypeDefinition(line,s,t,bb);} |

+  "isAggregation" "(" t = nameref() "," ("true" {bb=true;} | "false" {bb=false;}) ")" ";" {ab.addIsAggregationDefinition(line,s,t,bb);}  |

+  "isAnySource" "(" t = nameref() "," ("true" {bb=true;} | "false" {bb=false;}) ")" ";" {ab.addIsAnySourceDefinition(line,s,t,bb);}  |

+  "isAnyTarget" "(" t = nameref() "," ("true" {bb=true;} | "false" {bb=false;}) ")" ";" {ab.addIsAnyTargetDefinition(line,s,t,bb);}   |

+  "inverse" "(" t = nameref() "," u=nameref() ")" ";" {ab.addInverseDefinition(line,s,t,u);}   |

+  "multiplicity" "(" t = nameref() "," u=multiplicity_kind() ")" ";" {ab.addMultiplicityDefinition(line,s,t,u);}   

+}

+

+String multiplicity_kind():

+{

+}

+{

+ "one_to_one" { return "one_to_one" ;}|

+ "one_to_many"{ return "one_to_many";} |

+ "many_to_one" { return "many_to_one";}|

+ "many_to_many" { return "many_to_many";}

+ 

+}

+

+ 

+/* Values */

+String variable():

+{

+ Token t;

+ }

+{

+ t = <VARIABLE> { line = t.beginLine; return t.toString();}

+}

+String value():

+{ Token t;

+  String z;

+}

+{

+ t = <STRING> { line = t.beginLine;z=t.toString();z=z.substring(1,z.length()-1);  return z;} |

+ t = <OCTALINT> {line = t.beginLine; return t.toString();} |

+ t = <DECIMALINT> {line = t.beginLine; return t.toString();} |

+ t = <HEXADECIMALINT> {line = t.beginLine; return t.toString();} |

+ t = <FLOATONE> {line = t.beginLine; return t.toString();} |

+ t = <FLOATTWO> {line = t.beginLine; return t.toString();} 

+}

+

+/* name references */

+

+String nameref():

+{ 

+ String s="";

+ Token t;

+ }

+{

+ s = name() {return s;}//|

+ //t = <VARIABLE> ("." s = nameref() { s="."+s;})?{return t.toString()+s;}

+}

+

+/* FQN names */

+

+String name():

+{ Token t; 

+String s,z;}

+{

+ (t = <ANYID> | t = <ID> | t = <VARIABLE>) 

+ 	{

+		z = t.toString();

+		line = t.beginLine;

+ 		if (z.charAt(0)=='\'') z=z.substring(1,z.length()-1); 

+ 		if (z.charAt(0)=='"') z=z.substring(1,z.length()-1);	

+ 		s=z;

+ 	} 

+ ( "." (t = <ID> | t = <ANYID> | t = <VARIABLE>) 

+ 	{

+ 		z = t.toString();

+		line = t.beginLine;

+ 		if (z.charAt(0)=='\'') z=z.substring(1,z.length()-1);

+ 		if (z.charAt(0)=='"') z=z.substring(1,z.length()-1);

+ 		s=s+"."+z;

+ 	}

+ )* {return s;} 

+}

+

+TOKEN :

+{ 

+ <	ALL : "all"> |

+ < EXISTS : "exists"> |

+ < ANDOP : "&&"> |

+ < OROP : "||"> |

+ < IMPLOP : "->"> |

+  <  ID : ["a"-"z"] (["a"-"z","A"-"Z","0"-"9","_"])* >

+

+

+| <  VARIABLE : ["A"-"Z"] (["a"-"z","A"-"Z","0"-"9","_"])* >

+| <  OCTALINT : "0" (["0"-"7"])* (["u","U","l","L"])? >

+| <  DECIMALINT : ["1"-"9"] (["0"-"9"])* (["u","U","l","L"])? >

+| <  HEXADECIMALINT : ("0x"|"0X") (["0"-"9","a"-"f","A"-"F"])+ (["u","U","l","L"])? >

+| <  FLOATONE : ((["0"-"9"])+ "." (["0"-"9"])* | (["0"-"9"])* "." (["0"-"9"])+)

+   (["e","E"] (["-","+"])? (["0"-"9"])+)? (["f","F","l","L"])? >

+| <  FLOATTWO : (["0"-"9"])+ ["e","E"] (["-","+"])?

+   (["0"-"9"])+  (["f","F","l","L"])? >

+

+| <  STRING : "\""

+      (   (~["\"","\\","\n","\r"])

+        | ("\\"

+            ( ["n","t","b","r","f","\\","'","\""]

+            | ["0"-"7"] ( ["0"-"7"] )?

+            | ["0"-"3"] ["0"-"7"] ["0"-"7"]

+            )

+          )

+      )*

+      "\""

+ >

+//| <  ANYID : "'" ((["a"-"z","A"-"Z"]) | (["0"-"9"])| (["+"," ","_","-","\"","~"]))*  "'" >   

+| <  ANYID : "'" (~["'"])*  "'" >   

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLParserConstants.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLParserConstants.java
new file mode 100644
index 0000000..614b0cf
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLParserConstants.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+public interface VTMLParserConstants {

+

+  int EOF = 0;

+  int ALL = 33;

+  int EXISTS = 34;

+  int ANDOP = 35;

+  int OROP = 36;

+  int IMPLOP = 37;

+  int ID = 38;

+  int VARIABLE = 39;

+  int OCTALINT = 40;

+  int DECIMALINT = 41;

+  int HEXADECIMALINT = 42;

+  int FLOATONE = 43;

+  int FLOATTWO = 44;

+  int STRING = 45;

+  int ANYID = 46;

+

+  int DEFAULT = 0;

+

+  String[] tokenImage = {

+    "<EOF>",

+    "\" \"",

+    "\"\\t\"",

+    "\"\\n\"",

+    "\"\\r\"",

+    "<token of kind 5>",

+    "<token of kind 6>",

+    "<token of kind 7>",

+    "\"import\"",

+    "\";\"",

+    "\"namespace\"",

+    "\"(\"",

+    "\",\"",

+    "\")\"",

+    "\"{\"",

+    "\"}\"",

+    "\"instanceOf\"",

+    "\"typeOf\"",

+    "\"supertypeOf\"",

+    "\"subtypeOf\"",

+    "\"isFinalType\"",

+    "\"true\"",

+    "\"false\"",

+    "\"isAggregation\"",

+    "\"isAnySource\"",

+    "\"isAnyTarget\"",

+    "\"inverse\"",

+    "\"multiplicity\"",

+    "\"one_to_one\"",

+    "\"one_to_many\"",

+    "\"many_to_one\"",

+    "\"many_to_many\"",

+    "\".\"",

+    "\"all\"",

+    "\"exists\"",

+    "\"&&\"",

+    "\"||\"",

+    "\"->\"",

+    "<ID>",

+    "<VARIABLE>",

+    "<OCTALINT>",

+    "<DECIMALINT>",

+    "<HEXADECIMALINT>",

+    "<FLOATONE>",

+    "<FLOATTWO>",

+    "<STRING>",

+    "<ANYID>",

+  };

+

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLParserTokenManager.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLParserTokenManager.java
new file mode 100644
index 0000000..6a6c8ae
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VTMLParserTokenManager.java
@@ -0,0 +1,1320 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+public class VTMLParserTokenManager implements VTMLParserConstants

+{

+  public static  java.io.PrintStream debugStream = System.out;

+  public static  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }

+private static final int jjStopStringLiteralDfa_0(int pos, long active0)

+{

+   switch (pos)

+   {

+      case 0:

+         if ((active0 & 0x100000000L) != 0L)

+            return 23;

+         if ((active0 & 0x6ffff0500L) != 0L)

+         {

+            jjmatchedKind = 38;

+            return 13;

+         }

+         return -1;

+      case 1:

+         if ((active0 & 0x6ffff0500L) != 0L)

+         {

+            jjmatchedKind = 38;

+            jjmatchedPos = 1;

+            return 13;

+         }

+         return -1;

+      case 2:

+         if ((active0 & 0x4ffff0500L) != 0L)

+         {

+            jjmatchedKind = 38;

+            jjmatchedPos = 2;

+            return 13;

+         }

+         if ((active0 & 0x200000000L) != 0L)

+            return 13;

+         return -1;

+      case 3:

+         if ((active0 & 0x4ffdf0500L) != 0L)

+         {

+            jjmatchedKind = 38;

+            jjmatchedPos = 3;

+            return 13;

+         }

+         if ((active0 & 0x200000L) != 0L)

+            return 13;

+         return -1;

+      case 4:

+         if ((active0 & 0x400000L) != 0L)

+            return 13;

+         if ((active0 & 0x4ff9f0500L) != 0L)

+         {

+            jjmatchedKind = 38;

+            jjmatchedPos = 4;

+            return 13;

+         }

+         return -1;

+      case 5:

+         if ((active0 & 0xff9d0400L) != 0L)

+         {

+            jjmatchedKind = 38;

+            jjmatchedPos = 5;

+            return 13;

+         }

+         if ((active0 & 0x400020100L) != 0L)

+            return 13;

+         return -1;

+      case 6:

+         if ((active0 & 0xfb9d0400L) != 0L)

+         {

+            jjmatchedKind = 38;

+            jjmatchedPos = 6;

+            return 13;

+         }

+         if ((active0 & 0x4000000L) != 0L)

+            return 13;

+         return -1;

+      case 7:

+         if ((active0 & 0xfb9d0400L) != 0L)

+         {

+            jjmatchedKind = 38;

+            jjmatchedPos = 7;

+            return 13;

+         }

+         return -1;

+      case 8:

+         if ((active0 & 0xfb950000L) != 0L)

+         {

+            jjmatchedKind = 38;

+            jjmatchedPos = 8;

+            return 13;

+         }

+         if ((active0 & 0x80400L) != 0L)

+            return 13;

+         return -1;

+      case 9:

+         if ((active0 & 0xeb940000L) != 0L)

+         {

+            jjmatchedKind = 38;

+            jjmatchedPos = 9;

+            return 13;

+         }

+         if ((active0 & 0x10010000L) != 0L)

+            return 13;

+         return -1;

+      case 10:

+         if ((active0 & 0x63140000L) != 0L)

+            return 13;

+         if ((active0 & 0x88800000L) != 0L)

+         {

+            jjmatchedKind = 38;

+            jjmatchedPos = 10;

+            return 13;

+         }

+         return -1;

+      case 11:

+         if ((active0 & 0x800000L) != 0L)

+         {

+            jjmatchedKind = 38;

+            jjmatchedPos = 11;

+            return 13;

+         }

+         if ((active0 & 0x88000000L) != 0L)

+            return 13;

+         return -1;

+      default :

+         return -1;

+   }

+}

+private static final int jjStartNfa_0(int pos, long active0)

+{

+   return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);

+}

+static private final int jjStopAtPos(int pos, int kind)

+{

+   jjmatchedKind = kind;

+   jjmatchedPos = pos;

+   return pos + 1;

+}

+static private final int jjStartNfaWithStates_0(int pos, int kind, int state)

+{

+   jjmatchedKind = kind;

+   jjmatchedPos = pos;

+   try { curChar = input_stream.readChar(); }

+   catch(java.io.IOException e) { return pos + 1; }

+   return jjMoveNfa_0(state, pos + 1);

+}

+static private final int jjMoveStringLiteralDfa0_0()

+{

+   switch(curChar)

+   {

+      case 38:

+         return jjMoveStringLiteralDfa1_0(0x800000000L);

+      case 40:

+         return jjStopAtPos(0, 11);

+      case 41:

+         return jjStopAtPos(0, 13);

+      case 44:

+         return jjStopAtPos(0, 12);

+      case 45:

+         return jjMoveStringLiteralDfa1_0(0x2000000000L);

+      case 46:

+         return jjStartNfaWithStates_0(0, 32, 23);

+      case 59:

+         return jjStopAtPos(0, 9);

+      case 97:

+         return jjMoveStringLiteralDfa1_0(0x200000000L);

+      case 101:

+         return jjMoveStringLiteralDfa1_0(0x400000000L);

+      case 102:

+         return jjMoveStringLiteralDfa1_0(0x400000L);

+      case 105:

+         return jjMoveStringLiteralDfa1_0(0x7910100L);

+      case 109:

+         return jjMoveStringLiteralDfa1_0(0xc8000000L);

+      case 110:

+         return jjMoveStringLiteralDfa1_0(0x400L);

+      case 111:

+         return jjMoveStringLiteralDfa1_0(0x30000000L);

+      case 115:

+         return jjMoveStringLiteralDfa1_0(0xc0000L);

+      case 116:

+         return jjMoveStringLiteralDfa1_0(0x220000L);

+      case 123:

+         return jjStopAtPos(0, 14);

+      case 124:

+         return jjMoveStringLiteralDfa1_0(0x1000000000L);

+      case 125:

+         return jjStopAtPos(0, 15);

+      default :

+         return jjMoveNfa_0(0, 0);

+   }

+}

+static private final int jjMoveStringLiteralDfa1_0(long active0)

+{

+   try { curChar = input_stream.readChar(); }

+   catch(java.io.IOException e) {

+      jjStopStringLiteralDfa_0(0, active0);

+      return 1;

+   }

+   switch(curChar)

+   {

+      case 38:

+         if ((active0 & 0x800000000L) != 0L)

+            return jjStopAtPos(1, 35);

+         break;

+      case 62:

+         if ((active0 & 0x2000000000L) != 0L)

+            return jjStopAtPos(1, 37);

+         break;

+      case 97:

+         return jjMoveStringLiteralDfa2_0(active0, 0xc0400400L);

+      case 108:

+         return jjMoveStringLiteralDfa2_0(active0, 0x200000000L);

+      case 109:

+         return jjMoveStringLiteralDfa2_0(active0, 0x100L);

+      case 110:

+         return jjMoveStringLiteralDfa2_0(active0, 0x34010000L);

+      case 114:

+         return jjMoveStringLiteralDfa2_0(active0, 0x200000L);

+      case 115:

+         return jjMoveStringLiteralDfa2_0(active0, 0x3900000L);

+      case 117:

+         return jjMoveStringLiteralDfa2_0(active0, 0x80c0000L);

+      case 120:

+         return jjMoveStringLiteralDfa2_0(active0, 0x400000000L);

+      case 121:

+         return jjMoveStringLiteralDfa2_0(active0, 0x20000L);

+      case 124:

+         if ((active0 & 0x1000000000L) != 0L)

+            return jjStopAtPos(1, 36);

+         break;

+      default :

+         break;

+   }

+   return jjStartNfa_0(0, active0);

+}

+static private final int jjMoveStringLiteralDfa2_0(long old0, long active0)

+{

+   if (((active0 &= old0)) == 0L)

+      return jjStartNfa_0(0, old0); 

+   try { curChar = input_stream.readChar(); }

+   catch(java.io.IOException e) {

+      jjStopStringLiteralDfa_0(1, active0);

+      return 2;

+   }

+   switch(curChar)

+   {

+      case 65:

+         return jjMoveStringLiteralDfa3_0(active0, 0x3800000L);

+      case 70:

+         return jjMoveStringLiteralDfa3_0(active0, 0x100000L);

+      case 98:

+         return jjMoveStringLiteralDfa3_0(active0, 0x80000L);

+      case 101:

+         return jjMoveStringLiteralDfa3_0(active0, 0x30000000L);

+      case 105:

+         return jjMoveStringLiteralDfa3_0(active0, 0x400000000L);

+      case 108:

+         if ((active0 & 0x200000000L) != 0L)

+            return jjStartNfaWithStates_0(2, 33, 13);

+         return jjMoveStringLiteralDfa3_0(active0, 0x8400000L);

+      case 109:

+         return jjMoveStringLiteralDfa3_0(active0, 0x400L);

+      case 110:

+         return jjMoveStringLiteralDfa3_0(active0, 0xc0000000L);

+      case 112:

+         return jjMoveStringLiteralDfa3_0(active0, 0x60100L);

+      case 115:

+         return jjMoveStringLiteralDfa3_0(active0, 0x10000L);

+      case 117:

+         return jjMoveStringLiteralDfa3_0(active0, 0x200000L);

+      case 118:

+         return jjMoveStringLiteralDfa3_0(active0, 0x4000000L);

+      default :

+         break;

+   }

+   return jjStartNfa_0(1, active0);

+}

+static private final int jjMoveStringLiteralDfa3_0(long old0, long active0)

+{

+   if (((active0 &= old0)) == 0L)

+      return jjStartNfa_0(1, old0); 

+   try { curChar = input_stream.readChar(); }

+   catch(java.io.IOException e) {

+      jjStopStringLiteralDfa_0(2, active0);

+      return 3;

+   }

+   switch(curChar)

+   {

+      case 95:

+         return jjMoveStringLiteralDfa4_0(active0, 0x30000000L);

+      case 101:

+         if ((active0 & 0x200000L) != 0L)

+            return jjStartNfaWithStates_0(3, 21, 13);

+         return jjMoveStringLiteralDfa4_0(active0, 0x4060400L);

+      case 103:

+         return jjMoveStringLiteralDfa4_0(active0, 0x800000L);

+      case 105:

+         return jjMoveStringLiteralDfa4_0(active0, 0x100000L);

+      case 110:

+         return jjMoveStringLiteralDfa4_0(active0, 0x3000000L);

+      case 111:

+         return jjMoveStringLiteralDfa4_0(active0, 0x100L);

+      case 115:

+         return jjMoveStringLiteralDfa4_0(active0, 0x400400000L);

+      case 116:

+         return jjMoveStringLiteralDfa4_0(active0, 0x8090000L);

+      case 121:

+         return jjMoveStringLiteralDfa4_0(active0, 0xc0000000L);

+      default :

+         break;

+   }

+   return jjStartNfa_0(2, active0);

+}

+static private final int jjMoveStringLiteralDfa4_0(long old0, long active0)

+{

+   if (((active0 &= old0)) == 0L)

+      return jjStartNfa_0(2, old0); 

+   try { curChar = input_stream.readChar(); }

+   catch(java.io.IOException e) {

+      jjStopStringLiteralDfa_0(3, active0);

+      return 4;

+   }

+   switch(curChar)

+   {

+      case 79:

+         return jjMoveStringLiteralDfa5_0(active0, 0x20000L);

+      case 95:

+         return jjMoveStringLiteralDfa5_0(active0, 0xc0000000L);

+      case 97:

+         return jjMoveStringLiteralDfa5_0(active0, 0x10000L);

+      case 101:

+         if ((active0 & 0x400000L) != 0L)

+            return jjStartNfaWithStates_0(4, 22, 13);

+         break;

+      case 103:

+         return jjMoveStringLiteralDfa5_0(active0, 0x800000L);

+      case 105:

+         return jjMoveStringLiteralDfa5_0(active0, 0x8000000L);

+      case 110:

+         return jjMoveStringLiteralDfa5_0(active0, 0x100000L);

+      case 114:

+         return jjMoveStringLiteralDfa5_0(active0, 0x4040100L);

+      case 115:

+         return jjMoveStringLiteralDfa5_0(active0, 0x400L);

+      case 116:

+         return jjMoveStringLiteralDfa5_0(active0, 0x430000000L);

+      case 121:

+         return jjMoveStringLiteralDfa5_0(active0, 0x3080000L);

+      default :

+         break;

+   }

+   return jjStartNfa_0(3, active0);

+}

+static private final int jjMoveStringLiteralDfa5_0(long old0, long active0)

+{

+   if (((active0 &= old0)) == 0L)

+      return jjStartNfa_0(3, old0); 

+   try { curChar = input_stream.readChar(); }

+   catch(java.io.IOException e) {

+      jjStopStringLiteralDfa_0(4, active0);

+      return 5;

+   }

+   switch(curChar)

+   {

+      case 83:

+         return jjMoveStringLiteralDfa6_0(active0, 0x1000000L);

+      case 84:

+         return jjMoveStringLiteralDfa6_0(active0, 0x2000000L);

+      case 97:

+         return jjMoveStringLiteralDfa6_0(active0, 0x100000L);

+      case 102:

+         if ((active0 & 0x20000L) != 0L)

+            return jjStartNfaWithStates_0(5, 17, 13);

+         break;

+      case 110:

+         return jjMoveStringLiteralDfa6_0(active0, 0x10000L);

+      case 111:

+         return jjMoveStringLiteralDfa6_0(active0, 0x30000000L);

+      case 112:

+         return jjMoveStringLiteralDfa6_0(active0, 0x8080400L);

+      case 114:

+         return jjMoveStringLiteralDfa6_0(active0, 0x800000L);

+      case 115:

+         if ((active0 & 0x400000000L) != 0L)

+            return jjStartNfaWithStates_0(5, 34, 13);

+         return jjMoveStringLiteralDfa6_0(active0, 0x4000000L);

+      case 116:

+         if ((active0 & 0x100L) != 0L)

+            return jjStartNfaWithStates_0(5, 8, 13);

+         return jjMoveStringLiteralDfa6_0(active0, 0xc0040000L);

+      default :

+         break;

+   }

+   return jjStartNfa_0(4, active0);

+}

+static private final int jjMoveStringLiteralDfa6_0(long old0, long active0)

+{

+   if (((active0 &= old0)) == 0L)

+      return jjStartNfa_0(4, old0); 

+   try { curChar = input_stream.readChar(); }

+   catch(java.io.IOException e) {

+      jjStopStringLiteralDfa_0(5, active0);

+      return 6;

+   }

+   switch(curChar)

+   {

+      case 95:

+         return jjMoveStringLiteralDfa7_0(active0, 0x30000000L);

+      case 97:

+         return jjMoveStringLiteralDfa7_0(active0, 0x2000400L);

+      case 99:

+         return jjMoveStringLiteralDfa7_0(active0, 0x10000L);

+      case 101:

+         if ((active0 & 0x4000000L) != 0L)

+            return jjStartNfaWithStates_0(6, 26, 13);

+         return jjMoveStringLiteralDfa7_0(active0, 0x880000L);

+      case 108:

+         return jjMoveStringLiteralDfa7_0(active0, 0x8100000L);

+      case 111:

+         return jjMoveStringLiteralDfa7_0(active0, 0xc1000000L);

+      case 121:

+         return jjMoveStringLiteralDfa7_0(active0, 0x40000L);

+      default :

+         break;

+   }

+   return jjStartNfa_0(5, active0);

+}

+static private final int jjMoveStringLiteralDfa7_0(long old0, long active0)

+{

+   if (((active0 &= old0)) == 0L)

+      return jjStartNfa_0(5, old0); 

+   try { curChar = input_stream.readChar(); }

+   catch(java.io.IOException e) {

+      jjStopStringLiteralDfa_0(6, active0);

+      return 7;

+   }

+   switch(curChar)

+   {

+      case 79:

+         return jjMoveStringLiteralDfa8_0(active0, 0x80000L);

+      case 84:

+         return jjMoveStringLiteralDfa8_0(active0, 0x100000L);

+      case 95:

+         return jjMoveStringLiteralDfa8_0(active0, 0xc0000000L);

+      case 99:

+         return jjMoveStringLiteralDfa8_0(active0, 0x400L);

+      case 101:

+         return jjMoveStringLiteralDfa8_0(active0, 0x10000L);

+      case 103:

+         return jjMoveStringLiteralDfa8_0(active0, 0x800000L);

+      case 105:

+         return jjMoveStringLiteralDfa8_0(active0, 0x8000000L);

+      case 109:

+         return jjMoveStringLiteralDfa8_0(active0, 0x20000000L);

+      case 111:

+         return jjMoveStringLiteralDfa8_0(active0, 0x10000000L);

+      case 112:

+         return jjMoveStringLiteralDfa8_0(active0, 0x40000L);

+      case 114:

+         return jjMoveStringLiteralDfa8_0(active0, 0x2000000L);

+      case 117:

+         return jjMoveStringLiteralDfa8_0(active0, 0x1000000L);

+      default :

+         break;

+   }

+   return jjStartNfa_0(6, active0);

+}

+static private final int jjMoveStringLiteralDfa8_0(long old0, long active0)

+{

+   if (((active0 &= old0)) == 0L)

+      return jjStartNfa_0(6, old0); 

+   try { curChar = input_stream.readChar(); }

+   catch(java.io.IOException e) {

+      jjStopStringLiteralDfa_0(7, active0);

+      return 8;

+   }

+   switch(curChar)

+   {

+      case 79:

+         return jjMoveStringLiteralDfa9_0(active0, 0x10000L);

+      case 97:

+         return jjMoveStringLiteralDfa9_0(active0, 0x20800000L);

+      case 99:

+         return jjMoveStringLiteralDfa9_0(active0, 0x8000000L);

+      case 101:

+         if ((active0 & 0x400L) != 0L)

+            return jjStartNfaWithStates_0(8, 10, 13);

+         return jjMoveStringLiteralDfa9_0(active0, 0x40000L);

+      case 102:

+         if ((active0 & 0x80000L) != 0L)

+            return jjStartNfaWithStates_0(8, 19, 13);

+         break;

+      case 103:

+         return jjMoveStringLiteralDfa9_0(active0, 0x2000000L);

+      case 109:

+         return jjMoveStringLiteralDfa9_0(active0, 0x80000000L);

+      case 110:

+         return jjMoveStringLiteralDfa9_0(active0, 0x10000000L);

+      case 111:

+         return jjMoveStringLiteralDfa9_0(active0, 0x40000000L);

+      case 114:

+         return jjMoveStringLiteralDfa9_0(active0, 0x1000000L);

+      case 121:

+         return jjMoveStringLiteralDfa9_0(active0, 0x100000L);

+      default :

+         break;

+   }

+   return jjStartNfa_0(7, active0);

+}

+static private final int jjMoveStringLiteralDfa9_0(long old0, long active0)

+{

+   if (((active0 &= old0)) == 0L)

+      return jjStartNfa_0(7, old0); 

+   try { curChar = input_stream.readChar(); }

+   catch(java.io.IOException e) {

+      jjStopStringLiteralDfa_0(8, active0);

+      return 9;

+   }

+   switch(curChar)

+   {

+      case 79:

+         return jjMoveStringLiteralDfa10_0(active0, 0x40000L);

+      case 97:

+         return jjMoveStringLiteralDfa10_0(active0, 0x80000000L);

+      case 99:

+         return jjMoveStringLiteralDfa10_0(active0, 0x1000000L);

+      case 101:

+         if ((active0 & 0x10000000L) != 0L)

+            return jjStartNfaWithStates_0(9, 28, 13);

+         return jjMoveStringLiteralDfa10_0(active0, 0x2000000L);

+      case 102:

+         if ((active0 & 0x10000L) != 0L)

+            return jjStartNfaWithStates_0(9, 16, 13);

+         break;

+      case 105:

+         return jjMoveStringLiteralDfa10_0(active0, 0x8000000L);

+      case 110:

+         return jjMoveStringLiteralDfa10_0(active0, 0x60000000L);

+      case 112:

+         return jjMoveStringLiteralDfa10_0(active0, 0x100000L);

+      case 116:

+         return jjMoveStringLiteralDfa10_0(active0, 0x800000L);

+      default :

+         break;

+   }

+   return jjStartNfa_0(8, active0);

+}

+static private final int jjMoveStringLiteralDfa10_0(long old0, long active0)

+{

+   if (((active0 &= old0)) == 0L)

+      return jjStartNfa_0(8, old0); 

+   try { curChar = input_stream.readChar(); }

+   catch(java.io.IOException e) {

+      jjStopStringLiteralDfa_0(9, active0);

+      return 10;

+   }

+   switch(curChar)

+   {

+      case 101:

+         if ((active0 & 0x100000L) != 0L)

+            return jjStartNfaWithStates_0(10, 20, 13);

+         else if ((active0 & 0x1000000L) != 0L)

+            return jjStartNfaWithStates_0(10, 24, 13);

+         else if ((active0 & 0x40000000L) != 0L)

+            return jjStartNfaWithStates_0(10, 30, 13);

+         break;

+      case 102:

+         if ((active0 & 0x40000L) != 0L)

+            return jjStartNfaWithStates_0(10, 18, 13);

+         break;

+      case 105:

+         return jjMoveStringLiteralDfa11_0(active0, 0x800000L);

+      case 110:

+         return jjMoveStringLiteralDfa11_0(active0, 0x80000000L);

+      case 116:

+         if ((active0 & 0x2000000L) != 0L)

+            return jjStartNfaWithStates_0(10, 25, 13);

+         return jjMoveStringLiteralDfa11_0(active0, 0x8000000L);

+      case 121:

+         if ((active0 & 0x20000000L) != 0L)

+            return jjStartNfaWithStates_0(10, 29, 13);

+         break;

+      default :

+         break;

+   }

+   return jjStartNfa_0(9, active0);

+}

+static private final int jjMoveStringLiteralDfa11_0(long old0, long active0)

+{

+   if (((active0 &= old0)) == 0L)

+      return jjStartNfa_0(9, old0); 

+   try { curChar = input_stream.readChar(); }

+   catch(java.io.IOException e) {

+      jjStopStringLiteralDfa_0(10, active0);

+      return 11;

+   }

+   switch(curChar)

+   {

+      case 111:

+         return jjMoveStringLiteralDfa12_0(active0, 0x800000L);

+      case 121:

+         if ((active0 & 0x8000000L) != 0L)

+            return jjStartNfaWithStates_0(11, 27, 13);

+         else if ((active0 & 0x80000000L) != 0L)

+            return jjStartNfaWithStates_0(11, 31, 13);

+         break;

+      default :

+         break;

+   }

+   return jjStartNfa_0(10, active0);

+}

+static private final int jjMoveStringLiteralDfa12_0(long old0, long active0)

+{

+   if (((active0 &= old0)) == 0L)

+      return jjStartNfa_0(10, old0); 

+   try { curChar = input_stream.readChar(); }

+   catch(java.io.IOException e) {

+      jjStopStringLiteralDfa_0(11, active0);

+      return 12;

+   }

+   switch(curChar)

+   {

+      case 110:

+         if ((active0 & 0x800000L) != 0L)

+            return jjStartNfaWithStates_0(12, 23, 13);

+         break;

+      default :

+         break;

+   }

+   return jjStartNfa_0(11, active0);

+}

+static private final void jjCheckNAdd(int state)

+{

+   if (jjrounds[state] != jjround)

+   {

+      jjstateSet[jjnewStateCnt++] = state;

+      jjrounds[state] = jjround;

+   }

+}

+static private final void jjAddStates(int start, int end)

+{

+   do {

+      jjstateSet[jjnewStateCnt++] = jjnextStates[start];

+   } while (start++ != end);

+}

+static private final void jjCheckNAddTwoStates(int state1, int state2)

+{

+   jjCheckNAdd(state1);

+   jjCheckNAdd(state2);

+}

+static private final void jjCheckNAddStates(int start, int end)

+{

+   do {

+      jjCheckNAdd(jjnextStates[start]);

+   } while (start++ != end);

+}

+static private final void jjCheckNAddStates(int start)

+{

+   jjCheckNAdd(jjnextStates[start]);

+   jjCheckNAdd(jjnextStates[start + 1]);

+}

+static final long[] jjbitVec0 = {

+   0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL

+};

+static final long[] jjbitVec2 = {

+   0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL

+};

+static private final int jjMoveNfa_0(int startState, int curPos)

+{

+   int[] nextStates;

+   int startsAt = 0;

+   jjnewStateCnt = 65;

+   int i = 1;

+   jjstateSet[0] = startState;

+   int j, kind = 0x7fffffff;

+   for (;;)

+   {

+      if (++jjround == 0x7fffffff)

+         ReInitRounds();

+      if (curChar < 64)

+      {

+         long l = 1L << curChar;

+         MatchLoop: do

+         {

+            switch(jjstateSet[--i])

+            {

+               case 0:

+                  if ((0x3ff000000000000L & l) != 0L)

+                     jjCheckNAddStates(0, 5);

+                  else if (curChar == 47)

+                     jjAddStates(6, 7);

+                  else if (curChar == 39)

+                     jjCheckNAddTwoStates(38, 39);

+                  else if (curChar == 34)

+                     jjCheckNAddStates(8, 10);

+                  else if (curChar == 46)

+                     jjCheckNAdd(23);

+                  else if (curChar == 35)

+                     jjCheckNAddTwoStates(1, 2);

+                  if ((0x3fe000000000000L & l) != 0L)

+                  {

+                     if (kind > 41)

+                        kind = 41;

+                     jjCheckNAddTwoStates(20, 21);

+                  }

+                  else if (curChar == 48)

+                     jjAddStates(11, 12);

+                  if (curChar == 48)

+                  {

+                     if (kind > 40)

+                        kind = 40;

+                     jjCheckNAddTwoStates(17, 18);

+                  }

+                  break;

+               case 1:

+                  if ((0x100000200L & l) != 0L)

+                     jjCheckNAddTwoStates(1, 2);

+                  break;

+               case 2:

+                  if ((0x3ff000000000000L & l) != 0L)

+                     jjCheckNAddStates(13, 16);

+                  break;

+               case 3:

+                  if ((0x100000200L & l) != 0L)

+                     jjCheckNAddTwoStates(3, 4);

+                  break;

+               case 4:

+                  if (curChar == 34)

+                     jjCheckNAdd(5);

+                  break;

+               case 5:

+                  if ((0xfffffffbffffffffL & l) != 0L)

+                     jjCheckNAddTwoStates(5, 6);

+                  break;

+               case 6:

+                  if (curChar == 34)

+                     jjCheckNAddStates(17, 19);

+                  break;

+               case 7:

+                  if (curChar == 10 && kind > 7)

+                     kind = 7;

+                  break;

+               case 8:

+                  if ((0x3ff000000000000L & l) != 0L)

+                     jjCheckNAddStates(20, 23);

+                  break;

+               case 9:

+                  if ((0x100000200L & l) != 0L)

+                     jjCheckNAddStates(24, 26);

+                  break;

+               case 10:

+                  if ((0x3ff000000000000L & l) != 0L)

+                     jjCheckNAddTwoStates(10, 7);

+                  break;

+               case 11:

+                  if ((0x100000200L & l) != 0L)

+                     jjCheckNAddStates(27, 31);

+                  break;

+               case 13:

+                  if ((0x3ff000000000000L & l) == 0L)

+                     break;

+                  if (kind > 38)

+                     kind = 38;

+                  jjstateSet[jjnewStateCnt++] = 13;

+                  break;

+               case 15:

+                  if ((0x3ff000000000000L & l) == 0L)

+                     break;

+                  if (kind > 39)

+                     kind = 39;

+                  jjstateSet[jjnewStateCnt++] = 15;

+                  break;

+               case 16:

+                  if (curChar != 48)

+                     break;

+                  if (kind > 40)

+                     kind = 40;

+                  jjCheckNAddTwoStates(17, 18);

+                  break;

+               case 17:

+                  if ((0xff000000000000L & l) == 0L)

+                     break;

+                  if (kind > 40)

+                     kind = 40;

+                  jjCheckNAddTwoStates(17, 18);

+                  break;

+               case 19:

+                  if ((0x3fe000000000000L & l) == 0L)

+                     break;

+                  if (kind > 41)

+                     kind = 41;

+                  jjCheckNAddTwoStates(20, 21);

+                  break;

+               case 20:

+                  if ((0x3ff000000000000L & l) == 0L)

+                     break;

+                  if (kind > 41)

+                     kind = 41;

+                  jjCheckNAddTwoStates(20, 21);

+                  break;

+               case 22:

+                  if (curChar == 46)

+                     jjCheckNAdd(23);

+                  break;

+               case 23:

+                  if ((0x3ff000000000000L & l) == 0L)

+                     break;

+                  if (kind > 43)

+                     kind = 43;

+                  jjCheckNAddStates(32, 34);

+                  break;

+               case 25:

+                  if ((0x280000000000L & l) != 0L)

+                     jjCheckNAdd(26);

+                  break;

+               case 26:

+                  if ((0x3ff000000000000L & l) == 0L)

+                     break;

+                  if (kind > 43)

+                     kind = 43;

+                  jjCheckNAddTwoStates(26, 27);

+                  break;

+               case 28:

+                  if (curChar == 34)

+                     jjCheckNAddStates(8, 10);

+                  break;

+               case 29:

+                  if ((0xfffffffbffffdbffL & l) != 0L)

+                     jjCheckNAddStates(8, 10);

+                  break;

+               case 31:

+                  if ((0x8400000000L & l) != 0L)

+                     jjCheckNAddStates(8, 10);

+                  break;

+               case 32:

+                  if (curChar == 34 && kind > 45)

+                     kind = 45;

+                  break;

+               case 33:

+                  if ((0xff000000000000L & l) != 0L)

+                     jjCheckNAddStates(35, 38);

+                  break;

+               case 34:

+                  if ((0xff000000000000L & l) != 0L)

+                     jjCheckNAddStates(8, 10);

+                  break;

+               case 35:

+                  if ((0xf000000000000L & l) != 0L)

+                     jjstateSet[jjnewStateCnt++] = 36;

+                  break;

+               case 36:

+                  if ((0xff000000000000L & l) != 0L)

+                     jjCheckNAdd(34);

+                  break;

+               case 37:

+                  if (curChar == 39)

+                     jjCheckNAddTwoStates(38, 39);

+                  break;

+               case 38:

+                  if ((0xffffff7fffffffffL & l) != 0L)

+                     jjCheckNAddTwoStates(38, 39);

+                  break;

+               case 39:

+                  if (curChar == 39 && kind > 46)

+                     kind = 46;

+                  break;

+               case 40:

+                  if (curChar == 48)

+                     jjAddStates(11, 12);

+                  break;

+               case 42:

+                  if ((0x3ff000000000000L & l) == 0L)

+                     break;

+                  if (kind > 42)

+                     kind = 42;

+                  jjAddStates(39, 40);

+                  break;

+               case 45:

+                  if (curChar == 47)

+                     jjAddStates(6, 7);

+                  break;

+               case 46:

+                  if (curChar == 47)

+                     jjCheckNAddTwoStates(47, 48);

+                  break;

+               case 47:

+                  if ((0xfffffffffffffbffL & l) != 0L)

+                     jjCheckNAddTwoStates(47, 48);

+                  break;

+               case 48:

+                  if (curChar == 10 && kind > 5)

+                     kind = 5;

+                  break;

+               case 49:

+                  if (curChar == 42)

+                     jjCheckNAddTwoStates(50, 51);

+                  break;

+               case 50:

+                  if ((0xfffffbffffffffffL & l) != 0L)

+                     jjCheckNAddTwoStates(50, 51);

+                  break;

+               case 51:

+                  if (curChar == 42)

+                     jjAddStates(41, 42);

+                  break;

+               case 52:

+                  if ((0xffff7fffffffffffL & l) != 0L)

+                     jjCheckNAddTwoStates(53, 51);

+                  break;

+               case 53:

+                  if ((0xfffffbffffffffffL & l) != 0L)

+                     jjCheckNAddTwoStates(53, 51);

+                  break;

+               case 54:

+                  if (curChar == 47 && kind > 6)

+                     kind = 6;

+                  break;

+               case 55:

+                  if ((0x3ff000000000000L & l) != 0L)

+                     jjCheckNAddStates(0, 5);

+                  break;

+               case 56:

+                  if ((0x3ff000000000000L & l) != 0L)

+                     jjCheckNAddTwoStates(56, 57);

+                  break;

+               case 57:

+                  if (curChar != 46)

+                     break;

+                  if (kind > 43)

+                     kind = 43;

+                  jjCheckNAddStates(43, 45);

+                  break;

+               case 58:

+                  if ((0x3ff000000000000L & l) == 0L)

+                     break;

+                  if (kind > 43)

+                     kind = 43;

+                  jjCheckNAddStates(43, 45);

+                  break;

+               case 59:

+                  if ((0x3ff000000000000L & l) != 0L)

+                     jjCheckNAddTwoStates(59, 22);

+                  break;

+               case 60:

+                  if ((0x3ff000000000000L & l) != 0L)

+                     jjCheckNAddTwoStates(60, 61);

+                  break;

+               case 62:

+                  if ((0x280000000000L & l) != 0L)

+                     jjCheckNAdd(63);

+                  break;

+               case 63:

+                  if ((0x3ff000000000000L & l) == 0L)

+                     break;

+                  if (kind > 44)

+                     kind = 44;

+                  jjCheckNAddTwoStates(63, 64);

+                  break;

+               default : break;

+            }

+         } while(i != startsAt);

+      }

+      else if (curChar < 128)

+      {

+         long l = 1L << (curChar & 077);

+         MatchLoop: do

+         {

+            switch(jjstateSet[--i])

+            {

+               case 0:

+                  if ((0x7fffffeL & l) != 0L)

+                  {

+                     if (kind > 39)

+                        kind = 39;

+                     jjCheckNAdd(15);

+                  }

+                  else if ((0x7fffffe00000000L & l) != 0L)

+                  {

+                     if (kind > 38)

+                        kind = 38;

+                     jjCheckNAdd(13);

+                  }

+                  break;

+               case 5:

+                  jjAddStates(46, 47);

+                  break;

+               case 12:

+                  if ((0x7fffffe00000000L & l) == 0L)

+                     break;

+                  if (kind > 38)

+                     kind = 38;

+                  jjCheckNAdd(13);

+                  break;

+               case 13:

+                  if ((0x7fffffe87fffffeL & l) == 0L)

+                     break;

+                  if (kind > 38)

+                     kind = 38;

+                  jjCheckNAdd(13);

+                  break;

+               case 14:

+                  if ((0x7fffffeL & l) == 0L)

+                     break;

+                  if (kind > 39)

+                     kind = 39;

+                  jjCheckNAdd(15);

+                  break;

+               case 15:

+                  if ((0x7fffffe87fffffeL & l) == 0L)

+                     break;

+                  if (kind > 39)

+                     kind = 39;

+                  jjCheckNAdd(15);

+                  break;

+               case 18:

+                  if ((0x20100000201000L & l) != 0L && kind > 40)

+                     kind = 40;

+                  break;

+               case 21:

+                  if ((0x20100000201000L & l) != 0L && kind > 41)

+                     kind = 41;

+                  break;

+               case 24:

+                  if ((0x2000000020L & l) != 0L)

+                     jjAddStates(48, 49);

+                  break;

+               case 27:

+                  if ((0x104000001040L & l) != 0L && kind > 43)

+                     kind = 43;

+                  break;

+               case 29:

+                  if ((0xffffffffefffffffL & l) != 0L)

+                     jjCheckNAddStates(8, 10);

+                  break;

+               case 30:

+                  if (curChar == 92)

+                     jjAddStates(50, 52);

+                  break;

+               case 31:

+                  if ((0x14404410000000L & l) != 0L)

+                     jjCheckNAddStates(8, 10);

+                  break;

+               case 38:

+                  jjAddStates(53, 54);

+                  break;

+               case 41:

+                  if (curChar == 120)

+                     jjCheckNAdd(42);

+                  break;

+               case 42:

+                  if ((0x7e0000007eL & l) == 0L)

+                     break;

+                  if (kind > 42)

+                     kind = 42;

+                  jjCheckNAddTwoStates(42, 43);

+                  break;

+               case 43:

+                  if ((0x20100000201000L & l) != 0L && kind > 42)

+                     kind = 42;

+                  break;

+               case 44:

+                  if (curChar == 88)

+                     jjCheckNAdd(42);

+                  break;

+               case 47:

+                  jjAddStates(55, 56);

+                  break;

+               case 50:

+                  jjCheckNAddTwoStates(50, 51);

+                  break;

+               case 52:

+               case 53:

+                  jjCheckNAddTwoStates(53, 51);

+                  break;

+               case 61:

+                  if ((0x2000000020L & l) != 0L)

+                     jjAddStates(57, 58);

+                  break;

+               case 64:

+                  if ((0x104000001040L & l) != 0L && kind > 44)

+                     kind = 44;

+                  break;

+               default : break;

+            }

+         } while(i != startsAt);

+      }

+      else

+      {

+         int hiByte = (int)(curChar >> 8);

+         int i1 = hiByte >> 6;

+         long l1 = 1L << (hiByte & 077);

+         int i2 = (curChar & 0xff) >> 6;

+         long l2 = 1L << (curChar & 077);

+         MatchLoop: do

+         {

+            switch(jjstateSet[--i])

+            {

+               case 5:

+                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))

+                     jjAddStates(46, 47);

+                  break;

+               case 29:

+                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))

+                     jjAddStates(8, 10);

+                  break;

+               case 38:

+                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))

+                     jjAddStates(53, 54);

+                  break;

+               case 47:

+                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))

+                     jjAddStates(55, 56);

+                  break;

+               case 50:

+                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))

+                     jjCheckNAddTwoStates(50, 51);

+                  break;

+               case 52:

+               case 53:

+                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))

+                     jjCheckNAddTwoStates(53, 51);

+                  break;

+               default : break;

+            }

+         } while(i != startsAt);

+      }

+      if (kind != 0x7fffffff)

+      {

+         jjmatchedKind = kind;

+         jjmatchedPos = curPos;

+         kind = 0x7fffffff;

+      }

+      ++curPos;

+      if ((i = jjnewStateCnt) == (startsAt = 65 - (jjnewStateCnt = startsAt)))

+         return curPos;

+      try { curChar = input_stream.readChar(); }

+      catch(java.io.IOException e) { return curPos; }

+   }

+}

+static final int[] jjnextStates = {

+   56, 57, 59, 22, 60, 61, 46, 49, 29, 30, 32, 41, 44, 2, 3, 4, 

+   7, 7, 8, 11, 9, 10, 7, 8, 9, 10, 7, 9, 10, 7, 8, 11, 

+   23, 24, 27, 29, 30, 34, 32, 42, 43, 52, 54, 58, 24, 27, 5, 6, 

+   25, 26, 31, 33, 35, 38, 39, 47, 48, 62, 63, 

+};

+private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)

+{

+   switch(hiByte)

+   {

+      case 0:

+         return ((jjbitVec2[i2] & l2) != 0L);

+      default : 

+         if ((jjbitVec0[i1] & l1) != 0L)

+            return true;

+         return false;

+   }

+}

+public static final String[] jjstrLiteralImages = {

+"", null, null, null, null, null, null, null, "\151\155\160\157\162\164", 

+"\73", "\156\141\155\145\163\160\141\143\145", "\50", "\54", "\51", "\173", "\175", 

+"\151\156\163\164\141\156\143\145\117\146", "\164\171\160\145\117\146", "\163\165\160\145\162\164\171\160\145\117\146", 

+"\163\165\142\164\171\160\145\117\146", "\151\163\106\151\156\141\154\124\171\160\145", "\164\162\165\145", 

+"\146\141\154\163\145", "\151\163\101\147\147\162\145\147\141\164\151\157\156", 

+"\151\163\101\156\171\123\157\165\162\143\145", "\151\163\101\156\171\124\141\162\147\145\164", 

+"\151\156\166\145\162\163\145", "\155\165\154\164\151\160\154\151\143\151\164\171", 

+"\157\156\145\137\164\157\137\157\156\145", "\157\156\145\137\164\157\137\155\141\156\171", 

+"\155\141\156\171\137\164\157\137\157\156\145", "\155\141\156\171\137\164\157\137\155\141\156\171", "\56", "\141\154\154", 

+"\145\170\151\163\164\163", "\46\46", "\174\174", "\55\76", null, null, null, null, null, null, null, null, 

+null, };

+public static final String[] lexStateNames = {

+   "DEFAULT", 

+};

+static final long[] jjtoToken = {

+   0x7fffffffff01L, 

+};

+static final long[] jjtoSkip = {

+   0xfeL, 

+};

+static protected JavaCharStream input_stream;

+static private final int[] jjrounds = new int[65];

+static private final int[] jjstateSet = new int[130];

+static protected char curChar;

+public VTMLParserTokenManager(JavaCharStream stream)

+{

+   if (input_stream != null)

+      throw new TokenMgrError("ERROR: Second call to constructor of static lexer. You must use ReInit() to initialize the static variables.", TokenMgrError.STATIC_LEXER_ERROR);

+   input_stream = stream;

+}

+public VTMLParserTokenManager(JavaCharStream stream, int lexState)

+{

+   this(stream);

+   SwitchTo(lexState);

+}

+static public void ReInit(JavaCharStream stream)

+{

+   jjmatchedPos = jjnewStateCnt = 0;

+   curLexState = defaultLexState;

+   input_stream = stream;

+   ReInitRounds();

+}

+static private final void ReInitRounds()

+{

+   int i;

+   jjround = 0x80000001;

+   for (i = 65; i-- > 0;)

+      jjrounds[i] = 0x80000000;

+}

+static public void ReInit(JavaCharStream stream, int lexState)

+{

+   ReInit(stream);

+   SwitchTo(lexState);

+}

+static public void SwitchTo(int lexState)

+{

+   if (lexState >= 1 || lexState < 0)

+      throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);

+   else

+      curLexState = lexState;

+}

+

+static protected Token jjFillToken()

+{

+   Token t = Token.newToken(jjmatchedKind);

+   t.kind = jjmatchedKind;

+   String im = jjstrLiteralImages[jjmatchedKind];

+   t.image = (im == null) ? input_stream.GetImage() : im;

+   t.beginLine = input_stream.getBeginLine();

+   t.beginColumn = input_stream.getBeginColumn();

+   t.endLine = input_stream.getEndLine();

+   t.endColumn = input_stream.getEndColumn();

+   return t;

+}

+

+static int curLexState = 0;

+static int defaultLexState = 0;

+static int jjnewStateCnt;

+static int jjround;

+static int jjmatchedPos;

+static int jjmatchedKind;

+

+public static Token getNextToken() 

+{

+  int kind;

+  Token specialToken = null;

+  Token matchedToken;

+  int curPos = 0;

+

+  EOFLoop :

+  for (;;)

+  {   

+   try   

+   {     

+      curChar = input_stream.BeginToken();

+   }     

+   catch(java.io.IOException e)

+   {        

+      jjmatchedKind = 0;

+      matchedToken = jjFillToken();

+      return matchedToken;

+   }

+

+   try { input_stream.backup(0);

+      while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)

+         curChar = input_stream.BeginToken();

+   }

+   catch (java.io.IOException e1) { continue EOFLoop; }

+   jjmatchedKind = 0x7fffffff;

+   jjmatchedPos = 0;

+   curPos = jjMoveStringLiteralDfa0_0();

+   if (jjmatchedKind != 0x7fffffff)

+   {

+      if (jjmatchedPos + 1 < curPos)

+         input_stream.backup(curPos - jjmatchedPos - 1);

+      if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)

+      {

+         matchedToken = jjFillToken();

+         return matchedToken;

+      }

+      else

+      {

+         continue EOFLoop;

+      }

+   }

+   int error_line = input_stream.getEndLine();

+   int error_column = input_stream.getEndColumn();

+   String error_after = null;

+   boolean EOFSeen = false;

+   try { input_stream.readChar(); input_stream.backup(1); }

+   catch (java.io.IOException e1) {

+      EOFSeen = true;

+      error_after = curPos <= 1 ? "" : input_stream.GetImage();

+      if (curChar == '\n' || curChar == '\r') {

+         error_line++;

+         error_column = 0;

+      }

+      else

+         error_column++;

+   }

+   if (!EOFSeen) {

+      input_stream.backup(1);

+      error_after = curPos <= 1 ? "" : input_stream.GetImage();

+   }

+   throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);

+  }

+}

+

+}

diff --git a/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VtmlPlugin.java b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VtmlPlugin.java
new file mode 100644
index 0000000..f5e8715
--- /dev/null
+++ b/org.eclipse.viatra2.imports.vtml/src/org/eclipse/viatra2/imports/vtml/VtmlPlugin.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2004-2008 Andras Balogh and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andras Balogh - initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.viatra2.imports.vtml;

+

+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+

+/**

+ * The main plugin class to be used in the desktop.

+ */

+public class VtmlPlugin extends Plugin {

+	//The shared instance.

+	private static VtmlPlugin plugin;

+	//Resource bundle.

+	private ResourceBundle resourceBundle;

+

+	/**

+	 * The constructor.

+	 */

+	public VtmlPlugin() {

+		super();

+		plugin = this;

+	}

+

+	/**

+	 * This method is called upon plug-in activation

+	 */

+	public void start(BundleContext context) throws Exception {

+		super.start(context);

+	}

+

+	/**

+	 * This method is called when the plug-in is stopped

+	 */

+	public void stop(BundleContext context) throws Exception {

+		super.stop(context);

+		plugin = null;

+		resourceBundle = null;

+	}

+

+	/**

+	 * Returns the shared instance.

+	 */

+	public static VtmlPlugin getDefault() {

+		return plugin;

+	}

+

+	/**

+	 * Returns the string from the plugin's resource bundle,

+	 * or 'key' if not found.

+	 */

+	public static String getResourceString(String key) {

+		ResourceBundle bundle = VtmlPlugin.getDefault().getResourceBundle();

+		try {

+			return (bundle != null) ? bundle.getString(key) : key;

+		} catch (MissingResourceException e) {

+			return key;

+		}

+	}

+

+	/**

+	 * Returns the plugin's resource bundle,

+	 */

+	public ResourceBundle getResourceBundle() {

+		try {

+			if (resourceBundle == null)

+				resourceBundle = ResourceBundle.getBundle("org.eclipse.viatra2.imports.vtml.VtmlPluginResources");

+		} catch (MissingResourceException x) {

+			resourceBundle = null;

+		}

+		return resourceBundle;

+	}

+}

diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/.classpath b/org.eclipse.viatra2.loaders.vtcl_lpgparser/.classpath
new file mode 100644
index 0000000..5eaa4b9
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/.classpath
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry exported="true" kind="lib" path="lib/lpgjavaruntime.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/commons-lang-2.1.jar"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/.fbprefs b/org.eclipse.viatra2.loaders.vtcl_lpgparser/.fbprefs
new file mode 100644
index 0000000..cb3ce4c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/.fbprefs
@@ -0,0 +1,101 @@
+#FindBugs User Preferences

+#Wed Sep 12 13:08:01 CEST 2007

+detector73=FindNonSerializableValuePassedToWriteObject|true

+detector72=UncallableMethodOfAnonymousClass|true

+detector71=LoadOfKnownNullValue|true

+detector70=DumbMethodInvocations|true

+detector9=FindUnsyncGet|true

+detector8=InefficientMemberAccess|false

+detector7=FindDoubleCheck|true

+detector6=FindNonSerializableStoreIntoSession|true

+detector5=IteratorIdioms|true

+detector4=DontCatchIllegalMonitorStateException|true

+detector69=SuperfluousInstanceOf|true

+detector3=SuspiciousThreadInterrupted|true

+detector68=FindSleepWithLockHeld|true

+detector2=NumberConstructor|true

+detector67=ConfusedInheritance|true

+detector1=FindNakedNotify|true

+detector66=SerializableIdiom|true

+detector0=BadSyntaxForRegularExpression|true

+detector65=FindUnreleasedLock|true

+detector64=PreferZeroLengthArrays|true

+detector63=UnnecessaryMath|true

+detector62=FindNonShortCircuit|true

+detector61=StartInConstructor|true

+detector60=WrongMapIterator|true

+filter_settings_neg=|

+detector59=FindTwoLockWait|true

+detector58=FindReturnRef|true

+detector57=DuplicateBranches|true

+detector56=FindCircularDependencies|false

+detector55=UnreadFields|true

+detector54=QuestionableBooleanAssignment|true

+detector53=UselessSubclassMethod|false

+detector52=FindUninitializedGet|true

+detector51=FindFloatEquality|true

+detector50=LazyInit|true

+detector49=FindSpinLoop|true

+detector48=FindBadCast2|true

+detector47=FindLocalSelfAssignment2|true

+detector46=BadAppletConstructor|false

+detector45=FindFieldSelfAssignment|true

+detector44=IDivResultCastToDouble|true

+detector43=FindUselessControlFlow|true

+detector42=FindNullDeref|true

+filter_settings=Medium||false

+detector41=CloneIdiom|true

+detector40=FindEmptySynchronizedBlock|true

+detector39=XMLFactoryBypass|true

+detector38=FindRefComparison|true

+detector37=WaitInLoop|true

+detector36=InstantiateStaticClass|true

+detector35=ComparatorIdiom|true

+detector34=BadlyOverriddenAdapter|true

+detector33=VolatileUsage|true

+detector32=ReadReturnShouldBeChecked|true

+detector31=FindUnconditionalWait|true

+detector30=FindJSR166LockMonitorenter|true

+detector94=InfiniteRecursiveLoop|true

+detector93=RuntimeExceptionCapture|true

+detector92=ConfusionBetweenInheritedAndOuterMethod|true

+detector91=BadResultSetAccess|true

+detector90=MutableStaticFields|true

+default_directory=c\:\\java\\eclipse_sensoria\\eclipse

+detector29=DoInsideDoPrivileged|true

+detector28=HugeSharedStringConstants|true

+detector27=InvalidJUnitTest|true

+detector26=FindRunInvocations|true

+detector25=MultithreadedInstanceAccess|true

+detector89=CheckImmutableAnnotation|true

+detector24=MutableLock|true

+detector88=DroppedException|true

+detector23=UseObjectEquals|false

+detector87=FindHEmismatch|true

+detector22=DumbMethods|true

+detector86=MethodReturnCheck|true

+detector21=VarArgsProblems|true

+detector85=BadUseOfReturnValue|true

+detector20=FindUncalledPrivateMethods|true

+detector84=FindSqlInjection|true

+detector_threshold=2

+detector83=EmptyZipFileEntry|true

+detector82=Naming|true

+detector81=InitializationChain|true

+detector80=InfiniteRecursiveLoop2|false

+detector19=FindMaskedFields|true

+detector18=InfiniteLoop|true

+detector17=FindPuzzlers|true

+detector16=RedundantInterfaces|true

+detector15=IncompatMask|true

+detector79=PublicSemaphores|false

+detector14=FindMismatchedWaitOrNotify|true

+detector78=SwitchFallthrough|true

+detector13=FindFinalizeInvocations|true

+detector77=InheritanceUnsafeGetResource|true

+detector12=StringConcatenation|true

+detector76=FindInconsistentSync2|true

+detector11=FindBadForLoop|true

+detector75=InefficientToArray|true

+detector10=FindOpenStream|true

+detector74=FindDeadLocalStores|true

diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/.project b/org.eclipse.viatra2.loaders.vtcl_lpgparser/.project
new file mode 100644
index 0000000..a88f061
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<projectDescription>

+	<name>org.eclipse.viatra2.loaders.vtcl_lpgparser</name>

+	<comment></comment>

+	<projects>

+	</projects>

+	<buildSpec>

+		<buildCommand>

+			<name>org.eclipse.jdt.core.javabuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+		<buildCommand>

+			<name>org.eclipse.pde.ManifestBuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+		<buildCommand>

+			<name>org.eclipse.pde.SchemaBuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+	</buildSpec>

+	<natures>

+		<nature>org.eclipse.pde.PluginNature</nature>

+		<nature>org.eclipse.jdt.core.javanature</nature>

+	</natures>

+</projectDescription>

diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra2.loaders.vtcl_lpgparser/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..53a0fff
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,25 @@
+#Wed Jan 12 11:25:33 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.viatra2.loaders.vtcl_lpgparser/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..0483e2a
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,3 @@
+#Thu Jul 19 12:51:12 CEST 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/META-INF/MANIFEST.MF b/org.eclipse.viatra2.loaders.vtcl_lpgparser/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..b5e881c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: VIATRA2 R3 Command Language Parser (LPG)  Plug-in
+Bundle-SymbolicName: org.eclipse.viatra2.loaders.vtcl_lpgparser;singleton:=true
+Bundle-Version: 3.3.0.qualifier
+Bundle-Vendor: Daniel Varro / Optxware LLC
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.viatra2.core2,
+ org.eclipse.viatra2.gtasm.model,
+ org.eclipse.viatra2.gtasm.typing.model,
+ org.eclipse.emf.ecore.xmi,
+ org.eclipse.viatra2.gtasm.support;bundle-version="3.2.0"
+Export-Package: lpg.lpgjavaruntime,
+ org.eclipse.viatra2.lpgparser,
+ org.eclipse.viatra2.lpgparser.ast,
+ org.eclipse.viatra2.lpgparser.loader,
+ org.eclipse.viatra2.lpgparser.modelbuilder
+Bundle-ClassPath: lib/lpgjavaruntime.jar,
+ lib/commons-lang-2.1.jar,
+ .
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/about.html b/org.eclipse.viatra2.loaders.vtcl_lpgparser/about.html
new file mode 100644
index 0000000..cbd5b33
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/about.html
@@ -0,0 +1,37 @@
+<!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>About</title>

+</head>

+<body lang="EN-US">

+<h2>About This Content</h2>

+ 

+<p>July 4th, 2008</p>	

+<h3>License</h3>

+

+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 

+indicated below, the Content 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 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>If you did not receive this Content directly from the Eclipse Foundation, the Content is 

+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may

+apply to your use of any object code in the Content.  Check the Redistributor's license that was 

+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise

+indicated below, the terms and conditions of the EPL still apply to any source code in the Content

+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>

+

+<h3>Third Party Content</h3>

+

+The Content includes items that have been sourced from third parties as set out below. 

+If you did not receive this Content directly from the Eclipse Foundation, the following 

+is provided for informational purposes only, and you should look to the Redistributor's 

+license for terms and conditions of use. 

+

+lpgjavaruntime.jar (Version 1.1.0) - LPG parser generator framework 

+

+</body>

+</html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/build.properties b/org.eclipse.viatra2.loaders.vtcl_lpgparser/build.properties
new file mode 100644
index 0000000..c828081
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/build.properties
@@ -0,0 +1,7 @@
+bin.includes = META-INF/,\
+               plugin.xml,\
+               .,\
+               lib/
+
+source.. = src/,\
+           lib/
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/lib/commons-lang-2.1.jar b/org.eclipse.viatra2.loaders.vtcl_lpgparser/lib/commons-lang-2.1.jar
new file mode 100644
index 0000000..87b80ab
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/lib/commons-lang-2.1.jar
Binary files differ
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/lib/lpgjavaruntime.jar b/org.eclipse.viatra2.loaders.vtcl_lpgparser/lib/lpgjavaruntime.jar
new file mode 100644
index 0000000..361536a
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/lib/lpgjavaruntime.jar
Binary files differ
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/plugin.xml b/org.eclipse.viatra2.loaders.vtcl_lpgparser/plugin.xml
new file mode 100644
index 0000000..6c10e5d
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/plugin.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+   <extension
+         point="org.eclipse.viatra2.core2.programloader">
+      <loader
+            class="org.eclipse.viatra2.lpgparser.loader.LPGVTCLLoader"
+            fileExtensionList="vtcl"
+            id="org.eclipse.viatra2.lpgparser.loader.LPGVTCLLoader"
+            name="VIATRA2 R3 LPG VTCL Loader"/>
+   </extension>

+   <extension

+         point="org.eclipse.viatra2.core2.frameworkservice">

+      <factory

+            factoryclass="org.eclipse.viatra2.lpgparser.loader.VTCLParserFactory"

+            servicename="org.eclipse.viatra2.loaders.vtcl_lpgparser.loader.VTCLParserManager">

+      </factory>

+   </extension>
+
+</plugin>
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/.cvsignore b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/.cvsignore
new file mode 100644
index 0000000..3a646f9
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/.cvsignore
@@ -0,0 +1,3 @@
+VTCLLexer.l
+VTCLKWLexer.l
+VTCLParser.l
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/Main.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/Main.java
new file mode 100644
index 0000000..54645f6
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/Main.java
@@ -0,0 +1,161 @@
+/***********************************************************************
+* Copyright (c) 2007 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+************************************************************************
+*/
+
+package org.eclipse.viatra2.lpgparser;
+
+//import java.io.File;
+//import java.io.IOException;
+//import java.util.HashMap;
+//import java.util.Map;
+//
+//import org.eclipse.emf.common.util.URI;
+//import org.eclipse.emf.ecore.resource.Resource;
+//import org.eclipse.emf.ecore.resource.ResourceSet;
+//import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+//import org.eclipse.emf.ecore.xmi.XMLResource;
+//import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
+//
+//import org.eclipse.viatra2.core.IModelSpace;
+//import org.eclipse.viatra2.framework.FrameworkManager;
+//import org.eclipse.viatra2.framework.IFramework;
+//import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module;
+//import org.eclipse.viatra2.natives.ASMNativeFunction;
+import org.eclipse.viatra2.lpgparser.ast.ASTNode;
+
+
+/**
+ * This class is used only for testing purposes.
+ * 
+ * @deprecated
+ * @author Daniel Varro
+ *
+ */
+public class Main
+{
+	public static void main(String[] args) throws Exception
+    {
+//		ErrorInformation errorInfo = new ErrorInformation("Error {1}", ErrorKind.PARSE_ERROR);
+//		String[] context = new String[] {"Dani"};
+//		errorInfo.bind(context);
+//		System.out.println(errorInfo.getMessage());
+        Option option;
+        VTCLLexer vtcl_lexer;
+        VTCLParser vtcl_parser;
+
+        ASTNode ast;
+//
+////        IFramework framework = FrameworkManager.getInstance().createFramework();
+////        framework.mergeFile("vpmlFileName");
+////        IModelSpace modelSpace = framework.getTopmodel();
+//        
+        try
+        {
+            option = new Option(args);
+            option.readInputChars();
+            vtcl_lexer = new VTCLLexer(option.getInputChars(), option.getFileName()); // Create the lexer
+            vtcl_lexer.setTab(4);
+            vtcl_parser = new VTCLParser(vtcl_lexer);	// Create the parser
+            vtcl_lexer.lexer(vtcl_parser); // Lex the stream to produce the token stream
+            if (option.dumpTokens())
+            {
+                System.out.println("\n****Output Tokens: \n");
+                vtcl_parser.dumpTokens();
+            }
+            ast = vtcl_parser.parser(100); // Parse the token stream to produce an AST
+            if (ast == null) {
+            	System.out.println("****Failure");
+            	System.out.println("Number of parser errors: " + vtcl_parser.getAllErrorInfos().size());
+            	for (int i = 0; i < vtcl_parser.getAllErrorInfos().size(); i++) {
+            		System.out.println(vtcl_parser.getAllErrorInfos().get(i).getMessageWithLocation());
+            	}
+            }
+            else
+            {
+            	System.out.println("*** Parsing completed ***");
+        //      String result = (String) ast.accept(new VTCLResultVisitor());
+//            	System.out.println(result.toString());
+//            	Machine machine = (Machine) result.getMachine().get(0);
+//            	// Initializing a sample model space
+//            	IFramework framework = FrameworkManager.getInstance().createFramework();
+//            	framework.mergeFile("c:\\java\\eclipse_sensoria\\eclipse\\workspace\\viatra_vtcl_lpg_parser\\tests\\example.vpml");
+//            	IModelSpace modelSpace = framework.getTopmodel();
+//            	// Retrieve native functions from framework
+//            	ASMNativeFunction[] asmNativeFunctions = framework.getNativeFunctionManager().getAllNativeFunctions();
+//
+//            	// Starting the model builder
+//            	VTCLModelBuilder modelBuilder = new VTCLModelBuilder(modelSpace, asmNativeFunctions);
+//            	Module vtclModule = (Module) ast.accept(modelBuilder);
+//            	
+            	// Reporting parser errors
+            	System.out.println("Number of parser errors: " + vtcl_parser.getAllErrorInfos().size());
+            	for (int i = 0; i < vtcl_parser.getAllErrorInfos().size(); i++) {
+            		System.out.println(vtcl_parser.getAllErrorInfos().get(i).getMessageWithLocation());
+            	}
+//            	// Reporting model resolution and validation errors
+//            	System.out.println("*** Starting model builder ***");
+//            	VTCLModelResolver modelResolver = modelBuilder.getModelResolver();
+//            	System.out.println("Number of validation errors: " + 
+//            		modelResolver.getAllReferenceErrorInfos().size());
+//            	for (int i = 0; i < modelResolver.getAllReferenceErrorInfos().size(); i++) {
+//            	    System.out.println(modelResolver.getAllReferenceErrorInfos().get(i).getMessageWithLocation());
+//		    
+//		}
+//
+//            	// Serializing to XMI
+//            	// Create a resource set.
+//            	  ResourceSet resourceSet = new ResourceSetImpl();
+//
+//            	  // Register the default resource factory -- only needed for stand-alone!
+//            	  resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(
+//            	    Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl());
+//
+//            	  // Get the URI of the model file.
+//            	  URI fileURI = URI.createFileURI(new File("mygtasmmodel.xmi").getAbsolutePath());
+//
+//            	  // Create a resource for this file.
+//            	  Resource resource = resourceSet.createResource(fileURI);
+//
+//            	  // Add the book and writer objects to the contents.
+//            	  resource.getContents().add(vtclModule);
+//
+//            	  // Save the contents of the resource to the file system.
+//            	  try
+//            	  {
+//            	      Map options = new HashMap();
+//            	      options.put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
+//            	      resource.save(options); 
+////            	    resource.save(Collections.EMPTY_MAP);
+//            	  } catch (IOException e) {
+//            	      e.printStackTrace();
+//            	  }
+//  	   	
+//            	// Print all contents
+////            	Iterator iter = EcoreUtil.getAllContents(vtclModule, false);
+////            	while (iter.hasNext()) {
+////            	    Object obj = iter.next();
+////            	    if (obj instanceof GTASMElement) {
+////            		System.out.println(((GTASMElement) obj).eClass().getName() + "->" +
+////            			((GTASMElement) obj).getName());
+////            	    }
+////            	}
+//
+            }
+
+            return;
+        }
+        catch (Exception e)
+        {
+            System.err.println(e.getMessage());
+            e.printStackTrace();
+        }
+    }
+}
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/Option.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/Option.java
new file mode 100644
index 0000000..4e1b882
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/Option.java
@@ -0,0 +1,84 @@
+/**
+* Copyright (c) 2007 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*/
+
+package org.eclipse.viatra2.lpgparser;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+public class Option
+{
+    String fileName = "input";
+    boolean dumpTokens = false;
+    boolean dumpKeywords = false;
+    boolean print  = false;
+    char[] inputChars;
+
+
+    public Option(String [] args)
+    {
+        for (int i = 0; i < args.length; i++)
+        {
+            if (args[i].charAt(0) == '-')
+            {
+                if (args[i].equals("-d"))
+                    dumpTokens = true;
+                else if (args[i].equals("-k"))
+                    dumpKeywords = true;
+                else if (args[i].equals("-p"))
+                    print = true;
+            }
+            else
+            {
+                fileName = args[i];
+                break;
+            }
+        }
+    }
+
+    public String getFileName() { return fileName; }
+
+    public boolean dumpTokens() { return dumpTokens; }
+
+    public boolean dumpKeywords() { return dumpKeywords; }
+
+    public boolean printTokens() { return print; }
+
+    public char[] getInputChars() { return inputChars; }
+
+    public int readInputChars() throws IOException
+    {
+        int rlen = 0;
+        try
+        {
+            // Create a reader for the input stream and read the input file into a char array.
+            File f = new File(fileName);
+            int len = (int) f.length();
+                BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(f)));
+
+            inputChars = new char[len];
+
+            rlen = in.read(inputChars, 0, len);
+
+        }
+        catch (Exception e)
+        {
+            IOException io = new IOException();
+            System.err.println(e.getMessage());
+            e.printStackTrace();
+            throw(io);
+        }
+        return rlen;
+    }
+}
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLKWLexer.g b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLKWLexer.g
new file mode 100644
index 0000000..145c7a7
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLKWLexer.g
@@ -0,0 +1,678 @@
+--
+-- The VTCL Keyword Lexer
+-- Copyright (c) 2007 OptXware Research and Development LLC.
+-- All rights reserved.   This program and the accompanying materials
+-- are made available under the terms of the Eclipse Public License v1.0
+-- which accompanies this distribution, and is available at
+-- http://www.eclipse.org/legal/epl-v10.html
+--
+-- Contributors:
+--   Daniel Varro - Initial API and implementation
+
+%Options fp=VTCLKWLexer,prefix=Char_
+%options escape=$
+%options package=org.eclipse.viatra2.lpgparser
+--%options dat-directory=./hu/optxware/viatra/lpgparser
+%options template=KeyWordTemplateD.g
+%options export_terminals=("VTCLParsersym.java", "TK_")
+-- %options noserialize
+
+$Notice
+	/./**
+ *
+ * Copyright (c) 2007 OptXware Research and Development LLC.
+ * All rights reserved.   This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Daniel Varro - Initial API and implementation
+ *
+ * This file was generated automatically based upon the VTCL LPG Lexer
+ * VTCLKWLexer.g (and btVTCLParserTemplateD.g)
+ */
+	./
+$End
+
+
+$Include
+    VTCLKWLexerMap.g
+$End
+
+$Export
+    namespace
+    import
+    machine
+    pattern
+    or
+    neg
+    find
+    check
+    supertypeOf
+    subtypeOf
+    typeOf
+    instanceOf
+    gtrule
+    precondition
+    postcondition
+    action
+    apply
+    xor
+    asmfunction
+    rule
+    out
+    inout
+    skip
+    fail
+    call
+    update
+    print
+    println
+    log
+    debug
+    info
+    warning
+    error
+    fatal
+    seq
+    parallel
+    random
+    let
+    in
+    below
+    choose
+    forall
+    with 
+    do
+    iterate
+    if
+    try
+    else
+    when
+    new
+    delete
+    changed
+    -- Can I include the next two items here?
+    delete_content
+    move_content
+    copy
+    copy_boundary_edges
+    skip_boundary_edges
+    move
+    rename
+    setValue
+    setFrom
+    setTo
+    setMultiplicity
+    setAggregation
+    setInverse
+    shareable
+    -- Built-in constants
+    undef
+    true
+    false
+    one_to_one
+    one_to_many
+    many_to_one
+    many_to_many
+    -- not keywords but treated as keywords by LPG
+    ref
+    fqn
+    name
+    value
+    source
+    target
+    multiplicity
+    aggregation
+    inverse
+    toBoolean
+    toString
+    toInteger
+    toDouble
+    toMultiplicity
+$End
+
+$Terminals
+    a    b    c    d    e    f    g    h    i    j    k    l    m
+    n    o    p    q    r    s    t    u    v    w    x    y    z
+    _
+    A    B    C    D    E    F    G    H    I    J    K    L    M
+    N    O    P    Q    R    S    T    U    V    W    X    Y    Z
+$End
+
+--$Eof
+--	EOF
+--$End
+
+$Start
+    KeyWord
+$End
+
+$Rules
+
+-- The Goal for the parser is a single Keyword
+
+    KeyWord ::= n a m e s p a c e
+        /.$BeginAction
+            $setResult($_namespace);
+          $EndAction
+        ./
+
+              | i m p o r t
+        /.$BeginAction
+            $setResult($_import);
+          $EndAction
+        ./
+
+              | m a c h i n e
+        /.$BeginAction
+            $setResult($_machine);
+          $EndAction
+        ./
+
+              | p a t t e r n
+        /.$BeginAction
+            $setResult($_pattern);
+          $EndAction
+        ./
+
+              | o r
+        /.$BeginAction
+            $setResult($_or);
+          $EndAction
+        ./
+
+              | n e g
+        /.$BeginAction
+            $setResult($_neg);
+          $EndAction
+        ./
+
+              | f i n d
+        /.$BeginAction
+            $setResult($_find);
+          $EndAction
+        ./
+
+              | c h e c k 
+        /.$BeginAction
+            $setResult($_check);
+          $EndAction
+        ./
+
+              | s u p e r t y p e O f
+        /.$BeginAction
+            $setResult($_supertypeOf);
+          $EndAction
+        ./
+
+              | s u b t y p e O f
+        /.$BeginAction
+            $setResult($_subtypeOf);
+          $EndAction
+        ./
+
+              | t y p e O f
+        /.$BeginAction
+            $setResult($_typeOf);
+          $EndAction
+        ./
+
+              | i n s t a n c e O f
+        /.$BeginAction
+            $setResult($_instanceOf);
+          $EndAction
+        ./
+
+              | g t r u l e
+        /.$BeginAction
+            $setResult($_gtrule);
+          $EndAction
+        ./
+
+              | p r e c o n d i t i o n
+        /.$BeginAction
+            $setResult($_precondition);
+          $EndAction
+        ./
+
+              | p o s t c o n d i t i o n
+        /.$BeginAction
+            $setResult($_postcondition);
+          $EndAction
+        ./
+
+              | a c t i o n
+        /.$BeginAction
+            $setResult($_action);
+          $EndAction
+        ./
+
+              | a p p l y
+        /.$BeginAction
+            $setResult($_apply);
+          $EndAction
+        ./
+
+              | x o r
+        /.$BeginAction
+            $setResult($_xor);
+          $EndAction
+        ./
+
+              | a s m f u n c t i o n
+        /.$BeginAction
+            $setResult($_asmfunction);
+          $EndAction
+        ./
+
+              | r u l e
+        /.$BeginAction
+            $setResult($_rule);
+          $EndAction
+        ./
+
+              | o u t 
+        /.$BeginAction
+            $setResult($_out);
+          $EndAction
+        ./
+
+              | i n o u t 
+        /.$BeginAction
+            $setResult($_inout);
+          $EndAction
+        ./
+
+
+              | f a i l 
+        /.$BeginAction
+            $setResult($_fail);
+          $EndAction
+        ./
+
+              | c a l l  
+        /.$BeginAction
+            $setResult($_call);
+          $EndAction
+        ./
+
+              | u p d a t e  
+        /.$BeginAction
+            $setResult($_update);
+          $EndAction
+        ./
+
+              | p r i n t  
+        /.$BeginAction
+            $setResult($_print);
+          $EndAction
+        ./
+
+              | p r i n t l n  
+        /.$BeginAction
+            $setResult($_println);
+          $EndAction
+        ./
+
+              | l o g
+        /.$BeginAction
+            $setResult($_log);
+          $EndAction
+        ./
+
+              | d e b u g
+        /.$BeginAction
+            $setResult($_debug);
+          $EndAction
+        ./
+
+              | i n f o 
+        /.$BeginAction
+            $setResult($_info);
+          $EndAction
+        ./
+
+              | w a r n i n g
+        /.$BeginAction
+            $setResult($_warning);
+          $EndAction
+        ./
+
+              | e r r o r
+        /.$BeginAction
+            $setResult($_error);
+          $EndAction
+        ./
+
+              | f a t a l
+        /.$BeginAction
+            $setResult($_fatal);
+          $EndAction
+        ./
+
+              | s e q
+        /.$BeginAction
+            $setResult($_seq);
+          $EndAction
+        ./
+
+              | s h a r e a b l e
+        /.$BeginAction
+            $setResult($_shareable);
+          $EndAction
+        ./
+              | p a r a l l e l
+        /.$BeginAction
+            $setResult($_parallel);
+          $EndAction
+        ./
+
+              | r a n d o m
+        /.$BeginAction
+            $setResult($_random);
+          $EndAction
+        ./
+
+              | l e t 
+        /.$BeginAction
+            $setResult($_let);
+          $EndAction
+        ./
+
+              | i n  
+        /.$BeginAction
+            $setResult($_in);
+          $EndAction
+        ./
+
+              | b e l o w
+        /.$BeginAction
+            $setResult($_below);
+          $EndAction
+        ./
+
+              | c h o o s e
+        /.$BeginAction
+            $setResult($_choose);
+          $EndAction
+        ./
+
+              | f o r a l l 
+        /.$BeginAction
+            $setResult($_forall);
+          $EndAction
+        ./
+
+              | w i t h 
+        /.$BeginAction
+            $setResult($_with);
+          $EndAction
+        ./
+
+              | d o 
+        /.$BeginAction
+            $setResult($_do);
+          $EndAction
+        ./
+
+              | i t e r a t e 
+        /.$BeginAction
+            $setResult($_iterate);
+          $EndAction
+        ./
+
+              | i f
+        /.$BeginAction
+            $setResult($_if);
+          $EndAction
+        ./
+
+              | t r y
+        /.$BeginAction
+            $setResult($_try);
+          $EndAction
+        ./
+
+              | e l s e
+        /.$BeginAction
+            $setResult($_else);
+          $EndAction
+        ./
+        
+              | w h e n
+        /.$BeginAction
+            $setResult($_when);
+          $EndAction
+        ./
+
+              | c h a n g e d
+        /.$BeginAction
+            $setResult($_changed);
+          $EndAction
+        ./
+
+              | n e w
+        /.$BeginAction
+            $setResult($_new);
+          $EndAction
+        ./
+
+              | d e l e t e _ c o n t e n t
+        /.$BeginAction
+            $setResult($_delete_content);
+          $EndAction
+        ./
+
+              | m o v e _ c o n t e n t
+        /.$BeginAction
+            $setResult($_move_content);
+          $EndAction
+        ./
+
+              | s k i p _ b o u n d a r y _ e d g e s
+        /.$BeginAction
+            $setResult($_skip_boundary_edges);
+          $EndAction
+        ./
+
+              | c o p y _ b o u n d a r y _ e d g e s
+        /.$BeginAction
+            $setResult($_copy_boundary_edges);
+          $EndAction
+        ./
+
+              | s k i p
+        /.$BeginAction
+            $setResult($_skip);
+          $EndAction
+        ./
+
+              | d e l e t e
+        /.$BeginAction
+            $setResult($_delete);
+          $EndAction
+        ./
+
+              | c o p y 
+        /.$BeginAction
+            $setResult($_copy);
+          $EndAction
+        ./
+
+              | m o v e  
+        /.$BeginAction
+            $setResult($_move);
+          $EndAction
+        ./
+
+              | r e n a m e
+        /.$BeginAction
+            $setResult($_rename);
+          $EndAction
+        ./
+
+	          | s e t V a l u e
+		/.$BeginAction
+            $setResult($_setValue);
+          $EndAction
+        ./
+
+              | s e t F r o m
+        /.$BeginAction
+            $setResult($_setFrom);
+          $EndAction
+        ./
+
+              | s e t T o 
+        /.$BeginAction
+            $setResult($_setTo);
+          $EndAction
+        ./
+
+              | s e t M u l t i p l i c i t y
+        /.$BeginAction
+            $setResult($_setMultiplicity);
+          $EndAction
+        ./
+
+              | s e t A g g r e g a t i o n
+        /.$BeginAction
+            $setResult($_setAggregation);
+          $EndAction
+        ./
+
+              | s e t I n v e r s e
+        /.$BeginAction
+            $setResult($_setInverse);
+          $EndAction
+        ./
+
+              | u n d e f 
+        /.$BeginAction
+            $setResult($_undef);
+          $EndAction
+        ./
+
+              | t r u e
+        /.$BeginAction
+            $setResult($_true);
+          $EndAction
+        ./
+
+              | f a l s e
+        /.$BeginAction
+            $setResult($_false);
+          $EndAction
+        ./
+
+              | o n e _ t o _ o n e
+        /.$BeginAction
+            $setResult($_one_to_one);
+          $EndAction
+        ./
+
+              | o n e _ t o _ m a n y
+        /.$BeginAction
+            $setResult($_one_to_many);
+          $EndAction
+        ./
+
+              | m a n y _ t o _ o n e
+        /.$BeginAction
+            $setResult($_many_to_one);
+          $EndAction
+        ./
+
+              | m a n y _ t o _ m a n y
+        /.$BeginAction
+            $setResult($_many_to_many);
+          $EndAction
+        ./
+
+
+              | v a l u e 
+        /.$BeginAction
+            $setResult($_value);
+          $EndAction
+        ./
+
+              | n a m e
+        /.$BeginAction
+            $setResult($_name);
+          $EndAction
+        ./
+
+              | f q n 
+        /.$BeginAction
+            $setResult($_fqn);
+          $EndAction
+        ./
+
+              | r e f 
+        /.$BeginAction
+            $setResult($_ref);
+          $EndAction
+        ./
+
+              | s o u r c e 
+        /.$BeginAction
+            $setResult($_source);
+          $EndAction
+        ./
+
+              | t a r g e t  
+        /.$BeginAction
+            $setResult($_target);
+          $EndAction
+        ./
+
+              | m u l t i p l i c i t y 
+        /.$BeginAction
+            $setResult($_multiplicity);
+          $EndAction
+        ./
+
+              | a g g r e g a t i o n
+        /.$BeginAction
+            $setResult($_aggregation);
+          $EndAction
+        ./
+
+              | i n v e r s e
+        /.$BeginAction
+            $setResult($_inverse);
+          $EndAction
+        ./
+
+              | t o S t r i n g 
+        /.$BeginAction
+            $setResult($_toString);
+          $EndAction
+        ./
+
+              | t o I n t e g e r  
+        /.$BeginAction
+            $setResult($_toInteger);
+          $EndAction
+        ./
+
+              | t o B o o l e a n  
+        /.$BeginAction
+            $setResult($_toBoolean);
+          $EndAction
+        ./
+
+              | t o D o u b l e  
+        /.$BeginAction
+            $setResult($_toDouble);
+          $EndAction
+        ./
+
+              | t o M u l t i p l i c i t y  
+        /.$BeginAction
+            $setResult($_toMultiplicity);
+          $EndAction
+        ./
+$End
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLKWLexer.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLKWLexer.java
new file mode 100644
index 0000000..8a96aef
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLKWLexer.java
@@ -0,0 +1,654 @@
+/**
+*
+* Copyright (c) 2007 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Lexer
+* VTCLKWLexer.g (and btVTCLParserTemplateD.g)
+*/
+
+package org.eclipse.viatra2.lpgparser;
+
+import lpg.lpgjavaruntime.*;

+
+public class VTCLKWLexer extends VTCLKWLexerprs implements VTCLParsersym

+{

+    private char[] inputChars;

+    private final int keywordKind[] = new int[87 + 1];

+

+    public int[] getKeywordKinds() { return keywordKind; }

+

+    public int lexer(int curtok, int lasttok)

+    {

+        int current_kind = getKind(inputChars[curtok]),

+            act;

+

+        for (act = tAction(START_STATE, current_kind);

+             act > NUM_RULES && act < ACCEPT_ACTION;

+             act = tAction(act, current_kind))

+        {

+            curtok++;

+            current_kind = (curtok > lasttok

+                                   ? Char_EOF

+                                   : getKind(inputChars[curtok]));

+        }

+

+        if (act > ERROR_ACTION)

+        {

+            curtok++;

+            act -= ERROR_ACTION;

+        }

+

+        return keywordKind[act == ERROR_ACTION  || curtok <= lasttok ? 0 : act];

+    }

+

+    public void setInputChars(char[] inputChars) { this.inputChars = inputChars; }

+

+    final static int tokenKind[] = new int[128];
+    static
+    {
+        tokenKind['_'] = Char__;
+
+        tokenKind['a'] = Char_a;
+        tokenKind['b'] = Char_b;
+        tokenKind['c'] = Char_c;
+        tokenKind['d'] = Char_d;
+        tokenKind['e'] = Char_e;
+        tokenKind['f'] = Char_f;
+        tokenKind['g'] = Char_g;
+        tokenKind['h'] = Char_h;
+        tokenKind['i'] = Char_i;
+        tokenKind['j'] = Char_j;
+        tokenKind['k'] = Char_k;
+        tokenKind['l'] = Char_l;
+        tokenKind['m'] = Char_m;
+        tokenKind['n'] = Char_n;
+        tokenKind['o'] = Char_o;
+        tokenKind['p'] = Char_p;
+        tokenKind['q'] = Char_q;
+        tokenKind['r'] = Char_r;
+        tokenKind['s'] = Char_s;
+        tokenKind['t'] = Char_t;
+        tokenKind['u'] = Char_u;
+        tokenKind['v'] = Char_v;
+        tokenKind['w'] = Char_w;
+        tokenKind['x'] = Char_x;
+        tokenKind['y'] = Char_y;
+        tokenKind['z'] = Char_z;
+
+        tokenKind['A'] = Char_A;
+        tokenKind['B'] = Char_B;
+        tokenKind['C'] = Char_C;
+        tokenKind['D'] = Char_D;
+        tokenKind['E'] = Char_E;
+        tokenKind['F'] = Char_F;
+        tokenKind['G'] = Char_G;
+        tokenKind['H'] = Char_H;
+        tokenKind['I'] = Char_I;
+        tokenKind['J'] = Char_J;
+        tokenKind['K'] = Char_K;
+        tokenKind['L'] = Char_L;
+        tokenKind['M'] = Char_M;
+        tokenKind['N'] = Char_N;
+        tokenKind['O'] = Char_O;
+        tokenKind['P'] = Char_P;
+        tokenKind['Q'] = Char_Q;
+        tokenKind['R'] = Char_R;
+        tokenKind['S'] = Char_S;
+        tokenKind['T'] = Char_T;
+        tokenKind['U'] = Char_U;
+        tokenKind['V'] = Char_V;
+        tokenKind['W'] = Char_W;
+        tokenKind['X'] = Char_X;
+        tokenKind['Y'] = Char_Y;
+        tokenKind['Z'] = Char_Z;
+    };
+
+    final int getKind(char c)
+    {
+        return (c < 128 ? tokenKind[c] : 0);
+    }
+
+

+    public VTCLKWLexer(char[] inputChars, int identifierKind)

+    {

+        this.inputChars = inputChars;

+        keywordKind[0] = identifierKind;

+

+        //

+        // Rule 1:  KeyWord ::= n a m e s p a c e

+        //
+        keywordKind[1] = (TK_namespace);
+      
+    

+        //

+        // Rule 2:  KeyWord ::= i m p o r t

+        //
+        keywordKind[2] = (TK_import);
+      
+    

+        //

+        // Rule 3:  KeyWord ::= m a c h i n e

+        //
+        keywordKind[3] = (TK_machine);
+      
+    

+        //

+        // Rule 4:  KeyWord ::= p a t t e r n

+        //
+        keywordKind[4] = (TK_pattern);
+      
+    

+        //

+        // Rule 5:  KeyWord ::= o r

+        //
+        keywordKind[5] = (TK_or);
+      
+    

+        //

+        // Rule 6:  KeyWord ::= n e g

+        //
+        keywordKind[6] = (TK_neg);
+      
+    

+        //

+        // Rule 7:  KeyWord ::= f i n d

+        //
+        keywordKind[7] = (TK_find);
+      
+    

+        //

+        // Rule 8:  KeyWord ::= c h e c k

+        //
+        keywordKind[8] = (TK_check);
+      
+    

+        //

+        // Rule 9:  KeyWord ::= s u p e r t y p e O f

+        //
+        keywordKind[9] = (TK_supertypeOf);
+      
+    

+        //

+        // Rule 10:  KeyWord ::= s u b t y p e O f

+        //
+        keywordKind[10] = (TK_subtypeOf);
+      
+    

+        //

+        // Rule 11:  KeyWord ::= t y p e O f

+        //
+        keywordKind[11] = (TK_typeOf);
+      
+    

+        //

+        // Rule 12:  KeyWord ::= i n s t a n c e O f

+        //
+        keywordKind[12] = (TK_instanceOf);
+      
+    

+        //

+        // Rule 13:  KeyWord ::= g t r u l e

+        //
+        keywordKind[13] = (TK_gtrule);
+      
+    

+        //

+        // Rule 14:  KeyWord ::= p r e c o n d i t i o n

+        //
+        keywordKind[14] = (TK_precondition);
+      
+    

+        //

+        // Rule 15:  KeyWord ::= p o s t c o n d i t i o n

+        //
+        keywordKind[15] = (TK_postcondition);
+      
+    

+        //

+        // Rule 16:  KeyWord ::= a c t i o n

+        //
+        keywordKind[16] = (TK_action);
+      
+    

+        //

+        // Rule 17:  KeyWord ::= a p p l y

+        //
+        keywordKind[17] = (TK_apply);
+      
+    

+        //

+        // Rule 18:  KeyWord ::= x o r

+        //
+        keywordKind[18] = (TK_xor);
+      
+    

+        //

+        // Rule 19:  KeyWord ::= a s m f u n c t i o n

+        //
+        keywordKind[19] = (TK_asmfunction);
+      
+    

+        //

+        // Rule 20:  KeyWord ::= r u l e

+        //
+        keywordKind[20] = (TK_rule);
+      
+    

+        //

+        // Rule 21:  KeyWord ::= o u t

+        //
+        keywordKind[21] = (TK_out);
+      
+    

+        //

+        // Rule 22:  KeyWord ::= i n o u t

+        //
+        keywordKind[22] = (TK_inout);
+      
+    

+        //

+        // Rule 23:  KeyWord ::= f a i l

+        //
+        keywordKind[23] = (TK_fail);
+      
+    

+        //

+        // Rule 24:  KeyWord ::= c a l l

+        //
+        keywordKind[24] = (TK_call);
+      
+    

+        //

+        // Rule 25:  KeyWord ::= u p d a t e

+        //
+        keywordKind[25] = (TK_update);
+      
+    

+        //

+        // Rule 26:  KeyWord ::= p r i n t

+        //
+        keywordKind[26] = (TK_print);
+      
+    

+        //

+        // Rule 27:  KeyWord ::= p r i n t l n

+        //
+        keywordKind[27] = (TK_println);
+      
+    

+        //

+        // Rule 28:  KeyWord ::= l o g

+        //
+        keywordKind[28] = (TK_log);
+      
+    

+        //

+        // Rule 29:  KeyWord ::= d e b u g

+        //
+        keywordKind[29] = (TK_debug);
+      
+    

+        //

+        // Rule 30:  KeyWord ::= i n f o

+        //
+        keywordKind[30] = (TK_info);
+      
+    

+        //

+        // Rule 31:  KeyWord ::= w a r n i n g

+        //
+        keywordKind[31] = (TK_warning);
+      
+    

+        //

+        // Rule 32:  KeyWord ::= e r r o r

+        //
+        keywordKind[32] = (TK_error);
+      
+    

+        //

+        // Rule 33:  KeyWord ::= f a t a l

+        //
+        keywordKind[33] = (TK_fatal);
+      
+    

+        //

+        // Rule 34:  KeyWord ::= s e q

+        //
+        keywordKind[34] = (TK_seq);
+      
+    

+        //

+        // Rule 35:  KeyWord ::= s h a r e a b l e

+        //
+        keywordKind[35] = (TK_shareable);
+      
+    

+        //

+        // Rule 36:  KeyWord ::= p a r a l l e l

+        //
+        keywordKind[36] = (TK_parallel);
+      
+    

+        //

+        // Rule 37:  KeyWord ::= r a n d o m

+        //
+        keywordKind[37] = (TK_random);
+      
+    

+        //

+        // Rule 38:  KeyWord ::= l e t

+        //
+        keywordKind[38] = (TK_let);
+      
+    

+        //

+        // Rule 39:  KeyWord ::= i n

+        //
+        keywordKind[39] = (TK_in);
+      
+    

+        //

+        // Rule 40:  KeyWord ::= b e l o w

+        //
+        keywordKind[40] = (TK_below);
+      
+    

+        //

+        // Rule 41:  KeyWord ::= c h o o s e

+        //
+        keywordKind[41] = (TK_choose);
+      
+    

+        //

+        // Rule 42:  KeyWord ::= f o r a l l

+        //
+        keywordKind[42] = (TK_forall);
+      
+    

+        //

+        // Rule 43:  KeyWord ::= w i t h

+        //
+        keywordKind[43] = (TK_with);
+      
+    

+        //

+        // Rule 44:  KeyWord ::= d o

+        //
+        keywordKind[44] = (TK_do);
+      
+    

+        //

+        // Rule 45:  KeyWord ::= i t e r a t e

+        //
+        keywordKind[45] = (TK_iterate);
+      
+    

+        //

+        // Rule 46:  KeyWord ::= i f

+        //
+        keywordKind[46] = (TK_if);
+      
+    

+        //

+        // Rule 47:  KeyWord ::= t r y

+        //
+        keywordKind[47] = (TK_try);
+      
+    

+        //

+        // Rule 48:  KeyWord ::= e l s e

+        //
+        keywordKind[48] = (TK_else);
+      
+    

+        //

+        // Rule 49:  KeyWord ::= w h e n

+        //
+        keywordKind[49] = (TK_when);
+      
+    

+        //

+        // Rule 50:  KeyWord ::= c h a n g e d

+        //
+        keywordKind[50] = (TK_changed);
+      
+    

+        //

+        // Rule 51:  KeyWord ::= n e w

+        //
+        keywordKind[51] = (TK_new);
+      
+    

+        //

+        // Rule 52:  KeyWord ::= d e l e t e _ c o n t e n t

+        //
+        keywordKind[52] = (TK_delete_content);
+      
+    

+        //

+        // Rule 53:  KeyWord ::= m o v e _ c o n t e n t

+        //
+        keywordKind[53] = (TK_move_content);
+      
+    

+        //

+        // Rule 54:  KeyWord ::= s k i p _ b o u n d a r y _ e d g e s

+        //
+        keywordKind[54] = (TK_skip_boundary_edges);
+      
+    

+        //

+        // Rule 55:  KeyWord ::= c o p y _ b o u n d a r y _ e d g e s

+        //
+        keywordKind[55] = (TK_copy_boundary_edges);
+      
+    

+        //

+        // Rule 56:  KeyWord ::= s k i p

+        //
+        keywordKind[56] = (TK_skip);
+      
+    

+        //

+        // Rule 57:  KeyWord ::= d e l e t e

+        //
+        keywordKind[57] = (TK_delete);
+      
+    

+        //

+        // Rule 58:  KeyWord ::= c o p y

+        //
+        keywordKind[58] = (TK_copy);
+      
+    

+        //

+        // Rule 59:  KeyWord ::= m o v e

+        //
+        keywordKind[59] = (TK_move);
+      
+    

+        //

+        // Rule 60:  KeyWord ::= r e n a m e

+        //
+        keywordKind[60] = (TK_rename);
+      
+    

+        //

+        // Rule 61:  KeyWord ::= s e t V a l u e

+        //
+        keywordKind[61] = (TK_setValue);
+      
+    

+        //

+        // Rule 62:  KeyWord ::= s e t F r o m

+        //
+        keywordKind[62] = (TK_setFrom);
+      
+    

+        //

+        // Rule 63:  KeyWord ::= s e t T o

+        //
+        keywordKind[63] = (TK_setTo);
+      
+    

+        //

+        // Rule 64:  KeyWord ::= s e t M u l t i p l i c i t y

+        //
+        keywordKind[64] = (TK_setMultiplicity);
+      
+    

+        //

+        // Rule 65:  KeyWord ::= s e t A g g r e g a t i o n

+        //
+        keywordKind[65] = (TK_setAggregation);
+      
+    

+        //

+        // Rule 66:  KeyWord ::= s e t I n v e r s e

+        //
+        keywordKind[66] = (TK_setInverse);
+      
+    

+        //

+        // Rule 67:  KeyWord ::= u n d e f

+        //
+        keywordKind[67] = (TK_undef);
+      
+    

+        //

+        // Rule 68:  KeyWord ::= t r u e

+        //
+        keywordKind[68] = (TK_true);
+      
+    

+        //

+        // Rule 69:  KeyWord ::= f a l s e

+        //
+        keywordKind[69] = (TK_false);
+      
+    

+        //

+        // Rule 70:  KeyWord ::= o n e _ t o _ o n e

+        //
+        keywordKind[70] = (TK_one_to_one);
+      
+    

+        //

+        // Rule 71:  KeyWord ::= o n e _ t o _ m a n y

+        //
+        keywordKind[71] = (TK_one_to_many);
+      
+    

+        //

+        // Rule 72:  KeyWord ::= m a n y _ t o _ o n e

+        //
+        keywordKind[72] = (TK_many_to_one);
+      
+    

+        //

+        // Rule 73:  KeyWord ::= m a n y _ t o _ m a n y

+        //
+        keywordKind[73] = (TK_many_to_many);
+      
+    

+        //

+        // Rule 74:  KeyWord ::= v a l u e

+        //
+        keywordKind[74] = (TK_value);
+      
+    

+        //

+        // Rule 75:  KeyWord ::= n a m e

+        //
+        keywordKind[75] = (TK_name);
+      
+    

+        //

+        // Rule 76:  KeyWord ::= f q n

+        //
+        keywordKind[76] = (TK_fqn);
+      
+    

+        //

+        // Rule 77:  KeyWord ::= r e f

+        //
+        keywordKind[77] = (TK_ref);
+      
+    

+        //

+        // Rule 78:  KeyWord ::= s o u r c e

+        //
+        keywordKind[78] = (TK_source);
+      
+    

+        //

+        // Rule 79:  KeyWord ::= t a r g e t

+        //
+        keywordKind[79] = (TK_target);
+      
+    

+        //

+        // Rule 80:  KeyWord ::= m u l t i p l i c i t y

+        //
+        keywordKind[80] = (TK_multiplicity);
+      
+    

+        //

+        // Rule 81:  KeyWord ::= a g g r e g a t i o n

+        //
+        keywordKind[81] = (TK_aggregation);
+      
+    

+        //

+        // Rule 82:  KeyWord ::= i n v e r s e

+        //
+        keywordKind[82] = (TK_inverse);
+      
+    

+        //

+        // Rule 83:  KeyWord ::= t o S t r i n g

+        //
+        keywordKind[83] = (TK_toString);
+      
+    

+        //

+        // Rule 84:  KeyWord ::= t o I n t e g e r

+        //
+        keywordKind[84] = (TK_toInteger);
+      
+    

+        //

+        // Rule 85:  KeyWord ::= t o B o o l e a n

+        //
+        keywordKind[85] = (TK_toBoolean);
+      
+    

+        //

+        // Rule 86:  KeyWord ::= t o D o u b l e

+        //
+        keywordKind[86] = (TK_toDouble);
+      
+    

+        //

+        // Rule 87:  KeyWord ::= t o M u l t i p l i c i t y

+        //
+        keywordKind[87] = (TK_toMultiplicity);
+      
+    
+

+        for (int i = 0; i < keywordKind.length; i++)

+        {

+            if (keywordKind[i] == 0)

+                keywordKind[i] = identifierKind;

+        }

+    }

+}

+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLKWLexerMap.g b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLKWLexerMap.g
new file mode 100644
index 0000000..4c604ee
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLKWLexerMap.g
@@ -0,0 +1,78 @@
+-- Copyright (c) 2007 OptXware Research and Development LLC.
+-- All rights reserved.   This program and the accompanying materials
+-- are made available under the terms of the Eclipse Public License v1.0
+-- which accompanies this distribution, and is available at
+-- http://www.eclipse.org/legal/epl-v10.html
+--
+-- Contributors:
+--   Daniel Varro - Initial API and implementation
+
+$Headers
+    /.
+        final static int tokenKind[] = new int[128];
+        static
+        {
+            tokenKind['_'] = Char__;
+
+            tokenKind['a'] = Char_a;
+            tokenKind['b'] = Char_b;
+            tokenKind['c'] = Char_c;
+            tokenKind['d'] = Char_d;
+            tokenKind['e'] = Char_e;
+            tokenKind['f'] = Char_f;
+            tokenKind['g'] = Char_g;
+            tokenKind['h'] = Char_h;
+            tokenKind['i'] = Char_i;
+            tokenKind['j'] = Char_j;
+            tokenKind['k'] = Char_k;
+            tokenKind['l'] = Char_l;
+            tokenKind['m'] = Char_m;
+            tokenKind['n'] = Char_n;
+            tokenKind['o'] = Char_o;
+            tokenKind['p'] = Char_p;
+            tokenKind['q'] = Char_q;
+            tokenKind['r'] = Char_r;
+            tokenKind['s'] = Char_s;
+            tokenKind['t'] = Char_t;
+            tokenKind['u'] = Char_u;
+            tokenKind['v'] = Char_v;
+            tokenKind['w'] = Char_w;
+            tokenKind['x'] = Char_x;
+            tokenKind['y'] = Char_y;
+            tokenKind['z'] = Char_z;
+
+            tokenKind['A'] = Char_A;
+            tokenKind['B'] = Char_B;
+            tokenKind['C'] = Char_C;
+            tokenKind['D'] = Char_D;
+            tokenKind['E'] = Char_E;
+            tokenKind['F'] = Char_F;
+            tokenKind['G'] = Char_G;
+            tokenKind['H'] = Char_H;
+            tokenKind['I'] = Char_I;
+            tokenKind['J'] = Char_J;
+            tokenKind['K'] = Char_K;
+            tokenKind['L'] = Char_L;
+            tokenKind['M'] = Char_M;
+            tokenKind['N'] = Char_N;
+            tokenKind['O'] = Char_O;
+            tokenKind['P'] = Char_P;
+            tokenKind['Q'] = Char_Q;
+            tokenKind['R'] = Char_R;
+            tokenKind['S'] = Char_S;
+            tokenKind['T'] = Char_T;
+            tokenKind['U'] = Char_U;
+            tokenKind['V'] = Char_V;
+            tokenKind['W'] = Char_W;
+            tokenKind['X'] = Char_X;
+            tokenKind['Y'] = Char_Y;
+            tokenKind['Z'] = Char_Z;
+        };
+    
+        final int getKind(char c)
+        {
+            return (c < 128 ? tokenKind[c] : 0);
+        }
+    ./
+$End
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLKWLexerprs.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLKWLexerprs.java
new file mode 100644
index 0000000..123e633
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLKWLexerprs.java
@@ -0,0 +1,374 @@
+/**
+*
+* Copyright (c) 2007 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Lexer
+* VTCLKWLexer.g (and btVTCLParserTemplateD.g)
+*/
+
+package org.eclipse.viatra2.lpgparser;
+
+public class VTCLKWLexerprs implements lpg.lpgjavaruntime.ParseTable, VTCLKWLexersym {
+
+    public interface IsKeyword {
+        public final static byte isKeyword[] = {0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0
+        };
+    };
+    public final static byte isKeyword[] = IsKeyword.isKeyword;
+    public final boolean isKeyword(int index) { return isKeyword[index] != 0; }
+
+    public interface BaseCheck {
+        public final static byte baseCheck[] = {0,
+            9,6,7,7,2,3,4,5,11,9,
+            6,10,6,12,13,6,5,3,11,4,
+            3,5,4,4,6,5,7,3,5,4,
+            7,5,5,3,9,8,6,3,2,5,
+            6,6,4,2,7,2,3,4,4,7,
+            3,14,12,19,19,4,6,4,4,6,
+            8,7,5,15,14,10,5,4,5,10,
+            11,11,12,5,4,3,3,6,6,12,
+            11,7,8,9,9,8,14
+        };
+    };
+    public final static byte baseCheck[] = BaseCheck.baseCheck;
+    public final int baseCheck(int index) { return baseCheck[index]; }
+    public final static byte rhs[] = baseCheck;
+    public final int rhs(int index) { return rhs[index]; };
+
+    public interface BaseAction {
+        public final static char baseAction[] = {
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,90,
+            42,45,158,54,75,84,124,117,93,134,
+            23,162,58,27,96,64,30,99,105,74,
+            126,91,161,156,163,172,174,168,67,176,
+            178,166,181,120,182,183,185,186,187,190,
+            191,193,26,197,130,198,199,201,149,132,
+            133,203,206,107,211,207,115,216,219,221,
+            217,140,18,222,223,142,225,66,227,137,
+            229,231,230,235,233,241,238,246,249,242,
+            252,254,255,256,261,257,263,265,266,267,
+            268,269,278,281,272,280,284,286,288,289,
+            291,14,293,299,292,297,302,306,44,307,
+            294,308,311,314,315,316,318,322,321,324,
+            331,329,323,325,335,337,339,340,341,346,
+            347,351,353,354,355,356,357,358,362,360,
+            364,369,366,371,373,379,380,372,383,388,
+            382,392,390,394,396,397,399,400,395,402,
+            407,403,409,411,415,416,419,417,421,423,
+            425,430,428,435,436,437,444,442,429,447,
+            448,449,451,452,457,453,459,461,465,467,
+            469,471,472,473,476,479,481,477,485,486,
+            490,492,483,493,488,497,500,501,503,504,
+            506,505,510,514,515,518,520,523,524,525,
+            530,529,534,536,538,537,542,543,539,545,
+            550,551,552,555,556,557,558,559,569,564,
+            571,575,567,576,578,580,581,582,587,584,
+            589,590,592,594,598,601,602,605,606,610,
+            613,618,620,622,616,624,625,608,628,626,
+            632,630,639,634,637,641,642,650,645,654,
+            643,648,652,146,656,658,657,659,662,668,
+            671,669,673,674,675,678,679,686,687,690,
+            688,692,694,695,696,698,699,705,701,710,
+            708,712,151,714,716,718,721,722,723,724,
+            727,729,733,730,732,735,740,742,743,747,
+            748,753,754,744,759,761,764,757,765,769,
+            767,771,773,776,774,777,780,784,788,791,
+            793,795,797,798,785,800,801,808,799,811,
+            802,816,817,809,819,813,824,825,826,828,
+            830,831,832,834,838,836,842,840,844,845,
+            846,852,859,848,850,477,477
+        };
+    };
+    public final static char baseAction[] = BaseAction.baseAction;
+    public final int baseAction(int index) { return baseAction[index]; }
+    public final static char lhs[] = baseAction;
+    public final int lhs(int index) { return lhs[index]; };
+
+    public interface TermCheck {
+        public final static byte termCheck[] = {0,
+            0,1,2,3,4,5,6,7,8,9,
+            10,11,12,0,14,15,16,0,18,19,
+            3,21,0,23,7,0,0,1,28,0,
+            4,2,10,11,12,9,7,15,9,26,
+            27,0,29,0,0,32,20,34,35,5,
+            24,26,27,0,11,30,31,0,33,6,
+            7,4,5,0,7,0,0,4,5,4,
+            13,8,6,0,0,2,3,36,0,5,
+            15,16,8,0,1,19,21,4,25,16,
+            0,18,0,1,20,0,6,5,0,4,
+            5,9,4,5,0,7,0,1,4,5,
+            4,5,0,9,0,20,0,3,2,0,
+            6,2,8,0,1,0,1,4,12,0,
+            5,0,0,0,3,16,0,4,9,0,
+            1,0,13,2,12,0,10,8,0,4,
+            0,19,11,5,4,0,25,0,1,23,
+            0,0,0,18,3,0,6,0,18,7,
+            15,0,1,0,7,0,3,0,3,14,
+            0,0,0,2,0,0,0,10,6,0,
+            0,7,0,3,14,10,0,0,0,7,
+            0,12,0,7,18,0,0,9,8,12,
+            0,6,2,7,12,0,0,2,0,1,
+            0,0,0,3,0,1,0,6,0,0,
+            0,15,0,4,0,1,4,0,12,9,
+            0,0,2,21,0,0,18,2,0,1,
+            9,0,1,0,0,0,0,20,5,5,
+            0,1,0,7,0,0,0,0,0,14,
+            6,0,4,8,3,9,9,0,16,0,
+            0,4,2,0,1,0,1,0,0,10,
+            0,0,0,0,7,3,0,7,0,1,
+            12,0,6,2,13,0,0,0,15,4,
+            0,5,5,0,0,0,6,0,3,2,
+            0,0,0,0,0,5,3,14,0,1,
+            0,17,11,3,0,13,0,1,0,0,
+            0,7,4,3,20,0,0,1,9,4,
+            0,1,0,0,0,0,0,0,3,0,
+            7,0,8,0,3,0,10,4,0,1,
+            0,0,0,16,9,23,4,18,0,0,
+            9,0,0,13,6,6,4,0,7,0,
+            3,0,1,0,0,0,0,1,0,0,
+            2,0,0,9,11,4,0,5,0,10,
+            0,22,17,7,0,0,0,7,0,0,
+            0,13,0,1,0,10,6,0,0,0,
+            6,17,3,15,0,0,0,3,11,4,
+            24,0,6,0,1,17,0,0,0,8,
+            0,0,0,5,3,8,0,7,0,7,
+            0,5,2,17,0,1,0,1,0,1,
+            0,0,0,15,2,0,0,2,0,1,
+            0,10,0,3,0,0,1,0,18,0,
+            6,0,0,1,3,19,0,8,16,0,
+            0,5,0,0,0,0,19,4,6,0,
+            10,6,3,0,0,1,12,0,1,0,
+            21,0,0,0,0,6,4,4,0,0,
+            6,2,19,0,6,0,0,0,0,3,
+            7,0,0,2,0,3,2,12,11,0,
+            0,0,3,15,0,0,0,0,0,0,
+            5,10,12,0,6,8,0,11,0,1,
+            0,17,2,10,0,0,1,0,4,0,
+            0,0,3,0,7,19,0,1,0,0,
+            9,0,4,0,0,2,13,0,18,2,
+            0,0,1,14,0,0,2,0,17,0,
+            3,6,0,4,14,0,4,0,1,0,
+            1,0,1,0,0,0,11,0,5,0,
+            3,0,1,0,5,11,0,12,0,1,
+            0,0,0,10,0,9,6,0,7,0,
+            1,0,8,0,1,0,0,0,0,12,
+            9,0,6,2,22,8,8,0,0,14,
+            0,1,0,0,0,0,4,0,0,11,
+            2,8,8,6,17,0,0,0,2,0,
+            1,0,7,0,0,0,1,0,0,2,
+            0,10,15,5,0,12,2,0,8,0,
+            16,0,3,0,3,0,1,0,11,2,
+            0,0,0,0,4,4,0,1,0,0,
+            8,0,0,5,0,22,2,14,6,0,
+            1,0,0,0,3,14,0,0,1,0,
+            8,22,0,0,8,2,0,5,0,16,
+            0,3,2,0,0,2,0,11,0,5,
+            0,3,0,0,8,0,0,5,0,0,
+            4,8,3,0,0,2,16,0,13,2,
+            0,1,0,1,0,11,0,0,0,0,
+            0,0,8,7,4,8,7,0,0,2,
+            0,13,0,3,13,0,0,2,0,3,
+            8,13,4,0,0,0,2,0,3,0,
+            0,0,2,0,3,0,13,0,1,0,
+            13,0,1,0,0,0,17,0,13,0,
+            17,0,1,14,10,10,0,14,0,1,
+            0,0,15,0,15,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0
+        };
+    };
+    public final static byte termCheck[] = TermCheck.termCheck;
+    public final int termCheck(int index) { return termCheck[index]; }
+
+    public interface TermAction {
+        public final static char termAction[] = {0,
+            477,93,110,102,106,100,96,98,109,97,
+            101,104,107,477,95,103,105,477,108,92,
+            209,91,477,94,208,477,477,139,99,477,
+            136,148,127,130,129,140,482,128,149,246,
+            248,477,247,477,477,250,138,249,251,111,
+            137,183,180,477,257,182,181,477,184,113,
+            114,132,133,477,134,39,477,145,146,217,
+            135,147,168,477,477,157,156,476,477,117,
+            218,216,116,477,118,169,215,521,144,523,
+            477,158,477,123,115,477,161,124,477,141,
+            142,125,150,152,477,151,477,198,154,155,
+            197,196,477,153,477,143,477,201,121,477,
+            200,172,202,477,119,477,159,120,122,477,
+            160,477,477,477,191,554,477,126,186,477,
+            207,477,524,212,193,477,483,206,477,397,
+            477,192,213,190,422,477,511,477,112,528,
+            477,477,477,396,131,477,162,477,421,164,
+            163,477,165,477,167,477,166,477,515,170,
+            477,477,477,173,477,477,477,505,174,477,
+            477,495,477,178,171,175,477,477,477,179,
+            477,177,477,185,176,477,477,188,189,187,
+            477,195,553,199,194,477,477,203,477,204,
+            477,477,477,498,477,214,477,210,477,477,
+            477,205,477,222,477,525,223,477,219,221,
+            477,477,526,211,477,477,220,224,477,225,
+            226,477,227,477,477,477,477,520,228,229,
+            477,497,477,231,477,477,477,477,477,230,
+            233,477,237,234,240,235,236,477,232,477,
+            477,238,239,477,545,477,242,477,477,241,
+            477,477,477,477,243,252,477,245,477,253,
+            244,477,501,255,254,477,477,477,259,256,
+            477,258,260,477,477,477,500,477,262,263,
+            477,477,477,477,477,265,266,484,477,268,
+            477,261,264,267,477,269,477,272,477,477,
+            477,271,507,274,270,477,477,276,273,275,
+            477,551,477,477,477,477,477,477,278,477,
+            509,477,277,477,279,477,506,281,477,282,
+            477,477,477,544,283,517,284,280,477,477,
+            287,477,477,494,285,286,288,477,290,477,
+            289,477,291,477,477,56,477,295,477,477,
+            296,477,477,298,293,540,477,300,477,297,
+            477,292,294,299,58,477,477,302,477,477,
+            477,301,477,546,477,304,306,477,59,477,
+            510,303,307,305,477,477,477,309,308,310,
+            485,477,311,477,312,314,477,477,477,313,
+            477,477,477,317,499,316,477,318,75,320,
+            477,319,322,315,477,323,477,502,477,537,
+            477,477,477,321,325,477,477,493,477,490,
+            477,324,477,326,477,477,329,477,514,477,
+            328,477,477,555,556,327,477,330,488,477,
+            477,332,477,477,477,477,331,336,335,477,
+            334,337,339,477,477,341,338,477,518,477,
+            333,477,477,477,26,519,342,343,477,477,
+            344,345,340,477,346,477,477,477,477,350,
+            347,477,477,351,477,352,354,348,349,477,
+            477,477,479,353,57,477,477,477,477,477,
+            357,508,355,477,360,359,477,358,477,361,
+            477,356,363,362,477,477,366,477,364,477,
+            477,477,368,477,367,365,477,370,477,477,
+            369,477,372,477,477,374,371,477,539,504,
+            477,477,376,527,477,477,481,477,373,477,
+            383,377,477,378,375,477,379,477,480,477,
+            522,477,559,477,477,477,380,477,381,477,
+            384,477,563,477,386,382,477,385,477,387,
+            477,477,477,560,477,388,389,477,390,477,
+            391,477,392,477,538,477,477,477,477,394,
+            395,477,513,401,393,399,400,477,477,398,
+            477,403,477,477,477,477,405,477,477,404,
+            562,406,407,408,402,477,477,477,409,477,
+            512,477,561,477,477,477,413,477,477,414,
+            477,411,410,415,477,412,416,477,417,477,
+            487,477,418,477,420,477,478,477,419,424,
+            477,477,477,477,425,426,477,543,477,477,
+            427,477,477,429,477,423,433,428,430,477,
+            547,477,477,477,434,432,477,477,437,477,
+            435,431,477,477,436,439,477,438,477,489,
+            477,440,558,477,477,496,477,441,477,442,
+            477,443,477,477,444,477,477,445,477,477,
+            447,446,448,477,477,449,486,477,548,450,
+            477,549,477,451,477,455,477,477,477,477,
+            477,477,452,453,457,454,456,477,477,491,
+            477,557,477,530,550,477,477,458,477,459,
+            462,460,461,477,477,477,492,477,529,477,
+            477,477,542,477,465,477,463,477,467,477,
+            564,477,468,477,477,477,464,477,541,477,
+            466,477,473,469,471,472,477,470,477,474,
+            477,477,531,477,532
+        };
+    };
+    public final static char termAction[] = TermAction.termAction;
+    public final int termAction(int index) { return termAction[index]; }
+    public final int asb(int index) { return 0; }
+    public final int asr(int index) { return 0; }
+    public final int nasb(int index) { return 0; }
+    public final int nasr(int index) { return 0; }
+    public final int terminalIndex(int index) { return 0; }
+    public final int nonterminalIndex(int index) { return 0; }
+    public final int scopePrefix(int index) { return 0;}
+    public final int scopeSuffix(int index) { return 0;}
+    public final int scopeLhs(int index) { return 0;}
+    public final int scopeLa(int index) { return 0;}
+    public final int scopeStateSet(int index) { return 0;}
+    public final int scopeRhs(int index) { return 0;}
+    public final int scopeState(int index) { return 0;}
+    public final int inSymb(int index) { return 0;}
+    public final String name(int index) { return null; }
+    public final int getErrorSymbol() { return 0; }
+    public final int getScopeUbound() { return 0; }
+    public final int getScopeSize() { return 0; }
+    public final int getMaxNameLength() { return 0; }
+
+    public final static int
+           NUM_STATES        = 386,
+           NT_OFFSET         = 54,
+           LA_STATE_OFFSET   = 564,
+           MAX_LA            = 1,
+           NUM_RULES         = 87,
+           NUM_NONTERMINALS  = 2,
+           NUM_SYMBOLS       = 56,
+           SEGMENT_SIZE      = 8192,
+           START_STATE       = 88,
+           IDENTIFIER_SYMBOL = 0,
+           EOFT_SYMBOL       = 36,
+           EOLT_SYMBOL       = 55,
+           ACCEPT_ACTION     = 476,
+           ERROR_ACTION      = 477;
+
+    public final static boolean BACKTRACK = false;
+
+    public final int getNumStates() { return NUM_STATES; }
+    public final int getNtOffset() { return NT_OFFSET; }
+    public final int getLaStateOffset() { return LA_STATE_OFFSET; }
+    public final int getMaxLa() { return MAX_LA; }
+    public final int getNumRules() { return NUM_RULES; }
+    public final int getNumNonterminals() { return NUM_NONTERMINALS; }
+    public final int getNumSymbols() { return NUM_SYMBOLS; }
+    public final int getSegmentSize() { return SEGMENT_SIZE; }
+    public final int getStartState() { return START_STATE; }
+    public final int getStartSymbol() { return lhs[0]; }
+    public final int getIdentifierSymbol() { return IDENTIFIER_SYMBOL; }
+    public final int getEoftSymbol() { return EOFT_SYMBOL; }
+    public final int getEoltSymbol() { return EOLT_SYMBOL; }
+    public final int getAcceptAction() { return ACCEPT_ACTION; }
+    public final int getErrorAction() { return ERROR_ACTION; }
+    public final boolean isValidForParser() { return isValidForParser; }
+    public final boolean getBacktrack() { return BACKTRACK; }
+
+    public final int originalState(int state) { return 0; }
+    public final int asi(int state) { return 0; }
+    public final int nasi(int state) { return 0; }
+    public final int inSymbol(int state) { return 0; }
+
+    public final int ntAction(int state, int sym) {
+        return baseAction[state + sym];
+    }
+
+    public final int tAction(int state, int sym) {
+        int i = baseAction[state],
+            k = i + sym;
+        return termAction[termCheck[k] == sym ? k : i];
+    }
+    public final int lookAhead(int la_state, int sym) {
+        int k = la_state + sym;
+        return termAction[termCheck[k] == sym ? k : la_state];
+    }
+}
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLKWLexersym.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLKWLexersym.java
new file mode 100644
index 0000000..de1b69a
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLKWLexersym.java
@@ -0,0 +1,134 @@
+/**
+*
+* Copyright (c) 2007 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Lexer
+* VTCLKWLexer.g (and btVTCLParserTemplateD.g)
+*/
+
+package org.eclipse.viatra2.lpgparser;
+
+public interface VTCLKWLexersym {
+    public final static int
+      Char_a = 5,
+      Char_b = 19,
+      Char_c = 11,
+      Char_d = 14,
+      Char_e = 1,
+      Char_f = 16,
+      Char_g = 10,
+      Char_h = 20,
+      Char_i = 8,
+      Char_j = 37,
+      Char_k = 24,
+      Char_l = 6,
+      Char_m = 18,
+      Char_n = 2,
+      Char_o = 4,
+      Char_p = 12,
+      Char_q = 25,
+      Char_r = 7,
+      Char_s = 15,
+      Char_t = 3,
+      Char_u = 9,
+      Char_v = 21,
+      Char_w = 23,
+      Char_x = 28,
+      Char_y = 13,
+      Char_z = 38,
+      Char__ = 17,
+      Char_A = 29,
+      Char_B = 30,
+      Char_C = 39,
+      Char_D = 31,
+      Char_E = 40,
+      Char_F = 32,
+      Char_G = 41,
+      Char_H = 42,
+      Char_I = 26,
+      Char_J = 43,
+      Char_K = 44,
+      Char_L = 45,
+      Char_M = 27,
+      Char_N = 46,
+      Char_O = 22,
+      Char_P = 47,
+      Char_Q = 48,
+      Char_R = 49,
+      Char_S = 33,
+      Char_T = 34,
+      Char_U = 50,
+      Char_V = 35,
+      Char_W = 51,
+      Char_X = 52,
+      Char_Y = 53,
+      Char_Z = 54,
+      Char_EOF = 36;
+
+      public final static String orderedTerminalSymbols[] = {
+                 "",
+                 "e",
+                 "n",
+                 "t",
+                 "o",
+                 "a",
+                 "l",
+                 "r",
+                 "i",
+                 "u",
+                 "g",
+                 "c",
+                 "p",
+                 "y",
+                 "d",
+                 "s",
+                 "f",
+                 "_",
+                 "m",
+                 "b",
+                 "h",
+                 "v",
+                 "O",
+                 "w",
+                 "k",
+                 "q",
+                 "I",
+                 "M",
+                 "x",
+                 "A",
+                 "B",
+                 "D",
+                 "F",
+                 "S",
+                 "T",
+                 "V",
+                 "EOF",
+                 "j",
+                 "z",
+                 "C",
+                 "E",
+                 "G",
+                 "H",
+                 "J",
+                 "K",
+                 "L",
+                 "N",
+                 "P",
+                 "Q",
+                 "R",
+                 "U",
+                 "W",
+                 "X",
+                 "Y",
+                 "Z"
+             };
+
+    public final static boolean isValidForParser = true;
+}
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLLexer.g b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLLexer.g
new file mode 100644
index 0000000..db8a6bb
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLLexer.g
@@ -0,0 +1,773 @@
+--
+-- The VTCL Lexer
+-- Copyright (c) 2007 OptXware Research and Development LLC.
+-- All rights reserved.   This program and the accompanying materials
+-- are made available under the terms of the Eclipse Public License v1.0
+-- which accompanies this distribution, and is available at
+-- http://www.eclipse.org/legal/epl-v10.html
+--
+-- Contributors:
+--   Daniel Varro - Initial API and implementation
+
+%options escape=$
+%options fp=VTCLLexer,prefix=Char_
+%options la=2
+%options single-productions
+%options package=org.eclipse.viatra2.lpgparser
+%options template=LexerTemplateD.g
+%options filter=VTCLKWLexer.g
+%options export_terminals=("VTCLParsersym.java", "TK_")
+
+$Define
+
+--	$action_class /.$file_prefix./
+--	$prs_stream_class /.PrsStream./
+--	$eof_token /.$_EOF_TOKEN./
+    --
+    -- Definition of macro used in the included file LexerBasicMapB.g
+    --
+    $kw_lexer_class /.$VTCLKWLexer./
+
+$End
+
+$Notice
+	/./**
+ * Copyright (c) 2007 OptXware Research and Development LLC.
+ * All rights reserved.   This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Daniel Varro - Initial API and implementation
+ *
+ * This file was generated automatically based upon the VTCL LPG Lexer
+ * VTCLLexer.g 
+ */
+	./
+$End
+
+-- $Globals
+-- $End
+
+$Include
+    LexerBasicMap.g
+$End
+
+-- $Headers
+-- $End
+
+
+$Export
+
+    SlComment
+    MlComment
+    DocComment
+
+    IDENTIFIER
+    StringLiteral
+    IntegerLiteral
+--    LongLiteral
+    FloatingPointLiteral
+    DoubleLiteral
+    NameLiteral
+    AnnotationLiteral
+    UpperCaseLiteral
+    DummyVariableLiteral
+    DecimalIntegerLiteral
+    
+--    PLUS_PLUS
+--    MINUS_MINUS
+    EQUAL_EQUAL
+    LESS_EQUAL
+    GREATER_EQUAL
+    NOT_EQUAL
+    NONINJECTIVE
+    LEFT_SHIFT
+    RIGHT_SHIFT
+--    UNSIGNED_RIGHT_SHIFT
+--    PLUS_EQUAL
+--    MINUS_EQUAL
+--    MULTIPLY_EQUAL
+--    DIVIDE_EQUAL
+--    AND_EQUAL
+--    OR_EQUAL
+--    XOR_EQUAL
+--    REMAINDER_EQUAL
+--    LEFT_SHIFT_EQUAL
+--    RIGHT_SHIFT_EQUAL
+--    UNSIGNED_RIGHT_SHIFT_EQUAL
+    OR_OR
+    AND_AND
+    PLUS
+    MINUS
+    NOT
+    REMAINDER
+    XOR
+    AND
+    MULTIPLY
+    OR
+    TWIDDLE
+    DIVIDE
+    GREATER
+    LESS
+    LPAREN
+    RPAREN
+    LBRACE
+    RBRACE
+    LBRACKET
+    RBRACKET
+    SEMICOLON
+    QUESTION
+    COLON
+    COMMA
+    DOT
+    EQUAL
+    RIGHTARROW
+    HASHMARK
+
+$End
+
+$Terminals
+    CtlCharNotWS
+
+    LF   CR   HT   FF
+
+    a    b    c    d    e    f    g    h    i    j    k    l    m
+    n    o    p    q    r    s    t    u    v    w    x    y    z
+    _
+
+    A    B    C    D    E    F    G    H    I    J    K    L    M
+    N    O    P    Q    R    S    T    U    V    W    X    Y    Z
+
+    0    1    2    3    4    5    6    7    8    9
+
+    Space        ::= ' '
+    AfterASCII   ::= '\u0080..\ufffe'
+    LF           ::= NewLine
+    CR           ::= Return
+    HT           ::= HorizontalTab
+    FF           ::= FormFeed
+    DoubleQuote  ::= '"'
+    SingleQuote  ::= "'"
+    Percent      ::= '%'
+    VerticalBar  ::= '|'
+    Exclamation  ::= '!'
+    AtSign       ::= '@'
+    BackQuote    ::= '`'
+    Tilde        ::= '~'
+    Sharp        ::= '#'
+    DollarSign   ::= '$'
+    Ampersand    ::= '&'
+    Caret        ::= '^'
+    Colon        ::= ':'
+    SemiColon    ::= ';'
+    BackSlash    ::= '\'
+    LeftBrace    ::= '{'
+    RightBrace   ::= '}'
+    LeftBracket  ::= '['
+    RightBracket ::= ']'
+    QuestionMark ::= '?'
+    Comma        ::= ','
+    Dot          ::= '.'
+    LessThan     ::= '<'
+    GreaterThan  ::= '>'
+    Plus         ::= '+'
+    Minus        ::= '-'
+    Slash        ::= '/'
+    Star         ::= '*'
+    LeftParen    ::= '('
+    RightParen   ::= ')'
+    Equal        ::= '='
+    
+$End
+
+$Start
+    Token
+$End
+
+$Rules
+
+    ---------------------  Rules for Scanned Tokens --------------------------------
+    -- The lexer creates an array list of tokens which is defined in the PrsStream class.
+    -- A token has three attributes: a start offset, an end offset and a kind.
+    -- 
+    -- Only rules that produce complete tokens have actions to create token objects.
+    -- When making a token, calls to the methods, $getToken(1) and $getRightSpan(), 
+    -- provide the offsets (i.e. the span) of a rule's right hand side (rhs) and thus of the token.
+    -- For a rule of the form A ::= A1 A2 ... An, the start offset of the rhs of A is given by
+    -- $getToken(1) or by $getLeftSpan() and the end offset by $getRightSpan().
+    --  
+    -- Regarding rules for parsing in general, note that for a rhs symbol Ai, the 
+    -- method $getToken(i) returns the location of the leftmost character derived from Ai.  
+    -- The method $getLeftSpan(i) returns the same location unless Ai produces $empty in which case
+    -- it returns the location of the last character derived before reducing Ai to $empty. 
+    -- The method $getRightSpan(i) returns the location of the rightmost character derived from Ai 
+    -- unless Ai produces $empty in which case it returns the location of the last character 
+    -- derived before reducing Ai to $empty.
+    --------------------------------------------------------------------------------
+    
+    -- Identifier corresponds to alphanum
+    Token ::= Identifier
+        /.$BeginAction
+                    checkForKeyWord();
+          $EndAction
+        ./
+    Token ::= DoubleQuote SLBody DoubleQuote
+        /.$BeginAction
+                    makeToken($_StringLiteral);
+          $EndAction
+        ./
+    Token ::= SingleQuote NameBody SingleQuote 
+        /.$BeginAction
+                    makeToken($_NameLiteral);
+          $EndAction
+        ./
+    Token ::= AtSign LiteralStartsWithLetter
+        /.$BeginAction
+                    makeToken($_AnnotationLiteral);
+          $EndAction
+        ./
+    Token ::= UpperCaseLiteral
+        /.$BeginAction
+                    makeToken($_UpperCaseLiteral);
+          $EndAction
+        ./
+
+    Token ::= DummyVariableLiteral
+        /.$BeginAction
+                    makeToken($_DummyVariableLiteral);
+          $EndAction
+        ./
+        
+    Token ::= IntegerLiteral
+        /.$BeginAction
+                    makeToken($_IntegerLiteral);
+          $EndAction
+        ./
+    Token ::= DecimalIntegerLiteral
+        /.$BeginAction
+                    makeToken($_DecimalIntegerLiteral);
+          $EndAction
+        ./
+    Token ::= FloatingPointLiteral
+        /.$BeginAction
+                    makeToken($_FloatingPointLiteral);
+          $EndAction
+        ./
+    Token ::= DoubleLiteral
+        /.$BeginAction
+                    makeToken($_DoubleLiteral);
+          $EndAction
+        ./
+    Token ::= '/' '*' Inside Stars '/'
+        /.$BeginAction
+					makeComment($_MlComment);
+          $EndAction
+        ./
+    Token ::= '/' '*' '*' Inside Stars '/'
+        /.$BeginAction
+                      makeComment($_DocComment);
+          $EndAction
+        ./
+    Token ::= SLC
+        /.$BeginAction
+                    makeComment($_SlComment);
+          $EndAction
+        ./
+    Token ::= WS -- White Space is scanned but not added to output vector
+        /.$BeginAction
+                    skipToken();
+          $EndAction
+        ./
+    Token ::= '+'
+        /.$BeginAction
+                    makeToken($_PLUS);
+          $EndAction
+        ./
+    Token ::= '-'
+        /.$BeginAction
+                    makeToken($_MINUS);
+          $EndAction
+        ./
+
+    Token ::= '*'
+        /.$BeginAction
+                    makeToken($_MULTIPLY);
+          $EndAction
+        ./
+
+    Token ::= '/'
+        /.$BeginAction
+                    makeToken($_DIVIDE);
+          $EndAction
+        ./
+
+    Token ::= '('
+        /.$BeginAction
+                    makeToken($_LPAREN);
+          $EndAction
+        ./
+
+    Token ::= ')'
+        /.$BeginAction
+                    makeToken($_RPAREN);
+          $EndAction
+        ./
+
+    Token ::= '='
+        /.$BeginAction
+                    makeToken($_EQUAL);
+          $EndAction
+        ./
+
+    Token ::= ','
+        /.$BeginAction
+                    makeToken($_COMMA);
+          $EndAction
+        ./
+
+    Token ::= ':'
+        /.$BeginAction
+                    makeToken($_COLON);
+          $EndAction
+        ./
+
+    Token ::= ';'
+        /.$BeginAction
+                    makeToken($_SEMICOLON);
+          $EndAction
+        ./
+
+    Token ::= '^'
+        /.$BeginAction
+                    makeToken($_XOR);
+          $EndAction
+        ./
+
+    Token ::= '%'
+        /.$BeginAction
+                    makeToken($_REMAINDER);
+          $EndAction
+        ./
+
+    Token ::= '~'
+        /.$BeginAction
+                    makeToken($_TWIDDLE);
+          $EndAction
+        ./
+
+    Token ::= '|'
+        /.$BeginAction
+                    makeToken($_OR);
+          $EndAction
+        ./
+
+    Token ::= '&'
+        /.$BeginAction
+                    makeToken($_AND);
+          $EndAction
+        ./
+
+    Token ::= '<'
+        /.$BeginAction
+                    makeToken($_LESS);
+          $EndAction
+        ./
+
+    Token ::= '>'
+        /.$BeginAction
+                    makeToken($_GREATER);
+          $EndAction
+        ./
+
+    Token ::= '.'
+        /.$BeginAction
+                    makeToken($_DOT);
+          $EndAction
+        ./
+
+    Token ::= '!'
+        /.$BeginAction
+                    makeToken($_NOT);
+          $EndAction
+        ./
+
+    Token ::= '['
+        /.$BeginAction
+                    makeToken($_LBRACKET);
+          $EndAction
+        ./
+
+    Token ::= ']'
+        /.$BeginAction
+                    makeToken($_RBRACKET);
+          $EndAction
+        ./
+
+    Token ::= '{'
+        /.$BeginAction
+                    makeToken($_LBRACE);
+          $EndAction
+        ./
+
+    Token ::= '}'
+        /.$BeginAction
+                    makeToken($_RBRACE);
+          $EndAction
+        ./
+
+    Token ::= '?'
+        /.$BeginAction
+                    makeToken($_QUESTION);
+          $EndAction
+        ./
+
+    Token ::= '#'
+        /.$BeginAction
+                    makeToken($_HASHMARK);
+          $EndAction
+        ./
+
+--    Token ::= '+' '+'
+--        /.$BeginAction
+--                    makeToken($_PLUS_PLUS);
+--          $EndAction
+--        ./
+
+--    Token ::= '-' '-'
+--        /.$BeginAction
+--                    makeToken($_MINUS_MINUS);
+--          $EndAction
+--        ./
+
+    Token ::= '=' '='
+        /.$BeginAction
+                    makeToken($_EQUAL_EQUAL);
+          $EndAction
+        ./
+
+    Token ::= '<' '='
+        /.$BeginAction
+                    makeToken($_LESS_EQUAL);
+          $EndAction
+        ./
+
+    Token ::= '>' '='
+        /.$BeginAction
+                    makeToken($_GREATER_EQUAL);
+          $EndAction
+        ./
+
+    Token ::= '!' '='
+        /.$BeginAction
+                    makeToken($_NOT_EQUAL);
+          $EndAction
+        ./
+
+    Token ::= '=' '/' '='
+        /.$BeginAction
+                    makeToken($_NONINJECTIVE);
+          $EndAction
+        ./
+
+--    Token ::= '<' '<'
+--        /.$BeginAction
+--                    makeToken($_LEFT_SHIFT);
+--          $EndAction
+--        ./
+
+--    Token ::= '>' '>'
+--        /.$BeginAction
+--                    makeToken($_RIGHT_SHIFT);
+--          $EndAction
+--        ./
+
+--    Token ::= '>' '>' '>'
+--        /.$BeginAction
+--                    makeToken($_UNSIGNED_RIGHT_SHIFT);
+--          $EndAction
+--        ./
+
+--    Token ::= '+' '='
+--        /.$BeginAction
+--                    makeToken($_PLUS_EQUAL);
+--          $EndAction
+--        ./
+
+--    Token ::= '-' '='
+--        /.$BeginAction
+--                    makeToken($_MINUS_EQUAL);
+--          $EndAction
+--        ./
+
+--    Token ::= '*' '='
+--        /.$BeginAction
+--                    makeToken($_MULTIPLY_EQUAL);
+--          $EndAction
+--        ./
+
+--    Token ::= '/' '='
+--        /.$BeginAction
+--                    makeToken($_DIVIDE_EQUAL);
+--          $EndAction
+--        ./
+
+--    Token ::= '&' '='
+--        /.$BeginAction
+--                    makeToken($_AND_EQUAL);
+--          $EndAction
+--        ./
+
+--    Token ::= '|' '='
+--        /.$BeginAction
+--                    makeToken($_OR_EQUAL);
+--          $EndAction
+--        ./
+
+--    Token ::= '^' '='
+--        /.$BeginAction
+--                    makeToken($_XOR_EQUAL);
+--          $EndAction
+--        ./
+
+--    Token ::= '%' '='
+--        /.$BeginAction
+--                    makeToken($_REMAINDER_EQUAL);
+--          $EndAction
+--        ./
+
+--    Token ::= '<' '<' '='
+--        /.$BeginAction
+--                    makeToken($_LEFT_SHIFT_EQUAL);
+--          $EndAction
+--        ./
+
+--    Token ::= '>' '>' '='
+--        /.$BeginAction
+--                    makeToken($_RIGHT_SHIFT_EQUAL);
+--          $EndAction
+--        ./
+
+--    Token ::= '>' '>' '>' '='
+--        /.$BeginAction
+--                   makeToken($_UNSIGNED_RIGHT_SHIFT_EQUAL);
+--          $EndAction
+--        ./
+
+    Token ::= '|' '|'
+        /.$BeginAction
+                    makeToken($_OR_OR);
+          $EndAction
+        ./
+
+    Token ::= '&' '&'
+        /.$BeginAction
+                    makeToken($_AND_AND);
+          $EndAction
+        ./
+
+    Token ::= '-' '>'
+        /.$BeginAction
+                    makeToken($_RIGHTARROW);
+          $EndAction
+        ./
+
+--    Identifier -> Letter
+--                | Identifier Letter
+--                | Identifier Digit
+--                | Identifier _
+
+    Identifier -> LowerCaseLetter
+	        | LowerCaseLetter Alphanum
+
+    DummyVariableLiteral -> _
+          | _ Alphanum
+          
+    UpperCaseLiteral -> UpperCaseLetter
+		      | UpperCaseLetter Alphanum
+
+    LiteralStartsWithLetter -> Identifier 
+                             | UpperCaseLiteral
+
+    DecimalIntegerLiteral -> Integer
+
+    IntegerLiteral -> -- Integer | 
+                      Integer LetterLl
+                    | '0' LetterXx HexDigits
+                    | '0' LetterXx HexDigits LetterLl
+
+    DoubleLiteral -> Decimal
+                   | Decimal LetterForD
+                   | Decimal Exponent
+                   | Decimal Exponent LetterForD
+                   | Integer Exponent
+                   | Integer Exponent LetterForD
+                   | Integer LetterForD
+
+    FloatingPointLiteral -> Decimal LetterForF
+                          | Decimal Exponent LetterForF
+                          | Integer Exponent LetterForF
+                          | Integer LetterForF
+
+    Inside ::= Inside Stars NotSlashOrStar
+             | Inside '/'
+             | Inside NotSlashOrStar
+             | $empty
+
+    Stars -> '*'
+           | Stars '*'
+
+    SLC ::= '/' '/'
+          | SLC NotEol
+
+    SLBody ::= $empty
+             | SLBody NotDQ
+
+    NameBody -> NotSQNotDot 
+   	      | NameBody NotSQNotDot
+
+	
+	-- Alphanum can consist of a single _
+    Alphanum ->  Letter
+	       | Digit
+               | Alphanum Letter 
+               | Alphanum Digit 
+
+	
+    Integer -> Digit
+             | Integer Digit
+
+    HexDigits -> HexDigit
+               | HexDigits HexDigit
+
+    Decimal ::= '.' Integer
+              | Integer '.'
+              | Integer '.' Integer
+
+    Exponent ::= LetterEe Integer
+               | LetterEe '-' Integer
+               | LetterEe '+' Integer
+
+    WSChar -> Space
+            | LF
+            | CR
+            | HT
+            | FF
+
+    Letter -> LowerCaseLetter
+            | UpperCaseLetter
+            | _
+            | '$'
+            | AfterASCII
+
+    LowerCaseLetter -> a | b | c | d | e | f | g | h | i | j | k | l | m |
+                       n | o | p | q | r | s | t | u | v | w | x | y | z --|
+                       --� | � | � | � | � | � | � | � 
+
+    UpperCaseLetter -> A | B | C | D | E | F | G | H | I | J | K | L | M |
+                       N | O | P | Q | R | S | T | U | V | W | X | Y | Z --|
+                       --� | � | � | � | � | � | � | � 
+                       
+
+    Digit -> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
+
+    OctalDigit -> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7
+
+    a..f -> a | b | c | d | e | f | A | B | C | D | E | F
+
+    HexDigit -> Digit
+              | a..f
+
+--    OctalDigits3 -> OctalDigit
+--                  | OctalDigit OctalDigit
+--                  | OctalDigit OctalDigit OctalDigit
+
+    LetterForD -> 'D'
+                | 'd'
+
+    LetterForF -> 'F'
+                | 'f'
+
+    LetterLl -> 'L'
+              | 'l'
+
+    LetterEe -> 'E'
+              | 'e'
+
+    LetterXx -> 'X'
+              | 'x'
+
+
+    WS -> WSChar
+        | WS WSChar
+
+
+    SpecialNotStar -> '+' | '-' | '/' | '(' | ')' | '"' | '!' | '@' | '`' | '~' |
+                      '%' | '&' | '^' | ':' | ';' | "'" | '\' | '|' | '{' | '}' |
+                      '[' | ']' | '?' | ',' | '.' | '<' | '>' | '=' | '#'
+
+    SpecialNotSlash -> '+' | '-' | -- exclude the star as well
+                       '(' | ')' | '"' | '!' | '@' | '`' | '~' |
+                       '%' | '&' | '^' | ':' | ';' | "'" | '\' | '|' | '{' | '}' |
+                       '[' | ']' | '?' | ',' | '.' | '<' | '>' | '=' | '#'
+
+    SpecialNotDQ -> '+' | '-' | '/' | '(' | ')' | '*' | '!' | '@' | '`' | '~' |
+                    '%' | '&' | '^' | ':' | ';' | "'" | '|' | '{' | '}' |
+                    '[' | ']' | '?' | ',' | '.' | '<' | '>' | '=' | '#'
+
+--    SpecialNotSQ -> '+' | '-' | '*' | '(' | ')' | '"' | '!' | '@' | '`' | '~' |
+--                    '%' | '&' | '^' | ':' | ';' | '/' | '|' | '{' | '}' |
+--                    '[' | ']' | '?' | ',' | '.' | '<' | '>' | '=' | '#'
+
+    SpecialNotSQNotDot -> '+' | '-' | '*' | '(' | ')' | '"' | '!' | '@' | '`' | '~' |
+                    '%' | '&' | '^' | ':' | ';' | '/' | '|' | '{' | '}' |
+                    '[' | ']' | '?' | ',' | '<' | '>' | '=' | '#'
+
+    NotSlashOrStar -> Letter
+                    | Digit
+                    | SpecialNotSlash
+                    | WSChar
+
+    NotEol -> Letter
+            | Digit
+            | Space
+            | '*'
+            | SpecialNotStar
+            | HT
+            | FF
+            | CtlCharNotWS
+
+    NotDQ -> Letter
+           | Digit
+           | SpecialNotDQ
+           | Space
+           | HT
+           | FF
+           | EscapeSequence
+           | '\' u HexDigit HexDigit HexDigit HexDigit
+           | '\' OctalDigit
+
+--    NotSQ -> Letter
+--           | Digit
+--           | SpecialNotSQ
+--           | Space
+--           | HT
+--           | FF
+--           | EscapeSequence
+--           | '\' u HexDigit HexDigit HexDigit HexDigit
+--           | '\' OctalDigits3
+	
+	NotSQNotDot -> Letter
+           | Digit
+           | SpecialNotSQNotDot
+	
+    EscapeSequence ::= '\' b
+                     | '\' t
+                     | '\' n
+                     | '\' f
+                     | '\' r
+                     | '\' '"'
+                     | '\' "'"
+                     | '\' '\'
+$End
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLLexer.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLLexer.java
new file mode 100644
index 0000000..4cd2cbd
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLLexer.java
@@ -0,0 +1,681 @@
+/**
+* Copyright (c) 2007 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Lexer
+* VTCLLexer.g 
+*/
+
+package org.eclipse.viatra2.lpgparser;
+
+import lpg.lpgjavaruntime.*;

+
+public class VTCLLexer extends LpgLexStream implements VTCLParsersym, VTCLLexersym, RuleAction

+{

+    private static ParseTable prs = new VTCLLexerprs();

+    private PrsStream prsStream;

+    private LexParser lexParser = new LexParser(this, prs, this);

+

+    public PrsStream getPrsStream() { return prsStream; }

+    public int getToken(int i) { return lexParser.getToken(i); }

+    public int getRhsFirstTokenIndex(int i) { return lexParser.getFirstToken(i); }

+    public int getRhsLastTokenIndex(int i) { return lexParser.getLastToken(i); }

+

+    public int getLeftSpan() { return lexParser.getFirstToken(); }

+    public int getRightSpan() { return lexParser.getLastToken(); }

+

+    public VTCLLexer(String filename, int tab) throws java.io.IOException 

+    {

+        super(filename, tab);

+    }

+

+    public VTCLLexer(char[] input_chars, String filename, int tab)

+    {

+        super(input_chars, filename, tab);

+    }

+

+    public VTCLLexer(char[] input_chars, String filename)

+    {

+        this(input_chars, filename, 1);

+    }

+

+    public VTCLLexer() {}

+

+    public String[] orderedExportedSymbols() { return VTCLParsersym.orderedTerminalSymbols; }

+    public LexStream getLexStream() { return (LexStream) this; }

+

+    public void lexer(PrsStream prsStream)

+    {

+        lexer(null, prsStream);

+    }

+    

+    public void lexer(Monitor monitor, PrsStream prsStream)

+    {

+        if (getInputChars() == null)

+            throw new NullPointerException("LexStream was not initialized");

+

+        this.prsStream = prsStream;

+

+        prsStream.makeToken(0, 0, 0); // Token list must start with a bad token

+            

+        lexParser.parseCharacters(monitor);  // Lex the input characters

+            

+        int i = getStreamIndex();

+        prsStream.makeToken(i, i, TK_EOF_TOKEN); // and end with the end of file token

+        prsStream.setStreamLength(prsStream.getSize());

+            

+        return;

+    }

+
+    //

+    // The Lexer contains an array of characters as the input stream to be parsed.

+    // There are methods to retrieve and classify characters.

+    // The lexparser "token" is implemented simply as the index of the next character in the array.

+    // The Lexer extends the abstract class LpgLexStream with an implementation of the abstract

+    // method getKind.  The template defines the Lexer class and the lexer() method.

+    // A driver creates the action class, "Lexer", passing an Option object to the constructor.

+    //

+    VTCLKWLexer kwLexer;

+    boolean printTokens;

+    private final static int ECLIPSE_TAB_VALUE = 4;

+

+    public int [] getKeywordKinds() { return kwLexer.getKeywordKinds(); }

+

+    public VTCLLexer(String filename) throws java.io.IOException

+    {

+        this(filename, ECLIPSE_TAB_VALUE);

+        this.kwLexer = new VTCLKWLexer(getInputChars(), TK_IDENTIFIER);

+    }

+

+    public VTCLLexer(Option option) throws java.io.IOException

+    {

+        this(option.getFileName(), ECLIPSE_TAB_VALUE);

+        this.printTokens = option.printTokens();

+        this.kwLexer = new VTCLKWLexer(getInputChars(), TK_IDENTIFIER);

+    }

+

+    public void initialize(char [] content, String filename)

+    {

+        super.initialize(content, filename);

+        if (this.kwLexer == null)

+             this.kwLexer = new VTCLKWLexer(getInputChars(), TK_IDENTIFIER);

+        else this.kwLexer.setInputChars(getInputChars());

+    }

+    

+    final void makeToken(int kind)

+    {

+        int startOffset = getLeftSpan(),

+            endOffset = getRightSpan();

+        makeToken(startOffset, endOffset, kind);

+        if (printTokens) printValue(startOffset, endOffset);

+    }

+

+    final void makeComment(int kind)

+    {

+        int startOffset = getLeftSpan(),

+            endOffset = getRightSpan();

+        super.getPrsStream().makeAdjunct(startOffset, endOffset, kind);

+    }

+

+    final void skipToken()

+    {

+        if (printTokens) printValue(getLeftSpan(), getRightSpan());

+    }

+    

+    final void checkForKeyWord()

+    {

+        int startOffset = getLeftSpan(),

+            endOffset = getRightSpan(),

+        kwKind = kwLexer.lexer(startOffset, endOffset);

+        makeToken(startOffset, endOffset, kwKind);

+        if (printTokens) printValue(startOffset, endOffset);

+    }

+    

+    final void printValue(int startOffset, int endOffset)

+    {

+        String s = new String(getInputChars(), startOffset, endOffset - startOffset + 1);

+        System.out.print(s);

+    }

+

+    //

+    //

+    //

+    public final static int tokenKind[] =

+    {

+        Char_CtlCharNotWS,    // 000    0x00

+        Char_CtlCharNotWS,    // 001    0x01

+        Char_CtlCharNotWS,    // 002    0x02

+        Char_CtlCharNotWS,    // 003    0x03

+        Char_CtlCharNotWS,    // 004    0x04

+        Char_CtlCharNotWS,    // 005    0x05

+        Char_CtlCharNotWS,    // 006    0x06

+        Char_CtlCharNotWS,    // 007    0x07

+        Char_CtlCharNotWS,    // 008    0x08

+        Char_HT,              // 009    0x09

+        Char_LF,              // 010    0x0A

+        Char_CtlCharNotWS,    // 011    0x0B

+        Char_FF,              // 012    0x0C

+        Char_CR,              // 013    0x0D

+        Char_CtlCharNotWS,    // 014    0x0E

+        Char_CtlCharNotWS,    // 015    0x0F

+        Char_CtlCharNotWS,    // 016    0x10

+        Char_CtlCharNotWS,    // 017    0x11

+        Char_CtlCharNotWS,    // 018    0x12

+        Char_CtlCharNotWS,    // 019    0x13

+        Char_CtlCharNotWS,    // 020    0x14

+        Char_CtlCharNotWS,    // 021    0x15

+        Char_CtlCharNotWS,    // 022    0x16

+        Char_CtlCharNotWS,    // 023    0x17

+        Char_CtlCharNotWS,    // 024    0x18

+        Char_CtlCharNotWS,    // 025    0x19

+        Char_CtlCharNotWS,    // 026    0x1A

+        Char_CtlCharNotWS,    // 027    0x1B

+        Char_CtlCharNotWS,    // 028    0x1C

+        Char_CtlCharNotWS,    // 029    0x1D

+        Char_CtlCharNotWS,    // 030    0x1E

+        Char_CtlCharNotWS,    // 031    0x1F

+        Char_Space,           // 032    0x20

+        Char_Exclamation,     // 033    0x21

+        Char_DoubleQuote,     // 034    0x22

+        Char_Sharp,           // 035    0x23

+        Char_DollarSign,      // 036    0x24

+        Char_Percent,         // 037    0x25

+        Char_Ampersand,       // 038    0x26

+        Char_SingleQuote,     // 039    0x27

+        Char_LeftParen,       // 040    0x28

+        Char_RightParen,      // 041    0x29

+        Char_Star,            // 042    0x2A

+        Char_Plus,            // 043    0x2B

+        Char_Comma,           // 044    0x2C

+        Char_Minus,           // 045    0x2D

+        Char_Dot,             // 046    0x2E

+        Char_Slash,           // 047    0x2F

+        Char_0,               // 048    0x30

+        Char_1,               // 049    0x31

+        Char_2,               // 050    0x32

+        Char_3,               // 051    0x33

+        Char_4,               // 052    0x34

+        Char_5,               // 053    0x35

+        Char_6,               // 054    0x36

+        Char_7,               // 055    0x37

+        Char_8,               // 056    0x38

+        Char_9,               // 057    0x39

+        Char_Colon,           // 058    0x3A

+        Char_SemiColon,       // 059    0x3B

+        Char_LessThan,        // 060    0x3C

+        Char_Equal,           // 061    0x3D

+        Char_GreaterThan,     // 062    0x3E

+        Char_QuestionMark,    // 063    0x3F

+        Char_AtSign,          // 064    0x40

+        Char_A,               // 065    0x41

+        Char_B,               // 066    0x42

+        Char_C,               // 067    0x43

+        Char_D,               // 068    0x44

+        Char_E,               // 069    0x45

+        Char_F,               // 070    0x46

+        Char_G,               // 071    0x47

+        Char_H,               // 072    0x48

+        Char_I,               // 073    0x49

+        Char_J,               // 074    0x4A

+        Char_K,               // 075    0x4B

+        Char_L,               // 076    0x4C

+        Char_M,               // 077    0x4D

+        Char_N,               // 078    0x4E

+        Char_O,               // 079    0x4F

+        Char_P,               // 080    0x50

+        Char_Q,               // 081    0x51

+        Char_R,               // 082    0x52

+        Char_S,               // 083    0x53

+        Char_T,               // 084    0x54

+        Char_U,               // 085    0x55

+        Char_V,               // 086    0x56

+        Char_W,               // 087    0x57

+        Char_X,               // 088    0x58

+        Char_Y,               // 089    0x59

+        Char_Z,               // 090    0x5A

+        Char_LeftBracket,     // 091    0x5B

+        Char_BackSlash,       // 092    0x5C

+        Char_RightBracket,    // 093    0x5D

+        Char_Caret,           // 094    0x5E

+        Char__,               // 095    0x5F

+        Char_BackQuote,       // 096    0x60

+        Char_a,               // 097    0x61

+        Char_b,               // 098    0x62

+        Char_c,               // 099    0x63

+        Char_d,               // 100    0x64

+        Char_e,               // 101    0x65

+        Char_f,               // 102    0x66

+        Char_g,               // 103    0x67

+        Char_h,               // 104    0x68

+        Char_i,               // 105    0x69

+        Char_j,               // 106    0x6A

+        Char_k,               // 107    0x6B

+        Char_l,               // 108    0x6C

+        Char_m,               // 109    0x6D

+        Char_n,               // 110    0x6E

+        Char_o,               // 111    0x6F

+        Char_p,               // 112    0x70

+        Char_q,               // 113    0x71

+        Char_r,               // 114    0x72

+        Char_s,               // 115    0x73

+        Char_t,               // 116    0x74

+        Char_u,               // 117    0x75

+        Char_v,               // 118    0x76

+        Char_w,               // 119    0x77

+        Char_x,               // 120    0x78

+        Char_y,               // 121    0x79

+        Char_z,               // 122    0x7A

+        Char_LeftBrace,       // 123    0x7B

+        Char_VerticalBar,     // 124    0x7C

+        Char_RightBrace,      // 125    0x7D

+        Char_Tilde,           // 126    0x7E

+

+        Char_AfterASCII,      // for all chars in range 128..65534

+        Char_EOF              // for '\uffff' or 65535 

+    };

+            

+    public final int getKind(int i)  // Classify character at ith location

+    {

+        char c = (i >= getStreamLength() ? '\uffff' : getCharValue(i));

+        return (c < 128 // ASCII Character

+                  ? tokenKind[c]

+                  : c == '\uffff'

+                       ? Char_EOF

+                       : Char_AfterASCII);

+    }

+

+    public void ruleAction( int ruleNumber)

+    {

+        switch(ruleNumber)

+        {
+ 

+            //

+            // Rule 1:  Token ::= Identifier

+            //

+            case 1: { 
+                checkForKeyWord();
+                break;

+            }
+     

+            //

+            // Rule 2:  Token ::= DoubleQuote SLBody DoubleQuote

+            //

+            case 2: { 
+                makeToken(TK_StringLiteral);
+                break;

+            }
+     

+            //

+            // Rule 3:  Token ::= SingleQuote NameBody SingleQuote

+            //

+            case 3: { 
+                makeToken(TK_NameLiteral);
+                break;

+            }
+     

+            //

+            // Rule 4:  Token ::= AtSign LiteralStartsWithLetter

+            //

+            case 4: { 
+                makeToken(TK_AnnotationLiteral);
+                break;

+            }
+     

+            //

+            // Rule 5:  Token ::= UpperCaseLiteral

+            //

+            case 5: { 
+                makeToken(TK_UpperCaseLiteral);
+                break;

+            }
+     

+            //

+            // Rule 6:  Token ::= DummyVariableLiteral

+            //

+            case 6: { 
+                makeToken(TK_DummyVariableLiteral);
+                break;

+            }
+     

+            //

+            // Rule 7:  Token ::= IntegerLiteral

+            //

+            case 7: { 
+                makeToken(TK_IntegerLiteral);
+                break;

+            }
+     

+            //

+            // Rule 8:  Token ::= DecimalIntegerLiteral

+            //

+            case 8: { 
+                makeToken(TK_DecimalIntegerLiteral);
+                break;

+            }
+     

+            //

+            // Rule 9:  Token ::= FloatingPointLiteral

+            //

+            case 9: { 
+                makeToken(TK_FloatingPointLiteral);
+                break;

+            }
+     

+            //

+            // Rule 10:  Token ::= DoubleLiteral

+            //

+            case 10: { 
+                makeToken(TK_DoubleLiteral);
+                break;

+            }
+     

+            //

+            // Rule 11:  Token ::= / * Inside Stars /

+            //

+            case 11: { 
+				makeComment(TK_MlComment);
+                break;

+            }
+     

+            //

+            // Rule 12:  Token ::= / * * Inside Stars /

+            //

+            case 12: { 
+                  makeComment(TK_DocComment);
+                break;

+            }
+     

+            //

+            // Rule 13:  Token ::= SLC

+            //

+            case 13: { 
+                makeComment(TK_SlComment);
+                break;

+            }
+     

+            //

+            // Rule 14:  Token ::= WS

+            //

+            case 14: { 
+                skipToken();
+                break;

+            }
+     

+            //

+            // Rule 15:  Token ::= +

+            //

+            case 15: { 
+                makeToken(TK_PLUS);
+                break;

+            }
+     

+            //

+            // Rule 16:  Token ::= -

+            //

+            case 16: { 
+                makeToken(TK_MINUS);
+                break;

+            }
+     

+            //

+            // Rule 17:  Token ::= *

+            //

+            case 17: { 
+                makeToken(TK_MULTIPLY);
+                break;

+            }
+     

+            //

+            // Rule 18:  Token ::= /

+            //

+            case 18: { 
+                makeToken(TK_DIVIDE);
+                break;

+            }
+     

+            //

+            // Rule 19:  Token ::= (

+            //

+            case 19: { 
+                makeToken(TK_LPAREN);
+                break;

+            }
+     

+            //

+            // Rule 20:  Token ::= )

+            //

+            case 20: { 
+                makeToken(TK_RPAREN);
+                break;

+            }
+     

+            //

+            // Rule 21:  Token ::= =

+            //

+            case 21: { 
+                makeToken(TK_EQUAL);
+                break;

+            }
+     

+            //

+            // Rule 22:  Token ::= ,

+            //

+            case 22: { 
+                makeToken(TK_COMMA);
+                break;

+            }
+     

+            //

+            // Rule 23:  Token ::= :

+            //

+            case 23: { 
+                makeToken(TK_COLON);
+                break;

+            }
+     

+            //

+            // Rule 24:  Token ::= ;

+            //

+            case 24: { 
+                makeToken(TK_SEMICOLON);
+                break;

+            }
+     

+            //

+            // Rule 25:  Token ::= ^

+            //

+            case 25: { 
+                makeToken(TK_XOR);
+                break;

+            }
+     

+            //

+            // Rule 26:  Token ::= %

+            //

+            case 26: { 
+                makeToken(TK_REMAINDER);
+                break;

+            }
+     

+            //

+            // Rule 27:  Token ::= ~

+            //

+            case 27: { 
+                makeToken(TK_TWIDDLE);
+                break;

+            }
+     

+            //

+            // Rule 28:  Token ::= |

+            //

+            case 28: { 
+                makeToken(TK_OR);
+                break;

+            }
+     

+            //

+            // Rule 29:  Token ::= &

+            //

+            case 29: { 
+                makeToken(TK_AND);
+                break;

+            }
+     

+            //

+            // Rule 30:  Token ::= <

+            //

+            case 30: { 
+                makeToken(TK_LESS);
+                break;

+            }
+     

+            //

+            // Rule 31:  Token ::= >

+            //

+            case 31: { 
+                makeToken(TK_GREATER);
+                break;

+            }
+     

+            //

+            // Rule 32:  Token ::= .

+            //

+            case 32: { 
+                makeToken(TK_DOT);
+                break;

+            }
+     

+            //

+            // Rule 33:  Token ::= !

+            //

+            case 33: { 
+                makeToken(TK_NOT);
+                break;

+            }
+     

+            //

+            // Rule 34:  Token ::= [

+            //

+            case 34: { 
+                makeToken(TK_LBRACKET);
+                break;

+            }
+     

+            //

+            // Rule 35:  Token ::= ]

+            //

+            case 35: { 
+                makeToken(TK_RBRACKET);
+                break;

+            }
+     

+            //

+            // Rule 36:  Token ::= {

+            //

+            case 36: { 
+                makeToken(TK_LBRACE);
+                break;

+            }
+     

+            //

+            // Rule 37:  Token ::= }

+            //

+            case 37: { 
+                makeToken(TK_RBRACE);
+                break;

+            }
+     

+            //

+            // Rule 38:  Token ::= ?

+            //

+            case 38: { 
+                makeToken(TK_QUESTION);
+                break;

+            }
+     

+            //

+            // Rule 39:  Token ::= #

+            //

+            case 39: { 
+                makeToken(TK_HASHMARK);
+                break;

+            }
+     

+            //

+            // Rule 40:  Token ::= = =

+            //

+            case 40: { 
+                makeToken(TK_EQUAL_EQUAL);
+                break;

+            }
+     

+            //

+            // Rule 41:  Token ::= < =

+            //

+            case 41: { 
+                makeToken(TK_LESS_EQUAL);
+                break;

+            }
+     

+            //

+            // Rule 42:  Token ::= > =

+            //

+            case 42: { 
+                makeToken(TK_GREATER_EQUAL);
+                break;

+            }
+     

+            //

+            // Rule 43:  Token ::= ! =

+            //

+            case 43: { 
+                makeToken(TK_NOT_EQUAL);
+                break;

+            }
+     

+            //

+            // Rule 44:  Token ::= = / =

+            //

+            case 44: { 
+                makeToken(TK_NONINJECTIVE);
+                break;

+            }
+     

+            //

+            // Rule 45:  Token ::= | |

+            //

+            case 45: { 
+                makeToken(TK_OR_OR);
+                break;

+            }
+     

+            //

+            // Rule 46:  Token ::= & &

+            //

+            case 46: { 
+                makeToken(TK_AND_AND);
+                break;

+            }
+     

+            //

+            // Rule 47:  Token ::= - >

+            //

+            case 47: { 
+                makeToken(TK_RIGHTARROW);
+                break;

+            }
+    
+    

+            default:

+                break;

+        }

+        return;

+    }

+}

+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLLexerprs.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLLexerprs.java
new file mode 100644
index 0000000..723a38d
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLLexerprs.java
@@ -0,0 +1,640 @@
+/**
+* Copyright (c) 2007 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Lexer
+* VTCLLexer.g 
+*/
+
+package org.eclipse.viatra2.lpgparser;
+
+public class VTCLLexerprs implements lpg.lpgjavaruntime.ParseTable, VTCLLexersym {
+
+    public interface IsKeyword {
+        public final static byte isKeyword[] = {0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0
+        };
+    };
+    public final static byte isKeyword[] = IsKeyword.isKeyword;
+    public final boolean isKeyword(int index) { return isKeyword[index] != 0; }
+
+    public interface BaseCheck {
+        public final static byte baseCheck[] = {0,
+            1,3,3,2,1,1,1,1,1,1,
+            5,6,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,2,
+            2,2,2,3,2,2,2,1,2,1,
+            2,1,2,1,1,1,2,3,4,1,
+            2,2,3,2,3,2,2,3,3,2,
+            3,2,2,0,1,2,2,2,0,2,
+            1,2,1,1,2,2,1,2,1,2,
+            2,2,3,2,3,3,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,2,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,6,2,1,1,1,2,2,
+            2,2,2,2,2,2
+        };
+    };
+    public final static byte baseCheck[] = BaseCheck.baseCheck;
+    public final int baseCheck(int index) { return baseCheck[index]; }
+    public final static byte rhs[] = baseCheck;
+    public final int rhs(int index) { return rhs[index]; };
+
+    public interface BaseAction {
+        public final static char baseAction[] = {
+            23,23,23,23,23,23,23,23,23,23,
+            23,23,23,23,23,23,23,23,23,23,
+            23,23,23,23,23,23,23,23,23,23,
+            23,23,23,23,23,23,23,23,23,23,
+            23,23,23,23,23,23,23,23,14,14,
+            27,27,15,15,26,26,29,28,28,28,
+            31,31,31,31,31,31,31,30,30,30,
+            30,16,16,16,16,17,17,32,32,24,
+            24,25,25,13,13,13,13,5,5,35,
+            35,36,36,36,19,19,19,7,7,7,
+            7,7,4,4,4,4,4,2,2,2,
+            2,2,2,2,2,2,2,2,2,2,
+            2,2,2,2,2,2,2,2,2,2,
+            2,2,2,3,3,3,3,3,3,3,
+            3,3,3,3,3,3,3,3,3,3,
+            3,3,3,3,3,3,3,3,3,1,
+            1,1,1,1,1,1,1,1,1,39,
+            39,39,39,39,39,39,39,8,8,8,
+            8,8,8,8,8,8,8,8,8,6,
+            6,9,9,10,10,18,18,21,21,34,
+            34,33,33,40,40,40,40,40,40,40,
+            40,40,40,40,40,40,40,40,40,40,
+            40,40,40,40,40,40,40,40,40,40,
+            40,40,12,12,12,12,12,12,12,12,
+            12,12,12,12,12,12,12,12,12,12,
+            12,12,12,12,12,12,12,12,12,12,
+            41,41,41,41,41,41,41,41,41,41,
+            41,41,41,41,41,41,41,41,41,41,
+            41,41,41,41,41,41,41,41,22,22,
+            22,22,22,22,22,22,22,22,22,22,
+            22,22,22,22,22,22,22,22,22,22,
+            22,22,22,22,22,11,11,11,11,37,
+            37,37,37,37,37,37,37,38,38,38,
+            38,38,38,38,38,38,20,20,20,42,
+            42,42,42,42,42,42,42,610,610,500,
+            495,675,437,972,611,1573,1,73,73,73,
+            73,1,5,73,1584,466,1106,73,73,466,
+            351,356,1543,414,6,7,8,9,10,450,
+            412,63,68,505,103,73,73,73,73,1572,
+            491,73,1420,541,491,73,73,1542,541,2,
+            541,428,808,459,459,459,459,510,80,80,
+            80,80,1630,1661,205,71,71,71,71,202,
+            1421,71,459,407,459,71,71,459,307,71,
+            71,71,71,1552,1539,71,335,1516,88,71,
+            71,104,65,69,1715,80,66,70,80,80,
+            409,78,78,78,78,57,433,384,389,712,
+            82,82,82,82,1617,506,1596,88,1306,506,
+            500,495,904,519,519,519,519,1240,510,82,
+            1535,82,4,4,1469,519,1673,78,1629,565,
+            78,1660,88,565,4,971,527,527,527,527,
+            1038,532,532,532,532,1697,1672,88,527,806,
+            1396,538,902,532,61,67,538,1309,538,1105,
+            86,85,85,85,372,1311,389,1172,86,85,
+            85,85,1239,86,85,85,85,1313,1370,90,
+            1315,1444,551,1561,90,538,90,551,1615,551,
+            1643,1468,554,1717,1492,334,59,554,1719,554,
+            334,1721,334,1648,569,1684,88,1732,569,1696,
+            88,1734,1736,1738,1741,1743,1747,1749,1751,1753,
+            1755,1757,1759,1761,1763,1765,1767,1769,1771,1773,
+            1775,1777,1779,1781,1783,1785,1787,1789,1791,1793,
+            1795,1797,1799,1801,1803,1805,1807,1809,1811,1813,
+            1815,1817,1819,1821,1823,1825,1827,1829,1831,1833,
+            1835,1837,1839,1841,1843,1845,1847,1849,1851,1853,
+            1855,1857,1859,1861,1863,1865,1867,1869,1871,1873,
+            1875,1877,1879,1881,1883,1885,1887,1889,1891,1893,
+            1895,1897,1899,1901,1903,1905,1907,1909,1911,1913,
+            1915,1917,1919,1921,666,666
+        };
+    };
+    public final static char baseAction[] = BaseAction.baseAction;
+    public final int baseAction(int index) { return baseAction[index]; }
+    public final static char lhs[] = baseAction;
+    public final int lhs(int index) { return lhs[index]; };
+
+    public interface TermCheck {
+        public final static byte termCheck[] = {0,
+            0,0,2,3,4,5,6,7,8,9,
+            10,11,12,13,14,15,16,17,18,19,
+            20,21,22,23,24,25,26,27,28,29,
+            30,31,32,33,34,35,36,37,38,39,
+            40,41,42,43,44,45,46,47,48,49,
+            50,51,52,53,54,55,56,57,58,59,
+            60,61,62,63,64,65,66,67,68,69,
+            70,71,72,73,74,75,76,77,78,79,
+            80,81,82,83,84,85,86,87,88,89,
+            90,91,92,93,94,95,96,97,98,99,
+            100,101,0,0,2,3,4,5,6,7,
+            8,9,10,11,12,13,14,15,16,17,
+            18,19,20,21,22,23,24,25,26,27,
+            28,29,30,31,32,33,34,35,36,37,
+            38,39,40,41,42,43,44,45,46,47,
+            48,49,50,51,52,53,54,55,56,57,
+            58,59,60,61,62,63,64,65,66,67,
+            68,69,70,71,72,73,74,75,76,77,
+            78,79,80,81,82,83,84,85,86,87,
+            88,89,90,91,92,93,94,95,96,97,
+            98,99,100,101,0,0,2,3,4,5,
+            6,7,8,9,10,11,12,13,14,15,
+            16,17,18,19,20,21,22,23,24,25,
+            26,27,28,29,30,31,32,33,34,35,
+            36,37,38,39,40,41,42,43,44,45,
+            46,47,48,49,50,51,52,53,54,55,
+            56,57,58,59,60,61,62,63,64,65,
+            66,67,68,69,70,71,72,73,74,75,
+            76,77,78,79,80,81,82,83,84,85,
+            86,87,88,89,90,91,92,93,94,95,
+            96,97,98,99,100,101,0,0,2,3,
+            4,5,6,7,8,9,10,11,12,13,
+            14,15,16,17,18,19,20,21,22,23,
+            24,25,26,27,28,29,30,31,32,33,
+            34,35,36,37,38,39,40,41,42,43,
+            44,45,46,47,48,49,50,51,52,53,
+            54,55,56,57,58,59,60,61,62,63,
+            64,65,66,67,68,69,70,71,72,73,
+            74,75,76,77,78,79,80,81,82,83,
+            84,85,86,87,88,89,90,91,92,93,
+            94,95,96,97,98,99,100,101,0,0,
+            2,3,4,5,6,7,8,9,10,11,
+            12,13,14,15,16,17,18,19,20,21,
+            22,23,24,25,26,27,28,29,30,31,
+            32,33,34,35,36,37,38,39,40,41,
+            42,43,44,45,46,47,48,49,50,51,
+            52,53,54,55,56,57,58,59,60,61,
+            62,63,64,65,66,67,68,69,70,71,
+            72,73,74,75,76,77,78,79,80,81,
+            82,83,84,85,86,87,88,89,90,91,
+            92,93,94,95,96,97,98,99,0,0,
+            102,2,3,4,5,6,7,8,9,10,
+            11,12,13,14,15,16,17,18,19,20,
+            21,22,23,24,25,26,27,28,29,30,
+            31,32,33,34,35,36,37,38,39,40,
+            41,42,43,44,45,46,47,48,49,50,
+            51,52,53,54,55,56,57,58,59,60,
+            61,62,63,64,65,66,67,68,69,70,
+            71,72,73,74,75,76,77,78,79,80,
+            81,82,83,84,85,86,87,88,89,90,
+            91,92,93,94,95,96,97,98,99,0,
+            0,2,3,4,5,6,7,8,9,10,
+            11,12,13,14,15,16,17,18,19,20,
+            21,22,23,24,25,26,27,28,29,30,
+            31,32,33,34,35,36,37,38,39,40,
+            41,42,43,44,45,46,47,48,49,50,
+            51,52,53,54,55,56,57,58,59,60,
+            61,62,63,64,0,1,67,68,69,70,
+            71,72,73,74,75,76,77,78,79,80,
+            81,82,83,84,85,86,87,88,89,90,
+            91,92,93,94,95,96,0,98,0,100,
+            101,0,0,2,3,4,5,6,7,8,
+            9,10,11,12,13,14,15,16,17,18,
+            19,20,21,22,23,24,25,26,27,28,
+            29,30,31,32,33,34,35,36,37,38,
+            39,40,41,42,43,44,45,46,47,48,
+            49,50,51,52,53,54,55,56,57,58,
+            59,60,61,62,63,64,65,66,67,68,
+            69,70,71,72,73,74,75,76,77,78,
+            79,80,81,82,83,84,85,86,87,88,
+            89,90,91,92,93,0,1,0,97,2,
+            3,4,5,6,7,8,9,10,11,12,
+            13,14,15,16,17,18,19,20,21,22,
+            23,24,25,26,27,28,29,30,31,32,
+            33,34,35,36,37,38,39,40,41,42,
+            43,44,45,46,47,48,49,50,51,52,
+            53,54,55,56,57,58,59,60,61,62,
+            63,64,65,66,67,68,69,70,71,72,
+            73,74,75,0,77,78,79,80,81,82,
+            83,84,85,86,87,88,89,90,91,92,
+            93,0,1,0,97,2,3,4,5,6,
+            7,8,9,10,11,12,13,14,15,16,
+            17,18,19,20,21,22,23,24,25,26,
+            27,28,29,30,31,32,33,34,35,36,
+            37,38,39,40,41,42,43,44,45,46,
+            47,48,49,50,51,52,53,54,55,56,
+            57,58,59,60,61,62,63,64,65,66,
+            0,0,2,3,4,5,6,7,8,9,
+            10,11,12,13,14,15,16,17,18,19,
+            20,21,22,23,24,25,26,27,28,29,
+            30,31,32,33,34,35,36,37,38,39,
+            40,41,42,43,44,45,46,47,48,49,
+            50,51,52,53,54,55,56,57,58,59,
+            60,61,62,63,64,65,66,0,67,2,
+            3,4,5,6,7,8,9,10,11,12,
+            13,14,15,16,17,18,19,20,21,22,
+            23,24,25,26,27,28,29,30,31,32,
+            33,34,35,36,37,38,39,40,41,42,
+            43,44,45,46,47,48,49,50,51,52,
+            53,54,55,56,57,58,59,60,61,62,
+            63,64,65,66,0,0,2,3,4,5,
+            6,7,8,9,10,11,12,13,14,15,
+            16,17,18,19,20,21,22,23,24,25,
+            26,27,28,29,30,31,32,33,34,35,
+            36,37,38,39,40,41,42,43,44,45,
+            46,47,48,49,50,51,52,53,54,55,
+            56,57,58,59,60,61,62,63,64,65,
+            66,0,67,2,3,4,5,6,7,8,
+            9,10,11,12,13,14,15,16,17,18,
+            19,20,21,22,23,24,25,26,27,28,
+            29,30,31,32,33,34,35,36,37,38,
+            39,40,41,42,43,44,45,46,47,48,
+            49,50,51,52,53,54,55,56,57,58,
+            59,60,61,62,63,64,65,66,0,0,
+            2,3,4,5,6,7,8,9,10,11,
+            12,13,14,15,16,17,18,19,20,21,
+            22,23,24,25,26,27,28,29,30,31,
+            32,33,34,35,36,37,38,39,40,41,
+            42,43,44,45,46,47,48,49,50,51,
+            52,53,54,55,56,57,58,59,60,61,
+            62,63,64,65,66,0,67,68,0,1,
+            0,1,0,1,0,1,0,12,13,14,
+            15,16,17,18,19,20,21,22,23,24,
+            25,26,27,28,29,30,31,32,33,34,
+            35,36,37,38,39,40,41,42,43,44,
+            45,46,47,48,49,50,51,52,53,54,
+            55,56,57,58,59,60,61,62,63,0,
+            0,2,3,4,5,6,7,8,9,10,
+            11,12,13,14,15,16,17,18,19,20,
+            21,22,23,24,25,0,0,2,3,4,
+            5,6,7,8,9,10,11,12,13,14,
+            15,16,17,18,19,20,21,22,23,0,
+            0,2,3,4,5,6,7,8,9,10,
+            11,12,13,14,15,16,17,18,19,20,
+            21,22,23,0,0,2,3,4,5,6,
+            7,8,9,10,11,12,13,14,15,16,
+            17,18,19,20,21,22,23,0,0,2,
+            3,4,5,6,7,8,9,10,11,12,
+            13,14,15,16,17,18,19,20,21,22,
+            23,0,72,2,3,4,5,6,7,8,
+            9,10,11,12,13,14,15,16,17,18,
+            19,20,21,22,23,0,0,2,3,4,
+            5,6,7,8,9,10,11,12,13,14,
+            15,16,17,0,0,0,68,69,0,24,
+            25,0,0,2,3,4,5,6,7,8,
+            9,0,0,12,12,13,14,15,0,18,
+            0,1,0,12,13,14,15,26,27,28,
+            29,0,0,2,3,4,5,6,7,8,
+            9,10,11,0,0,2,3,4,5,6,
+            7,8,9,10,11,0,0,2,3,4,
+            5,6,7,8,9,10,11,73,0,71,
+            0,70,0,98,0,1,0,76,2,3,
+            4,5,6,7,8,9,10,11,0,0,
+            2,3,4,5,6,7,8,9,10,11,
+            99,69,0,1,0,74,75,0,0,2,
+            3,4,5,6,7,8,9,10,11,0,
+            0,2,3,4,5,6,7,8,9,10,
+            11,0,0,2,3,4,5,6,7,8,
+            9,10,11,0,0,2,3,4,5,6,
+            7,8,9,10,11,0,0,2,3,4,
+            5,6,7,8,9,10,11,0,12,13,
+            14,15,16,17,0,1,0,1,0,1,
+            0,1,0,94,95,96,0,67,0,100,
+            101,0,1,0,1,0,1,0,1,67,
+            0,1,0,1,30,31,0,1,0,1,
+            0,1,0,1,0,1,0,1,0,1,
+            0,1,0,1,0,1,0,1,0,1,
+            0,1,0,1,0,1,0,1,0,1,
+            0,1,0,1,0,1,0,1,0,1,
+            0,1,0,1,0,1,0,1,0,1,
+            0,1,0,1,0,1,0,1,0,1,
+            0,1,0,1,0,1,0,1,0,1,
+            0,1,0,1,0,1,0,1,0,1,
+            0,1,0,1,0,1,0,1,0,1,
+            0,1,0,1,0,1,0,1,0,1,
+            0,1,0,1,0,1,0,1,0,1,
+            0,1,0,1,0,1,0,1,0,1,
+            0,1,0,1,0,1,0,1,0,1,
+            0,1,0,1,0,1,0,1,0,1,
+            0,1,0,1,0,1,0,1,0,1,
+            0,1,0,1,0,1,0,1,0,1,
+            0,1,0,1,0,1,0,1,0,1,
+            0,1,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0
+        };
+    };
+    public final static byte termCheck[] = TermCheck.termCheck;
+    public final int termCheck(int index) { return termCheck[index]; }
+
+    public interface TermAction {
+        public final static char termAction[] = {0,
+            666,79,739,739,739,739,739,739,739,739,
+            739,739,739,739,739,739,739,739,739,739,
+            739,739,739,739,739,739,739,739,739,739,
+            739,739,739,739,739,739,739,739,739,739,
+            739,739,739,739,739,739,739,739,739,739,
+            739,739,739,739,739,739,739,739,739,739,
+            739,739,739,739,739,739,739,739,738,414,
+            739,739,739,739,739,739,739,739,739,739,
+            739,739,739,739,739,739,739,739,739,739,
+            739,739,739,739,739,739,739,739,739,739,
+            739,739,666,74,739,739,739,739,739,739,
+            739,739,739,739,739,739,739,739,739,739,
+            739,739,739,739,739,739,739,739,739,739,
+            739,739,739,739,739,739,739,739,739,739,
+            739,739,739,739,739,739,739,739,739,739,
+            739,739,739,739,739,739,739,739,739,739,
+            739,739,739,739,739,739,739,739,739,739,
+            738,428,739,739,739,739,739,739,739,739,
+            739,739,739,739,739,739,739,739,739,739,
+            739,739,739,739,739,739,739,739,739,739,
+            739,739,739,739,666,666,737,737,737,737,
+            737,737,737,737,737,737,737,737,737,737,
+            737,737,737,737,737,737,737,737,737,737,
+            737,737,737,737,737,737,737,737,737,737,
+            737,737,737,737,737,737,737,737,737,737,
+            737,737,737,737,737,737,737,737,737,737,
+            737,737,737,737,737,737,737,737,737,737,
+            737,737,677,742,737,737,737,737,737,737,
+            737,737,737,737,737,737,737,737,737,737,
+            737,737,737,737,737,737,737,737,737,737,
+            737,737,737,737,737,737,666,666,737,737,
+            737,737,737,737,737,737,737,737,737,737,
+            737,737,737,737,737,737,737,737,737,737,
+            737,737,737,737,737,737,737,737,737,737,
+            737,737,737,737,737,737,737,737,737,737,
+            737,737,737,737,737,737,737,737,737,737,
+            737,737,737,737,737,737,737,737,737,737,
+            737,737,737,737,678,742,737,737,737,737,
+            737,737,737,737,737,737,737,737,737,737,
+            737,737,737,737,737,737,737,737,737,737,
+            737,737,737,737,737,737,737,737,13,666,
+            744,744,744,744,744,744,744,744,744,744,
+            744,744,744,744,744,744,744,744,744,744,
+            744,744,744,744,744,744,744,744,744,744,
+            744,744,744,744,744,744,744,744,744,744,
+            744,744,744,744,744,744,744,744,744,744,
+            744,744,744,744,744,744,744,744,744,744,
+            744,744,744,744,744,744,744,744,744,744,
+            744,744,744,744,744,744,744,744,744,744,
+            744,744,744,744,744,744,744,744,744,744,
+            744,744,744,744,744,744,744,744,666,666,
+            744,746,746,746,746,746,746,746,746,746,
+            746,746,746,746,746,746,746,746,746,746,
+            746,746,746,746,746,746,746,746,746,746,
+            746,746,746,746,746,746,746,746,746,746,
+            746,746,746,746,746,746,746,746,746,746,
+            746,746,746,746,746,746,746,746,746,746,
+            746,746,746,746,746,746,746,746,746,668,
+            746,746,746,746,746,746,746,746,746,746,
+            746,746,746,746,746,746,746,746,746,746,
+            746,746,746,746,746,746,746,746,397,666,
+            666,444,610,610,610,610,610,610,610,610,
+            610,540,525,587,589,537,588,512,509,517,
+            584,585,586,561,595,571,575,577,578,581,
+            607,543,548,550,553,558,567,572,573,574,
+            576,579,580,582,583,590,591,592,593,594,
+            596,597,598,599,600,601,602,603,604,605,
+            606,608,609,472,666,665,477,484,683,399,
+            434,420,366,681,480,402,692,353,468,693,
+            705,691,689,690,702,703,700,701,704,688,
+            413,685,686,611,611,611,666,364,666,611,
+            611,666,666,748,748,748,748,748,748,748,
+            748,748,748,748,748,748,748,748,748,748,
+            748,748,748,748,748,748,748,748,748,748,
+            748,748,748,748,748,748,748,748,748,748,
+            748,748,748,748,748,748,748,748,748,748,
+            748,748,748,748,748,748,748,748,748,748,
+            748,748,748,748,748,748,748,748,748,748,
+            748,748,748,748,748,748,748,669,748,748,
+            748,748,748,748,748,748,748,748,748,748,
+            748,748,748,748,748,107,1,666,748,459,
+            459,459,459,459,459,459,459,459,459,459,
+            459,459,459,459,459,459,459,459,459,459,
+            459,459,459,459,459,459,459,459,459,459,
+            459,459,459,459,459,459,459,459,459,459,
+            459,459,459,459,459,459,459,459,459,459,
+            459,459,459,459,459,459,459,459,459,459,
+            459,459,459,459,459,459,459,459,459,459,
+            459,459,459,666,459,459,459,459,459,459,
+            459,459,459,459,459,459,459,459,459,459,
+            459,108,1,6,459,519,519,519,519,519,
+            519,519,519,519,519,519,519,519,519,519,
+            519,519,519,519,519,519,519,519,519,519,
+            519,519,519,519,519,519,519,519,519,519,
+            519,519,519,519,519,519,519,519,519,519,
+            519,519,519,519,519,519,519,519,519,519,
+            519,519,519,519,519,519,519,519,519,519,
+            52,33,527,527,527,527,527,527,527,527,
+            527,527,527,527,527,527,527,527,527,527,
+            527,527,527,527,527,527,527,527,527,527,
+            527,527,527,527,527,527,527,527,527,527,
+            527,527,527,527,527,527,527,527,527,527,
+            527,527,527,527,527,527,527,527,527,527,
+            527,527,527,527,527,527,527,48,709,532,
+            532,532,532,532,532,532,532,532,532,532,
+            532,532,532,532,532,532,532,532,532,532,
+            532,532,532,532,532,532,532,532,532,532,
+            532,532,532,532,532,532,532,532,532,532,
+            532,532,532,532,532,532,532,532,532,532,
+            532,532,532,532,532,532,532,532,532,532,
+            532,532,532,532,51,31,752,752,752,752,
+            752,752,752,752,752,752,751,751,751,751,
+            751,751,751,751,751,751,751,751,751,751,
+            751,751,751,751,751,751,751,751,751,751,
+            751,751,751,751,751,751,751,751,751,751,
+            751,751,751,751,751,751,751,751,751,751,
+            751,751,751,751,751,751,751,751,751,751,
+            751,53,708,752,752,752,752,752,752,752,
+            752,752,752,751,751,751,751,751,751,751,
+            751,751,751,751,751,751,751,751,751,751,
+            751,751,751,751,751,751,751,751,751,751,
+            751,751,751,751,751,751,751,751,751,751,
+            751,751,751,751,751,751,751,751,751,751,
+            751,751,751,751,751,751,751,751,49,21,
+            752,752,752,752,752,752,752,752,752,752,
+            751,751,751,751,751,751,751,751,751,751,
+            751,751,751,751,751,751,751,751,751,751,
+            751,751,751,751,751,751,751,751,751,751,
+            751,751,751,751,751,751,751,751,751,751,
+            751,751,751,751,751,751,751,751,751,751,
+            751,751,751,751,751,666,706,486,109,1,
+            110,1,111,1,112,1,666,617,615,641,
+            643,616,642,613,612,614,638,639,640,623,
+            649,625,629,631,632,635,661,618,619,620,
+            621,622,624,626,627,628,630,633,634,636,
+            637,644,645,646,647,648,650,651,652,653,
+            654,655,656,657,658,659,660,662,663,58,
+            666,756,756,756,756,756,756,756,756,756,
+            756,756,756,756,756,756,756,756,756,756,
+            756,756,756,725,725,666,666,538,538,538,
+            538,538,538,538,538,538,538,538,538,538,
+            538,538,538,538,538,538,538,538,538,666,
+            29,541,541,541,541,541,541,541,541,541,
+            541,541,541,541,541,541,541,541,541,541,
+            541,541,541,666,666,551,551,551,551,551,
+            551,551,551,551,551,551,551,551,551,551,
+            551,551,551,551,551,551,551,666,18,554,
+            554,554,554,554,554,554,554,554,554,554,
+            554,554,554,554,554,554,554,554,554,554,
+            554,666,712,1000,1000,1000,1000,1000,1000,1000,
+            1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,
+            1000,1000,1000,1000,1000,8,666,754,754,754,
+            754,754,754,754,754,754,754,736,732,732,
+            736,389,389,666,16,666,743,355,28,723,
+            723,666,62,1001,1001,1001,1001,1001,1001,1001,
+            1001,64,666,1008,734,729,729,734,666,1005,
+            113,1,666,735,731,731,735,1007,1009,1006,
+            392,666,74,491,491,491,491,491,491,491,
+            491,491,491,32,666,466,466,466,466,466,
+            466,466,466,466,466,91,666,754,754,754,
+            754,754,754,754,754,754,754,713,666,711,
+            666,1010,666,464,114,1,92,1011,506,506,
+            506,506,506,506,506,506,506,506,666,14,
+            565,565,565,565,565,565,565,565,565,565,
+            1012,441,115,1,666,488,563,666,666,569,
+            569,569,569,569,569,569,569,569,569,94,
+            30,754,754,754,754,754,754,754,754,754,
+            754,93,666,754,754,754,754,754,754,754,
+            754,754,754,96,666,754,754,754,754,754,
+            754,754,754,754,754,95,10,754,754,754,
+            754,754,754,754,754,754,754,666,733,727,
+            727,733,389,389,87,8,116,1,117,1,
+            118,1,666,868,868,868,666,707,666,868,
+            868,119,1,120,1,121,1,122,1,710,
+            123,1,124,1,510,510,125,1,126,1,
+            127,1,128,1,129,1,130,1,131,1,
+            132,1,133,5,134,5,135,5,136,5,
+            137,5,138,5,139,5,140,5,141,5,
+            142,5,143,5,144,5,145,5,146,5,
+            147,5,148,5,149,5,150,5,151,5,
+            152,5,153,5,154,5,155,5,156,5,
+            157,5,158,5,87,8,201,14,107,54,
+            108,54,109,54,110,54,111,54,112,54,
+            113,54,114,54,115,54,116,54,117,54,
+            118,54,119,54,120,54,121,54,122,54,
+            123,54,124,54,125,54,126,54,127,54,
+            128,54,129,54,130,54,131,54,132,54,
+            133,55,134,55,135,55,136,55,137,55,
+            138,55,139,55,140,55,141,55,142,55,
+            143,55,144,55,145,55,146,55,147,55,
+            148,55,149,55,150,55,151,55,152,55,
+            153,55,154,55,155,55,156,55,157,55,
+            158,55
+        };
+    };
+    public final static char termAction[] = TermAction.termAction;
+    public final int termAction(int index) { return termAction[index]; }
+    public final int asb(int index) { return 0; }
+    public final int asr(int index) { return 0; }
+    public final int nasb(int index) { return 0; }
+    public final int nasr(int index) { return 0; }
+    public final int terminalIndex(int index) { return 0; }
+    public final int nonterminalIndex(int index) { return 0; }
+    public final int scopePrefix(int index) { return 0;}
+    public final int scopeSuffix(int index) { return 0;}
+    public final int scopeLhs(int index) { return 0;}
+    public final int scopeLa(int index) { return 0;}
+    public final int scopeStateSet(int index) { return 0;}
+    public final int scopeRhs(int index) { return 0;}
+    public final int scopeState(int index) { return 0;}
+    public final int inSymb(int index) { return 0;}
+    public final String name(int index) { return null; }
+    public final int getErrorSymbol() { return 0; }
+    public final int getScopeUbound() { return 0; }
+    public final int getScopeSize() { return 0; }
+    public final int getMaxNameLength() { return 0; }
+
+    public final static int
+           NUM_STATES        = 158,
+           NT_OFFSET         = 102,
+           LA_STATE_OFFSET   = 1012,
+           MAX_LA            = 2,
+           NUM_RULES         = 346,
+           NUM_NONTERMINALS  = 43,
+           NUM_SYMBOLS       = 145,
+           SEGMENT_SIZE      = 8192,
+           START_STATE       = 347,
+           IDENTIFIER_SYMBOL = 0,
+           EOFT_SYMBOL       = 1,
+           EOLT_SYMBOL       = 103,
+           ACCEPT_ACTION     = 665,
+           ERROR_ACTION      = 666;
+
+    public final static boolean BACKTRACK = false;
+
+    public final int getNumStates() { return NUM_STATES; }
+    public final int getNtOffset() { return NT_OFFSET; }
+    public final int getLaStateOffset() { return LA_STATE_OFFSET; }
+    public final int getMaxLa() { return MAX_LA; }
+    public final int getNumRules() { return NUM_RULES; }
+    public final int getNumNonterminals() { return NUM_NONTERMINALS; }
+    public final int getNumSymbols() { return NUM_SYMBOLS; }
+    public final int getSegmentSize() { return SEGMENT_SIZE; }
+    public final int getStartState() { return START_STATE; }
+    public final int getStartSymbol() { return lhs[0]; }
+    public final int getIdentifierSymbol() { return IDENTIFIER_SYMBOL; }
+    public final int getEoftSymbol() { return EOFT_SYMBOL; }
+    public final int getEoltSymbol() { return EOLT_SYMBOL; }
+    public final int getAcceptAction() { return ACCEPT_ACTION; }
+    public final int getErrorAction() { return ERROR_ACTION; }
+    public final boolean isValidForParser() { return isValidForParser; }
+    public final boolean getBacktrack() { return BACKTRACK; }
+
+    public final int originalState(int state) { return 0; }
+    public final int asi(int state) { return 0; }
+    public final int nasi(int state) { return 0; }
+    public final int inSymbol(int state) { return 0; }
+
+    public final int ntAction(int state, int sym) {
+        return baseAction[state + sym];
+    }
+
+    public final int tAction(int state, int sym) {
+        int i = baseAction[state],
+            k = i + sym;
+        return termAction[termCheck[k] == sym ? k : i];
+    }
+    public final int lookAhead(int la_state, int sym) {
+        int k = la_state + sym;
+        return termAction[termCheck[k] == sym ? k : la_state];
+    }
+}
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLLexersym.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLLexersym.java
new file mode 100644
index 0000000..de9fb7c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLLexersym.java
@@ -0,0 +1,229 @@
+/**
+* Copyright (c) 2007 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Lexer
+* VTCLLexer.g 
+*/
+
+package org.eclipse.viatra2.lpgparser;
+
+public interface VTCLLexersym {
+    public final static int
+      Char_CtlCharNotWS = 102,
+      Char_LF = 100,
+      Char_CR = 101,
+      Char_HT = 94,
+      Char_FF = 95,
+      Char_a = 19,
+      Char_b = 18,
+      Char_c = 20,
+      Char_d = 13,
+      Char_e = 16,
+      Char_f = 12,
+      Char_g = 32,
+      Char_h = 33,
+      Char_i = 34,
+      Char_j = 35,
+      Char_k = 36,
+      Char_l = 24,
+      Char_m = 37,
+      Char_n = 26,
+      Char_o = 38,
+      Char_p = 39,
+      Char_q = 40,
+      Char_r = 27,
+      Char_s = 41,
+      Char_t = 28,
+      Char_u = 29,
+      Char_v = 42,
+      Char_w = 43,
+      Char_x = 30,
+      Char_y = 44,
+      Char_z = 45,
+      Char__ = 64,
+      Char_A = 21,
+      Char_B = 22,
+      Char_C = 23,
+      Char_D = 14,
+      Char_E = 17,
+      Char_F = 15,
+      Char_G = 46,
+      Char_H = 47,
+      Char_I = 48,
+      Char_J = 49,
+      Char_K = 50,
+      Char_L = 25,
+      Char_M = 51,
+      Char_N = 52,
+      Char_O = 53,
+      Char_P = 54,
+      Char_Q = 55,
+      Char_R = 56,
+      Char_S = 57,
+      Char_T = 58,
+      Char_U = 59,
+      Char_V = 60,
+      Char_W = 61,
+      Char_X = 31,
+      Char_Y = 62,
+      Char_Z = 63,
+      Char_0 = 2,
+      Char_1 = 3,
+      Char_2 = 4,
+      Char_3 = 5,
+      Char_4 = 6,
+      Char_5 = 7,
+      Char_6 = 8,
+      Char_7 = 9,
+      Char_8 = 10,
+      Char_9 = 11,
+      Char_Space = 96,
+      Char_AfterASCII = 65,
+      Char_DoubleQuote = 70,
+      Char_SingleQuote = 76,
+      Char_Percent = 77,
+      Char_VerticalBar = 71,
+      Char_Exclamation = 78,
+      Char_AtSign = 79,
+      Char_BackQuote = 97,
+      Char_Tilde = 80,
+      Char_Sharp = 81,
+      Char_DollarSign = 66,
+      Char_Ampersand = 72,
+      Char_Caret = 82,
+      Char_Colon = 83,
+      Char_SemiColon = 84,
+      Char_BackSlash = 99,
+      Char_LeftBrace = 85,
+      Char_RightBrace = 86,
+      Char_LeftBracket = 87,
+      Char_RightBracket = 88,
+      Char_QuestionMark = 89,
+      Char_Comma = 90,
+      Char_Dot = 98,
+      Char_LessThan = 91,
+      Char_GreaterThan = 73,
+      Char_Plus = 74,
+      Char_Minus = 75,
+      Char_Slash = 68,
+      Char_Star = 69,
+      Char_LeftParen = 92,
+      Char_RightParen = 93,
+      Char_Equal = 67,
+      Char_EOF = 1;
+
+      public final static String orderedTerminalSymbols[] = {
+                 "",
+                 "EOF",
+                 "0",
+                 "1",
+                 "2",
+                 "3",
+                 "4",
+                 "5",
+                 "6",
+                 "7",
+                 "8",
+                 "9",
+                 "f",
+                 "d",
+                 "D",
+                 "F",
+                 "e",
+                 "E",
+                 "b",
+                 "a",
+                 "c",
+                 "A",
+                 "B",
+                 "C",
+                 "l",
+                 "L",
+                 "n",
+                 "r",
+                 "t",
+                 "u",
+                 "x",
+                 "X",
+                 "g",
+                 "h",
+                 "i",
+                 "j",
+                 "k",
+                 "m",
+                 "o",
+                 "p",
+                 "q",
+                 "s",
+                 "v",
+                 "w",
+                 "y",
+                 "z",
+                 "G",
+                 "H",
+                 "I",
+                 "J",
+                 "K",
+                 "M",
+                 "N",
+                 "O",
+                 "P",
+                 "Q",
+                 "R",
+                 "S",
+                 "T",
+                 "U",
+                 "V",
+                 "W",
+                 "Y",
+                 "Z",
+                 "_",
+                 "AfterASCII",
+                 "DollarSign",
+                 "Equal",
+                 "Slash",
+                 "Star",
+                 "DoubleQuote",
+                 "VerticalBar",
+                 "Ampersand",
+                 "GreaterThan",
+                 "Plus",
+                 "Minus",
+                 "SingleQuote",
+                 "Percent",
+                 "Exclamation",
+                 "AtSign",
+                 "Tilde",
+                 "Sharp",
+                 "Caret",
+                 "Colon",
+                 "SemiColon",
+                 "LeftBrace",
+                 "RightBrace",
+                 "LeftBracket",
+                 "RightBracket",
+                 "QuestionMark",
+                 "Comma",
+                 "LessThan",
+                 "LeftParen",
+                 "RightParen",
+                 "HT",
+                 "FF",
+                 "Space",
+                 "BackQuote",
+                 "Dot",
+                 "BackSlash",
+                 "LF",
+                 "CR",
+                 "CtlCharNotWS"
+             };
+
+    public final static boolean isValidForParser = true;
+}
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLParser.g b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLParser.g
new file mode 100644
index 0000000..bdc9dba
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLParser.g
@@ -0,0 +1,832 @@
+--
+-- The VTCL Parser
+--
+-- Copyright (c) 2007-2009 OptXware Research and Development LLC.
+-- All rights reserved.   This program and the accompanying materials
+-- are made available under the terms of the Eclipse Public License v1.0
+-- which accompanies this distribution, and is available at
+-- http://www.eclipse.org/legal/epl-v10.html
+--
+-- Contributors:
+--   Daniel Varro - Initial API and implementation
+
+%options escape=$
+%options fp=VTCLParser,prefix=TK_
+%options package=org.eclipse.viatra2.lpgparser
+%options template=btVTCLParserTemplateD.g
+--%options template=dtVtclParserTemplateD.g
+%options import_terminals=VTCLLexer.g
+%options ast_directory=./ast,automatic_ast=toplevel
+%options parent-saved
+%options variables=nt
+--%options visitor=preorder
+%options visitor=default
+%options shift-default
+--%options first
+--%Options follow
+--%options automatic_ast
+%options ast_type=ASTNode
+--%options var=nt
+--%options la=2
+--%options error-maps
+--%options single-productions
+--%options scopes
+--%options action=("*.java", "/.", "./")
+--%options action=("VTCLParser.java", "/:", ":/")
+%options ParseTable=lpg.lpgjavaruntime.ParseTable
+%options verbose
+
+
+$Terminals
+    IDENTIFIER
+
+    namespace import machine pattern or neg find check supertypeOf subtypeOf
+    typeOf instanceOf gtrule precondition postcondition action apply xor
+    asmfunction rule skip fail call update print println log debug info warning
+    error fatal seq random let in below choose forall with do iterate if try else
+    new delete delete_content move_content copy copy_boundary_edges
+    skip_boundary_edges move rename setValue setFrom setTo setMultiplicity
+    setAggregation setInverse undef true false one_to_one one_to_many
+    many_to_one many_to_many ref fqn name value source target multiplicity
+    aggregation inverse toBoolean toString toInteger toDouble toMultiplicity out inout
+    parallel changed when shareable
+
+    IntegerLiteral        
+--    LongLiteral           
+    FloatingPointLiteral  
+    DoubleLiteral         
+    NameLiteral      -- the usual
+    AnnotationLiteral -- @name
+    StringLiteral         -- the usual
+	UpperCaseLiteral  -- Starts with an uppercase letter
+	DummyVariableLiteral -- Starts with an underscore '_'
+	DecimalIntegerLiteral
+
+--    PLUS_PLUS                  ::= '++'
+--    MINUS_MINUS                ::= '--'
+    EQUAL_EQUAL                ::= '=='
+    LESS_EQUAL                 ::= '<='
+    GREATER_EQUAL              ::= '>='
+    NOT_EQUAL                  ::= '!='
+    NONINJECTIVE               ::= '=/='
+--    LEFT_SHIFT                 ::= '<<'
+--    RIGHT_SHIFT                ::= '>>'
+--    UNSIGNED_RIGHT_SHIFT       ::= '>>>'
+--    PLUS_EQUAL                 ::= '+='
+--    MINUS_EQUAL                ::= '-='
+--    MULTIPLY_EQUAL             ::= '*='
+--    DIVIDE_EQUAL               ::= '/='
+--    AND_EQUAL                  ::= '&='
+--    OR_EQUAL                   ::= '|='
+--    XOR_EQUAL                  ::= '^='
+--    REMAINDER_EQUAL            ::= '%='
+--    LEFT_SHIFT_EQUAL           ::= '<<='
+--    RIGHT_SHIFT_EQUAL          ::= '>>='
+--    UNSIGNED_RIGHT_SHIFT_EQUAL ::= '>>>='
+    OR_OR                      ::= '||'
+    AND_AND                    ::= '&&'
+    RIGHTARROW                 ::= '->'
+
+    PLUS      ::= '+'
+    MINUS     ::= '-'
+    NOT       ::= '!'
+    REMAINDER ::= '%'
+    XOR       ::= '^'
+    AND       ::= '&'
+    MULTIPLY  ::= '*'
+    OR        ::= '|'
+    TWIDDLE   ::= '~'
+    DIVIDE    ::= '/'
+    GREATER   ::= '>'
+    LESS      ::= '<'
+    LPAREN    ::= '('
+    RPAREN    ::= ')'
+    LBRACE    ::= '{'
+    RBRACE    ::= '}'
+    LBRACKET  ::= '['
+    RBRACKET  ::= ']'
+    SEMICOLON ::= ';'
+    HASHMARK  ::= '#'
+    QUESTION  ::= '?'
+    COLON     ::= ':'
+    COMMA     ::= ','
+    DOT       ::= '.'
+    EQUAL     ::= '='
+    
+$End
+
+$Notice
+	/./**
+ * Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+ * All rights reserved.   This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Daniel Varro - Initial API and implementation
+ *
+ * This file was generated automatically based upon the VTCL LPG Parser
+ * VTCLParser.g 
+ */
+	./
+$End
+
+$Define
+--	$action_class /.$file_prefix./
+--	$prs_stream_class /.PrsStream./
+--
+    $BeginAstAction
+    /.
+    	void initialize()
+        {./
+
+    $EndAstAction 
+    /.  }
+    ./
+$End
+
+--$EOL
+--    ;
+--$End
+
+$ERROR
+    ERROR_TOKEN
+$End
+
+$Start
+    VTCLFile
+$End
+
+--$Headers
+--$End
+   
+$Rules
+--------------------------------------------------------------------------------
+-- Sec. 5.1.	
+--------------------------------------------------------------------------------
+
+	VTCLFile ::= NamespaceDefAST NamespaceImportsAST GTASMDefAST
+
+	NamespaceDefAST ::= $empty
+                   | namespace QualifiedTypeNameAST SEMICOLON
+--                   | ERROR_TOKEN 
+--        /.$BeginAstAction
+--                    //reportErrorTokenMessage(getRhsTokenIndex(1), "Namespace import");
+--          $EndAstAction
+--        ./	
+
+	NamespaceImportsAST ::= $empty 
+                       | NamespaceImportsAST NamespaceImportAST
+
+	NamespaceImportAST ::= import QualifiedTypeNameAST SEMICOLON
+	                  | ERROR_TOKEN
+        /.$BeginAstAction
+                    //reportErrorTokenMessage(getRhsTokenIndex(1), "Namespace import");
+          $EndAstAction
+        ./	
+	GTASMDefAST ::= OptAnnotationsAST machine TypeNameAST LBRACE MachineContentsAST RBRACE
+
+-- MachineContentsAST is added as a non-terminal to reduce look-ahead	
+	MachineContentsAST ::= MachineContentAST
+	                  | MachineContentsAST MachineContentAST
+	                  
+	MachineContentAST ::= GraphPatternDefAST 	                  
+	                 | GTRuleDefAST
+	                 | AsmFunctionDefAST
+	                 | AsmRuleDefAST
+	                 | ERROR_TOKEN
+        /.$BeginAstAction
+                    //reportErrorTokenMessage(getRhsTokenIndex(1), "Namespace import");
+          $EndAstAction
+        ./	
+
+--------------------------------------------------------------------------------
+-- Sec. 5.2.	
+--------------------------------------------------------------------------------
+
+	GraphPatternDefAST ::= OptAnnotationsAST OptShareableDefAST pattern TypeNameAST FormalParameterDefAST EQUAL PatternBodiesAST
+--	                  | ERROR_TOKEN
+
+  OptShareableDefAST ::= $empty | shareable
+             
+-- PatternBodiesAST is added as a non-terminal to reduce look-ahead	
+	PatternBodiesAST ::= PatternBodyAST
+                    | PatternBodiesAST or PatternBodyAST
+
+	
+	PatternBodyAST ::= LBRACE PatternBodyContentsAST RBRACE
+	
+	PatternBodyContentsAST ::= $empty --PatternBodyContentAST 
+	                      | PatternBodyContentsAST PatternBodyContentDefAST
+--	                      | ERROR_TOKEN
+
+	PatternBodyContentDefAST ::= PatternBodyContentAST SEMICOLON
+	                        | neg GraphPatternDefAST
+
+	PatternBodyContentAST ::= LocalPatternBodyElementAST
+	                        | PatternCompositionAST
+	                        | NegativePatternAST
+	                        | PatternVariableAssignmentAST
+	                        | CheckConditionAST
+	                        | NonInjectivityConstraintAST
+	                        | ERROR_TOKEN
+
+	LocalPatternBodyElementAST ::= ModelElementAST
+	                             | RelationshipAST
+--	                             | ERROR_TOKEN
+
+	NegativePatternAST ::= neg PatternCompositionAST 
+--	                     | neg GraphPatternDefAST
+	
+	PatternCompositionAST ::= find QualifiedTypeNameAST ActualPatternParameterDefAST OptMatchCountAST --SEMICOLON
+
+
+	PatternVariableAssignmentAST ::= PatternVariableRefAST EQUAL PatternVariableRefAST --SEMICOLON
+	
+	NonInjectivityConstraintAST ::= PatternVariableRefAST NONINJECTIVE PatternVariableRefAST 
+	
+	CheckConditionAST ::= check LPAREN LogicalTermAST RPAREN --SEMICOLON
+	
+	OptMatchCountAST ::= $empty | HASHMARK CounterVariableAST 
+	
+--    PatternVariableAST ::= VariableAST 
+    PatternVariableDefAST ::= UpperCaseLiteral 
+    PatternVariableRefAST ::= UpperCaseLiteral 
+    PatternVariableDefRefAST ::= UpperCaseLiteral | DummyVariableLiteral
+
+	  CounterVariableAST ::= UpperCaseLiteral
+     
+    GraphPatternCallAST ::= find QualifiedTypeNameAST ActualParameterDefAST OptMatchCountAST
+    
+--------------------------------------------------------------------------------
+-- Sec. 5.2.2 Entity Definition
+--------------------------------------------------------------------------------
+
+	ModelElementAST ::= EntityAST | RelationAST
+
+-- Entity values are not allowed 
+--	EntityAST ::= QualifiedTypeNameAST EntityBody EntityValueOptAST ContainmentConstraintOptAST SEMICOLON
+	EntityAST ::= QualifiedTypeNameAST EntityBody ContainmentConstraintOptAST --SEMICOLON	
+
+	EntityBody ::= LPAREN PatternVariableDefRefAST RPAREN 
+
+--	EntityValueOptAST ::= $empty |  RIGHTARROW ArithmeticTermAST	
+	
+--------------------------------------------------------------------------------
+-- Sec. 5.2.3 Relation Definition
+--------------------------------------------------------------------------------
+	
+	RelationAST ::= QualifiedTypeNameAST RelationBodyAST --SEMICOLON
+
+	RelationBodyAST ::= LPAREN PatternVariableDefRefAST COMMA PatternVariableRefAST COMMA PatternVariableRefAST RPAREN 
+	
+--------------------------------------------------------------------------------
+-- Sec. 5.2.4 Relationship Definition
+--------------------------------------------------------------------------------
+    
+    RelationshipAST ::= InheritanceAST | InstantiationAST
+    
+    InheritanceAST ::= supertypeOf RelationshipBodyAST --SEMICOLON
+                     | subtypeOf RelationshipBodyAST --SEMICOLON
+	
+	InstantiationAST ::= typeOf RelationshipBodyAST --SEMICOLON
+	                   | instanceOf RelationshipBodyAST --SEMICOLON
+
+	RelationshipBodyAST ::= LPAREN PatternVariableRefAST COMMA PatternVariableRefAST RPAREN
+	
+--------------------------------------------------------------------------------
+-- Sec. 5.3 Graph Transformation
+--------------------------------------------------------------------------------
+
+	GTRuleDefAST ::= OptAnnotationsAST gtrule TypeNameAST DirectedFormalParameterDefAST EQUAL GTRuleBodyAST 
+
+	GTRuleBodyAST ::= LBRACE PreconditionDefAST PostconditionOptAST ActionOptAST RBRACE
+	               | ERROR_TOKEN
+        /.$BeginAstAction
+                   //reportErrorTokenMessage(getRhsTokenIndex(1), "Namespace import");
+          $EndAstAction
+        ./	
+	
+	PreconditionDefAST ::= precondition GraphPatternDefAST
+	                     | precondition PatternCompositionAST
+
+	PostconditionOptAST ::= $empty 
+	                      | postcondition GraphPatternDefAST
+	                      | postcondition PatternCompositionAST
+	                
+	ActionOptAST ::= $empty 
+				   | action LBRACE AsmRulesAST RBRACE  	                	               
+	
+	GTRuleCallAST ::= apply QualifiedTypeNameAST ActualParameterDefAST 
+
+--------------------------------------------------------------------------------
+-- Sec. 5.4	Terms and Formulas
+--------------------------------------------------------------------------------
+--	TermAST ::= LogicalTermAST 
+--	       | ArithmeticTermAST
+
+--------------------------------------------------------------------------------
+-- Sec. 5.4.1 Logical Terms 
+--------------------------------------------------------------------------------
+	LogicalTermAST ::= LogicalAndTermAST 
+	                 | LogicalTermAST OR_OR LogicalAndTermAST
+	                 | LogicalTermAST xor LogicalAndTermAST	       
+
+	LogicalAndTermAST ::= EqualityTermAST 
+	                    | LogicalAndTermAST AND_AND EqualityTermAST
+	                 
+    EqualityTermAST ::= RelationalTermAST
+                     | EqualityTermAST EQUAL_EQUAL RelationalTermAST
+                     | EqualityTermAST NOT_EQUAL RelationalTermAST
+    
+    RelationalTermAST ::= ArithmeticTermAST  
+	                 | RelationalTermAST RelationalOpAST ArithmeticTermAST
+                     	                 
+
+	RelationalOpAST$RelationalOpAST ::= LESS | GREATER | LESS_EQUAL | GREATER_EQUAL   
+
+--	LogicalTermAST ::= LogicalAndTermAST 
+--	                 | LogicalTermAST OR_OR LogicalAndTermAST
+--	                 | LogicalTermAST xor LogicalAndTermAST	       
+
+--	LogicalAndTermAST ::= BaseLogicalTermAST 
+--	                    | LogicalAndTermAST AND_AND BaseLogicalTermAST
+	                 
+--	BaseLogicalTermAST ::= NOT BaseLogicalTermAST
+--	                     | LPAREN LogicalTermAST RPAREN
+--	                     | BooleanConstantAST 
+--	                     | ArithmeticTermAST RelationalOpAST ArithmeticTermAST
+--	                     | GraphPatternCallAST
+----	                     | BaseLogicalTermAST EQUAL_EQUAL BaseLogicalTermAST
+----	                     | BaseLogicalTermAST NOT_EQUAL BaseLogicalTermAST
+	                 
+--	RelationalOpAST$RelationalOpAST ::= EQUAL_EQUAL | LESS | GREATER 
+--	                  | LESS_EQUAL | GREATER_EQUAL | NOT_EQUAL  
+
+
+
+--------------------------------------------------------------------------------
+-- Sec. 5.4.2 Arithmetic Terms 
+--------------------------------------------------------------------------------
+
+	ArithmeticTermAST ::= MultArithmeticTermAST 
+	                    | ArithmeticTermAST PLUS MultArithmeticTermAST
+	                    | ArithmeticTermAST MINUS MultArithmeticTermAST
+	
+	MultArithmeticTermAST ::= UnaryArithmeticTermAST
+	                        | MultArithmeticTermAST MULTIPLY UnaryArithmeticTermAST
+	                        | MultArithmeticTermAST DIVIDE UnaryArithmeticTermAST
+	                        | MultArithmeticTermAST REMAINDER UnaryArithmeticTermAST
+	
+	UnaryArithmeticTermAST ::= BaseArithmeticTermAST  --NavigationTermAST
+	                        | MINUS BaseArithmeticTermAST  --NavigationTermAST
+	                        | NOT BaseArithmeticTermAST  --NavigationTermAST 
+
+--    NavigationTermAST ::= BaseArithmeticTermAST 	
+--                        | BaseArithmeticTermAST RIGHTARROW  TypeNameAST	
+	
+	BaseArithmeticTermAST ::= VariableRefAST 
+	                        | ValueAST 	                     
+	                        | LPAREN LogicalTermAST RPAREN
+	                        | AsmFunctionLocationAST
+	                        | GraphPatternCallAST
+                            | PredefinedFunctionCallAST
+
+
+
+                        
+
+--	ArithmeticTermAST ::= MultArithmeticTermAST 
+--	                    | ArithmeticTermAST PLUS MultArithmeticTermAST
+--	                    | ArithmeticTermAST MINUS MultArithmeticTermAST
+	
+	-- Renamed from MultArithmeticTerm
+--	MultArithmeticTermAST ::= BaseArithmeticTermAST
+--	                        | MultArithmeticTermAST MULTIPLY BaseArithmeticTermAST
+--	                        | MultArithmeticTermAST DIVIDE BaseArithmeticTermAST
+--	                        | MultArithmeticTermAST REMAINDER BaseArithmeticTermAST
+
+--	BaseArithmeticTermAST ::= VariableRefAST 
+--	                        | ValueAST 	                     
+--	                        | MINUS ValueAST 
+---- Here the specification contains Term, but this should be ArithmeticTerm	                     
+--	                        | LPAREN ArithmeticTermAST RPAREN
+--	                        | AsmFunctionLocationAST
+--                            | PredefinedFunctionCallAST
+
+--------------------------------------------------------------------------------
+-- Sec. 5.4.3 ASM Functions
+--------------------------------------------------------------------------------
+
+-- TODO: Check that IntegerLiteral is decimal
+    AsmFunctionDefAST ::= OptAnnotationsAST asmfunction TypeNameAST ArityOrTypeDeclAST ReturnTypeOptAST InitialValuesOptAST
+    
+    ArityOrTypeDeclAST ::= DIVIDE ArityAST
+                         | LPAREN TypeConstantsAST   
+    
+    ArityAST ::= DecimalIntegerLiteral
+
+    InitialValuesOptAST ::= SEMICOLON
+                          | LBRACE InitialValuesAST RBRACE
+
+    InitialValuesAST ::= InitialValueAST 
+                       | InitialValuesAST InitialValueAST 
+
+-- Location is changed to ActualParameterDefAST 
+    InitialValueAST ::= ActualParameterDefAST EQUAL ArithmeticTermAST SEMICOLON
+    
+--  LocationDefAST ::=  LPAREN LocationsOptAST RPAREN
+--	LocationsOptAST ::= $empty | Location
+--	Location ::= ArithmeticTermAST
+--	           | Location COMMA ArithmeticTermAST
+
+   TypeConstantsAST ::= QualifiedTypeNameAST RPAREN
+                      | QualifiedTypeNameAST COMMA TypeConstantsAST 
+   
+--   QualifiedTypeConstantAST ::= 	QualifiedTypeNameAST ::= TypeNameAST
+--	                       | QualifiedTypeNameAST DOT TypeNameAST                
+   
+
+-- Location is changed to ActualParameterDefAST 
+-- TODO: Check that the QualifiedTypeNameAST is existing or it corresponds to a NativeFunction
+	AsmFunctionLocationAST ::= ASMFunctionNameAST ActualParameterDefAST
+
+--------------------------------------------------------------------------------
+-- Sec. 5.4.4 Predefined Functions
+--------------------------------------------------------------------------------
+
+	PredefinedFunctionCallAST ::= BuiltInFunctionNameAST LPAREN ArithmeticTermAST RPAREN 
+	                            | ConversionFunctionNameAST LPAREN ArithmeticTermAST RPAREN 
+--	                         | QualifiedTypeNameAST ActualParameterDef
+	
+	BuiltInFunctionNameAST$BuiltInFunctionNameAST ::= ref | fqn | name | value | source | target 
+	                         | multiplicity | aggregation | inverse
+
+	ConversionFunctionNameAST$ConversionFunctionNameAST ::= toBoolean | toString 
+	                         | toInteger | toDouble | toMultiplicity
+                      
+--------------------------------------------------------------------------------
+-- Sec. 5.5 ASM Rules
+--------------------------------------------------------------------------------
+	AsmRuleDefAST ::= OptAnnotationsAST rule TypeNameAST DirectedFormalParameterDefAST EQUAL AsmRuleAST 
+	
+	AsmRulesAST ::= AsmRulesOptAST AsmRuleAST 
+	
+	AsmRulesOptAST ::= $empty
+	              | AsmRulesOptAST AsmRuleAST 
+	
+	AsmRuleAST ::= RegularAsmRuleAST 
+	             | IfRuleAST 
+	             | TryRuleAST 
+	             | ERROR_TOKEN
+        /.$BeginAstAction
+                    //reportErrorTokenMessage(getRhsTokenIndex(1), "Namespace import");
+          $EndAstAction
+        ./	
+	
+	RegularAsmRuleAST ::= SimpleRuleAST 
+	             | CompoundRuleAST 
+	             | ModelManipulationRuleAST 
+
+--	AsmRuleWithElse ::= RegularAsmRule
+--	          | IfRuleWithElse
+--	          | TryRuleWithElse
+
+--------------------------------------------------------------------------------
+-- Sec. 5.5.1 Simple Rules
+--------------------------------------------------------------------------------
+    SimpleRuleAST ::= SkipRuleAST | FailRuleAST 
+                    | CallRuleAST | UpdateRuleAST 
+                    | PrintRuleAST | LogRuleAST 
+    
+    SkipRuleAST ::= skip SEMICOLON
+    
+    FailRuleAST ::= fail SEMICOLON
+    
+    CallRuleAST ::= call QualifiedTypeNameAST ActualParameterDefAST SEMICOLON
+    
+    UpdateRuleAST ::= update VariableRefAST EQUAL ArithmeticTermAST SEMICOLON
+                    | update AsmFunctionUpdateLocationAST EQUAL ArithmeticTermAST SEMICOLON
+--                    | update NavigationLocationAST EQUAL ArithmeticTermAST SEMICOLON
+--	NavigationLocationAST ::= BaseArithmeticTermAST RIGHTARROW  TypeNameAST	
+
+
+	AsmFunctionUpdateLocationAST ::= ASMFunctionNameAST ActualParameterDefAST
+
+	
+    
+    PrintRuleAST ::= print LPAREN LogicalTermAST RPAREN SEMICOLON
+                 |   print LPAREN ArithmeticTermAST COMMA LogicalTermAST RPAREN SEMICOLON
+                 | println LPAREN LogicalTermAST RPAREN SEMICOLON
+                 | println LPAREN ArithmeticTermAST COMMA LogicalTermAST RPAREN SEMICOLON
+
+    --OptBufferAST ::= $empty   
+    --             | ArithmeticTermAST COMMA 
+                 
+    LogRuleAST ::= log LPAREN LogLevelAST COMMA ArithmeticTermAST RPAREN SEMICOLON
+    
+    LogLevelAST$LogLevelAST ::= debug | info | warning | error | fatal
+
+                     
+--------------------------------------------------------------------------------
+-- Sec. 5.5.2 Compound Rules
+--------------------------------------------------------------------------------
+
+    CompoundRuleAST ::=  SequentialRuleAST | RandomRuleAST 
+                | LetRuleAST | IterateRuleAST 
+                | ChooseRuleAST | ForallRuleAST 
+                | ParallelRuleAST | WhenRuleAST
+                
+	SequentialRuleAST ::= seq LBRACE AsmRulesAST RBRACE OptSemicolonAST  
+
+	ParallelRuleAST ::= parallel LBRACE AsmRulesAST RBRACE OptSemicolonAST  
+	
+	RandomRuleAST ::= random LBRACE AsmRulesAST RBRACE OptSemicolonAST 
+
+	OptSemicolonAST ::= $empty | SEMICOLON
+	
+	LetRuleAST ::= let VariableDefinitionsAST in AsmRuleAST 
+	
+	VariableDefinitionsAST ::= VariableDefinitionAST  
+	                         | VariableDefinitionsAST COMMA VariableDefinitionAST 
+	                      
+	VariableDefinitionAST ::= VariableDefAST TypeOptAST EQUAL ArithmeticTermAST 
+	
+	IterateRuleAST ::= iterate AsmRuleAST 
+	
+	ChooseRuleAST ::= choose ConstrainedVariablesOptAST with ConditionAST DoActionOptAST  
+
+	ForallRuleAST ::= forall ConstrainedVariablesOptAST with ConditionAST DoActionOptAST 
+	
+-- Logical terms are restricted to GraphPatternCalls and terms over AsmFunctionLoctions	
+	ConditionAST ::= LogicalTermAST
+--	ConditionAST ::= GraphPatternCallAST
+	               | GTRuleCallAST 
+--	               | TypedModelElementEnumAST
+--	               | AsmFunctionLocationAST
+--	               | ERROR_TOKEN
+
+
+--  TypedModelElementEnumAST ::=
+                  
+  
+	DoActionOptAST ::= SEMICOLON | do AsmRuleAST
+	
+	IfRuleAST ::= if LPAREN LogicalTermAST RPAREN AsmRuleAST 
+	         | if LPAREN LogicalTermAST RPAREN AsmRuleAST else AsmRuleAST
+--	         | if LPAREN LogicalTermAST RPAREN AsmRuleWithElse else AsmRule
+
+--	IfRuleWithElse ::= if LPAREN LogicalTermAST RPAREN AsmRuleWithElse else AsmRuleWithElse
+
+	TryRuleAST ::= try AsmRuleAST
+	          | try AsmRuleAST else AsmRuleAST
+--	          | try AsmRuleWithElse else AsmRule
+--        TryOptElseAST ::= $empty | else AsmRuleAST
+
+--	TryRuleWithElse ::= try AsmRuleWithElse else AsmRuleWithElse 
+	          
+	WhenRuleAST ::= when LPAREN WhenConditionAST RPAREN do AsmRuleAST
+	
+	-- Disjunction of elementary changes are considered
+	WhenConditionAST ::= WhenChangeAST |  
+	 	                   WhenConditionAST COMMA WhenChangeAST
+
+	WhenChangeAST ::= new LPAREN VariableRefAST RPAREN 
+	                | delete LPAREN VariableRefAST RPAREN
+	                | changed LPAREN VariableRefAST RPAREN
+	
+--------------------------------------------------------------------------------
+-- Sec. 5.5.3 Model Manipulation Rules
+--------------------------------------------------------------------------------
+
+	ModelManipulationRuleAST ::= CreateRuleAST | DeleteRuleAST | CopyRuleAST 
+	                           | MoveRuleAST | ElementUpdateRuleAST 
+
+	CreateRuleAST ::= new LPAREN CreateModelElementAST RPAREN SEMICOLON
+	                | new LPAREN CreateRelationshipAST RPAREN SEMICOLON
+
+--	CreateContentsAST ::= CreateModelElementAST | ManipulateRelationshipAST 
+	
+	CreateModelElementAST ::= QualifiedTypeNameAST CreateEntityBodyAST InConstraintOptAST 
+	                     | QualifiedTypeNameAST CreateRelationBodyAST
+
+	CreateEntityBodyAST ::= LPAREN VariableRefAST RPAREN 
+	CreateRelationBodyAST ::= LPAREN VariableDefRefAST COMMA ArithmeticTermAST COMMA ArithmeticTermAST RPAREN 
+
+	InConstraintOptAST ::= $empty | in ArithmeticTermAST
+
+--	ManipulateRelationshipAST ::= ManipulateInheritanceAST | 
+--	                              ManipulateInstantiationAST
+	
+    CreateRelationshipAST ::= supertypeOf TwoParametersAST
+                            | subtypeOf TwoParametersAST
+	                        | typeOf TwoParametersAST
+	                        | instanceOf TwoParametersAST  
+	
+--	ManipulateRelationshipBodyAST ::= LPAREN ArithmeticTermAST COMMA ArithmeticTermAST RPAREN 
+	
+	DeleteRuleAST ::= delete LPAREN DeleteContentsAST RPAREN SEMICOLON
+	                | delete LPAREN DeleteRelationshipAST RPAREN SEMICOLON
+	
+	DeleteContentsAST ::= ArithmeticTermAST DeleteSemanticsOptAST
+	                    
+	DeleteSemanticsOptAST ::= $empty | COMMA DeleteSemanticsAST
+	
+	DeleteSemanticsAST ::= delete_content | move_content	                    
+
+    DeleteRelationshipAST ::= supertypeOf TwoParametersAST
+                            | subtypeOf TwoParametersAST
+	                        | typeOf TwoParametersAST
+	                        | instanceOf TwoParametersAST  
+	
+	CopyRuleAST ::= copy LPAREN CopyContentsAST RPAREN SEMICOLON
+
+	CopyContentsAST ::= ArithmeticTermAST COMMA ArithmeticTermAST 
+						COMMA VariableRefAST COMMA CopySemanticsAST								
+
+	CopySemanticsAST ::= copy_boundary_edges | skip_boundary_edges
+									
+	MoveRuleAST ::= move TwoParametersAST SEMICOLON
+
+	TwoParametersAST ::= LPAREN ArithmeticTermAST COMMA ArithmeticTermAST RPAREN
+
+	ElementUpdateRuleAST ::= ElementUpdateOpAST TwoParametersAST SEMICOLON
+	
+	ElementUpdateOpAST$ElementUpdateOpAST ::= rename | setValue | setFrom | setTo
+	                     | setMultiplicity | setAggregation | setInverse
+	
+--------------------------------------------------------------------------------
+-- Sec. 5.6 Naming 
+--------------------------------------------------------------------------------
+
+--------------------------------------------------------------------------------
+-- Sec. 5.6.1 Base elements -> Part of the VTCLLexer
+--------------------------------------------------------------------------------
+	
+--------------------------------------------------------------------------------
+-- Sec. 5.6.2 Types and Names
+--------------------------------------------------------------------------------
+
+	
+	QualifiedTypeNameAST ::= TypeNameAST
+	                       | QualifiedTypeNameAST DOT TypeNameAST                
+	
+	TypeNameAST ::= NameLiteral 
+	              | IDENTIFIER
+	               --LocalNameAST
+	              | UpperCaseLiteral
+	              | KeywordAsIdentifier
+				  | StringLiteral
+
+	VariableRefAST ::= UpperCaseLiteral	
+
+-- DummyVariables are currently disabled
+	VariableDefRefAST ::= UpperCaseLiteral --| DummyVariableLiteral 	
+
+	VariableDefAST ::= UpperCaseLiteral	
+
+-- In ASM programs, all upper case literals and reserved words
+-- should be quoted when used as a model element constant with local names 
+	ValueQualifiedNameAST ::= ValueLocalNameAST 
+	                        | QualifiedTypeNameAST DOT TypeNameAST
+	ValueLocalNameAST ::= NameLiteral 
+	                    | IDENTIFIER
+	
+	
+	
+	ASMFunctionNameAST ::= ValueQualifiedNameAST
+
+--------------------------------------------------------------------------------
+-- Sec. 5.6.3 Parameter and Variable Lists
+--------------------------------------------------------------------------------
+
+	FormalParameterDefAST ::= LPAREN FormalParamsAST RPAREN 
+	                        | LPAREN RPAREN 
+--	                        | ERROR_TOKEN
+--        /.$BeginAstAction
+--                    //reportErrorTokenMessage(getRhsTokenIndex(1), "Namespace import");
+--          $EndAstAction
+--        ./	
+	
+               
+	FormalParamsAST ::= PatternVariableDefAST TypeOptAST
+	                  | FormalParamsAST COMMA PatternVariableDefAST TypeOptAST
+
+	DirectedFormalParameterDefAST ::= LPAREN DirectedFormalParamsAST RPAREN 	
+	                                | LPAREN RPAREN 
+--	                                | ERROR_TOKEN
+--        /.$BeginAstAction
+--                    //reportErrorTokenMessage(getRhsTokenIndex(1), "Namespace import");
+--          $EndAstAction
+--        ./	
+
+
+	DirectedFormalParamsAST ::= DirectionKindAST VariableDefAST TypeOptAST
+	               | DirectedFormalParamsAST COMMA DirectionKindAST VariableDefAST TypeOptAST
+
+	DirectionKindAST ::= in | out | inout
+
+    ActualParameterDefAST ::= LPAREN ActualParamsAST RPAREN
+                            | LPAREN RPAREN
+--	                        | ERROR_TOKEN
+--        /.$BeginAstAction
+--                    //reportErrorTokenMessage(getRhsTokenIndex(1), "Namespace import");
+--          $EndAstAction
+--        ./	
+		
+-- Term is restricted to ArithmeticTerm in order to avoid conflicts
+	ActualParamsAST ::= ArithmeticTermAST
+	                  | ActualParamsAST COMMA ArithmeticTermAST
+
+    ActualPatternParameterDefAST ::= LPAREN ActualParamsPatternVariablesAST RPAREN 
+                                | LPAREN RPAREN
+--	                            | ERROR_TOKEN
+--        /.$BeginAstAction
+--                    //reportErrorTokenMessage(getRhsTokenIndex(1), "Namespace import");
+--          $EndAstAction
+--        ./	
+
+
+	ActualParamsPatternVariablesAST ::= PatternVariableRefAST 
+                                   | ActualParamsPatternVariablesAST COMMA PatternVariableRefAST 
+		        
+
+	ConstrainedVariablesOptAST ::= $empty 
+	                          | ConstrainedVariablesAST 
+
+	ConstrainedVariablesAST ::= VariableDefAST TypeOptAST ContainmentConstraintOptAST 
+	                       | ConstrainedVariablesAST COMMA VariableDefAST TypeOptAST ContainmentConstraintOptAST 
+
+	ContainmentConstraintOptAST ::= $empty 
+	                            | in ArithmeticTermAST
+	                            | below ArithmeticTermAST
+
+    TypeOptAST ::= $empty
+                 | COLON QualifiedTypeNameAST
+
+    ReturnTypeOptAST ::= $empty
+                 | COLON QualifiedTypeNameAST
+                 
+--------------------------------------------------------------------------------
+-- Sec. 5.6.4 Values and Constants
+--------------------------------------------------------------------------------
+
+	ValueAST ::= UndefValueAST 
+	        | BooleanConstantAST 
+	        | MultiplicityConstantAST 
+	        | StringConstantAST 
+	        | NumericConstantAST 
+	        | ValueQualifiedNameAST
+	
+	UndefValueAST ::= undef
+	
+	BooleanConstantAST ::= false | true
+	
+	MultiplicityConstantAST ::= one_to_one | one_to_many 
+	                       | many_to_one | many_to_many
+	                       
+	StringConstantAST ::= StringLiteral	                       
+	        
+	NumericConstantAST ::= DecimalIntegerLiteral        
+                      | IntegerLiteral
+                      | FloatingPointLiteral  
+                      | DoubleLiteral         
+
+	KeywordAsIdentifier$KeywordAsIdentifier ::= 
+    namespace | import | machine | pattern | neg | find |
+-- The following keywords conflict with entity definition, so they are disallowed without ''s 
+--    check | supertypeOf | subtypeOf |  typeOf | instanceOf | 
+    gtrule | precondition | postcondition | action | apply | xor |
+    asmfunction | rule | skip | fail | call | update | print | println | log | debug | info | warning |
+    error | fatal | seq | random | let | in | below | choose | forall | with | do | iterate | if | try | else |
+    new | delete | delete_content | move_content | copy | copy_boundary_edges |
+    skip_boundary_edges | move | rename | setValue | setFrom | setTo | setMultiplicity |
+    setAggregation | setInverse | undef | true | false | one_to_one | one_to_many |
+    many_to_one | many_to_many | ref | fqn | name | value | source | target | multiplicity | 
+    aggregation | inverse | toBoolean | toString | toInteger | toDouble | toMultiplicity | out | inout |  
+    parallel  | changed | when | shareable
+
+--------------------------------------------------------------------------------
+-- Annotations
+--------------------------------------------------------------------------------
+
+    OptAnnotationsAST ::= $empty | AnnotationsAST
+	
+	AnnotationsAST ::= AnnotationAST 
+	                 | AnnotationsAST AnnotationAST
+
+	AnnotationAST ::= AnnotationNameAST
+	                | AnnotationNameAST LPAREN AnnotationBodyAST RPAREN
+	
+	AnnotationBodyAST ::= KeyValuePairAST
+	                    | AnnotationBodyAST COMMA KeyValuePairAST
+	                 
+	KeyValuePairAST ::= TypeNameAST EQUAL TypeNameAST  
+		        
+	AnnotationNameAST ::= AnnotationLiteral
+$End
+
+--$Types
+--    ForStatement ::= ForStatementNoShortIf
+--$End
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLParser.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLParser.java
new file mode 100644
index 0000000..8632878
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLParser.java
@@ -0,0 +1,3773 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser;
+
+import org.eclipse.viatra2.lpgparser.ast.*;
+import lpg.lpgjavaruntime.*;
+import org.eclipse.viatra2.errors.info.ErrorInformation;
+import org.eclipse.viatra2.errors.info.Location;
+import org.eclipse.viatra2.lpgparser.loader.VTCLMessages;
+import org.eclipse.viatra2.errors.info.ErrorInformation.ErrorKind;
+import org.eclipse.viatra2.errors.info.ErrorInformation.ErrorSeverity;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.eclipse.viatra2.lpgparser.loader.ExplanationGenerator;
+  
+public class VTCLParser extends PrsStream implements RuleAction {
+    final String PARSER_MARKER = "org.eclipse.viatra2.loaders.vtclparsermarker";
+
+    ExplanationGenerator generator = new ExplanationGenerator(this);
+
+    private java.util.List<ErrorInformation> allErrorInfos = new java.util.ArrayList<ErrorInformation>();
+    public java.util.List<ErrorInformation> getAllErrorInfos() {
+        return allErrorInfos;
+    }
+    
+    public void clearParseErrorList() {
+    if (allErrorInfos == null)
+	    allErrorInfos = new java.util.ArrayList<ErrorInformation>();
+    else
+	    allErrorInfos.clear();
+}
+
+    private static ParseTable prs = new VTCLParserprs();
+    private BacktrackingParser btParser;
+
+    public BacktrackingParser getParser() { return btParser; }
+    private void setResult(Object object) { btParser.setSym1(object); }
+    public Object getRhsSym(int i) { return btParser.getSym(i); }
+
+    public int getRhsTokenIndex(int i) { return btParser.getToken(i); }
+    public IToken getRhsIToken(int i) { return super.getIToken(getRhsTokenIndex(i)); }
+    
+    public int getRhsFirstTokenIndex(int i) { return btParser.getFirstToken(i); }
+    public IToken getRhsFirstIToken(int i) { return super.getIToken(getRhsFirstTokenIndex(i)); }
+
+    public int getRhsLastTokenIndex(int i) { return btParser.getLastToken(i); }
+    public IToken getRhsLastIToken(int i) { return super.getIToken(getRhsLastTokenIndex(i)); }
+
+    public int getLeftSpan() { return btParser.getFirstToken(); }
+    public IToken getLeftIToken()  { return super.getIToken(getLeftSpan()); }
+
+    public int getRightSpan() { return btParser.getLastToken(); }
+    public IToken getRightIToken() { return super.getIToken(getRightSpan()); }
+
+    public int getRhsErrorTokenIndex(int i) {
+        int index = btParser.getToken(i);
+        IToken err = super.getIToken(index);
+        return (err instanceof ErrorToken ? index : 0);
+    }
+    public ErrorToken getRhsErrorIToken(int i) {
+        int index = btParser.getToken(i);
+        IToken err = super.getIToken(index);
+        return (ErrorToken) (err instanceof ErrorToken ? err : null);
+    }
+
+    public VTCLParser(LexStream lexStream) {
+        super(lexStream);
+
+        try {
+            super.remapTerminalSymbols(orderedTerminalSymbols(), VTCLParserprs.EOFT_SYMBOL);
+        } catch(NullExportedSymbolsException e) {
+        } catch(NullTerminalSymbolsException e) {
+        } catch(UnimplementedTerminalsException e) {
+            java.util.ArrayList unimplemented_symbols = e.getSymbols();
+            System.out.println("The Lexer will not scan the following token(s):");
+            for (int i = 0; i < unimplemented_symbols.size(); i++) {
+                Integer id = (Integer) unimplemented_symbols.get(i);
+                System.out.println("    " + VTCLParsersym.orderedTerminalSymbols[id.intValue()]);               
+            }
+            System.out.println();                        
+        }
+        catch(UndefinedEofSymbolException e) {
+            throw new Error(new UndefinedEofSymbolException
+                                ("The Lexer does not implement the Eof symbol " +
+                                 VTCLParsersym.orderedTerminalSymbols[VTCLParserprs.EOFT_SYMBOL]));
+        } 
+    }
+
+    public String[] orderedTerminalSymbols() { return VTCLParsersym.orderedTerminalSymbols; }
+    public String getTokenKindName(int kind) { return VTCLParsersym.orderedTerminalSymbols[kind]; }
+    public int getEOFTokenKind() { return VTCLParserprs.EOFT_SYMBOL; }
+    public PrsStream getParseStream() { return this; }
+    
+
+/**
+ * Called when encountering a single bad character. Do not report
+ * this error at this point.
+ */
+public void reportError(int left_char, int right_char) {
+//		System.out.println("reportError(int, int)");	    
+}
+
+/**
+ * Reports the parse error by setting the error to <code>errorString</code>
+ * 
+ * @param errorCode the error code
+ * @param locationInfo
+ * @param leftToken the token to the left of the error
+ * @param rightToken the token to the right of the error
+ * @param tokenText the text of the bad token
+ */
+public void reportError(int errorCode, String locationInfo, int leftToken, int rightToken, String tokenText) {
+
+    int leftTokenLoc = (leftToken > rightToken ? rightToken : leftToken);
+    int rightTokenLoc = rightToken;
+    String errorString;
+
+    if (getLine(leftTokenLoc)  <= 0) {
+ 	    errorString =  VTCLMessages.InvalidVTCL_ERROR_;
+        allErrorInfos.add(new ErrorInformation(errorString, PARSER_MARKER, ErrorKind.PARSE_ERROR)); 
+    } 
+    else {
+  Location location = new Location(
+		getLine(leftTokenLoc),
+		getColumn(leftTokenLoc), 
+	getEndLine(rightTokenLoc),
+	getEndColumn(rightTokenLoc) + 1,
+	getStartOffset(leftTokenLoc),
+	getEndOffset(rightTokenLoc));
+	
+	switch (errorCode) {
+	case EOF_CODE:
+	case MISPLACED_CODE:
+        case DELETION_CODE:
+            errorString = " Syntax error: " + errorMsgText[errorCode] + " " +    
+    		      	'"' + computeInputString(
+    				getIToken(leftToken).getStartOffset(),
+    				getIToken(rightToken).getEndOffset()) + '"';
+            break;
+        case INVALID_TOKEN_CODE:
+             errorString = " Syntax error: Token" +  " " +    
+    		          '"' + computeInputString(
+    				getIToken(leftToken).getStartOffset(),
+    				getIToken(rightToken).getEndOffset()) + '"'
+                          + " " + errorMsgText[errorCode] + ".";
+             String explanation = generator.calculateErrorExplanation(tokenText, leftToken, rightToken);
+             if (explanation != "") {
+    	     errorString = errorString + " Cause: " + explanation + ".";
+            }
+        break;
+
+	case MERGE_CODE:
+	case BEFORE_CODE:
+	case INSERTION_CODE:
+	case SCOPE_CODE:
+	case SUBSTITUTION_CODE: // includes SECONDARY_CODE
+	    errorString = " Syntax error: " + tokenText + " " + errorMsgText[errorCode] + " " + 
+		'"' + computeInputString(
+			getIToken(leftToken).getStartOffset(),
+			getIToken(rightToken).getEndOffset()) + '"';
+	    break;
+
+	default:
+	    errorString = " Syntax error: " + errorMsgText[errorCode] + " at token " + tokenText;
+	break;
+	}
+	allErrorInfos.add(new 
+		ErrorInformation(errorString,
+			PARSER_MARKER,
+			ErrorKind.PARSE_ERROR,
+			location,
+			ErrorSeverity.ERROR));
+ }
+    
+}
+ 
+
+/**
+ * Returns a single line string representation of the input chars
+ * for the given range.
+ * 
+ * @param left left most char index
+ * @param right right most char index
+ * @return a single line string representation of the input chars
+ */
+private String computeInputString(int left, int right) {
+	StringBuffer result = new StringBuffer(right - left + 1);
+	char[] chars = getInputChars();
+
+	for (int i = left; i <= right; i++) {
+		if (chars[i] == '\t') {
+			result.append(' ');
+		} else if (chars[i] == '\n' || chars[i] == '\r' || chars[i] == '\f') {
+			if (i > 0) {
+				if (!Character.isWhitespace(chars[i-1])) {
+					result.append(' ');
+				}
+			}
+		} else {
+			result.append(chars[i]);
+		}
+			
+	}
+	return result.toString();
+}
+
+
+    
+/**
+ * Report error message for given error_token by calling 
+ * method <code>reportError/5</code> is called finally
+ * @param error_token 
+ * @param msg 
+ */
+public final void reportErrorTokenMessage(int error_token, String msg)
+{
+    allErrorInfos.add(new 
+	ErrorInformation(msg, 
+			PARSER_MARKER,
+		    ErrorKind.PARSE_ERROR,
+			getLine(error_token),  
+			getColumn(error_token),
+			getEndLine(error_token),
+			getEndColumn(error_token)));
+}
+
+/** 
+ * This SymbolTable class is from the IMP project
+ */
+public static class SymbolTable {
+    private Map<String,ASTNode> table = new HashMap<String,ASTNode>();
+
+    public void addDefinition(String name, ASTNode def) { table.put(name, def); }
+    public ASTNode lookup(String name) { return table.get(name); }
+    public List<String> allSymbolsOfType(Class type) {
+        List<String> result= new ArrayList<String>();
+
+        for(String sym: table.keySet()) {
+            ASTNode def= table.get(sym);
+
+            if (type.isInstance(def))
+                result.add(sym);
+        }
+        return result;
+    }
+    public <T> List<T> allDefsOfType(Class<T> type) {
+        List<T> result = new ArrayList<T>();
+        
+        for(String sym: table.keySet()) {
+            ASTNode def= table.get(sym);
+
+            if (type.isInstance(def))
+                result.add((T) def);
+        }
+        return result;
+    }
+    public Set<String> allSymbols() { return table.keySet(); }
+}
+//    protected static SymbolTable symtab;
+//    { symtab = new SymbolTable(); }
+
+    public ASTNode parser()
+    {
+        return parser(null, 0);
+    }
+    
+    public ASTNode parser(Monitor monitor)
+    {
+        return parser(monitor, 0);
+    }
+    
+    public ASTNode parser(int error_repair_count)
+    {
+        return parser(null, error_repair_count);
+    }
+
+    public ASTNode parser(Monitor monitor, int error_repair_count)
+    {
+        try
+        {
+            btParser = new BacktrackingParser(monitor, this, prs, this);
+        }
+        catch (NotBacktrackParseTableException e)
+        {
+            throw new Error(new NotBacktrackParseTableException
+                                ("Regenerate VTCLParserprs.java with -BACKTRACK option"));
+        }
+        catch (BadParseSymFileException e)
+        {
+            throw new Error(new BadParseSymFileException("Bad Parser Symbol File -- VTCLParsersym.java"));
+        }
+
+        try
+        {
+            return (ASTNode) btParser.parse(error_repair_count);
+        }
+        catch (BadParseException e)
+        {
+            reset(e.error_token); // point to error token
+            DiagnoseParser diagnoseParser = new DiagnoseParser(this, prs);
+            diagnoseParser.diagnose(e.error_token);
+        }
+
+        return null;
+    }
+
+
+    public void ruleAction(int ruleNumber)
+    {
+        switch (ruleNumber)
+        {
+ 
+            //
+            // Rule 1:  VTCLFile ::= NamespaceDefAST NamespaceImportsAST GTASMDefAST
+            //
+            case 1: {
+                setResult(
+                    new VTCLFile(getLeftIToken(), getRightIToken(),
+                                 (NamespaceDefAST)getRhsSym(1),
+                                 (NamespaceImportsAST)getRhsSym(2),
+                                 (GTASMDefAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 2:  NamespaceDefAST ::= $Empty
+            //
+            case 2: {
+                setResult(null);
+                break;
+            } 
+            //
+            // Rule 3:  NamespaceDefAST ::= namespace QualifiedTypeNameAST SEMICOLON
+            //
+            case 3: {
+                setResult(
+                    new NamespaceDefAST(getLeftIToken(), getRightIToken(),
+                                        (IQualifiedTypeNameAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 4:  NamespaceImportsAST ::= $Empty
+            //
+            case 4: {
+                setResult(null);
+                break;
+            } 
+            //
+            // Rule 5:  NamespaceImportsAST ::= NamespaceImportsAST NamespaceImportAST
+            //
+            case 5: {
+                setResult(
+                    new NamespaceImportsAST(getLeftIToken(), getRightIToken(),
+                                            (NamespaceImportsAST)getRhsSym(1),
+                                            (INamespaceImportAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 6:  NamespaceImportAST ::= import QualifiedTypeNameAST SEMICOLON
+            //
+            case 6: {
+                setResult(
+                    new NamespaceImportAST0(getLeftIToken(), getRightIToken(),
+                                            (IQualifiedTypeNameAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 7:  NamespaceImportAST ::= ERROR_TOKEN
+            //
+            case 7: {
+                setResult(
+                    new NamespaceImportAST1(VTCLParser.this, getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 8:  GTASMDefAST ::= OptAnnotationsAST machine TypeNameAST LBRACE MachineContentsAST RBRACE
+            //
+            case 8: {
+                setResult(
+                    new GTASMDefAST(getLeftIToken(), getRightIToken(),
+                                    (IOptAnnotationsAST)getRhsSym(1),
+                                    (ITypeNameAST)getRhsSym(3),
+                                    (IMachineContentsAST)getRhsSym(5))
+                );
+                break;
+            } 
+            //
+            // Rule 9:  MachineContentsAST ::= MachineContentAST
+            //
+            case 9:
+                break; 
+            //
+            // Rule 10:  MachineContentsAST ::= MachineContentsAST MachineContentAST
+            //
+            case 10: {
+                setResult(
+                    new MachineContentsAST(getLeftIToken(), getRightIToken(),
+                                           (IMachineContentsAST)getRhsSym(1),
+                                           (IMachineContentAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 11:  MachineContentAST ::= GraphPatternDefAST
+            //
+            case 11:
+                break; 
+            //
+            // Rule 12:  MachineContentAST ::= GTRuleDefAST
+            //
+            case 12:
+                break; 
+            //
+            // Rule 13:  MachineContentAST ::= AsmFunctionDefAST
+            //
+            case 13:
+                break; 
+            //
+            // Rule 14:  MachineContentAST ::= AsmRuleDefAST
+            //
+            case 14:
+                break; 
+            //
+            // Rule 15:  MachineContentAST ::= ERROR_TOKEN
+            //
+            case 15: {
+                setResult(
+                    new MachineContentAST(VTCLParser.this, getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 16:  GraphPatternDefAST ::= OptAnnotationsAST OptShareableDefAST pattern TypeNameAST FormalParameterDefAST EQUAL PatternBodiesAST
+            //
+            case 16: {
+                setResult(
+                    new GraphPatternDefAST(getLeftIToken(), getRightIToken(),
+                                           (IOptAnnotationsAST)getRhsSym(1),
+                                           (OptShareableDefAST)getRhsSym(2),
+                                           (ITypeNameAST)getRhsSym(4),
+                                           (IFormalParameterDefAST)getRhsSym(5),
+                                           (IPatternBodiesAST)getRhsSym(7))
+                );
+                break;
+            } 
+            //
+            // Rule 17:  OptShareableDefAST ::= $Empty
+            //
+            case 17: {
+                setResult(null);
+                break;
+            } 
+            //
+            // Rule 18:  OptShareableDefAST ::= shareable
+            //
+            case 18: {
+                setResult(
+                    new OptShareableDefAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 19:  PatternBodiesAST ::= PatternBodyAST
+            //
+            case 19:
+                break; 
+            //
+            // Rule 20:  PatternBodiesAST ::= PatternBodiesAST or PatternBodyAST
+            //
+            case 20: {
+                setResult(
+                    new PatternBodiesAST(getLeftIToken(), getRightIToken(),
+                                         (IPatternBodiesAST)getRhsSym(1),
+                                         (PatternBodyAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 21:  PatternBodyAST ::= LBRACE PatternBodyContentsAST RBRACE
+            //
+            case 21: {
+                setResult(
+                    new PatternBodyAST(getLeftIToken(), getRightIToken(),
+                                       (PatternBodyContentsAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 22:  PatternBodyContentsAST ::= $Empty
+            //
+            case 22: {
+                setResult(null);
+                break;
+            } 
+            //
+            // Rule 23:  PatternBodyContentsAST ::= PatternBodyContentsAST PatternBodyContentDefAST
+            //
+            case 23: {
+                setResult(
+                    new PatternBodyContentsAST(getLeftIToken(), getRightIToken(),
+                                               (PatternBodyContentsAST)getRhsSym(1),
+                                               (IPatternBodyContentDefAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 24:  PatternBodyContentDefAST ::= PatternBodyContentAST SEMICOLON
+            //
+            case 24: {
+                setResult(
+                    new PatternBodyContentDefAST0(getLeftIToken(), getRightIToken(),
+                                                  (IPatternBodyContentAST)getRhsSym(1))
+                );
+                break;
+            } 
+            //
+            // Rule 25:  PatternBodyContentDefAST ::= neg GraphPatternDefAST
+            //
+            case 25: {
+                setResult(
+                    new PatternBodyContentDefAST1(getLeftIToken(), getRightIToken(),
+                                                  (GraphPatternDefAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 26:  PatternBodyContentAST ::= LocalPatternBodyElementAST
+            //
+            case 26:
+                break; 
+            //
+            // Rule 27:  PatternBodyContentAST ::= PatternCompositionAST
+            //
+            case 27:
+                break; 
+            //
+            // Rule 28:  PatternBodyContentAST ::= NegativePatternAST
+            //
+            case 28:
+                break; 
+            //
+            // Rule 29:  PatternBodyContentAST ::= PatternVariableAssignmentAST
+            //
+            case 29:
+                break; 
+            //
+            // Rule 30:  PatternBodyContentAST ::= CheckConditionAST
+            //
+            case 30:
+                break; 
+            //
+            // Rule 31:  PatternBodyContentAST ::= NonInjectivityConstraintAST
+            //
+            case 31:
+                break; 
+            //
+            // Rule 32:  PatternBodyContentAST ::= ERROR_TOKEN
+            //
+            case 32: {
+                setResult(
+                    new PatternBodyContentAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 33:  LocalPatternBodyElementAST ::= ModelElementAST
+            //
+            case 33:
+                break; 
+            //
+            // Rule 34:  LocalPatternBodyElementAST ::= RelationshipAST
+            //
+            case 34:
+                break; 
+            //
+            // Rule 35:  NegativePatternAST ::= neg PatternCompositionAST
+            //
+            case 35: {
+                setResult(
+                    new NegativePatternAST(getLeftIToken(), getRightIToken(),
+                                           (PatternCompositionAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 36:  PatternCompositionAST ::= find QualifiedTypeNameAST ActualPatternParameterDefAST OptMatchCountAST
+            //
+            case 36: {
+                setResult(
+                    new PatternCompositionAST(getLeftIToken(), getRightIToken(),
+                                              (IQualifiedTypeNameAST)getRhsSym(2),
+                                              (IActualPatternParameterDefAST)getRhsSym(3),
+                                              (OptMatchCountAST)getRhsSym(4))
+                );
+                break;
+            } 
+            //
+            // Rule 37:  PatternVariableAssignmentAST ::= PatternVariableRefAST EQUAL PatternVariableRefAST
+            //
+            case 37: {
+                setResult(
+                    new PatternVariableAssignmentAST(getLeftIToken(), getRightIToken(),
+                                                     (PatternVariableRefAST)getRhsSym(1),
+                                                     (PatternVariableRefAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 38:  NonInjectivityConstraintAST ::= PatternVariableRefAST NONINJECTIVE PatternVariableRefAST
+            //
+            case 38: {
+                setResult(
+                    new NonInjectivityConstraintAST(getLeftIToken(), getRightIToken(),
+                                                    (PatternVariableRefAST)getRhsSym(1),
+                                                    (PatternVariableRefAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 39:  CheckConditionAST ::= check LPAREN LogicalTermAST RPAREN
+            //
+            case 39: {
+                setResult(
+                    new CheckConditionAST(getLeftIToken(), getRightIToken(),
+                                          (ILogicalTermAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 40:  OptMatchCountAST ::= $Empty
+            //
+            case 40: {
+                setResult(null);
+                break;
+            } 
+            //
+            // Rule 41:  OptMatchCountAST ::= HASHMARK CounterVariableAST
+            //
+            case 41: {
+                setResult(
+                    new OptMatchCountAST(getLeftIToken(), getRightIToken(),
+                                         (CounterVariableAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 42:  PatternVariableDefAST ::= UpperCaseLiteral
+            //
+            case 42: {
+                setResult(
+                    new PatternVariableDefAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 43:  PatternVariableRefAST ::= UpperCaseLiteral
+            //
+            case 43: {
+                setResult(
+                    new PatternVariableRefAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 44:  PatternVariableDefRefAST ::= UpperCaseLiteral
+            //
+            case 44: {
+                setResult(
+                    new PatternVariableDefRefAST0(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 45:  PatternVariableDefRefAST ::= DummyVariableLiteral
+            //
+            case 45: {
+                setResult(
+                    new PatternVariableDefRefAST1(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 46:  CounterVariableAST ::= UpperCaseLiteral
+            //
+            case 46: {
+                setResult(
+                    new CounterVariableAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 47:  GraphPatternCallAST ::= find QualifiedTypeNameAST ActualParameterDefAST OptMatchCountAST
+            //
+            case 47: {
+                setResult(
+                    new GraphPatternCallAST(getLeftIToken(), getRightIToken(),
+                                            (IQualifiedTypeNameAST)getRhsSym(2),
+                                            (IActualParameterDefAST)getRhsSym(3),
+                                            (OptMatchCountAST)getRhsSym(4))
+                );
+                break;
+            } 
+            //
+            // Rule 48:  ModelElementAST ::= EntityAST
+            //
+            case 48:
+                break; 
+            //
+            // Rule 49:  ModelElementAST ::= RelationAST
+            //
+            case 49:
+                break; 
+            //
+            // Rule 50:  EntityAST ::= QualifiedTypeNameAST EntityBody ContainmentConstraintOptAST
+            //
+            case 50: {
+                setResult(
+                    new EntityAST(getLeftIToken(), getRightIToken(),
+                                  (IQualifiedTypeNameAST)getRhsSym(1),
+                                  (EntityBody)getRhsSym(2),
+                                  (IContainmentConstraintOptAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 51:  EntityBody ::= LPAREN PatternVariableDefRefAST RPAREN
+            //
+            case 51: {
+                setResult(
+                    new EntityBody(getLeftIToken(), getRightIToken(),
+                                   (IPatternVariableDefRefAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 52:  RelationAST ::= QualifiedTypeNameAST RelationBodyAST
+            //
+            case 52: {
+                setResult(
+                    new RelationAST(getLeftIToken(), getRightIToken(),
+                                    (IQualifiedTypeNameAST)getRhsSym(1),
+                                    (RelationBodyAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 53:  RelationBodyAST ::= LPAREN PatternVariableDefRefAST COMMA PatternVariableRefAST COMMA PatternVariableRefAST RPAREN
+            //
+            case 53: {
+                setResult(
+                    new RelationBodyAST(getLeftIToken(), getRightIToken(),
+                                        (IPatternVariableDefRefAST)getRhsSym(2),
+                                        (PatternVariableRefAST)getRhsSym(4),
+                                        (PatternVariableRefAST)getRhsSym(6))
+                );
+                break;
+            } 
+            //
+            // Rule 54:  RelationshipAST ::= InheritanceAST
+            //
+            case 54:
+                break; 
+            //
+            // Rule 55:  RelationshipAST ::= InstantiationAST
+            //
+            case 55:
+                break; 
+            //
+            // Rule 56:  InheritanceAST ::= supertypeOf RelationshipBodyAST
+            //
+            case 56: {
+                setResult(
+                    new InheritanceAST0(getLeftIToken(), getRightIToken(),
+                                        (RelationshipBodyAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 57:  InheritanceAST ::= subtypeOf RelationshipBodyAST
+            //
+            case 57: {
+                setResult(
+                    new InheritanceAST1(getLeftIToken(), getRightIToken(),
+                                        (RelationshipBodyAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 58:  InstantiationAST ::= typeOf RelationshipBodyAST
+            //
+            case 58: {
+                setResult(
+                    new InstantiationAST0(getLeftIToken(), getRightIToken(),
+                                          (RelationshipBodyAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 59:  InstantiationAST ::= instanceOf RelationshipBodyAST
+            //
+            case 59: {
+                setResult(
+                    new InstantiationAST1(getLeftIToken(), getRightIToken(),
+                                          (RelationshipBodyAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 60:  RelationshipBodyAST ::= LPAREN PatternVariableRefAST COMMA PatternVariableRefAST RPAREN
+            //
+            case 60: {
+                setResult(
+                    new RelationshipBodyAST(getLeftIToken(), getRightIToken(),
+                                            (PatternVariableRefAST)getRhsSym(2),
+                                            (PatternVariableRefAST)getRhsSym(4))
+                );
+                break;
+            } 
+            //
+            // Rule 61:  GTRuleDefAST ::= OptAnnotationsAST gtrule TypeNameAST DirectedFormalParameterDefAST EQUAL GTRuleBodyAST
+            //
+            case 61: {
+                setResult(
+                    new GTRuleDefAST(getLeftIToken(), getRightIToken(),
+                                     (IOptAnnotationsAST)getRhsSym(1),
+                                     (ITypeNameAST)getRhsSym(3),
+                                     (IDirectedFormalParameterDefAST)getRhsSym(4),
+                                     (IGTRuleBodyAST)getRhsSym(6))
+                );
+                break;
+            } 
+            //
+            // Rule 62:  GTRuleBodyAST ::= LBRACE PreconditionDefAST PostconditionOptAST ActionOptAST RBRACE
+            //
+            case 62: {
+                setResult(
+                    new GTRuleBodyAST0(getLeftIToken(), getRightIToken(),
+                                       (IPreconditionDefAST)getRhsSym(2),
+                                       (IPostconditionOptAST)getRhsSym(3),
+                                       (ActionOptAST)getRhsSym(4))
+                );
+                break;
+            } 
+            //
+            // Rule 63:  GTRuleBodyAST ::= ERROR_TOKEN
+            //
+            case 63: {
+                setResult(
+                    new GTRuleBodyAST1(VTCLParser.this, getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 64:  PreconditionDefAST ::= precondition GraphPatternDefAST
+            //
+            case 64: {
+                setResult(
+                    new PreconditionDefAST0(getLeftIToken(), getRightIToken(),
+                                            (GraphPatternDefAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 65:  PreconditionDefAST ::= precondition PatternCompositionAST
+            //
+            case 65: {
+                setResult(
+                    new PreconditionDefAST1(getLeftIToken(), getRightIToken(),
+                                            (PatternCompositionAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 66:  PostconditionOptAST ::= $Empty
+            //
+            case 66: {
+                setResult(null);
+                break;
+            } 
+            //
+            // Rule 67:  PostconditionOptAST ::= postcondition GraphPatternDefAST
+            //
+            case 67: {
+                setResult(
+                    new PostconditionOptAST0(getLeftIToken(), getRightIToken(),
+                                             (GraphPatternDefAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 68:  PostconditionOptAST ::= postcondition PatternCompositionAST
+            //
+            case 68: {
+                setResult(
+                    new PostconditionOptAST1(getLeftIToken(), getRightIToken(),
+                                             (PatternCompositionAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 69:  ActionOptAST ::= $Empty
+            //
+            case 69: {
+                setResult(null);
+                break;
+            } 
+            //
+            // Rule 70:  ActionOptAST ::= action LBRACE AsmRulesAST RBRACE
+            //
+            case 70: {
+                setResult(
+                    new ActionOptAST(getLeftIToken(), getRightIToken(),
+                                     (AsmRulesAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 71:  GTRuleCallAST ::= apply QualifiedTypeNameAST ActualParameterDefAST
+            //
+            case 71: {
+                setResult(
+                    new GTRuleCallAST(getLeftIToken(), getRightIToken(),
+                                      (IQualifiedTypeNameAST)getRhsSym(2),
+                                      (IActualParameterDefAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 72:  LogicalTermAST ::= LogicalAndTermAST
+            //
+            case 72:
+                break; 
+            //
+            // Rule 73:  LogicalTermAST ::= LogicalTermAST OR_OR LogicalAndTermAST
+            //
+            case 73: {
+                setResult(
+                    new LogicalTermAST0(getLeftIToken(), getRightIToken(),
+                                        (ILogicalTermAST)getRhsSym(1),
+                                        (ILogicalAndTermAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 74:  LogicalTermAST ::= LogicalTermAST xor LogicalAndTermAST
+            //
+            case 74: {
+                setResult(
+                    new LogicalTermAST1(getLeftIToken(), getRightIToken(),
+                                        (ILogicalTermAST)getRhsSym(1),
+                                        (ILogicalAndTermAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 75:  LogicalAndTermAST ::= EqualityTermAST
+            //
+            case 75:
+                break; 
+            //
+            // Rule 76:  LogicalAndTermAST ::= LogicalAndTermAST AND_AND EqualityTermAST
+            //
+            case 76: {
+                setResult(
+                    new LogicalAndTermAST(getLeftIToken(), getRightIToken(),
+                                          (ILogicalAndTermAST)getRhsSym(1),
+                                          (IEqualityTermAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 77:  EqualityTermAST ::= RelationalTermAST
+            //
+            case 77:
+                break; 
+            //
+            // Rule 78:  EqualityTermAST ::= EqualityTermAST EQUAL_EQUAL RelationalTermAST
+            //
+            case 78: {
+                setResult(
+                    new EqualityTermAST0(getLeftIToken(), getRightIToken(),
+                                         (IEqualityTermAST)getRhsSym(1),
+                                         (IRelationalTermAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 79:  EqualityTermAST ::= EqualityTermAST NOT_EQUAL RelationalTermAST
+            //
+            case 79: {
+                setResult(
+                    new EqualityTermAST1(getLeftIToken(), getRightIToken(),
+                                         (IEqualityTermAST)getRhsSym(1),
+                                         (IRelationalTermAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 80:  RelationalTermAST ::= ArithmeticTermAST
+            //
+            case 80:
+                break; 
+            //
+            // Rule 81:  RelationalTermAST ::= RelationalTermAST RelationalOpAST ArithmeticTermAST
+            //
+            case 81: {
+                setResult(
+                    new RelationalTermAST(getLeftIToken(), getRightIToken(),
+                                          (IRelationalTermAST)getRhsSym(1),
+                                          (RelationalOpAST)getRhsSym(2),
+                                          (IArithmeticTermAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 82:  RelationalOpAST ::= LESS
+            //
+            case 82: {
+                setResult(
+                    new RelationalOpAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 83:  RelationalOpAST ::= GREATER
+            //
+            case 83: {
+                setResult(
+                    new RelationalOpAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 84:  RelationalOpAST ::= LESS_EQUAL
+            //
+            case 84: {
+                setResult(
+                    new RelationalOpAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 85:  RelationalOpAST ::= GREATER_EQUAL
+            //
+            case 85: {
+                setResult(
+                    new RelationalOpAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 86:  ArithmeticTermAST ::= MultArithmeticTermAST
+            //
+            case 86:
+                break; 
+            //
+            // Rule 87:  ArithmeticTermAST ::= ArithmeticTermAST PLUS MultArithmeticTermAST
+            //
+            case 87: {
+                setResult(
+                    new ArithmeticTermAST0(getLeftIToken(), getRightIToken(),
+                                           (IArithmeticTermAST)getRhsSym(1),
+                                           (IMultArithmeticTermAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 88:  ArithmeticTermAST ::= ArithmeticTermAST MINUS MultArithmeticTermAST
+            //
+            case 88: {
+                setResult(
+                    new ArithmeticTermAST1(getLeftIToken(), getRightIToken(),
+                                           (IArithmeticTermAST)getRhsSym(1),
+                                           (IMultArithmeticTermAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 89:  MultArithmeticTermAST ::= UnaryArithmeticTermAST
+            //
+            case 89:
+                break; 
+            //
+            // Rule 90:  MultArithmeticTermAST ::= MultArithmeticTermAST MULTIPLY UnaryArithmeticTermAST
+            //
+            case 90: {
+                setResult(
+                    new MultArithmeticTermAST0(getLeftIToken(), getRightIToken(),
+                                               (IMultArithmeticTermAST)getRhsSym(1),
+                                               (IUnaryArithmeticTermAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 91:  MultArithmeticTermAST ::= MultArithmeticTermAST DIVIDE UnaryArithmeticTermAST
+            //
+            case 91: {
+                setResult(
+                    new MultArithmeticTermAST1(getLeftIToken(), getRightIToken(),
+                                               (IMultArithmeticTermAST)getRhsSym(1),
+                                               (IUnaryArithmeticTermAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 92:  MultArithmeticTermAST ::= MultArithmeticTermAST REMAINDER UnaryArithmeticTermAST
+            //
+            case 92: {
+                setResult(
+                    new MultArithmeticTermAST2(getLeftIToken(), getRightIToken(),
+                                               (IMultArithmeticTermAST)getRhsSym(1),
+                                               (IUnaryArithmeticTermAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 93:  UnaryArithmeticTermAST ::= BaseArithmeticTermAST
+            //
+            case 93:
+                break; 
+            //
+            // Rule 94:  UnaryArithmeticTermAST ::= MINUS BaseArithmeticTermAST
+            //
+            case 94: {
+                setResult(
+                    new UnaryArithmeticTermAST0(getLeftIToken(), getRightIToken(),
+                                                (IBaseArithmeticTermAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 95:  UnaryArithmeticTermAST ::= NOT BaseArithmeticTermAST
+            //
+            case 95: {
+                setResult(
+                    new UnaryArithmeticTermAST1(getLeftIToken(), getRightIToken(),
+                                                (IBaseArithmeticTermAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 96:  BaseArithmeticTermAST ::= VariableRefAST
+            //
+            case 96:
+                break; 
+            //
+            // Rule 97:  BaseArithmeticTermAST ::= ValueAST
+            //
+            case 97:
+                break; 
+            //
+            // Rule 98:  BaseArithmeticTermAST ::= LPAREN LogicalTermAST RPAREN
+            //
+            case 98: {
+                setResult(
+                    new BaseArithmeticTermAST(getLeftIToken(), getRightIToken(),
+                                              (ILogicalTermAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 99:  BaseArithmeticTermAST ::= AsmFunctionLocationAST
+            //
+            case 99:
+                break; 
+            //
+            // Rule 100:  BaseArithmeticTermAST ::= GraphPatternCallAST
+            //
+            case 100:
+                break; 
+            //
+            // Rule 101:  BaseArithmeticTermAST ::= PredefinedFunctionCallAST
+            //
+            case 101:
+                break; 
+            //
+            // Rule 102:  AsmFunctionDefAST ::= OptAnnotationsAST asmfunction TypeNameAST ArityOrTypeDeclAST ReturnTypeOptAST InitialValuesOptAST
+            //
+            case 102: {
+                setResult(
+                    new AsmFunctionDefAST(getLeftIToken(), getRightIToken(),
+                                          (IOptAnnotationsAST)getRhsSym(1),
+                                          (ITypeNameAST)getRhsSym(3),
+                                          (IArityOrTypeDeclAST)getRhsSym(4),
+                                          (ReturnTypeOptAST)getRhsSym(5),
+                                          (IInitialValuesOptAST)getRhsSym(6))
+                );
+                break;
+            } 
+            //
+            // Rule 103:  ArityOrTypeDeclAST ::= DIVIDE ArityAST
+            //
+            case 103: {
+                setResult(
+                    new ArityOrTypeDeclAST0(getLeftIToken(), getRightIToken(),
+                                            (ArityAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 104:  ArityOrTypeDeclAST ::= LPAREN TypeConstantsAST
+            //
+            case 104: {
+                setResult(
+                    new ArityOrTypeDeclAST1(getLeftIToken(), getRightIToken(),
+                                            (ITypeConstantsAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 105:  ArityAST ::= DecimalIntegerLiteral
+            //
+            case 105: {
+                setResult(
+                    new ArityAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 106:  InitialValuesOptAST ::= SEMICOLON
+            //
+            case 106: {
+                setResult(
+                    new InitialValuesOptAST0(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 107:  InitialValuesOptAST ::= LBRACE InitialValuesAST RBRACE
+            //
+            case 107: {
+                setResult(
+                    new InitialValuesOptAST1(getLeftIToken(), getRightIToken(),
+                                             (IInitialValuesAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 108:  InitialValuesAST ::= InitialValueAST
+            //
+            case 108:
+                break; 
+            //
+            // Rule 109:  InitialValuesAST ::= InitialValuesAST InitialValueAST
+            //
+            case 109: {
+                setResult(
+                    new InitialValuesAST(getLeftIToken(), getRightIToken(),
+                                         (IInitialValuesAST)getRhsSym(1),
+                                         (InitialValueAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 110:  InitialValueAST ::= ActualParameterDefAST EQUAL ArithmeticTermAST SEMICOLON
+            //
+            case 110: {
+                setResult(
+                    new InitialValueAST(getLeftIToken(), getRightIToken(),
+                                        (IActualParameterDefAST)getRhsSym(1),
+                                        (IArithmeticTermAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 111:  TypeConstantsAST ::= QualifiedTypeNameAST RPAREN
+            //
+            case 111: {
+                setResult(
+                    new TypeConstantsAST0(getLeftIToken(), getRightIToken(),
+                                          (IQualifiedTypeNameAST)getRhsSym(1))
+                );
+                break;
+            } 
+            //
+            // Rule 112:  TypeConstantsAST ::= QualifiedTypeNameAST COMMA TypeConstantsAST
+            //
+            case 112: {
+                setResult(
+                    new TypeConstantsAST1(getLeftIToken(), getRightIToken(),
+                                          (IQualifiedTypeNameAST)getRhsSym(1),
+                                          (ITypeConstantsAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 113:  AsmFunctionLocationAST ::= ASMFunctionNameAST ActualParameterDefAST
+            //
+            case 113: {
+                setResult(
+                    new AsmFunctionLocationAST(getLeftIToken(), getRightIToken(),
+                                               (IASMFunctionNameAST)getRhsSym(1),
+                                               (IActualParameterDefAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 114:  PredefinedFunctionCallAST ::= BuiltInFunctionNameAST LPAREN ArithmeticTermAST RPAREN
+            //
+            case 114: {
+                setResult(
+                    new PredefinedFunctionCallAST0(getLeftIToken(), getRightIToken(),
+                                                   (BuiltInFunctionNameAST)getRhsSym(1),
+                                                   (IArithmeticTermAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 115:  PredefinedFunctionCallAST ::= ConversionFunctionNameAST LPAREN ArithmeticTermAST RPAREN
+            //
+            case 115: {
+                setResult(
+                    new PredefinedFunctionCallAST1(getLeftIToken(), getRightIToken(),
+                                                   (ConversionFunctionNameAST)getRhsSym(1),
+                                                   (IArithmeticTermAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 116:  BuiltInFunctionNameAST ::= ref
+            //
+            case 116: {
+                setResult(
+                    new BuiltInFunctionNameAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 117:  BuiltInFunctionNameAST ::= fqn
+            //
+            case 117: {
+                setResult(
+                    new BuiltInFunctionNameAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 118:  BuiltInFunctionNameAST ::= name
+            //
+            case 118: {
+                setResult(
+                    new BuiltInFunctionNameAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 119:  BuiltInFunctionNameAST ::= value
+            //
+            case 119: {
+                setResult(
+                    new BuiltInFunctionNameAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 120:  BuiltInFunctionNameAST ::= source
+            //
+            case 120: {
+                setResult(
+                    new BuiltInFunctionNameAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 121:  BuiltInFunctionNameAST ::= target
+            //
+            case 121: {
+                setResult(
+                    new BuiltInFunctionNameAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 122:  BuiltInFunctionNameAST ::= multiplicity
+            //
+            case 122: {
+                setResult(
+                    new BuiltInFunctionNameAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 123:  BuiltInFunctionNameAST ::= aggregation
+            //
+            case 123: {
+                setResult(
+                    new BuiltInFunctionNameAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 124:  BuiltInFunctionNameAST ::= inverse
+            //
+            case 124: {
+                setResult(
+                    new BuiltInFunctionNameAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 125:  ConversionFunctionNameAST ::= toBoolean
+            //
+            case 125: {
+                setResult(
+                    new ConversionFunctionNameAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 126:  ConversionFunctionNameAST ::= toString
+            //
+            case 126: {
+                setResult(
+                    new ConversionFunctionNameAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 127:  ConversionFunctionNameAST ::= toInteger
+            //
+            case 127: {
+                setResult(
+                    new ConversionFunctionNameAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 128:  ConversionFunctionNameAST ::= toDouble
+            //
+            case 128: {
+                setResult(
+                    new ConversionFunctionNameAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 129:  ConversionFunctionNameAST ::= toMultiplicity
+            //
+            case 129: {
+                setResult(
+                    new ConversionFunctionNameAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 130:  AsmRuleDefAST ::= OptAnnotationsAST rule TypeNameAST DirectedFormalParameterDefAST EQUAL AsmRuleAST
+            //
+            case 130: {
+                setResult(
+                    new AsmRuleDefAST(getLeftIToken(), getRightIToken(),
+                                      (IOptAnnotationsAST)getRhsSym(1),
+                                      (ITypeNameAST)getRhsSym(3),
+                                      (IDirectedFormalParameterDefAST)getRhsSym(4),
+                                      (IAsmRuleAST)getRhsSym(6))
+                );
+                break;
+            } 
+            //
+            // Rule 131:  AsmRulesAST ::= AsmRulesOptAST AsmRuleAST
+            //
+            case 131: {
+                setResult(
+                    new AsmRulesAST(getLeftIToken(), getRightIToken(),
+                                    (AsmRulesOptAST)getRhsSym(1),
+                                    (IAsmRuleAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 132:  AsmRulesOptAST ::= $Empty
+            //
+            case 132: {
+                setResult(null);
+                break;
+            } 
+            //
+            // Rule 133:  AsmRulesOptAST ::= AsmRulesOptAST AsmRuleAST
+            //
+            case 133: {
+                setResult(
+                    new AsmRulesOptAST(getLeftIToken(), getRightIToken(),
+                                       (AsmRulesOptAST)getRhsSym(1),
+                                       (IAsmRuleAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 134:  AsmRuleAST ::= RegularAsmRuleAST
+            //
+            case 134:
+                break; 
+            //
+            // Rule 135:  AsmRuleAST ::= IfRuleAST
+            //
+            case 135:
+                break; 
+            //
+            // Rule 136:  AsmRuleAST ::= TryRuleAST
+            //
+            case 136:
+                break; 
+            //
+            // Rule 137:  AsmRuleAST ::= ERROR_TOKEN
+            //
+            case 137: {
+                setResult(
+                    new AsmRuleAST(VTCLParser.this, getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 138:  RegularAsmRuleAST ::= SimpleRuleAST
+            //
+            case 138:
+                break; 
+            //
+            // Rule 139:  RegularAsmRuleAST ::= CompoundRuleAST
+            //
+            case 139:
+                break; 
+            //
+            // Rule 140:  RegularAsmRuleAST ::= ModelManipulationRuleAST
+            //
+            case 140:
+                break; 
+            //
+            // Rule 141:  SimpleRuleAST ::= SkipRuleAST
+            //
+            case 141:
+                break; 
+            //
+            // Rule 142:  SimpleRuleAST ::= FailRuleAST
+            //
+            case 142:
+                break; 
+            //
+            // Rule 143:  SimpleRuleAST ::= CallRuleAST
+            //
+            case 143:
+                break; 
+            //
+            // Rule 144:  SimpleRuleAST ::= UpdateRuleAST
+            //
+            case 144:
+                break; 
+            //
+            // Rule 145:  SimpleRuleAST ::= PrintRuleAST
+            //
+            case 145:
+                break; 
+            //
+            // Rule 146:  SimpleRuleAST ::= LogRuleAST
+            //
+            case 146:
+                break; 
+            //
+            // Rule 147:  SkipRuleAST ::= skip SEMICOLON
+            //
+            case 147: {
+                setResult(
+                    new SkipRuleAST(getLeftIToken(), getRightIToken())
+                );
+                break;
+            } 
+            //
+            // Rule 148:  FailRuleAST ::= fail SEMICOLON
+            //
+            case 148: {
+                setResult(
+                    new FailRuleAST(getLeftIToken(), getRightIToken())
+                );
+                break;
+            } 
+            //
+            // Rule 149:  CallRuleAST ::= call QualifiedTypeNameAST ActualParameterDefAST SEMICOLON
+            //
+            case 149: {
+                setResult(
+                    new CallRuleAST(getLeftIToken(), getRightIToken(),
+                                    (IQualifiedTypeNameAST)getRhsSym(2),
+                                    (IActualParameterDefAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 150:  UpdateRuleAST ::= update VariableRefAST EQUAL ArithmeticTermAST SEMICOLON
+            //
+            case 150: {
+                setResult(
+                    new UpdateRuleAST0(getLeftIToken(), getRightIToken(),
+                                       (VariableRefAST)getRhsSym(2),
+                                       (IArithmeticTermAST)getRhsSym(4))
+                );
+                break;
+            } 
+            //
+            // Rule 151:  UpdateRuleAST ::= update AsmFunctionUpdateLocationAST EQUAL ArithmeticTermAST SEMICOLON
+            //
+            case 151: {
+                setResult(
+                    new UpdateRuleAST1(getLeftIToken(), getRightIToken(),
+                                       (AsmFunctionUpdateLocationAST)getRhsSym(2),
+                                       (IArithmeticTermAST)getRhsSym(4))
+                );
+                break;
+            } 
+            //
+            // Rule 152:  AsmFunctionUpdateLocationAST ::= ASMFunctionNameAST ActualParameterDefAST
+            //
+            case 152: {
+                setResult(
+                    new AsmFunctionUpdateLocationAST(getLeftIToken(), getRightIToken(),
+                                                     (IASMFunctionNameAST)getRhsSym(1),
+                                                     (IActualParameterDefAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 153:  PrintRuleAST ::= print LPAREN LogicalTermAST RPAREN SEMICOLON
+            //
+            case 153: {
+                setResult(
+                    new PrintRuleAST0(getLeftIToken(), getRightIToken(),
+                                      (ILogicalTermAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 154:  PrintRuleAST ::= print LPAREN ArithmeticTermAST COMMA LogicalTermAST RPAREN SEMICOLON
+            //
+            case 154: {
+                setResult(
+                    new PrintRuleAST1(getLeftIToken(), getRightIToken(),
+                                      (IArithmeticTermAST)getRhsSym(3),
+                                      (ILogicalTermAST)getRhsSym(5))
+                );
+                break;
+            } 
+            //
+            // Rule 155:  PrintRuleAST ::= println LPAREN LogicalTermAST RPAREN SEMICOLON
+            //
+            case 155: {
+                setResult(
+                    new PrintRuleAST2(getLeftIToken(), getRightIToken(),
+                                      (ILogicalTermAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 156:  PrintRuleAST ::= println LPAREN ArithmeticTermAST COMMA LogicalTermAST RPAREN SEMICOLON
+            //
+            case 156: {
+                setResult(
+                    new PrintRuleAST3(getLeftIToken(), getRightIToken(),
+                                      (IArithmeticTermAST)getRhsSym(3),
+                                      (ILogicalTermAST)getRhsSym(5))
+                );
+                break;
+            } 
+            //
+            // Rule 157:  LogRuleAST ::= log LPAREN LogLevelAST COMMA ArithmeticTermAST RPAREN SEMICOLON
+            //
+            case 157: {
+                setResult(
+                    new LogRuleAST(getLeftIToken(), getRightIToken(),
+                                   (LogLevelAST)getRhsSym(3),
+                                   (IArithmeticTermAST)getRhsSym(5))
+                );
+                break;
+            } 
+            //
+            // Rule 158:  LogLevelAST ::= debug
+            //
+            case 158: {
+                setResult(
+                    new LogLevelAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 159:  LogLevelAST ::= info
+            //
+            case 159: {
+                setResult(
+                    new LogLevelAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 160:  LogLevelAST ::= warning
+            //
+            case 160: {
+                setResult(
+                    new LogLevelAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 161:  LogLevelAST ::= error
+            //
+            case 161: {
+                setResult(
+                    new LogLevelAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 162:  LogLevelAST ::= fatal
+            //
+            case 162: {
+                setResult(
+                    new LogLevelAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 163:  CompoundRuleAST ::= SequentialRuleAST
+            //
+            case 163:
+                break; 
+            //
+            // Rule 164:  CompoundRuleAST ::= RandomRuleAST
+            //
+            case 164:
+                break; 
+            //
+            // Rule 165:  CompoundRuleAST ::= LetRuleAST
+            //
+            case 165:
+                break; 
+            //
+            // Rule 166:  CompoundRuleAST ::= IterateRuleAST
+            //
+            case 166:
+                break; 
+            //
+            // Rule 167:  CompoundRuleAST ::= ChooseRuleAST
+            //
+            case 167:
+                break; 
+            //
+            // Rule 168:  CompoundRuleAST ::= ForallRuleAST
+            //
+            case 168:
+                break; 
+            //
+            // Rule 169:  CompoundRuleAST ::= ParallelRuleAST
+            //
+            case 169:
+                break; 
+            //
+            // Rule 170:  CompoundRuleAST ::= WhenRuleAST
+            //
+            case 170:
+                break; 
+            //
+            // Rule 171:  SequentialRuleAST ::= seq LBRACE AsmRulesAST RBRACE OptSemicolonAST
+            //
+            case 171: {
+                setResult(
+                    new SequentialRuleAST(getLeftIToken(), getRightIToken(),
+                                          (AsmRulesAST)getRhsSym(3),
+                                          (OptSemicolonAST)getRhsSym(5))
+                );
+                break;
+            } 
+            //
+            // Rule 172:  ParallelRuleAST ::= parallel LBRACE AsmRulesAST RBRACE OptSemicolonAST
+            //
+            case 172: {
+                setResult(
+                    new ParallelRuleAST(getLeftIToken(), getRightIToken(),
+                                        (AsmRulesAST)getRhsSym(3),
+                                        (OptSemicolonAST)getRhsSym(5))
+                );
+                break;
+            } 
+            //
+            // Rule 173:  RandomRuleAST ::= random LBRACE AsmRulesAST RBRACE OptSemicolonAST
+            //
+            case 173: {
+                setResult(
+                    new RandomRuleAST(getLeftIToken(), getRightIToken(),
+                                      (AsmRulesAST)getRhsSym(3),
+                                      (OptSemicolonAST)getRhsSym(5))
+                );
+                break;
+            } 
+            //
+            // Rule 174:  OptSemicolonAST ::= $Empty
+            //
+            case 174: {
+                setResult(null);
+                break;
+            } 
+            //
+            // Rule 175:  OptSemicolonAST ::= SEMICOLON
+            //
+            case 175: {
+                setResult(
+                    new OptSemicolonAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 176:  LetRuleAST ::= let VariableDefinitionsAST in AsmRuleAST
+            //
+            case 176: {
+                setResult(
+                    new LetRuleAST(getLeftIToken(), getRightIToken(),
+                                   (IVariableDefinitionsAST)getRhsSym(2),
+                                   (IAsmRuleAST)getRhsSym(4))
+                );
+                break;
+            } 
+            //
+            // Rule 177:  VariableDefinitionsAST ::= VariableDefinitionAST
+            //
+            case 177:
+                break; 
+            //
+            // Rule 178:  VariableDefinitionsAST ::= VariableDefinitionsAST COMMA VariableDefinitionAST
+            //
+            case 178: {
+                setResult(
+                    new VariableDefinitionsAST(getLeftIToken(), getRightIToken(),
+                                               (IVariableDefinitionsAST)getRhsSym(1),
+                                               (VariableDefinitionAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 179:  VariableDefinitionAST ::= VariableDefAST TypeOptAST EQUAL ArithmeticTermAST
+            //
+            case 179: {
+                setResult(
+                    new VariableDefinitionAST(getLeftIToken(), getRightIToken(),
+                                              (VariableDefAST)getRhsSym(1),
+                                              (TypeOptAST)getRhsSym(2),
+                                              (IArithmeticTermAST)getRhsSym(4))
+                );
+                break;
+            } 
+            //
+            // Rule 180:  IterateRuleAST ::= iterate AsmRuleAST
+            //
+            case 180: {
+                setResult(
+                    new IterateRuleAST(getLeftIToken(), getRightIToken(),
+                                       (IAsmRuleAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 181:  ChooseRuleAST ::= choose ConstrainedVariablesOptAST with ConditionAST DoActionOptAST
+            //
+            case 181: {
+                setResult(
+                    new ChooseRuleAST(getLeftIToken(), getRightIToken(),
+                                      (IConstrainedVariablesOptAST)getRhsSym(2),
+                                      (IConditionAST)getRhsSym(4),
+                                      (IDoActionOptAST)getRhsSym(5))
+                );
+                break;
+            } 
+            //
+            // Rule 182:  ForallRuleAST ::= forall ConstrainedVariablesOptAST with ConditionAST DoActionOptAST
+            //
+            case 182: {
+                setResult(
+                    new ForallRuleAST(getLeftIToken(), getRightIToken(),
+                                      (IConstrainedVariablesOptAST)getRhsSym(2),
+                                      (IConditionAST)getRhsSym(4),
+                                      (IDoActionOptAST)getRhsSym(5))
+                );
+                break;
+            } 
+            //
+            // Rule 183:  ConditionAST ::= LogicalTermAST
+            //
+            case 183:
+                break; 
+            //
+            // Rule 184:  ConditionAST ::= GTRuleCallAST
+            //
+            case 184:
+                break; 
+            //
+            // Rule 185:  DoActionOptAST ::= SEMICOLON
+            //
+            case 185: {
+                setResult(
+                    new DoActionOptAST0(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 186:  DoActionOptAST ::= do AsmRuleAST
+            //
+            case 186: {
+                setResult(
+                    new DoActionOptAST1(getLeftIToken(), getRightIToken(),
+                                        (IAsmRuleAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 187:  IfRuleAST ::= if LPAREN LogicalTermAST RPAREN AsmRuleAST
+            //
+            case 187: {
+                setResult(
+                    new IfRuleAST0(getLeftIToken(), getRightIToken(),
+                                   (ILogicalTermAST)getRhsSym(3),
+                                   (IAsmRuleAST)getRhsSym(5))
+                );
+                break;
+            } 
+            //
+            // Rule 188:  IfRuleAST ::= if LPAREN LogicalTermAST RPAREN AsmRuleAST else AsmRuleAST
+            //
+            case 188: {
+                setResult(
+                    new IfRuleAST1(getLeftIToken(), getRightIToken(),
+                                   (ILogicalTermAST)getRhsSym(3),
+                                   (IAsmRuleAST)getRhsSym(5),
+                                   (IAsmRuleAST)getRhsSym(7))
+                );
+                break;
+            } 
+            //
+            // Rule 189:  TryRuleAST ::= try AsmRuleAST
+            //
+            case 189: {
+                setResult(
+                    new TryRuleAST0(getLeftIToken(), getRightIToken(),
+                                    (IAsmRuleAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 190:  TryRuleAST ::= try AsmRuleAST else AsmRuleAST
+            //
+            case 190: {
+                setResult(
+                    new TryRuleAST1(getLeftIToken(), getRightIToken(),
+                                    (IAsmRuleAST)getRhsSym(2),
+                                    (IAsmRuleAST)getRhsSym(4))
+                );
+                break;
+            } 
+            //
+            // Rule 191:  WhenRuleAST ::= when LPAREN WhenConditionAST RPAREN do AsmRuleAST
+            //
+            case 191: {
+                setResult(
+                    new WhenRuleAST(getLeftIToken(), getRightIToken(),
+                                    (IWhenConditionAST)getRhsSym(3),
+                                    (IAsmRuleAST)getRhsSym(6))
+                );
+                break;
+            } 
+            //
+            // Rule 192:  WhenConditionAST ::= WhenChangeAST
+            //
+            case 192:
+                break; 
+            //
+            // Rule 193:  WhenConditionAST ::= WhenConditionAST COMMA WhenChangeAST
+            //
+            case 193: {
+                setResult(
+                    new WhenConditionAST(getLeftIToken(), getRightIToken(),
+                                         (IWhenConditionAST)getRhsSym(1),
+                                         (IWhenChangeAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 194:  WhenChangeAST ::= new LPAREN VariableRefAST RPAREN
+            //
+            case 194: {
+                setResult(
+                    new WhenChangeAST0(getLeftIToken(), getRightIToken(),
+                                       (VariableRefAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 195:  WhenChangeAST ::= delete LPAREN VariableRefAST RPAREN
+            //
+            case 195: {
+                setResult(
+                    new WhenChangeAST1(getLeftIToken(), getRightIToken(),
+                                       (VariableRefAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 196:  WhenChangeAST ::= changed LPAREN VariableRefAST RPAREN
+            //
+            case 196: {
+                setResult(
+                    new WhenChangeAST2(getLeftIToken(), getRightIToken(),
+                                       (VariableRefAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 197:  ModelManipulationRuleAST ::= CreateRuleAST
+            //
+            case 197:
+                break; 
+            //
+            // Rule 198:  ModelManipulationRuleAST ::= DeleteRuleAST
+            //
+            case 198:
+                break; 
+            //
+            // Rule 199:  ModelManipulationRuleAST ::= CopyRuleAST
+            //
+            case 199:
+                break; 
+            //
+            // Rule 200:  ModelManipulationRuleAST ::= MoveRuleAST
+            //
+            case 200:
+                break; 
+            //
+            // Rule 201:  ModelManipulationRuleAST ::= ElementUpdateRuleAST
+            //
+            case 201:
+                break; 
+            //
+            // Rule 202:  CreateRuleAST ::= new LPAREN CreateModelElementAST RPAREN SEMICOLON
+            //
+            case 202: {
+                setResult(
+                    new CreateRuleAST0(getLeftIToken(), getRightIToken(),
+                                       (ICreateModelElementAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 203:  CreateRuleAST ::= new LPAREN CreateRelationshipAST RPAREN SEMICOLON
+            //
+            case 203: {
+                setResult(
+                    new CreateRuleAST1(getLeftIToken(), getRightIToken(),
+                                       (ICreateRelationshipAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 204:  CreateModelElementAST ::= QualifiedTypeNameAST CreateEntityBodyAST InConstraintOptAST
+            //
+            case 204: {
+                setResult(
+                    new CreateModelElementAST0(getLeftIToken(), getRightIToken(),
+                                               (IQualifiedTypeNameAST)getRhsSym(1),
+                                               (CreateEntityBodyAST)getRhsSym(2),
+                                               (InConstraintOptAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 205:  CreateModelElementAST ::= QualifiedTypeNameAST CreateRelationBodyAST
+            //
+            case 205: {
+                setResult(
+                    new CreateModelElementAST1(getLeftIToken(), getRightIToken(),
+                                               (IQualifiedTypeNameAST)getRhsSym(1),
+                                               (CreateRelationBodyAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 206:  CreateEntityBodyAST ::= LPAREN VariableRefAST RPAREN
+            //
+            case 206: {
+                setResult(
+                    new CreateEntityBodyAST(getLeftIToken(), getRightIToken(),
+                                            (VariableRefAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 207:  CreateRelationBodyAST ::= LPAREN VariableDefRefAST COMMA ArithmeticTermAST COMMA ArithmeticTermAST RPAREN
+            //
+            case 207: {
+                setResult(
+                    new CreateRelationBodyAST(getLeftIToken(), getRightIToken(),
+                                              (VariableDefRefAST)getRhsSym(2),
+                                              (IArithmeticTermAST)getRhsSym(4),
+                                              (IArithmeticTermAST)getRhsSym(6))
+                );
+                break;
+            } 
+            //
+            // Rule 208:  InConstraintOptAST ::= $Empty
+            //
+            case 208: {
+                setResult(null);
+                break;
+            } 
+            //
+            // Rule 209:  InConstraintOptAST ::= in ArithmeticTermAST
+            //
+            case 209: {
+                setResult(
+                    new InConstraintOptAST(getLeftIToken(), getRightIToken(),
+                                           (IArithmeticTermAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 210:  CreateRelationshipAST ::= supertypeOf TwoParametersAST
+            //
+            case 210: {
+                setResult(
+                    new CreateRelationshipAST0(getLeftIToken(), getRightIToken(),
+                                               (TwoParametersAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 211:  CreateRelationshipAST ::= subtypeOf TwoParametersAST
+            //
+            case 211: {
+                setResult(
+                    new CreateRelationshipAST1(getLeftIToken(), getRightIToken(),
+                                               (TwoParametersAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 212:  CreateRelationshipAST ::= typeOf TwoParametersAST
+            //
+            case 212: {
+                setResult(
+                    new CreateRelationshipAST2(getLeftIToken(), getRightIToken(),
+                                               (TwoParametersAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 213:  CreateRelationshipAST ::= instanceOf TwoParametersAST
+            //
+            case 213: {
+                setResult(
+                    new CreateRelationshipAST3(getLeftIToken(), getRightIToken(),
+                                               (TwoParametersAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 214:  DeleteRuleAST ::= delete LPAREN DeleteContentsAST RPAREN SEMICOLON
+            //
+            case 214: {
+                setResult(
+                    new DeleteRuleAST0(getLeftIToken(), getRightIToken(),
+                                       (DeleteContentsAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 215:  DeleteRuleAST ::= delete LPAREN DeleteRelationshipAST RPAREN SEMICOLON
+            //
+            case 215: {
+                setResult(
+                    new DeleteRuleAST1(getLeftIToken(), getRightIToken(),
+                                       (IDeleteRelationshipAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 216:  DeleteContentsAST ::= ArithmeticTermAST DeleteSemanticsOptAST
+            //
+            case 216: {
+                setResult(
+                    new DeleteContentsAST(getLeftIToken(), getRightIToken(),
+                                          (IArithmeticTermAST)getRhsSym(1),
+                                          (DeleteSemanticsOptAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 217:  DeleteSemanticsOptAST ::= $Empty
+            //
+            case 217: {
+                setResult(null);
+                break;
+            } 
+            //
+            // Rule 218:  DeleteSemanticsOptAST ::= COMMA DeleteSemanticsAST
+            //
+            case 218: {
+                setResult(
+                    new DeleteSemanticsOptAST(getLeftIToken(), getRightIToken(),
+                                              (IDeleteSemanticsAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 219:  DeleteSemanticsAST ::= delete_content
+            //
+            case 219: {
+                setResult(
+                    new DeleteSemanticsAST0(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 220:  DeleteSemanticsAST ::= move_content
+            //
+            case 220: {
+                setResult(
+                    new DeleteSemanticsAST1(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 221:  DeleteRelationshipAST ::= supertypeOf TwoParametersAST
+            //
+            case 221: {
+                setResult(
+                    new DeleteRelationshipAST0(getLeftIToken(), getRightIToken(),
+                                               (TwoParametersAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 222:  DeleteRelationshipAST ::= subtypeOf TwoParametersAST
+            //
+            case 222: {
+                setResult(
+                    new DeleteRelationshipAST1(getLeftIToken(), getRightIToken(),
+                                               (TwoParametersAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 223:  DeleteRelationshipAST ::= typeOf TwoParametersAST
+            //
+            case 223: {
+                setResult(
+                    new DeleteRelationshipAST2(getLeftIToken(), getRightIToken(),
+                                               (TwoParametersAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 224:  DeleteRelationshipAST ::= instanceOf TwoParametersAST
+            //
+            case 224: {
+                setResult(
+                    new DeleteRelationshipAST3(getLeftIToken(), getRightIToken(),
+                                               (TwoParametersAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 225:  CopyRuleAST ::= copy LPAREN CopyContentsAST RPAREN SEMICOLON
+            //
+            case 225: {
+                setResult(
+                    new CopyRuleAST(getLeftIToken(), getRightIToken(),
+                                    (CopyContentsAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 226:  CopyContentsAST ::= ArithmeticTermAST COMMA ArithmeticTermAST COMMA VariableRefAST COMMA CopySemanticsAST
+            //
+            case 226: {
+                setResult(
+                    new CopyContentsAST(getLeftIToken(), getRightIToken(),
+                                        (IArithmeticTermAST)getRhsSym(1),
+                                        (IArithmeticTermAST)getRhsSym(3),
+                                        (VariableRefAST)getRhsSym(5),
+                                        (ICopySemanticsAST)getRhsSym(7))
+                );
+                break;
+            } 
+            //
+            // Rule 227:  CopySemanticsAST ::= copy_boundary_edges
+            //
+            case 227: {
+                setResult(
+                    new CopySemanticsAST0(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 228:  CopySemanticsAST ::= skip_boundary_edges
+            //
+            case 228: {
+                setResult(
+                    new CopySemanticsAST1(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 229:  MoveRuleAST ::= move TwoParametersAST SEMICOLON
+            //
+            case 229: {
+                setResult(
+                    new MoveRuleAST(getLeftIToken(), getRightIToken(),
+                                    (TwoParametersAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 230:  TwoParametersAST ::= LPAREN ArithmeticTermAST COMMA ArithmeticTermAST RPAREN
+            //
+            case 230: {
+                setResult(
+                    new TwoParametersAST(getLeftIToken(), getRightIToken(),
+                                         (IArithmeticTermAST)getRhsSym(2),
+                                         (IArithmeticTermAST)getRhsSym(4))
+                );
+                break;
+            } 
+            //
+            // Rule 231:  ElementUpdateRuleAST ::= ElementUpdateOpAST TwoParametersAST SEMICOLON
+            //
+            case 231: {
+                setResult(
+                    new ElementUpdateRuleAST(getLeftIToken(), getRightIToken(),
+                                             (ElementUpdateOpAST)getRhsSym(1),
+                                             (TwoParametersAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 232:  ElementUpdateOpAST ::= rename
+            //
+            case 232: {
+                setResult(
+                    new ElementUpdateOpAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 233:  ElementUpdateOpAST ::= setValue
+            //
+            case 233: {
+                setResult(
+                    new ElementUpdateOpAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 234:  ElementUpdateOpAST ::= setFrom
+            //
+            case 234: {
+                setResult(
+                    new ElementUpdateOpAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 235:  ElementUpdateOpAST ::= setTo
+            //
+            case 235: {
+                setResult(
+                    new ElementUpdateOpAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 236:  ElementUpdateOpAST ::= setMultiplicity
+            //
+            case 236: {
+                setResult(
+                    new ElementUpdateOpAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 237:  ElementUpdateOpAST ::= setAggregation
+            //
+            case 237: {
+                setResult(
+                    new ElementUpdateOpAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 238:  ElementUpdateOpAST ::= setInverse
+            //
+            case 238: {
+                setResult(
+                    new ElementUpdateOpAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 239:  QualifiedTypeNameAST ::= TypeNameAST
+            //
+            case 239:
+                break; 
+            //
+            // Rule 240:  QualifiedTypeNameAST ::= QualifiedTypeNameAST DOT TypeNameAST
+            //
+            case 240: {
+                setResult(
+                    new QualifiedTypeNameAST(getLeftIToken(), getRightIToken(),
+                                             (IQualifiedTypeNameAST)getRhsSym(1),
+                                             (ITypeNameAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 241:  TypeNameAST ::= NameLiteral
+            //
+            case 241: {
+                setResult(
+                    new TypeNameAST0(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 242:  TypeNameAST ::= IDENTIFIER
+            //
+            case 242: {
+                setResult(
+                    new TypeNameAST1(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 243:  TypeNameAST ::= UpperCaseLiteral
+            //
+            case 243: {
+                setResult(
+                    new TypeNameAST2(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 244:  TypeNameAST ::= KeywordAsIdentifier
+            //
+            case 244:
+                break; 
+            //
+            // Rule 245:  TypeNameAST ::= StringLiteral
+            //
+            case 245: {
+                setResult(
+                    new TypeNameAST3(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 246:  VariableRefAST ::= UpperCaseLiteral
+            //
+            case 246: {
+                setResult(
+                    new VariableRefAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 247:  VariableDefRefAST ::= UpperCaseLiteral
+            //
+            case 247: {
+                setResult(
+                    new VariableDefRefAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 248:  VariableDefAST ::= UpperCaseLiteral
+            //
+            case 248: {
+                setResult(
+                    new VariableDefAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 249:  ValueQualifiedNameAST ::= ValueLocalNameAST
+            //
+            case 249:
+                break; 
+            //
+            // Rule 250:  ValueQualifiedNameAST ::= QualifiedTypeNameAST DOT TypeNameAST
+            //
+            case 250: {
+                setResult(
+                    new ValueQualifiedNameAST(getLeftIToken(), getRightIToken(),
+                                              (IQualifiedTypeNameAST)getRhsSym(1),
+                                              (ITypeNameAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 251:  ValueLocalNameAST ::= NameLiteral
+            //
+            case 251: {
+                setResult(
+                    new ValueLocalNameAST0(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 252:  ValueLocalNameAST ::= IDENTIFIER
+            //
+            case 252: {
+                setResult(
+                    new ValueLocalNameAST1(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 253:  ASMFunctionNameAST ::= ValueQualifiedNameAST
+            //
+            case 253:
+                break; 
+            //
+            // Rule 254:  FormalParameterDefAST ::= LPAREN FormalParamsAST RPAREN
+            //
+            case 254: {
+                setResult(
+                    new FormalParameterDefAST0(getLeftIToken(), getRightIToken(),
+                                               (IFormalParamsAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 255:  FormalParameterDefAST ::= LPAREN RPAREN
+            //
+            case 255: {
+                setResult(
+                    new FormalParameterDefAST1(getLeftIToken(), getRightIToken())
+                );
+                break;
+            } 
+            //
+            // Rule 256:  FormalParamsAST ::= PatternVariableDefAST TypeOptAST
+            //
+            case 256: {
+                setResult(
+                    new FormalParamsAST0(getLeftIToken(), getRightIToken(),
+                                         (PatternVariableDefAST)getRhsSym(1),
+                                         (TypeOptAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 257:  FormalParamsAST ::= FormalParamsAST COMMA PatternVariableDefAST TypeOptAST
+            //
+            case 257: {
+                setResult(
+                    new FormalParamsAST1(getLeftIToken(), getRightIToken(),
+                                         (IFormalParamsAST)getRhsSym(1),
+                                         (PatternVariableDefAST)getRhsSym(3),
+                                         (TypeOptAST)getRhsSym(4))
+                );
+                break;
+            } 
+            //
+            // Rule 258:  DirectedFormalParameterDefAST ::= LPAREN DirectedFormalParamsAST RPAREN
+            //
+            case 258: {
+                setResult(
+                    new DirectedFormalParameterDefAST0(getLeftIToken(), getRightIToken(),
+                                                       (IDirectedFormalParamsAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 259:  DirectedFormalParameterDefAST ::= LPAREN RPAREN
+            //
+            case 259: {
+                setResult(
+                    new DirectedFormalParameterDefAST1(getLeftIToken(), getRightIToken())
+                );
+                break;
+            } 
+            //
+            // Rule 260:  DirectedFormalParamsAST ::= DirectionKindAST VariableDefAST TypeOptAST
+            //
+            case 260: {
+                setResult(
+                    new DirectedFormalParamsAST0(getLeftIToken(), getRightIToken(),
+                                                 (IDirectionKindAST)getRhsSym(1),
+                                                 (VariableDefAST)getRhsSym(2),
+                                                 (TypeOptAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 261:  DirectedFormalParamsAST ::= DirectedFormalParamsAST COMMA DirectionKindAST VariableDefAST TypeOptAST
+            //
+            case 261: {
+                setResult(
+                    new DirectedFormalParamsAST1(getLeftIToken(), getRightIToken(),
+                                                 (IDirectedFormalParamsAST)getRhsSym(1),
+                                                 (IDirectionKindAST)getRhsSym(3),
+                                                 (VariableDefAST)getRhsSym(4),
+                                                 (TypeOptAST)getRhsSym(5))
+                );
+                break;
+            } 
+            //
+            // Rule 262:  DirectionKindAST ::= in
+            //
+            case 262: {
+                setResult(
+                    new DirectionKindAST0(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 263:  DirectionKindAST ::= out
+            //
+            case 263: {
+                setResult(
+                    new DirectionKindAST1(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 264:  DirectionKindAST ::= inout
+            //
+            case 264: {
+                setResult(
+                    new DirectionKindAST2(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 265:  ActualParameterDefAST ::= LPAREN ActualParamsAST RPAREN
+            //
+            case 265: {
+                setResult(
+                    new ActualParameterDefAST0(getLeftIToken(), getRightIToken(),
+                                               (IActualParamsAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 266:  ActualParameterDefAST ::= LPAREN RPAREN
+            //
+            case 266: {
+                setResult(
+                    new ActualParameterDefAST1(getLeftIToken(), getRightIToken())
+                );
+                break;
+            } 
+            //
+            // Rule 267:  ActualParamsAST ::= ArithmeticTermAST
+            //
+            case 267:
+                break; 
+            //
+            // Rule 268:  ActualParamsAST ::= ActualParamsAST COMMA ArithmeticTermAST
+            //
+            case 268: {
+                setResult(
+                    new ActualParamsAST(getLeftIToken(), getRightIToken(),
+                                        (IActualParamsAST)getRhsSym(1),
+                                        (IArithmeticTermAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 269:  ActualPatternParameterDefAST ::= LPAREN ActualParamsPatternVariablesAST RPAREN
+            //
+            case 269: {
+                setResult(
+                    new ActualPatternParameterDefAST0(getLeftIToken(), getRightIToken(),
+                                                      (IActualParamsPatternVariablesAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 270:  ActualPatternParameterDefAST ::= LPAREN RPAREN
+            //
+            case 270: {
+                setResult(
+                    new ActualPatternParameterDefAST1(getLeftIToken(), getRightIToken())
+                );
+                break;
+            } 
+            //
+            // Rule 271:  ActualParamsPatternVariablesAST ::= PatternVariableRefAST
+            //
+            case 271:
+                break; 
+            //
+            // Rule 272:  ActualParamsPatternVariablesAST ::= ActualParamsPatternVariablesAST COMMA PatternVariableRefAST
+            //
+            case 272: {
+                setResult(
+                    new ActualParamsPatternVariablesAST(getLeftIToken(), getRightIToken(),
+                                                        (IActualParamsPatternVariablesAST)getRhsSym(1),
+                                                        (PatternVariableRefAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 273:  ConstrainedVariablesOptAST ::= $Empty
+            //
+            case 273: {
+                setResult(null);
+                break;
+            } 
+            //
+            // Rule 274:  ConstrainedVariablesOptAST ::= ConstrainedVariablesAST
+            //
+            case 274:
+                break; 
+            //
+            // Rule 275:  ConstrainedVariablesAST ::= VariableDefAST TypeOptAST ContainmentConstraintOptAST
+            //
+            case 275: {
+                setResult(
+                    new ConstrainedVariablesAST0(getLeftIToken(), getRightIToken(),
+                                                 (VariableDefAST)getRhsSym(1),
+                                                 (TypeOptAST)getRhsSym(2),
+                                                 (IContainmentConstraintOptAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 276:  ConstrainedVariablesAST ::= ConstrainedVariablesAST COMMA VariableDefAST TypeOptAST ContainmentConstraintOptAST
+            //
+            case 276: {
+                setResult(
+                    new ConstrainedVariablesAST1(getLeftIToken(), getRightIToken(),
+                                                 (IConstrainedVariablesAST)getRhsSym(1),
+                                                 (VariableDefAST)getRhsSym(3),
+                                                 (TypeOptAST)getRhsSym(4),
+                                                 (IContainmentConstraintOptAST)getRhsSym(5))
+                );
+                break;
+            } 
+            //
+            // Rule 277:  ContainmentConstraintOptAST ::= $Empty
+            //
+            case 277: {
+                setResult(null);
+                break;
+            } 
+            //
+            // Rule 278:  ContainmentConstraintOptAST ::= in ArithmeticTermAST
+            //
+            case 278: {
+                setResult(
+                    new ContainmentConstraintOptAST0(getLeftIToken(), getRightIToken(),
+                                                     (IArithmeticTermAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 279:  ContainmentConstraintOptAST ::= below ArithmeticTermAST
+            //
+            case 279: {
+                setResult(
+                    new ContainmentConstraintOptAST1(getLeftIToken(), getRightIToken(),
+                                                     (IArithmeticTermAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 280:  TypeOptAST ::= $Empty
+            //
+            case 280: {
+                setResult(null);
+                break;
+            } 
+            //
+            // Rule 281:  TypeOptAST ::= COLON QualifiedTypeNameAST
+            //
+            case 281: {
+                setResult(
+                    new TypeOptAST(getLeftIToken(), getRightIToken(),
+                                   (IQualifiedTypeNameAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 282:  ReturnTypeOptAST ::= $Empty
+            //
+            case 282: {
+                setResult(null);
+                break;
+            } 
+            //
+            // Rule 283:  ReturnTypeOptAST ::= COLON QualifiedTypeNameAST
+            //
+            case 283: {
+                setResult(
+                    new ReturnTypeOptAST(getLeftIToken(), getRightIToken(),
+                                         (IQualifiedTypeNameAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 284:  ValueAST ::= UndefValueAST
+            //
+            case 284:
+                break; 
+            //
+            // Rule 285:  ValueAST ::= BooleanConstantAST
+            //
+            case 285:
+                break; 
+            //
+            // Rule 286:  ValueAST ::= MultiplicityConstantAST
+            //
+            case 286:
+                break; 
+            //
+            // Rule 287:  ValueAST ::= StringConstantAST
+            //
+            case 287:
+                break; 
+            //
+            // Rule 288:  ValueAST ::= NumericConstantAST
+            //
+            case 288:
+                break; 
+            //
+            // Rule 289:  ValueAST ::= ValueQualifiedNameAST
+            //
+            case 289:
+                break; 
+            //
+            // Rule 290:  UndefValueAST ::= undef
+            //
+            case 290: {
+                setResult(
+                    new UndefValueAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 291:  BooleanConstantAST ::= false
+            //
+            case 291: {
+                setResult(
+                    new BooleanConstantAST0(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 292:  BooleanConstantAST ::= true
+            //
+            case 292: {
+                setResult(
+                    new BooleanConstantAST1(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 293:  MultiplicityConstantAST ::= one_to_one
+            //
+            case 293: {
+                setResult(
+                    new MultiplicityConstantAST0(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 294:  MultiplicityConstantAST ::= one_to_many
+            //
+            case 294: {
+                setResult(
+                    new MultiplicityConstantAST1(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 295:  MultiplicityConstantAST ::= many_to_one
+            //
+            case 295: {
+                setResult(
+                    new MultiplicityConstantAST2(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 296:  MultiplicityConstantAST ::= many_to_many
+            //
+            case 296: {
+                setResult(
+                    new MultiplicityConstantAST3(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 297:  StringConstantAST ::= StringLiteral
+            //
+            case 297: {
+                setResult(
+                    new StringConstantAST(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 298:  NumericConstantAST ::= DecimalIntegerLiteral
+            //
+            case 298: {
+                setResult(
+                    new NumericConstantAST0(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 299:  NumericConstantAST ::= IntegerLiteral
+            //
+            case 299: {
+                setResult(
+                    new NumericConstantAST1(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 300:  NumericConstantAST ::= FloatingPointLiteral
+            //
+            case 300: {
+                setResult(
+                    new NumericConstantAST2(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 301:  NumericConstantAST ::= DoubleLiteral
+            //
+            case 301: {
+                setResult(
+                    new NumericConstantAST3(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 302:  KeywordAsIdentifier ::= namespace
+            //
+            case 302: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 303:  KeywordAsIdentifier ::= import
+            //
+            case 303: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 304:  KeywordAsIdentifier ::= machine
+            //
+            case 304: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 305:  KeywordAsIdentifier ::= pattern
+            //
+            case 305: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 306:  KeywordAsIdentifier ::= neg
+            //
+            case 306: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 307:  KeywordAsIdentifier ::= find
+            //
+            case 307: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 308:  KeywordAsIdentifier ::= gtrule
+            //
+            case 308: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 309:  KeywordAsIdentifier ::= precondition
+            //
+            case 309: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 310:  KeywordAsIdentifier ::= postcondition
+            //
+            case 310: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 311:  KeywordAsIdentifier ::= action
+            //
+            case 311: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 312:  KeywordAsIdentifier ::= apply
+            //
+            case 312: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 313:  KeywordAsIdentifier ::= xor
+            //
+            case 313: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 314:  KeywordAsIdentifier ::= asmfunction
+            //
+            case 314: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 315:  KeywordAsIdentifier ::= rule
+            //
+            case 315: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 316:  KeywordAsIdentifier ::= skip
+            //
+            case 316: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 317:  KeywordAsIdentifier ::= fail
+            //
+            case 317: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 318:  KeywordAsIdentifier ::= call
+            //
+            case 318: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 319:  KeywordAsIdentifier ::= update
+            //
+            case 319: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 320:  KeywordAsIdentifier ::= print
+            //
+            case 320: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 321:  KeywordAsIdentifier ::= println
+            //
+            case 321: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 322:  KeywordAsIdentifier ::= log
+            //
+            case 322: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 323:  KeywordAsIdentifier ::= debug
+            //
+            case 323: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 324:  KeywordAsIdentifier ::= info
+            //
+            case 324: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 325:  KeywordAsIdentifier ::= warning
+            //
+            case 325: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 326:  KeywordAsIdentifier ::= error
+            //
+            case 326: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 327:  KeywordAsIdentifier ::= fatal
+            //
+            case 327: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 328:  KeywordAsIdentifier ::= seq
+            //
+            case 328: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 329:  KeywordAsIdentifier ::= random
+            //
+            case 329: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 330:  KeywordAsIdentifier ::= let
+            //
+            case 330: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 331:  KeywordAsIdentifier ::= in
+            //
+            case 331: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 332:  KeywordAsIdentifier ::= below
+            //
+            case 332: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 333:  KeywordAsIdentifier ::= choose
+            //
+            case 333: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 334:  KeywordAsIdentifier ::= forall
+            //
+            case 334: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 335:  KeywordAsIdentifier ::= with
+            //
+            case 335: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 336:  KeywordAsIdentifier ::= do
+            //
+            case 336: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 337:  KeywordAsIdentifier ::= iterate
+            //
+            case 337: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 338:  KeywordAsIdentifier ::= if
+            //
+            case 338: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 339:  KeywordAsIdentifier ::= try
+            //
+            case 339: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 340:  KeywordAsIdentifier ::= else
+            //
+            case 340: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 341:  KeywordAsIdentifier ::= new
+            //
+            case 341: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 342:  KeywordAsIdentifier ::= delete
+            //
+            case 342: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 343:  KeywordAsIdentifier ::= delete_content
+            //
+            case 343: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 344:  KeywordAsIdentifier ::= move_content
+            //
+            case 344: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 345:  KeywordAsIdentifier ::= copy
+            //
+            case 345: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 346:  KeywordAsIdentifier ::= copy_boundary_edges
+            //
+            case 346: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 347:  KeywordAsIdentifier ::= skip_boundary_edges
+            //
+            case 347: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 348:  KeywordAsIdentifier ::= move
+            //
+            case 348: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 349:  KeywordAsIdentifier ::= rename
+            //
+            case 349: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 350:  KeywordAsIdentifier ::= setValue
+            //
+            case 350: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 351:  KeywordAsIdentifier ::= setFrom
+            //
+            case 351: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 352:  KeywordAsIdentifier ::= setTo
+            //
+            case 352: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 353:  KeywordAsIdentifier ::= setMultiplicity
+            //
+            case 353: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 354:  KeywordAsIdentifier ::= setAggregation
+            //
+            case 354: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 355:  KeywordAsIdentifier ::= setInverse
+            //
+            case 355: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 356:  KeywordAsIdentifier ::= undef
+            //
+            case 356: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 357:  KeywordAsIdentifier ::= true
+            //
+            case 357: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 358:  KeywordAsIdentifier ::= false
+            //
+            case 358: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 359:  KeywordAsIdentifier ::= one_to_one
+            //
+            case 359: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 360:  KeywordAsIdentifier ::= one_to_many
+            //
+            case 360: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 361:  KeywordAsIdentifier ::= many_to_one
+            //
+            case 361: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 362:  KeywordAsIdentifier ::= many_to_many
+            //
+            case 362: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 363:  KeywordAsIdentifier ::= ref
+            //
+            case 363: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 364:  KeywordAsIdentifier ::= fqn
+            //
+            case 364: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 365:  KeywordAsIdentifier ::= name
+            //
+            case 365: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 366:  KeywordAsIdentifier ::= value
+            //
+            case 366: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 367:  KeywordAsIdentifier ::= source
+            //
+            case 367: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 368:  KeywordAsIdentifier ::= target
+            //
+            case 368: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 369:  KeywordAsIdentifier ::= multiplicity
+            //
+            case 369: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 370:  KeywordAsIdentifier ::= aggregation
+            //
+            case 370: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 371:  KeywordAsIdentifier ::= inverse
+            //
+            case 371: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 372:  KeywordAsIdentifier ::= toBoolean
+            //
+            case 372: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 373:  KeywordAsIdentifier ::= toString
+            //
+            case 373: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 374:  KeywordAsIdentifier ::= toInteger
+            //
+            case 374: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 375:  KeywordAsIdentifier ::= toDouble
+            //
+            case 375: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 376:  KeywordAsIdentifier ::= toMultiplicity
+            //
+            case 376: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 377:  KeywordAsIdentifier ::= out
+            //
+            case 377: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 378:  KeywordAsIdentifier ::= inout
+            //
+            case 378: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 379:  KeywordAsIdentifier ::= parallel
+            //
+            case 379: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 380:  KeywordAsIdentifier ::= changed
+            //
+            case 380: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 381:  KeywordAsIdentifier ::= when
+            //
+            case 381: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 382:  KeywordAsIdentifier ::= shareable
+            //
+            case 382: {
+                setResult(
+                    new KeywordAsIdentifier(getRhsIToken(1))
+                );
+                break;
+            } 
+            //
+            // Rule 383:  OptAnnotationsAST ::= $Empty
+            //
+            case 383: {
+                setResult(null);
+                break;
+            } 
+            //
+            // Rule 384:  OptAnnotationsAST ::= AnnotationsAST
+            //
+            case 384:
+                break; 
+            //
+            // Rule 385:  AnnotationsAST ::= AnnotationAST
+            //
+            case 385:
+                break; 
+            //
+            // Rule 386:  AnnotationsAST ::= AnnotationsAST AnnotationAST
+            //
+            case 386: {
+                setResult(
+                    new AnnotationsAST(getLeftIToken(), getRightIToken(),
+                                       (IAnnotationsAST)getRhsSym(1),
+                                       (IAnnotationAST)getRhsSym(2))
+                );
+                break;
+            } 
+            //
+            // Rule 387:  AnnotationAST ::= AnnotationNameAST
+            //
+            case 387:
+                break; 
+            //
+            // Rule 388:  AnnotationAST ::= AnnotationNameAST LPAREN AnnotationBodyAST RPAREN
+            //
+            case 388: {
+                setResult(
+                    new AnnotationAST(getLeftIToken(), getRightIToken(),
+                                      (AnnotationNameAST)getRhsSym(1),
+                                      (IAnnotationBodyAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 389:  AnnotationBodyAST ::= KeyValuePairAST
+            //
+            case 389:
+                break; 
+            //
+            // Rule 390:  AnnotationBodyAST ::= AnnotationBodyAST COMMA KeyValuePairAST
+            //
+            case 390: {
+                setResult(
+                    new AnnotationBodyAST(getLeftIToken(), getRightIToken(),
+                                          (IAnnotationBodyAST)getRhsSym(1),
+                                          (KeyValuePairAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 391:  KeyValuePairAST ::= TypeNameAST EQUAL TypeNameAST
+            //
+            case 391: {
+                setResult(
+                    new KeyValuePairAST(getLeftIToken(), getRightIToken(),
+                                        (ITypeNameAST)getRhsSym(1),
+                                        (ITypeNameAST)getRhsSym(3))
+                );
+                break;
+            } 
+            //
+            // Rule 392:  AnnotationNameAST ::= AnnotationLiteral
+            //
+            case 392: {
+                setResult(
+                    new AnnotationNameAST(getRhsIToken(1))
+                );
+                break;
+            }    
+            default:
+                break;
+        }
+        return;
+    }
+}
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLParserprs.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLParserprs.java
new file mode 100644
index 0000000..2be3bf3
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLParserprs.java
@@ -0,0 +1,1491 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser;
+
+public class VTCLParserprs implements lpg.lpgjavaruntime.ParseTable, VTCLParsersym {
+
+    public interface IsKeyword {
+        public final static byte isKeyword[] = {0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0
+        };
+    };
+    public final static byte isKeyword[] = IsKeyword.isKeyword;
+    public final boolean isKeyword(int index) { return isKeyword[index] != 0; }
+
+    public interface BaseCheck {
+        public final static short baseCheck[] = {0,
+            3,0,3,0,2,3,1,6,1,2,
+            1,1,1,1,1,7,0,1,1,3,
+            3,0,2,2,2,1,1,1,1,1,
+            1,1,1,1,2,4,3,3,4,0,
+            2,1,1,1,1,1,4,1,1,3,
+            3,2,7,1,1,2,2,2,2,5,
+            6,5,1,2,2,0,2,2,0,4,
+            3,1,3,3,1,3,1,3,3,1,
+            3,1,1,1,1,1,3,3,1,3,
+            3,3,1,2,2,1,1,3,1,1,
+            1,6,2,2,1,1,3,1,2,4,
+            2,3,2,4,4,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,6,
+            2,0,2,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,2,2,4,5,
+            5,2,5,7,5,7,7,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            5,5,5,0,1,4,1,3,4,2,
+            5,5,1,1,1,2,5,7,2,4,
+            6,1,3,4,4,4,1,1,1,1,
+            1,5,5,3,2,3,7,0,2,2,
+            2,2,2,5,5,2,0,2,1,1,
+            2,2,2,2,5,7,1,1,3,5,
+            3,1,1,1,1,1,1,1,1,3,
+            1,1,1,1,1,1,1,1,1,3,
+            1,1,1,3,2,2,4,3,2,3,
+            5,1,1,1,3,2,1,3,3,2,
+            1,3,0,1,3,5,0,2,2,0,
+            2,0,2,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,0,1,1,2,1,4,1,3,
+            3,1,-169,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,-172,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,-11,0,0,0,-105,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,-2,0,0,-12,0,0,0,-38,-4,
+            0,0,0,-10,0,0,0,-42,0,0,
+            0,-20,0,0,-19,0,0,-6,0,-53,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            -47,0,-221,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,-60,0,0,0,0,-214,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,-117,0,-222,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,-168,0,-102,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,-64,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,-174,0,
+            -159,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            -207,0,-160,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,-65,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,-289,0,-199,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,-293,0,-211,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,-27,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,-315,0,-212,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,-7,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            -79,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,-81,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,-23,0,0,0,-220,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,-82,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,-148,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,-24,0,0,0,-217,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,-8,-14,0,-225,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            -227,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,-25,0,0,0,
+            -104,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,-85,-309,0,-312,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,-208,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            -9,0,-209,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,-110,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,-108,0,0,0,-131,0,0,0,0,
+            0,0,-223,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,-242,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,-243,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,-245,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,-203,0,0,0,-239,0,
+            0,0,-269,0,0,0,-30,0,0,-161,
+            0,0,-15,0,-248,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,-250,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            -258,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,-301,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,-322,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,-334,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,-218,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,-219,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,-215,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,-216,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,-119,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,-120,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,-205,0,
+            0,0,-184,-40,-21,-106,0,0,0,-185,
+            -16,-18,-52,0,0,0,0,0,0,0,
+            -17,-257,-13,0,0,0,-190,-5,-1,-26,
+            -32,-113,-34,0,0,0,-73,0,0,0,
+            -75,-268,-28,-33,-41,-46,-91,-35,-31,-80,
+            -36,-61,0,-71,0,-44,-74,-183,-92,-3,
+            0,0,0,0,0,0,0,0,-201,-58,
+            0,0,0,0,0,0,0,0,0,-112,
+            -99,-270,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,-100,-59,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,-109,-173,
+            -306,-308,0,0,0,0,0,0,0,0,
+            -22,0,0,0,0,-29,0,-37,0,0,
+            -69,-70,0,0,0,0,0,0,-77,0,
+            0,0,-90,-95,-98,-115,0,-116,0,-107,
+            -150,-129,-170,-171,-200,-202,0,-204,-186,0,
+            -187,-191,-192,-193,0,0,0,-210,-194,-195,
+            -206,-231,-236,-238,-233,-234,0,0,0,0,
+            -235,-241,-244,-246,0,-247,-253,-256,-262,0,
+            0,-264,0,-277,-284,0,0,-265,0,-266,
+            -267,0,0,-285,0,-294,0,0,-295,0,
+            0,-307,0,0,0,0,-310,-311,0,0,
+            0,0,-316,0,0,0,-313,0,0,-314,
+            0,-320,-330,0,-333,0,-331,-332,-338,0,
+            -39,-43,0,-45,0,-48,-49,-50,-51,-54,
+            -55,-56,-57,0,-62,0,0,0,0,0,
+            -63,0,0,0,0,0,-66,-67,0,-68,
+            0,-72,0,-76,-78,0,0,-83,-84,-86,
+            0,-87,-88,0,0,-89,0,-93,0,-94,
+            0,0,0,-96,-97,-101,-103,0,-111,-114,
+            -118,-121,-122,-123,-124,-125,-126,-127,-128,-130,
+            -132,-133,-134,-135,-136,-137,-138,-139,-140,-141,
+            -142,0,-143,-144,-145,-146,0,-147,0,-149,
+            -151,-152,0,-153,-154,-155,-156,-157,-158,-162,
+            -163,-164,-165,-166,-167,-175,-176,-177,-178,-179,
+            -180,-181,-182,-188,-189,-196,-197,-198,-213,-224,
+            -226,-228,-229,-230,-232,-237,-240,-249,-251,-252,
+            -254,-255,-259,-260,-261,-263,0,-271,-272,-273,
+            -274,-275,-276,-278,-279,-280,-281,-282,-283,-286,
+            -287,-288,-290,-291,-292,-296,-297,-298,-299,-300,
+            -302,-303,-304,-305,-317,-318,-319,-321,-323,-324,
+            -325,-326,-327,-328,-329,-335,-336,-337,-339,0
+        };
+    };
+    public final static short baseCheck[] = BaseCheck.baseCheck;
+    public final int baseCheck(int index) { return baseCheck[index]; }
+    public final static short rhs[] = baseCheck;
+    public final int rhs(int index) { return rhs[index]; };
+
+    public interface BaseAction {
+        public final static char baseAction[] = {
+            91,91,92,92,93,93,95,95,94,96,
+            96,71,71,71,71,71,63,75,75,98,
+            98,76,99,99,100,100,101,101,101,101,
+            101,101,101,102,102,103,64,104,106,105,
+            77,77,78,54,111,111,110,8,107,107,
+            112,114,113,115,108,108,116,116,117,117,
+            65,72,118,118,119,119,120,120,120,121,
+            121,80,55,55,55,25,25,24,24,24,
+            23,23,69,69,69,69,22,22,22,21,
+            21,21,21,20,20,20,9,9,9,9,
+            9,9,73,122,122,125,124,124,126,126,
+            82,81,81,11,12,12,13,13,13,13,
+            13,13,13,13,13,14,14,14,14,14,
+            74,66,67,67,26,26,26,26,27,27,
+            27,30,30,30,30,30,30,33,34,35,
+            36,36,127,37,37,37,37,38,128,128,
+            128,128,128,31,31,31,31,31,31,31,
+            31,39,45,40,70,70,41,129,129,83,
+            42,43,44,85,85,86,86,28,28,29,
+            29,46,130,130,87,87,87,32,32,32,
+            32,32,47,47,131,131,133,135,134,134,
+            132,132,132,132,48,48,137,139,139,140,
+            140,138,138,138,138,49,141,142,142,50,
+            52,51,53,53,53,53,53,53,53,3,
+            3,1,1,1,1,1,4,136,57,6,
+            6,7,7,5,97,97,143,143,79,79,
+            144,144,88,88,88,56,56,145,145,109,
+            109,146,146,84,84,89,89,68,68,68,
+            58,58,123,123,10,10,10,10,10,10,
+            15,16,16,17,17,17,17,18,19,19,
+            19,19,2,2,2,2,2,2,2,2,
+            2,2,2,2,2,2,2,2,2,2,
+            2,2,2,2,2,2,2,2,2,2,
+            2,2,2,2,2,2,2,2,2,2,
+            2,2,2,2,2,2,2,2,2,2,
+            2,2,2,2,2,2,2,2,2,2,
+            2,2,2,2,2,2,2,2,2,2,
+            2,2,2,2,2,2,2,2,2,2,
+            2,2,2,61,61,62,62,59,59,147,
+            147,90,60,501,239,244,2062,96,1932,2090,
+            249,100,93,97,99,101,2092,2091,284,285,
+            286,287,288,89,2110,2111,1931,2114,2112,501,
+            239,244,2062,96,1932,2090,249,100,93,97,
+            99,101,2092,2091,284,285,286,287,288,89,
+            2110,2111,1931,2114,2112,133,240,244,2147,641,
+            239,244,2062,96,1932,2090,249,100,93,97,
+            99,101,2092,2091,284,285,286,287,288,89,
+            2110,1798,6,184,2147,133,1473,244,1954,131,
+            133,239,244,498,133,239,244,1163,133,239,
+            244,2052,133,391,244,133,1761,244,14,184,
+            133,239,244,1923,1963,130,134,135,136,138,
+            139,140,141,142,143,144,145,146,163,164,
+            165,166,167,168,169,170,197,198,199,200,
+            201,131,712,291,239,244,2062,96,1932,2090,
+            249,100,93,97,99,101,2092,2091,284,285,
+            286,287,288,89,2110,2111,1975,2055,134,135,
+            136,138,139,140,141,142,143,144,145,146,
+            163,164,165,166,167,168,169,170,197,198,
+            199,200,201,131,712,390,2133,2132,291,239,
+            244,2062,96,1932,2090,249,100,93,97,99,
+            101,2092,2091,284,285,286,287,288,92,180,
+            134,135,136,138,139,140,141,142,143,144,
+            145,146,163,164,165,166,167,168,169,170,
+            197,198,199,200,201,131,712,291,239,244,
+            2062,96,1932,2090,249,100,93,97,99,101,
+            2092,2091,284,285,286,287,288,89,2110,2111,
+            1984,190,134,135,136,138,139,140,141,142,
+            143,144,145,146,163,164,165,166,167,168,
+            169,170,197,198,199,200,201,131,712,291,
+            239,244,2062,96,1932,2090,249,100,93,97,
+            99,101,2092,2091,284,285,286,287,288,89,
+            2110,2129,414,2146,134,135,136,138,139,140,
+            141,142,143,144,145,146,163,164,165,166,
+            167,168,169,170,197,198,199,200,201,131,
+            712,291,239,244,2062,96,1932,2090,249,100,
+            93,97,99,101,2092,2091,284,285,286,287,
+            288,89,2110,2142,2076,176,134,135,136,138,
+            139,140,141,142,143,144,145,146,163,164,
+            165,166,167,168,169,170,197,198,199,200,
+            201,131,712,291,239,244,2062,96,1932,2090,
+            249,100,93,97,99,101,2092,2091,284,285,
+            286,287,288,89,2110,2143,414,2161,134,135,
+            136,138,139,140,141,142,143,144,145,146,
+            163,164,165,166,167,168,169,170,197,198,
+            199,200,201,131,712,291,239,244,2062,96,
+            1932,2090,249,100,93,97,99,101,2092,2091,
+            284,285,286,287,288,89,2110,2153,2077,191,
+            134,135,136,138,139,140,141,142,143,144,
+            145,146,163,164,165,166,167,168,169,170,
+            197,198,199,200,201,131,712,291,239,244,
+            2062,96,1932,2090,249,100,93,97,99,101,
+            2092,2091,284,285,286,287,288,89,2110,2164,
+            394,186,134,135,136,138,139,140,141,142,
+            143,144,145,146,163,164,165,166,167,168,
+            169,170,197,198,199,200,201,131,712,291,
+            239,244,2062,96,1932,2090,249,100,93,97,
+            99,101,2092,2091,284,285,286,287,288,89,
+            2110,2165,25,188,134,135,136,138,139,140,
+            141,142,143,144,145,146,163,164,165,166,
+            167,168,169,170,197,198,199,200,201,1789,
+            712,291,239,244,2062,96,1932,2090,249,100,
+            93,97,99,101,2092,2091,284,285,286,287,
+            288,89,2110,2111,1931,2114,2112,291,239,244,
+            2062,96,1932,2090,249,100,93,97,99,101,
+            2092,2091,284,285,286,287,288,89,2110,2117,
+            1931,2114,2112,133,920,244,2081,291,239,244,
+            2062,96,1932,2090,249,100,93,97,99,101,
+            2092,2091,284,285,286,287,288,89,2110,2111,
+            1931,2169,2116,291,239,244,2062,96,1932,2090,
+            249,100,93,97,99,101,2092,2091,284,285,
+            286,287,288,89,2110,2119,1931,2114,2112,291,
+            239,244,2062,96,1932,2090,249,100,93,97,
+            99,101,2092,2091,284,285,286,287,288,89,
+            2110,2111,1931,2114,2112,133,1783,244,2118,291,
+            239,244,2062,96,1932,2090,249,100,93,97,
+            99,101,2092,2091,284,285,286,287,288,89,
+            2110,2166,223,295,2139,291,239,244,2062,96,
+            1932,2090,249,100,93,97,99,101,2092,2091,
+            284,285,286,287,288,89,2110,2111,1931,2114,
+            2112,291,239,244,2062,96,1932,2090,249,100,
+            93,97,99,101,2092,2091,284,285,286,287,
+            288,89,2110,2111,1931,2114,2112,133,1906,244,
+            2171,291,239,244,2062,96,1932,2090,249,100,
+            93,97,99,101,2092,2091,284,285,286,287,
+            288,89,2110,2131,423,614,2172,291,239,244,
+            2062,96,1932,2090,249,100,93,97,99,101,
+            2092,2091,284,285,286,287,288,89,2110,2111,
+            1931,2114,2112,291,239,244,2062,96,1932,2090,
+            249,100,93,97,99,101,2092,2091,284,285,
+            286,287,288,89,2110,2111,1931,2114,2162,2191,
+            152,53,2193,291,239,244,2062,96,1932,2090,
+            249,100,93,97,99,101,2092,2091,284,285,
+            286,287,288,89,2110,2111,1931,2114,2163,432,
+            239,244,2062,96,1932,2090,249,100,93,97,
+            99,101,2092,2091,284,285,286,287,288,89,
+            2110,2138,133,239,244,2136,160,239,244,1948,
+            386,1162,2130,291,239,244,2062,96,1932,2090,
+            249,100,93,97,99,101,2092,2091,284,285,
+            286,287,288,89,2110,2170,291,239,244,2062,
+            96,1932,2090,249,100,93,97,99,101,2092,
+            2091,284,285,286,287,288,89,2110,2176,291,
+            239,244,2062,96,1932,2090,249,100,93,97,
+            99,101,2092,2091,284,285,286,287,288,89,
+            2110,2177,291,239,244,2062,96,1932,2090,249,
+            100,93,97,99,101,2092,2091,284,285,286,
+            287,288,89,2110,2178,133,239,244,1969,248,
+            239,244,1986,160,239,244,1969,133,1908,244,
+            133,2144,244,92,2137,291,239,244,2062,96,
+            1932,2090,249,100,93,97,99,101,2092,2091,
+            284,285,286,287,288,89,2110,2179,291,239,
+            244,2062,96,1932,2090,249,100,93,97,99,
+            101,2092,2091,284,285,286,287,288,89,2110,
+            2180,291,239,244,2062,96,1932,2090,249,100,
+            93,97,99,101,2092,2091,284,285,286,287,
+            288,89,2110,2184,291,239,244,2062,96,1932,
+            2090,249,100,93,97,99,101,2092,2091,284,
+            285,286,287,288,89,2110,2188,291,239,244,
+            2062,96,1932,2090,249,100,93,97,99,101,
+            2092,2091,284,285,286,287,288,89,2110,2195,
+            291,239,244,2062,96,1932,2090,249,100,93,
+            97,99,101,2092,2091,284,285,286,287,288,
+            89,2110,2198,291,239,244,2062,96,1932,2090,
+            249,100,93,97,99,101,2092,2091,284,285,
+            286,287,288,89,2167,291,239,244,2062,96,
+            1932,2090,249,100,93,97,99,101,2092,2091,
+            284,285,286,287,288,89,2168,291,239,244,
+            2062,96,1932,2090,249,100,93,97,99,101,
+            2092,2091,284,285,286,287,288,91,291,239,
+            244,2062,96,1932,2090,249,100,93,97,99,
+            101,2092,2091,284,285,286,287,288,90,646,
+            239,244,2062,96,1932,2090,249,100,95,97,
+            99,101,2092,2091,284,285,286,287,288,646,
+            239,244,2062,96,1932,2090,249,100,94,97,
+            99,101,2092,2091,284,285,286,287,288,1,
+            239,244,1782,414,401,7,43,239,244,1767,
+            414,65,4,271,239,244,2062,2059,1244,253,
+            249,107,548,133,1761,244,2182,519,50,8,
+            266,39,445,133,239,244,2022,133,239,244,
+            2022,275,560,35,150,56,132,36,308,141,
+            2,292,401,2160,423,224,89,12,277,297,
+            11,1912,223,27,385,1162,1901,1301,11,445,
+            410,385,1162,1901,1301,11,10,12,13,14,
+            261,297,251,9,12,13,14,385,1162,972,
+            1301,385,1162,1936,1301,64,65,297,410,23,
+            2156,26,28,29,30,31,33,34,1745,1925,
+            2079,48,49,389,104,54,55,19,112,1744,
+            472,1800,1,5,1919,2125,687,1924,385,1162,
+            1936,1301,67,68,192,177,108,2135,2134,2080,
+            2058,385,1162,1936,1301,25,35,2127,687,91,
+            401,297,382,1768,2068,1924,1997,52,2181,2070,
+            1968,29,205,2128,687,1784,394,1785,396,102,
+            1751,51,140,103,61,2021,1820,2121,2115,140,
+            1889,2075,2074,427,140,140,644,2070,451,2054,
+            401,649,423,401,252,269,281,216,275,414,
+            1935,414,414,414,414,2079,271,1925,427,414,
+            140,140,36,653,5,535,535,2189,687,2173,
+            2174,535,140,5,653,2175,653,10,306,555,
+            260,109,558,178,656,663,1770,256,558,2120,
+            558,558,1934,2126,664,1791,427,1950,113,252,
+            1962,222,656,221,213,212,211,252,619,1930,
+            1139,210,275,623,1974,2024,1951,614,261,257,
+            614,1770,535,614,20,393,2194,614,614,614,
+            1989,98,163,172,294,1739,404,405,406,407,
+            390,408,409,149,173,311,171,57,2190,193,
+            182,413,71,56,1139,59,58,415,419,181,
+            420,47,270,1139,196,417,2154,276,418,422,
+            424,38,425,426,37,50,428,272,21,36,
+            435,2196,2197,2199,431,175,430,439,1992,433,
+            643,296,447,452,455,457,458,462,468,471,
+            442,472,473,481,484,485,486,488,489,490,
+            491,492,204,494,495,496,497,218,498,2192,
+            648,504,650,41,651,505,298,170,300,179,
+            507,302,499,503,506,508,509,510,511,274,
+            512,276,513,514,515,516,652,305,517,368,
+            520,521,167,192,529,534,536,539,540,543,
+            544,545,547,286,549,552,553,226,312,562,
+            564,568,654,655,221,360,571,658,660,661,
+            373,376,377,569,572,581,578,582,586,375,
+            293,600,601,602,603,604,607,610,624,626,
+            383,627,385,388,629,304,631,638,389,640,
+            2208,0,189,635,0,187,947,0
+        };
+    };
+    public final static char baseAction[] = BaseAction.baseAction;
+    public final int baseAction(int index) { return baseAction[index]; }
+    public final static char lhs[] = baseAction;
+    public final int lhs(int index) { return lhs[index]; };
+
+    public interface TermCheck {
+        public final static char termCheck[] = {0,
+            0,0,2,0,0,0,0,0,4,0,
+            0,0,9,0,14,9,13,10,15,13,
+            0,15,19,20,0,19,20,16,0,28,
+            29,30,31,32,0,0,12,9,0,1,
+            5,6,0,15,2,7,8,19,20,0,
+            0,1,0,44,45,0,14,7,8,39,
+            11,12,62,63,0,65,66,67,68,69,
+            70,71,72,73,74,75,76,77,78,79,
+            80,81,82,83,84,85,86,87,0,89,
+            0,0,89,58,60,89,92,0,98,61,
+            100,101,102,103,62,92,0,65,66,67,
+            68,69,70,71,72,73,74,75,76,77,
+            78,79,80,81,82,83,84,85,86,87,
+            0,0,0,2,2,5,6,132,89,0,
+            0,107,100,101,102,103,14,92,0,0,
+            60,21,22,23,24,25,26,27,61,0,
+            105,2,0,33,34,35,0,37,38,0,
+            40,41,42,14,0,1,46,89,0,49,
+            50,51,52,53,54,55,56,57,98,59,
+            93,0,61,105,62,0,105,65,66,67,
+            68,69,70,71,72,73,74,75,76,77,
+            78,79,80,81,82,83,84,85,86,87,
+            0,62,0,61,65,66,67,68,69,70,
+            71,72,73,74,75,76,77,78,79,80,
+            81,82,83,84,85,86,87,0,108,2,
+            0,0,1,105,88,93,61,88,92,9,
+            0,14,93,13,14,0,88,93,0,0,
+            0,93,123,0,0,0,0,17,13,88,
+            0,61,60,92,14,0,18,36,93,9,
+            0,0,0,0,0,0,0,0,3,0,
+            3,0,3,0,0,0,1,0,88,62,
+            0,0,65,66,67,68,69,70,71,72,
+            73,74,75,76,77,78,79,80,81,82,
+            83,84,85,86,87,65,66,67,68,69,
+            70,71,72,73,74,75,76,77,78,79,
+            80,81,82,83,84,85,61,87,61,0,
+            61,88,61,88,88,61,93,0,93,93,
+            3,60,0,88,0,0,0,92,3,3,
+            88,0,0,2,0,93,92,0,0,0,
+            3,88,0,0,93,0,93,93,91,108,
+            0,108,2,0,0,0,0,0,0,0,
+            99,2,0,0,0,105,0,0,0,0,
+            61,0,0,0,0,0,0,0,61,0,
+            0,0,0,61,0,61,61,61,0,47,
+            48,0,61,61,0,61,0,88,61,61,
+            0,0,2,60,0,60,0,0,14,43,
+            88,0,88,60,60,60,60,0,60,39,
+            0,0,0,60,60,93,88,93,60,60,
+            0,92,60,0,0,0,60,0,0,0,
+            0,0,61,0,0,0,0,0,0,92,
+            0,60,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,105,0,0,
+            0,92,99,99,99,108,99,93,0,108,
+            92,60,60,0,0,0,2,4,0,0,
+            108,3,0,0,0,99,0,0,0,2,
+            99,0,0,99,0,99,99,0,60,0,
+            99,0,60,0,64,60,99,0,0,99,
+            0,0,61,61,61,61,61,0,60,99,
+            0,0,99,99,99,0,99,99,99,99,
+            99,88,99,99,99,99,99,93,92,0,
+            0,0,0,0,88,98,0,98,98,0,
+            43,92,92,0,60,2,108,60,0,60,
+            2,60,0,0,2,0,0,99,0,61,
+            0,92,61,98,92,92,92,0,92,0,
+            0,61,0,0,92,0,98,0,0,0,
+            0,0,0,0,0,0,105,0,88,0,
+            0,61,0,0,0,88,0,0,0,88,
+            0,108,0,88,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            88,61,93,0,93,92,0,0,92,0,
+            61,92,0,0,0,0,0,0,0,0,
+            0,88,0,0,0,0,0,0,0,93,
+            0,93,0,98,0,0,0,0,0,0,
+            93,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0
+        };
+    };
+    public final static char termCheck[] = TermCheck.termCheck;
+    public final int termCheck(int index) { return termCheck[index]; }
+
+    public interface TermAction {
+        public final static char termAction[] = {0,
+            148,59,2158,14,159,2,15,1,895,165,
+            3,54,383,6,1463,383,383,480,383,383,
+            69,383,383,383,7,383,383,1772,16,2366,
+            2367,2368,2369,2370,19,67,475,2226,21,2470,
+            2124,2123,76,1217,2451,2471,2472,1135,1053,5,
+            50,2470,9,2427,2428,29,2515,2471,2472,393,
+            484,383,2450,1822,12,2564,2565,2566,2567,2568,
+            2569,2570,2571,2572,2573,2574,2575,2576,2577,2578,
+            2579,2580,2581,2582,2583,2584,2449,2453,31,2240,
+            77,11,2223,2122,1773,2223,2393,27,2229,2467,
+            1978,1972,1981,1980,2450,2211,13,2564,2565,2566,
+            2567,2568,2569,2570,2571,2572,2573,2574,2575,2576,
+            2577,2578,2579,2580,2581,2582,2583,2584,2449,2453,
+            26,33,4,2250,2451,2050,2048,2201,2215,51,
+            20,1788,1949,1944,1943,1942,2515,2314,42,22,
+            1329,2031,2030,500,1753,2029,2028,2027,2466,96,
+            1794,2451,30,2041,2035,1792,152,1838,1810,120,
+            583,2026,531,2515,72,739,2047,2271,122,816,
+            2440,2441,2442,2443,2444,2445,2446,2033,2315,2032,
+            1911,153,2463,1797,2450,56,1752,2564,2565,2566,
+            2567,2568,2569,2570,2571,2572,2573,2574,2575,2576,
+            2577,2578,2579,2580,2581,2582,2583,2584,2449,2453,
+            185,2450,8,2319,2564,2565,2566,2567,2568,2569,
+            2570,2571,2572,2573,2574,2575,2576,2577,2578,2579,
+            2580,2581,2582,2583,2584,2449,2453,160,479,2451,
+            177,130,1409,1799,1613,1777,2462,1613,2359,383,
+            80,2515,1165,383,1455,17,1613,1890,146,53,
+            38,1191,488,134,55,136,139,1809,1467,1613,
+            147,2323,1763,2358,2515,170,2155,1386,1928,2226,
+            58,24,203,32,10,85,68,119,1273,121,
+            1273,124,1273,222,144,168,1544,23,1613,2450,
+            44,178,2564,2565,2566,2567,2568,2569,2570,2571,
+            2572,2573,2574,2575,2576,2577,2578,2579,2580,2581,
+            2582,2583,2584,2449,2453,2564,2565,2566,2567,2568,
+            2569,2570,2571,2572,2573,2574,2575,2576,2577,2578,
+            2579,2580,2581,2582,2583,2584,791,2453,2140,186,
+            2141,1613,2145,1613,1613,2473,1475,149,1498,1967,
+            1273,243,193,1613,202,194,195,2318,1273,1273,
+            1613,208,217,2251,219,2012,2214,220,226,39,
+            1273,1613,223,18,1952,25,1590,1521,2313,1796,
+            28,1781,2456,34,35,36,37,40,41,43,
+            243,2456,45,46,47,1821,57,60,48,49,
+            2322,61,52,62,63,64,66,65,2306,73,
+            71,78,79,2185,70,2438,2186,2187,74,2435,
+            2436,95,2478,2477,81,2259,87,1613,2247,2415,
+            84,88,2250,1771,89,1786,90,91,1455,2202,
+            1613,92,1613,1001,1790,1027,1083,93,1787,419,
+            94,97,98,689,1221,2013,1613,2018,449,1746,
+            99,2356,1329,100,101,102,1329,103,104,105,
+            106,107,2474,108,109,110,111,112,125,2355,
+            129,253,126,115,118,127,123,128,131,132,
+            133,135,137,138,140,141,145,1837,142,150,
+            151,2439,243,1470,242,741,241,1933,154,793,
+            2437,897,949,155,156,158,2454,843,161,162,
+            845,1273,163,164,166,245,167,169,171,2183,
+            362,172,174,361,173,360,359,175,1955,176,
+            357,179,1956,180,1459,1961,358,181,196,356,
+            187,197,2148,2149,2150,2151,2152,199,1762,376,
+            198,200,375,374,373,201,372,371,370,369,
+            368,1613,367,366,365,364,363,1363,2357,204,
+            205,206,207,212,1613,1953,213,1964,1966,214,
+            2205,2363,2361,209,1892,2251,1432,1245,210,1998,
+            2252,1247,211,215,2254,216,218,240,221,2404,
+            224,2433,2403,131,2423,2422,2411,225,2410,227,
+            75,2402,82,83,2232,86,2270,113,114,116,
+            117,143,157,182,183,184,1891,188,1613,189,
+            190,2414,191,192,2208,1613,2208,2208,2208,1613,
+            2208,2010,2208,1613,2208,2208,2208,2208,2208,2208,
+            2208,2208,2208,2208,2208,2208,2208,2208,2208,2208,
+            1613,2268,1567,2208,247,2365,2208,2208,2364,2208,
+            2261,2362,2208,2208,2208,2208,2208,2208,2208,2208,
+            2208,1613,2208,2208,2208,2208,2208,2208,2208,2017,
+            2208,2015,2208,2278,2208,2208,2208,2208,2208,2208,
+            2019
+        };
+    };
+    public final static char termAction[] = TermAction.termAction;
+    public final int termAction(int index) { return termAction[index]; }
+
+    public interface DefaultReduce {
+        public final static char defaultReduce[] = {0,
+            2,2208,4,2208,2208,2208,2208,387,384,2208,
+            2208,2208,2208,2208,2208,17,2208,2208,2208,2208,
+            2208,282,2208,2208,2208,2208,2208,2208,2208,2208,
+            2208,2208,2208,2208,2208,2208,2208,2208,2208,2208,
+            2208,2208,273,2208,2208,2208,2208,2208,2208,2208,
+            280,2208,283,2208,2208,2208,189,2208,2208,2208,
+            2208,246,2208,252,251,2208,2208,132,2208,274,
+            2208,2208,2208,2208,2208,2208,2208,2208,2208,66,
+            383,16,22,2208,2208,2208,297,296,295,294,
+            293,292,291,290,289,307,2208,2208,129,128,
+            127,126,125,124,123,122,121,120,119,118,
+            117,116,86,77,80,72,75,2208,2208,80,
+            2208,80,2208,2208,2208,2208,2208,2208,2208,277,
+            2208,2208,2208,2208,2208,2208,2208,2208,217,2208,
+            2208,2208,281,2208,267,69,17,2208,2208,2208,
+            2208,2208,2208,250,2208,2208,174,133,2208,312,
+            183,2208,2208,2208,2208,2208,2208,208,2208,2208,
+            2208,2208,2208,2208,2208,2208,306,43,2208,2208,
+            187,74,73,40,2208,2208,81,88,87,76,
+            79,78,2208,2208,2208,2208,2208,2208,279,278,
+            179,2208,2208,2208,2208,246,268,2208,2208,2208,
+            2208,2208,2208,2208,209,2208,2208,2208,2208,2208,
+            2208,2208,2208,2208,2208,2208,2208
+        };
+    };
+    public final static char defaultReduce[] = DefaultReduce.defaultReduce;
+    public final int defaultReduce(int index) { return defaultReduce[index]; }
+
+    public interface ShiftState {
+        public final static char shiftState[] = {0,
+            305,1,1,629,724,210,95,721,749,210,
+            100,737,409,748,727,775,408,721,736,409,
+            718,622,756,409,721,717,737,407,209,728,
+            729,409,746,721,721,721,721,629,426,426,
+            721,100,407,100,100,721,721,721,721,199,
+            622,721,311,788,100,737,586,212,585,409,
+            409,1,311,1,1,745,777,1,747,624,
+            747,312,426,426,2,525,780,107,409,760,
+            761,208,1,407,730,428,1,1,1,1,
+            1,1,1,1,1,629,721,721,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,304,689,690,92,619,624,730,731,
+            730,731,426,737,721,721,721,310,212,377,
+            409,310,310,731,762,731,762,762,731,762,
+            762,745,311,737,690,797,416,317,730,426,
+            426,734,734,1,204,407,426,1,424,629,
+            91,426,426,426,720,426,426,520,407,734,
+            310,100,745,426,721,745,761,1,721,196,
+            586,92,92,785,732,732,690,304,304,619,
+            689,689,732,730,730,762,762,762,690,690,
+            690,732,731,624,762,1,690,746,407,99,
+            407,426,426,426,690,310,737,624,737,730,
+            624,731,753,762,624,732,762
+        };
+    };
+    public final static char shiftState[] = ShiftState.shiftState;
+    public final int shiftState(int index) { return shiftState[index]; }
+
+    public interface ShiftCheck {
+        public final static char shiftCheck[] = {0,
+            0,0,1,2,3,4,5,6,7,8,
+            9,10,11,12,13,14,15,16,17,18,
+            19,20,21,22,23,24,25,26,27,28,
+            29,30,31,32,33,34,35,36,37,38,
+            39,40,41,42,43,44,45,46,47,48,
+            49,50,51,52,53,54,55,56,57,58,
+            59,60,0,62,63,64,65,66,67,68,
+            69,70,71,72,73,74,75,76,77,78,
+            79,80,81,82,83,84,85,86,87,88,
+            0,0,91,3,0,94,95,96,0,0,
+            2,100,101,102,103,104,12,1,2,3,
+            4,5,6,7,8,9,10,11,12,13,
+            14,15,16,17,18,19,20,21,22,23,
+            24,25,26,27,28,29,30,31,32,33,
+            34,35,36,37,38,39,40,41,42,43,
+            44,45,46,47,48,49,50,51,52,53,
+            54,55,56,57,58,59,60,61,62,63,
+            64,65,66,67,68,69,70,71,72,73,
+            74,75,76,77,78,79,80,81,82,83,
+            84,85,86,87,88,0,106,91,0,1,
+            94,95,96,0,105,7,8,4,117,111,
+            104,0,1,2,3,4,5,6,7,8,
+            9,10,11,12,13,14,15,16,17,18,
+            19,20,21,22,23,24,25,26,27,28,
+            29,30,31,32,33,34,35,36,37,38,
+            39,40,41,42,43,44,45,46,47,48,
+            49,50,51,52,53,54,55,56,57,58,
+            59,60,0,62,63,64,65,66,67,68,
+            69,70,71,72,73,74,75,76,77,78,
+            79,80,81,82,83,84,85,86,87,88,
+            92,92,91,108,0,94,95,96,99,0,
+            0,116,1,105,10,104,109,1,2,3,
+            4,5,6,7,8,9,10,11,12,13,
+            14,15,16,17,18,19,20,21,22,23,
+            24,25,26,27,28,29,30,31,32,33,
+            34,35,36,37,38,39,40,41,42,43,
+            44,45,46,47,48,49,50,51,52,53,
+            54,55,56,57,58,59,0,1,62,63,
+            64,65,66,67,68,69,70,71,72,73,
+            74,75,76,77,78,79,80,81,82,83,
+            84,85,86,87,93,89,0,98,2,99,
+            107,0,36,0,98,0,100,101,102,103,
+            13,118,119,0,9,0,110,4,1,2,
+            3,4,5,6,7,8,9,10,11,12,
+            13,14,15,16,17,18,19,20,21,22,
+            23,24,25,26,27,28,29,30,31,32,
+            33,34,35,36,37,38,39,40,41,42,
+            43,44,45,46,47,48,49,50,51,52,
+            53,54,55,56,57,58,59,60,0,62,
+            63,64,65,66,67,68,69,70,71,72,
+            73,74,75,76,77,78,79,80,81,82,
+            83,84,85,86,87,92,108,92,91,0,
+            1,94,95,96,0,1,2,3,4,5,
+            6,7,8,9,10,11,12,13,14,15,
+            16,17,18,19,20,21,22,23,24,25,
+            26,27,28,29,30,31,32,33,34,35,
+            36,37,38,39,40,41,42,43,44,45,
+            46,47,48,49,50,51,52,53,54,55,
+            56,57,58,59,0,0,62,63,64,65,
+            66,67,68,69,70,71,72,73,74,75,
+            76,77,78,79,80,81,82,83,84,85,
+            86,87,28,29,30,31,32,0,0,0,
+            0,0,0,0,100,101,102,103,43,1,
+            2,3,4,5,6,7,8,9,10,11,
+            12,13,14,15,16,17,18,19,20,21,
+            22,23,24,25,26,27,28,29,30,31,
+            32,33,34,35,36,37,38,39,40,41,
+            42,43,44,45,46,47,48,49,50,51,
+            52,53,54,55,56,57,58,59,0,0,
+            62,63,64,65,66,67,68,69,70,71,
+            72,73,74,75,76,77,78,79,80,81,
+            82,83,84,85,86,87,93,0,1,0,
+            0,5,6,0,7,8,0,0,0,0,
+            112,0,3,115,11,0,0,21,22,23,
+            24,25,26,27,123,0,0,2,0,33,
+            34,35,0,37,38,0,40,41,42,0,
+            0,0,46,44,45,49,50,51,52,53,
+            54,55,56,57,14,59,17,88,61,0,
+            60,5,6,9,0,39,97,0,61,15,
+            61,0,61,19,20,60,0,61,0,47,
+            48,113,114,16,60,89,61,0,120,121,
+            0,0,89,90,18,89,90,89,88,88,
+            93,88,61,93,98,92,99,97,97,93,
+            97,0,0,105,58,106,89,90,90,60,
+            0,0,107,99,0,0,91,0,0,0,
+            90,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,98,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,122,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0
+        };
+    };
+    public final static char shiftCheck[] = ShiftCheck.shiftCheck;
+    public final int shiftCheck(int index) { return shiftCheck[index]; }
+
+    public interface DefaultShift {
+        public final static char defaultShift[] = {0,
+            2539,2060,2521,2544,2549,2550,2585,2586,2590,2510,
+            2511,2512,2513,1356,2516,2517,2518,2519,2522,2523,
+            2524,2525,2526,2527,2528,2529,2530,2531,2532,2533,
+            2534,2535,2536,2537,2538,2540,2541,2542,2543,2545,
+            2546,2547,2548,2551,2552,2553,2554,2555,2556,2557,
+            2558,2559,2560,2561,2562,2563,2587,2588,2589,1109,
+            2596,2063,2514,2520,2089,2087,2088,2086,2085,2084,
+            2083,2108,2106,2105,2104,2103,2101,2100,2099,2098,
+            2097,2096,2095,2094,2093,2066,2082,1719,2345,2600,
+            2506,2383,495,2507,2508,2509,1635,2216,445,1941,
+            1939,1750,1743,1699,1926,1303,1657,492,1938,2159,
+            2253,637,2292,2293,533,2007,1057,588,1678,2291,
+            2290,2003,1352,2208,2208,2208,2208,2208,2208,2208,
+            2208,2208,2208,2208,2208,2208,2208
+        };
+    };
+    public final static char defaultShift[] = DefaultShift.defaultShift;
+    public final int defaultShift(int index) { return defaultShift[index]; }
+
+    public interface Asb {
+        public final static char asb[] = {0,
+            303,98,304,12,304,100,110,103,104,12,
+            12,12,12,100,444,340,602,295,12,12,
+            294,581,12,12,12,585,337,309,337,12,
+            602,201,312,12,319,602,337,364,340,433,
+            443,12,438,321,602,316,364,337,337,337,
+            337,12,12,420,420,337,444,326,326,364,
+            433,444,444,337,337,337,337,337,202,339,
+            337,442,12,324,444,340,339,356,5,92,
+            5,5,602,602,337,446,440,469,469,343,
+            290,364,350,349,346,350,596,352,364,364,
+            420,5,420,5,1,497,433,12,336,112,
+            602,424,331,492,494,433,364,587,7,7,
+            447,447,447,447,447,447,447,447,337,470,
+            207,337,337,343,343,343,343,343,343,343,
+            343,343,343,343,343,343,343,5,471,479,
+            477,485,483,597,587,455,587,455,5,5,
+            12,420,340,337,337,337,426,364,5,433,
+            594,5,433,364,602,426,426,605,467,605,
+            467,467,464,337,337,337,337,467,467,343,
+            337,337,337,337,339,591,340,464,5,425,
+            331,584,12,444,494,339,364,5,5,343,
+            5,5,587,5,5,5,5,5,5,5,
+            5,5,5,420,5,420,5,418,418,469,
+            290,490,433,433,433,355,363,489,207,487,
+            346,5,5,489,5,355,355,5,420,5,
+            420,420,394,420,420,397,433,5,418,426,
+            444,343,420,337,337,337,337,343,206,329,
+            599,337,601,356,485,485,400,465,465,477,
+            471,471,483,479,479,465,587,587,364,467,
+            467,467,364,343,594,416,416,604,465,605,
+            5,597,467,340,464,364,422,316,433,428,
+            432,5,433,433,364,433,420,420,420,433,
+            465,5,426,340,597,340,587,597,605,433,
+            433,433,435,5,467,597,465,433,467
+        };
+    };
+    public final static char asb[] = Asb.asb;
+    public final int asb(int index) { return asb[index]; }
+
+    public interface Asr {
+        public final static char asr[] = {0,
+            100,101,102,103,88,104,91,94,95,96,
+            60,86,62,2,87,10,11,12,13,63,
+            14,15,16,17,18,64,3,19,20,21,
+            22,23,24,25,26,27,33,34,35,1,
+            36,37,38,39,4,40,41,42,43,5,
+            6,44,45,46,47,48,49,50,51,52,
+            53,54,55,56,65,66,67,68,69,70,
+            71,72,73,74,75,76,77,78,79,80,
+            81,82,83,84,85,7,8,57,58,59,
+            9,28,29,30,31,32,0,132,0,92,
+            99,0,60,13,15,19,20,9,90,12,
+            0,88,104,2,86,62,10,11,12,13,
+            63,14,15,16,17,18,64,3,19,20,
+            21,22,23,24,25,26,27,28,29,30,
+            31,32,33,34,35,36,37,38,39,4,
+            40,41,42,43,5,6,44,45,46,47,
+            48,49,50,51,52,53,54,55,56,65,
+            66,67,68,69,70,71,72,73,74,75,
+            76,77,78,79,80,81,82,83,84,85,
+            57,58,59,9,87,91,94,95,96,60,
+            61,1,7,8,0,60,99,86,62,2,
+            87,10,11,12,13,63,14,15,16,17,
+            18,64,3,19,20,21,22,23,24,25,
+            26,27,28,29,30,31,32,33,34,35,
+            1,36,37,38,39,4,40,41,42,43,
+            44,45,46,47,48,49,50,51,52,53,
+            54,55,56,65,66,67,68,69,70,71,
+            72,73,74,75,76,77,78,79,80,81,
+            82,83,84,85,7,8,57,59,9,5,
+            6,58,0,98,13,15,19,20,9,89,
+            90,0,10,11,12,90,89,0,107,60,
+            0,105,92,123,0,2,61,0,91,0,
+            105,89,0,16,0,39,2,0,60,99,
+            13,9,14,90,0,98,60,0,123,61,
+            93,0,60,99,0,1,36,123,93,39,
+            0,108,123,0,92,13,15,19,20,9,
+            90,43,98,5,6,46,49,50,51,52,
+            53,54,55,56,33,34,35,40,37,38,
+            57,59,21,22,23,24,25,26,27,41,
+            42,89,0,44,45,0,61,1,0,3,
+            1,4,112,113,114,115,106,117,118,119,
+            107,120,121,61,122,39,93,97,88,92,
+            0,92,122,17,18,98,0,92,1,36,
+            0,111,2,0,47,48,0,61,93,99,
+            0,99,92,105,0,108,1,39,4,118,
+            119,107,92,99,3,112,113,114,115,106,
+            117,120,121,93,97,88,61,0,99,60,
+            1,39,93,119,107,118,97,88,121,120,
+            113,114,112,115,61,117,106,3,92,4,
+            0,90,109,110,98,89,100,101,102,103,
+            10,11,12,63,14,16,17,18,64,3,
+            21,22,23,24,25,26,27,28,29,30,
+            31,32,33,34,35,1,36,37,38,39,
+            4,40,41,42,43,5,6,44,45,46,
+            47,48,49,50,51,52,53,54,55,56,
+            65,66,67,68,69,70,71,72,73,74,
+            75,76,77,78,79,80,81,82,83,84,
+            85,7,8,57,58,59,86,62,2,87,
+            15,19,20,9,13,0,106,3,61,0,
+            61,108,99,39,36,1,93,0,60,99,
+            116,108,0,1,97,88,93,0
+        };
+    };
+    public final static char asr[] = Asr.asr;
+    public final int asr(int index) { return asr[index]; }
+
+    public interface Nasb {
+        public final static char nasb[] = {0,
+            56,6,103,5,52,6,6,6,64,5,
+            11,11,46,6,6,6,6,35,10,11,
+            28,115,11,11,11,6,15,74,15,11,
+            6,59,76,66,84,6,117,7,6,111,
+            78,5,6,94,6,80,7,6,6,6,
+            6,38,5,6,6,6,6,111,111,7,
+            88,6,6,13,13,6,6,6,60,119,
+            91,6,66,96,69,6,119,6,2,86,
+            2,2,6,6,108,6,6,6,6,108,
+            82,100,6,6,119,6,6,119,100,100,
+            6,2,6,17,1,31,111,5,107,2,
+            6,105,62,6,121,80,7,6,2,2,
+            6,6,6,6,6,6,6,6,108,6,
+            5,6,6,6,6,6,6,6,6,6,
+            6,6,6,6,6,6,6,2,6,123,
+            6,6,6,6,6,6,6,6,2,2,
+            11,6,6,6,6,6,6,7,2,111,
+            125,2,110,7,6,6,6,6,6,6,
+            6,6,98,13,13,13,13,6,6,49,
+            13,13,13,13,119,6,6,6,2,127,
+            62,115,5,129,23,119,7,2,2,108,
+            2,2,6,2,2,2,2,2,2,2,
+            2,2,2,6,2,6,2,6,6,6,
+            131,6,41,41,41,133,6,135,5,6,
+            119,2,2,135,2,133,133,2,6,2,
+            6,6,137,6,6,139,43,2,6,6,
+            6,141,6,143,143,143,143,71,5,62,
+            6,6,6,6,6,6,145,6,6,6,
+            6,6,6,123,123,6,6,6,7,6,
+            6,6,7,108,125,6,6,6,6,6,
+            2,6,6,6,6,100,145,113,26,125,
+            147,2,26,26,7,149,6,6,6,41,
+            6,2,6,6,6,6,6,6,6,26,
+            26,26,151,2,6,6,6,26,6
+        };
+    };
+    public final static char nasb[] = Nasb.nasb;
+    public final int nasb(int index) { return nasb[index]; }
+
+    public interface Nasr {
+        public final static char nasr[] = {0,
+            138,13,14,6,3,0,53,26,0,90,
+            1,0,52,0,79,0,6,3,13,14,
+            141,0,3,101,100,54,0,60,71,0,
+            3,131,132,0,60,96,0,3,5,127,
+            4,0,4,136,0,1,147,0,133,135,
+            0,60,94,95,0,92,91,0,144,88,
+            0,63,64,60,0,3,81,0,98,0,
+            114,115,0,122,0,123,0,124,0,78,
+            0,130,0,125,0,128,0,57,129,0,
+            56,126,0,118,0,119,0,139,0,67,
+            66,0,93,0,120,0,82,56,0,83,
+            57,0,146,0,75,0,97,0,58,0,
+            99,0,69,0,68,0,121,0,76,0,
+            87,0,70,0,86,0,140,0,134,0,
+            109,0,65,0,77,0,111,0,110,0,
+            142,0
+        };
+    };
+    public final static char nasr[] = Nasr.nasr;
+    public final int nasr(int index) { return nasr[index]; }
+
+    public interface TerminalIndex {
+        public final static char terminalIndex[] = {0,
+            71,129,53,76,81,82,117,118,122,36,
+            37,38,39,42,48,49,50,51,54,55,
+            56,57,58,59,60,61,62,63,64,65,
+            66,67,68,69,70,72,73,74,75,77,
+            78,79,80,83,84,85,86,87,88,89,
+            90,91,92,93,94,95,119,120,121,21,
+            22,35,41,52,96,97,98,99,100,101,
+            102,103,104,105,106,107,108,109,110,111,
+            112,113,114,115,116,126,128,10,138,127,
+            131,27,31,123,124,125,9,24,32,44,
+            45,46,47,11,23,6,18,33,40,43,
+            130,1,2,3,4,5,7,12,15,19,
+            20,28,30,8,13,14,16,17,25,26,
+            29,132,133,134,135,136,137
+        };
+    };
+    public final static char terminalIndex[] = TerminalIndex.terminalIndex;
+    public final int terminalIndex(int index) { return terminalIndex[index]; }
+
+    public interface NonterminalIndex {
+        public final static char nonterminalIndex[] = {0,
+            143,0,141,175,182,207,0,0,174,0,
+            0,0,183,184,0,0,0,0,0,173,
+            172,170,169,168,167,185,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,200,206,154,155,159,190,0,215,216,
+            0,214,146,152,162,166,0,0,171,0,
+            145,0,0,0,0,149,0,157,163,0,
+            179,181,189,0,191,192,194,210,213,218,
+            139,0,0,140,142,144,147,148,0,150,
+            151,0,0,0,0,0,0,0,153,156,
+            158,0,0,160,161,0,0,164,165,0,
+            0,176,0,177,178,180,186,187,188,193,
+            195,196,197,0,198,199,201,202,0,203,
+            204,205,208,209,211,212,217,0
+        };
+    };
+    public final static char nonterminalIndex[] = NonterminalIndex.nonterminalIndex;
+    public final int nonterminalIndex(int index) { return nonterminalIndex[index]; }
+
+    public interface ScopePrefix {
+        public final static byte scopePrefix[] = {
+            12,37,41,18,25,29,1,45,48,6,
+            33
+        };
+    };
+    public final static byte scopePrefix[] = ScopePrefix.scopePrefix;
+    public final int scopePrefix(int index) { return scopePrefix[index]; }
+
+    public interface ScopeSuffix {
+        public final static byte scopeSuffix[] = {
+            9,4,4,22,22,22,4,4,51,9,
+            35
+        };
+    };
+    public final static byte scopeSuffix[] = ScopeSuffix.scopeSuffix;
+    public final int scopeSuffix(int index) { return scopeSuffix[index]; }
+
+    public interface ScopeLhs {
+        public final static char scopeLhs[] = {
+            28,12,12,40,45,39,56,9,76,29,
+            66
+        };
+    };
+    public final static char scopeLhs[] = ScopeLhs.scopeLhs;
+    public final int scopeLhs(int index) { return scopeLhs[index]; }
+
+    public interface ScopeLa {
+        public final static char scopeLa[] = {
+            43,61,61,98,98,98,61,61,98,43,
+            21
+        };
+    };
+    public final static char scopeLa[] = ScopeLa.scopeLa;
+    public final int scopeLa(int index) { return scopeLa[index]; }
+
+    public interface ScopeStateSet {
+        public final static byte scopeStateSet[] = {
+            59,6,6,59,59,59,51,6,48,59,
+            1
+        };
+    };
+    public final static byte scopeStateSet[] = ScopeStateSet.scopeStateSet;
+    public final int scopeStateSet(int index) { return scopeStateSet[index]; }
+
+    public interface ScopeRhs {
+        public final static char scopeRhs[] = {0,
+            282,60,0,22,0,163,42,0,80,185,
+            0,163,61,192,60,41,0,203,105,34,
+            0,24,0,0,203,105,57,0,203,105,
+            33,0,204,0,185,0,159,60,151,0,
+            159,60,150,0,192,60,0,236,105,0,
+            24,0
+        };
+    };
+    public final static char scopeRhs[] = ScopeRhs.scopeRhs;
+    public final int scopeRhs(int index) { return scopeRhs[index]; }
+
+    public interface ScopeState {
+        public final static char scopeState[] = {0,
+            1891,1837,1821,1799,0,1590,1567,1247,1544,1521,
+            1498,1475,1432,1409,1386,1191,1165,1363,637,533,
+            1057,1635,1613,1139,1678,1657,588,949,897,1303,
+            1273,845,419,393,793,741,1109,1719,1699,1329,
+            449,1221,689,1083,1027,1001,0,1938,1781,0,
+            1986,1948,1932,1889,1923,1244,1794,0,947,895,
+            843,791,739,687,635,583,531,479,0
+        };
+    };
+    public final static char scopeState[] = ScopeState.scopeState;
+    public final int scopeState(int index) { return scopeState[index]; }
+
+    public interface InSymb {
+        public final static char inSymb[] = {0,
+            0,228,229,10,230,140,198,197,199,11,
+            99,12,60,140,138,284,138,105,93,108,
+            233,198,20,19,15,212,138,138,138,13,
+            216,60,259,60,107,216,138,108,281,225,
+            260,123,140,108,234,60,42,41,27,26,
+            25,24,23,22,21,59,57,38,37,40,
+            35,34,33,190,49,46,6,5,93,194,
+            105,140,93,105,108,280,215,163,60,60,
+            60,60,264,141,142,2,140,62,86,140,
+            60,105,221,226,194,221,266,194,105,105,
+            189,60,189,60,60,60,225,123,263,60,
+            193,256,16,235,105,93,43,192,104,88,
+            87,71,70,69,68,66,67,65,142,143,
+            14,151,150,85,84,83,82,81,80,79,
+            78,77,76,75,74,73,72,60,158,160,
+            159,162,161,265,192,159,192,159,108,108,
+            99,193,267,58,6,5,203,204,39,93,
+            195,39,93,1,195,203,203,159,278,159,
+            275,274,159,103,102,101,100,269,268,140,
+            103,102,101,100,194,140,282,159,108,257,
+            17,198,14,109,236,215,61,3,106,140,
+            60,60,192,118,107,119,206,88,97,117,
+            115,112,93,61,93,61,93,159,159,138,
+            93,61,60,60,60,98,163,222,64,192,
+            194,36,1,222,108,98,98,93,61,93,
+            61,61,93,61,61,270,60,93,159,258,
+            18,140,238,101,100,103,102,140,14,63,
+            2,110,191,163,162,162,193,159,159,159,
+            158,158,161,160,160,159,192,192,4,141,
+            141,141,4,140,195,159,159,159,159,159,
+            1,273,141,2,159,105,246,60,60,251,
+            60,60,116,108,43,122,61,61,61,93,
+            159,93,203,283,191,248,192,141,159,93,
+            93,93,93,93,191,191,159,93,191
+        };
+    };
+    public final static char inSymb[] = InSymb.inSymb;
+    public final int inSymb(int index) { return inSymb[index]; }
+
+    public interface Name {
+        public final static String name[] = {
+            "",
+            "==",
+            "<=",
+            ">=",
+            "!=",
+            "=/=",
+            "||",
+            "&&",
+            "->",
+            "+",
+            "-",
+            "!",
+            "%",
+            "^",
+            "&",
+            "*",
+            "|",
+            "~",
+            "/",
+            ">",
+            "<",
+            "(",
+            ")",
+            "{",
+            "}",
+            "[",
+            "]",
+            ";",
+            "#",
+            "?",
+            ":",
+            ",",
+            ".",
+            "=",
+            "$empty",
+            "IDENTIFIER",
+            "namespace",
+            "import",
+            "machine",
+            "pattern",
+            "or",
+            "neg",
+            "find",
+            "check",
+            "supertypeOf",
+            "subtypeOf",
+            "typeOf",
+            "instanceOf",
+            "gtrule",
+            "precondition",
+            "postcondition",
+            "action",
+            "apply",
+            "xor",
+            "asmfunction",
+            "rule",
+            "skip",
+            "fail",
+            "call",
+            "update",
+            "print",
+            "println",
+            "log",
+            "debug",
+            "info",
+            "warning",
+            "error",
+            "fatal",
+            "seq",
+            "random",
+            "let",
+            "in",
+            "below",
+            "choose",
+            "forall",
+            "with",
+            "do",
+            "iterate",
+            "if",
+            "try",
+            "else",
+            "new",
+            "delete",
+            "delete_content",
+            "move_content",
+            "copy",
+            "copy_boundary_edges",
+            "skip_boundary_edges",
+            "move",
+            "rename",
+            "setValue",
+            "setFrom",
+            "setTo",
+            "setMultiplicity",
+            "setAggregation",
+            "setInverse",
+            "undef",
+            "true",
+            "false",
+            "one_to_one",
+            "one_to_many",
+            "many_to_one",
+            "many_to_many",
+            "ref",
+            "fqn",
+            "name",
+            "value",
+            "source",
+            "target",
+            "multiplicity",
+            "aggregation",
+            "inverse",
+            "toBoolean",
+            "toString",
+            "toInteger",
+            "toDouble",
+            "toMultiplicity",
+            "out",
+            "inout",
+            "parallel",
+            "changed",
+            "when",
+            "shareable",
+            "IntegerLiteral",
+            "FloatingPointLiteral",
+            "DoubleLiteral",
+            "NameLiteral",
+            "AnnotationLiteral",
+            "StringLiteral",
+            "UpperCaseLiteral",
+            "DummyVariableLiteral",
+            "DecimalIntegerLiteral",
+            "EOF_TOKEN",
+            "SlComment",
+            "MlComment",
+            "DocComment",
+            "LEFT_SHIFT",
+            "RIGHT_SHIFT",
+            "ERROR_TOKEN",
+            "VTCLFile",
+            "GTASMDefAST",
+            "QualifiedTypeNameAST",
+            "NamespaceImportAST",
+            "TypeNameAST",
+            "MachineContentsAST",
+            "MachineContentAST",
+            "GraphPatternDefAST",
+            "FormalParameterDefAST",
+            "PatternBodiesAST",
+            "PatternBodyAST",
+            "PatternBodyContentDefAST",
+            "PatternBodyContentAST",
+            "PatternCompositionAST",
+            "ActualPatternParameterDefAST",
+            "PatternVariableRefAST",
+            "LogicalTermAST",
+            "CounterVariableAST",
+            "PatternVariableDefAST",
+            "PatternVariableDefRefAST",
+            "ActualParameterDefAST",
+            "EntityBody",
+            "RelationBodyAST",
+            "RelationshipBodyAST",
+            "DirectedFormalParameterDefAST",
+            "GTRuleBodyAST",
+            "PreconditionDefAST",
+            "AsmRulesAST",
+            "LogicalAndTermAST",
+            "EqualityTermAST",
+            "RelationalTermAST",
+            "ArithmeticTermAST",
+            "RelationalOpAST",
+            "MultArithmeticTermAST",
+            "UnaryArithmeticTermAST",
+            "BaseArithmeticTermAST",
+            "VariableRefAST",
+            "ArityOrTypeDeclAST",
+            "InitialValuesOptAST",
+            "ArityAST",
+            "TypeConstantsAST",
+            "InitialValuesAST",
+            "InitialValueAST",
+            "ASMFunctionNameAST",
+            "BuiltInFunctionNameAST",
+            "ConversionFunctionNameAST",
+            "AsmRuleAST",
+            "AsmFunctionUpdateLocationAST",
+            "LogLevelAST",
+            "VariableDefinitionsAST",
+            "VariableDefinitionAST",
+            "VariableDefAST",
+            "ConditionAST",
+            "DoActionOptAST",
+            "WhenConditionAST",
+            "WhenChangeAST",
+            "CreateModelElementAST",
+            "CreateRelationshipAST",
+            "CreateEntityBodyAST",
+            "CreateRelationBodyAST",
+            "VariableDefRefAST",
+            "TwoParametersAST",
+            "DeleteContentsAST",
+            "DeleteRelationshipAST",
+            "DeleteSemanticsAST",
+            "CopyContentsAST",
+            "CopySemanticsAST",
+            "ElementUpdateOpAST",
+            "ValueQualifiedNameAST",
+            "FormalParamsAST",
+            "DirectedFormalParamsAST",
+            "DirectionKindAST",
+            "ActualParamsAST",
+            "ActualParamsPatternVariablesAS" +
+            "T",
+            "ConstrainedVariablesAST",
+            "AnnotationsAST",
+            "AnnotationAST",
+            "AnnotationNameAST",
+            "AnnotationBodyAST",
+            "KeyValuePairAST"
+        };
+    };
+    public final static String name[] = Name.name;
+    public final String name(int index) { return name[index]; }
+
+    public final static int
+           ERROR_SYMBOL      = 89,
+           SCOPE_UBOUND      = 10,
+           SCOPE_SIZE        = 11,
+           MAX_NAME_LENGTH   = 31;
+
+    public final int getErrorSymbol() { return ERROR_SYMBOL; }
+    public final int getScopeUbound() { return SCOPE_UBOUND; }
+    public final int getScopeSize() { return SCOPE_SIZE; }
+    public final int getMaxNameLength() { return MAX_NAME_LENGTH; }
+
+    public final static int
+           NUM_STATES        = 339,
+           NT_OFFSET         = 137,
+           LA_STATE_OFFSET   = 2600,
+           MAX_LA            = 1,
+           NUM_RULES         = 392,
+           NUM_NONTERMINALS  = 148,
+           NUM_SYMBOLS       = 285,
+           SEGMENT_SIZE      = 8192,
+           START_STATE       = 1769,
+           IDENTIFIER_SYMBOL = 0,
+           EOFT_SYMBOL       = 132,
+           EOLT_SYMBOL       = 132,
+           ACCEPT_ACTION     = 2201,
+           ERROR_ACTION      = 2208;
+
+    public final static boolean BACKTRACK = true;
+
+    public final int getNumStates() { return NUM_STATES; }
+    public final int getNtOffset() { return NT_OFFSET; }
+    public final int getLaStateOffset() { return LA_STATE_OFFSET; }
+    public final int getMaxLa() { return MAX_LA; }
+    public final int getNumRules() { return NUM_RULES; }
+    public final int getNumNonterminals() { return NUM_NONTERMINALS; }
+    public final int getNumSymbols() { return NUM_SYMBOLS; }
+    public final int getSegmentSize() { return SEGMENT_SIZE; }
+    public final int getStartState() { return START_STATE; }
+    public final int getStartSymbol() { return lhs[0]; }
+    public final int getIdentifierSymbol() { return IDENTIFIER_SYMBOL; }
+    public final int getEoftSymbol() { return EOFT_SYMBOL; }
+    public final int getEoltSymbol() { return EOLT_SYMBOL; }
+    public final int getAcceptAction() { return ACCEPT_ACTION; }
+    public final int getErrorAction() { return ERROR_ACTION; }
+    public final boolean isValidForParser() { return isValidForParser; }
+    public final boolean getBacktrack() { return BACKTRACK; }
+
+    public final int originalState(int state) {
+        return -baseCheck[state];
+    }
+    public final int asi(int state) {
+        return asb[originalState(state)];
+    }
+    public final int nasi(int state) {
+        return nasb[originalState(state)];
+    }
+    public final int inSymbol(int state) {
+        return inSymb[originalState(state)];
+    }
+
+    public final int ntAction(int state, int sym) {
+        return baseAction[state + sym];
+    }
+
+    public final int tAction(int state, int sym) {
+        if (sym == 0)
+            return ERROR_ACTION;
+        int i = baseAction[state],
+            k = i + sym;
+        if (termCheck[k] == sym)
+            return termAction[k];
+        i = termAction[i];
+        return (shiftCheck[shiftState[i] + sym] == sym
+                                ? defaultShift[sym]
+                                : defaultReduce[i]);
+    }
+    public final int lookAhead(int la_state, int sym) {
+        int k = la_state + sym;
+        if (termCheck[k] == sym)
+            return termAction[k];
+        int i = termAction[la_state];
+        return (shiftCheck[shiftState[i] + sym] == sym
+                                ? defaultShift[sym]
+                                : defaultReduce[i]);
+    }
+}
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLParsersym.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLParsersym.java
new file mode 100644
index 0000000..c23e73a
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/VTCLParsersym.java
@@ -0,0 +1,299 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser;
+
+public interface VTCLParsersym {
+    public final static int
+      TK_IDENTIFIER = 62,
+      TK_namespace = 10,
+      TK_import = 11,
+      TK_machine = 12,
+      TK_pattern = 13,
+      TK_or = 109,
+      TK_neg = 63,
+      TK_find = 14,
+      TK_check = 110,
+      TK_supertypeOf = 100,
+      TK_subtypeOf = 101,
+      TK_typeOf = 102,
+      TK_instanceOf = 103,
+      TK_gtrule = 15,
+      TK_precondition = 16,
+      TK_postcondition = 17,
+      TK_action = 18,
+      TK_apply = 64,
+      TK_xor = 3,
+      TK_asmfunction = 19,
+      TK_rule = 20,
+      TK_skip = 21,
+      TK_fail = 22,
+      TK_call = 23,
+      TK_update = 24,
+      TK_print = 25,
+      TK_println = 26,
+      TK_log = 27,
+      TK_debug = 28,
+      TK_info = 29,
+      TK_warning = 30,
+      TK_error = 31,
+      TK_fatal = 32,
+      TK_seq = 33,
+      TK_random = 34,
+      TK_let = 35,
+      TK_in = 1,
+      TK_below = 36,
+      TK_choose = 37,
+      TK_forall = 38,
+      TK_with = 39,
+      TK_do = 4,
+      TK_iterate = 40,
+      TK_if = 41,
+      TK_try = 42,
+      TK_else = 43,
+      TK_new = 5,
+      TK_delete = 6,
+      TK_delete_content = 44,
+      TK_move_content = 45,
+      TK_copy = 46,
+      TK_copy_boundary_edges = 47,
+      TK_skip_boundary_edges = 48,
+      TK_move = 49,
+      TK_rename = 50,
+      TK_setValue = 51,
+      TK_setFrom = 52,
+      TK_setTo = 53,
+      TK_setMultiplicity = 54,
+      TK_setAggregation = 55,
+      TK_setInverse = 56,
+      TK_undef = 65,
+      TK_true = 66,
+      TK_false = 67,
+      TK_one_to_one = 68,
+      TK_one_to_many = 69,
+      TK_many_to_one = 70,
+      TK_many_to_many = 71,
+      TK_ref = 72,
+      TK_fqn = 73,
+      TK_name = 74,
+      TK_value = 75,
+      TK_source = 76,
+      TK_target = 77,
+      TK_multiplicity = 78,
+      TK_aggregation = 79,
+      TK_inverse = 80,
+      TK_toBoolean = 81,
+      TK_toString = 82,
+      TK_toInteger = 83,
+      TK_toDouble = 84,
+      TK_toMultiplicity = 85,
+      TK_out = 7,
+      TK_inout = 8,
+      TK_parallel = 57,
+      TK_changed = 58,
+      TK_when = 59,
+      TK_shareable = 9,
+      TK_IntegerLiteral = 94,
+      TK_FloatingPointLiteral = 95,
+      TK_DoubleLiteral = 96,
+      TK_NameLiteral = 86,
+      TK_AnnotationLiteral = 90,
+      TK_StringLiteral = 87,
+      TK_UpperCaseLiteral = 2,
+      TK_DummyVariableLiteral = 111,
+      TK_DecimalIntegerLiteral = 91,
+      TK_EQUAL_EQUAL = 112,
+      TK_LESS_EQUAL = 113,
+      TK_GREATER_EQUAL = 114,
+      TK_NOT_EQUAL = 115,
+      TK_NONINJECTIVE = 116,
+      TK_OR_OR = 106,
+      TK_AND_AND = 117,
+      TK_RIGHTARROW = 124,
+      TK_PLUS = 97,
+      TK_MINUS = 88,
+      TK_NOT = 104,
+      TK_REMAINDER = 118,
+      TK_XOR = 125,
+      TK_AND = 126,
+      TK_MULTIPLY = 119,
+      TK_OR = 127,
+      TK_TWIDDLE = 128,
+      TK_DIVIDE = 107,
+      TK_GREATER = 120,
+      TK_LESS = 121,
+      TK_LPAREN = 60,
+      TK_RPAREN = 61,
+      TK_LBRACE = 105,
+      TK_RBRACE = 98,
+      TK_LBRACKET = 129,
+      TK_RBRACKET = 130,
+      TK_SEMICOLON = 92,
+      TK_HASHMARK = 122,
+      TK_QUESTION = 131,
+      TK_COLON = 123,
+      TK_COMMA = 93,
+      TK_DOT = 99,
+      TK_EQUAL = 108,
+      TK_EOF_TOKEN = 132,
+      TK_SlComment = 133,
+      TK_MlComment = 134,
+      TK_DocComment = 135,
+      TK_LEFT_SHIFT = 136,
+      TK_RIGHT_SHIFT = 137,
+      TK_ERROR_TOKEN = 89;
+
+      public final static String orderedTerminalSymbols[] = {
+                 "",
+                 "in",
+                 "UpperCaseLiteral",
+                 "xor",
+                 "do",
+                 "new",
+                 "delete",
+                 "out",
+                 "inout",
+                 "shareable",
+                 "namespace",
+                 "import",
+                 "machine",
+                 "pattern",
+                 "find",
+                 "gtrule",
+                 "precondition",
+                 "postcondition",
+                 "action",
+                 "asmfunction",
+                 "rule",
+                 "skip",
+                 "fail",
+                 "call",
+                 "update",
+                 "print",
+                 "println",
+                 "log",
+                 "debug",
+                 "info",
+                 "warning",
+                 "error",
+                 "fatal",
+                 "seq",
+                 "random",
+                 "let",
+                 "below",
+                 "choose",
+                 "forall",
+                 "with",
+                 "iterate",
+                 "if",
+                 "try",
+                 "else",
+                 "delete_content",
+                 "move_content",
+                 "copy",
+                 "copy_boundary_edges",
+                 "skip_boundary_edges",
+                 "move",
+                 "rename",
+                 "setValue",
+                 "setFrom",
+                 "setTo",
+                 "setMultiplicity",
+                 "setAggregation",
+                 "setInverse",
+                 "parallel",
+                 "changed",
+                 "when",
+                 "LPAREN",
+                 "RPAREN",
+                 "IDENTIFIER",
+                 "neg",
+                 "apply",
+                 "undef",
+                 "true",
+                 "false",
+                 "one_to_one",
+                 "one_to_many",
+                 "many_to_one",
+                 "many_to_many",
+                 "ref",
+                 "fqn",
+                 "name",
+                 "value",
+                 "source",
+                 "target",
+                 "multiplicity",
+                 "aggregation",
+                 "inverse",
+                 "toBoolean",
+                 "toString",
+                 "toInteger",
+                 "toDouble",
+                 "toMultiplicity",
+                 "NameLiteral",
+                 "StringLiteral",
+                 "MINUS",
+                 "ERROR_TOKEN",
+                 "AnnotationLiteral",
+                 "DecimalIntegerLiteral",
+                 "SEMICOLON",
+                 "COMMA",
+                 "IntegerLiteral",
+                 "FloatingPointLiteral",
+                 "DoubleLiteral",
+                 "PLUS",
+                 "RBRACE",
+                 "DOT",
+                 "supertypeOf",
+                 "subtypeOf",
+                 "typeOf",
+                 "instanceOf",
+                 "NOT",
+                 "LBRACE",
+                 "OR_OR",
+                 "DIVIDE",
+                 "EQUAL",
+                 "or",
+                 "check",
+                 "DummyVariableLiteral",
+                 "EQUAL_EQUAL",
+                 "LESS_EQUAL",
+                 "GREATER_EQUAL",
+                 "NOT_EQUAL",
+                 "NONINJECTIVE",
+                 "AND_AND",
+                 "REMAINDER",
+                 "MULTIPLY",
+                 "GREATER",
+                 "LESS",
+                 "HASHMARK",
+                 "COLON",
+                 "RIGHTARROW",
+                 "XOR",
+                 "AND",
+                 "OR",
+                 "TWIDDLE",
+                 "LBRACKET",
+                 "RBRACKET",
+                 "QUESTION",
+                 "EOF_TOKEN",
+                 "SlComment",
+                 "MlComment",
+                 "DocComment",
+                 "LEFT_SHIFT",
+                 "RIGHT_SHIFT"
+             };
+
+    public final static boolean isValidForParser = true;
+}
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ASTNode.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ASTNode.java
new file mode 100644
index 0000000..73657dc
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ASTNode.java
@@ -0,0 +1,55 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+public abstract class ASTNode
+{
+    protected ASTNode parent = null;
+    protected IToken leftIToken,
+                     rightIToken;
+    protected void setParent(ASTNode parent) { this.parent = parent; }
+    public ASTNode getParent() { return parent; }
+    public IToken getLeftIToken() { return leftIToken; }
+    public IToken getRightIToken() { return rightIToken; }
+    public IToken[] getPrecedingAdjuncts() { return leftIToken.getPrecedingAdjuncts(); }
+    public IToken[] getFollowingAdjuncts() { return rightIToken.getPrecedingAdjuncts(); }
+    public String toString()
+    {
+        PrsStream prsStream = leftIToken.getPrsStream();
+        return new String(prsStream.getInputChars(),
+                          leftIToken.getStartOffset(),
+                          rightIToken.getEndOffset() - leftIToken.getStartOffset() + 1);
+    }
+    public ASTNode(IToken token) { this.leftIToken = this.rightIToken = token; }
+    public ASTNode(IToken leftIToken, IToken rightIToken)
+    {
+        this.leftIToken = leftIToken;
+        this.rightIToken = rightIToken;
+    }
+    void initialize() {}
+    /**
+     * Since the Ast type has no children, any two instances of it are equal.
+     */
+    public boolean equals(Object o) { return o instanceof ASTNode; }
+    public abstract int hashCode();
+    public abstract void accept(Visitor v);
+    public abstract void accept(ArgumentVisitor v, Object o);
+    public abstract Object accept(ResultVisitor v);
+    public abstract Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ASTNodeList.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ASTNodeList.java
new file mode 100644
index 0000000..2455c00
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ASTNodeList.java
@@ -0,0 +1,65 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+public abstract class ASTNodeList extends ASTNode
+{
+    private boolean leftRecursive;
+    private java.util.ArrayList list;
+    public int size() { return list.size(); }
+    public ASTNode getElementAt(int i) { return (ASTNode) list.get(leftRecursive ? i : list.size() - 1 - i); }
+    public java.util.ArrayList getArrayList()
+    {
+        if (! leftRecursive) // reverse the list 
+        {
+            for (int i = 0, n = list.size() - 1; i < n; i++, n--)
+            {
+                Object ith = list.get(i),
+                       nth = list.get(n);
+                list.set(i, nth);
+                list.set(n, ith);
+            }
+            leftRecursive = true;
+        }
+        return list;
+    }
+    public void add(ASTNode element)
+    {
+        list.add(element);
+        if (leftRecursive)
+             rightIToken = element.getRightIToken();
+        else leftIToken = element.getLeftIToken();
+    }
+
+    public ASTNodeList(IToken leftIToken, IToken rightIToken, boolean leftRecursive)
+    {
+        super(leftIToken, rightIToken);
+        this.leftRecursive = leftRecursive;
+        list = new java.util.ArrayList();
+    }
+
+    public ASTNodeList(ASTNode element, boolean leftRecursive)
+    {
+        this(element.getLeftIToken(), element.getRightIToken(), leftRecursive);
+        list.add(element);
+    }
+
+    public abstract boolean equals(Object o);
+    public abstract int hashCode();
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ASTNodeToken.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ASTNodeToken.java
new file mode 100644
index 0000000..e9bf0c0
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ASTNodeToken.java
@@ -0,0 +1,45 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+public class ASTNodeToken extends ASTNode implements IASTNodeToken
+{
+    public ASTNodeToken(IToken token) { super(token); }
+    public IToken getIToken() { return leftIToken; }
+    public String toString() { return leftIToken.toString(); }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        if (! (o instanceof ASTNodeToken)) return false;
+        ASTNodeToken other = (ASTNodeToken) o;
+        return toString().equals(other.toString());
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AbstractResultVisitor.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AbstractResultVisitor.java
new file mode 100644
index 0000000..86f5f45
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AbstractResultVisitor.java
@@ -0,0 +1,606 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+public abstract class AbstractResultVisitor implements ResultVisitor, ResultArgumentVisitor
+{
+    public abstract Object unimplementedVisitor(String s);
+
+    public Object visit(ASTNodeToken n) { return unimplementedVisitor("visit(ASTNodeToken)"); }
+    public Object visit(ASTNodeToken n, Object o) { return  unimplementedVisitor("visit(ASTNodeToken, Object)"); }
+
+    public Object visit(VTCLFile n) { return unimplementedVisitor("visit(VTCLFile)"); }
+    public Object visit(VTCLFile n, Object o) { return  unimplementedVisitor("visit(VTCLFile, Object)"); }
+
+    public Object visit(NamespaceDefAST n) { return unimplementedVisitor("visit(NamespaceDefAST)"); }
+    public Object visit(NamespaceDefAST n, Object o) { return  unimplementedVisitor("visit(NamespaceDefAST, Object)"); }
+
+    public Object visit(NamespaceImportsAST n) { return unimplementedVisitor("visit(NamespaceImportsAST)"); }
+    public Object visit(NamespaceImportsAST n, Object o) { return  unimplementedVisitor("visit(NamespaceImportsAST, Object)"); }
+
+    public Object visit(GTASMDefAST n) { return unimplementedVisitor("visit(GTASMDefAST)"); }
+    public Object visit(GTASMDefAST n, Object o) { return  unimplementedVisitor("visit(GTASMDefAST, Object)"); }
+
+    public Object visit(MachineContentsAST n) { return unimplementedVisitor("visit(MachineContentsAST)"); }
+    public Object visit(MachineContentsAST n, Object o) { return  unimplementedVisitor("visit(MachineContentsAST, Object)"); }
+
+    public Object visit(MachineContentAST n) { return unimplementedVisitor("visit(MachineContentAST)"); }
+    public Object visit(MachineContentAST n, Object o) { return  unimplementedVisitor("visit(MachineContentAST, Object)"); }
+
+    public Object visit(GraphPatternDefAST n) { return unimplementedVisitor("visit(GraphPatternDefAST)"); }
+    public Object visit(GraphPatternDefAST n, Object o) { return  unimplementedVisitor("visit(GraphPatternDefAST, Object)"); }
+
+    public Object visit(OptShareableDefAST n) { return unimplementedVisitor("visit(OptShareableDefAST)"); }
+    public Object visit(OptShareableDefAST n, Object o) { return  unimplementedVisitor("visit(OptShareableDefAST, Object)"); }
+
+    public Object visit(PatternBodiesAST n) { return unimplementedVisitor("visit(PatternBodiesAST)"); }
+    public Object visit(PatternBodiesAST n, Object o) { return  unimplementedVisitor("visit(PatternBodiesAST, Object)"); }
+
+    public Object visit(PatternBodyAST n) { return unimplementedVisitor("visit(PatternBodyAST)"); }
+    public Object visit(PatternBodyAST n, Object o) { return  unimplementedVisitor("visit(PatternBodyAST, Object)"); }
+
+    public Object visit(PatternBodyContentsAST n) { return unimplementedVisitor("visit(PatternBodyContentsAST)"); }
+    public Object visit(PatternBodyContentsAST n, Object o) { return  unimplementedVisitor("visit(PatternBodyContentsAST, Object)"); }
+
+    public Object visit(PatternBodyContentAST n) { return unimplementedVisitor("visit(PatternBodyContentAST)"); }
+    public Object visit(PatternBodyContentAST n, Object o) { return  unimplementedVisitor("visit(PatternBodyContentAST, Object)"); }
+
+    public Object visit(NegativePatternAST n) { return unimplementedVisitor("visit(NegativePatternAST)"); }
+    public Object visit(NegativePatternAST n, Object o) { return  unimplementedVisitor("visit(NegativePatternAST, Object)"); }
+
+    public Object visit(PatternCompositionAST n) { return unimplementedVisitor("visit(PatternCompositionAST)"); }
+    public Object visit(PatternCompositionAST n, Object o) { return  unimplementedVisitor("visit(PatternCompositionAST, Object)"); }
+
+    public Object visit(PatternVariableAssignmentAST n) { return unimplementedVisitor("visit(PatternVariableAssignmentAST)"); }
+    public Object visit(PatternVariableAssignmentAST n, Object o) { return  unimplementedVisitor("visit(PatternVariableAssignmentAST, Object)"); }
+
+    public Object visit(NonInjectivityConstraintAST n) { return unimplementedVisitor("visit(NonInjectivityConstraintAST)"); }
+    public Object visit(NonInjectivityConstraintAST n, Object o) { return  unimplementedVisitor("visit(NonInjectivityConstraintAST, Object)"); }
+
+    public Object visit(CheckConditionAST n) { return unimplementedVisitor("visit(CheckConditionAST)"); }
+    public Object visit(CheckConditionAST n, Object o) { return  unimplementedVisitor("visit(CheckConditionAST, Object)"); }
+
+    public Object visit(OptMatchCountAST n) { return unimplementedVisitor("visit(OptMatchCountAST)"); }
+    public Object visit(OptMatchCountAST n, Object o) { return  unimplementedVisitor("visit(OptMatchCountAST, Object)"); }
+
+    public Object visit(PatternVariableDefAST n) { return unimplementedVisitor("visit(PatternVariableDefAST)"); }
+    public Object visit(PatternVariableDefAST n, Object o) { return  unimplementedVisitor("visit(PatternVariableDefAST, Object)"); }
+
+    public Object visit(PatternVariableRefAST n) { return unimplementedVisitor("visit(PatternVariableRefAST)"); }
+    public Object visit(PatternVariableRefAST n, Object o) { return  unimplementedVisitor("visit(PatternVariableRefAST, Object)"); }
+
+    public Object visit(CounterVariableAST n) { return unimplementedVisitor("visit(CounterVariableAST)"); }
+    public Object visit(CounterVariableAST n, Object o) { return  unimplementedVisitor("visit(CounterVariableAST, Object)"); }
+
+    public Object visit(GraphPatternCallAST n) { return unimplementedVisitor("visit(GraphPatternCallAST)"); }
+    public Object visit(GraphPatternCallAST n, Object o) { return  unimplementedVisitor("visit(GraphPatternCallAST, Object)"); }
+
+    public Object visit(EntityAST n) { return unimplementedVisitor("visit(EntityAST)"); }
+    public Object visit(EntityAST n, Object o) { return  unimplementedVisitor("visit(EntityAST, Object)"); }
+
+    public Object visit(EntityBody n) { return unimplementedVisitor("visit(EntityBody)"); }
+    public Object visit(EntityBody n, Object o) { return  unimplementedVisitor("visit(EntityBody, Object)"); }
+
+    public Object visit(RelationAST n) { return unimplementedVisitor("visit(RelationAST)"); }
+    public Object visit(RelationAST n, Object o) { return  unimplementedVisitor("visit(RelationAST, Object)"); }
+
+    public Object visit(RelationBodyAST n) { return unimplementedVisitor("visit(RelationBodyAST)"); }
+    public Object visit(RelationBodyAST n, Object o) { return  unimplementedVisitor("visit(RelationBodyAST, Object)"); }
+
+    public Object visit(RelationshipBodyAST n) { return unimplementedVisitor("visit(RelationshipBodyAST)"); }
+    public Object visit(RelationshipBodyAST n, Object o) { return  unimplementedVisitor("visit(RelationshipBodyAST, Object)"); }
+
+    public Object visit(GTRuleDefAST n) { return unimplementedVisitor("visit(GTRuleDefAST)"); }
+    public Object visit(GTRuleDefAST n, Object o) { return  unimplementedVisitor("visit(GTRuleDefAST, Object)"); }
+
+    public Object visit(ActionOptAST n) { return unimplementedVisitor("visit(ActionOptAST)"); }
+    public Object visit(ActionOptAST n, Object o) { return  unimplementedVisitor("visit(ActionOptAST, Object)"); }
+
+    public Object visit(GTRuleCallAST n) { return unimplementedVisitor("visit(GTRuleCallAST)"); }
+    public Object visit(GTRuleCallAST n, Object o) { return  unimplementedVisitor("visit(GTRuleCallAST, Object)"); }
+
+    public Object visit(LogicalAndTermAST n) { return unimplementedVisitor("visit(LogicalAndTermAST)"); }
+    public Object visit(LogicalAndTermAST n, Object o) { return  unimplementedVisitor("visit(LogicalAndTermAST, Object)"); }
+
+    public Object visit(RelationalTermAST n) { return unimplementedVisitor("visit(RelationalTermAST)"); }
+    public Object visit(RelationalTermAST n, Object o) { return  unimplementedVisitor("visit(RelationalTermAST, Object)"); }
+
+    public Object visit(RelationalOpAST n) { return unimplementedVisitor("visit(RelationalOpAST)"); }
+    public Object visit(RelationalOpAST n, Object o) { return  unimplementedVisitor("visit(RelationalOpAST, Object)"); }
+
+    public Object visit(BaseArithmeticTermAST n) { return unimplementedVisitor("visit(BaseArithmeticTermAST)"); }
+    public Object visit(BaseArithmeticTermAST n, Object o) { return  unimplementedVisitor("visit(BaseArithmeticTermAST, Object)"); }
+
+    public Object visit(AsmFunctionDefAST n) { return unimplementedVisitor("visit(AsmFunctionDefAST)"); }
+    public Object visit(AsmFunctionDefAST n, Object o) { return  unimplementedVisitor("visit(AsmFunctionDefAST, Object)"); }
+
+    public Object visit(ArityAST n) { return unimplementedVisitor("visit(ArityAST)"); }
+    public Object visit(ArityAST n, Object o) { return  unimplementedVisitor("visit(ArityAST, Object)"); }
+
+    public Object visit(InitialValuesAST n) { return unimplementedVisitor("visit(InitialValuesAST)"); }
+    public Object visit(InitialValuesAST n, Object o) { return  unimplementedVisitor("visit(InitialValuesAST, Object)"); }
+
+    public Object visit(InitialValueAST n) { return unimplementedVisitor("visit(InitialValueAST)"); }
+    public Object visit(InitialValueAST n, Object o) { return  unimplementedVisitor("visit(InitialValueAST, Object)"); }
+
+    public Object visit(AsmFunctionLocationAST n) { return unimplementedVisitor("visit(AsmFunctionLocationAST)"); }
+    public Object visit(AsmFunctionLocationAST n, Object o) { return  unimplementedVisitor("visit(AsmFunctionLocationAST, Object)"); }
+
+    public Object visit(BuiltInFunctionNameAST n) { return unimplementedVisitor("visit(BuiltInFunctionNameAST)"); }
+    public Object visit(BuiltInFunctionNameAST n, Object o) { return  unimplementedVisitor("visit(BuiltInFunctionNameAST, Object)"); }
+
+    public Object visit(ConversionFunctionNameAST n) { return unimplementedVisitor("visit(ConversionFunctionNameAST)"); }
+    public Object visit(ConversionFunctionNameAST n, Object o) { return  unimplementedVisitor("visit(ConversionFunctionNameAST, Object)"); }
+
+    public Object visit(AsmRuleDefAST n) { return unimplementedVisitor("visit(AsmRuleDefAST)"); }
+    public Object visit(AsmRuleDefAST n, Object o) { return  unimplementedVisitor("visit(AsmRuleDefAST, Object)"); }
+
+    public Object visit(AsmRulesAST n) { return unimplementedVisitor("visit(AsmRulesAST)"); }
+    public Object visit(AsmRulesAST n, Object o) { return  unimplementedVisitor("visit(AsmRulesAST, Object)"); }
+
+    public Object visit(AsmRulesOptAST n) { return unimplementedVisitor("visit(AsmRulesOptAST)"); }
+    public Object visit(AsmRulesOptAST n, Object o) { return  unimplementedVisitor("visit(AsmRulesOptAST, Object)"); }
+
+    public Object visit(AsmRuleAST n) { return unimplementedVisitor("visit(AsmRuleAST)"); }
+    public Object visit(AsmRuleAST n, Object o) { return  unimplementedVisitor("visit(AsmRuleAST, Object)"); }
+
+    public Object visit(SkipRuleAST n) { return unimplementedVisitor("visit(SkipRuleAST)"); }
+    public Object visit(SkipRuleAST n, Object o) { return  unimplementedVisitor("visit(SkipRuleAST, Object)"); }
+
+    public Object visit(FailRuleAST n) { return unimplementedVisitor("visit(FailRuleAST)"); }
+    public Object visit(FailRuleAST n, Object o) { return  unimplementedVisitor("visit(FailRuleAST, Object)"); }
+
+    public Object visit(CallRuleAST n) { return unimplementedVisitor("visit(CallRuleAST)"); }
+    public Object visit(CallRuleAST n, Object o) { return  unimplementedVisitor("visit(CallRuleAST, Object)"); }
+
+    public Object visit(AsmFunctionUpdateLocationAST n) { return unimplementedVisitor("visit(AsmFunctionUpdateLocationAST)"); }
+    public Object visit(AsmFunctionUpdateLocationAST n, Object o) { return  unimplementedVisitor("visit(AsmFunctionUpdateLocationAST, Object)"); }
+
+    public Object visit(LogRuleAST n) { return unimplementedVisitor("visit(LogRuleAST)"); }
+    public Object visit(LogRuleAST n, Object o) { return  unimplementedVisitor("visit(LogRuleAST, Object)"); }
+
+    public Object visit(LogLevelAST n) { return unimplementedVisitor("visit(LogLevelAST)"); }
+    public Object visit(LogLevelAST n, Object o) { return  unimplementedVisitor("visit(LogLevelAST, Object)"); }
+
+    public Object visit(SequentialRuleAST n) { return unimplementedVisitor("visit(SequentialRuleAST)"); }
+    public Object visit(SequentialRuleAST n, Object o) { return  unimplementedVisitor("visit(SequentialRuleAST, Object)"); }
+
+    public Object visit(ParallelRuleAST n) { return unimplementedVisitor("visit(ParallelRuleAST)"); }
+    public Object visit(ParallelRuleAST n, Object o) { return  unimplementedVisitor("visit(ParallelRuleAST, Object)"); }
+
+    public Object visit(RandomRuleAST n) { return unimplementedVisitor("visit(RandomRuleAST)"); }
+    public Object visit(RandomRuleAST n, Object o) { return  unimplementedVisitor("visit(RandomRuleAST, Object)"); }
+
+    public Object visit(OptSemicolonAST n) { return unimplementedVisitor("visit(OptSemicolonAST)"); }
+    public Object visit(OptSemicolonAST n, Object o) { return  unimplementedVisitor("visit(OptSemicolonAST, Object)"); }
+
+    public Object visit(LetRuleAST n) { return unimplementedVisitor("visit(LetRuleAST)"); }
+    public Object visit(LetRuleAST n, Object o) { return  unimplementedVisitor("visit(LetRuleAST, Object)"); }
+
+    public Object visit(VariableDefinitionsAST n) { return unimplementedVisitor("visit(VariableDefinitionsAST)"); }
+    public Object visit(VariableDefinitionsAST n, Object o) { return  unimplementedVisitor("visit(VariableDefinitionsAST, Object)"); }
+
+    public Object visit(VariableDefinitionAST n) { return unimplementedVisitor("visit(VariableDefinitionAST)"); }
+    public Object visit(VariableDefinitionAST n, Object o) { return  unimplementedVisitor("visit(VariableDefinitionAST, Object)"); }
+
+    public Object visit(IterateRuleAST n) { return unimplementedVisitor("visit(IterateRuleAST)"); }
+    public Object visit(IterateRuleAST n, Object o) { return  unimplementedVisitor("visit(IterateRuleAST, Object)"); }
+
+    public Object visit(ChooseRuleAST n) { return unimplementedVisitor("visit(ChooseRuleAST)"); }
+    public Object visit(ChooseRuleAST n, Object o) { return  unimplementedVisitor("visit(ChooseRuleAST, Object)"); }
+
+    public Object visit(ForallRuleAST n) { return unimplementedVisitor("visit(ForallRuleAST)"); }
+    public Object visit(ForallRuleAST n, Object o) { return  unimplementedVisitor("visit(ForallRuleAST, Object)"); }
+
+    public Object visit(WhenRuleAST n) { return unimplementedVisitor("visit(WhenRuleAST)"); }
+    public Object visit(WhenRuleAST n, Object o) { return  unimplementedVisitor("visit(WhenRuleAST, Object)"); }
+
+    public Object visit(WhenConditionAST n) { return unimplementedVisitor("visit(WhenConditionAST)"); }
+    public Object visit(WhenConditionAST n, Object o) { return  unimplementedVisitor("visit(WhenConditionAST, Object)"); }
+
+    public Object visit(CreateEntityBodyAST n) { return unimplementedVisitor("visit(CreateEntityBodyAST)"); }
+    public Object visit(CreateEntityBodyAST n, Object o) { return  unimplementedVisitor("visit(CreateEntityBodyAST, Object)"); }
+
+    public Object visit(CreateRelationBodyAST n) { return unimplementedVisitor("visit(CreateRelationBodyAST)"); }
+    public Object visit(CreateRelationBodyAST n, Object o) { return  unimplementedVisitor("visit(CreateRelationBodyAST, Object)"); }
+
+    public Object visit(InConstraintOptAST n) { return unimplementedVisitor("visit(InConstraintOptAST)"); }
+    public Object visit(InConstraintOptAST n, Object o) { return  unimplementedVisitor("visit(InConstraintOptAST, Object)"); }
+
+    public Object visit(DeleteContentsAST n) { return unimplementedVisitor("visit(DeleteContentsAST)"); }
+    public Object visit(DeleteContentsAST n, Object o) { return  unimplementedVisitor("visit(DeleteContentsAST, Object)"); }
+
+    public Object visit(DeleteSemanticsOptAST n) { return unimplementedVisitor("visit(DeleteSemanticsOptAST)"); }
+    public Object visit(DeleteSemanticsOptAST n, Object o) { return  unimplementedVisitor("visit(DeleteSemanticsOptAST, Object)"); }
+
+    public Object visit(CopyRuleAST n) { return unimplementedVisitor("visit(CopyRuleAST)"); }
+    public Object visit(CopyRuleAST n, Object o) { return  unimplementedVisitor("visit(CopyRuleAST, Object)"); }
+
+    public Object visit(CopyContentsAST n) { return unimplementedVisitor("visit(CopyContentsAST)"); }
+    public Object visit(CopyContentsAST n, Object o) { return  unimplementedVisitor("visit(CopyContentsAST, Object)"); }
+
+    public Object visit(MoveRuleAST n) { return unimplementedVisitor("visit(MoveRuleAST)"); }
+    public Object visit(MoveRuleAST n, Object o) { return  unimplementedVisitor("visit(MoveRuleAST, Object)"); }
+
+    public Object visit(TwoParametersAST n) { return unimplementedVisitor("visit(TwoParametersAST)"); }
+    public Object visit(TwoParametersAST n, Object o) { return  unimplementedVisitor("visit(TwoParametersAST, Object)"); }
+
+    public Object visit(ElementUpdateRuleAST n) { return unimplementedVisitor("visit(ElementUpdateRuleAST)"); }
+    public Object visit(ElementUpdateRuleAST n, Object o) { return  unimplementedVisitor("visit(ElementUpdateRuleAST, Object)"); }
+
+    public Object visit(ElementUpdateOpAST n) { return unimplementedVisitor("visit(ElementUpdateOpAST)"); }
+    public Object visit(ElementUpdateOpAST n, Object o) { return  unimplementedVisitor("visit(ElementUpdateOpAST, Object)"); }
+
+    public Object visit(QualifiedTypeNameAST n) { return unimplementedVisitor("visit(QualifiedTypeNameAST)"); }
+    public Object visit(QualifiedTypeNameAST n, Object o) { return  unimplementedVisitor("visit(QualifiedTypeNameAST, Object)"); }
+
+    public Object visit(VariableRefAST n) { return unimplementedVisitor("visit(VariableRefAST)"); }
+    public Object visit(VariableRefAST n, Object o) { return  unimplementedVisitor("visit(VariableRefAST, Object)"); }
+
+    public Object visit(VariableDefRefAST n) { return unimplementedVisitor("visit(VariableDefRefAST)"); }
+    public Object visit(VariableDefRefAST n, Object o) { return  unimplementedVisitor("visit(VariableDefRefAST, Object)"); }
+
+    public Object visit(VariableDefAST n) { return unimplementedVisitor("visit(VariableDefAST)"); }
+    public Object visit(VariableDefAST n, Object o) { return  unimplementedVisitor("visit(VariableDefAST, Object)"); }
+
+    public Object visit(ValueQualifiedNameAST n) { return unimplementedVisitor("visit(ValueQualifiedNameAST)"); }
+    public Object visit(ValueQualifiedNameAST n, Object o) { return  unimplementedVisitor("visit(ValueQualifiedNameAST, Object)"); }
+
+    public Object visit(ActualParamsAST n) { return unimplementedVisitor("visit(ActualParamsAST)"); }
+    public Object visit(ActualParamsAST n, Object o) { return  unimplementedVisitor("visit(ActualParamsAST, Object)"); }
+
+    public Object visit(ActualParamsPatternVariablesAST n) { return unimplementedVisitor("visit(ActualParamsPatternVariablesAST)"); }
+    public Object visit(ActualParamsPatternVariablesAST n, Object o) { return  unimplementedVisitor("visit(ActualParamsPatternVariablesAST, Object)"); }
+
+    public Object visit(TypeOptAST n) { return unimplementedVisitor("visit(TypeOptAST)"); }
+    public Object visit(TypeOptAST n, Object o) { return  unimplementedVisitor("visit(TypeOptAST, Object)"); }
+
+    public Object visit(ReturnTypeOptAST n) { return unimplementedVisitor("visit(ReturnTypeOptAST)"); }
+    public Object visit(ReturnTypeOptAST n, Object o) { return  unimplementedVisitor("visit(ReturnTypeOptAST, Object)"); }
+
+    public Object visit(UndefValueAST n) { return unimplementedVisitor("visit(UndefValueAST)"); }
+    public Object visit(UndefValueAST n, Object o) { return  unimplementedVisitor("visit(UndefValueAST, Object)"); }
+
+    public Object visit(StringConstantAST n) { return unimplementedVisitor("visit(StringConstantAST)"); }
+    public Object visit(StringConstantAST n, Object o) { return  unimplementedVisitor("visit(StringConstantAST, Object)"); }
+
+    public Object visit(KeywordAsIdentifier n) { return unimplementedVisitor("visit(KeywordAsIdentifier)"); }
+    public Object visit(KeywordAsIdentifier n, Object o) { return  unimplementedVisitor("visit(KeywordAsIdentifier, Object)"); }
+
+    public Object visit(AnnotationsAST n) { return unimplementedVisitor("visit(AnnotationsAST)"); }
+    public Object visit(AnnotationsAST n, Object o) { return  unimplementedVisitor("visit(AnnotationsAST, Object)"); }
+
+    public Object visit(AnnotationAST n) { return unimplementedVisitor("visit(AnnotationAST)"); }
+    public Object visit(AnnotationAST n, Object o) { return  unimplementedVisitor("visit(AnnotationAST, Object)"); }
+
+    public Object visit(AnnotationBodyAST n) { return unimplementedVisitor("visit(AnnotationBodyAST)"); }
+    public Object visit(AnnotationBodyAST n, Object o) { return  unimplementedVisitor("visit(AnnotationBodyAST, Object)"); }
+
+    public Object visit(KeyValuePairAST n) { return unimplementedVisitor("visit(KeyValuePairAST)"); }
+    public Object visit(KeyValuePairAST n, Object o) { return  unimplementedVisitor("visit(KeyValuePairAST, Object)"); }
+
+    public Object visit(AnnotationNameAST n) { return unimplementedVisitor("visit(AnnotationNameAST)"); }
+    public Object visit(AnnotationNameAST n, Object o) { return  unimplementedVisitor("visit(AnnotationNameAST, Object)"); }
+
+    public Object visit(NamespaceImportAST0 n) { return unimplementedVisitor("visit(NamespaceImportAST0)"); }
+    public Object visit(NamespaceImportAST0 n, Object o) { return  unimplementedVisitor("visit(NamespaceImportAST0, Object)"); }
+
+    public Object visit(NamespaceImportAST1 n) { return unimplementedVisitor("visit(NamespaceImportAST1)"); }
+    public Object visit(NamespaceImportAST1 n, Object o) { return  unimplementedVisitor("visit(NamespaceImportAST1, Object)"); }
+
+    public Object visit(PatternBodyContentDefAST0 n) { return unimplementedVisitor("visit(PatternBodyContentDefAST0)"); }
+    public Object visit(PatternBodyContentDefAST0 n, Object o) { return  unimplementedVisitor("visit(PatternBodyContentDefAST0, Object)"); }
+
+    public Object visit(PatternBodyContentDefAST1 n) { return unimplementedVisitor("visit(PatternBodyContentDefAST1)"); }
+    public Object visit(PatternBodyContentDefAST1 n, Object o) { return  unimplementedVisitor("visit(PatternBodyContentDefAST1, Object)"); }
+
+    public Object visit(PatternVariableDefRefAST0 n) { return unimplementedVisitor("visit(PatternVariableDefRefAST0)"); }
+    public Object visit(PatternVariableDefRefAST0 n, Object o) { return  unimplementedVisitor("visit(PatternVariableDefRefAST0, Object)"); }
+
+    public Object visit(PatternVariableDefRefAST1 n) { return unimplementedVisitor("visit(PatternVariableDefRefAST1)"); }
+    public Object visit(PatternVariableDefRefAST1 n, Object o) { return  unimplementedVisitor("visit(PatternVariableDefRefAST1, Object)"); }
+
+    public Object visit(InheritanceAST0 n) { return unimplementedVisitor("visit(InheritanceAST0)"); }
+    public Object visit(InheritanceAST0 n, Object o) { return  unimplementedVisitor("visit(InheritanceAST0, Object)"); }
+
+    public Object visit(InheritanceAST1 n) { return unimplementedVisitor("visit(InheritanceAST1)"); }
+    public Object visit(InheritanceAST1 n, Object o) { return  unimplementedVisitor("visit(InheritanceAST1, Object)"); }
+
+    public Object visit(InstantiationAST0 n) { return unimplementedVisitor("visit(InstantiationAST0)"); }
+    public Object visit(InstantiationAST0 n, Object o) { return  unimplementedVisitor("visit(InstantiationAST0, Object)"); }
+
+    public Object visit(InstantiationAST1 n) { return unimplementedVisitor("visit(InstantiationAST1)"); }
+    public Object visit(InstantiationAST1 n, Object o) { return  unimplementedVisitor("visit(InstantiationAST1, Object)"); }
+
+    public Object visit(GTRuleBodyAST0 n) { return unimplementedVisitor("visit(GTRuleBodyAST0)"); }
+    public Object visit(GTRuleBodyAST0 n, Object o) { return  unimplementedVisitor("visit(GTRuleBodyAST0, Object)"); }
+
+    public Object visit(GTRuleBodyAST1 n) { return unimplementedVisitor("visit(GTRuleBodyAST1)"); }
+    public Object visit(GTRuleBodyAST1 n, Object o) { return  unimplementedVisitor("visit(GTRuleBodyAST1, Object)"); }
+
+    public Object visit(PreconditionDefAST0 n) { return unimplementedVisitor("visit(PreconditionDefAST0)"); }
+    public Object visit(PreconditionDefAST0 n, Object o) { return  unimplementedVisitor("visit(PreconditionDefAST0, Object)"); }
+
+    public Object visit(PreconditionDefAST1 n) { return unimplementedVisitor("visit(PreconditionDefAST1)"); }
+    public Object visit(PreconditionDefAST1 n, Object o) { return  unimplementedVisitor("visit(PreconditionDefAST1, Object)"); }
+
+    public Object visit(PostconditionOptAST0 n) { return unimplementedVisitor("visit(PostconditionOptAST0)"); }
+    public Object visit(PostconditionOptAST0 n, Object o) { return  unimplementedVisitor("visit(PostconditionOptAST0, Object)"); }
+
+    public Object visit(PostconditionOptAST1 n) { return unimplementedVisitor("visit(PostconditionOptAST1)"); }
+    public Object visit(PostconditionOptAST1 n, Object o) { return  unimplementedVisitor("visit(PostconditionOptAST1, Object)"); }
+
+    public Object visit(LogicalTermAST0 n) { return unimplementedVisitor("visit(LogicalTermAST0)"); }
+    public Object visit(LogicalTermAST0 n, Object o) { return  unimplementedVisitor("visit(LogicalTermAST0, Object)"); }
+
+    public Object visit(LogicalTermAST1 n) { return unimplementedVisitor("visit(LogicalTermAST1)"); }
+    public Object visit(LogicalTermAST1 n, Object o) { return  unimplementedVisitor("visit(LogicalTermAST1, Object)"); }
+
+    public Object visit(EqualityTermAST0 n) { return unimplementedVisitor("visit(EqualityTermAST0)"); }
+    public Object visit(EqualityTermAST0 n, Object o) { return  unimplementedVisitor("visit(EqualityTermAST0, Object)"); }
+
+    public Object visit(EqualityTermAST1 n) { return unimplementedVisitor("visit(EqualityTermAST1)"); }
+    public Object visit(EqualityTermAST1 n, Object o) { return  unimplementedVisitor("visit(EqualityTermAST1, Object)"); }
+
+    public Object visit(ArithmeticTermAST0 n) { return unimplementedVisitor("visit(ArithmeticTermAST0)"); }
+    public Object visit(ArithmeticTermAST0 n, Object o) { return  unimplementedVisitor("visit(ArithmeticTermAST0, Object)"); }
+
+    public Object visit(ArithmeticTermAST1 n) { return unimplementedVisitor("visit(ArithmeticTermAST1)"); }
+    public Object visit(ArithmeticTermAST1 n, Object o) { return  unimplementedVisitor("visit(ArithmeticTermAST1, Object)"); }
+
+    public Object visit(MultArithmeticTermAST0 n) { return unimplementedVisitor("visit(MultArithmeticTermAST0)"); }
+    public Object visit(MultArithmeticTermAST0 n, Object o) { return  unimplementedVisitor("visit(MultArithmeticTermAST0, Object)"); }
+
+    public Object visit(MultArithmeticTermAST1 n) { return unimplementedVisitor("visit(MultArithmeticTermAST1)"); }
+    public Object visit(MultArithmeticTermAST1 n, Object o) { return  unimplementedVisitor("visit(MultArithmeticTermAST1, Object)"); }
+
+    public Object visit(MultArithmeticTermAST2 n) { return unimplementedVisitor("visit(MultArithmeticTermAST2)"); }
+    public Object visit(MultArithmeticTermAST2 n, Object o) { return  unimplementedVisitor("visit(MultArithmeticTermAST2, Object)"); }
+
+    public Object visit(UnaryArithmeticTermAST0 n) { return unimplementedVisitor("visit(UnaryArithmeticTermAST0)"); }
+    public Object visit(UnaryArithmeticTermAST0 n, Object o) { return  unimplementedVisitor("visit(UnaryArithmeticTermAST0, Object)"); }
+
+    public Object visit(UnaryArithmeticTermAST1 n) { return unimplementedVisitor("visit(UnaryArithmeticTermAST1)"); }
+    public Object visit(UnaryArithmeticTermAST1 n, Object o) { return  unimplementedVisitor("visit(UnaryArithmeticTermAST1, Object)"); }
+
+    public Object visit(ArityOrTypeDeclAST0 n) { return unimplementedVisitor("visit(ArityOrTypeDeclAST0)"); }
+    public Object visit(ArityOrTypeDeclAST0 n, Object o) { return  unimplementedVisitor("visit(ArityOrTypeDeclAST0, Object)"); }
+
+    public Object visit(ArityOrTypeDeclAST1 n) { return unimplementedVisitor("visit(ArityOrTypeDeclAST1)"); }
+    public Object visit(ArityOrTypeDeclAST1 n, Object o) { return  unimplementedVisitor("visit(ArityOrTypeDeclAST1, Object)"); }
+
+    public Object visit(InitialValuesOptAST0 n) { return unimplementedVisitor("visit(InitialValuesOptAST0)"); }
+    public Object visit(InitialValuesOptAST0 n, Object o) { return  unimplementedVisitor("visit(InitialValuesOptAST0, Object)"); }
+
+    public Object visit(InitialValuesOptAST1 n) { return unimplementedVisitor("visit(InitialValuesOptAST1)"); }
+    public Object visit(InitialValuesOptAST1 n, Object o) { return  unimplementedVisitor("visit(InitialValuesOptAST1, Object)"); }
+
+    public Object visit(TypeConstantsAST0 n) { return unimplementedVisitor("visit(TypeConstantsAST0)"); }
+    public Object visit(TypeConstantsAST0 n, Object o) { return  unimplementedVisitor("visit(TypeConstantsAST0, Object)"); }
+
+    public Object visit(TypeConstantsAST1 n) { return unimplementedVisitor("visit(TypeConstantsAST1)"); }
+    public Object visit(TypeConstantsAST1 n, Object o) { return  unimplementedVisitor("visit(TypeConstantsAST1, Object)"); }
+
+    public Object visit(PredefinedFunctionCallAST0 n) { return unimplementedVisitor("visit(PredefinedFunctionCallAST0)"); }
+    public Object visit(PredefinedFunctionCallAST0 n, Object o) { return  unimplementedVisitor("visit(PredefinedFunctionCallAST0, Object)"); }
+
+    public Object visit(PredefinedFunctionCallAST1 n) { return unimplementedVisitor("visit(PredefinedFunctionCallAST1)"); }
+    public Object visit(PredefinedFunctionCallAST1 n, Object o) { return  unimplementedVisitor("visit(PredefinedFunctionCallAST1, Object)"); }
+
+    public Object visit(UpdateRuleAST0 n) { return unimplementedVisitor("visit(UpdateRuleAST0)"); }
+    public Object visit(UpdateRuleAST0 n, Object o) { return  unimplementedVisitor("visit(UpdateRuleAST0, Object)"); }
+
+    public Object visit(UpdateRuleAST1 n) { return unimplementedVisitor("visit(UpdateRuleAST1)"); }
+    public Object visit(UpdateRuleAST1 n, Object o) { return  unimplementedVisitor("visit(UpdateRuleAST1, Object)"); }
+
+    public Object visit(PrintRuleAST0 n) { return unimplementedVisitor("visit(PrintRuleAST0)"); }
+    public Object visit(PrintRuleAST0 n, Object o) { return  unimplementedVisitor("visit(PrintRuleAST0, Object)"); }
+
+    public Object visit(PrintRuleAST1 n) { return unimplementedVisitor("visit(PrintRuleAST1)"); }
+    public Object visit(PrintRuleAST1 n, Object o) { return  unimplementedVisitor("visit(PrintRuleAST1, Object)"); }
+
+    public Object visit(PrintRuleAST2 n) { return unimplementedVisitor("visit(PrintRuleAST2)"); }
+    public Object visit(PrintRuleAST2 n, Object o) { return  unimplementedVisitor("visit(PrintRuleAST2, Object)"); }
+
+    public Object visit(PrintRuleAST3 n) { return unimplementedVisitor("visit(PrintRuleAST3)"); }
+    public Object visit(PrintRuleAST3 n, Object o) { return  unimplementedVisitor("visit(PrintRuleAST3, Object)"); }
+
+    public Object visit(DoActionOptAST0 n) { return unimplementedVisitor("visit(DoActionOptAST0)"); }
+    public Object visit(DoActionOptAST0 n, Object o) { return  unimplementedVisitor("visit(DoActionOptAST0, Object)"); }
+
+    public Object visit(DoActionOptAST1 n) { return unimplementedVisitor("visit(DoActionOptAST1)"); }
+    public Object visit(DoActionOptAST1 n, Object o) { return  unimplementedVisitor("visit(DoActionOptAST1, Object)"); }
+
+    public Object visit(IfRuleAST0 n) { return unimplementedVisitor("visit(IfRuleAST0)"); }
+    public Object visit(IfRuleAST0 n, Object o) { return  unimplementedVisitor("visit(IfRuleAST0, Object)"); }
+
+    public Object visit(IfRuleAST1 n) { return unimplementedVisitor("visit(IfRuleAST1)"); }
+    public Object visit(IfRuleAST1 n, Object o) { return  unimplementedVisitor("visit(IfRuleAST1, Object)"); }
+
+    public Object visit(TryRuleAST0 n) { return unimplementedVisitor("visit(TryRuleAST0)"); }
+    public Object visit(TryRuleAST0 n, Object o) { return  unimplementedVisitor("visit(TryRuleAST0, Object)"); }
+
+    public Object visit(TryRuleAST1 n) { return unimplementedVisitor("visit(TryRuleAST1)"); }
+    public Object visit(TryRuleAST1 n, Object o) { return  unimplementedVisitor("visit(TryRuleAST1, Object)"); }
+
+    public Object visit(WhenChangeAST0 n) { return unimplementedVisitor("visit(WhenChangeAST0)"); }
+    public Object visit(WhenChangeAST0 n, Object o) { return  unimplementedVisitor("visit(WhenChangeAST0, Object)"); }
+
+    public Object visit(WhenChangeAST1 n) { return unimplementedVisitor("visit(WhenChangeAST1)"); }
+    public Object visit(WhenChangeAST1 n, Object o) { return  unimplementedVisitor("visit(WhenChangeAST1, Object)"); }
+
+    public Object visit(WhenChangeAST2 n) { return unimplementedVisitor("visit(WhenChangeAST2)"); }
+    public Object visit(WhenChangeAST2 n, Object o) { return  unimplementedVisitor("visit(WhenChangeAST2, Object)"); }
+
+    public Object visit(CreateRuleAST0 n) { return unimplementedVisitor("visit(CreateRuleAST0)"); }
+    public Object visit(CreateRuleAST0 n, Object o) { return  unimplementedVisitor("visit(CreateRuleAST0, Object)"); }
+
+    public Object visit(CreateRuleAST1 n) { return unimplementedVisitor("visit(CreateRuleAST1)"); }
+    public Object visit(CreateRuleAST1 n, Object o) { return  unimplementedVisitor("visit(CreateRuleAST1, Object)"); }
+
+    public Object visit(CreateModelElementAST0 n) { return unimplementedVisitor("visit(CreateModelElementAST0)"); }
+    public Object visit(CreateModelElementAST0 n, Object o) { return  unimplementedVisitor("visit(CreateModelElementAST0, Object)"); }
+
+    public Object visit(CreateModelElementAST1 n) { return unimplementedVisitor("visit(CreateModelElementAST1)"); }
+    public Object visit(CreateModelElementAST1 n, Object o) { return  unimplementedVisitor("visit(CreateModelElementAST1, Object)"); }
+
+    public Object visit(CreateRelationshipAST0 n) { return unimplementedVisitor("visit(CreateRelationshipAST0)"); }
+    public Object visit(CreateRelationshipAST0 n, Object o) { return  unimplementedVisitor("visit(CreateRelationshipAST0, Object)"); }
+
+    public Object visit(CreateRelationshipAST1 n) { return unimplementedVisitor("visit(CreateRelationshipAST1)"); }
+    public Object visit(CreateRelationshipAST1 n, Object o) { return  unimplementedVisitor("visit(CreateRelationshipAST1, Object)"); }
+
+    public Object visit(CreateRelationshipAST2 n) { return unimplementedVisitor("visit(CreateRelationshipAST2)"); }
+    public Object visit(CreateRelationshipAST2 n, Object o) { return  unimplementedVisitor("visit(CreateRelationshipAST2, Object)"); }
+
+    public Object visit(CreateRelationshipAST3 n) { return unimplementedVisitor("visit(CreateRelationshipAST3)"); }
+    public Object visit(CreateRelationshipAST3 n, Object o) { return  unimplementedVisitor("visit(CreateRelationshipAST3, Object)"); }
+
+    public Object visit(DeleteRuleAST0 n) { return unimplementedVisitor("visit(DeleteRuleAST0)"); }
+    public Object visit(DeleteRuleAST0 n, Object o) { return  unimplementedVisitor("visit(DeleteRuleAST0, Object)"); }
+
+    public Object visit(DeleteRuleAST1 n) { return unimplementedVisitor("visit(DeleteRuleAST1)"); }
+    public Object visit(DeleteRuleAST1 n, Object o) { return  unimplementedVisitor("visit(DeleteRuleAST1, Object)"); }
+
+    public Object visit(DeleteSemanticsAST0 n) { return unimplementedVisitor("visit(DeleteSemanticsAST0)"); }
+    public Object visit(DeleteSemanticsAST0 n, Object o) { return  unimplementedVisitor("visit(DeleteSemanticsAST0, Object)"); }
+
+    public Object visit(DeleteSemanticsAST1 n) { return unimplementedVisitor("visit(DeleteSemanticsAST1)"); }
+    public Object visit(DeleteSemanticsAST1 n, Object o) { return  unimplementedVisitor("visit(DeleteSemanticsAST1, Object)"); }
+
+    public Object visit(DeleteRelationshipAST0 n) { return unimplementedVisitor("visit(DeleteRelationshipAST0)"); }
+    public Object visit(DeleteRelationshipAST0 n, Object o) { return  unimplementedVisitor("visit(DeleteRelationshipAST0, Object)"); }
+
+    public Object visit(DeleteRelationshipAST1 n) { return unimplementedVisitor("visit(DeleteRelationshipAST1)"); }
+    public Object visit(DeleteRelationshipAST1 n, Object o) { return  unimplementedVisitor("visit(DeleteRelationshipAST1, Object)"); }
+
+    public Object visit(DeleteRelationshipAST2 n) { return unimplementedVisitor("visit(DeleteRelationshipAST2)"); }
+    public Object visit(DeleteRelationshipAST2 n, Object o) { return  unimplementedVisitor("visit(DeleteRelationshipAST2, Object)"); }
+
+    public Object visit(DeleteRelationshipAST3 n) { return unimplementedVisitor("visit(DeleteRelationshipAST3)"); }
+    public Object visit(DeleteRelationshipAST3 n, Object o) { return  unimplementedVisitor("visit(DeleteRelationshipAST3, Object)"); }
+
+    public Object visit(CopySemanticsAST0 n) { return unimplementedVisitor("visit(CopySemanticsAST0)"); }
+    public Object visit(CopySemanticsAST0 n, Object o) { return  unimplementedVisitor("visit(CopySemanticsAST0, Object)"); }
+
+    public Object visit(CopySemanticsAST1 n) { return unimplementedVisitor("visit(CopySemanticsAST1)"); }
+    public Object visit(CopySemanticsAST1 n, Object o) { return  unimplementedVisitor("visit(CopySemanticsAST1, Object)"); }
+
+    public Object visit(TypeNameAST0 n) { return unimplementedVisitor("visit(TypeNameAST0)"); }
+    public Object visit(TypeNameAST0 n, Object o) { return  unimplementedVisitor("visit(TypeNameAST0, Object)"); }
+
+    public Object visit(TypeNameAST1 n) { return unimplementedVisitor("visit(TypeNameAST1)"); }
+    public Object visit(TypeNameAST1 n, Object o) { return  unimplementedVisitor("visit(TypeNameAST1, Object)"); }
+
+    public Object visit(TypeNameAST2 n) { return unimplementedVisitor("visit(TypeNameAST2)"); }
+    public Object visit(TypeNameAST2 n, Object o) { return  unimplementedVisitor("visit(TypeNameAST2, Object)"); }
+
+    public Object visit(TypeNameAST3 n) { return unimplementedVisitor("visit(TypeNameAST3)"); }
+    public Object visit(TypeNameAST3 n, Object o) { return  unimplementedVisitor("visit(TypeNameAST3, Object)"); }
+
+    public Object visit(ValueLocalNameAST0 n) { return unimplementedVisitor("visit(ValueLocalNameAST0)"); }
+    public Object visit(ValueLocalNameAST0 n, Object o) { return  unimplementedVisitor("visit(ValueLocalNameAST0, Object)"); }
+
+    public Object visit(ValueLocalNameAST1 n) { return unimplementedVisitor("visit(ValueLocalNameAST1)"); }
+    public Object visit(ValueLocalNameAST1 n, Object o) { return  unimplementedVisitor("visit(ValueLocalNameAST1, Object)"); }
+
+    public Object visit(FormalParameterDefAST0 n) { return unimplementedVisitor("visit(FormalParameterDefAST0)"); }
+    public Object visit(FormalParameterDefAST0 n, Object o) { return  unimplementedVisitor("visit(FormalParameterDefAST0, Object)"); }
+
+    public Object visit(FormalParameterDefAST1 n) { return unimplementedVisitor("visit(FormalParameterDefAST1)"); }
+    public Object visit(FormalParameterDefAST1 n, Object o) { return  unimplementedVisitor("visit(FormalParameterDefAST1, Object)"); }
+
+    public Object visit(FormalParamsAST0 n) { return unimplementedVisitor("visit(FormalParamsAST0)"); }
+    public Object visit(FormalParamsAST0 n, Object o) { return  unimplementedVisitor("visit(FormalParamsAST0, Object)"); }
+
+    public Object visit(FormalParamsAST1 n) { return unimplementedVisitor("visit(FormalParamsAST1)"); }
+    public Object visit(FormalParamsAST1 n, Object o) { return  unimplementedVisitor("visit(FormalParamsAST1, Object)"); }
+
+    public Object visit(DirectedFormalParameterDefAST0 n) { return unimplementedVisitor("visit(DirectedFormalParameterDefAST0)"); }
+    public Object visit(DirectedFormalParameterDefAST0 n, Object o) { return  unimplementedVisitor("visit(DirectedFormalParameterDefAST0, Object)"); }
+
+    public Object visit(DirectedFormalParameterDefAST1 n) { return unimplementedVisitor("visit(DirectedFormalParameterDefAST1)"); }
+    public Object visit(DirectedFormalParameterDefAST1 n, Object o) { return  unimplementedVisitor("visit(DirectedFormalParameterDefAST1, Object)"); }
+
+    public Object visit(DirectedFormalParamsAST0 n) { return unimplementedVisitor("visit(DirectedFormalParamsAST0)"); }
+    public Object visit(DirectedFormalParamsAST0 n, Object o) { return  unimplementedVisitor("visit(DirectedFormalParamsAST0, Object)"); }
+
+    public Object visit(DirectedFormalParamsAST1 n) { return unimplementedVisitor("visit(DirectedFormalParamsAST1)"); }
+    public Object visit(DirectedFormalParamsAST1 n, Object o) { return  unimplementedVisitor("visit(DirectedFormalParamsAST1, Object)"); }
+
+    public Object visit(DirectionKindAST0 n) { return unimplementedVisitor("visit(DirectionKindAST0)"); }
+    public Object visit(DirectionKindAST0 n, Object o) { return  unimplementedVisitor("visit(DirectionKindAST0, Object)"); }
+
+    public Object visit(DirectionKindAST1 n) { return unimplementedVisitor("visit(DirectionKindAST1)"); }
+    public Object visit(DirectionKindAST1 n, Object o) { return  unimplementedVisitor("visit(DirectionKindAST1, Object)"); }
+
+    public Object visit(DirectionKindAST2 n) { return unimplementedVisitor("visit(DirectionKindAST2)"); }
+    public Object visit(DirectionKindAST2 n, Object o) { return  unimplementedVisitor("visit(DirectionKindAST2, Object)"); }
+
+    public Object visit(ActualParameterDefAST0 n) { return unimplementedVisitor("visit(ActualParameterDefAST0)"); }
+    public Object visit(ActualParameterDefAST0 n, Object o) { return  unimplementedVisitor("visit(ActualParameterDefAST0, Object)"); }
+
+    public Object visit(ActualParameterDefAST1 n) { return unimplementedVisitor("visit(ActualParameterDefAST1)"); }
+    public Object visit(ActualParameterDefAST1 n, Object o) { return  unimplementedVisitor("visit(ActualParameterDefAST1, Object)"); }
+
+    public Object visit(ActualPatternParameterDefAST0 n) { return unimplementedVisitor("visit(ActualPatternParameterDefAST0)"); }
+    public Object visit(ActualPatternParameterDefAST0 n, Object o) { return  unimplementedVisitor("visit(ActualPatternParameterDefAST0, Object)"); }
+
+    public Object visit(ActualPatternParameterDefAST1 n) { return unimplementedVisitor("visit(ActualPatternParameterDefAST1)"); }
+    public Object visit(ActualPatternParameterDefAST1 n, Object o) { return  unimplementedVisitor("visit(ActualPatternParameterDefAST1, Object)"); }
+
+    public Object visit(ConstrainedVariablesAST0 n) { return unimplementedVisitor("visit(ConstrainedVariablesAST0)"); }
+    public Object visit(ConstrainedVariablesAST0 n, Object o) { return  unimplementedVisitor("visit(ConstrainedVariablesAST0, Object)"); }
+
+    public Object visit(ConstrainedVariablesAST1 n) { return unimplementedVisitor("visit(ConstrainedVariablesAST1)"); }
+    public Object visit(ConstrainedVariablesAST1 n, Object o) { return  unimplementedVisitor("visit(ConstrainedVariablesAST1, Object)"); }
+
+    public Object visit(ContainmentConstraintOptAST0 n) { return unimplementedVisitor("visit(ContainmentConstraintOptAST0)"); }
+    public Object visit(ContainmentConstraintOptAST0 n, Object o) { return  unimplementedVisitor("visit(ContainmentConstraintOptAST0, Object)"); }
+
+    public Object visit(ContainmentConstraintOptAST1 n) { return unimplementedVisitor("visit(ContainmentConstraintOptAST1)"); }
+    public Object visit(ContainmentConstraintOptAST1 n, Object o) { return  unimplementedVisitor("visit(ContainmentConstraintOptAST1, Object)"); }
+
+    public Object visit(BooleanConstantAST0 n) { return unimplementedVisitor("visit(BooleanConstantAST0)"); }
+    public Object visit(BooleanConstantAST0 n, Object o) { return  unimplementedVisitor("visit(BooleanConstantAST0, Object)"); }
+
+    public Object visit(BooleanConstantAST1 n) { return unimplementedVisitor("visit(BooleanConstantAST1)"); }
+    public Object visit(BooleanConstantAST1 n, Object o) { return  unimplementedVisitor("visit(BooleanConstantAST1, Object)"); }
+
+    public Object visit(MultiplicityConstantAST0 n) { return unimplementedVisitor("visit(MultiplicityConstantAST0)"); }
+    public Object visit(MultiplicityConstantAST0 n, Object o) { return  unimplementedVisitor("visit(MultiplicityConstantAST0, Object)"); }
+
+    public Object visit(MultiplicityConstantAST1 n) { return unimplementedVisitor("visit(MultiplicityConstantAST1)"); }
+    public Object visit(MultiplicityConstantAST1 n, Object o) { return  unimplementedVisitor("visit(MultiplicityConstantAST1, Object)"); }
+
+    public Object visit(MultiplicityConstantAST2 n) { return unimplementedVisitor("visit(MultiplicityConstantAST2)"); }
+    public Object visit(MultiplicityConstantAST2 n, Object o) { return  unimplementedVisitor("visit(MultiplicityConstantAST2, Object)"); }
+
+    public Object visit(MultiplicityConstantAST3 n) { return unimplementedVisitor("visit(MultiplicityConstantAST3)"); }
+    public Object visit(MultiplicityConstantAST3 n, Object o) { return  unimplementedVisitor("visit(MultiplicityConstantAST3, Object)"); }
+
+    public Object visit(NumericConstantAST0 n) { return unimplementedVisitor("visit(NumericConstantAST0)"); }
+    public Object visit(NumericConstantAST0 n, Object o) { return  unimplementedVisitor("visit(NumericConstantAST0, Object)"); }
+
+    public Object visit(NumericConstantAST1 n) { return unimplementedVisitor("visit(NumericConstantAST1)"); }
+    public Object visit(NumericConstantAST1 n, Object o) { return  unimplementedVisitor("visit(NumericConstantAST1, Object)"); }
+
+    public Object visit(NumericConstantAST2 n) { return unimplementedVisitor("visit(NumericConstantAST2)"); }
+    public Object visit(NumericConstantAST2 n, Object o) { return  unimplementedVisitor("visit(NumericConstantAST2, Object)"); }
+
+    public Object visit(NumericConstantAST3 n) { return unimplementedVisitor("visit(NumericConstantAST3)"); }
+    public Object visit(NumericConstantAST3 n, Object o) { return  unimplementedVisitor("visit(NumericConstantAST3, Object)"); }
+}
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AbstractVisitor.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AbstractVisitor.java
new file mode 100644
index 0000000..2fb9b84
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AbstractVisitor.java
@@ -0,0 +1,606 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+public abstract class AbstractVisitor implements Visitor, ArgumentVisitor
+{
+    public abstract void unimplementedVisitor(String s);
+
+    public void visit(ASTNodeToken n) { unimplementedVisitor("visit(ASTNodeToken)"); }
+    public void visit(ASTNodeToken n, Object o) { unimplementedVisitor("visit(ASTNodeToken, Object)"); }
+
+    public void visit(VTCLFile n) { unimplementedVisitor("visit(VTCLFile)"); }
+    public void visit(VTCLFile n, Object o) { unimplementedVisitor("visit(VTCLFile, Object)"); }
+
+    public void visit(NamespaceDefAST n) { unimplementedVisitor("visit(NamespaceDefAST)"); }
+    public void visit(NamespaceDefAST n, Object o) { unimplementedVisitor("visit(NamespaceDefAST, Object)"); }
+
+    public void visit(NamespaceImportsAST n) { unimplementedVisitor("visit(NamespaceImportsAST)"); }
+    public void visit(NamespaceImportsAST n, Object o) { unimplementedVisitor("visit(NamespaceImportsAST, Object)"); }
+
+    public void visit(GTASMDefAST n) { unimplementedVisitor("visit(GTASMDefAST)"); }
+    public void visit(GTASMDefAST n, Object o) { unimplementedVisitor("visit(GTASMDefAST, Object)"); }
+
+    public void visit(MachineContentsAST n) { unimplementedVisitor("visit(MachineContentsAST)"); }
+    public void visit(MachineContentsAST n, Object o) { unimplementedVisitor("visit(MachineContentsAST, Object)"); }
+
+    public void visit(MachineContentAST n) { unimplementedVisitor("visit(MachineContentAST)"); }
+    public void visit(MachineContentAST n, Object o) { unimplementedVisitor("visit(MachineContentAST, Object)"); }
+
+    public void visit(GraphPatternDefAST n) { unimplementedVisitor("visit(GraphPatternDefAST)"); }
+    public void visit(GraphPatternDefAST n, Object o) { unimplementedVisitor("visit(GraphPatternDefAST, Object)"); }
+
+    public void visit(OptShareableDefAST n) { unimplementedVisitor("visit(OptShareableDefAST)"); }
+    public void visit(OptShareableDefAST n, Object o) { unimplementedVisitor("visit(OptShareableDefAST, Object)"); }
+
+    public void visit(PatternBodiesAST n) { unimplementedVisitor("visit(PatternBodiesAST)"); }
+    public void visit(PatternBodiesAST n, Object o) { unimplementedVisitor("visit(PatternBodiesAST, Object)"); }
+
+    public void visit(PatternBodyAST n) { unimplementedVisitor("visit(PatternBodyAST)"); }
+    public void visit(PatternBodyAST n, Object o) { unimplementedVisitor("visit(PatternBodyAST, Object)"); }
+
+    public void visit(PatternBodyContentsAST n) { unimplementedVisitor("visit(PatternBodyContentsAST)"); }
+    public void visit(PatternBodyContentsAST n, Object o) { unimplementedVisitor("visit(PatternBodyContentsAST, Object)"); }
+
+    public void visit(PatternBodyContentAST n) { unimplementedVisitor("visit(PatternBodyContentAST)"); }
+    public void visit(PatternBodyContentAST n, Object o) { unimplementedVisitor("visit(PatternBodyContentAST, Object)"); }
+
+    public void visit(NegativePatternAST n) { unimplementedVisitor("visit(NegativePatternAST)"); }
+    public void visit(NegativePatternAST n, Object o) { unimplementedVisitor("visit(NegativePatternAST, Object)"); }
+
+    public void visit(PatternCompositionAST n) { unimplementedVisitor("visit(PatternCompositionAST)"); }
+    public void visit(PatternCompositionAST n, Object o) { unimplementedVisitor("visit(PatternCompositionAST, Object)"); }
+
+    public void visit(PatternVariableAssignmentAST n) { unimplementedVisitor("visit(PatternVariableAssignmentAST)"); }
+    public void visit(PatternVariableAssignmentAST n, Object o) { unimplementedVisitor("visit(PatternVariableAssignmentAST, Object)"); }
+
+    public void visit(NonInjectivityConstraintAST n) { unimplementedVisitor("visit(NonInjectivityConstraintAST)"); }
+    public void visit(NonInjectivityConstraintAST n, Object o) { unimplementedVisitor("visit(NonInjectivityConstraintAST, Object)"); }
+
+    public void visit(CheckConditionAST n) { unimplementedVisitor("visit(CheckConditionAST)"); }
+    public void visit(CheckConditionAST n, Object o) { unimplementedVisitor("visit(CheckConditionAST, Object)"); }
+
+    public void visit(OptMatchCountAST n) { unimplementedVisitor("visit(OptMatchCountAST)"); }
+    public void visit(OptMatchCountAST n, Object o) { unimplementedVisitor("visit(OptMatchCountAST, Object)"); }
+
+    public void visit(PatternVariableDefAST n) { unimplementedVisitor("visit(PatternVariableDefAST)"); }
+    public void visit(PatternVariableDefAST n, Object o) { unimplementedVisitor("visit(PatternVariableDefAST, Object)"); }
+
+    public void visit(PatternVariableRefAST n) { unimplementedVisitor("visit(PatternVariableRefAST)"); }
+    public void visit(PatternVariableRefAST n, Object o) { unimplementedVisitor("visit(PatternVariableRefAST, Object)"); }
+
+    public void visit(CounterVariableAST n) { unimplementedVisitor("visit(CounterVariableAST)"); }
+    public void visit(CounterVariableAST n, Object o) { unimplementedVisitor("visit(CounterVariableAST, Object)"); }
+
+    public void visit(GraphPatternCallAST n) { unimplementedVisitor("visit(GraphPatternCallAST)"); }
+    public void visit(GraphPatternCallAST n, Object o) { unimplementedVisitor("visit(GraphPatternCallAST, Object)"); }
+
+    public void visit(EntityAST n) { unimplementedVisitor("visit(EntityAST)"); }
+    public void visit(EntityAST n, Object o) { unimplementedVisitor("visit(EntityAST, Object)"); }
+
+    public void visit(EntityBody n) { unimplementedVisitor("visit(EntityBody)"); }
+    public void visit(EntityBody n, Object o) { unimplementedVisitor("visit(EntityBody, Object)"); }
+
+    public void visit(RelationAST n) { unimplementedVisitor("visit(RelationAST)"); }
+    public void visit(RelationAST n, Object o) { unimplementedVisitor("visit(RelationAST, Object)"); }
+
+    public void visit(RelationBodyAST n) { unimplementedVisitor("visit(RelationBodyAST)"); }
+    public void visit(RelationBodyAST n, Object o) { unimplementedVisitor("visit(RelationBodyAST, Object)"); }
+
+    public void visit(RelationshipBodyAST n) { unimplementedVisitor("visit(RelationshipBodyAST)"); }
+    public void visit(RelationshipBodyAST n, Object o) { unimplementedVisitor("visit(RelationshipBodyAST, Object)"); }
+
+    public void visit(GTRuleDefAST n) { unimplementedVisitor("visit(GTRuleDefAST)"); }
+    public void visit(GTRuleDefAST n, Object o) { unimplementedVisitor("visit(GTRuleDefAST, Object)"); }
+
+    public void visit(ActionOptAST n) { unimplementedVisitor("visit(ActionOptAST)"); }
+    public void visit(ActionOptAST n, Object o) { unimplementedVisitor("visit(ActionOptAST, Object)"); }
+
+    public void visit(GTRuleCallAST n) { unimplementedVisitor("visit(GTRuleCallAST)"); }
+    public void visit(GTRuleCallAST n, Object o) { unimplementedVisitor("visit(GTRuleCallAST, Object)"); }
+
+    public void visit(LogicalAndTermAST n) { unimplementedVisitor("visit(LogicalAndTermAST)"); }
+    public void visit(LogicalAndTermAST n, Object o) { unimplementedVisitor("visit(LogicalAndTermAST, Object)"); }
+
+    public void visit(RelationalTermAST n) { unimplementedVisitor("visit(RelationalTermAST)"); }
+    public void visit(RelationalTermAST n, Object o) { unimplementedVisitor("visit(RelationalTermAST, Object)"); }
+
+    public void visit(RelationalOpAST n) { unimplementedVisitor("visit(RelationalOpAST)"); }
+    public void visit(RelationalOpAST n, Object o) { unimplementedVisitor("visit(RelationalOpAST, Object)"); }
+
+    public void visit(BaseArithmeticTermAST n) { unimplementedVisitor("visit(BaseArithmeticTermAST)"); }
+    public void visit(BaseArithmeticTermAST n, Object o) { unimplementedVisitor("visit(BaseArithmeticTermAST, Object)"); }
+
+    public void visit(AsmFunctionDefAST n) { unimplementedVisitor("visit(AsmFunctionDefAST)"); }
+    public void visit(AsmFunctionDefAST n, Object o) { unimplementedVisitor("visit(AsmFunctionDefAST, Object)"); }
+
+    public void visit(ArityAST n) { unimplementedVisitor("visit(ArityAST)"); }
+    public void visit(ArityAST n, Object o) { unimplementedVisitor("visit(ArityAST, Object)"); }
+
+    public void visit(InitialValuesAST n) { unimplementedVisitor("visit(InitialValuesAST)"); }
+    public void visit(InitialValuesAST n, Object o) { unimplementedVisitor("visit(InitialValuesAST, Object)"); }
+
+    public void visit(InitialValueAST n) { unimplementedVisitor("visit(InitialValueAST)"); }
+    public void visit(InitialValueAST n, Object o) { unimplementedVisitor("visit(InitialValueAST, Object)"); }
+
+    public void visit(AsmFunctionLocationAST n) { unimplementedVisitor("visit(AsmFunctionLocationAST)"); }
+    public void visit(AsmFunctionLocationAST n, Object o) { unimplementedVisitor("visit(AsmFunctionLocationAST, Object)"); }
+
+    public void visit(BuiltInFunctionNameAST n) { unimplementedVisitor("visit(BuiltInFunctionNameAST)"); }
+    public void visit(BuiltInFunctionNameAST n, Object o) { unimplementedVisitor("visit(BuiltInFunctionNameAST, Object)"); }
+
+    public void visit(ConversionFunctionNameAST n) { unimplementedVisitor("visit(ConversionFunctionNameAST)"); }
+    public void visit(ConversionFunctionNameAST n, Object o) { unimplementedVisitor("visit(ConversionFunctionNameAST, Object)"); }
+
+    public void visit(AsmRuleDefAST n) { unimplementedVisitor("visit(AsmRuleDefAST)"); }
+    public void visit(AsmRuleDefAST n, Object o) { unimplementedVisitor("visit(AsmRuleDefAST, Object)"); }
+
+    public void visit(AsmRulesAST n) { unimplementedVisitor("visit(AsmRulesAST)"); }
+    public void visit(AsmRulesAST n, Object o) { unimplementedVisitor("visit(AsmRulesAST, Object)"); }
+
+    public void visit(AsmRulesOptAST n) { unimplementedVisitor("visit(AsmRulesOptAST)"); }
+    public void visit(AsmRulesOptAST n, Object o) { unimplementedVisitor("visit(AsmRulesOptAST, Object)"); }
+
+    public void visit(AsmRuleAST n) { unimplementedVisitor("visit(AsmRuleAST)"); }
+    public void visit(AsmRuleAST n, Object o) { unimplementedVisitor("visit(AsmRuleAST, Object)"); }
+
+    public void visit(SkipRuleAST n) { unimplementedVisitor("visit(SkipRuleAST)"); }
+    public void visit(SkipRuleAST n, Object o) { unimplementedVisitor("visit(SkipRuleAST, Object)"); }
+
+    public void visit(FailRuleAST n) { unimplementedVisitor("visit(FailRuleAST)"); }
+    public void visit(FailRuleAST n, Object o) { unimplementedVisitor("visit(FailRuleAST, Object)"); }
+
+    public void visit(CallRuleAST n) { unimplementedVisitor("visit(CallRuleAST)"); }
+    public void visit(CallRuleAST n, Object o) { unimplementedVisitor("visit(CallRuleAST, Object)"); }
+
+    public void visit(AsmFunctionUpdateLocationAST n) { unimplementedVisitor("visit(AsmFunctionUpdateLocationAST)"); }
+    public void visit(AsmFunctionUpdateLocationAST n, Object o) { unimplementedVisitor("visit(AsmFunctionUpdateLocationAST, Object)"); }
+
+    public void visit(LogRuleAST n) { unimplementedVisitor("visit(LogRuleAST)"); }
+    public void visit(LogRuleAST n, Object o) { unimplementedVisitor("visit(LogRuleAST, Object)"); }
+
+    public void visit(LogLevelAST n) { unimplementedVisitor("visit(LogLevelAST)"); }
+    public void visit(LogLevelAST n, Object o) { unimplementedVisitor("visit(LogLevelAST, Object)"); }
+
+    public void visit(SequentialRuleAST n) { unimplementedVisitor("visit(SequentialRuleAST)"); }
+    public void visit(SequentialRuleAST n, Object o) { unimplementedVisitor("visit(SequentialRuleAST, Object)"); }
+
+    public void visit(ParallelRuleAST n) { unimplementedVisitor("visit(ParallelRuleAST)"); }
+    public void visit(ParallelRuleAST n, Object o) { unimplementedVisitor("visit(ParallelRuleAST, Object)"); }
+
+    public void visit(RandomRuleAST n) { unimplementedVisitor("visit(RandomRuleAST)"); }
+    public void visit(RandomRuleAST n, Object o) { unimplementedVisitor("visit(RandomRuleAST, Object)"); }
+
+    public void visit(OptSemicolonAST n) { unimplementedVisitor("visit(OptSemicolonAST)"); }
+    public void visit(OptSemicolonAST n, Object o) { unimplementedVisitor("visit(OptSemicolonAST, Object)"); }
+
+    public void visit(LetRuleAST n) { unimplementedVisitor("visit(LetRuleAST)"); }
+    public void visit(LetRuleAST n, Object o) { unimplementedVisitor("visit(LetRuleAST, Object)"); }
+
+    public void visit(VariableDefinitionsAST n) { unimplementedVisitor("visit(VariableDefinitionsAST)"); }
+    public void visit(VariableDefinitionsAST n, Object o) { unimplementedVisitor("visit(VariableDefinitionsAST, Object)"); }
+
+    public void visit(VariableDefinitionAST n) { unimplementedVisitor("visit(VariableDefinitionAST)"); }
+    public void visit(VariableDefinitionAST n, Object o) { unimplementedVisitor("visit(VariableDefinitionAST, Object)"); }
+
+    public void visit(IterateRuleAST n) { unimplementedVisitor("visit(IterateRuleAST)"); }
+    public void visit(IterateRuleAST n, Object o) { unimplementedVisitor("visit(IterateRuleAST, Object)"); }
+
+    public void visit(ChooseRuleAST n) { unimplementedVisitor("visit(ChooseRuleAST)"); }
+    public void visit(ChooseRuleAST n, Object o) { unimplementedVisitor("visit(ChooseRuleAST, Object)"); }
+
+    public void visit(ForallRuleAST n) { unimplementedVisitor("visit(ForallRuleAST)"); }
+    public void visit(ForallRuleAST n, Object o) { unimplementedVisitor("visit(ForallRuleAST, Object)"); }
+
+    public void visit(WhenRuleAST n) { unimplementedVisitor("visit(WhenRuleAST)"); }
+    public void visit(WhenRuleAST n, Object o) { unimplementedVisitor("visit(WhenRuleAST, Object)"); }
+
+    public void visit(WhenConditionAST n) { unimplementedVisitor("visit(WhenConditionAST)"); }
+    public void visit(WhenConditionAST n, Object o) { unimplementedVisitor("visit(WhenConditionAST, Object)"); }
+
+    public void visit(CreateEntityBodyAST n) { unimplementedVisitor("visit(CreateEntityBodyAST)"); }
+    public void visit(CreateEntityBodyAST n, Object o) { unimplementedVisitor("visit(CreateEntityBodyAST, Object)"); }
+
+    public void visit(CreateRelationBodyAST n) { unimplementedVisitor("visit(CreateRelationBodyAST)"); }
+    public void visit(CreateRelationBodyAST n, Object o) { unimplementedVisitor("visit(CreateRelationBodyAST, Object)"); }
+
+    public void visit(InConstraintOptAST n) { unimplementedVisitor("visit(InConstraintOptAST)"); }
+    public void visit(InConstraintOptAST n, Object o) { unimplementedVisitor("visit(InConstraintOptAST, Object)"); }
+
+    public void visit(DeleteContentsAST n) { unimplementedVisitor("visit(DeleteContentsAST)"); }
+    public void visit(DeleteContentsAST n, Object o) { unimplementedVisitor("visit(DeleteContentsAST, Object)"); }
+
+    public void visit(DeleteSemanticsOptAST n) { unimplementedVisitor("visit(DeleteSemanticsOptAST)"); }
+    public void visit(DeleteSemanticsOptAST n, Object o) { unimplementedVisitor("visit(DeleteSemanticsOptAST, Object)"); }
+
+    public void visit(CopyRuleAST n) { unimplementedVisitor("visit(CopyRuleAST)"); }
+    public void visit(CopyRuleAST n, Object o) { unimplementedVisitor("visit(CopyRuleAST, Object)"); }
+
+    public void visit(CopyContentsAST n) { unimplementedVisitor("visit(CopyContentsAST)"); }
+    public void visit(CopyContentsAST n, Object o) { unimplementedVisitor("visit(CopyContentsAST, Object)"); }
+
+    public void visit(MoveRuleAST n) { unimplementedVisitor("visit(MoveRuleAST)"); }
+    public void visit(MoveRuleAST n, Object o) { unimplementedVisitor("visit(MoveRuleAST, Object)"); }
+
+    public void visit(TwoParametersAST n) { unimplementedVisitor("visit(TwoParametersAST)"); }
+    public void visit(TwoParametersAST n, Object o) { unimplementedVisitor("visit(TwoParametersAST, Object)"); }
+
+    public void visit(ElementUpdateRuleAST n) { unimplementedVisitor("visit(ElementUpdateRuleAST)"); }
+    public void visit(ElementUpdateRuleAST n, Object o) { unimplementedVisitor("visit(ElementUpdateRuleAST, Object)"); }
+
+    public void visit(ElementUpdateOpAST n) { unimplementedVisitor("visit(ElementUpdateOpAST)"); }
+    public void visit(ElementUpdateOpAST n, Object o) { unimplementedVisitor("visit(ElementUpdateOpAST, Object)"); }
+
+    public void visit(QualifiedTypeNameAST n) { unimplementedVisitor("visit(QualifiedTypeNameAST)"); }
+    public void visit(QualifiedTypeNameAST n, Object o) { unimplementedVisitor("visit(QualifiedTypeNameAST, Object)"); }
+
+    public void visit(VariableRefAST n) { unimplementedVisitor("visit(VariableRefAST)"); }
+    public void visit(VariableRefAST n, Object o) { unimplementedVisitor("visit(VariableRefAST, Object)"); }
+
+    public void visit(VariableDefRefAST n) { unimplementedVisitor("visit(VariableDefRefAST)"); }
+    public void visit(VariableDefRefAST n, Object o) { unimplementedVisitor("visit(VariableDefRefAST, Object)"); }
+
+    public void visit(VariableDefAST n) { unimplementedVisitor("visit(VariableDefAST)"); }
+    public void visit(VariableDefAST n, Object o) { unimplementedVisitor("visit(VariableDefAST, Object)"); }
+
+    public void visit(ValueQualifiedNameAST n) { unimplementedVisitor("visit(ValueQualifiedNameAST)"); }
+    public void visit(ValueQualifiedNameAST n, Object o) { unimplementedVisitor("visit(ValueQualifiedNameAST, Object)"); }
+
+    public void visit(ActualParamsAST n) { unimplementedVisitor("visit(ActualParamsAST)"); }
+    public void visit(ActualParamsAST n, Object o) { unimplementedVisitor("visit(ActualParamsAST, Object)"); }
+
+    public void visit(ActualParamsPatternVariablesAST n) { unimplementedVisitor("visit(ActualParamsPatternVariablesAST)"); }
+    public void visit(ActualParamsPatternVariablesAST n, Object o) { unimplementedVisitor("visit(ActualParamsPatternVariablesAST, Object)"); }
+
+    public void visit(TypeOptAST n) { unimplementedVisitor("visit(TypeOptAST)"); }
+    public void visit(TypeOptAST n, Object o) { unimplementedVisitor("visit(TypeOptAST, Object)"); }
+
+    public void visit(ReturnTypeOptAST n) { unimplementedVisitor("visit(ReturnTypeOptAST)"); }
+    public void visit(ReturnTypeOptAST n, Object o) { unimplementedVisitor("visit(ReturnTypeOptAST, Object)"); }
+
+    public void visit(UndefValueAST n) { unimplementedVisitor("visit(UndefValueAST)"); }
+    public void visit(UndefValueAST n, Object o) { unimplementedVisitor("visit(UndefValueAST, Object)"); }
+
+    public void visit(StringConstantAST n) { unimplementedVisitor("visit(StringConstantAST)"); }
+    public void visit(StringConstantAST n, Object o) { unimplementedVisitor("visit(StringConstantAST, Object)"); }
+
+    public void visit(KeywordAsIdentifier n) { unimplementedVisitor("visit(KeywordAsIdentifier)"); }
+    public void visit(KeywordAsIdentifier n, Object o) { unimplementedVisitor("visit(KeywordAsIdentifier, Object)"); }
+
+    public void visit(AnnotationsAST n) { unimplementedVisitor("visit(AnnotationsAST)"); }
+    public void visit(AnnotationsAST n, Object o) { unimplementedVisitor("visit(AnnotationsAST, Object)"); }
+
+    public void visit(AnnotationAST n) { unimplementedVisitor("visit(AnnotationAST)"); }
+    public void visit(AnnotationAST n, Object o) { unimplementedVisitor("visit(AnnotationAST, Object)"); }
+
+    public void visit(AnnotationBodyAST n) { unimplementedVisitor("visit(AnnotationBodyAST)"); }
+    public void visit(AnnotationBodyAST n, Object o) { unimplementedVisitor("visit(AnnotationBodyAST, Object)"); }
+
+    public void visit(KeyValuePairAST n) { unimplementedVisitor("visit(KeyValuePairAST)"); }
+    public void visit(KeyValuePairAST n, Object o) { unimplementedVisitor("visit(KeyValuePairAST, Object)"); }
+
+    public void visit(AnnotationNameAST n) { unimplementedVisitor("visit(AnnotationNameAST)"); }
+    public void visit(AnnotationNameAST n, Object o) { unimplementedVisitor("visit(AnnotationNameAST, Object)"); }
+
+    public void visit(NamespaceImportAST0 n) { unimplementedVisitor("visit(NamespaceImportAST0)"); }
+    public void visit(NamespaceImportAST0 n, Object o) { unimplementedVisitor("visit(NamespaceImportAST0, Object)"); }
+
+    public void visit(NamespaceImportAST1 n) { unimplementedVisitor("visit(NamespaceImportAST1)"); }
+    public void visit(NamespaceImportAST1 n, Object o) { unimplementedVisitor("visit(NamespaceImportAST1, Object)"); }
+
+    public void visit(PatternBodyContentDefAST0 n) { unimplementedVisitor("visit(PatternBodyContentDefAST0)"); }
+    public void visit(PatternBodyContentDefAST0 n, Object o) { unimplementedVisitor("visit(PatternBodyContentDefAST0, Object)"); }
+
+    public void visit(PatternBodyContentDefAST1 n) { unimplementedVisitor("visit(PatternBodyContentDefAST1)"); }
+    public void visit(PatternBodyContentDefAST1 n, Object o) { unimplementedVisitor("visit(PatternBodyContentDefAST1, Object)"); }
+
+    public void visit(PatternVariableDefRefAST0 n) { unimplementedVisitor("visit(PatternVariableDefRefAST0)"); }
+    public void visit(PatternVariableDefRefAST0 n, Object o) { unimplementedVisitor("visit(PatternVariableDefRefAST0, Object)"); }
+
+    public void visit(PatternVariableDefRefAST1 n) { unimplementedVisitor("visit(PatternVariableDefRefAST1)"); }
+    public void visit(PatternVariableDefRefAST1 n, Object o) { unimplementedVisitor("visit(PatternVariableDefRefAST1, Object)"); }
+
+    public void visit(InheritanceAST0 n) { unimplementedVisitor("visit(InheritanceAST0)"); }
+    public void visit(InheritanceAST0 n, Object o) { unimplementedVisitor("visit(InheritanceAST0, Object)"); }
+
+    public void visit(InheritanceAST1 n) { unimplementedVisitor("visit(InheritanceAST1)"); }
+    public void visit(InheritanceAST1 n, Object o) { unimplementedVisitor("visit(InheritanceAST1, Object)"); }
+
+    public void visit(InstantiationAST0 n) { unimplementedVisitor("visit(InstantiationAST0)"); }
+    public void visit(InstantiationAST0 n, Object o) { unimplementedVisitor("visit(InstantiationAST0, Object)"); }
+
+    public void visit(InstantiationAST1 n) { unimplementedVisitor("visit(InstantiationAST1)"); }
+    public void visit(InstantiationAST1 n, Object o) { unimplementedVisitor("visit(InstantiationAST1, Object)"); }
+
+    public void visit(GTRuleBodyAST0 n) { unimplementedVisitor("visit(GTRuleBodyAST0)"); }
+    public void visit(GTRuleBodyAST0 n, Object o) { unimplementedVisitor("visit(GTRuleBodyAST0, Object)"); }
+
+    public void visit(GTRuleBodyAST1 n) { unimplementedVisitor("visit(GTRuleBodyAST1)"); }
+    public void visit(GTRuleBodyAST1 n, Object o) { unimplementedVisitor("visit(GTRuleBodyAST1, Object)"); }
+
+    public void visit(PreconditionDefAST0 n) { unimplementedVisitor("visit(PreconditionDefAST0)"); }
+    public void visit(PreconditionDefAST0 n, Object o) { unimplementedVisitor("visit(PreconditionDefAST0, Object)"); }
+
+    public void visit(PreconditionDefAST1 n) { unimplementedVisitor("visit(PreconditionDefAST1)"); }
+    public void visit(PreconditionDefAST1 n, Object o) { unimplementedVisitor("visit(PreconditionDefAST1, Object)"); }
+
+    public void visit(PostconditionOptAST0 n) { unimplementedVisitor("visit(PostconditionOptAST0)"); }
+    public void visit(PostconditionOptAST0 n, Object o) { unimplementedVisitor("visit(PostconditionOptAST0, Object)"); }
+
+    public void visit(PostconditionOptAST1 n) { unimplementedVisitor("visit(PostconditionOptAST1)"); }
+    public void visit(PostconditionOptAST1 n, Object o) { unimplementedVisitor("visit(PostconditionOptAST1, Object)"); }
+
+    public void visit(LogicalTermAST0 n) { unimplementedVisitor("visit(LogicalTermAST0)"); }
+    public void visit(LogicalTermAST0 n, Object o) { unimplementedVisitor("visit(LogicalTermAST0, Object)"); }
+
+    public void visit(LogicalTermAST1 n) { unimplementedVisitor("visit(LogicalTermAST1)"); }
+    public void visit(LogicalTermAST1 n, Object o) { unimplementedVisitor("visit(LogicalTermAST1, Object)"); }
+
+    public void visit(EqualityTermAST0 n) { unimplementedVisitor("visit(EqualityTermAST0)"); }
+    public void visit(EqualityTermAST0 n, Object o) { unimplementedVisitor("visit(EqualityTermAST0, Object)"); }
+
+    public void visit(EqualityTermAST1 n) { unimplementedVisitor("visit(EqualityTermAST1)"); }
+    public void visit(EqualityTermAST1 n, Object o) { unimplementedVisitor("visit(EqualityTermAST1, Object)"); }
+
+    public void visit(ArithmeticTermAST0 n) { unimplementedVisitor("visit(ArithmeticTermAST0)"); }
+    public void visit(ArithmeticTermAST0 n, Object o) { unimplementedVisitor("visit(ArithmeticTermAST0, Object)"); }
+
+    public void visit(ArithmeticTermAST1 n) { unimplementedVisitor("visit(ArithmeticTermAST1)"); }
+    public void visit(ArithmeticTermAST1 n, Object o) { unimplementedVisitor("visit(ArithmeticTermAST1, Object)"); }
+
+    public void visit(MultArithmeticTermAST0 n) { unimplementedVisitor("visit(MultArithmeticTermAST0)"); }
+    public void visit(MultArithmeticTermAST0 n, Object o) { unimplementedVisitor("visit(MultArithmeticTermAST0, Object)"); }
+
+    public void visit(MultArithmeticTermAST1 n) { unimplementedVisitor("visit(MultArithmeticTermAST1)"); }
+    public void visit(MultArithmeticTermAST1 n, Object o) { unimplementedVisitor("visit(MultArithmeticTermAST1, Object)"); }
+
+    public void visit(MultArithmeticTermAST2 n) { unimplementedVisitor("visit(MultArithmeticTermAST2)"); }
+    public void visit(MultArithmeticTermAST2 n, Object o) { unimplementedVisitor("visit(MultArithmeticTermAST2, Object)"); }
+
+    public void visit(UnaryArithmeticTermAST0 n) { unimplementedVisitor("visit(UnaryArithmeticTermAST0)"); }
+    public void visit(UnaryArithmeticTermAST0 n, Object o) { unimplementedVisitor("visit(UnaryArithmeticTermAST0, Object)"); }
+
+    public void visit(UnaryArithmeticTermAST1 n) { unimplementedVisitor("visit(UnaryArithmeticTermAST1)"); }
+    public void visit(UnaryArithmeticTermAST1 n, Object o) { unimplementedVisitor("visit(UnaryArithmeticTermAST1, Object)"); }
+
+    public void visit(ArityOrTypeDeclAST0 n) { unimplementedVisitor("visit(ArityOrTypeDeclAST0)"); }
+    public void visit(ArityOrTypeDeclAST0 n, Object o) { unimplementedVisitor("visit(ArityOrTypeDeclAST0, Object)"); }
+
+    public void visit(ArityOrTypeDeclAST1 n) { unimplementedVisitor("visit(ArityOrTypeDeclAST1)"); }
+    public void visit(ArityOrTypeDeclAST1 n, Object o) { unimplementedVisitor("visit(ArityOrTypeDeclAST1, Object)"); }
+
+    public void visit(InitialValuesOptAST0 n) { unimplementedVisitor("visit(InitialValuesOptAST0)"); }
+    public void visit(InitialValuesOptAST0 n, Object o) { unimplementedVisitor("visit(InitialValuesOptAST0, Object)"); }
+
+    public void visit(InitialValuesOptAST1 n) { unimplementedVisitor("visit(InitialValuesOptAST1)"); }
+    public void visit(InitialValuesOptAST1 n, Object o) { unimplementedVisitor("visit(InitialValuesOptAST1, Object)"); }
+
+    public void visit(TypeConstantsAST0 n) { unimplementedVisitor("visit(TypeConstantsAST0)"); }
+    public void visit(TypeConstantsAST0 n, Object o) { unimplementedVisitor("visit(TypeConstantsAST0, Object)"); }
+
+    public void visit(TypeConstantsAST1 n) { unimplementedVisitor("visit(TypeConstantsAST1)"); }
+    public void visit(TypeConstantsAST1 n, Object o) { unimplementedVisitor("visit(TypeConstantsAST1, Object)"); }
+
+    public void visit(PredefinedFunctionCallAST0 n) { unimplementedVisitor("visit(PredefinedFunctionCallAST0)"); }
+    public void visit(PredefinedFunctionCallAST0 n, Object o) { unimplementedVisitor("visit(PredefinedFunctionCallAST0, Object)"); }
+
+    public void visit(PredefinedFunctionCallAST1 n) { unimplementedVisitor("visit(PredefinedFunctionCallAST1)"); }
+    public void visit(PredefinedFunctionCallAST1 n, Object o) { unimplementedVisitor("visit(PredefinedFunctionCallAST1, Object)"); }
+
+    public void visit(UpdateRuleAST0 n) { unimplementedVisitor("visit(UpdateRuleAST0)"); }
+    public void visit(UpdateRuleAST0 n, Object o) { unimplementedVisitor("visit(UpdateRuleAST0, Object)"); }
+
+    public void visit(UpdateRuleAST1 n) { unimplementedVisitor("visit(UpdateRuleAST1)"); }
+    public void visit(UpdateRuleAST1 n, Object o) { unimplementedVisitor("visit(UpdateRuleAST1, Object)"); }
+
+    public void visit(PrintRuleAST0 n) { unimplementedVisitor("visit(PrintRuleAST0)"); }
+    public void visit(PrintRuleAST0 n, Object o) { unimplementedVisitor("visit(PrintRuleAST0, Object)"); }
+
+    public void visit(PrintRuleAST1 n) { unimplementedVisitor("visit(PrintRuleAST1)"); }
+    public void visit(PrintRuleAST1 n, Object o) { unimplementedVisitor("visit(PrintRuleAST1, Object)"); }
+
+    public void visit(PrintRuleAST2 n) { unimplementedVisitor("visit(PrintRuleAST2)"); }
+    public void visit(PrintRuleAST2 n, Object o) { unimplementedVisitor("visit(PrintRuleAST2, Object)"); }
+
+    public void visit(PrintRuleAST3 n) { unimplementedVisitor("visit(PrintRuleAST3)"); }
+    public void visit(PrintRuleAST3 n, Object o) { unimplementedVisitor("visit(PrintRuleAST3, Object)"); }
+
+    public void visit(DoActionOptAST0 n) { unimplementedVisitor("visit(DoActionOptAST0)"); }
+    public void visit(DoActionOptAST0 n, Object o) { unimplementedVisitor("visit(DoActionOptAST0, Object)"); }
+
+    public void visit(DoActionOptAST1 n) { unimplementedVisitor("visit(DoActionOptAST1)"); }
+    public void visit(DoActionOptAST1 n, Object o) { unimplementedVisitor("visit(DoActionOptAST1, Object)"); }
+
+    public void visit(IfRuleAST0 n) { unimplementedVisitor("visit(IfRuleAST0)"); }
+    public void visit(IfRuleAST0 n, Object o) { unimplementedVisitor("visit(IfRuleAST0, Object)"); }
+
+    public void visit(IfRuleAST1 n) { unimplementedVisitor("visit(IfRuleAST1)"); }
+    public void visit(IfRuleAST1 n, Object o) { unimplementedVisitor("visit(IfRuleAST1, Object)"); }
+
+    public void visit(TryRuleAST0 n) { unimplementedVisitor("visit(TryRuleAST0)"); }
+    public void visit(TryRuleAST0 n, Object o) { unimplementedVisitor("visit(TryRuleAST0, Object)"); }
+
+    public void visit(TryRuleAST1 n) { unimplementedVisitor("visit(TryRuleAST1)"); }
+    public void visit(TryRuleAST1 n, Object o) { unimplementedVisitor("visit(TryRuleAST1, Object)"); }
+
+    public void visit(WhenChangeAST0 n) { unimplementedVisitor("visit(WhenChangeAST0)"); }
+    public void visit(WhenChangeAST0 n, Object o) { unimplementedVisitor("visit(WhenChangeAST0, Object)"); }
+
+    public void visit(WhenChangeAST1 n) { unimplementedVisitor("visit(WhenChangeAST1)"); }
+    public void visit(WhenChangeAST1 n, Object o) { unimplementedVisitor("visit(WhenChangeAST1, Object)"); }
+
+    public void visit(WhenChangeAST2 n) { unimplementedVisitor("visit(WhenChangeAST2)"); }
+    public void visit(WhenChangeAST2 n, Object o) { unimplementedVisitor("visit(WhenChangeAST2, Object)"); }
+
+    public void visit(CreateRuleAST0 n) { unimplementedVisitor("visit(CreateRuleAST0)"); }
+    public void visit(CreateRuleAST0 n, Object o) { unimplementedVisitor("visit(CreateRuleAST0, Object)"); }
+
+    public void visit(CreateRuleAST1 n) { unimplementedVisitor("visit(CreateRuleAST1)"); }
+    public void visit(CreateRuleAST1 n, Object o) { unimplementedVisitor("visit(CreateRuleAST1, Object)"); }
+
+    public void visit(CreateModelElementAST0 n) { unimplementedVisitor("visit(CreateModelElementAST0)"); }
+    public void visit(CreateModelElementAST0 n, Object o) { unimplementedVisitor("visit(CreateModelElementAST0, Object)"); }
+
+    public void visit(CreateModelElementAST1 n) { unimplementedVisitor("visit(CreateModelElementAST1)"); }
+    public void visit(CreateModelElementAST1 n, Object o) { unimplementedVisitor("visit(CreateModelElementAST1, Object)"); }
+
+    public void visit(CreateRelationshipAST0 n) { unimplementedVisitor("visit(CreateRelationshipAST0)"); }
+    public void visit(CreateRelationshipAST0 n, Object o) { unimplementedVisitor("visit(CreateRelationshipAST0, Object)"); }
+
+    public void visit(CreateRelationshipAST1 n) { unimplementedVisitor("visit(CreateRelationshipAST1)"); }
+    public void visit(CreateRelationshipAST1 n, Object o) { unimplementedVisitor("visit(CreateRelationshipAST1, Object)"); }
+
+    public void visit(CreateRelationshipAST2 n) { unimplementedVisitor("visit(CreateRelationshipAST2)"); }
+    public void visit(CreateRelationshipAST2 n, Object o) { unimplementedVisitor("visit(CreateRelationshipAST2, Object)"); }
+
+    public void visit(CreateRelationshipAST3 n) { unimplementedVisitor("visit(CreateRelationshipAST3)"); }
+    public void visit(CreateRelationshipAST3 n, Object o) { unimplementedVisitor("visit(CreateRelationshipAST3, Object)"); }
+
+    public void visit(DeleteRuleAST0 n) { unimplementedVisitor("visit(DeleteRuleAST0)"); }
+    public void visit(DeleteRuleAST0 n, Object o) { unimplementedVisitor("visit(DeleteRuleAST0, Object)"); }
+
+    public void visit(DeleteRuleAST1 n) { unimplementedVisitor("visit(DeleteRuleAST1)"); }
+    public void visit(DeleteRuleAST1 n, Object o) { unimplementedVisitor("visit(DeleteRuleAST1, Object)"); }
+
+    public void visit(DeleteSemanticsAST0 n) { unimplementedVisitor("visit(DeleteSemanticsAST0)"); }
+    public void visit(DeleteSemanticsAST0 n, Object o) { unimplementedVisitor("visit(DeleteSemanticsAST0, Object)"); }
+
+    public void visit(DeleteSemanticsAST1 n) { unimplementedVisitor("visit(DeleteSemanticsAST1)"); }
+    public void visit(DeleteSemanticsAST1 n, Object o) { unimplementedVisitor("visit(DeleteSemanticsAST1, Object)"); }
+
+    public void visit(DeleteRelationshipAST0 n) { unimplementedVisitor("visit(DeleteRelationshipAST0)"); }
+    public void visit(DeleteRelationshipAST0 n, Object o) { unimplementedVisitor("visit(DeleteRelationshipAST0, Object)"); }
+
+    public void visit(DeleteRelationshipAST1 n) { unimplementedVisitor("visit(DeleteRelationshipAST1)"); }
+    public void visit(DeleteRelationshipAST1 n, Object o) { unimplementedVisitor("visit(DeleteRelationshipAST1, Object)"); }
+
+    public void visit(DeleteRelationshipAST2 n) { unimplementedVisitor("visit(DeleteRelationshipAST2)"); }
+    public void visit(DeleteRelationshipAST2 n, Object o) { unimplementedVisitor("visit(DeleteRelationshipAST2, Object)"); }
+
+    public void visit(DeleteRelationshipAST3 n) { unimplementedVisitor("visit(DeleteRelationshipAST3)"); }
+    public void visit(DeleteRelationshipAST3 n, Object o) { unimplementedVisitor("visit(DeleteRelationshipAST3, Object)"); }
+
+    public void visit(CopySemanticsAST0 n) { unimplementedVisitor("visit(CopySemanticsAST0)"); }
+    public void visit(CopySemanticsAST0 n, Object o) { unimplementedVisitor("visit(CopySemanticsAST0, Object)"); }
+
+    public void visit(CopySemanticsAST1 n) { unimplementedVisitor("visit(CopySemanticsAST1)"); }
+    public void visit(CopySemanticsAST1 n, Object o) { unimplementedVisitor("visit(CopySemanticsAST1, Object)"); }
+
+    public void visit(TypeNameAST0 n) { unimplementedVisitor("visit(TypeNameAST0)"); }
+    public void visit(TypeNameAST0 n, Object o) { unimplementedVisitor("visit(TypeNameAST0, Object)"); }
+
+    public void visit(TypeNameAST1 n) { unimplementedVisitor("visit(TypeNameAST1)"); }
+    public void visit(TypeNameAST1 n, Object o) { unimplementedVisitor("visit(TypeNameAST1, Object)"); }
+
+    public void visit(TypeNameAST2 n) { unimplementedVisitor("visit(TypeNameAST2)"); }
+    public void visit(TypeNameAST2 n, Object o) { unimplementedVisitor("visit(TypeNameAST2, Object)"); }
+
+    public void visit(TypeNameAST3 n) { unimplementedVisitor("visit(TypeNameAST3)"); }
+    public void visit(TypeNameAST3 n, Object o) { unimplementedVisitor("visit(TypeNameAST3, Object)"); }
+
+    public void visit(ValueLocalNameAST0 n) { unimplementedVisitor("visit(ValueLocalNameAST0)"); }
+    public void visit(ValueLocalNameAST0 n, Object o) { unimplementedVisitor("visit(ValueLocalNameAST0, Object)"); }
+
+    public void visit(ValueLocalNameAST1 n) { unimplementedVisitor("visit(ValueLocalNameAST1)"); }
+    public void visit(ValueLocalNameAST1 n, Object o) { unimplementedVisitor("visit(ValueLocalNameAST1, Object)"); }
+
+    public void visit(FormalParameterDefAST0 n) { unimplementedVisitor("visit(FormalParameterDefAST0)"); }
+    public void visit(FormalParameterDefAST0 n, Object o) { unimplementedVisitor("visit(FormalParameterDefAST0, Object)"); }
+
+    public void visit(FormalParameterDefAST1 n) { unimplementedVisitor("visit(FormalParameterDefAST1)"); }
+    public void visit(FormalParameterDefAST1 n, Object o) { unimplementedVisitor("visit(FormalParameterDefAST1, Object)"); }
+
+    public void visit(FormalParamsAST0 n) { unimplementedVisitor("visit(FormalParamsAST0)"); }
+    public void visit(FormalParamsAST0 n, Object o) { unimplementedVisitor("visit(FormalParamsAST0, Object)"); }
+
+    public void visit(FormalParamsAST1 n) { unimplementedVisitor("visit(FormalParamsAST1)"); }
+    public void visit(FormalParamsAST1 n, Object o) { unimplementedVisitor("visit(FormalParamsAST1, Object)"); }
+
+    public void visit(DirectedFormalParameterDefAST0 n) { unimplementedVisitor("visit(DirectedFormalParameterDefAST0)"); }
+    public void visit(DirectedFormalParameterDefAST0 n, Object o) { unimplementedVisitor("visit(DirectedFormalParameterDefAST0, Object)"); }
+
+    public void visit(DirectedFormalParameterDefAST1 n) { unimplementedVisitor("visit(DirectedFormalParameterDefAST1)"); }
+    public void visit(DirectedFormalParameterDefAST1 n, Object o) { unimplementedVisitor("visit(DirectedFormalParameterDefAST1, Object)"); }
+
+    public void visit(DirectedFormalParamsAST0 n) { unimplementedVisitor("visit(DirectedFormalParamsAST0)"); }
+    public void visit(DirectedFormalParamsAST0 n, Object o) { unimplementedVisitor("visit(DirectedFormalParamsAST0, Object)"); }
+
+    public void visit(DirectedFormalParamsAST1 n) { unimplementedVisitor("visit(DirectedFormalParamsAST1)"); }
+    public void visit(DirectedFormalParamsAST1 n, Object o) { unimplementedVisitor("visit(DirectedFormalParamsAST1, Object)"); }
+
+    public void visit(DirectionKindAST0 n) { unimplementedVisitor("visit(DirectionKindAST0)"); }
+    public void visit(DirectionKindAST0 n, Object o) { unimplementedVisitor("visit(DirectionKindAST0, Object)"); }
+
+    public void visit(DirectionKindAST1 n) { unimplementedVisitor("visit(DirectionKindAST1)"); }
+    public void visit(DirectionKindAST1 n, Object o) { unimplementedVisitor("visit(DirectionKindAST1, Object)"); }
+
+    public void visit(DirectionKindAST2 n) { unimplementedVisitor("visit(DirectionKindAST2)"); }
+    public void visit(DirectionKindAST2 n, Object o) { unimplementedVisitor("visit(DirectionKindAST2, Object)"); }
+
+    public void visit(ActualParameterDefAST0 n) { unimplementedVisitor("visit(ActualParameterDefAST0)"); }
+    public void visit(ActualParameterDefAST0 n, Object o) { unimplementedVisitor("visit(ActualParameterDefAST0, Object)"); }
+
+    public void visit(ActualParameterDefAST1 n) { unimplementedVisitor("visit(ActualParameterDefAST1)"); }
+    public void visit(ActualParameterDefAST1 n, Object o) { unimplementedVisitor("visit(ActualParameterDefAST1, Object)"); }
+
+    public void visit(ActualPatternParameterDefAST0 n) { unimplementedVisitor("visit(ActualPatternParameterDefAST0)"); }
+    public void visit(ActualPatternParameterDefAST0 n, Object o) { unimplementedVisitor("visit(ActualPatternParameterDefAST0, Object)"); }
+
+    public void visit(ActualPatternParameterDefAST1 n) { unimplementedVisitor("visit(ActualPatternParameterDefAST1)"); }
+    public void visit(ActualPatternParameterDefAST1 n, Object o) { unimplementedVisitor("visit(ActualPatternParameterDefAST1, Object)"); }
+
+    public void visit(ConstrainedVariablesAST0 n) { unimplementedVisitor("visit(ConstrainedVariablesAST0)"); }
+    public void visit(ConstrainedVariablesAST0 n, Object o) { unimplementedVisitor("visit(ConstrainedVariablesAST0, Object)"); }
+
+    public void visit(ConstrainedVariablesAST1 n) { unimplementedVisitor("visit(ConstrainedVariablesAST1)"); }
+    public void visit(ConstrainedVariablesAST1 n, Object o) { unimplementedVisitor("visit(ConstrainedVariablesAST1, Object)"); }
+
+    public void visit(ContainmentConstraintOptAST0 n) { unimplementedVisitor("visit(ContainmentConstraintOptAST0)"); }
+    public void visit(ContainmentConstraintOptAST0 n, Object o) { unimplementedVisitor("visit(ContainmentConstraintOptAST0, Object)"); }
+
+    public void visit(ContainmentConstraintOptAST1 n) { unimplementedVisitor("visit(ContainmentConstraintOptAST1)"); }
+    public void visit(ContainmentConstraintOptAST1 n, Object o) { unimplementedVisitor("visit(ContainmentConstraintOptAST1, Object)"); }
+
+    public void visit(BooleanConstantAST0 n) { unimplementedVisitor("visit(BooleanConstantAST0)"); }
+    public void visit(BooleanConstantAST0 n, Object o) { unimplementedVisitor("visit(BooleanConstantAST0, Object)"); }
+
+    public void visit(BooleanConstantAST1 n) { unimplementedVisitor("visit(BooleanConstantAST1)"); }
+    public void visit(BooleanConstantAST1 n, Object o) { unimplementedVisitor("visit(BooleanConstantAST1, Object)"); }
+
+    public void visit(MultiplicityConstantAST0 n) { unimplementedVisitor("visit(MultiplicityConstantAST0)"); }
+    public void visit(MultiplicityConstantAST0 n, Object o) { unimplementedVisitor("visit(MultiplicityConstantAST0, Object)"); }
+
+    public void visit(MultiplicityConstantAST1 n) { unimplementedVisitor("visit(MultiplicityConstantAST1)"); }
+    public void visit(MultiplicityConstantAST1 n, Object o) { unimplementedVisitor("visit(MultiplicityConstantAST1, Object)"); }
+
+    public void visit(MultiplicityConstantAST2 n) { unimplementedVisitor("visit(MultiplicityConstantAST2)"); }
+    public void visit(MultiplicityConstantAST2 n, Object o) { unimplementedVisitor("visit(MultiplicityConstantAST2, Object)"); }
+
+    public void visit(MultiplicityConstantAST3 n) { unimplementedVisitor("visit(MultiplicityConstantAST3)"); }
+    public void visit(MultiplicityConstantAST3 n, Object o) { unimplementedVisitor("visit(MultiplicityConstantAST3, Object)"); }
+
+    public void visit(NumericConstantAST0 n) { unimplementedVisitor("visit(NumericConstantAST0)"); }
+    public void visit(NumericConstantAST0 n, Object o) { unimplementedVisitor("visit(NumericConstantAST0, Object)"); }
+
+    public void visit(NumericConstantAST1 n) { unimplementedVisitor("visit(NumericConstantAST1)"); }
+    public void visit(NumericConstantAST1 n, Object o) { unimplementedVisitor("visit(NumericConstantAST1, Object)"); }
+
+    public void visit(NumericConstantAST2 n) { unimplementedVisitor("visit(NumericConstantAST2)"); }
+    public void visit(NumericConstantAST2 n, Object o) { unimplementedVisitor("visit(NumericConstantAST2, Object)"); }
+
+    public void visit(NumericConstantAST3 n) { unimplementedVisitor("visit(NumericConstantAST3)"); }
+    public void visit(NumericConstantAST3 n, Object o) { unimplementedVisitor("visit(NumericConstantAST3, Object)"); }
+}
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActionOptAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActionOptAST.java
new file mode 100644
index 0000000..a357181
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActionOptAST.java
@@ -0,0 +1,73 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 69:  ActionOptAST ::= $Empty
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 70:  ActionOptAST ::= action LBRACE AsmRulesAST RBRACE
+ *</b>
+ */
+public class ActionOptAST extends ASTNode implements IActionOptAST
+{
+    private AsmRulesAST _AsmRulesAST;
+
+    public AsmRulesAST getAsmRulesAST() { return _AsmRulesAST; }
+
+    public ActionOptAST(IToken leftIToken, IToken rightIToken,
+                        AsmRulesAST _AsmRulesAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._AsmRulesAST = _AsmRulesAST;
+        ((ASTNode) _AsmRulesAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ActionOptAST)) return false;
+        ActionOptAST other = (ActionOptAST) o;
+        if (! _AsmRulesAST.equals(other.getAsmRulesAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getAsmRulesAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActualParameterDefAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActualParameterDefAST0.java
new file mode 100644
index 0000000..7529074
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActualParameterDefAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 265:  ActualParameterDefAST ::= LPAREN ActualParamsAST RPAREN
+ *</b>
+ */
+public class ActualParameterDefAST0 extends ASTNode implements IActualParameterDefAST
+{
+    private IActualParamsAST _ActualParamsAST;
+
+    public IActualParamsAST getActualParamsAST() { return _ActualParamsAST; }
+
+    public ActualParameterDefAST0(IToken leftIToken, IToken rightIToken,
+                                  IActualParamsAST _ActualParamsAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ActualParamsAST = _ActualParamsAST;
+        ((ASTNode) _ActualParamsAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ActualParameterDefAST0)) return false;
+        ActualParameterDefAST0 other = (ActualParameterDefAST0) o;
+        if (! _ActualParamsAST.equals(other.getActualParamsAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getActualParamsAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActualParameterDefAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActualParameterDefAST1.java
new file mode 100644
index 0000000..f4aa5cc
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActualParameterDefAST1.java
@@ -0,0 +1,59 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 266:  ActualParameterDefAST ::= LPAREN RPAREN
+ *</b>
+ */
+public class ActualParameterDefAST1 extends ASTNode implements IActualParameterDefAST
+{
+    public ActualParameterDefAST1(IToken leftIToken, IToken rightIToken)
+    {
+        super(leftIToken, rightIToken);
+
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ActualParameterDefAST1)) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActualParamsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActualParamsAST.java
new file mode 100644
index 0000000..89e63e4
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActualParamsAST.java
@@ -0,0 +1,80 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 267:  ActualParamsAST ::= ArithmeticTermAST
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 268:  ActualParamsAST ::= ActualParamsAST COMMA ArithmeticTermAST
+ *</b>
+ */
+public class ActualParamsAST extends ASTNode implements IActualParamsAST
+{
+    private IActualParamsAST _ActualParamsAST;
+    private IArithmeticTermAST _ArithmeticTermAST;
+
+    public IActualParamsAST getActualParamsAST() { return _ActualParamsAST; }
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+
+    public ActualParamsAST(IToken leftIToken, IToken rightIToken,
+                           IActualParamsAST _ActualParamsAST,
+                           IArithmeticTermAST _ArithmeticTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ActualParamsAST = _ActualParamsAST;
+        ((ASTNode) _ActualParamsAST).setParent(this);
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ActualParamsAST)) return false;
+        ActualParamsAST other = (ActualParamsAST) o;
+        if (! _ActualParamsAST.equals(other.getActualParamsAST())) return false;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getActualParamsAST().hashCode());
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActualParamsPatternVariablesAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActualParamsPatternVariablesAST.java
new file mode 100644
index 0000000..701fd58
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActualParamsPatternVariablesAST.java
@@ -0,0 +1,80 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 271:  ActualParamsPatternVariablesAST ::= PatternVariableRefAST
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 272:  ActualParamsPatternVariablesAST ::= ActualParamsPatternVariablesAST COMMA PatternVariableRefAST
+ *</b>
+ */
+public class ActualParamsPatternVariablesAST extends ASTNode implements IActualParamsPatternVariablesAST
+{
+    private IActualParamsPatternVariablesAST _ActualParamsPatternVariablesAST;
+    private PatternVariableRefAST _PatternVariableRefAST;
+
+    public IActualParamsPatternVariablesAST getActualParamsPatternVariablesAST() { return _ActualParamsPatternVariablesAST; }
+    public PatternVariableRefAST getPatternVariableRefAST() { return _PatternVariableRefAST; }
+
+    public ActualParamsPatternVariablesAST(IToken leftIToken, IToken rightIToken,
+                                           IActualParamsPatternVariablesAST _ActualParamsPatternVariablesAST,
+                                           PatternVariableRefAST _PatternVariableRefAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ActualParamsPatternVariablesAST = _ActualParamsPatternVariablesAST;
+        ((ASTNode) _ActualParamsPatternVariablesAST).setParent(this);
+        this._PatternVariableRefAST = _PatternVariableRefAST;
+        ((ASTNode) _PatternVariableRefAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ActualParamsPatternVariablesAST)) return false;
+        ActualParamsPatternVariablesAST other = (ActualParamsPatternVariablesAST) o;
+        if (! _ActualParamsPatternVariablesAST.equals(other.getActualParamsPatternVariablesAST())) return false;
+        if (! _PatternVariableRefAST.equals(other.getPatternVariableRefAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getActualParamsPatternVariablesAST().hashCode());
+        hash = hash * 31 + (getPatternVariableRefAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActualPatternParameterDefAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActualPatternParameterDefAST0.java
new file mode 100644
index 0000000..b7957fc
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActualPatternParameterDefAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 269:  ActualPatternParameterDefAST ::= LPAREN ActualParamsPatternVariablesAST RPAREN
+ *</b>
+ */
+public class ActualPatternParameterDefAST0 extends ASTNode implements IActualPatternParameterDefAST
+{
+    private IActualParamsPatternVariablesAST _ActualParamsPatternVariablesAST;
+
+    public IActualParamsPatternVariablesAST getActualParamsPatternVariablesAST() { return _ActualParamsPatternVariablesAST; }
+
+    public ActualPatternParameterDefAST0(IToken leftIToken, IToken rightIToken,
+                                         IActualParamsPatternVariablesAST _ActualParamsPatternVariablesAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ActualParamsPatternVariablesAST = _ActualParamsPatternVariablesAST;
+        ((ASTNode) _ActualParamsPatternVariablesAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ActualPatternParameterDefAST0)) return false;
+        ActualPatternParameterDefAST0 other = (ActualPatternParameterDefAST0) o;
+        if (! _ActualParamsPatternVariablesAST.equals(other.getActualParamsPatternVariablesAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getActualParamsPatternVariablesAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActualPatternParameterDefAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActualPatternParameterDefAST1.java
new file mode 100644
index 0000000..dd868b8
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ActualPatternParameterDefAST1.java
@@ -0,0 +1,59 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 270:  ActualPatternParameterDefAST ::= LPAREN RPAREN
+ *</b>
+ */
+public class ActualPatternParameterDefAST1 extends ASTNode implements IActualPatternParameterDefAST
+{
+    public ActualPatternParameterDefAST1(IToken leftIToken, IToken rightIToken)
+    {
+        super(leftIToken, rightIToken);
+
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ActualPatternParameterDefAST1)) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AnnotationAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AnnotationAST.java
new file mode 100644
index 0000000..b8392e3
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AnnotationAST.java
@@ -0,0 +1,80 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 387:  AnnotationAST ::= AnnotationNameAST
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 388:  AnnotationAST ::= AnnotationNameAST LPAREN AnnotationBodyAST RPAREN
+ *</b>
+ */
+public class AnnotationAST extends ASTNode implements IAnnotationAST
+{
+    private AnnotationNameAST _AnnotationNameAST;
+    private IAnnotationBodyAST _AnnotationBodyAST;
+
+    public AnnotationNameAST getAnnotationNameAST() { return _AnnotationNameAST; }
+    public IAnnotationBodyAST getAnnotationBodyAST() { return _AnnotationBodyAST; }
+
+    public AnnotationAST(IToken leftIToken, IToken rightIToken,
+                         AnnotationNameAST _AnnotationNameAST,
+                         IAnnotationBodyAST _AnnotationBodyAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._AnnotationNameAST = _AnnotationNameAST;
+        ((ASTNode) _AnnotationNameAST).setParent(this);
+        this._AnnotationBodyAST = _AnnotationBodyAST;
+        ((ASTNode) _AnnotationBodyAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof AnnotationAST)) return false;
+        AnnotationAST other = (AnnotationAST) o;
+        if (! _AnnotationNameAST.equals(other.getAnnotationNameAST())) return false;
+        if (! _AnnotationBodyAST.equals(other.getAnnotationBodyAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getAnnotationNameAST().hashCode());
+        hash = hash * 31 + (getAnnotationBodyAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AnnotationBodyAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AnnotationBodyAST.java
new file mode 100644
index 0000000..47fcbf2
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AnnotationBodyAST.java
@@ -0,0 +1,80 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 389:  AnnotationBodyAST ::= KeyValuePairAST
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 390:  AnnotationBodyAST ::= AnnotationBodyAST COMMA KeyValuePairAST
+ *</b>
+ */
+public class AnnotationBodyAST extends ASTNode implements IAnnotationBodyAST
+{
+    private IAnnotationBodyAST _AnnotationBodyAST;
+    private KeyValuePairAST _KeyValuePairAST;
+
+    public IAnnotationBodyAST getAnnotationBodyAST() { return _AnnotationBodyAST; }
+    public KeyValuePairAST getKeyValuePairAST() { return _KeyValuePairAST; }
+
+    public AnnotationBodyAST(IToken leftIToken, IToken rightIToken,
+                             IAnnotationBodyAST _AnnotationBodyAST,
+                             KeyValuePairAST _KeyValuePairAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._AnnotationBodyAST = _AnnotationBodyAST;
+        ((ASTNode) _AnnotationBodyAST).setParent(this);
+        this._KeyValuePairAST = _KeyValuePairAST;
+        ((ASTNode) _KeyValuePairAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof AnnotationBodyAST)) return false;
+        AnnotationBodyAST other = (AnnotationBodyAST) o;
+        if (! _AnnotationBodyAST.equals(other.getAnnotationBodyAST())) return false;
+        if (! _KeyValuePairAST.equals(other.getKeyValuePairAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getAnnotationBodyAST().hashCode());
+        hash = hash * 31 + (getKeyValuePairAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AnnotationNameAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AnnotationNameAST.java
new file mode 100644
index 0000000..2eaa5e8
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AnnotationNameAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 392:  AnnotationNameAST ::= AnnotationLiteral
+ *</b>
+ */
+public class AnnotationNameAST extends ASTNodeToken implements IAnnotationNameAST
+{
+    public AnnotationNameAST(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AnnotationsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AnnotationsAST.java
new file mode 100644
index 0000000..d9b0617
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AnnotationsAST.java
@@ -0,0 +1,80 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 385:  AnnotationsAST ::= AnnotationAST
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 386:  AnnotationsAST ::= AnnotationsAST AnnotationAST
+ *</b>
+ */
+public class AnnotationsAST extends ASTNode implements IAnnotationsAST
+{
+    private IAnnotationsAST _AnnotationsAST;
+    private IAnnotationAST _AnnotationAST;
+
+    public IAnnotationsAST getAnnotationsAST() { return _AnnotationsAST; }
+    public IAnnotationAST getAnnotationAST() { return _AnnotationAST; }
+
+    public AnnotationsAST(IToken leftIToken, IToken rightIToken,
+                          IAnnotationsAST _AnnotationsAST,
+                          IAnnotationAST _AnnotationAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._AnnotationsAST = _AnnotationsAST;
+        ((ASTNode) _AnnotationsAST).setParent(this);
+        this._AnnotationAST = _AnnotationAST;
+        ((ASTNode) _AnnotationAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof AnnotationsAST)) return false;
+        AnnotationsAST other = (AnnotationsAST) o;
+        if (! _AnnotationsAST.equals(other.getAnnotationsAST())) return false;
+        if (! _AnnotationAST.equals(other.getAnnotationAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getAnnotationsAST().hashCode());
+        hash = hash * 31 + (getAnnotationAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ArgumentVisitor.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ArgumentVisitor.java
new file mode 100644
index 0000000..ecfb185
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ArgumentVisitor.java
@@ -0,0 +1,215 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+public interface ArgumentVisitor
+{
+    void visit(ASTNodeToken n, Object o);
+    void visit(VTCLFile n, Object o);
+    void visit(NamespaceDefAST n, Object o);
+    void visit(NamespaceImportsAST n, Object o);
+    void visit(GTASMDefAST n, Object o);
+    void visit(MachineContentsAST n, Object o);
+    void visit(MachineContentAST n, Object o);
+    void visit(GraphPatternDefAST n, Object o);
+    void visit(OptShareableDefAST n, Object o);
+    void visit(PatternBodiesAST n, Object o);
+    void visit(PatternBodyAST n, Object o);
+    void visit(PatternBodyContentsAST n, Object o);
+    void visit(PatternBodyContentAST n, Object o);
+    void visit(NegativePatternAST n, Object o);
+    void visit(PatternCompositionAST n, Object o);
+    void visit(PatternVariableAssignmentAST n, Object o);
+    void visit(NonInjectivityConstraintAST n, Object o);
+    void visit(CheckConditionAST n, Object o);
+    void visit(OptMatchCountAST n, Object o);
+    void visit(PatternVariableDefAST n, Object o);
+    void visit(PatternVariableRefAST n, Object o);
+    void visit(CounterVariableAST n, Object o);
+    void visit(GraphPatternCallAST n, Object o);
+    void visit(EntityAST n, Object o);
+    void visit(EntityBody n, Object o);
+    void visit(RelationAST n, Object o);
+    void visit(RelationBodyAST n, Object o);
+    void visit(RelationshipBodyAST n, Object o);
+    void visit(GTRuleDefAST n, Object o);
+    void visit(ActionOptAST n, Object o);
+    void visit(GTRuleCallAST n, Object o);
+    void visit(LogicalAndTermAST n, Object o);
+    void visit(RelationalTermAST n, Object o);
+    void visit(RelationalOpAST n, Object o);
+    void visit(BaseArithmeticTermAST n, Object o);
+    void visit(AsmFunctionDefAST n, Object o);
+    void visit(ArityAST n, Object o);
+    void visit(InitialValuesAST n, Object o);
+    void visit(InitialValueAST n, Object o);
+    void visit(AsmFunctionLocationAST n, Object o);
+    void visit(BuiltInFunctionNameAST n, Object o);
+    void visit(ConversionFunctionNameAST n, Object o);
+    void visit(AsmRuleDefAST n, Object o);
+    void visit(AsmRulesAST n, Object o);
+    void visit(AsmRulesOptAST n, Object o);
+    void visit(AsmRuleAST n, Object o);
+    void visit(SkipRuleAST n, Object o);
+    void visit(FailRuleAST n, Object o);
+    void visit(CallRuleAST n, Object o);
+    void visit(AsmFunctionUpdateLocationAST n, Object o);
+    void visit(LogRuleAST n, Object o);
+    void visit(LogLevelAST n, Object o);
+    void visit(SequentialRuleAST n, Object o);
+    void visit(ParallelRuleAST n, Object o);
+    void visit(RandomRuleAST n, Object o);
+    void visit(OptSemicolonAST n, Object o);
+    void visit(LetRuleAST n, Object o);
+    void visit(VariableDefinitionsAST n, Object o);
+    void visit(VariableDefinitionAST n, Object o);
+    void visit(IterateRuleAST n, Object o);
+    void visit(ChooseRuleAST n, Object o);
+    void visit(ForallRuleAST n, Object o);
+    void visit(WhenRuleAST n, Object o);
+    void visit(WhenConditionAST n, Object o);
+    void visit(CreateEntityBodyAST n, Object o);
+    void visit(CreateRelationBodyAST n, Object o);
+    void visit(InConstraintOptAST n, Object o);
+    void visit(DeleteContentsAST n, Object o);
+    void visit(DeleteSemanticsOptAST n, Object o);
+    void visit(CopyRuleAST n, Object o);
+    void visit(CopyContentsAST n, Object o);
+    void visit(MoveRuleAST n, Object o);
+    void visit(TwoParametersAST n, Object o);
+    void visit(ElementUpdateRuleAST n, Object o);
+    void visit(ElementUpdateOpAST n, Object o);
+    void visit(QualifiedTypeNameAST n, Object o);
+    void visit(VariableRefAST n, Object o);
+    void visit(VariableDefRefAST n, Object o);
+    void visit(VariableDefAST n, Object o);
+    void visit(ValueQualifiedNameAST n, Object o);
+    void visit(ActualParamsAST n, Object o);
+    void visit(ActualParamsPatternVariablesAST n, Object o);
+    void visit(TypeOptAST n, Object o);
+    void visit(ReturnTypeOptAST n, Object o);
+    void visit(UndefValueAST n, Object o);
+    void visit(StringConstantAST n, Object o);
+    void visit(KeywordAsIdentifier n, Object o);
+    void visit(AnnotationsAST n, Object o);
+    void visit(AnnotationAST n, Object o);
+    void visit(AnnotationBodyAST n, Object o);
+    void visit(KeyValuePairAST n, Object o);
+    void visit(AnnotationNameAST n, Object o);
+    void visit(NamespaceImportAST0 n, Object o);
+    void visit(NamespaceImportAST1 n, Object o);
+    void visit(PatternBodyContentDefAST0 n, Object o);
+    void visit(PatternBodyContentDefAST1 n, Object o);
+    void visit(PatternVariableDefRefAST0 n, Object o);
+    void visit(PatternVariableDefRefAST1 n, Object o);
+    void visit(InheritanceAST0 n, Object o);
+    void visit(InheritanceAST1 n, Object o);
+    void visit(InstantiationAST0 n, Object o);
+    void visit(InstantiationAST1 n, Object o);
+    void visit(GTRuleBodyAST0 n, Object o);
+    void visit(GTRuleBodyAST1 n, Object o);
+    void visit(PreconditionDefAST0 n, Object o);
+    void visit(PreconditionDefAST1 n, Object o);
+    void visit(PostconditionOptAST0 n, Object o);
+    void visit(PostconditionOptAST1 n, Object o);
+    void visit(LogicalTermAST0 n, Object o);
+    void visit(LogicalTermAST1 n, Object o);
+    void visit(EqualityTermAST0 n, Object o);
+    void visit(EqualityTermAST1 n, Object o);
+    void visit(ArithmeticTermAST0 n, Object o);
+    void visit(ArithmeticTermAST1 n, Object o);
+    void visit(MultArithmeticTermAST0 n, Object o);
+    void visit(MultArithmeticTermAST1 n, Object o);
+    void visit(MultArithmeticTermAST2 n, Object o);
+    void visit(UnaryArithmeticTermAST0 n, Object o);
+    void visit(UnaryArithmeticTermAST1 n, Object o);
+    void visit(ArityOrTypeDeclAST0 n, Object o);
+    void visit(ArityOrTypeDeclAST1 n, Object o);
+    void visit(InitialValuesOptAST0 n, Object o);
+    void visit(InitialValuesOptAST1 n, Object o);
+    void visit(TypeConstantsAST0 n, Object o);
+    void visit(TypeConstantsAST1 n, Object o);
+    void visit(PredefinedFunctionCallAST0 n, Object o);
+    void visit(PredefinedFunctionCallAST1 n, Object o);
+    void visit(UpdateRuleAST0 n, Object o);
+    void visit(UpdateRuleAST1 n, Object o);
+    void visit(PrintRuleAST0 n, Object o);
+    void visit(PrintRuleAST1 n, Object o);
+    void visit(PrintRuleAST2 n, Object o);
+    void visit(PrintRuleAST3 n, Object o);
+    void visit(DoActionOptAST0 n, Object o);
+    void visit(DoActionOptAST1 n, Object o);
+    void visit(IfRuleAST0 n, Object o);
+    void visit(IfRuleAST1 n, Object o);
+    void visit(TryRuleAST0 n, Object o);
+    void visit(TryRuleAST1 n, Object o);
+    void visit(WhenChangeAST0 n, Object o);
+    void visit(WhenChangeAST1 n, Object o);
+    void visit(WhenChangeAST2 n, Object o);
+    void visit(CreateRuleAST0 n, Object o);
+    void visit(CreateRuleAST1 n, Object o);
+    void visit(CreateModelElementAST0 n, Object o);
+    void visit(CreateModelElementAST1 n, Object o);
+    void visit(CreateRelationshipAST0 n, Object o);
+    void visit(CreateRelationshipAST1 n, Object o);
+    void visit(CreateRelationshipAST2 n, Object o);
+    void visit(CreateRelationshipAST3 n, Object o);
+    void visit(DeleteRuleAST0 n, Object o);
+    void visit(DeleteRuleAST1 n, Object o);
+    void visit(DeleteSemanticsAST0 n, Object o);
+    void visit(DeleteSemanticsAST1 n, Object o);
+    void visit(DeleteRelationshipAST0 n, Object o);
+    void visit(DeleteRelationshipAST1 n, Object o);
+    void visit(DeleteRelationshipAST2 n, Object o);
+    void visit(DeleteRelationshipAST3 n, Object o);
+    void visit(CopySemanticsAST0 n, Object o);
+    void visit(CopySemanticsAST1 n, Object o);
+    void visit(TypeNameAST0 n, Object o);
+    void visit(TypeNameAST1 n, Object o);
+    void visit(TypeNameAST2 n, Object o);
+    void visit(TypeNameAST3 n, Object o);
+    void visit(ValueLocalNameAST0 n, Object o);
+    void visit(ValueLocalNameAST1 n, Object o);
+    void visit(FormalParameterDefAST0 n, Object o);
+    void visit(FormalParameterDefAST1 n, Object o);
+    void visit(FormalParamsAST0 n, Object o);
+    void visit(FormalParamsAST1 n, Object o);
+    void visit(DirectedFormalParameterDefAST0 n, Object o);
+    void visit(DirectedFormalParameterDefAST1 n, Object o);
+    void visit(DirectedFormalParamsAST0 n, Object o);
+    void visit(DirectedFormalParamsAST1 n, Object o);
+    void visit(DirectionKindAST0 n, Object o);
+    void visit(DirectionKindAST1 n, Object o);
+    void visit(DirectionKindAST2 n, Object o);
+    void visit(ActualParameterDefAST0 n, Object o);
+    void visit(ActualParameterDefAST1 n, Object o);
+    void visit(ActualPatternParameterDefAST0 n, Object o);
+    void visit(ActualPatternParameterDefAST1 n, Object o);
+    void visit(ConstrainedVariablesAST0 n, Object o);
+    void visit(ConstrainedVariablesAST1 n, Object o);
+    void visit(ContainmentConstraintOptAST0 n, Object o);
+    void visit(ContainmentConstraintOptAST1 n, Object o);
+    void visit(BooleanConstantAST0 n, Object o);
+    void visit(BooleanConstantAST1 n, Object o);
+    void visit(MultiplicityConstantAST0 n, Object o);
+    void visit(MultiplicityConstantAST1 n, Object o);
+    void visit(MultiplicityConstantAST2 n, Object o);
+    void visit(MultiplicityConstantAST3 n, Object o);
+    void visit(NumericConstantAST0 n, Object o);
+    void visit(NumericConstantAST1 n, Object o);
+    void visit(NumericConstantAST2 n, Object o);
+    void visit(NumericConstantAST3 n, Object o);
+}
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ArithmeticTermAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ArithmeticTermAST0.java
new file mode 100644
index 0000000..d1d565e
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ArithmeticTermAST0.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 87:  ArithmeticTermAST ::= ArithmeticTermAST PLUS MultArithmeticTermAST
+ *</b>
+ */
+public class ArithmeticTermAST0 extends ASTNode implements IArithmeticTermAST
+{
+    private IArithmeticTermAST _ArithmeticTermAST;
+    private IMultArithmeticTermAST _MultArithmeticTermAST;
+
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+    public IMultArithmeticTermAST getMultArithmeticTermAST() { return _MultArithmeticTermAST; }
+
+    public ArithmeticTermAST0(IToken leftIToken, IToken rightIToken,
+                              IArithmeticTermAST _ArithmeticTermAST,
+                              IMultArithmeticTermAST _MultArithmeticTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        this._MultArithmeticTermAST = _MultArithmeticTermAST;
+        ((ASTNode) _MultArithmeticTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ArithmeticTermAST0)) return false;
+        ArithmeticTermAST0 other = (ArithmeticTermAST0) o;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        if (! _MultArithmeticTermAST.equals(other.getMultArithmeticTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        hash = hash * 31 + (getMultArithmeticTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ArithmeticTermAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ArithmeticTermAST1.java
new file mode 100644
index 0000000..9e003ac
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ArithmeticTermAST1.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 88:  ArithmeticTermAST ::= ArithmeticTermAST MINUS MultArithmeticTermAST
+ *</b>
+ */
+public class ArithmeticTermAST1 extends ASTNode implements IArithmeticTermAST
+{
+    private IArithmeticTermAST _ArithmeticTermAST;
+    private IMultArithmeticTermAST _MultArithmeticTermAST;
+
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+    public IMultArithmeticTermAST getMultArithmeticTermAST() { return _MultArithmeticTermAST; }
+
+    public ArithmeticTermAST1(IToken leftIToken, IToken rightIToken,
+                              IArithmeticTermAST _ArithmeticTermAST,
+                              IMultArithmeticTermAST _MultArithmeticTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        this._MultArithmeticTermAST = _MultArithmeticTermAST;
+        ((ASTNode) _MultArithmeticTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ArithmeticTermAST1)) return false;
+        ArithmeticTermAST1 other = (ArithmeticTermAST1) o;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        if (! _MultArithmeticTermAST.equals(other.getMultArithmeticTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        hash = hash * 31 + (getMultArithmeticTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ArityAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ArityAST.java
new file mode 100644
index 0000000..64c212d
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ArityAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 105:  ArityAST ::= DecimalIntegerLiteral
+ *</b>
+ */
+public class ArityAST extends ASTNodeToken implements IArityAST
+{
+    public ArityAST(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ArityOrTypeDeclAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ArityOrTypeDeclAST0.java
new file mode 100644
index 0000000..3729468
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ArityOrTypeDeclAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 103:  ArityOrTypeDeclAST ::= DIVIDE ArityAST
+ *</b>
+ */
+public class ArityOrTypeDeclAST0 extends ASTNode implements IArityOrTypeDeclAST
+{
+    private ArityAST _ArityAST;
+
+    public ArityAST getArityAST() { return _ArityAST; }
+
+    public ArityOrTypeDeclAST0(IToken leftIToken, IToken rightIToken,
+                               ArityAST _ArityAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ArityAST = _ArityAST;
+        ((ASTNode) _ArityAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ArityOrTypeDeclAST0)) return false;
+        ArityOrTypeDeclAST0 other = (ArityOrTypeDeclAST0) o;
+        if (! _ArityAST.equals(other.getArityAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getArityAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ArityOrTypeDeclAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ArityOrTypeDeclAST1.java
new file mode 100644
index 0000000..2d3bc9f
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ArityOrTypeDeclAST1.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 104:  ArityOrTypeDeclAST ::= LPAREN TypeConstantsAST
+ *</b>
+ */
+public class ArityOrTypeDeclAST1 extends ASTNode implements IArityOrTypeDeclAST
+{
+    private ITypeConstantsAST _TypeConstantsAST;
+
+    public ITypeConstantsAST getTypeConstantsAST() { return _TypeConstantsAST; }
+
+    public ArityOrTypeDeclAST1(IToken leftIToken, IToken rightIToken,
+                               ITypeConstantsAST _TypeConstantsAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._TypeConstantsAST = _TypeConstantsAST;
+        ((ASTNode) _TypeConstantsAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ArityOrTypeDeclAST1)) return false;
+        ArityOrTypeDeclAST1 other = (ArityOrTypeDeclAST1) o;
+        if (! _TypeConstantsAST.equals(other.getTypeConstantsAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getTypeConstantsAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmFunctionDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmFunctionDefAST.java
new file mode 100644
index 0000000..b51f96e
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmFunctionDefAST.java
@@ -0,0 +1,105 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 102:  AsmFunctionDefAST ::= OptAnnotationsAST asmfunction TypeNameAST ArityOrTypeDeclAST ReturnTypeOptAST InitialValuesOptAST
+ *</b>
+ */
+public class AsmFunctionDefAST extends ASTNode implements IAsmFunctionDefAST
+{
+    private IOptAnnotationsAST _OptAnnotationsAST;
+    private ITypeNameAST _TypeNameAST;
+    private IArityOrTypeDeclAST _ArityOrTypeDeclAST;
+    private ReturnTypeOptAST _ReturnTypeOptAST;
+    private IInitialValuesOptAST _InitialValuesOptAST;
+
+    /**
+     * The value returned by <b>getOptAnnotationsAST</b> may be <b>null</b>
+     */
+    public IOptAnnotationsAST getOptAnnotationsAST() { return _OptAnnotationsAST; }
+    public ITypeNameAST getTypeNameAST() { return _TypeNameAST; }
+    public IArityOrTypeDeclAST getArityOrTypeDeclAST() { return _ArityOrTypeDeclAST; }
+    /**
+     * The value returned by <b>getReturnTypeOptAST</b> may be <b>null</b>
+     */
+    public ReturnTypeOptAST getReturnTypeOptAST() { return _ReturnTypeOptAST; }
+    public IInitialValuesOptAST getInitialValuesOptAST() { return _InitialValuesOptAST; }
+
+    public AsmFunctionDefAST(IToken leftIToken, IToken rightIToken,
+                             IOptAnnotationsAST _OptAnnotationsAST,
+                             ITypeNameAST _TypeNameAST,
+                             IArityOrTypeDeclAST _ArityOrTypeDeclAST,
+                             ReturnTypeOptAST _ReturnTypeOptAST,
+                             IInitialValuesOptAST _InitialValuesOptAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._OptAnnotationsAST = _OptAnnotationsAST;
+        if (_OptAnnotationsAST != null) ((ASTNode) _OptAnnotationsAST).setParent(this);
+        this._TypeNameAST = _TypeNameAST;
+        ((ASTNode) _TypeNameAST).setParent(this);
+        this._ArityOrTypeDeclAST = _ArityOrTypeDeclAST;
+        ((ASTNode) _ArityOrTypeDeclAST).setParent(this);
+        this._ReturnTypeOptAST = _ReturnTypeOptAST;
+        if (_ReturnTypeOptAST != null) ((ASTNode) _ReturnTypeOptAST).setParent(this);
+        this._InitialValuesOptAST = _InitialValuesOptAST;
+        ((ASTNode) _InitialValuesOptAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof AsmFunctionDefAST)) return false;
+        AsmFunctionDefAST other = (AsmFunctionDefAST) o;
+        if (_OptAnnotationsAST == null && other.getOptAnnotationsAST() != null) return false;
+        else if (! _OptAnnotationsAST.equals(other.getOptAnnotationsAST())) return false;
+        if (! _TypeNameAST.equals(other.getTypeNameAST())) return false;
+        if (! _ArityOrTypeDeclAST.equals(other.getArityOrTypeDeclAST())) return false;
+        if (_ReturnTypeOptAST == null && other.getReturnTypeOptAST() != null) return false;
+        else if (! _ReturnTypeOptAST.equals(other.getReturnTypeOptAST())) return false;
+        if (! _InitialValuesOptAST.equals(other.getInitialValuesOptAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getOptAnnotationsAST() == null ? 0 : getOptAnnotationsAST().hashCode());
+        hash = hash * 31 + (getTypeNameAST().hashCode());
+        hash = hash * 31 + (getArityOrTypeDeclAST().hashCode());
+        hash = hash * 31 + (getReturnTypeOptAST() == null ? 0 : getReturnTypeOptAST().hashCode());
+        hash = hash * 31 + (getInitialValuesOptAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmFunctionLocationAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmFunctionLocationAST.java
new file mode 100644
index 0000000..91b77c1
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmFunctionLocationAST.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 113:  AsmFunctionLocationAST ::= ASMFunctionNameAST ActualParameterDefAST
+ *</b>
+ */
+public class AsmFunctionLocationAST extends ASTNode implements IAsmFunctionLocationAST
+{
+    private IASMFunctionNameAST _ASMFunctionNameAST;
+    private IActualParameterDefAST _ActualParameterDefAST;
+
+    public IASMFunctionNameAST getASMFunctionNameAST() { return _ASMFunctionNameAST; }
+    public IActualParameterDefAST getActualParameterDefAST() { return _ActualParameterDefAST; }
+
+    public AsmFunctionLocationAST(IToken leftIToken, IToken rightIToken,
+                                  IASMFunctionNameAST _ASMFunctionNameAST,
+                                  IActualParameterDefAST _ActualParameterDefAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ASMFunctionNameAST = _ASMFunctionNameAST;
+        ((ASTNode) _ASMFunctionNameAST).setParent(this);
+        this._ActualParameterDefAST = _ActualParameterDefAST;
+        ((ASTNode) _ActualParameterDefAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof AsmFunctionLocationAST)) return false;
+        AsmFunctionLocationAST other = (AsmFunctionLocationAST) o;
+        if (! _ASMFunctionNameAST.equals(other.getASMFunctionNameAST())) return false;
+        if (! _ActualParameterDefAST.equals(other.getActualParameterDefAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getASMFunctionNameAST().hashCode());
+        hash = hash * 31 + (getActualParameterDefAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmFunctionUpdateLocationAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmFunctionUpdateLocationAST.java
new file mode 100644
index 0000000..5296427
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmFunctionUpdateLocationAST.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 152:  AsmFunctionUpdateLocationAST ::= ASMFunctionNameAST ActualParameterDefAST
+ *</b>
+ */
+public class AsmFunctionUpdateLocationAST extends ASTNode implements IAsmFunctionUpdateLocationAST
+{
+    private IASMFunctionNameAST _ASMFunctionNameAST;
+    private IActualParameterDefAST _ActualParameterDefAST;
+
+    public IASMFunctionNameAST getASMFunctionNameAST() { return _ASMFunctionNameAST; }
+    public IActualParameterDefAST getActualParameterDefAST() { return _ActualParameterDefAST; }
+
+    public AsmFunctionUpdateLocationAST(IToken leftIToken, IToken rightIToken,
+                                        IASMFunctionNameAST _ASMFunctionNameAST,
+                                        IActualParameterDefAST _ActualParameterDefAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ASMFunctionNameAST = _ASMFunctionNameAST;
+        ((ASTNode) _ASMFunctionNameAST).setParent(this);
+        this._ActualParameterDefAST = _ActualParameterDefAST;
+        ((ASTNode) _ActualParameterDefAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof AsmFunctionUpdateLocationAST)) return false;
+        AsmFunctionUpdateLocationAST other = (AsmFunctionUpdateLocationAST) o;
+        if (! _ASMFunctionNameAST.equals(other.getASMFunctionNameAST())) return false;
+        if (! _ActualParameterDefAST.equals(other.getActualParameterDefAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getASMFunctionNameAST().hashCode());
+        hash = hash * 31 + (getActualParameterDefAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmRuleAST.java
new file mode 100644
index 0000000..3ce2a0e
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmRuleAST.java
@@ -0,0 +1,59 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import org.eclipse.viatra2.lpgparser.*;
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 134:  AsmRuleAST ::= RegularAsmRuleAST
+ *<li>Rule 135:  AsmRuleAST ::= IfRuleAST
+ *<li>Rule 136:  AsmRuleAST ::= TryRuleAST
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 137:  AsmRuleAST ::= ERROR_TOKEN
+ *</b>
+ */
+public class AsmRuleAST extends ASTNodeToken implements IAsmRuleAST
+{
+    private VTCLParser environment;
+    public VTCLParser getEnvironment() { return environment; }
+
+    public AsmRuleAST(VTCLParser environment, IToken token)    {
+        super(token);
+        this.environment = environment;
+        initialize();
+    }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+
+	void initialize()
+    {
+                //reportErrorTokenMessage(getRhsTokenIndex(1), "Namespace import");
+        }
+
+    }
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmRuleDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmRuleDefAST.java
new file mode 100644
index 0000000..ec4a569
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmRuleDefAST.java
@@ -0,0 +1,94 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 130:  AsmRuleDefAST ::= OptAnnotationsAST rule TypeNameAST DirectedFormalParameterDefAST EQUAL AsmRuleAST
+ *</b>
+ */
+public class AsmRuleDefAST extends ASTNode implements IAsmRuleDefAST
+{
+    private IOptAnnotationsAST _OptAnnotationsAST;
+    private ITypeNameAST _TypeNameAST;
+    private IDirectedFormalParameterDefAST _DirectedFormalParameterDefAST;
+    private IAsmRuleAST _AsmRuleAST;
+
+    /**
+     * The value returned by <b>getOptAnnotationsAST</b> may be <b>null</b>
+     */
+    public IOptAnnotationsAST getOptAnnotationsAST() { return _OptAnnotationsAST; }
+    public ITypeNameAST getTypeNameAST() { return _TypeNameAST; }
+    public IDirectedFormalParameterDefAST getDirectedFormalParameterDefAST() { return _DirectedFormalParameterDefAST; }
+    public IAsmRuleAST getAsmRuleAST() { return _AsmRuleAST; }
+
+    public AsmRuleDefAST(IToken leftIToken, IToken rightIToken,
+                         IOptAnnotationsAST _OptAnnotationsAST,
+                         ITypeNameAST _TypeNameAST,
+                         IDirectedFormalParameterDefAST _DirectedFormalParameterDefAST,
+                         IAsmRuleAST _AsmRuleAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._OptAnnotationsAST = _OptAnnotationsAST;
+        if (_OptAnnotationsAST != null) ((ASTNode) _OptAnnotationsAST).setParent(this);
+        this._TypeNameAST = _TypeNameAST;
+        ((ASTNode) _TypeNameAST).setParent(this);
+        this._DirectedFormalParameterDefAST = _DirectedFormalParameterDefAST;
+        ((ASTNode) _DirectedFormalParameterDefAST).setParent(this);
+        this._AsmRuleAST = _AsmRuleAST;
+        ((ASTNode) _AsmRuleAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof AsmRuleDefAST)) return false;
+        AsmRuleDefAST other = (AsmRuleDefAST) o;
+        if (_OptAnnotationsAST == null && other.getOptAnnotationsAST() != null) return false;
+        else if (! _OptAnnotationsAST.equals(other.getOptAnnotationsAST())) return false;
+        if (! _TypeNameAST.equals(other.getTypeNameAST())) return false;
+        if (! _DirectedFormalParameterDefAST.equals(other.getDirectedFormalParameterDefAST())) return false;
+        if (! _AsmRuleAST.equals(other.getAsmRuleAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getOptAnnotationsAST() == null ? 0 : getOptAnnotationsAST().hashCode());
+        hash = hash * 31 + (getTypeNameAST().hashCode());
+        hash = hash * 31 + (getDirectedFormalParameterDefAST().hashCode());
+        hash = hash * 31 + (getAsmRuleAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmRulesAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmRulesAST.java
new file mode 100644
index 0000000..997dada
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmRulesAST.java
@@ -0,0 +1,80 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 131:  AsmRulesAST ::= AsmRulesOptAST AsmRuleAST
+ *</b>
+ */
+public class AsmRulesAST extends ASTNode implements IAsmRulesAST
+{
+    private AsmRulesOptAST _AsmRulesOptAST;
+    private IAsmRuleAST _AsmRuleAST;
+
+    /**
+     * The value returned by <b>getAsmRulesOptAST</b> may be <b>null</b>
+     */
+    public AsmRulesOptAST getAsmRulesOptAST() { return _AsmRulesOptAST; }
+    public IAsmRuleAST getAsmRuleAST() { return _AsmRuleAST; }
+
+    public AsmRulesAST(IToken leftIToken, IToken rightIToken,
+                       AsmRulesOptAST _AsmRulesOptAST,
+                       IAsmRuleAST _AsmRuleAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._AsmRulesOptAST = _AsmRulesOptAST;
+        if (_AsmRulesOptAST != null) ((ASTNode) _AsmRulesOptAST).setParent(this);
+        this._AsmRuleAST = _AsmRuleAST;
+        ((ASTNode) _AsmRuleAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof AsmRulesAST)) return false;
+        AsmRulesAST other = (AsmRulesAST) o;
+        if (_AsmRulesOptAST == null && other.getAsmRulesOptAST() != null) return false;
+        else if (! _AsmRulesOptAST.equals(other.getAsmRulesOptAST())) return false;
+        if (! _AsmRuleAST.equals(other.getAsmRuleAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getAsmRulesOptAST() == null ? 0 : getAsmRulesOptAST().hashCode());
+        hash = hash * 31 + (getAsmRuleAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmRulesOptAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmRulesOptAST.java
new file mode 100644
index 0000000..c6f30c1
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/AsmRulesOptAST.java
@@ -0,0 +1,84 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 132:  AsmRulesOptAST ::= $Empty
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 133:  AsmRulesOptAST ::= AsmRulesOptAST AsmRuleAST
+ *</b>
+ */
+public class AsmRulesOptAST extends ASTNode implements IAsmRulesOptAST
+{
+    private AsmRulesOptAST _AsmRulesOptAST;
+    private IAsmRuleAST _AsmRuleAST;
+
+    /**
+     * The value returned by <b>getAsmRulesOptAST</b> may be <b>null</b>
+     */
+    public AsmRulesOptAST getAsmRulesOptAST() { return _AsmRulesOptAST; }
+    public IAsmRuleAST getAsmRuleAST() { return _AsmRuleAST; }
+
+    public AsmRulesOptAST(IToken leftIToken, IToken rightIToken,
+                          AsmRulesOptAST _AsmRulesOptAST,
+                          IAsmRuleAST _AsmRuleAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._AsmRulesOptAST = _AsmRulesOptAST;
+        if (_AsmRulesOptAST != null) ((ASTNode) _AsmRulesOptAST).setParent(this);
+        this._AsmRuleAST = _AsmRuleAST;
+        ((ASTNode) _AsmRuleAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof AsmRulesOptAST)) return false;
+        AsmRulesOptAST other = (AsmRulesOptAST) o;
+        if (_AsmRulesOptAST == null && other.getAsmRulesOptAST() != null) return false;
+        else if (! _AsmRulesOptAST.equals(other.getAsmRulesOptAST())) return false;
+        if (! _AsmRuleAST.equals(other.getAsmRuleAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getAsmRulesOptAST() == null ? 0 : getAsmRulesOptAST().hashCode());
+        hash = hash * 31 + (getAsmRuleAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/BaseArithmeticTermAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/BaseArithmeticTermAST.java
new file mode 100644
index 0000000..6bc2612
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/BaseArithmeticTermAST.java
@@ -0,0 +1,77 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 96:  BaseArithmeticTermAST ::= VariableRefAST
+ *<li>Rule 97:  BaseArithmeticTermAST ::= ValueAST
+ *<li>Rule 99:  BaseArithmeticTermAST ::= AsmFunctionLocationAST
+ *<li>Rule 100:  BaseArithmeticTermAST ::= GraphPatternCallAST
+ *<li>Rule 101:  BaseArithmeticTermAST ::= PredefinedFunctionCallAST
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 98:  BaseArithmeticTermAST ::= LPAREN LogicalTermAST RPAREN
+ *</b>
+ */
+public class BaseArithmeticTermAST extends ASTNode implements IBaseArithmeticTermAST
+{
+    private ILogicalTermAST _LogicalTermAST;
+
+    public ILogicalTermAST getLogicalTermAST() { return _LogicalTermAST; }
+
+    public BaseArithmeticTermAST(IToken leftIToken, IToken rightIToken,
+                                 ILogicalTermAST _LogicalTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._LogicalTermAST = _LogicalTermAST;
+        ((ASTNode) _LogicalTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof BaseArithmeticTermAST)) return false;
+        BaseArithmeticTermAST other = (BaseArithmeticTermAST) o;
+        if (! _LogicalTermAST.equals(other.getLogicalTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getLogicalTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/BooleanConstantAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/BooleanConstantAST0.java
new file mode 100644
index 0000000..e072596
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/BooleanConstantAST0.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 291:  BooleanConstantAST ::= false
+ *</b>
+ */
+public class BooleanConstantAST0 extends ASTNodeToken implements IBooleanConstantAST
+{
+    public BooleanConstantAST0(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/BooleanConstantAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/BooleanConstantAST1.java
new file mode 100644
index 0000000..6651d01
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/BooleanConstantAST1.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 292:  BooleanConstantAST ::= true
+ *</b>
+ */
+public class BooleanConstantAST1 extends ASTNodeToken implements IBooleanConstantAST
+{
+    public BooleanConstantAST1(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/BuiltInFunctionNameAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/BuiltInFunctionNameAST.java
new file mode 100644
index 0000000..dbf49ec
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/BuiltInFunctionNameAST.java
@@ -0,0 +1,47 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 116:  BuiltInFunctionNameAST ::= ref
+ *<li>Rule 117:  BuiltInFunctionNameAST ::= fqn
+ *<li>Rule 118:  BuiltInFunctionNameAST ::= name
+ *<li>Rule 119:  BuiltInFunctionNameAST ::= value
+ *<li>Rule 120:  BuiltInFunctionNameAST ::= source
+ *<li>Rule 121:  BuiltInFunctionNameAST ::= target
+ *<li>Rule 122:  BuiltInFunctionNameAST ::= multiplicity
+ *<li>Rule 123:  BuiltInFunctionNameAST ::= aggregation
+ *<li>Rule 124:  BuiltInFunctionNameAST ::= inverse
+ *</b>
+ */
+public class BuiltInFunctionNameAST extends ASTNodeToken implements IBuiltInFunctionNameAST
+{
+    public BuiltInFunctionNameAST(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CallRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CallRuleAST.java
new file mode 100644
index 0000000..6b27b9f
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CallRuleAST.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 149:  CallRuleAST ::= call QualifiedTypeNameAST ActualParameterDefAST SEMICOLON
+ *</b>
+ */
+public class CallRuleAST extends ASTNode implements ICallRuleAST
+{
+    private IQualifiedTypeNameAST _QualifiedTypeNameAST;
+    private IActualParameterDefAST _ActualParameterDefAST;
+
+    public IQualifiedTypeNameAST getQualifiedTypeNameAST() { return _QualifiedTypeNameAST; }
+    public IActualParameterDefAST getActualParameterDefAST() { return _ActualParameterDefAST; }
+
+    public CallRuleAST(IToken leftIToken, IToken rightIToken,
+                       IQualifiedTypeNameAST _QualifiedTypeNameAST,
+                       IActualParameterDefAST _ActualParameterDefAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._QualifiedTypeNameAST = _QualifiedTypeNameAST;
+        ((ASTNode) _QualifiedTypeNameAST).setParent(this);
+        this._ActualParameterDefAST = _ActualParameterDefAST;
+        ((ASTNode) _ActualParameterDefAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof CallRuleAST)) return false;
+        CallRuleAST other = (CallRuleAST) o;
+        if (! _QualifiedTypeNameAST.equals(other.getQualifiedTypeNameAST())) return false;
+        if (! _ActualParameterDefAST.equals(other.getActualParameterDefAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getQualifiedTypeNameAST().hashCode());
+        hash = hash * 31 + (getActualParameterDefAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CheckConditionAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CheckConditionAST.java
new file mode 100644
index 0000000..7615cec
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CheckConditionAST.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 39:  CheckConditionAST ::= check LPAREN LogicalTermAST RPAREN
+ *</b>
+ */
+public class CheckConditionAST extends ASTNode implements ICheckConditionAST
+{
+    private ILogicalTermAST _LogicalTermAST;
+
+    public ILogicalTermAST getLogicalTermAST() { return _LogicalTermAST; }
+
+    public CheckConditionAST(IToken leftIToken, IToken rightIToken,
+                             ILogicalTermAST _LogicalTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._LogicalTermAST = _LogicalTermAST;
+        ((ASTNode) _LogicalTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof CheckConditionAST)) return false;
+        CheckConditionAST other = (CheckConditionAST) o;
+        if (! _LogicalTermAST.equals(other.getLogicalTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getLogicalTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ChooseRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ChooseRuleAST.java
new file mode 100644
index 0000000..d068073
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ChooseRuleAST.java
@@ -0,0 +1,87 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 181:  ChooseRuleAST ::= choose ConstrainedVariablesOptAST with ConditionAST DoActionOptAST
+ *</b>
+ */
+public class ChooseRuleAST extends ASTNode implements IChooseRuleAST
+{
+    private IConstrainedVariablesOptAST _ConstrainedVariablesOptAST;
+    private IConditionAST _ConditionAST;
+    private IDoActionOptAST _DoActionOptAST;
+
+    /**
+     * The value returned by <b>getConstrainedVariablesOptAST</b> may be <b>null</b>
+     */
+    public IConstrainedVariablesOptAST getConstrainedVariablesOptAST() { return _ConstrainedVariablesOptAST; }
+    public IConditionAST getConditionAST() { return _ConditionAST; }
+    public IDoActionOptAST getDoActionOptAST() { return _DoActionOptAST; }
+
+    public ChooseRuleAST(IToken leftIToken, IToken rightIToken,
+                         IConstrainedVariablesOptAST _ConstrainedVariablesOptAST,
+                         IConditionAST _ConditionAST,
+                         IDoActionOptAST _DoActionOptAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ConstrainedVariablesOptAST = _ConstrainedVariablesOptAST;
+        if (_ConstrainedVariablesOptAST != null) ((ASTNode) _ConstrainedVariablesOptAST).setParent(this);
+        this._ConditionAST = _ConditionAST;
+        ((ASTNode) _ConditionAST).setParent(this);
+        this._DoActionOptAST = _DoActionOptAST;
+        ((ASTNode) _DoActionOptAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ChooseRuleAST)) return false;
+        ChooseRuleAST other = (ChooseRuleAST) o;
+        if (_ConstrainedVariablesOptAST == null && other.getConstrainedVariablesOptAST() != null) return false;
+        else if (! _ConstrainedVariablesOptAST.equals(other.getConstrainedVariablesOptAST())) return false;
+        if (! _ConditionAST.equals(other.getConditionAST())) return false;
+        if (! _DoActionOptAST.equals(other.getDoActionOptAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getConstrainedVariablesOptAST() == null ? 0 : getConstrainedVariablesOptAST().hashCode());
+        hash = hash * 31 + (getConditionAST().hashCode());
+        hash = hash * 31 + (getDoActionOptAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ConstrainedVariablesAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ConstrainedVariablesAST0.java
new file mode 100644
index 0000000..1cc66f4
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ConstrainedVariablesAST0.java
@@ -0,0 +1,91 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 275:  ConstrainedVariablesAST ::= VariableDefAST TypeOptAST ContainmentConstraintOptAST
+ *</b>
+ */
+public class ConstrainedVariablesAST0 extends ASTNode implements IConstrainedVariablesAST
+{
+    private VariableDefAST _VariableDefAST;
+    private TypeOptAST _TypeOptAST;
+    private IContainmentConstraintOptAST _ContainmentConstraintOptAST;
+
+    public VariableDefAST getVariableDefAST() { return _VariableDefAST; }
+    /**
+     * The value returned by <b>getTypeOptAST</b> may be <b>null</b>
+     */
+    public TypeOptAST getTypeOptAST() { return _TypeOptAST; }
+    /**
+     * The value returned by <b>getContainmentConstraintOptAST</b> may be <b>null</b>
+     */
+    public IContainmentConstraintOptAST getContainmentConstraintOptAST() { return _ContainmentConstraintOptAST; }
+
+    public ConstrainedVariablesAST0(IToken leftIToken, IToken rightIToken,
+                                    VariableDefAST _VariableDefAST,
+                                    TypeOptAST _TypeOptAST,
+                                    IContainmentConstraintOptAST _ContainmentConstraintOptAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._VariableDefAST = _VariableDefAST;
+        ((ASTNode) _VariableDefAST).setParent(this);
+        this._TypeOptAST = _TypeOptAST;
+        if (_TypeOptAST != null) ((ASTNode) _TypeOptAST).setParent(this);
+        this._ContainmentConstraintOptAST = _ContainmentConstraintOptAST;
+        if (_ContainmentConstraintOptAST != null) ((ASTNode) _ContainmentConstraintOptAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ConstrainedVariablesAST0)) return false;
+        ConstrainedVariablesAST0 other = (ConstrainedVariablesAST0) o;
+        if (! _VariableDefAST.equals(other.getVariableDefAST())) return false;
+        if (_TypeOptAST == null && other.getTypeOptAST() != null) return false;
+        else if (! _TypeOptAST.equals(other.getTypeOptAST())) return false;
+        if (_ContainmentConstraintOptAST == null && other.getContainmentConstraintOptAST() != null) return false;
+        else if (! _ContainmentConstraintOptAST.equals(other.getContainmentConstraintOptAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getVariableDefAST().hashCode());
+        hash = hash * 31 + (getTypeOptAST() == null ? 0 : getTypeOptAST().hashCode());
+        hash = hash * 31 + (getContainmentConstraintOptAST() == null ? 0 : getContainmentConstraintOptAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ConstrainedVariablesAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ConstrainedVariablesAST1.java
new file mode 100644
index 0000000..e763265
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ConstrainedVariablesAST1.java
@@ -0,0 +1,98 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 276:  ConstrainedVariablesAST ::= ConstrainedVariablesAST COMMA VariableDefAST TypeOptAST ContainmentConstraintOptAST
+ *</b>
+ */
+public class ConstrainedVariablesAST1 extends ASTNode implements IConstrainedVariablesAST
+{
+    private IConstrainedVariablesAST _ConstrainedVariablesAST;
+    private VariableDefAST _VariableDefAST;
+    private TypeOptAST _TypeOptAST;
+    private IContainmentConstraintOptAST _ContainmentConstraintOptAST;
+
+    public IConstrainedVariablesAST getConstrainedVariablesAST() { return _ConstrainedVariablesAST; }
+    public VariableDefAST getVariableDefAST() { return _VariableDefAST; }
+    /**
+     * The value returned by <b>getTypeOptAST</b> may be <b>null</b>
+     */
+    public TypeOptAST getTypeOptAST() { return _TypeOptAST; }
+    /**
+     * The value returned by <b>getContainmentConstraintOptAST</b> may be <b>null</b>
+     */
+    public IContainmentConstraintOptAST getContainmentConstraintOptAST() { return _ContainmentConstraintOptAST; }
+
+    public ConstrainedVariablesAST1(IToken leftIToken, IToken rightIToken,
+                                    IConstrainedVariablesAST _ConstrainedVariablesAST,
+                                    VariableDefAST _VariableDefAST,
+                                    TypeOptAST _TypeOptAST,
+                                    IContainmentConstraintOptAST _ContainmentConstraintOptAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ConstrainedVariablesAST = _ConstrainedVariablesAST;
+        ((ASTNode) _ConstrainedVariablesAST).setParent(this);
+        this._VariableDefAST = _VariableDefAST;
+        ((ASTNode) _VariableDefAST).setParent(this);
+        this._TypeOptAST = _TypeOptAST;
+        if (_TypeOptAST != null) ((ASTNode) _TypeOptAST).setParent(this);
+        this._ContainmentConstraintOptAST = _ContainmentConstraintOptAST;
+        if (_ContainmentConstraintOptAST != null) ((ASTNode) _ContainmentConstraintOptAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ConstrainedVariablesAST1)) return false;
+        ConstrainedVariablesAST1 other = (ConstrainedVariablesAST1) o;
+        if (! _ConstrainedVariablesAST.equals(other.getConstrainedVariablesAST())) return false;
+        if (! _VariableDefAST.equals(other.getVariableDefAST())) return false;
+        if (_TypeOptAST == null && other.getTypeOptAST() != null) return false;
+        else if (! _TypeOptAST.equals(other.getTypeOptAST())) return false;
+        if (_ContainmentConstraintOptAST == null && other.getContainmentConstraintOptAST() != null) return false;
+        else if (! _ContainmentConstraintOptAST.equals(other.getContainmentConstraintOptAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getConstrainedVariablesAST().hashCode());
+        hash = hash * 31 + (getVariableDefAST().hashCode());
+        hash = hash * 31 + (getTypeOptAST() == null ? 0 : getTypeOptAST().hashCode());
+        hash = hash * 31 + (getContainmentConstraintOptAST() == null ? 0 : getContainmentConstraintOptAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ContainmentConstraintOptAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ContainmentConstraintOptAST0.java
new file mode 100644
index 0000000..08c8eca
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ContainmentConstraintOptAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 278:  ContainmentConstraintOptAST ::= in ArithmeticTermAST
+ *</b>
+ */
+public class ContainmentConstraintOptAST0 extends ASTNode implements IContainmentConstraintOptAST
+{
+    private IArithmeticTermAST _ArithmeticTermAST;
+
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+
+    public ContainmentConstraintOptAST0(IToken leftIToken, IToken rightIToken,
+                                        IArithmeticTermAST _ArithmeticTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ContainmentConstraintOptAST0)) return false;
+        ContainmentConstraintOptAST0 other = (ContainmentConstraintOptAST0) o;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ContainmentConstraintOptAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ContainmentConstraintOptAST1.java
new file mode 100644
index 0000000..86f9b06
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ContainmentConstraintOptAST1.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 279:  ContainmentConstraintOptAST ::= below ArithmeticTermAST
+ *</b>
+ */
+public class ContainmentConstraintOptAST1 extends ASTNode implements IContainmentConstraintOptAST
+{
+    private IArithmeticTermAST _ArithmeticTermAST;
+
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+
+    public ContainmentConstraintOptAST1(IToken leftIToken, IToken rightIToken,
+                                        IArithmeticTermAST _ArithmeticTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ContainmentConstraintOptAST1)) return false;
+        ContainmentConstraintOptAST1 other = (ContainmentConstraintOptAST1) o;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ConversionFunctionNameAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ConversionFunctionNameAST.java
new file mode 100644
index 0000000..b85e0f4
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ConversionFunctionNameAST.java
@@ -0,0 +1,43 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 125:  ConversionFunctionNameAST ::= toBoolean
+ *<li>Rule 126:  ConversionFunctionNameAST ::= toString
+ *<li>Rule 127:  ConversionFunctionNameAST ::= toInteger
+ *<li>Rule 128:  ConversionFunctionNameAST ::= toDouble
+ *<li>Rule 129:  ConversionFunctionNameAST ::= toMultiplicity
+ *</b>
+ */
+public class ConversionFunctionNameAST extends ASTNodeToken implements IConversionFunctionNameAST
+{
+    public ConversionFunctionNameAST(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CopyContentsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CopyContentsAST.java
new file mode 100644
index 0000000..1bba614
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CopyContentsAST.java
@@ -0,0 +1,90 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 226:  CopyContentsAST ::= ArithmeticTermAST COMMA ArithmeticTermAST COMMA VariableRefAST COMMA CopySemanticsAST
+ *</b>
+ */
+public class CopyContentsAST extends ASTNode implements ICopyContentsAST
+{
+    private IArithmeticTermAST _ArithmeticTermAST;
+    private IArithmeticTermAST _ArithmeticTermAST3;
+    private VariableRefAST _VariableRefAST;
+    private ICopySemanticsAST _CopySemanticsAST;
+
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+    public IArithmeticTermAST getArithmeticTermAST3() { return _ArithmeticTermAST3; }
+    public VariableRefAST getVariableRefAST() { return _VariableRefAST; }
+    public ICopySemanticsAST getCopySemanticsAST() { return _CopySemanticsAST; }
+
+    public CopyContentsAST(IToken leftIToken, IToken rightIToken,
+                           IArithmeticTermAST _ArithmeticTermAST,
+                           IArithmeticTermAST _ArithmeticTermAST3,
+                           VariableRefAST _VariableRefAST,
+                           ICopySemanticsAST _CopySemanticsAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        this._ArithmeticTermAST3 = _ArithmeticTermAST3;
+        ((ASTNode) _ArithmeticTermAST3).setParent(this);
+        this._VariableRefAST = _VariableRefAST;
+        ((ASTNode) _VariableRefAST).setParent(this);
+        this._CopySemanticsAST = _CopySemanticsAST;
+        ((ASTNode) _CopySemanticsAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof CopyContentsAST)) return false;
+        CopyContentsAST other = (CopyContentsAST) o;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        if (! _ArithmeticTermAST3.equals(other.getArithmeticTermAST3())) return false;
+        if (! _VariableRefAST.equals(other.getVariableRefAST())) return false;
+        if (! _CopySemanticsAST.equals(other.getCopySemanticsAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        hash = hash * 31 + (getArithmeticTermAST3().hashCode());
+        hash = hash * 31 + (getVariableRefAST().hashCode());
+        hash = hash * 31 + (getCopySemanticsAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CopyRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CopyRuleAST.java
new file mode 100644
index 0000000..2aec206
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CopyRuleAST.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 225:  CopyRuleAST ::= copy LPAREN CopyContentsAST RPAREN SEMICOLON
+ *</b>
+ */
+public class CopyRuleAST extends ASTNode implements ICopyRuleAST
+{
+    private CopyContentsAST _CopyContentsAST;
+
+    public CopyContentsAST getCopyContentsAST() { return _CopyContentsAST; }
+
+    public CopyRuleAST(IToken leftIToken, IToken rightIToken,
+                       CopyContentsAST _CopyContentsAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._CopyContentsAST = _CopyContentsAST;
+        ((ASTNode) _CopyContentsAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof CopyRuleAST)) return false;
+        CopyRuleAST other = (CopyRuleAST) o;
+        if (! _CopyContentsAST.equals(other.getCopyContentsAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getCopyContentsAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CopySemanticsAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CopySemanticsAST0.java
new file mode 100644
index 0000000..4e35173
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CopySemanticsAST0.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 227:  CopySemanticsAST ::= copy_boundary_edges
+ *</b>
+ */
+public class CopySemanticsAST0 extends ASTNodeToken implements ICopySemanticsAST
+{
+    public CopySemanticsAST0(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CopySemanticsAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CopySemanticsAST1.java
new file mode 100644
index 0000000..d65ced8
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CopySemanticsAST1.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 228:  CopySemanticsAST ::= skip_boundary_edges
+ *</b>
+ */
+public class CopySemanticsAST1 extends ASTNodeToken implements ICopySemanticsAST
+{
+    public CopySemanticsAST1(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CounterVariableAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CounterVariableAST.java
new file mode 100644
index 0000000..bfb0e36
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CounterVariableAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 46:  CounterVariableAST ::= UpperCaseLiteral
+ *</b>
+ */
+public class CounterVariableAST extends ASTNodeToken implements ICounterVariableAST
+{
+    public CounterVariableAST(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateEntityBodyAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateEntityBodyAST.java
new file mode 100644
index 0000000..c01e0a7
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateEntityBodyAST.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 206:  CreateEntityBodyAST ::= LPAREN VariableRefAST RPAREN
+ *</b>
+ */
+public class CreateEntityBodyAST extends ASTNode implements ICreateEntityBodyAST
+{
+    private VariableRefAST _VariableRefAST;
+
+    public VariableRefAST getVariableRefAST() { return _VariableRefAST; }
+
+    public CreateEntityBodyAST(IToken leftIToken, IToken rightIToken,
+                               VariableRefAST _VariableRefAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._VariableRefAST = _VariableRefAST;
+        ((ASTNode) _VariableRefAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof CreateEntityBodyAST)) return false;
+        CreateEntityBodyAST other = (CreateEntityBodyAST) o;
+        if (! _VariableRefAST.equals(other.getVariableRefAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getVariableRefAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateModelElementAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateModelElementAST0.java
new file mode 100644
index 0000000..239abb8
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateModelElementAST0.java
@@ -0,0 +1,87 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 204:  CreateModelElementAST ::= QualifiedTypeNameAST CreateEntityBodyAST InConstraintOptAST
+ *</b>
+ */
+public class CreateModelElementAST0 extends ASTNode implements ICreateModelElementAST
+{
+    private IQualifiedTypeNameAST _QualifiedTypeNameAST;
+    private CreateEntityBodyAST _CreateEntityBodyAST;
+    private InConstraintOptAST _InConstraintOptAST;
+
+    public IQualifiedTypeNameAST getQualifiedTypeNameAST() { return _QualifiedTypeNameAST; }
+    public CreateEntityBodyAST getCreateEntityBodyAST() { return _CreateEntityBodyAST; }
+    /**
+     * The value returned by <b>getInConstraintOptAST</b> may be <b>null</b>
+     */
+    public InConstraintOptAST getInConstraintOptAST() { return _InConstraintOptAST; }
+
+    public CreateModelElementAST0(IToken leftIToken, IToken rightIToken,
+                                  IQualifiedTypeNameAST _QualifiedTypeNameAST,
+                                  CreateEntityBodyAST _CreateEntityBodyAST,
+                                  InConstraintOptAST _InConstraintOptAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._QualifiedTypeNameAST = _QualifiedTypeNameAST;
+        ((ASTNode) _QualifiedTypeNameAST).setParent(this);
+        this._CreateEntityBodyAST = _CreateEntityBodyAST;
+        ((ASTNode) _CreateEntityBodyAST).setParent(this);
+        this._InConstraintOptAST = _InConstraintOptAST;
+        if (_InConstraintOptAST != null) ((ASTNode) _InConstraintOptAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof CreateModelElementAST0)) return false;
+        CreateModelElementAST0 other = (CreateModelElementAST0) o;
+        if (! _QualifiedTypeNameAST.equals(other.getQualifiedTypeNameAST())) return false;
+        if (! _CreateEntityBodyAST.equals(other.getCreateEntityBodyAST())) return false;
+        if (_InConstraintOptAST == null && other.getInConstraintOptAST() != null) return false;
+        else if (! _InConstraintOptAST.equals(other.getInConstraintOptAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getQualifiedTypeNameAST().hashCode());
+        hash = hash * 31 + (getCreateEntityBodyAST().hashCode());
+        hash = hash * 31 + (getInConstraintOptAST() == null ? 0 : getInConstraintOptAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateModelElementAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateModelElementAST1.java
new file mode 100644
index 0000000..fb8f1ee
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateModelElementAST1.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 205:  CreateModelElementAST ::= QualifiedTypeNameAST CreateRelationBodyAST
+ *</b>
+ */
+public class CreateModelElementAST1 extends ASTNode implements ICreateModelElementAST
+{
+    private IQualifiedTypeNameAST _QualifiedTypeNameAST;
+    private CreateRelationBodyAST _CreateRelationBodyAST;
+
+    public IQualifiedTypeNameAST getQualifiedTypeNameAST() { return _QualifiedTypeNameAST; }
+    public CreateRelationBodyAST getCreateRelationBodyAST() { return _CreateRelationBodyAST; }
+
+    public CreateModelElementAST1(IToken leftIToken, IToken rightIToken,
+                                  IQualifiedTypeNameAST _QualifiedTypeNameAST,
+                                  CreateRelationBodyAST _CreateRelationBodyAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._QualifiedTypeNameAST = _QualifiedTypeNameAST;
+        ((ASTNode) _QualifiedTypeNameAST).setParent(this);
+        this._CreateRelationBodyAST = _CreateRelationBodyAST;
+        ((ASTNode) _CreateRelationBodyAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof CreateModelElementAST1)) return false;
+        CreateModelElementAST1 other = (CreateModelElementAST1) o;
+        if (! _QualifiedTypeNameAST.equals(other.getQualifiedTypeNameAST())) return false;
+        if (! _CreateRelationBodyAST.equals(other.getCreateRelationBodyAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getQualifiedTypeNameAST().hashCode());
+        hash = hash * 31 + (getCreateRelationBodyAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRelationBodyAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRelationBodyAST.java
new file mode 100644
index 0000000..8db796b
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRelationBodyAST.java
@@ -0,0 +1,83 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 207:  CreateRelationBodyAST ::= LPAREN VariableDefRefAST COMMA ArithmeticTermAST COMMA ArithmeticTermAST RPAREN
+ *</b>
+ */
+public class CreateRelationBodyAST extends ASTNode implements ICreateRelationBodyAST
+{
+    private VariableDefRefAST _VariableDefRefAST;
+    private IArithmeticTermAST _ArithmeticTermAST;
+    private IArithmeticTermAST _ArithmeticTermAST6;
+
+    public VariableDefRefAST getVariableDefRefAST() { return _VariableDefRefAST; }
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+    public IArithmeticTermAST getArithmeticTermAST6() { return _ArithmeticTermAST6; }
+
+    public CreateRelationBodyAST(IToken leftIToken, IToken rightIToken,
+                                 VariableDefRefAST _VariableDefRefAST,
+                                 IArithmeticTermAST _ArithmeticTermAST,
+                                 IArithmeticTermAST _ArithmeticTermAST6)
+    {
+        super(leftIToken, rightIToken);
+
+        this._VariableDefRefAST = _VariableDefRefAST;
+        ((ASTNode) _VariableDefRefAST).setParent(this);
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        this._ArithmeticTermAST6 = _ArithmeticTermAST6;
+        ((ASTNode) _ArithmeticTermAST6).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof CreateRelationBodyAST)) return false;
+        CreateRelationBodyAST other = (CreateRelationBodyAST) o;
+        if (! _VariableDefRefAST.equals(other.getVariableDefRefAST())) return false;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        if (! _ArithmeticTermAST6.equals(other.getArithmeticTermAST6())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getVariableDefRefAST().hashCode());
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        hash = hash * 31 + (getArithmeticTermAST6().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRelationshipAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRelationshipAST0.java
new file mode 100644
index 0000000..2d9a0bb
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRelationshipAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 210:  CreateRelationshipAST ::= supertypeOf TwoParametersAST
+ *</b>
+ */
+public class CreateRelationshipAST0 extends ASTNode implements ICreateRelationshipAST
+{
+    private TwoParametersAST _TwoParametersAST;
+
+    public TwoParametersAST getTwoParametersAST() { return _TwoParametersAST; }
+
+    public CreateRelationshipAST0(IToken leftIToken, IToken rightIToken,
+                                  TwoParametersAST _TwoParametersAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._TwoParametersAST = _TwoParametersAST;
+        ((ASTNode) _TwoParametersAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof CreateRelationshipAST0)) return false;
+        CreateRelationshipAST0 other = (CreateRelationshipAST0) o;
+        if (! _TwoParametersAST.equals(other.getTwoParametersAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getTwoParametersAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRelationshipAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRelationshipAST1.java
new file mode 100644
index 0000000..2a0c73b
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRelationshipAST1.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 211:  CreateRelationshipAST ::= subtypeOf TwoParametersAST
+ *</b>
+ */
+public class CreateRelationshipAST1 extends ASTNode implements ICreateRelationshipAST
+{
+    private TwoParametersAST _TwoParametersAST;
+
+    public TwoParametersAST getTwoParametersAST() { return _TwoParametersAST; }
+
+    public CreateRelationshipAST1(IToken leftIToken, IToken rightIToken,
+                                  TwoParametersAST _TwoParametersAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._TwoParametersAST = _TwoParametersAST;
+        ((ASTNode) _TwoParametersAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof CreateRelationshipAST1)) return false;
+        CreateRelationshipAST1 other = (CreateRelationshipAST1) o;
+        if (! _TwoParametersAST.equals(other.getTwoParametersAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getTwoParametersAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRelationshipAST2.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRelationshipAST2.java
new file mode 100644
index 0000000..0a5a982
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRelationshipAST2.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 212:  CreateRelationshipAST ::= typeOf TwoParametersAST
+ *</b>
+ */
+public class CreateRelationshipAST2 extends ASTNode implements ICreateRelationshipAST
+{
+    private TwoParametersAST _TwoParametersAST;
+
+    public TwoParametersAST getTwoParametersAST() { return _TwoParametersAST; }
+
+    public CreateRelationshipAST2(IToken leftIToken, IToken rightIToken,
+                                  TwoParametersAST _TwoParametersAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._TwoParametersAST = _TwoParametersAST;
+        ((ASTNode) _TwoParametersAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof CreateRelationshipAST2)) return false;
+        CreateRelationshipAST2 other = (CreateRelationshipAST2) o;
+        if (! _TwoParametersAST.equals(other.getTwoParametersAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getTwoParametersAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRelationshipAST3.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRelationshipAST3.java
new file mode 100644
index 0000000..497880a
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRelationshipAST3.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 213:  CreateRelationshipAST ::= instanceOf TwoParametersAST
+ *</b>
+ */
+public class CreateRelationshipAST3 extends ASTNode implements ICreateRelationshipAST
+{
+    private TwoParametersAST _TwoParametersAST;
+
+    public TwoParametersAST getTwoParametersAST() { return _TwoParametersAST; }
+
+    public CreateRelationshipAST3(IToken leftIToken, IToken rightIToken,
+                                  TwoParametersAST _TwoParametersAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._TwoParametersAST = _TwoParametersAST;
+        ((ASTNode) _TwoParametersAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof CreateRelationshipAST3)) return false;
+        CreateRelationshipAST3 other = (CreateRelationshipAST3) o;
+        if (! _TwoParametersAST.equals(other.getTwoParametersAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getTwoParametersAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRuleAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRuleAST0.java
new file mode 100644
index 0000000..68e5398
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRuleAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 202:  CreateRuleAST ::= new LPAREN CreateModelElementAST RPAREN SEMICOLON
+ *</b>
+ */
+public class CreateRuleAST0 extends ASTNode implements ICreateRuleAST
+{
+    private ICreateModelElementAST _CreateModelElementAST;
+
+    public ICreateModelElementAST getCreateModelElementAST() { return _CreateModelElementAST; }
+
+    public CreateRuleAST0(IToken leftIToken, IToken rightIToken,
+                          ICreateModelElementAST _CreateModelElementAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._CreateModelElementAST = _CreateModelElementAST;
+        ((ASTNode) _CreateModelElementAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof CreateRuleAST0)) return false;
+        CreateRuleAST0 other = (CreateRuleAST0) o;
+        if (! _CreateModelElementAST.equals(other.getCreateModelElementAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getCreateModelElementAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRuleAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRuleAST1.java
new file mode 100644
index 0000000..d4bb635
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/CreateRuleAST1.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 203:  CreateRuleAST ::= new LPAREN CreateRelationshipAST RPAREN SEMICOLON
+ *</b>
+ */
+public class CreateRuleAST1 extends ASTNode implements ICreateRuleAST
+{
+    private ICreateRelationshipAST _CreateRelationshipAST;
+
+    public ICreateRelationshipAST getCreateRelationshipAST() { return _CreateRelationshipAST; }
+
+    public CreateRuleAST1(IToken leftIToken, IToken rightIToken,
+                          ICreateRelationshipAST _CreateRelationshipAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._CreateRelationshipAST = _CreateRelationshipAST;
+        ((ASTNode) _CreateRelationshipAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof CreateRuleAST1)) return false;
+        CreateRuleAST1 other = (CreateRuleAST1) o;
+        if (! _CreateRelationshipAST.equals(other.getCreateRelationshipAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getCreateRelationshipAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteContentsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteContentsAST.java
new file mode 100644
index 0000000..0fd2d8a
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteContentsAST.java
@@ -0,0 +1,80 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 216:  DeleteContentsAST ::= ArithmeticTermAST DeleteSemanticsOptAST
+ *</b>
+ */
+public class DeleteContentsAST extends ASTNode implements IDeleteContentsAST
+{
+    private IArithmeticTermAST _ArithmeticTermAST;
+    private DeleteSemanticsOptAST _DeleteSemanticsOptAST;
+
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+    /**
+     * The value returned by <b>getDeleteSemanticsOptAST</b> may be <b>null</b>
+     */
+    public DeleteSemanticsOptAST getDeleteSemanticsOptAST() { return _DeleteSemanticsOptAST; }
+
+    public DeleteContentsAST(IToken leftIToken, IToken rightIToken,
+                             IArithmeticTermAST _ArithmeticTermAST,
+                             DeleteSemanticsOptAST _DeleteSemanticsOptAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        this._DeleteSemanticsOptAST = _DeleteSemanticsOptAST;
+        if (_DeleteSemanticsOptAST != null) ((ASTNode) _DeleteSemanticsOptAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof DeleteContentsAST)) return false;
+        DeleteContentsAST other = (DeleteContentsAST) o;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        if (_DeleteSemanticsOptAST == null && other.getDeleteSemanticsOptAST() != null) return false;
+        else if (! _DeleteSemanticsOptAST.equals(other.getDeleteSemanticsOptAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        hash = hash * 31 + (getDeleteSemanticsOptAST() == null ? 0 : getDeleteSemanticsOptAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteRelationshipAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteRelationshipAST0.java
new file mode 100644
index 0000000..3edcc30
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteRelationshipAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 221:  DeleteRelationshipAST ::= supertypeOf TwoParametersAST
+ *</b>
+ */
+public class DeleteRelationshipAST0 extends ASTNode implements IDeleteRelationshipAST
+{
+    private TwoParametersAST _TwoParametersAST;
+
+    public TwoParametersAST getTwoParametersAST() { return _TwoParametersAST; }
+
+    public DeleteRelationshipAST0(IToken leftIToken, IToken rightIToken,
+                                  TwoParametersAST _TwoParametersAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._TwoParametersAST = _TwoParametersAST;
+        ((ASTNode) _TwoParametersAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof DeleteRelationshipAST0)) return false;
+        DeleteRelationshipAST0 other = (DeleteRelationshipAST0) o;
+        if (! _TwoParametersAST.equals(other.getTwoParametersAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getTwoParametersAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteRelationshipAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteRelationshipAST1.java
new file mode 100644
index 0000000..b8ffb3f
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteRelationshipAST1.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 222:  DeleteRelationshipAST ::= subtypeOf TwoParametersAST
+ *</b>
+ */
+public class DeleteRelationshipAST1 extends ASTNode implements IDeleteRelationshipAST
+{
+    private TwoParametersAST _TwoParametersAST;
+
+    public TwoParametersAST getTwoParametersAST() { return _TwoParametersAST; }
+
+    public DeleteRelationshipAST1(IToken leftIToken, IToken rightIToken,
+                                  TwoParametersAST _TwoParametersAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._TwoParametersAST = _TwoParametersAST;
+        ((ASTNode) _TwoParametersAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof DeleteRelationshipAST1)) return false;
+        DeleteRelationshipAST1 other = (DeleteRelationshipAST1) o;
+        if (! _TwoParametersAST.equals(other.getTwoParametersAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getTwoParametersAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteRelationshipAST2.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteRelationshipAST2.java
new file mode 100644
index 0000000..969dfe4
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteRelationshipAST2.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 223:  DeleteRelationshipAST ::= typeOf TwoParametersAST
+ *</b>
+ */
+public class DeleteRelationshipAST2 extends ASTNode implements IDeleteRelationshipAST
+{
+    private TwoParametersAST _TwoParametersAST;
+
+    public TwoParametersAST getTwoParametersAST() { return _TwoParametersAST; }
+
+    public DeleteRelationshipAST2(IToken leftIToken, IToken rightIToken,
+                                  TwoParametersAST _TwoParametersAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._TwoParametersAST = _TwoParametersAST;
+        ((ASTNode) _TwoParametersAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof DeleteRelationshipAST2)) return false;
+        DeleteRelationshipAST2 other = (DeleteRelationshipAST2) o;
+        if (! _TwoParametersAST.equals(other.getTwoParametersAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getTwoParametersAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteRelationshipAST3.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteRelationshipAST3.java
new file mode 100644
index 0000000..34f0b7d
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteRelationshipAST3.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 224:  DeleteRelationshipAST ::= instanceOf TwoParametersAST
+ *</b>
+ */
+public class DeleteRelationshipAST3 extends ASTNode implements IDeleteRelationshipAST
+{
+    private TwoParametersAST _TwoParametersAST;
+
+    public TwoParametersAST getTwoParametersAST() { return _TwoParametersAST; }
+
+    public DeleteRelationshipAST3(IToken leftIToken, IToken rightIToken,
+                                  TwoParametersAST _TwoParametersAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._TwoParametersAST = _TwoParametersAST;
+        ((ASTNode) _TwoParametersAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof DeleteRelationshipAST3)) return false;
+        DeleteRelationshipAST3 other = (DeleteRelationshipAST3) o;
+        if (! _TwoParametersAST.equals(other.getTwoParametersAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getTwoParametersAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteRuleAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteRuleAST0.java
new file mode 100644
index 0000000..378e8fb
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteRuleAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 214:  DeleteRuleAST ::= delete LPAREN DeleteContentsAST RPAREN SEMICOLON
+ *</b>
+ */
+public class DeleteRuleAST0 extends ASTNode implements IDeleteRuleAST
+{
+    private DeleteContentsAST _DeleteContentsAST;
+
+    public DeleteContentsAST getDeleteContentsAST() { return _DeleteContentsAST; }
+
+    public DeleteRuleAST0(IToken leftIToken, IToken rightIToken,
+                          DeleteContentsAST _DeleteContentsAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._DeleteContentsAST = _DeleteContentsAST;
+        ((ASTNode) _DeleteContentsAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof DeleteRuleAST0)) return false;
+        DeleteRuleAST0 other = (DeleteRuleAST0) o;
+        if (! _DeleteContentsAST.equals(other.getDeleteContentsAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getDeleteContentsAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteRuleAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteRuleAST1.java
new file mode 100644
index 0000000..8970976
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteRuleAST1.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 215:  DeleteRuleAST ::= delete LPAREN DeleteRelationshipAST RPAREN SEMICOLON
+ *</b>
+ */
+public class DeleteRuleAST1 extends ASTNode implements IDeleteRuleAST
+{
+    private IDeleteRelationshipAST _DeleteRelationshipAST;
+
+    public IDeleteRelationshipAST getDeleteRelationshipAST() { return _DeleteRelationshipAST; }
+
+    public DeleteRuleAST1(IToken leftIToken, IToken rightIToken,
+                          IDeleteRelationshipAST _DeleteRelationshipAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._DeleteRelationshipAST = _DeleteRelationshipAST;
+        ((ASTNode) _DeleteRelationshipAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof DeleteRuleAST1)) return false;
+        DeleteRuleAST1 other = (DeleteRuleAST1) o;
+        if (! _DeleteRelationshipAST.equals(other.getDeleteRelationshipAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getDeleteRelationshipAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteSemanticsAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteSemanticsAST0.java
new file mode 100644
index 0000000..792dce9
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteSemanticsAST0.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 219:  DeleteSemanticsAST ::= delete_content
+ *</b>
+ */
+public class DeleteSemanticsAST0 extends ASTNodeToken implements IDeleteSemanticsAST
+{
+    public DeleteSemanticsAST0(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteSemanticsAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteSemanticsAST1.java
new file mode 100644
index 0000000..74a3488
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteSemanticsAST1.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 220:  DeleteSemanticsAST ::= move_content
+ *</b>
+ */
+public class DeleteSemanticsAST1 extends ASTNodeToken implements IDeleteSemanticsAST
+{
+    public DeleteSemanticsAST1(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteSemanticsOptAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteSemanticsOptAST.java
new file mode 100644
index 0000000..e9ebd4a
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DeleteSemanticsOptAST.java
@@ -0,0 +1,73 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 217:  DeleteSemanticsOptAST ::= $Empty
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 218:  DeleteSemanticsOptAST ::= COMMA DeleteSemanticsAST
+ *</b>
+ */
+public class DeleteSemanticsOptAST extends ASTNode implements IDeleteSemanticsOptAST
+{
+    private IDeleteSemanticsAST _DeleteSemanticsAST;
+
+    public IDeleteSemanticsAST getDeleteSemanticsAST() { return _DeleteSemanticsAST; }
+
+    public DeleteSemanticsOptAST(IToken leftIToken, IToken rightIToken,
+                                 IDeleteSemanticsAST _DeleteSemanticsAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._DeleteSemanticsAST = _DeleteSemanticsAST;
+        ((ASTNode) _DeleteSemanticsAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof DeleteSemanticsOptAST)) return false;
+        DeleteSemanticsOptAST other = (DeleteSemanticsOptAST) o;
+        if (! _DeleteSemanticsAST.equals(other.getDeleteSemanticsAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getDeleteSemanticsAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectedFormalParameterDefAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectedFormalParameterDefAST0.java
new file mode 100644
index 0000000..7dddd43
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectedFormalParameterDefAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 258:  DirectedFormalParameterDefAST ::= LPAREN DirectedFormalParamsAST RPAREN
+ *</b>
+ */
+public class DirectedFormalParameterDefAST0 extends ASTNode implements IDirectedFormalParameterDefAST
+{
+    private IDirectedFormalParamsAST _DirectedFormalParamsAST;
+
+    public IDirectedFormalParamsAST getDirectedFormalParamsAST() { return _DirectedFormalParamsAST; }
+
+    public DirectedFormalParameterDefAST0(IToken leftIToken, IToken rightIToken,
+                                          IDirectedFormalParamsAST _DirectedFormalParamsAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._DirectedFormalParamsAST = _DirectedFormalParamsAST;
+        ((ASTNode) _DirectedFormalParamsAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof DirectedFormalParameterDefAST0)) return false;
+        DirectedFormalParameterDefAST0 other = (DirectedFormalParameterDefAST0) o;
+        if (! _DirectedFormalParamsAST.equals(other.getDirectedFormalParamsAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getDirectedFormalParamsAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectedFormalParameterDefAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectedFormalParameterDefAST1.java
new file mode 100644
index 0000000..b4ec9b6
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectedFormalParameterDefAST1.java
@@ -0,0 +1,59 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 259:  DirectedFormalParameterDefAST ::= LPAREN RPAREN
+ *</b>
+ */
+public class DirectedFormalParameterDefAST1 extends ASTNode implements IDirectedFormalParameterDefAST
+{
+    public DirectedFormalParameterDefAST1(IToken leftIToken, IToken rightIToken)
+    {
+        super(leftIToken, rightIToken);
+
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof DirectedFormalParameterDefAST1)) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectedFormalParamsAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectedFormalParamsAST0.java
new file mode 100644
index 0000000..18f12aa
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectedFormalParamsAST0.java
@@ -0,0 +1,87 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 260:  DirectedFormalParamsAST ::= DirectionKindAST VariableDefAST TypeOptAST
+ *</b>
+ */
+public class DirectedFormalParamsAST0 extends ASTNode implements IDirectedFormalParamsAST
+{
+    private IDirectionKindAST _DirectionKindAST;
+    private VariableDefAST _VariableDefAST;
+    private TypeOptAST _TypeOptAST;
+
+    public IDirectionKindAST getDirectionKindAST() { return _DirectionKindAST; }
+    public VariableDefAST getVariableDefAST() { return _VariableDefAST; }
+    /**
+     * The value returned by <b>getTypeOptAST</b> may be <b>null</b>
+     */
+    public TypeOptAST getTypeOptAST() { return _TypeOptAST; }
+
+    public DirectedFormalParamsAST0(IToken leftIToken, IToken rightIToken,
+                                    IDirectionKindAST _DirectionKindAST,
+                                    VariableDefAST _VariableDefAST,
+                                    TypeOptAST _TypeOptAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._DirectionKindAST = _DirectionKindAST;
+        ((ASTNode) _DirectionKindAST).setParent(this);
+        this._VariableDefAST = _VariableDefAST;
+        ((ASTNode) _VariableDefAST).setParent(this);
+        this._TypeOptAST = _TypeOptAST;
+        if (_TypeOptAST != null) ((ASTNode) _TypeOptAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof DirectedFormalParamsAST0)) return false;
+        DirectedFormalParamsAST0 other = (DirectedFormalParamsAST0) o;
+        if (! _DirectionKindAST.equals(other.getDirectionKindAST())) return false;
+        if (! _VariableDefAST.equals(other.getVariableDefAST())) return false;
+        if (_TypeOptAST == null && other.getTypeOptAST() != null) return false;
+        else if (! _TypeOptAST.equals(other.getTypeOptAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getDirectionKindAST().hashCode());
+        hash = hash * 31 + (getVariableDefAST().hashCode());
+        hash = hash * 31 + (getTypeOptAST() == null ? 0 : getTypeOptAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectedFormalParamsAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectedFormalParamsAST1.java
new file mode 100644
index 0000000..6439970
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectedFormalParamsAST1.java
@@ -0,0 +1,94 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 261:  DirectedFormalParamsAST ::= DirectedFormalParamsAST COMMA DirectionKindAST VariableDefAST TypeOptAST
+ *</b>
+ */
+public class DirectedFormalParamsAST1 extends ASTNode implements IDirectedFormalParamsAST
+{
+    private IDirectedFormalParamsAST _DirectedFormalParamsAST;
+    private IDirectionKindAST _DirectionKindAST;
+    private VariableDefAST _VariableDefAST;
+    private TypeOptAST _TypeOptAST;
+
+    public IDirectedFormalParamsAST getDirectedFormalParamsAST() { return _DirectedFormalParamsAST; }
+    public IDirectionKindAST getDirectionKindAST() { return _DirectionKindAST; }
+    public VariableDefAST getVariableDefAST() { return _VariableDefAST; }
+    /**
+     * The value returned by <b>getTypeOptAST</b> may be <b>null</b>
+     */
+    public TypeOptAST getTypeOptAST() { return _TypeOptAST; }
+
+    public DirectedFormalParamsAST1(IToken leftIToken, IToken rightIToken,
+                                    IDirectedFormalParamsAST _DirectedFormalParamsAST,
+                                    IDirectionKindAST _DirectionKindAST,
+                                    VariableDefAST _VariableDefAST,
+                                    TypeOptAST _TypeOptAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._DirectedFormalParamsAST = _DirectedFormalParamsAST;
+        ((ASTNode) _DirectedFormalParamsAST).setParent(this);
+        this._DirectionKindAST = _DirectionKindAST;
+        ((ASTNode) _DirectionKindAST).setParent(this);
+        this._VariableDefAST = _VariableDefAST;
+        ((ASTNode) _VariableDefAST).setParent(this);
+        this._TypeOptAST = _TypeOptAST;
+        if (_TypeOptAST != null) ((ASTNode) _TypeOptAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof DirectedFormalParamsAST1)) return false;
+        DirectedFormalParamsAST1 other = (DirectedFormalParamsAST1) o;
+        if (! _DirectedFormalParamsAST.equals(other.getDirectedFormalParamsAST())) return false;
+        if (! _DirectionKindAST.equals(other.getDirectionKindAST())) return false;
+        if (! _VariableDefAST.equals(other.getVariableDefAST())) return false;
+        if (_TypeOptAST == null && other.getTypeOptAST() != null) return false;
+        else if (! _TypeOptAST.equals(other.getTypeOptAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getDirectedFormalParamsAST().hashCode());
+        hash = hash * 31 + (getDirectionKindAST().hashCode());
+        hash = hash * 31 + (getVariableDefAST().hashCode());
+        hash = hash * 31 + (getTypeOptAST() == null ? 0 : getTypeOptAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectionKindAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectionKindAST0.java
new file mode 100644
index 0000000..561f68e
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectionKindAST0.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 262:  DirectionKindAST ::= in
+ *</b>
+ */
+public class DirectionKindAST0 extends ASTNodeToken implements IDirectionKindAST
+{
+    public DirectionKindAST0(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectionKindAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectionKindAST1.java
new file mode 100644
index 0000000..d7276c9
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectionKindAST1.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 263:  DirectionKindAST ::= out
+ *</b>
+ */
+public class DirectionKindAST1 extends ASTNodeToken implements IDirectionKindAST
+{
+    public DirectionKindAST1(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectionKindAST2.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectionKindAST2.java
new file mode 100644
index 0000000..9c4602d
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DirectionKindAST2.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 264:  DirectionKindAST ::= inout
+ *</b>
+ */
+public class DirectionKindAST2 extends ASTNodeToken implements IDirectionKindAST
+{
+    public DirectionKindAST2(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DoActionOptAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DoActionOptAST0.java
new file mode 100644
index 0000000..3f6d3f5
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DoActionOptAST0.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 185:  DoActionOptAST ::= SEMICOLON
+ *</b>
+ */
+public class DoActionOptAST0 extends ASTNodeToken implements IDoActionOptAST
+{
+    public DoActionOptAST0(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DoActionOptAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DoActionOptAST1.java
new file mode 100644
index 0000000..b557467
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/DoActionOptAST1.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 186:  DoActionOptAST ::= do AsmRuleAST
+ *</b>
+ */
+public class DoActionOptAST1 extends ASTNode implements IDoActionOptAST
+{
+    private IAsmRuleAST _AsmRuleAST;
+
+    public IAsmRuleAST getAsmRuleAST() { return _AsmRuleAST; }
+
+    public DoActionOptAST1(IToken leftIToken, IToken rightIToken,
+                           IAsmRuleAST _AsmRuleAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._AsmRuleAST = _AsmRuleAST;
+        ((ASTNode) _AsmRuleAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof DoActionOptAST1)) return false;
+        DoActionOptAST1 other = (DoActionOptAST1) o;
+        if (! _AsmRuleAST.equals(other.getAsmRuleAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getAsmRuleAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ElementUpdateOpAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ElementUpdateOpAST.java
new file mode 100644
index 0000000..b93660c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ElementUpdateOpAST.java
@@ -0,0 +1,45 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 232:  ElementUpdateOpAST ::= rename
+ *<li>Rule 233:  ElementUpdateOpAST ::= setValue
+ *<li>Rule 234:  ElementUpdateOpAST ::= setFrom
+ *<li>Rule 235:  ElementUpdateOpAST ::= setTo
+ *<li>Rule 236:  ElementUpdateOpAST ::= setMultiplicity
+ *<li>Rule 237:  ElementUpdateOpAST ::= setAggregation
+ *<li>Rule 238:  ElementUpdateOpAST ::= setInverse
+ *</b>
+ */
+public class ElementUpdateOpAST extends ASTNodeToken implements IElementUpdateOpAST
+{
+    public ElementUpdateOpAST(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ElementUpdateRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ElementUpdateRuleAST.java
new file mode 100644
index 0000000..2312c87
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ElementUpdateRuleAST.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 231:  ElementUpdateRuleAST ::= ElementUpdateOpAST TwoParametersAST SEMICOLON
+ *</b>
+ */
+public class ElementUpdateRuleAST extends ASTNode implements IElementUpdateRuleAST
+{
+    private ElementUpdateOpAST _ElementUpdateOpAST;
+    private TwoParametersAST _TwoParametersAST;
+
+    public ElementUpdateOpAST getElementUpdateOpAST() { return _ElementUpdateOpAST; }
+    public TwoParametersAST getTwoParametersAST() { return _TwoParametersAST; }
+
+    public ElementUpdateRuleAST(IToken leftIToken, IToken rightIToken,
+                                ElementUpdateOpAST _ElementUpdateOpAST,
+                                TwoParametersAST _TwoParametersAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ElementUpdateOpAST = _ElementUpdateOpAST;
+        ((ASTNode) _ElementUpdateOpAST).setParent(this);
+        this._TwoParametersAST = _TwoParametersAST;
+        ((ASTNode) _TwoParametersAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ElementUpdateRuleAST)) return false;
+        ElementUpdateRuleAST other = (ElementUpdateRuleAST) o;
+        if (! _ElementUpdateOpAST.equals(other.getElementUpdateOpAST())) return false;
+        if (! _TwoParametersAST.equals(other.getTwoParametersAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getElementUpdateOpAST().hashCode());
+        hash = hash * 31 + (getTwoParametersAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/EntityAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/EntityAST.java
new file mode 100644
index 0000000..0544d2b
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/EntityAST.java
@@ -0,0 +1,87 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 50:  EntityAST ::= QualifiedTypeNameAST EntityBody ContainmentConstraintOptAST
+ *</b>
+ */
+public class EntityAST extends ASTNode implements IEntityAST
+{
+    private IQualifiedTypeNameAST _QualifiedTypeNameAST;
+    private EntityBody _EntityBody;
+    private IContainmentConstraintOptAST _ContainmentConstraintOptAST;
+
+    public IQualifiedTypeNameAST getQualifiedTypeNameAST() { return _QualifiedTypeNameAST; }
+    public EntityBody getEntityBody() { return _EntityBody; }
+    /**
+     * The value returned by <b>getContainmentConstraintOptAST</b> may be <b>null</b>
+     */
+    public IContainmentConstraintOptAST getContainmentConstraintOptAST() { return _ContainmentConstraintOptAST; }
+
+    public EntityAST(IToken leftIToken, IToken rightIToken,
+                     IQualifiedTypeNameAST _QualifiedTypeNameAST,
+                     EntityBody _EntityBody,
+                     IContainmentConstraintOptAST _ContainmentConstraintOptAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._QualifiedTypeNameAST = _QualifiedTypeNameAST;
+        ((ASTNode) _QualifiedTypeNameAST).setParent(this);
+        this._EntityBody = _EntityBody;
+        ((ASTNode) _EntityBody).setParent(this);
+        this._ContainmentConstraintOptAST = _ContainmentConstraintOptAST;
+        if (_ContainmentConstraintOptAST != null) ((ASTNode) _ContainmentConstraintOptAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof EntityAST)) return false;
+        EntityAST other = (EntityAST) o;
+        if (! _QualifiedTypeNameAST.equals(other.getQualifiedTypeNameAST())) return false;
+        if (! _EntityBody.equals(other.getEntityBody())) return false;
+        if (_ContainmentConstraintOptAST == null && other.getContainmentConstraintOptAST() != null) return false;
+        else if (! _ContainmentConstraintOptAST.equals(other.getContainmentConstraintOptAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getQualifiedTypeNameAST().hashCode());
+        hash = hash * 31 + (getEntityBody().hashCode());
+        hash = hash * 31 + (getContainmentConstraintOptAST() == null ? 0 : getContainmentConstraintOptAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/EntityBody.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/EntityBody.java
new file mode 100644
index 0000000..1b9ca60
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/EntityBody.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 51:  EntityBody ::= LPAREN PatternVariableDefRefAST RPAREN
+ *</b>
+ */
+public class EntityBody extends ASTNode implements IEntityBody
+{
+    private IPatternVariableDefRefAST _PatternVariableDefRefAST;
+
+    public IPatternVariableDefRefAST getPatternVariableDefRefAST() { return _PatternVariableDefRefAST; }
+
+    public EntityBody(IToken leftIToken, IToken rightIToken,
+                      IPatternVariableDefRefAST _PatternVariableDefRefAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._PatternVariableDefRefAST = _PatternVariableDefRefAST;
+        ((ASTNode) _PatternVariableDefRefAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof EntityBody)) return false;
+        EntityBody other = (EntityBody) o;
+        if (! _PatternVariableDefRefAST.equals(other.getPatternVariableDefRefAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getPatternVariableDefRefAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/EqualityTermAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/EqualityTermAST0.java
new file mode 100644
index 0000000..ed88e93
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/EqualityTermAST0.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 78:  EqualityTermAST ::= EqualityTermAST EQUAL_EQUAL RelationalTermAST
+ *</b>
+ */
+public class EqualityTermAST0 extends ASTNode implements IEqualityTermAST
+{
+    private IEqualityTermAST _EqualityTermAST;
+    private IRelationalTermAST _RelationalTermAST;
+
+    public IEqualityTermAST getEqualityTermAST() { return _EqualityTermAST; }
+    public IRelationalTermAST getRelationalTermAST() { return _RelationalTermAST; }
+
+    public EqualityTermAST0(IToken leftIToken, IToken rightIToken,
+                            IEqualityTermAST _EqualityTermAST,
+                            IRelationalTermAST _RelationalTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._EqualityTermAST = _EqualityTermAST;
+        ((ASTNode) _EqualityTermAST).setParent(this);
+        this._RelationalTermAST = _RelationalTermAST;
+        ((ASTNode) _RelationalTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof EqualityTermAST0)) return false;
+        EqualityTermAST0 other = (EqualityTermAST0) o;
+        if (! _EqualityTermAST.equals(other.getEqualityTermAST())) return false;
+        if (! _RelationalTermAST.equals(other.getRelationalTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getEqualityTermAST().hashCode());
+        hash = hash * 31 + (getRelationalTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/EqualityTermAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/EqualityTermAST1.java
new file mode 100644
index 0000000..002697c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/EqualityTermAST1.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 79:  EqualityTermAST ::= EqualityTermAST NOT_EQUAL RelationalTermAST
+ *</b>
+ */
+public class EqualityTermAST1 extends ASTNode implements IEqualityTermAST
+{
+    private IEqualityTermAST _EqualityTermAST;
+    private IRelationalTermAST _RelationalTermAST;
+
+    public IEqualityTermAST getEqualityTermAST() { return _EqualityTermAST; }
+    public IRelationalTermAST getRelationalTermAST() { return _RelationalTermAST; }
+
+    public EqualityTermAST1(IToken leftIToken, IToken rightIToken,
+                            IEqualityTermAST _EqualityTermAST,
+                            IRelationalTermAST _RelationalTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._EqualityTermAST = _EqualityTermAST;
+        ((ASTNode) _EqualityTermAST).setParent(this);
+        this._RelationalTermAST = _RelationalTermAST;
+        ((ASTNode) _RelationalTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof EqualityTermAST1)) return false;
+        EqualityTermAST1 other = (EqualityTermAST1) o;
+        if (! _EqualityTermAST.equals(other.getEqualityTermAST())) return false;
+        if (! _RelationalTermAST.equals(other.getRelationalTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getEqualityTermAST().hashCode());
+        hash = hash * 31 + (getRelationalTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/FailRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/FailRuleAST.java
new file mode 100644
index 0000000..6a16c46
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/FailRuleAST.java
@@ -0,0 +1,59 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 148:  FailRuleAST ::= fail SEMICOLON
+ *</b>
+ */
+public class FailRuleAST extends ASTNode implements IFailRuleAST
+{
+    public FailRuleAST(IToken leftIToken, IToken rightIToken)
+    {
+        super(leftIToken, rightIToken);
+
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof FailRuleAST)) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ForallRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ForallRuleAST.java
new file mode 100644
index 0000000..981fee1
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ForallRuleAST.java
@@ -0,0 +1,87 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 182:  ForallRuleAST ::= forall ConstrainedVariablesOptAST with ConditionAST DoActionOptAST
+ *</b>
+ */
+public class ForallRuleAST extends ASTNode implements IForallRuleAST
+{
+    private IConstrainedVariablesOptAST _ConstrainedVariablesOptAST;
+    private IConditionAST _ConditionAST;
+    private IDoActionOptAST _DoActionOptAST;
+
+    /**
+     * The value returned by <b>getConstrainedVariablesOptAST</b> may be <b>null</b>
+     */
+    public IConstrainedVariablesOptAST getConstrainedVariablesOptAST() { return _ConstrainedVariablesOptAST; }
+    public IConditionAST getConditionAST() { return _ConditionAST; }
+    public IDoActionOptAST getDoActionOptAST() { return _DoActionOptAST; }
+
+    public ForallRuleAST(IToken leftIToken, IToken rightIToken,
+                         IConstrainedVariablesOptAST _ConstrainedVariablesOptAST,
+                         IConditionAST _ConditionAST,
+                         IDoActionOptAST _DoActionOptAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ConstrainedVariablesOptAST = _ConstrainedVariablesOptAST;
+        if (_ConstrainedVariablesOptAST != null) ((ASTNode) _ConstrainedVariablesOptAST).setParent(this);
+        this._ConditionAST = _ConditionAST;
+        ((ASTNode) _ConditionAST).setParent(this);
+        this._DoActionOptAST = _DoActionOptAST;
+        ((ASTNode) _DoActionOptAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ForallRuleAST)) return false;
+        ForallRuleAST other = (ForallRuleAST) o;
+        if (_ConstrainedVariablesOptAST == null && other.getConstrainedVariablesOptAST() != null) return false;
+        else if (! _ConstrainedVariablesOptAST.equals(other.getConstrainedVariablesOptAST())) return false;
+        if (! _ConditionAST.equals(other.getConditionAST())) return false;
+        if (! _DoActionOptAST.equals(other.getDoActionOptAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getConstrainedVariablesOptAST() == null ? 0 : getConstrainedVariablesOptAST().hashCode());
+        hash = hash * 31 + (getConditionAST().hashCode());
+        hash = hash * 31 + (getDoActionOptAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/FormalParameterDefAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/FormalParameterDefAST0.java
new file mode 100644
index 0000000..0f64661
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/FormalParameterDefAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 254:  FormalParameterDefAST ::= LPAREN FormalParamsAST RPAREN
+ *</b>
+ */
+public class FormalParameterDefAST0 extends ASTNode implements IFormalParameterDefAST
+{
+    private IFormalParamsAST _FormalParamsAST;
+
+    public IFormalParamsAST getFormalParamsAST() { return _FormalParamsAST; }
+
+    public FormalParameterDefAST0(IToken leftIToken, IToken rightIToken,
+                                  IFormalParamsAST _FormalParamsAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._FormalParamsAST = _FormalParamsAST;
+        ((ASTNode) _FormalParamsAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof FormalParameterDefAST0)) return false;
+        FormalParameterDefAST0 other = (FormalParameterDefAST0) o;
+        if (! _FormalParamsAST.equals(other.getFormalParamsAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getFormalParamsAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/FormalParameterDefAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/FormalParameterDefAST1.java
new file mode 100644
index 0000000..dd3c7ec
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/FormalParameterDefAST1.java
@@ -0,0 +1,59 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 255:  FormalParameterDefAST ::= LPAREN RPAREN
+ *</b>
+ */
+public class FormalParameterDefAST1 extends ASTNode implements IFormalParameterDefAST
+{
+    public FormalParameterDefAST1(IToken leftIToken, IToken rightIToken)
+    {
+        super(leftIToken, rightIToken);
+
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof FormalParameterDefAST1)) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/FormalParamsAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/FormalParamsAST0.java
new file mode 100644
index 0000000..b6f43a4
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/FormalParamsAST0.java
@@ -0,0 +1,80 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 256:  FormalParamsAST ::= PatternVariableDefAST TypeOptAST
+ *</b>
+ */
+public class FormalParamsAST0 extends ASTNode implements IFormalParamsAST
+{
+    private PatternVariableDefAST _PatternVariableDefAST;
+    private TypeOptAST _TypeOptAST;
+
+    public PatternVariableDefAST getPatternVariableDefAST() { return _PatternVariableDefAST; }
+    /**
+     * The value returned by <b>getTypeOptAST</b> may be <b>null</b>
+     */
+    public TypeOptAST getTypeOptAST() { return _TypeOptAST; }
+
+    public FormalParamsAST0(IToken leftIToken, IToken rightIToken,
+                            PatternVariableDefAST _PatternVariableDefAST,
+                            TypeOptAST _TypeOptAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._PatternVariableDefAST = _PatternVariableDefAST;
+        ((ASTNode) _PatternVariableDefAST).setParent(this);
+        this._TypeOptAST = _TypeOptAST;
+        if (_TypeOptAST != null) ((ASTNode) _TypeOptAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof FormalParamsAST0)) return false;
+        FormalParamsAST0 other = (FormalParamsAST0) o;
+        if (! _PatternVariableDefAST.equals(other.getPatternVariableDefAST())) return false;
+        if (_TypeOptAST == null && other.getTypeOptAST() != null) return false;
+        else if (! _TypeOptAST.equals(other.getTypeOptAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getPatternVariableDefAST().hashCode());
+        hash = hash * 31 + (getTypeOptAST() == null ? 0 : getTypeOptAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/FormalParamsAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/FormalParamsAST1.java
new file mode 100644
index 0000000..0af1c8a
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/FormalParamsAST1.java
@@ -0,0 +1,87 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 257:  FormalParamsAST ::= FormalParamsAST COMMA PatternVariableDefAST TypeOptAST
+ *</b>
+ */
+public class FormalParamsAST1 extends ASTNode implements IFormalParamsAST
+{
+    private IFormalParamsAST _FormalParamsAST;
+    private PatternVariableDefAST _PatternVariableDefAST;
+    private TypeOptAST _TypeOptAST;
+
+    public IFormalParamsAST getFormalParamsAST() { return _FormalParamsAST; }
+    public PatternVariableDefAST getPatternVariableDefAST() { return _PatternVariableDefAST; }
+    /**
+     * The value returned by <b>getTypeOptAST</b> may be <b>null</b>
+     */
+    public TypeOptAST getTypeOptAST() { return _TypeOptAST; }
+
+    public FormalParamsAST1(IToken leftIToken, IToken rightIToken,
+                            IFormalParamsAST _FormalParamsAST,
+                            PatternVariableDefAST _PatternVariableDefAST,
+                            TypeOptAST _TypeOptAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._FormalParamsAST = _FormalParamsAST;
+        ((ASTNode) _FormalParamsAST).setParent(this);
+        this._PatternVariableDefAST = _PatternVariableDefAST;
+        ((ASTNode) _PatternVariableDefAST).setParent(this);
+        this._TypeOptAST = _TypeOptAST;
+        if (_TypeOptAST != null) ((ASTNode) _TypeOptAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof FormalParamsAST1)) return false;
+        FormalParamsAST1 other = (FormalParamsAST1) o;
+        if (! _FormalParamsAST.equals(other.getFormalParamsAST())) return false;
+        if (! _PatternVariableDefAST.equals(other.getPatternVariableDefAST())) return false;
+        if (_TypeOptAST == null && other.getTypeOptAST() != null) return false;
+        else if (! _TypeOptAST.equals(other.getTypeOptAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getFormalParamsAST().hashCode());
+        hash = hash * 31 + (getPatternVariableDefAST().hashCode());
+        hash = hash * 31 + (getTypeOptAST() == null ? 0 : getTypeOptAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GTASMDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GTASMDefAST.java
new file mode 100644
index 0000000..c7ed475
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GTASMDefAST.java
@@ -0,0 +1,87 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 8:  GTASMDefAST ::= OptAnnotationsAST machine TypeNameAST LBRACE MachineContentsAST RBRACE
+ *</b>
+ */
+public class GTASMDefAST extends ASTNode implements IGTASMDefAST
+{
+    private IOptAnnotationsAST _OptAnnotationsAST;
+    private ITypeNameAST _TypeNameAST;
+    private IMachineContentsAST _MachineContentsAST;
+
+    /**
+     * The value returned by <b>getOptAnnotationsAST</b> may be <b>null</b>
+     */
+    public IOptAnnotationsAST getOptAnnotationsAST() { return _OptAnnotationsAST; }
+    public ITypeNameAST getTypeNameAST() { return _TypeNameAST; }
+    public IMachineContentsAST getMachineContentsAST() { return _MachineContentsAST; }
+
+    public GTASMDefAST(IToken leftIToken, IToken rightIToken,
+                       IOptAnnotationsAST _OptAnnotationsAST,
+                       ITypeNameAST _TypeNameAST,
+                       IMachineContentsAST _MachineContentsAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._OptAnnotationsAST = _OptAnnotationsAST;
+        if (_OptAnnotationsAST != null) ((ASTNode) _OptAnnotationsAST).setParent(this);
+        this._TypeNameAST = _TypeNameAST;
+        ((ASTNode) _TypeNameAST).setParent(this);
+        this._MachineContentsAST = _MachineContentsAST;
+        ((ASTNode) _MachineContentsAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof GTASMDefAST)) return false;
+        GTASMDefAST other = (GTASMDefAST) o;
+        if (_OptAnnotationsAST == null && other.getOptAnnotationsAST() != null) return false;
+        else if (! _OptAnnotationsAST.equals(other.getOptAnnotationsAST())) return false;
+        if (! _TypeNameAST.equals(other.getTypeNameAST())) return false;
+        if (! _MachineContentsAST.equals(other.getMachineContentsAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getOptAnnotationsAST() == null ? 0 : getOptAnnotationsAST().hashCode());
+        hash = hash * 31 + (getTypeNameAST().hashCode());
+        hash = hash * 31 + (getMachineContentsAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GTRuleBodyAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GTRuleBodyAST0.java
new file mode 100644
index 0000000..1e44b00
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GTRuleBodyAST0.java
@@ -0,0 +1,91 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 62:  GTRuleBodyAST ::= LBRACE PreconditionDefAST PostconditionOptAST ActionOptAST RBRACE
+ *</b>
+ */
+public class GTRuleBodyAST0 extends ASTNode implements IGTRuleBodyAST
+{
+    private IPreconditionDefAST _PreconditionDefAST;
+    private IPostconditionOptAST _PostconditionOptAST;
+    private ActionOptAST _ActionOptAST;
+
+    public IPreconditionDefAST getPreconditionDefAST() { return _PreconditionDefAST; }
+    /**
+     * The value returned by <b>getPostconditionOptAST</b> may be <b>null</b>
+     */
+    public IPostconditionOptAST getPostconditionOptAST() { return _PostconditionOptAST; }
+    /**
+     * The value returned by <b>getActionOptAST</b> may be <b>null</b>
+     */
+    public ActionOptAST getActionOptAST() { return _ActionOptAST; }
+
+    public GTRuleBodyAST0(IToken leftIToken, IToken rightIToken,
+                          IPreconditionDefAST _PreconditionDefAST,
+                          IPostconditionOptAST _PostconditionOptAST,
+                          ActionOptAST _ActionOptAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._PreconditionDefAST = _PreconditionDefAST;
+        ((ASTNode) _PreconditionDefAST).setParent(this);
+        this._PostconditionOptAST = _PostconditionOptAST;
+        if (_PostconditionOptAST != null) ((ASTNode) _PostconditionOptAST).setParent(this);
+        this._ActionOptAST = _ActionOptAST;
+        if (_ActionOptAST != null) ((ASTNode) _ActionOptAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof GTRuleBodyAST0)) return false;
+        GTRuleBodyAST0 other = (GTRuleBodyAST0) o;
+        if (! _PreconditionDefAST.equals(other.getPreconditionDefAST())) return false;
+        if (_PostconditionOptAST == null && other.getPostconditionOptAST() != null) return false;
+        else if (! _PostconditionOptAST.equals(other.getPostconditionOptAST())) return false;
+        if (_ActionOptAST == null && other.getActionOptAST() != null) return false;
+        else if (! _ActionOptAST.equals(other.getActionOptAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getPreconditionDefAST().hashCode());
+        hash = hash * 31 + (getPostconditionOptAST() == null ? 0 : getPostconditionOptAST().hashCode());
+        hash = hash * 31 + (getActionOptAST() == null ? 0 : getActionOptAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GTRuleBodyAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GTRuleBodyAST1.java
new file mode 100644
index 0000000..945855d
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GTRuleBodyAST1.java
@@ -0,0 +1,53 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import org.eclipse.viatra2.lpgparser.*;
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 63:  GTRuleBodyAST ::= ERROR_TOKEN
+ *</b>
+ */
+public class GTRuleBodyAST1 extends ASTNodeToken implements IGTRuleBodyAST
+{
+    private VTCLParser environment;
+    public VTCLParser getEnvironment() { return environment; }
+
+    public GTRuleBodyAST1(VTCLParser environment, IToken token)    {
+        super(token);
+        this.environment = environment;
+        initialize();
+    }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+
+	void initialize()
+    {
+               //reportErrorTokenMessage(getRhsTokenIndex(1), "Namespace import");
+        }
+
+    }
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GTRuleCallAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GTRuleCallAST.java
new file mode 100644
index 0000000..985092c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GTRuleCallAST.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 71:  GTRuleCallAST ::= apply QualifiedTypeNameAST ActualParameterDefAST
+ *</b>
+ */
+public class GTRuleCallAST extends ASTNode implements IGTRuleCallAST
+{
+    private IQualifiedTypeNameAST _QualifiedTypeNameAST;
+    private IActualParameterDefAST _ActualParameterDefAST;
+
+    public IQualifiedTypeNameAST getQualifiedTypeNameAST() { return _QualifiedTypeNameAST; }
+    public IActualParameterDefAST getActualParameterDefAST() { return _ActualParameterDefAST; }
+
+    public GTRuleCallAST(IToken leftIToken, IToken rightIToken,
+                         IQualifiedTypeNameAST _QualifiedTypeNameAST,
+                         IActualParameterDefAST _ActualParameterDefAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._QualifiedTypeNameAST = _QualifiedTypeNameAST;
+        ((ASTNode) _QualifiedTypeNameAST).setParent(this);
+        this._ActualParameterDefAST = _ActualParameterDefAST;
+        ((ASTNode) _ActualParameterDefAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof GTRuleCallAST)) return false;
+        GTRuleCallAST other = (GTRuleCallAST) o;
+        if (! _QualifiedTypeNameAST.equals(other.getQualifiedTypeNameAST())) return false;
+        if (! _ActualParameterDefAST.equals(other.getActualParameterDefAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getQualifiedTypeNameAST().hashCode());
+        hash = hash * 31 + (getActualParameterDefAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GTRuleDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GTRuleDefAST.java
new file mode 100644
index 0000000..f16a25e
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GTRuleDefAST.java
@@ -0,0 +1,94 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 61:  GTRuleDefAST ::= OptAnnotationsAST gtrule TypeNameAST DirectedFormalParameterDefAST EQUAL GTRuleBodyAST
+ *</b>
+ */
+public class GTRuleDefAST extends ASTNode implements IGTRuleDefAST
+{
+    private IOptAnnotationsAST _OptAnnotationsAST;
+    private ITypeNameAST _TypeNameAST;
+    private IDirectedFormalParameterDefAST _DirectedFormalParameterDefAST;
+    private IGTRuleBodyAST _GTRuleBodyAST;
+
+    /**
+     * The value returned by <b>getOptAnnotationsAST</b> may be <b>null</b>
+     */
+    public IOptAnnotationsAST getOptAnnotationsAST() { return _OptAnnotationsAST; }
+    public ITypeNameAST getTypeNameAST() { return _TypeNameAST; }
+    public IDirectedFormalParameterDefAST getDirectedFormalParameterDefAST() { return _DirectedFormalParameterDefAST; }
+    public IGTRuleBodyAST getGTRuleBodyAST() { return _GTRuleBodyAST; }
+
+    public GTRuleDefAST(IToken leftIToken, IToken rightIToken,
+                        IOptAnnotationsAST _OptAnnotationsAST,
+                        ITypeNameAST _TypeNameAST,
+                        IDirectedFormalParameterDefAST _DirectedFormalParameterDefAST,
+                        IGTRuleBodyAST _GTRuleBodyAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._OptAnnotationsAST = _OptAnnotationsAST;
+        if (_OptAnnotationsAST != null) ((ASTNode) _OptAnnotationsAST).setParent(this);
+        this._TypeNameAST = _TypeNameAST;
+        ((ASTNode) _TypeNameAST).setParent(this);
+        this._DirectedFormalParameterDefAST = _DirectedFormalParameterDefAST;
+        ((ASTNode) _DirectedFormalParameterDefAST).setParent(this);
+        this._GTRuleBodyAST = _GTRuleBodyAST;
+        ((ASTNode) _GTRuleBodyAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof GTRuleDefAST)) return false;
+        GTRuleDefAST other = (GTRuleDefAST) o;
+        if (_OptAnnotationsAST == null && other.getOptAnnotationsAST() != null) return false;
+        else if (! _OptAnnotationsAST.equals(other.getOptAnnotationsAST())) return false;
+        if (! _TypeNameAST.equals(other.getTypeNameAST())) return false;
+        if (! _DirectedFormalParameterDefAST.equals(other.getDirectedFormalParameterDefAST())) return false;
+        if (! _GTRuleBodyAST.equals(other.getGTRuleBodyAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getOptAnnotationsAST() == null ? 0 : getOptAnnotationsAST().hashCode());
+        hash = hash * 31 + (getTypeNameAST().hashCode());
+        hash = hash * 31 + (getDirectedFormalParameterDefAST().hashCode());
+        hash = hash * 31 + (getGTRuleBodyAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GraphPatternCallAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GraphPatternCallAST.java
new file mode 100644
index 0000000..08b2846
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GraphPatternCallAST.java
@@ -0,0 +1,87 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 47:  GraphPatternCallAST ::= find QualifiedTypeNameAST ActualParameterDefAST OptMatchCountAST
+ *</b>
+ */
+public class GraphPatternCallAST extends ASTNode implements IGraphPatternCallAST
+{
+    private IQualifiedTypeNameAST _QualifiedTypeNameAST;
+    private IActualParameterDefAST _ActualParameterDefAST;
+    private OptMatchCountAST _OptMatchCountAST;
+
+    public IQualifiedTypeNameAST getQualifiedTypeNameAST() { return _QualifiedTypeNameAST; }
+    public IActualParameterDefAST getActualParameterDefAST() { return _ActualParameterDefAST; }
+    /**
+     * The value returned by <b>getOptMatchCountAST</b> may be <b>null</b>
+     */
+    public OptMatchCountAST getOptMatchCountAST() { return _OptMatchCountAST; }
+
+    public GraphPatternCallAST(IToken leftIToken, IToken rightIToken,
+                               IQualifiedTypeNameAST _QualifiedTypeNameAST,
+                               IActualParameterDefAST _ActualParameterDefAST,
+                               OptMatchCountAST _OptMatchCountAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._QualifiedTypeNameAST = _QualifiedTypeNameAST;
+        ((ASTNode) _QualifiedTypeNameAST).setParent(this);
+        this._ActualParameterDefAST = _ActualParameterDefAST;
+        ((ASTNode) _ActualParameterDefAST).setParent(this);
+        this._OptMatchCountAST = _OptMatchCountAST;
+        if (_OptMatchCountAST != null) ((ASTNode) _OptMatchCountAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof GraphPatternCallAST)) return false;
+        GraphPatternCallAST other = (GraphPatternCallAST) o;
+        if (! _QualifiedTypeNameAST.equals(other.getQualifiedTypeNameAST())) return false;
+        if (! _ActualParameterDefAST.equals(other.getActualParameterDefAST())) return false;
+        if (_OptMatchCountAST == null && other.getOptMatchCountAST() != null) return false;
+        else if (! _OptMatchCountAST.equals(other.getOptMatchCountAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getQualifiedTypeNameAST().hashCode());
+        hash = hash * 31 + (getActualParameterDefAST().hashCode());
+        hash = hash * 31 + (getOptMatchCountAST() == null ? 0 : getOptMatchCountAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GraphPatternDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GraphPatternDefAST.java
new file mode 100644
index 0000000..820e009
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/GraphPatternDefAST.java
@@ -0,0 +1,105 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 16:  GraphPatternDefAST ::= OptAnnotationsAST OptShareableDefAST pattern TypeNameAST FormalParameterDefAST EQUAL PatternBodiesAST
+ *</b>
+ */
+public class GraphPatternDefAST extends ASTNode implements IGraphPatternDefAST
+{
+    private IOptAnnotationsAST _OptAnnotationsAST;
+    private OptShareableDefAST _OptShareableDefAST;
+    private ITypeNameAST _TypeNameAST;
+    private IFormalParameterDefAST _FormalParameterDefAST;
+    private IPatternBodiesAST _PatternBodiesAST;
+
+    /**
+     * The value returned by <b>getOptAnnotationsAST</b> may be <b>null</b>
+     */
+    public IOptAnnotationsAST getOptAnnotationsAST() { return _OptAnnotationsAST; }
+    /**
+     * The value returned by <b>getOptShareableDefAST</b> may be <b>null</b>
+     */
+    public OptShareableDefAST getOptShareableDefAST() { return _OptShareableDefAST; }
+    public ITypeNameAST getTypeNameAST() { return _TypeNameAST; }
+    public IFormalParameterDefAST getFormalParameterDefAST() { return _FormalParameterDefAST; }
+    public IPatternBodiesAST getPatternBodiesAST() { return _PatternBodiesAST; }
+
+    public GraphPatternDefAST(IToken leftIToken, IToken rightIToken,
+                              IOptAnnotationsAST _OptAnnotationsAST,
+                              OptShareableDefAST _OptShareableDefAST,
+                              ITypeNameAST _TypeNameAST,
+                              IFormalParameterDefAST _FormalParameterDefAST,
+                              IPatternBodiesAST _PatternBodiesAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._OptAnnotationsAST = _OptAnnotationsAST;
+        if (_OptAnnotationsAST != null) ((ASTNode) _OptAnnotationsAST).setParent(this);
+        this._OptShareableDefAST = _OptShareableDefAST;
+        if (_OptShareableDefAST != null) ((ASTNode) _OptShareableDefAST).setParent(this);
+        this._TypeNameAST = _TypeNameAST;
+        ((ASTNode) _TypeNameAST).setParent(this);
+        this._FormalParameterDefAST = _FormalParameterDefAST;
+        ((ASTNode) _FormalParameterDefAST).setParent(this);
+        this._PatternBodiesAST = _PatternBodiesAST;
+        ((ASTNode) _PatternBodiesAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof GraphPatternDefAST)) return false;
+        GraphPatternDefAST other = (GraphPatternDefAST) o;
+        if (_OptAnnotationsAST == null && other.getOptAnnotationsAST() != null) return false;
+        else if (! _OptAnnotationsAST.equals(other.getOptAnnotationsAST())) return false;
+        if (_OptShareableDefAST == null && other.getOptShareableDefAST() != null) return false;
+        else if (! _OptShareableDefAST.equals(other.getOptShareableDefAST())) return false;
+        if (! _TypeNameAST.equals(other.getTypeNameAST())) return false;
+        if (! _FormalParameterDefAST.equals(other.getFormalParameterDefAST())) return false;
+        if (! _PatternBodiesAST.equals(other.getPatternBodiesAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getOptAnnotationsAST() == null ? 0 : getOptAnnotationsAST().hashCode());
+        hash = hash * 31 + (getOptShareableDefAST() == null ? 0 : getOptShareableDefAST().hashCode());
+        hash = hash * 31 + (getTypeNameAST().hashCode());
+        hash = hash * 31 + (getFormalParameterDefAST().hashCode());
+        hash = hash * 31 + (getPatternBodiesAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IASMFunctionNameAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IASMFunctionNameAST.java
new file mode 100644
index 0000000..770389d
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IASMFunctionNameAST.java
@@ -0,0 +1,40 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>ValueQualifiedNameAST
+ *<li>ValueLocalNameAST0
+ *<li>ValueLocalNameAST1
+ *</ul>
+ *</b>
+ */
+public interface IASMFunctionNameAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IASTNodeToken.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IASTNodeToken.java
new file mode 100644
index 0000000..762b7df
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IASTNodeToken.java
@@ -0,0 +1,135 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by:
+ *<b>
+ *<ul>
+ *<li>MachineContentAST
+ *<li>GraphPatternDefAST
+ *<li>OptShareableDefAST
+ *<li>PatternBodyContentAST
+ *<li>NegativePatternAST
+ *<li>PatternCompositionAST
+ *<li>PatternVariableAssignmentAST
+ *<li>NonInjectivityConstraintAST
+ *<li>CheckConditionAST
+ *<li>PatternVariableDefAST
+ *<li>PatternVariableRefAST
+ *<li>CounterVariableAST
+ *<li>EntityAST
+ *<li>RelationAST
+ *<li>GTRuleDefAST
+ *<li>RelationalOpAST
+ *<li>AsmFunctionDefAST
+ *<li>ArityAST
+ *<li>BuiltInFunctionNameAST
+ *<li>ConversionFunctionNameAST
+ *<li>AsmRuleDefAST
+ *<li>AsmRuleAST
+ *<li>SkipRuleAST
+ *<li>FailRuleAST
+ *<li>CallRuleAST
+ *<li>LogRuleAST
+ *<li>LogLevelAST
+ *<li>SequentialRuleAST
+ *<li>ParallelRuleAST
+ *<li>RandomRuleAST
+ *<li>OptSemicolonAST
+ *<li>LetRuleAST
+ *<li>IterateRuleAST
+ *<li>ChooseRuleAST
+ *<li>ForallRuleAST
+ *<li>WhenRuleAST
+ *<li>CopyRuleAST
+ *<li>MoveRuleAST
+ *<li>ElementUpdateRuleAST
+ *<li>ElementUpdateOpAST
+ *<li>VariableRefAST
+ *<li>VariableDefRefAST
+ *<li>VariableDefAST
+ *<li>UndefValueAST
+ *<li>StringConstantAST
+ *<li>KeywordAsIdentifier
+ *<li>AnnotationNameAST
+ *<li>NamespaceImportAST0
+ *<li>NamespaceImportAST1
+ *<li>PatternVariableDefRefAST0
+ *<li>PatternVariableDefRefAST1
+ *<li>InheritanceAST0
+ *<li>InheritanceAST1
+ *<li>InstantiationAST0
+ *<li>InstantiationAST1
+ *<li>GTRuleBodyAST0
+ *<li>GTRuleBodyAST1
+ *<li>InitialValuesOptAST0
+ *<li>InitialValuesOptAST1
+ *<li>UpdateRuleAST0
+ *<li>UpdateRuleAST1
+ *<li>PrintRuleAST0
+ *<li>PrintRuleAST1
+ *<li>PrintRuleAST2
+ *<li>PrintRuleAST3
+ *<li>DoActionOptAST0
+ *<li>DoActionOptAST1
+ *<li>IfRuleAST0
+ *<li>IfRuleAST1
+ *<li>TryRuleAST0
+ *<li>TryRuleAST1
+ *<li>CreateRuleAST0
+ *<li>CreateRuleAST1
+ *<li>DeleteRuleAST0
+ *<li>DeleteRuleAST1
+ *<li>DeleteSemanticsAST0
+ *<li>DeleteSemanticsAST1
+ *<li>CopySemanticsAST0
+ *<li>CopySemanticsAST1
+ *<li>TypeNameAST0
+ *<li>TypeNameAST1
+ *<li>TypeNameAST2
+ *<li>TypeNameAST3
+ *<li>ValueLocalNameAST0
+ *<li>ValueLocalNameAST1
+ *<li>DirectionKindAST0
+ *<li>DirectionKindAST1
+ *<li>DirectionKindAST2
+ *<li>BooleanConstantAST0
+ *<li>BooleanConstantAST1
+ *<li>MultiplicityConstantAST0
+ *<li>MultiplicityConstantAST1
+ *<li>MultiplicityConstantAST2
+ *<li>MultiplicityConstantAST3
+ *<li>NumericConstantAST0
+ *<li>NumericConstantAST1
+ *<li>NumericConstantAST2
+ *<li>NumericConstantAST3
+ *</ul>
+ *</b>
+ */
+public interface IASTNodeToken
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IActionOptAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IActionOptAST.java
new file mode 100644
index 0000000..a5fea17
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IActionOptAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>ActionOptAST</b>
+ */
+public interface IActionOptAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IActualParameterDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IActualParameterDefAST.java
new file mode 100644
index 0000000..7579668
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IActualParameterDefAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>ActualParameterDefAST0
+ *<li>ActualParameterDefAST1
+ *</ul>
+ *</b>
+ */
+public interface IActualParameterDefAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IActualParamsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IActualParamsAST.java
new file mode 100644
index 0000000..3966f7a
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IActualParamsAST.java
@@ -0,0 +1,66 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>GraphPatternCallAST
+ *<li>BaseArithmeticTermAST
+ *<li>AsmFunctionLocationAST
+ *<li>VariableRefAST
+ *<li>ValueQualifiedNameAST
+ *<li>ActualParamsAST
+ *<li>UndefValueAST
+ *<li>StringConstantAST
+ *<li>ArithmeticTermAST0
+ *<li>ArithmeticTermAST1
+ *<li>MultArithmeticTermAST0
+ *<li>MultArithmeticTermAST1
+ *<li>MultArithmeticTermAST2
+ *<li>UnaryArithmeticTermAST0
+ *<li>UnaryArithmeticTermAST1
+ *<li>PredefinedFunctionCallAST0
+ *<li>PredefinedFunctionCallAST1
+ *<li>ValueLocalNameAST0
+ *<li>ValueLocalNameAST1
+ *<li>BooleanConstantAST0
+ *<li>BooleanConstantAST1
+ *<li>MultiplicityConstantAST0
+ *<li>MultiplicityConstantAST1
+ *<li>MultiplicityConstantAST2
+ *<li>MultiplicityConstantAST3
+ *<li>NumericConstantAST0
+ *<li>NumericConstantAST1
+ *<li>NumericConstantAST2
+ *<li>NumericConstantAST3
+ *</ul>
+ *</b>
+ */
+public interface IActualParamsAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IActualParamsPatternVariablesAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IActualParamsPatternVariablesAST.java
new file mode 100644
index 0000000..1287dc3
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IActualParamsPatternVariablesAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>PatternVariableRefAST
+ *<li>ActualParamsPatternVariablesAST
+ *</ul>
+ *</b>
+ */
+public interface IActualParamsPatternVariablesAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IActualPatternParameterDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IActualPatternParameterDefAST.java
new file mode 100644
index 0000000..963a591
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IActualPatternParameterDefAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>ActualPatternParameterDefAST0
+ *<li>ActualPatternParameterDefAST1
+ *</ul>
+ *</b>
+ */
+public interface IActualPatternParameterDefAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAnnotationAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAnnotationAST.java
new file mode 100644
index 0000000..e4ee885
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAnnotationAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>AnnotationAST
+ *<li>AnnotationNameAST
+ *</ul>
+ *</b>
+ */
+public interface IAnnotationAST extends IAnnotationsAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAnnotationBodyAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAnnotationBodyAST.java
new file mode 100644
index 0000000..ca28bd0
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAnnotationBodyAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>AnnotationBodyAST
+ *<li>KeyValuePairAST
+ *</ul>
+ *</b>
+ */
+public interface IAnnotationBodyAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAnnotationNameAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAnnotationNameAST.java
new file mode 100644
index 0000000..2799c04
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAnnotationNameAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by <b>AnnotationNameAST</b>
+ */
+public interface IAnnotationNameAST extends IAnnotationAST, IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAnnotationsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAnnotationsAST.java
new file mode 100644
index 0000000..2af66f9
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAnnotationsAST.java
@@ -0,0 +1,29 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>AnnotationsAST
+ *<li>AnnotationAST
+ *<li>AnnotationNameAST
+ *</ul>
+ *</b>
+ */
+public interface IAnnotationsAST extends IOptAnnotationsAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IArithmeticTermAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IArithmeticTermAST.java
new file mode 100644
index 0000000..52f05f3
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IArithmeticTermAST.java
@@ -0,0 +1,54 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>GraphPatternCallAST
+ *<li>BaseArithmeticTermAST
+ *<li>AsmFunctionLocationAST
+ *<li>VariableRefAST
+ *<li>ValueQualifiedNameAST
+ *<li>UndefValueAST
+ *<li>StringConstantAST
+ *<li>ArithmeticTermAST0
+ *<li>ArithmeticTermAST1
+ *<li>MultArithmeticTermAST0
+ *<li>MultArithmeticTermAST1
+ *<li>MultArithmeticTermAST2
+ *<li>UnaryArithmeticTermAST0
+ *<li>UnaryArithmeticTermAST1
+ *<li>PredefinedFunctionCallAST0
+ *<li>PredefinedFunctionCallAST1
+ *<li>ValueLocalNameAST0
+ *<li>ValueLocalNameAST1
+ *<li>BooleanConstantAST0
+ *<li>BooleanConstantAST1
+ *<li>MultiplicityConstantAST0
+ *<li>MultiplicityConstantAST1
+ *<li>MultiplicityConstantAST2
+ *<li>MultiplicityConstantAST3
+ *<li>NumericConstantAST0
+ *<li>NumericConstantAST1
+ *<li>NumericConstantAST2
+ *<li>NumericConstantAST3
+ *</ul>
+ *</b>
+ */
+public interface IArithmeticTermAST extends IRelationalTermAST, IActualParamsAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IArityAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IArityAST.java
new file mode 100644
index 0000000..f287d4a
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IArityAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by <b>ArityAST</b>
+ */
+public interface IArityAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IArityOrTypeDeclAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IArityOrTypeDeclAST.java
new file mode 100644
index 0000000..b05054f
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IArityOrTypeDeclAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>ArityOrTypeDeclAST0
+ *<li>ArityOrTypeDeclAST1
+ *</ul>
+ *</b>
+ */
+public interface IArityOrTypeDeclAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmFunctionDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmFunctionDefAST.java
new file mode 100644
index 0000000..c378c75
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmFunctionDefAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>AsmFunctionDefAST</b>
+ */
+public interface IAsmFunctionDefAST extends IMachineContentAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmFunctionLocationAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmFunctionLocationAST.java
new file mode 100644
index 0000000..650e897
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmFunctionLocationAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>AsmFunctionLocationAST</b>
+ */
+public interface IAsmFunctionLocationAST extends IBaseArithmeticTermAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmFunctionUpdateLocationAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmFunctionUpdateLocationAST.java
new file mode 100644
index 0000000..ecb4725
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmFunctionUpdateLocationAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>AsmFunctionUpdateLocationAST</b>
+ */
+public interface IAsmFunctionUpdateLocationAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmRuleAST.java
new file mode 100644
index 0000000..75452d3
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmRuleAST.java
@@ -0,0 +1,56 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>AsmRuleAST
+ *<li>SkipRuleAST
+ *<li>FailRuleAST
+ *<li>CallRuleAST
+ *<li>LogRuleAST
+ *<li>SequentialRuleAST
+ *<li>ParallelRuleAST
+ *<li>RandomRuleAST
+ *<li>LetRuleAST
+ *<li>IterateRuleAST
+ *<li>ChooseRuleAST
+ *<li>ForallRuleAST
+ *<li>WhenRuleAST
+ *<li>CopyRuleAST
+ *<li>MoveRuleAST
+ *<li>ElementUpdateRuleAST
+ *<li>UpdateRuleAST0
+ *<li>UpdateRuleAST1
+ *<li>PrintRuleAST0
+ *<li>PrintRuleAST1
+ *<li>PrintRuleAST2
+ *<li>PrintRuleAST3
+ *<li>IfRuleAST0
+ *<li>IfRuleAST1
+ *<li>TryRuleAST0
+ *<li>TryRuleAST1
+ *<li>CreateRuleAST0
+ *<li>CreateRuleAST1
+ *<li>DeleteRuleAST0
+ *<li>DeleteRuleAST1
+ *</ul>
+ *</b>
+ */
+public interface IAsmRuleAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmRuleDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmRuleDefAST.java
new file mode 100644
index 0000000..6d6ea93
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmRuleDefAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>AsmRuleDefAST</b>
+ */
+public interface IAsmRuleDefAST extends IMachineContentAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmRulesAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmRulesAST.java
new file mode 100644
index 0000000..7dcdf72
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmRulesAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>AsmRulesAST</b>
+ */
+public interface IAsmRulesAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmRulesOptAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmRulesOptAST.java
new file mode 100644
index 0000000..2ea2aad
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IAsmRulesOptAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>AsmRulesOptAST</b>
+ */
+public interface IAsmRulesOptAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IBaseArithmeticTermAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IBaseArithmeticTermAST.java
new file mode 100644
index 0000000..be09707
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IBaseArithmeticTermAST.java
@@ -0,0 +1,47 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>GraphPatternCallAST
+ *<li>BaseArithmeticTermAST
+ *<li>AsmFunctionLocationAST
+ *<li>VariableRefAST
+ *<li>ValueQualifiedNameAST
+ *<li>UndefValueAST
+ *<li>StringConstantAST
+ *<li>PredefinedFunctionCallAST0
+ *<li>PredefinedFunctionCallAST1
+ *<li>ValueLocalNameAST0
+ *<li>ValueLocalNameAST1
+ *<li>BooleanConstantAST0
+ *<li>BooleanConstantAST1
+ *<li>MultiplicityConstantAST0
+ *<li>MultiplicityConstantAST1
+ *<li>MultiplicityConstantAST2
+ *<li>MultiplicityConstantAST3
+ *<li>NumericConstantAST0
+ *<li>NumericConstantAST1
+ *<li>NumericConstantAST2
+ *<li>NumericConstantAST3
+ *</ul>
+ *</b>
+ */
+public interface IBaseArithmeticTermAST extends IUnaryArithmeticTermAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IBooleanConstantAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IBooleanConstantAST.java
new file mode 100644
index 0000000..439ae33
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IBooleanConstantAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by:
+ *<b>
+ *<ul>
+ *<li>BooleanConstantAST0
+ *<li>BooleanConstantAST1
+ *</ul>
+ *</b>
+ */
+public interface IBooleanConstantAST extends IValueAST, IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IBuiltInFunctionNameAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IBuiltInFunctionNameAST.java
new file mode 100644
index 0000000..2622ada
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IBuiltInFunctionNameAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by <b>BuiltInFunctionNameAST</b>
+ */
+public interface IBuiltInFunctionNameAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICallRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICallRuleAST.java
new file mode 100644
index 0000000..f0cd746
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICallRuleAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>CallRuleAST</b>
+ */
+public interface ICallRuleAST extends ISimpleRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICheckConditionAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICheckConditionAST.java
new file mode 100644
index 0000000..d3dbc23
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICheckConditionAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>CheckConditionAST</b>
+ */
+public interface ICheckConditionAST extends IPatternBodyContentAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IChooseRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IChooseRuleAST.java
new file mode 100644
index 0000000..0a058ed
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IChooseRuleAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>ChooseRuleAST</b>
+ */
+public interface IChooseRuleAST extends ICompoundRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICompoundRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICompoundRuleAST.java
new file mode 100644
index 0000000..22a6e4f
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICompoundRuleAST.java
@@ -0,0 +1,34 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>SequentialRuleAST
+ *<li>ParallelRuleAST
+ *<li>RandomRuleAST
+ *<li>LetRuleAST
+ *<li>IterateRuleAST
+ *<li>ChooseRuleAST
+ *<li>ForallRuleAST
+ *<li>WhenRuleAST
+ *</ul>
+ *</b>
+ */
+public interface ICompoundRuleAST extends IRegularAsmRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IConditionAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IConditionAST.java
new file mode 100644
index 0000000..f8dccd9
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IConditionAST.java
@@ -0,0 +1,72 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>GraphPatternCallAST
+ *<li>GTRuleCallAST
+ *<li>LogicalAndTermAST
+ *<li>RelationalTermAST
+ *<li>BaseArithmeticTermAST
+ *<li>AsmFunctionLocationAST
+ *<li>VariableRefAST
+ *<li>ValueQualifiedNameAST
+ *<li>UndefValueAST
+ *<li>StringConstantAST
+ *<li>LogicalTermAST0
+ *<li>LogicalTermAST1
+ *<li>EqualityTermAST0
+ *<li>EqualityTermAST1
+ *<li>ArithmeticTermAST0
+ *<li>ArithmeticTermAST1
+ *<li>MultArithmeticTermAST0
+ *<li>MultArithmeticTermAST1
+ *<li>MultArithmeticTermAST2
+ *<li>UnaryArithmeticTermAST0
+ *<li>UnaryArithmeticTermAST1
+ *<li>PredefinedFunctionCallAST0
+ *<li>PredefinedFunctionCallAST1
+ *<li>ValueLocalNameAST0
+ *<li>ValueLocalNameAST1
+ *<li>BooleanConstantAST0
+ *<li>BooleanConstantAST1
+ *<li>MultiplicityConstantAST0
+ *<li>MultiplicityConstantAST1
+ *<li>MultiplicityConstantAST2
+ *<li>MultiplicityConstantAST3
+ *<li>NumericConstantAST0
+ *<li>NumericConstantAST1
+ *<li>NumericConstantAST2
+ *<li>NumericConstantAST3
+ *</ul>
+ *</b>
+ */
+public interface IConditionAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IConstrainedVariablesAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IConstrainedVariablesAST.java
new file mode 100644
index 0000000..97c35cd
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IConstrainedVariablesAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>ConstrainedVariablesAST0
+ *<li>ConstrainedVariablesAST1
+ *</ul>
+ *</b>
+ */
+public interface IConstrainedVariablesAST extends IConstrainedVariablesOptAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IConstrainedVariablesOptAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IConstrainedVariablesOptAST.java
new file mode 100644
index 0000000..1c7c3f8
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IConstrainedVariablesOptAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>ConstrainedVariablesAST0
+ *<li>ConstrainedVariablesAST1
+ *</ul>
+ *</b>
+ */
+public interface IConstrainedVariablesOptAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IContainmentConstraintOptAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IContainmentConstraintOptAST.java
new file mode 100644
index 0000000..bca65d1
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IContainmentConstraintOptAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>ContainmentConstraintOptAST0
+ *<li>ContainmentConstraintOptAST1
+ *</ul>
+ *</b>
+ */
+public interface IContainmentConstraintOptAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IConversionFunctionNameAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IConversionFunctionNameAST.java
new file mode 100644
index 0000000..5fd3af7
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IConversionFunctionNameAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by <b>ConversionFunctionNameAST</b>
+ */
+public interface IConversionFunctionNameAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICopyContentsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICopyContentsAST.java
new file mode 100644
index 0000000..d1f7838
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICopyContentsAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>CopyContentsAST</b>
+ */
+public interface ICopyContentsAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICopyRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICopyRuleAST.java
new file mode 100644
index 0000000..1045c81
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICopyRuleAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>CopyRuleAST</b>
+ */
+public interface ICopyRuleAST extends IModelManipulationRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICopySemanticsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICopySemanticsAST.java
new file mode 100644
index 0000000..dc34979
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICopySemanticsAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by:
+ *<b>
+ *<ul>
+ *<li>CopySemanticsAST0
+ *<li>CopySemanticsAST1
+ *</ul>
+ *</b>
+ */
+public interface ICopySemanticsAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICounterVariableAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICounterVariableAST.java
new file mode 100644
index 0000000..083a91e
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICounterVariableAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by <b>CounterVariableAST</b>
+ */
+public interface ICounterVariableAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICreateEntityBodyAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICreateEntityBodyAST.java
new file mode 100644
index 0000000..ed4f5cb
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICreateEntityBodyAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>CreateEntityBodyAST</b>
+ */
+public interface ICreateEntityBodyAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICreateModelElementAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICreateModelElementAST.java
new file mode 100644
index 0000000..74169a3
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICreateModelElementAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>CreateModelElementAST0
+ *<li>CreateModelElementAST1
+ *</ul>
+ *</b>
+ */
+public interface ICreateModelElementAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICreateRelationBodyAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICreateRelationBodyAST.java
new file mode 100644
index 0000000..83f8dbe
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICreateRelationBodyAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>CreateRelationBodyAST</b>
+ */
+public interface ICreateRelationBodyAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICreateRelationshipAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICreateRelationshipAST.java
new file mode 100644
index 0000000..29680d0
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICreateRelationshipAST.java
@@ -0,0 +1,41 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>CreateRelationshipAST0
+ *<li>CreateRelationshipAST1
+ *<li>CreateRelationshipAST2
+ *<li>CreateRelationshipAST3
+ *</ul>
+ *</b>
+ */
+public interface ICreateRelationshipAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICreateRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICreateRuleAST.java
new file mode 100644
index 0000000..a800710
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ICreateRuleAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>CreateRuleAST0
+ *<li>CreateRuleAST1
+ *</ul>
+ *</b>
+ */
+public interface ICreateRuleAST extends IModelManipulationRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDeleteContentsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDeleteContentsAST.java
new file mode 100644
index 0000000..b302022
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDeleteContentsAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>DeleteContentsAST</b>
+ */
+public interface IDeleteContentsAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDeleteRelationshipAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDeleteRelationshipAST.java
new file mode 100644
index 0000000..6ea0ac1
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDeleteRelationshipAST.java
@@ -0,0 +1,41 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>DeleteRelationshipAST0
+ *<li>DeleteRelationshipAST1
+ *<li>DeleteRelationshipAST2
+ *<li>DeleteRelationshipAST3
+ *</ul>
+ *</b>
+ */
+public interface IDeleteRelationshipAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDeleteRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDeleteRuleAST.java
new file mode 100644
index 0000000..f91f047
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDeleteRuleAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>DeleteRuleAST0
+ *<li>DeleteRuleAST1
+ *</ul>
+ *</b>
+ */
+public interface IDeleteRuleAST extends IModelManipulationRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDeleteSemanticsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDeleteSemanticsAST.java
new file mode 100644
index 0000000..e5a11d9
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDeleteSemanticsAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by:
+ *<b>
+ *<ul>
+ *<li>DeleteSemanticsAST0
+ *<li>DeleteSemanticsAST1
+ *</ul>
+ *</b>
+ */
+public interface IDeleteSemanticsAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDeleteSemanticsOptAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDeleteSemanticsOptAST.java
new file mode 100644
index 0000000..b3b1b16
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDeleteSemanticsOptAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>DeleteSemanticsOptAST</b>
+ */
+public interface IDeleteSemanticsOptAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDirectedFormalParameterDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDirectedFormalParameterDefAST.java
new file mode 100644
index 0000000..4c86c03
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDirectedFormalParameterDefAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>DirectedFormalParameterDefAST0
+ *<li>DirectedFormalParameterDefAST1
+ *</ul>
+ *</b>
+ */
+public interface IDirectedFormalParameterDefAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDirectedFormalParamsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDirectedFormalParamsAST.java
new file mode 100644
index 0000000..fa78ab8
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDirectedFormalParamsAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>DirectedFormalParamsAST0
+ *<li>DirectedFormalParamsAST1
+ *</ul>
+ *</b>
+ */
+public interface IDirectedFormalParamsAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDirectionKindAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDirectionKindAST.java
new file mode 100644
index 0000000..36cfcd5
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDirectionKindAST.java
@@ -0,0 +1,29 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by:
+ *<b>
+ *<ul>
+ *<li>DirectionKindAST0
+ *<li>DirectionKindAST1
+ *<li>DirectionKindAST2
+ *</ul>
+ *</b>
+ */
+public interface IDirectionKindAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDoActionOptAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDoActionOptAST.java
new file mode 100644
index 0000000..eec0daa
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IDoActionOptAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>DoActionOptAST0
+ *<li>DoActionOptAST1
+ *</ul>
+ *</b>
+ */
+public interface IDoActionOptAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IElementUpdateOpAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IElementUpdateOpAST.java
new file mode 100644
index 0000000..14e3562
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IElementUpdateOpAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by <b>ElementUpdateOpAST</b>
+ */
+public interface IElementUpdateOpAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IElementUpdateRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IElementUpdateRuleAST.java
new file mode 100644
index 0000000..8a5d26d
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IElementUpdateRuleAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>ElementUpdateRuleAST</b>
+ */
+public interface IElementUpdateRuleAST extends IModelManipulationRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IEntityAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IEntityAST.java
new file mode 100644
index 0000000..d449d5d
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IEntityAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>EntityAST</b>
+ */
+public interface IEntityAST extends IModelElementAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IEntityBody.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IEntityBody.java
new file mode 100644
index 0000000..ce960c5
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IEntityBody.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>EntityBody</b>
+ */
+public interface IEntityBody
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IEqualityTermAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IEqualityTermAST.java
new file mode 100644
index 0000000..9c33f96
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IEqualityTermAST.java
@@ -0,0 +1,57 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>GraphPatternCallAST
+ *<li>RelationalTermAST
+ *<li>BaseArithmeticTermAST
+ *<li>AsmFunctionLocationAST
+ *<li>VariableRefAST
+ *<li>ValueQualifiedNameAST
+ *<li>UndefValueAST
+ *<li>StringConstantAST
+ *<li>EqualityTermAST0
+ *<li>EqualityTermAST1
+ *<li>ArithmeticTermAST0
+ *<li>ArithmeticTermAST1
+ *<li>MultArithmeticTermAST0
+ *<li>MultArithmeticTermAST1
+ *<li>MultArithmeticTermAST2
+ *<li>UnaryArithmeticTermAST0
+ *<li>UnaryArithmeticTermAST1
+ *<li>PredefinedFunctionCallAST0
+ *<li>PredefinedFunctionCallAST1
+ *<li>ValueLocalNameAST0
+ *<li>ValueLocalNameAST1
+ *<li>BooleanConstantAST0
+ *<li>BooleanConstantAST1
+ *<li>MultiplicityConstantAST0
+ *<li>MultiplicityConstantAST1
+ *<li>MultiplicityConstantAST2
+ *<li>MultiplicityConstantAST3
+ *<li>NumericConstantAST0
+ *<li>NumericConstantAST1
+ *<li>NumericConstantAST2
+ *<li>NumericConstantAST3
+ *</ul>
+ *</b>
+ */
+public interface IEqualityTermAST extends ILogicalAndTermAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IFailRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IFailRuleAST.java
new file mode 100644
index 0000000..22d167d
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IFailRuleAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>FailRuleAST</b>
+ */
+public interface IFailRuleAST extends ISimpleRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IForallRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IForallRuleAST.java
new file mode 100644
index 0000000..85b0add
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IForallRuleAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>ForallRuleAST</b>
+ */
+public interface IForallRuleAST extends ICompoundRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IFormalParameterDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IFormalParameterDefAST.java
new file mode 100644
index 0000000..20aa90d
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IFormalParameterDefAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>FormalParameterDefAST0
+ *<li>FormalParameterDefAST1
+ *</ul>
+ *</b>
+ */
+public interface IFormalParameterDefAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IFormalParamsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IFormalParamsAST.java
new file mode 100644
index 0000000..942d3df
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IFormalParamsAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>FormalParamsAST0
+ *<li>FormalParamsAST1
+ *</ul>
+ *</b>
+ */
+public interface IFormalParamsAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IGTASMDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IGTASMDefAST.java
new file mode 100644
index 0000000..4b6f634
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IGTASMDefAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>GTASMDefAST</b>
+ */
+public interface IGTASMDefAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IGTRuleBodyAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IGTRuleBodyAST.java
new file mode 100644
index 0000000..8018d21
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IGTRuleBodyAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>GTRuleBodyAST0
+ *<li>GTRuleBodyAST1
+ *</ul>
+ *</b>
+ */
+public interface IGTRuleBodyAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IGTRuleCallAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IGTRuleCallAST.java
new file mode 100644
index 0000000..a0f8c70
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IGTRuleCallAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>GTRuleCallAST</b>
+ */
+public interface IGTRuleCallAST extends IConditionAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IGTRuleDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IGTRuleDefAST.java
new file mode 100644
index 0000000..888034c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IGTRuleDefAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>GTRuleDefAST</b>
+ */
+public interface IGTRuleDefAST extends IMachineContentAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IGraphPatternCallAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IGraphPatternCallAST.java
new file mode 100644
index 0000000..7fe2f98
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IGraphPatternCallAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>GraphPatternCallAST</b>
+ */
+public interface IGraphPatternCallAST extends IBaseArithmeticTermAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IGraphPatternDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IGraphPatternDefAST.java
new file mode 100644
index 0000000..aa54fb2
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IGraphPatternDefAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>GraphPatternDefAST</b>
+ */
+public interface IGraphPatternDefAST extends IMachineContentAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IIfRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IIfRuleAST.java
new file mode 100644
index 0000000..c7cdf29
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IIfRuleAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>IfRuleAST0
+ *<li>IfRuleAST1
+ *</ul>
+ *</b>
+ */
+public interface IIfRuleAST extends IAsmRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IInConstraintOptAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IInConstraintOptAST.java
new file mode 100644
index 0000000..56dbace
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IInConstraintOptAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>InConstraintOptAST</b>
+ */
+public interface IInConstraintOptAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IInheritanceAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IInheritanceAST.java
new file mode 100644
index 0000000..db61e62
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IInheritanceAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>InheritanceAST0
+ *<li>InheritanceAST1
+ *</ul>
+ *</b>
+ */
+public interface IInheritanceAST extends IRelationshipAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IInitialValueAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IInitialValueAST.java
new file mode 100644
index 0000000..e8d2f28
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IInitialValueAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>InitialValueAST</b>
+ */
+public interface IInitialValueAST extends IInitialValuesAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IInitialValuesAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IInitialValuesAST.java
new file mode 100644
index 0000000..1a13309
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IInitialValuesAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>InitialValuesAST
+ *<li>InitialValueAST
+ *</ul>
+ *</b>
+ */
+public interface IInitialValuesAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IInitialValuesOptAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IInitialValuesOptAST.java
new file mode 100644
index 0000000..1bc797f
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IInitialValuesOptAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>InitialValuesOptAST0
+ *<li>InitialValuesOptAST1
+ *</ul>
+ *</b>
+ */
+public interface IInitialValuesOptAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IInstantiationAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IInstantiationAST.java
new file mode 100644
index 0000000..d59b933
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IInstantiationAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>InstantiationAST0
+ *<li>InstantiationAST1
+ *</ul>
+ *</b>
+ */
+public interface IInstantiationAST extends IRelationshipAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IIterateRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IIterateRuleAST.java
new file mode 100644
index 0000000..ac7628a
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IIterateRuleAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>IterateRuleAST</b>
+ */
+public interface IIterateRuleAST extends ICompoundRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IKeyValuePairAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IKeyValuePairAST.java
new file mode 100644
index 0000000..2d43e26
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IKeyValuePairAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>KeyValuePairAST</b>
+ */
+public interface IKeyValuePairAST extends IAnnotationBodyAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IKeywordAsIdentifier.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IKeywordAsIdentifier.java
new file mode 100644
index 0000000..d65d8da
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IKeywordAsIdentifier.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by <b>KeywordAsIdentifier</b>
+ */
+public interface IKeywordAsIdentifier extends ITypeNameAST, IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ILetRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ILetRuleAST.java
new file mode 100644
index 0000000..f4df227
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ILetRuleAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>LetRuleAST</b>
+ */
+public interface ILetRuleAST extends ICompoundRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ILocalPatternBodyElementAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ILocalPatternBodyElementAST.java
new file mode 100644
index 0000000..876d4be
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ILocalPatternBodyElementAST.java
@@ -0,0 +1,32 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>EntityAST
+ *<li>RelationAST
+ *<li>InheritanceAST0
+ *<li>InheritanceAST1
+ *<li>InstantiationAST0
+ *<li>InstantiationAST1
+ *</ul>
+ *</b>
+ */
+public interface ILocalPatternBodyElementAST extends IPatternBodyContentAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ILogLevelAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ILogLevelAST.java
new file mode 100644
index 0000000..3f84b3c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ILogLevelAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by <b>LogLevelAST</b>
+ */
+public interface ILogLevelAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ILogRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ILogRuleAST.java
new file mode 100644
index 0000000..9b95d00
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ILogRuleAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>LogRuleAST</b>
+ */
+public interface ILogRuleAST extends ISimpleRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ILogicalAndTermAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ILogicalAndTermAST.java
new file mode 100644
index 0000000..e06221d
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ILogicalAndTermAST.java
@@ -0,0 +1,58 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>GraphPatternCallAST
+ *<li>LogicalAndTermAST
+ *<li>RelationalTermAST
+ *<li>BaseArithmeticTermAST
+ *<li>AsmFunctionLocationAST
+ *<li>VariableRefAST
+ *<li>ValueQualifiedNameAST
+ *<li>UndefValueAST
+ *<li>StringConstantAST
+ *<li>EqualityTermAST0
+ *<li>EqualityTermAST1
+ *<li>ArithmeticTermAST0
+ *<li>ArithmeticTermAST1
+ *<li>MultArithmeticTermAST0
+ *<li>MultArithmeticTermAST1
+ *<li>MultArithmeticTermAST2
+ *<li>UnaryArithmeticTermAST0
+ *<li>UnaryArithmeticTermAST1
+ *<li>PredefinedFunctionCallAST0
+ *<li>PredefinedFunctionCallAST1
+ *<li>ValueLocalNameAST0
+ *<li>ValueLocalNameAST1
+ *<li>BooleanConstantAST0
+ *<li>BooleanConstantAST1
+ *<li>MultiplicityConstantAST0
+ *<li>MultiplicityConstantAST1
+ *<li>MultiplicityConstantAST2
+ *<li>MultiplicityConstantAST3
+ *<li>NumericConstantAST0
+ *<li>NumericConstantAST1
+ *<li>NumericConstantAST2
+ *<li>NumericConstantAST3
+ *</ul>
+ *</b>
+ */
+public interface ILogicalAndTermAST extends ILogicalTermAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ILogicalTermAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ILogicalTermAST.java
new file mode 100644
index 0000000..7cfa91f
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ILogicalTermAST.java
@@ -0,0 +1,60 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>GraphPatternCallAST
+ *<li>LogicalAndTermAST
+ *<li>RelationalTermAST
+ *<li>BaseArithmeticTermAST
+ *<li>AsmFunctionLocationAST
+ *<li>VariableRefAST
+ *<li>ValueQualifiedNameAST
+ *<li>UndefValueAST
+ *<li>StringConstantAST
+ *<li>LogicalTermAST0
+ *<li>LogicalTermAST1
+ *<li>EqualityTermAST0
+ *<li>EqualityTermAST1
+ *<li>ArithmeticTermAST0
+ *<li>ArithmeticTermAST1
+ *<li>MultArithmeticTermAST0
+ *<li>MultArithmeticTermAST1
+ *<li>MultArithmeticTermAST2
+ *<li>UnaryArithmeticTermAST0
+ *<li>UnaryArithmeticTermAST1
+ *<li>PredefinedFunctionCallAST0
+ *<li>PredefinedFunctionCallAST1
+ *<li>ValueLocalNameAST0
+ *<li>ValueLocalNameAST1
+ *<li>BooleanConstantAST0
+ *<li>BooleanConstantAST1
+ *<li>MultiplicityConstantAST0
+ *<li>MultiplicityConstantAST1
+ *<li>MultiplicityConstantAST2
+ *<li>MultiplicityConstantAST3
+ *<li>NumericConstantAST0
+ *<li>NumericConstantAST1
+ *<li>NumericConstantAST2
+ *<li>NumericConstantAST3
+ *</ul>
+ *</b>
+ */
+public interface ILogicalTermAST extends IConditionAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IMachineContentAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IMachineContentAST.java
new file mode 100644
index 0000000..a5c7204
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IMachineContentAST.java
@@ -0,0 +1,31 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>MachineContentAST
+ *<li>GraphPatternDefAST
+ *<li>GTRuleDefAST
+ *<li>AsmFunctionDefAST
+ *<li>AsmRuleDefAST
+ *</ul>
+ *</b>
+ */
+public interface IMachineContentAST extends IMachineContentsAST, IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IMachineContentsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IMachineContentsAST.java
new file mode 100644
index 0000000..ac1f518
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IMachineContentsAST.java
@@ -0,0 +1,43 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>MachineContentsAST
+ *<li>MachineContentAST
+ *<li>GraphPatternDefAST
+ *<li>GTRuleDefAST
+ *<li>AsmFunctionDefAST
+ *<li>AsmRuleDefAST
+ *</ul>
+ *</b>
+ */
+public interface IMachineContentsAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IModelElementAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IModelElementAST.java
new file mode 100644
index 0000000..caf87d1
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IModelElementAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>EntityAST
+ *<li>RelationAST
+ *</ul>
+ *</b>
+ */
+public interface IModelElementAST extends ILocalPatternBodyElementAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IModelManipulationRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IModelManipulationRuleAST.java
new file mode 100644
index 0000000..11c959c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IModelManipulationRuleAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>CopyRuleAST
+ *<li>MoveRuleAST
+ *<li>ElementUpdateRuleAST
+ *<li>CreateRuleAST0
+ *<li>CreateRuleAST1
+ *<li>DeleteRuleAST0
+ *<li>DeleteRuleAST1
+ *</ul>
+ *</b>
+ */
+public interface IModelManipulationRuleAST extends IRegularAsmRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IMoveRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IMoveRuleAST.java
new file mode 100644
index 0000000..c95b241
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IMoveRuleAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>MoveRuleAST</b>
+ */
+public interface IMoveRuleAST extends IModelManipulationRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IMultArithmeticTermAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IMultArithmeticTermAST.java
new file mode 100644
index 0000000..f8e139c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IMultArithmeticTermAST.java
@@ -0,0 +1,52 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>GraphPatternCallAST
+ *<li>BaseArithmeticTermAST
+ *<li>AsmFunctionLocationAST
+ *<li>VariableRefAST
+ *<li>ValueQualifiedNameAST
+ *<li>UndefValueAST
+ *<li>StringConstantAST
+ *<li>MultArithmeticTermAST0
+ *<li>MultArithmeticTermAST1
+ *<li>MultArithmeticTermAST2
+ *<li>UnaryArithmeticTermAST0
+ *<li>UnaryArithmeticTermAST1
+ *<li>PredefinedFunctionCallAST0
+ *<li>PredefinedFunctionCallAST1
+ *<li>ValueLocalNameAST0
+ *<li>ValueLocalNameAST1
+ *<li>BooleanConstantAST0
+ *<li>BooleanConstantAST1
+ *<li>MultiplicityConstantAST0
+ *<li>MultiplicityConstantAST1
+ *<li>MultiplicityConstantAST2
+ *<li>MultiplicityConstantAST3
+ *<li>NumericConstantAST0
+ *<li>NumericConstantAST1
+ *<li>NumericConstantAST2
+ *<li>NumericConstantAST3
+ *</ul>
+ *</b>
+ */
+public interface IMultArithmeticTermAST extends IArithmeticTermAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IMultiplicityConstantAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IMultiplicityConstantAST.java
new file mode 100644
index 0000000..b0bfc3a
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IMultiplicityConstantAST.java
@@ -0,0 +1,30 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by:
+ *<b>
+ *<ul>
+ *<li>MultiplicityConstantAST0
+ *<li>MultiplicityConstantAST1
+ *<li>MultiplicityConstantAST2
+ *<li>MultiplicityConstantAST3
+ *</ul>
+ *</b>
+ */
+public interface IMultiplicityConstantAST extends IValueAST, IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/INamespaceDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/INamespaceDefAST.java
new file mode 100644
index 0000000..3fc4a03
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/INamespaceDefAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>NamespaceDefAST</b>
+ */
+public interface INamespaceDefAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/INamespaceImportAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/INamespaceImportAST.java
new file mode 100644
index 0000000..846c603
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/INamespaceImportAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>NamespaceImportAST0
+ *<li>NamespaceImportAST1
+ *</ul>
+ *</b>
+ */
+public interface INamespaceImportAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/INamespaceImportsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/INamespaceImportsAST.java
new file mode 100644
index 0000000..e0d2c76
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/INamespaceImportsAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>NamespaceImportsAST</b>
+ */
+public interface INamespaceImportsAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/INegativePatternAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/INegativePatternAST.java
new file mode 100644
index 0000000..d6bce3f
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/INegativePatternAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>NegativePatternAST</b>
+ */
+public interface INegativePatternAST extends IPatternBodyContentAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/INonInjectivityConstraintAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/INonInjectivityConstraintAST.java
new file mode 100644
index 0000000..ea3ef9a
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/INonInjectivityConstraintAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>NonInjectivityConstraintAST</b>
+ */
+public interface INonInjectivityConstraintAST extends IPatternBodyContentAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/INumericConstantAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/INumericConstantAST.java
new file mode 100644
index 0000000..89232e7
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/INumericConstantAST.java
@@ -0,0 +1,30 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by:
+ *<b>
+ *<ul>
+ *<li>NumericConstantAST0
+ *<li>NumericConstantAST1
+ *<li>NumericConstantAST2
+ *<li>NumericConstantAST3
+ *</ul>
+ *</b>
+ */
+public interface INumericConstantAST extends IValueAST, IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IOptAnnotationsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IOptAnnotationsAST.java
new file mode 100644
index 0000000..9809a97
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IOptAnnotationsAST.java
@@ -0,0 +1,40 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>AnnotationsAST
+ *<li>AnnotationAST
+ *<li>AnnotationNameAST
+ *</ul>
+ *</b>
+ */
+public interface IOptAnnotationsAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IOptMatchCountAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IOptMatchCountAST.java
new file mode 100644
index 0000000..0bcd790
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IOptMatchCountAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>OptMatchCountAST</b>
+ */
+public interface IOptMatchCountAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IOptSemicolonAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IOptSemicolonAST.java
new file mode 100644
index 0000000..784366e
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IOptSemicolonAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by <b>OptSemicolonAST</b>
+ */
+public interface IOptSemicolonAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IOptShareableDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IOptShareableDefAST.java
new file mode 100644
index 0000000..0e2ac6b
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IOptShareableDefAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by <b>OptShareableDefAST</b>
+ */
+public interface IOptShareableDefAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IParallelRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IParallelRuleAST.java
new file mode 100644
index 0000000..f1d381b
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IParallelRuleAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>ParallelRuleAST</b>
+ */
+public interface IParallelRuleAST extends ICompoundRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternBodiesAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternBodiesAST.java
new file mode 100644
index 0000000..987c8d4
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternBodiesAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>PatternBodiesAST
+ *<li>PatternBodyAST
+ *</ul>
+ *</b>
+ */
+public interface IPatternBodiesAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternBodyAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternBodyAST.java
new file mode 100644
index 0000000..68c2c02
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternBodyAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>PatternBodyAST</b>
+ */
+public interface IPatternBodyAST extends IPatternBodiesAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternBodyContentAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternBodyContentAST.java
new file mode 100644
index 0000000..b5d216c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternBodyContentAST.java
@@ -0,0 +1,38 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>PatternBodyContentAST
+ *<li>NegativePatternAST
+ *<li>PatternCompositionAST
+ *<li>PatternVariableAssignmentAST
+ *<li>NonInjectivityConstraintAST
+ *<li>CheckConditionAST
+ *<li>EntityAST
+ *<li>RelationAST
+ *<li>InheritanceAST0
+ *<li>InheritanceAST1
+ *<li>InstantiationAST0
+ *<li>InstantiationAST1
+ *</ul>
+ *</b>
+ */
+public interface IPatternBodyContentAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternBodyContentDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternBodyContentDefAST.java
new file mode 100644
index 0000000..07b1142
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternBodyContentDefAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>PatternBodyContentDefAST0
+ *<li>PatternBodyContentDefAST1
+ *</ul>
+ *</b>
+ */
+public interface IPatternBodyContentDefAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternBodyContentsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternBodyContentsAST.java
new file mode 100644
index 0000000..597d4f4
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternBodyContentsAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>PatternBodyContentsAST</b>
+ */
+public interface IPatternBodyContentsAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternCompositionAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternCompositionAST.java
new file mode 100644
index 0000000..247c78c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternCompositionAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>PatternCompositionAST</b>
+ */
+public interface IPatternCompositionAST extends IPatternBodyContentAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternVariableAssignmentAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternVariableAssignmentAST.java
new file mode 100644
index 0000000..73eda3b
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternVariableAssignmentAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>PatternVariableAssignmentAST</b>
+ */
+public interface IPatternVariableAssignmentAST extends IPatternBodyContentAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternVariableDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternVariableDefAST.java
new file mode 100644
index 0000000..982640d
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternVariableDefAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by <b>PatternVariableDefAST</b>
+ */
+public interface IPatternVariableDefAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternVariableDefRefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternVariableDefRefAST.java
new file mode 100644
index 0000000..2561010
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternVariableDefRefAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by:
+ *<b>
+ *<ul>
+ *<li>PatternVariableDefRefAST0
+ *<li>PatternVariableDefRefAST1
+ *</ul>
+ *</b>
+ */
+public interface IPatternVariableDefRefAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternVariableRefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternVariableRefAST.java
new file mode 100644
index 0000000..be70faf
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPatternVariableRefAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by <b>PatternVariableRefAST</b>
+ */
+public interface IPatternVariableRefAST extends IASTNodeToken, IActualParamsPatternVariablesAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPostconditionOptAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPostconditionOptAST.java
new file mode 100644
index 0000000..6c5642c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPostconditionOptAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>PostconditionOptAST0
+ *<li>PostconditionOptAST1
+ *</ul>
+ *</b>
+ */
+public interface IPostconditionOptAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPreconditionDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPreconditionDefAST.java
new file mode 100644
index 0000000..f5a4503
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPreconditionDefAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>PreconditionDefAST0
+ *<li>PreconditionDefAST1
+ *</ul>
+ *</b>
+ */
+public interface IPreconditionDefAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPredefinedFunctionCallAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPredefinedFunctionCallAST.java
new file mode 100644
index 0000000..2b59f49
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPredefinedFunctionCallAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>PredefinedFunctionCallAST0
+ *<li>PredefinedFunctionCallAST1
+ *</ul>
+ *</b>
+ */
+public interface IPredefinedFunctionCallAST extends IBaseArithmeticTermAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPrintRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPrintRuleAST.java
new file mode 100644
index 0000000..f8384d1
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IPrintRuleAST.java
@@ -0,0 +1,30 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>PrintRuleAST0
+ *<li>PrintRuleAST1
+ *<li>PrintRuleAST2
+ *<li>PrintRuleAST3
+ *</ul>
+ *</b>
+ */
+public interface IPrintRuleAST extends ISimpleRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IQualifiedTypeNameAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IQualifiedTypeNameAST.java
new file mode 100644
index 0000000..6da7bf9
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IQualifiedTypeNameAST.java
@@ -0,0 +1,43 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>QualifiedTypeNameAST
+ *<li>KeywordAsIdentifier
+ *<li>TypeNameAST0
+ *<li>TypeNameAST1
+ *<li>TypeNameAST2
+ *<li>TypeNameAST3
+ *</ul>
+ *</b>
+ */
+public interface IQualifiedTypeNameAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRandomRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRandomRuleAST.java
new file mode 100644
index 0000000..6f29d50
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRandomRuleAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>RandomRuleAST</b>
+ */
+public interface IRandomRuleAST extends ICompoundRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRegularAsmRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRegularAsmRuleAST.java
new file mode 100644
index 0000000..af65f64
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRegularAsmRuleAST.java
@@ -0,0 +1,51 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>SkipRuleAST
+ *<li>FailRuleAST
+ *<li>CallRuleAST
+ *<li>LogRuleAST
+ *<li>SequentialRuleAST
+ *<li>ParallelRuleAST
+ *<li>RandomRuleAST
+ *<li>LetRuleAST
+ *<li>IterateRuleAST
+ *<li>ChooseRuleAST
+ *<li>ForallRuleAST
+ *<li>WhenRuleAST
+ *<li>CopyRuleAST
+ *<li>MoveRuleAST
+ *<li>ElementUpdateRuleAST
+ *<li>UpdateRuleAST0
+ *<li>UpdateRuleAST1
+ *<li>PrintRuleAST0
+ *<li>PrintRuleAST1
+ *<li>PrintRuleAST2
+ *<li>PrintRuleAST3
+ *<li>CreateRuleAST0
+ *<li>CreateRuleAST1
+ *<li>DeleteRuleAST0
+ *<li>DeleteRuleAST1
+ *</ul>
+ *</b>
+ */
+public interface IRegularAsmRuleAST extends IAsmRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRelationAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRelationAST.java
new file mode 100644
index 0000000..d1fca86
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRelationAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>RelationAST</b>
+ */
+public interface IRelationAST extends IModelElementAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRelationBodyAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRelationBodyAST.java
new file mode 100644
index 0000000..9d9281f
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRelationBodyAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>RelationBodyAST</b>
+ */
+public interface IRelationBodyAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRelationalOpAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRelationalOpAST.java
new file mode 100644
index 0000000..b834dc9
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRelationalOpAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by <b>RelationalOpAST</b>
+ */
+public interface IRelationalOpAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRelationalTermAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRelationalTermAST.java
new file mode 100644
index 0000000..f03ea4b
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRelationalTermAST.java
@@ -0,0 +1,55 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>GraphPatternCallAST
+ *<li>RelationalTermAST
+ *<li>BaseArithmeticTermAST
+ *<li>AsmFunctionLocationAST
+ *<li>VariableRefAST
+ *<li>ValueQualifiedNameAST
+ *<li>UndefValueAST
+ *<li>StringConstantAST
+ *<li>ArithmeticTermAST0
+ *<li>ArithmeticTermAST1
+ *<li>MultArithmeticTermAST0
+ *<li>MultArithmeticTermAST1
+ *<li>MultArithmeticTermAST2
+ *<li>UnaryArithmeticTermAST0
+ *<li>UnaryArithmeticTermAST1
+ *<li>PredefinedFunctionCallAST0
+ *<li>PredefinedFunctionCallAST1
+ *<li>ValueLocalNameAST0
+ *<li>ValueLocalNameAST1
+ *<li>BooleanConstantAST0
+ *<li>BooleanConstantAST1
+ *<li>MultiplicityConstantAST0
+ *<li>MultiplicityConstantAST1
+ *<li>MultiplicityConstantAST2
+ *<li>MultiplicityConstantAST3
+ *<li>NumericConstantAST0
+ *<li>NumericConstantAST1
+ *<li>NumericConstantAST2
+ *<li>NumericConstantAST3
+ *</ul>
+ *</b>
+ */
+public interface IRelationalTermAST extends IEqualityTermAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRelationshipAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRelationshipAST.java
new file mode 100644
index 0000000..64f4870
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRelationshipAST.java
@@ -0,0 +1,30 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>InheritanceAST0
+ *<li>InheritanceAST1
+ *<li>InstantiationAST0
+ *<li>InstantiationAST1
+ *</ul>
+ *</b>
+ */
+public interface IRelationshipAST extends ILocalPatternBodyElementAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRelationshipBodyAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRelationshipBodyAST.java
new file mode 100644
index 0000000..4c6163c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IRelationshipBodyAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>RelationshipBodyAST</b>
+ */
+public interface IRelationshipBodyAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IReturnTypeOptAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IReturnTypeOptAST.java
new file mode 100644
index 0000000..d0114c2
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IReturnTypeOptAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>ReturnTypeOptAST</b>
+ */
+public interface IReturnTypeOptAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ISequentialRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ISequentialRuleAST.java
new file mode 100644
index 0000000..e29378c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ISequentialRuleAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>SequentialRuleAST</b>
+ */
+public interface ISequentialRuleAST extends ICompoundRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ISimpleRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ISimpleRuleAST.java
new file mode 100644
index 0000000..10a59a3
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ISimpleRuleAST.java
@@ -0,0 +1,36 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>SkipRuleAST
+ *<li>FailRuleAST
+ *<li>CallRuleAST
+ *<li>LogRuleAST
+ *<li>UpdateRuleAST0
+ *<li>UpdateRuleAST1
+ *<li>PrintRuleAST0
+ *<li>PrintRuleAST1
+ *<li>PrintRuleAST2
+ *<li>PrintRuleAST3
+ *</ul>
+ *</b>
+ */
+public interface ISimpleRuleAST extends IRegularAsmRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ISkipRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ISkipRuleAST.java
new file mode 100644
index 0000000..ac78c4e
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ISkipRuleAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>SkipRuleAST</b>
+ */
+public interface ISkipRuleAST extends ISimpleRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IStringConstantAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IStringConstantAST.java
new file mode 100644
index 0000000..f978ff7
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IStringConstantAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by <b>StringConstantAST</b>
+ */
+public interface IStringConstantAST extends IValueAST, IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ITryRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ITryRuleAST.java
new file mode 100644
index 0000000..7c7ec70
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ITryRuleAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>TryRuleAST0
+ *<li>TryRuleAST1
+ *</ul>
+ *</b>
+ */
+public interface ITryRuleAST extends IAsmRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ITwoParametersAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ITwoParametersAST.java
new file mode 100644
index 0000000..d98862c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ITwoParametersAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>TwoParametersAST</b>
+ */
+public interface ITwoParametersAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ITypeConstantsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ITypeConstantsAST.java
new file mode 100644
index 0000000..67857a0
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ITypeConstantsAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>TypeConstantsAST0
+ *<li>TypeConstantsAST1
+ *</ul>
+ *</b>
+ */
+public interface ITypeConstantsAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ITypeNameAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ITypeNameAST.java
new file mode 100644
index 0000000..95317d2
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ITypeNameAST.java
@@ -0,0 +1,31 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by:
+ *<b>
+ *<ul>
+ *<li>KeywordAsIdentifier
+ *<li>TypeNameAST0
+ *<li>TypeNameAST1
+ *<li>TypeNameAST2
+ *<li>TypeNameAST3
+ *</ul>
+ *</b>
+ */
+public interface ITypeNameAST extends IQualifiedTypeNameAST, IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ITypeOptAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ITypeOptAST.java
new file mode 100644
index 0000000..6cdadf4
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ITypeOptAST.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>TypeOptAST</b>
+ */
+public interface ITypeOptAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IUnaryArithmeticTermAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IUnaryArithmeticTermAST.java
new file mode 100644
index 0000000..176f2fb
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IUnaryArithmeticTermAST.java
@@ -0,0 +1,49 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>GraphPatternCallAST
+ *<li>BaseArithmeticTermAST
+ *<li>AsmFunctionLocationAST
+ *<li>VariableRefAST
+ *<li>ValueQualifiedNameAST
+ *<li>UndefValueAST
+ *<li>StringConstantAST
+ *<li>UnaryArithmeticTermAST0
+ *<li>UnaryArithmeticTermAST1
+ *<li>PredefinedFunctionCallAST0
+ *<li>PredefinedFunctionCallAST1
+ *<li>ValueLocalNameAST0
+ *<li>ValueLocalNameAST1
+ *<li>BooleanConstantAST0
+ *<li>BooleanConstantAST1
+ *<li>MultiplicityConstantAST0
+ *<li>MultiplicityConstantAST1
+ *<li>MultiplicityConstantAST2
+ *<li>MultiplicityConstantAST3
+ *<li>NumericConstantAST0
+ *<li>NumericConstantAST1
+ *<li>NumericConstantAST2
+ *<li>NumericConstantAST3
+ *</ul>
+ *</b>
+ */
+public interface IUnaryArithmeticTermAST extends IMultArithmeticTermAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IUndefValueAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IUndefValueAST.java
new file mode 100644
index 0000000..540a3f2
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IUndefValueAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by <b>UndefValueAST</b>
+ */
+public interface IUndefValueAST extends IValueAST, IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IUpdateRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IUpdateRuleAST.java
new file mode 100644
index 0000000..7624ebc
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IUpdateRuleAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>UpdateRuleAST0
+ *<li>UpdateRuleAST1
+ *</ul>
+ *</b>
+ */
+public interface IUpdateRuleAST extends ISimpleRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IVTCLFile.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IVTCLFile.java
new file mode 100644
index 0000000..fc98f8b
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IVTCLFile.java
@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by <b>VTCLFile</b>
+ */
+public interface IVTCLFile
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IValueAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IValueAST.java
new file mode 100644
index 0000000..9f286cc
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IValueAST.java
@@ -0,0 +1,41 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>ValueQualifiedNameAST
+ *<li>UndefValueAST
+ *<li>StringConstantAST
+ *<li>ValueLocalNameAST0
+ *<li>ValueLocalNameAST1
+ *<li>BooleanConstantAST0
+ *<li>BooleanConstantAST1
+ *<li>MultiplicityConstantAST0
+ *<li>MultiplicityConstantAST1
+ *<li>MultiplicityConstantAST2
+ *<li>MultiplicityConstantAST3
+ *<li>NumericConstantAST0
+ *<li>NumericConstantAST1
+ *<li>NumericConstantAST2
+ *<li>NumericConstantAST3
+ *</ul>
+ *</b>
+ */
+public interface IValueAST extends IBaseArithmeticTermAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IValueLocalNameAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IValueLocalNameAST.java
new file mode 100644
index 0000000..0eb0066
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IValueLocalNameAST.java
@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by:
+ *<b>
+ *<ul>
+ *<li>ValueLocalNameAST0
+ *<li>ValueLocalNameAST1
+ *</ul>
+ *</b>
+ */
+public interface IValueLocalNameAST extends IValueQualifiedNameAST, IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IValueQualifiedNameAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IValueQualifiedNameAST.java
new file mode 100644
index 0000000..c6daeed
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IValueQualifiedNameAST.java
@@ -0,0 +1,29 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>ValueQualifiedNameAST
+ *<li>ValueLocalNameAST0
+ *<li>ValueLocalNameAST1
+ *</ul>
+ *</b>
+ */
+public interface IValueQualifiedNameAST extends IASMFunctionNameAST, IValueAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IVariableDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IVariableDefAST.java
new file mode 100644
index 0000000..6b8613f
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IVariableDefAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by <b>VariableDefAST</b>
+ */
+public interface IVariableDefAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IVariableDefRefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IVariableDefRefAST.java
new file mode 100644
index 0000000..2be44bc
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IVariableDefRefAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by <b>VariableDefRefAST</b>
+ */
+public interface IVariableDefRefAST extends IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IVariableDefinitionAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IVariableDefinitionAST.java
new file mode 100644
index 0000000..419fcd9
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IVariableDefinitionAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>VariableDefinitionAST</b>
+ */
+public interface IVariableDefinitionAST extends IVariableDefinitionsAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IVariableDefinitionsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IVariableDefinitionsAST.java
new file mode 100644
index 0000000..a3748a9
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IVariableDefinitionsAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>VariableDefinitionsAST
+ *<li>VariableDefinitionAST
+ *</ul>
+ *</b>
+ */
+public interface IVariableDefinitionsAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IVariableRefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IVariableRefAST.java
new file mode 100644
index 0000000..162cfeb
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IVariableRefAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is always implemented by <b>ASTNodeToken</b>. It is also implemented by <b>VariableRefAST</b>
+ */
+public interface IVariableRefAST extends IBaseArithmeticTermAST, IASTNodeToken {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IWhenChangeAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IWhenChangeAST.java
new file mode 100644
index 0000000..3e0ea7a
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IWhenChangeAST.java
@@ -0,0 +1,29 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>WhenChangeAST0
+ *<li>WhenChangeAST1
+ *<li>WhenChangeAST2
+ *</ul>
+ *</b>
+ */
+public interface IWhenChangeAST extends IWhenConditionAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IWhenConditionAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IWhenConditionAST.java
new file mode 100644
index 0000000..c5fb001
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IWhenConditionAST.java
@@ -0,0 +1,41 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ * is implemented by:
+ *<b>
+ *<ul>
+ *<li>WhenConditionAST
+ *<li>WhenChangeAST0
+ *<li>WhenChangeAST1
+ *<li>WhenChangeAST2
+ *</ul>
+ *</b>
+ */
+public interface IWhenConditionAST
+{
+    public IToken getLeftIToken();
+    public IToken getRightIToken();
+
+    void accept(Visitor v);
+    void accept(ArgumentVisitor v, Object o);
+    Object accept(ResultVisitor v);
+    Object accept(ResultArgumentVisitor v, Object o);
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IWhenRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IWhenRuleAST.java
new file mode 100644
index 0000000..9076890
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IWhenRuleAST.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+/**
+ * is implemented by <b>WhenRuleAST</b>
+ */
+public interface IWhenRuleAST extends ICompoundRuleAST {}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IfRuleAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IfRuleAST0.java
new file mode 100644
index 0000000..071d572
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IfRuleAST0.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 187:  IfRuleAST ::= if LPAREN LogicalTermAST RPAREN AsmRuleAST
+ *</b>
+ */
+public class IfRuleAST0 extends ASTNode implements IIfRuleAST
+{
+    private ILogicalTermAST _LogicalTermAST;
+    private IAsmRuleAST _AsmRuleAST;
+
+    public ILogicalTermAST getLogicalTermAST() { return _LogicalTermAST; }
+    public IAsmRuleAST getAsmRuleAST() { return _AsmRuleAST; }
+
+    public IfRuleAST0(IToken leftIToken, IToken rightIToken,
+                      ILogicalTermAST _LogicalTermAST,
+                      IAsmRuleAST _AsmRuleAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._LogicalTermAST = _LogicalTermAST;
+        ((ASTNode) _LogicalTermAST).setParent(this);
+        this._AsmRuleAST = _AsmRuleAST;
+        ((ASTNode) _AsmRuleAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof IfRuleAST0)) return false;
+        IfRuleAST0 other = (IfRuleAST0) o;
+        if (! _LogicalTermAST.equals(other.getLogicalTermAST())) return false;
+        if (! _AsmRuleAST.equals(other.getAsmRuleAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getLogicalTermAST().hashCode());
+        hash = hash * 31 + (getAsmRuleAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IfRuleAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IfRuleAST1.java
new file mode 100644
index 0000000..0de2ff6
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IfRuleAST1.java
@@ -0,0 +1,83 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 188:  IfRuleAST ::= if LPAREN LogicalTermAST RPAREN AsmRuleAST else AsmRuleAST
+ *</b>
+ */
+public class IfRuleAST1 extends ASTNode implements IIfRuleAST
+{
+    private ILogicalTermAST _LogicalTermAST;
+    private IAsmRuleAST _AsmRuleAST;
+    private IAsmRuleAST _AsmRuleAST7;
+
+    public ILogicalTermAST getLogicalTermAST() { return _LogicalTermAST; }
+    public IAsmRuleAST getAsmRuleAST() { return _AsmRuleAST; }
+    public IAsmRuleAST getAsmRuleAST7() { return _AsmRuleAST7; }
+
+    public IfRuleAST1(IToken leftIToken, IToken rightIToken,
+                      ILogicalTermAST _LogicalTermAST,
+                      IAsmRuleAST _AsmRuleAST,
+                      IAsmRuleAST _AsmRuleAST7)
+    {
+        super(leftIToken, rightIToken);
+
+        this._LogicalTermAST = _LogicalTermAST;
+        ((ASTNode) _LogicalTermAST).setParent(this);
+        this._AsmRuleAST = _AsmRuleAST;
+        ((ASTNode) _AsmRuleAST).setParent(this);
+        this._AsmRuleAST7 = _AsmRuleAST7;
+        ((ASTNode) _AsmRuleAST7).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof IfRuleAST1)) return false;
+        IfRuleAST1 other = (IfRuleAST1) o;
+        if (! _LogicalTermAST.equals(other.getLogicalTermAST())) return false;
+        if (! _AsmRuleAST.equals(other.getAsmRuleAST())) return false;
+        if (! _AsmRuleAST7.equals(other.getAsmRuleAST7())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getLogicalTermAST().hashCode());
+        hash = hash * 31 + (getAsmRuleAST().hashCode());
+        hash = hash * 31 + (getAsmRuleAST7().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InConstraintOptAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InConstraintOptAST.java
new file mode 100644
index 0000000..fda69f2
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InConstraintOptAST.java
@@ -0,0 +1,73 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 208:  InConstraintOptAST ::= $Empty
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 209:  InConstraintOptAST ::= in ArithmeticTermAST
+ *</b>
+ */
+public class InConstraintOptAST extends ASTNode implements IInConstraintOptAST
+{
+    private IArithmeticTermAST _ArithmeticTermAST;
+
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+
+    public InConstraintOptAST(IToken leftIToken, IToken rightIToken,
+                              IArithmeticTermAST _ArithmeticTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof InConstraintOptAST)) return false;
+        InConstraintOptAST other = (InConstraintOptAST) o;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InheritanceAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InheritanceAST0.java
new file mode 100644
index 0000000..b5a1dfb
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InheritanceAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 56:  InheritanceAST ::= supertypeOf RelationshipBodyAST
+ *</b>
+ */
+public class InheritanceAST0 extends ASTNode implements IInheritanceAST
+{
+    private RelationshipBodyAST _RelationshipBodyAST;
+
+    public RelationshipBodyAST getRelationshipBodyAST() { return _RelationshipBodyAST; }
+
+    public InheritanceAST0(IToken leftIToken, IToken rightIToken,
+                           RelationshipBodyAST _RelationshipBodyAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._RelationshipBodyAST = _RelationshipBodyAST;
+        ((ASTNode) _RelationshipBodyAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof InheritanceAST0)) return false;
+        InheritanceAST0 other = (InheritanceAST0) o;
+        if (! _RelationshipBodyAST.equals(other.getRelationshipBodyAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getRelationshipBodyAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InheritanceAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InheritanceAST1.java
new file mode 100644
index 0000000..2591192
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InheritanceAST1.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 57:  InheritanceAST ::= subtypeOf RelationshipBodyAST
+ *</b>
+ */
+public class InheritanceAST1 extends ASTNode implements IInheritanceAST
+{
+    private RelationshipBodyAST _RelationshipBodyAST;
+
+    public RelationshipBodyAST getRelationshipBodyAST() { return _RelationshipBodyAST; }
+
+    public InheritanceAST1(IToken leftIToken, IToken rightIToken,
+                           RelationshipBodyAST _RelationshipBodyAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._RelationshipBodyAST = _RelationshipBodyAST;
+        ((ASTNode) _RelationshipBodyAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof InheritanceAST1)) return false;
+        InheritanceAST1 other = (InheritanceAST1) o;
+        if (! _RelationshipBodyAST.equals(other.getRelationshipBodyAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getRelationshipBodyAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InitialValueAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InitialValueAST.java
new file mode 100644
index 0000000..49883c0
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InitialValueAST.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 110:  InitialValueAST ::= ActualParameterDefAST EQUAL ArithmeticTermAST SEMICOLON
+ *</b>
+ */
+public class InitialValueAST extends ASTNode implements IInitialValueAST
+{
+    private IActualParameterDefAST _ActualParameterDefAST;
+    private IArithmeticTermAST _ArithmeticTermAST;
+
+    public IActualParameterDefAST getActualParameterDefAST() { return _ActualParameterDefAST; }
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+
+    public InitialValueAST(IToken leftIToken, IToken rightIToken,
+                           IActualParameterDefAST _ActualParameterDefAST,
+                           IArithmeticTermAST _ArithmeticTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ActualParameterDefAST = _ActualParameterDefAST;
+        ((ASTNode) _ActualParameterDefAST).setParent(this);
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof InitialValueAST)) return false;
+        InitialValueAST other = (InitialValueAST) o;
+        if (! _ActualParameterDefAST.equals(other.getActualParameterDefAST())) return false;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getActualParameterDefAST().hashCode());
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InitialValuesAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InitialValuesAST.java
new file mode 100644
index 0000000..2744822
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InitialValuesAST.java
@@ -0,0 +1,80 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 108:  InitialValuesAST ::= InitialValueAST
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 109:  InitialValuesAST ::= InitialValuesAST InitialValueAST
+ *</b>
+ */
+public class InitialValuesAST extends ASTNode implements IInitialValuesAST
+{
+    private IInitialValuesAST _InitialValuesAST;
+    private InitialValueAST _InitialValueAST;
+
+    public IInitialValuesAST getInitialValuesAST() { return _InitialValuesAST; }
+    public InitialValueAST getInitialValueAST() { return _InitialValueAST; }
+
+    public InitialValuesAST(IToken leftIToken, IToken rightIToken,
+                            IInitialValuesAST _InitialValuesAST,
+                            InitialValueAST _InitialValueAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._InitialValuesAST = _InitialValuesAST;
+        ((ASTNode) _InitialValuesAST).setParent(this);
+        this._InitialValueAST = _InitialValueAST;
+        ((ASTNode) _InitialValueAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof InitialValuesAST)) return false;
+        InitialValuesAST other = (InitialValuesAST) o;
+        if (! _InitialValuesAST.equals(other.getInitialValuesAST())) return false;
+        if (! _InitialValueAST.equals(other.getInitialValueAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getInitialValuesAST().hashCode());
+        hash = hash * 31 + (getInitialValueAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InitialValuesOptAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InitialValuesOptAST0.java
new file mode 100644
index 0000000..cfb985d
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InitialValuesOptAST0.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 106:  InitialValuesOptAST ::= SEMICOLON
+ *</b>
+ */
+public class InitialValuesOptAST0 extends ASTNodeToken implements IInitialValuesOptAST
+{
+    public InitialValuesOptAST0(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InitialValuesOptAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InitialValuesOptAST1.java
new file mode 100644
index 0000000..dee3eaf
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InitialValuesOptAST1.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 107:  InitialValuesOptAST ::= LBRACE InitialValuesAST RBRACE
+ *</b>
+ */
+public class InitialValuesOptAST1 extends ASTNode implements IInitialValuesOptAST
+{
+    private IInitialValuesAST _InitialValuesAST;
+
+    public IInitialValuesAST getInitialValuesAST() { return _InitialValuesAST; }
+
+    public InitialValuesOptAST1(IToken leftIToken, IToken rightIToken,
+                                IInitialValuesAST _InitialValuesAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._InitialValuesAST = _InitialValuesAST;
+        ((ASTNode) _InitialValuesAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof InitialValuesOptAST1)) return false;
+        InitialValuesOptAST1 other = (InitialValuesOptAST1) o;
+        if (! _InitialValuesAST.equals(other.getInitialValuesAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getInitialValuesAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InstantiationAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InstantiationAST0.java
new file mode 100644
index 0000000..f6e5c3b
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InstantiationAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 58:  InstantiationAST ::= typeOf RelationshipBodyAST
+ *</b>
+ */
+public class InstantiationAST0 extends ASTNode implements IInstantiationAST
+{
+    private RelationshipBodyAST _RelationshipBodyAST;
+
+    public RelationshipBodyAST getRelationshipBodyAST() { return _RelationshipBodyAST; }
+
+    public InstantiationAST0(IToken leftIToken, IToken rightIToken,
+                             RelationshipBodyAST _RelationshipBodyAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._RelationshipBodyAST = _RelationshipBodyAST;
+        ((ASTNode) _RelationshipBodyAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof InstantiationAST0)) return false;
+        InstantiationAST0 other = (InstantiationAST0) o;
+        if (! _RelationshipBodyAST.equals(other.getRelationshipBodyAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getRelationshipBodyAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InstantiationAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InstantiationAST1.java
new file mode 100644
index 0000000..173942d
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/InstantiationAST1.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 59:  InstantiationAST ::= instanceOf RelationshipBodyAST
+ *</b>
+ */
+public class InstantiationAST1 extends ASTNode implements IInstantiationAST
+{
+    private RelationshipBodyAST _RelationshipBodyAST;
+
+    public RelationshipBodyAST getRelationshipBodyAST() { return _RelationshipBodyAST; }
+
+    public InstantiationAST1(IToken leftIToken, IToken rightIToken,
+                             RelationshipBodyAST _RelationshipBodyAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._RelationshipBodyAST = _RelationshipBodyAST;
+        ((ASTNode) _RelationshipBodyAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof InstantiationAST1)) return false;
+        InstantiationAST1 other = (InstantiationAST1) o;
+        if (! _RelationshipBodyAST.equals(other.getRelationshipBodyAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getRelationshipBodyAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IterateRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IterateRuleAST.java
new file mode 100644
index 0000000..3caa86d
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/IterateRuleAST.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 180:  IterateRuleAST ::= iterate AsmRuleAST
+ *</b>
+ */
+public class IterateRuleAST extends ASTNode implements IIterateRuleAST
+{
+    private IAsmRuleAST _AsmRuleAST;
+
+    public IAsmRuleAST getAsmRuleAST() { return _AsmRuleAST; }
+
+    public IterateRuleAST(IToken leftIToken, IToken rightIToken,
+                          IAsmRuleAST _AsmRuleAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._AsmRuleAST = _AsmRuleAST;
+        ((ASTNode) _AsmRuleAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof IterateRuleAST)) return false;
+        IterateRuleAST other = (IterateRuleAST) o;
+        if (! _AsmRuleAST.equals(other.getAsmRuleAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getAsmRuleAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/KeyValuePairAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/KeyValuePairAST.java
new file mode 100644
index 0000000..f27017c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/KeyValuePairAST.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 391:  KeyValuePairAST ::= TypeNameAST EQUAL TypeNameAST
+ *</b>
+ */
+public class KeyValuePairAST extends ASTNode implements IKeyValuePairAST
+{
+    private ITypeNameAST _TypeNameAST;
+    private ITypeNameAST _TypeNameAST3;
+
+    public ITypeNameAST getTypeNameAST() { return _TypeNameAST; }
+    public ITypeNameAST getTypeNameAST3() { return _TypeNameAST3; }
+
+    public KeyValuePairAST(IToken leftIToken, IToken rightIToken,
+                           ITypeNameAST _TypeNameAST,
+                           ITypeNameAST _TypeNameAST3)
+    {
+        super(leftIToken, rightIToken);
+
+        this._TypeNameAST = _TypeNameAST;
+        ((ASTNode) _TypeNameAST).setParent(this);
+        this._TypeNameAST3 = _TypeNameAST3;
+        ((ASTNode) _TypeNameAST3).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof KeyValuePairAST)) return false;
+        KeyValuePairAST other = (KeyValuePairAST) o;
+        if (! _TypeNameAST.equals(other.getTypeNameAST())) return false;
+        if (! _TypeNameAST3.equals(other.getTypeNameAST3())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getTypeNameAST().hashCode());
+        hash = hash * 31 + (getTypeNameAST3().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/KeywordAsIdentifier.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/KeywordAsIdentifier.java
new file mode 100644
index 0000000..b518dc1
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/KeywordAsIdentifier.java
@@ -0,0 +1,119 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 302:  KeywordAsIdentifier ::= namespace
+ *<li>Rule 303:  KeywordAsIdentifier ::= import
+ *<li>Rule 304:  KeywordAsIdentifier ::= machine
+ *<li>Rule 305:  KeywordAsIdentifier ::= pattern
+ *<li>Rule 306:  KeywordAsIdentifier ::= neg
+ *<li>Rule 307:  KeywordAsIdentifier ::= find
+ *<li>Rule 308:  KeywordAsIdentifier ::= gtrule
+ *<li>Rule 309:  KeywordAsIdentifier ::= precondition
+ *<li>Rule 310:  KeywordAsIdentifier ::= postcondition
+ *<li>Rule 311:  KeywordAsIdentifier ::= action
+ *<li>Rule 312:  KeywordAsIdentifier ::= apply
+ *<li>Rule 313:  KeywordAsIdentifier ::= xor
+ *<li>Rule 314:  KeywordAsIdentifier ::= asmfunction
+ *<li>Rule 315:  KeywordAsIdentifier ::= rule
+ *<li>Rule 316:  KeywordAsIdentifier ::= skip
+ *<li>Rule 317:  KeywordAsIdentifier ::= fail
+ *<li>Rule 318:  KeywordAsIdentifier ::= call
+ *<li>Rule 319:  KeywordAsIdentifier ::= update
+ *<li>Rule 320:  KeywordAsIdentifier ::= print
+ *<li>Rule 321:  KeywordAsIdentifier ::= println
+ *<li>Rule 322:  KeywordAsIdentifier ::= log
+ *<li>Rule 323:  KeywordAsIdentifier ::= debug
+ *<li>Rule 324:  KeywordAsIdentifier ::= info
+ *<li>Rule 325:  KeywordAsIdentifier ::= warning
+ *<li>Rule 326:  KeywordAsIdentifier ::= error
+ *<li>Rule 327:  KeywordAsIdentifier ::= fatal
+ *<li>Rule 328:  KeywordAsIdentifier ::= seq
+ *<li>Rule 329:  KeywordAsIdentifier ::= random
+ *<li>Rule 330:  KeywordAsIdentifier ::= let
+ *<li>Rule 331:  KeywordAsIdentifier ::= in
+ *<li>Rule 332:  KeywordAsIdentifier ::= below
+ *<li>Rule 333:  KeywordAsIdentifier ::= choose
+ *<li>Rule 334:  KeywordAsIdentifier ::= forall
+ *<li>Rule 335:  KeywordAsIdentifier ::= with
+ *<li>Rule 336:  KeywordAsIdentifier ::= do
+ *<li>Rule 337:  KeywordAsIdentifier ::= iterate
+ *<li>Rule 338:  KeywordAsIdentifier ::= if
+ *<li>Rule 339:  KeywordAsIdentifier ::= try
+ *<li>Rule 340:  KeywordAsIdentifier ::= else
+ *<li>Rule 341:  KeywordAsIdentifier ::= new
+ *<li>Rule 342:  KeywordAsIdentifier ::= delete
+ *<li>Rule 343:  KeywordAsIdentifier ::= delete_content
+ *<li>Rule 344:  KeywordAsIdentifier ::= move_content
+ *<li>Rule 345:  KeywordAsIdentifier ::= copy
+ *<li>Rule 346:  KeywordAsIdentifier ::= copy_boundary_edges
+ *<li>Rule 347:  KeywordAsIdentifier ::= skip_boundary_edges
+ *<li>Rule 348:  KeywordAsIdentifier ::= move
+ *<li>Rule 349:  KeywordAsIdentifier ::= rename
+ *<li>Rule 350:  KeywordAsIdentifier ::= setValue
+ *<li>Rule 351:  KeywordAsIdentifier ::= setFrom
+ *<li>Rule 352:  KeywordAsIdentifier ::= setTo
+ *<li>Rule 353:  KeywordAsIdentifier ::= setMultiplicity
+ *<li>Rule 354:  KeywordAsIdentifier ::= setAggregation
+ *<li>Rule 355:  KeywordAsIdentifier ::= setInverse
+ *<li>Rule 356:  KeywordAsIdentifier ::= undef
+ *<li>Rule 357:  KeywordAsIdentifier ::= true
+ *<li>Rule 358:  KeywordAsIdentifier ::= false
+ *<li>Rule 359:  KeywordAsIdentifier ::= one_to_one
+ *<li>Rule 360:  KeywordAsIdentifier ::= one_to_many
+ *<li>Rule 361:  KeywordAsIdentifier ::= many_to_one
+ *<li>Rule 362:  KeywordAsIdentifier ::= many_to_many
+ *<li>Rule 363:  KeywordAsIdentifier ::= ref
+ *<li>Rule 364:  KeywordAsIdentifier ::= fqn
+ *<li>Rule 365:  KeywordAsIdentifier ::= name
+ *<li>Rule 366:  KeywordAsIdentifier ::= value
+ *<li>Rule 367:  KeywordAsIdentifier ::= source
+ *<li>Rule 368:  KeywordAsIdentifier ::= target
+ *<li>Rule 369:  KeywordAsIdentifier ::= multiplicity
+ *<li>Rule 370:  KeywordAsIdentifier ::= aggregation
+ *<li>Rule 371:  KeywordAsIdentifier ::= inverse
+ *<li>Rule 372:  KeywordAsIdentifier ::= toBoolean
+ *<li>Rule 373:  KeywordAsIdentifier ::= toString
+ *<li>Rule 374:  KeywordAsIdentifier ::= toInteger
+ *<li>Rule 375:  KeywordAsIdentifier ::= toDouble
+ *<li>Rule 376:  KeywordAsIdentifier ::= toMultiplicity
+ *<li>Rule 377:  KeywordAsIdentifier ::= out
+ *<li>Rule 378:  KeywordAsIdentifier ::= inout
+ *<li>Rule 379:  KeywordAsIdentifier ::= parallel
+ *<li>Rule 380:  KeywordAsIdentifier ::= changed
+ *<li>Rule 381:  KeywordAsIdentifier ::= when
+ *<li>Rule 382:  KeywordAsIdentifier ::= shareable
+ *</b>
+ */
+public class KeywordAsIdentifier extends ASTNodeToken implements IKeywordAsIdentifier
+{
+    public KeywordAsIdentifier(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/LetRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/LetRuleAST.java
new file mode 100644
index 0000000..e4de16f
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/LetRuleAST.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 176:  LetRuleAST ::= let VariableDefinitionsAST in AsmRuleAST
+ *</b>
+ */
+public class LetRuleAST extends ASTNode implements ILetRuleAST
+{
+    private IVariableDefinitionsAST _VariableDefinitionsAST;
+    private IAsmRuleAST _AsmRuleAST;
+
+    public IVariableDefinitionsAST getVariableDefinitionsAST() { return _VariableDefinitionsAST; }
+    public IAsmRuleAST getAsmRuleAST() { return _AsmRuleAST; }
+
+    public LetRuleAST(IToken leftIToken, IToken rightIToken,
+                      IVariableDefinitionsAST _VariableDefinitionsAST,
+                      IAsmRuleAST _AsmRuleAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._VariableDefinitionsAST = _VariableDefinitionsAST;
+        ((ASTNode) _VariableDefinitionsAST).setParent(this);
+        this._AsmRuleAST = _AsmRuleAST;
+        ((ASTNode) _AsmRuleAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof LetRuleAST)) return false;
+        LetRuleAST other = (LetRuleAST) o;
+        if (! _VariableDefinitionsAST.equals(other.getVariableDefinitionsAST())) return false;
+        if (! _AsmRuleAST.equals(other.getAsmRuleAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getVariableDefinitionsAST().hashCode());
+        hash = hash * 31 + (getAsmRuleAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/LogLevelAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/LogLevelAST.java
new file mode 100644
index 0000000..f13359f
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/LogLevelAST.java
@@ -0,0 +1,43 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 158:  LogLevelAST ::= debug
+ *<li>Rule 159:  LogLevelAST ::= info
+ *<li>Rule 160:  LogLevelAST ::= warning
+ *<li>Rule 161:  LogLevelAST ::= error
+ *<li>Rule 162:  LogLevelAST ::= fatal
+ *</b>
+ */
+public class LogLevelAST extends ASTNodeToken implements ILogLevelAST
+{
+    public LogLevelAST(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/LogRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/LogRuleAST.java
new file mode 100644
index 0000000..f24d459
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/LogRuleAST.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 157:  LogRuleAST ::= log LPAREN LogLevelAST COMMA ArithmeticTermAST RPAREN SEMICOLON
+ *</b>
+ */
+public class LogRuleAST extends ASTNode implements ILogRuleAST
+{
+    private LogLevelAST _LogLevelAST;
+    private IArithmeticTermAST _ArithmeticTermAST;
+
+    public LogLevelAST getLogLevelAST() { return _LogLevelAST; }
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+
+    public LogRuleAST(IToken leftIToken, IToken rightIToken,
+                      LogLevelAST _LogLevelAST,
+                      IArithmeticTermAST _ArithmeticTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._LogLevelAST = _LogLevelAST;
+        ((ASTNode) _LogLevelAST).setParent(this);
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof LogRuleAST)) return false;
+        LogRuleAST other = (LogRuleAST) o;
+        if (! _LogLevelAST.equals(other.getLogLevelAST())) return false;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getLogLevelAST().hashCode());
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/LogicalAndTermAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/LogicalAndTermAST.java
new file mode 100644
index 0000000..87d7db5
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/LogicalAndTermAST.java
@@ -0,0 +1,80 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 75:  LogicalAndTermAST ::= EqualityTermAST
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 76:  LogicalAndTermAST ::= LogicalAndTermAST AND_AND EqualityTermAST
+ *</b>
+ */
+public class LogicalAndTermAST extends ASTNode implements ILogicalAndTermAST
+{
+    private ILogicalAndTermAST _LogicalAndTermAST;
+    private IEqualityTermAST _EqualityTermAST;
+
+    public ILogicalAndTermAST getLogicalAndTermAST() { return _LogicalAndTermAST; }
+    public IEqualityTermAST getEqualityTermAST() { return _EqualityTermAST; }
+
+    public LogicalAndTermAST(IToken leftIToken, IToken rightIToken,
+                             ILogicalAndTermAST _LogicalAndTermAST,
+                             IEqualityTermAST _EqualityTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._LogicalAndTermAST = _LogicalAndTermAST;
+        ((ASTNode) _LogicalAndTermAST).setParent(this);
+        this._EqualityTermAST = _EqualityTermAST;
+        ((ASTNode) _EqualityTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof LogicalAndTermAST)) return false;
+        LogicalAndTermAST other = (LogicalAndTermAST) o;
+        if (! _LogicalAndTermAST.equals(other.getLogicalAndTermAST())) return false;
+        if (! _EqualityTermAST.equals(other.getEqualityTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getLogicalAndTermAST().hashCode());
+        hash = hash * 31 + (getEqualityTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/LogicalTermAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/LogicalTermAST0.java
new file mode 100644
index 0000000..c752a0e
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/LogicalTermAST0.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 73:  LogicalTermAST ::= LogicalTermAST OR_OR LogicalAndTermAST
+ *</b>
+ */
+public class LogicalTermAST0 extends ASTNode implements ILogicalTermAST
+{
+    private ILogicalTermAST _LogicalTermAST;
+    private ILogicalAndTermAST _LogicalAndTermAST;
+
+    public ILogicalTermAST getLogicalTermAST() { return _LogicalTermAST; }
+    public ILogicalAndTermAST getLogicalAndTermAST() { return _LogicalAndTermAST; }
+
+    public LogicalTermAST0(IToken leftIToken, IToken rightIToken,
+                           ILogicalTermAST _LogicalTermAST,
+                           ILogicalAndTermAST _LogicalAndTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._LogicalTermAST = _LogicalTermAST;
+        ((ASTNode) _LogicalTermAST).setParent(this);
+        this._LogicalAndTermAST = _LogicalAndTermAST;
+        ((ASTNode) _LogicalAndTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof LogicalTermAST0)) return false;
+        LogicalTermAST0 other = (LogicalTermAST0) o;
+        if (! _LogicalTermAST.equals(other.getLogicalTermAST())) return false;
+        if (! _LogicalAndTermAST.equals(other.getLogicalAndTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getLogicalTermAST().hashCode());
+        hash = hash * 31 + (getLogicalAndTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/LogicalTermAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/LogicalTermAST1.java
new file mode 100644
index 0000000..3a099a9
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/LogicalTermAST1.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 74:  LogicalTermAST ::= LogicalTermAST xor LogicalAndTermAST
+ *</b>
+ */
+public class LogicalTermAST1 extends ASTNode implements ILogicalTermAST
+{
+    private ILogicalTermAST _LogicalTermAST;
+    private ILogicalAndTermAST _LogicalAndTermAST;
+
+    public ILogicalTermAST getLogicalTermAST() { return _LogicalTermAST; }
+    public ILogicalAndTermAST getLogicalAndTermAST() { return _LogicalAndTermAST; }
+
+    public LogicalTermAST1(IToken leftIToken, IToken rightIToken,
+                           ILogicalTermAST _LogicalTermAST,
+                           ILogicalAndTermAST _LogicalAndTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._LogicalTermAST = _LogicalTermAST;
+        ((ASTNode) _LogicalTermAST).setParent(this);
+        this._LogicalAndTermAST = _LogicalAndTermAST;
+        ((ASTNode) _LogicalAndTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof LogicalTermAST1)) return false;
+        LogicalTermAST1 other = (LogicalTermAST1) o;
+        if (! _LogicalTermAST.equals(other.getLogicalTermAST())) return false;
+        if (! _LogicalAndTermAST.equals(other.getLogicalAndTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getLogicalTermAST().hashCode());
+        hash = hash * 31 + (getLogicalAndTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MachineContentAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MachineContentAST.java
new file mode 100644
index 0000000..9501963
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MachineContentAST.java
@@ -0,0 +1,60 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import org.eclipse.viatra2.lpgparser.*;
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 11:  MachineContentAST ::= GraphPatternDefAST
+ *<li>Rule 12:  MachineContentAST ::= GTRuleDefAST
+ *<li>Rule 13:  MachineContentAST ::= AsmFunctionDefAST
+ *<li>Rule 14:  MachineContentAST ::= AsmRuleDefAST
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 15:  MachineContentAST ::= ERROR_TOKEN
+ *</b>
+ */
+public class MachineContentAST extends ASTNodeToken implements IMachineContentAST
+{
+    private VTCLParser environment;
+    public VTCLParser getEnvironment() { return environment; }
+
+    public MachineContentAST(VTCLParser environment, IToken token)    {
+        super(token);
+        this.environment = environment;
+        initialize();
+    }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+
+	void initialize()
+    {
+                //reportErrorTokenMessage(getRhsTokenIndex(1), "Namespace import");
+        }
+
+    }
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MachineContentsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MachineContentsAST.java
new file mode 100644
index 0000000..9e9549d
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MachineContentsAST.java
@@ -0,0 +1,80 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 9:  MachineContentsAST ::= MachineContentAST
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 10:  MachineContentsAST ::= MachineContentsAST MachineContentAST
+ *</b>
+ */
+public class MachineContentsAST extends ASTNode implements IMachineContentsAST
+{
+    private IMachineContentsAST _MachineContentsAST;
+    private IMachineContentAST _MachineContentAST;
+
+    public IMachineContentsAST getMachineContentsAST() { return _MachineContentsAST; }
+    public IMachineContentAST getMachineContentAST() { return _MachineContentAST; }
+
+    public MachineContentsAST(IToken leftIToken, IToken rightIToken,
+                              IMachineContentsAST _MachineContentsAST,
+                              IMachineContentAST _MachineContentAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._MachineContentsAST = _MachineContentsAST;
+        ((ASTNode) _MachineContentsAST).setParent(this);
+        this._MachineContentAST = _MachineContentAST;
+        ((ASTNode) _MachineContentAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof MachineContentsAST)) return false;
+        MachineContentsAST other = (MachineContentsAST) o;
+        if (! _MachineContentsAST.equals(other.getMachineContentsAST())) return false;
+        if (! _MachineContentAST.equals(other.getMachineContentAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getMachineContentsAST().hashCode());
+        hash = hash * 31 + (getMachineContentAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MoveRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MoveRuleAST.java
new file mode 100644
index 0000000..17a4299
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MoveRuleAST.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 229:  MoveRuleAST ::= move TwoParametersAST SEMICOLON
+ *</b>
+ */
+public class MoveRuleAST extends ASTNode implements IMoveRuleAST
+{
+    private TwoParametersAST _TwoParametersAST;
+
+    public TwoParametersAST getTwoParametersAST() { return _TwoParametersAST; }
+
+    public MoveRuleAST(IToken leftIToken, IToken rightIToken,
+                       TwoParametersAST _TwoParametersAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._TwoParametersAST = _TwoParametersAST;
+        ((ASTNode) _TwoParametersAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof MoveRuleAST)) return false;
+        MoveRuleAST other = (MoveRuleAST) o;
+        if (! _TwoParametersAST.equals(other.getTwoParametersAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getTwoParametersAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultArithmeticTermAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultArithmeticTermAST0.java
new file mode 100644
index 0000000..07403e1
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultArithmeticTermAST0.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 90:  MultArithmeticTermAST ::= MultArithmeticTermAST MULTIPLY UnaryArithmeticTermAST
+ *</b>
+ */
+public class MultArithmeticTermAST0 extends ASTNode implements IMultArithmeticTermAST
+{
+    private IMultArithmeticTermAST _MultArithmeticTermAST;
+    private IUnaryArithmeticTermAST _UnaryArithmeticTermAST;
+
+    public IMultArithmeticTermAST getMultArithmeticTermAST() { return _MultArithmeticTermAST; }
+    public IUnaryArithmeticTermAST getUnaryArithmeticTermAST() { return _UnaryArithmeticTermAST; }
+
+    public MultArithmeticTermAST0(IToken leftIToken, IToken rightIToken,
+                                  IMultArithmeticTermAST _MultArithmeticTermAST,
+                                  IUnaryArithmeticTermAST _UnaryArithmeticTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._MultArithmeticTermAST = _MultArithmeticTermAST;
+        ((ASTNode) _MultArithmeticTermAST).setParent(this);
+        this._UnaryArithmeticTermAST = _UnaryArithmeticTermAST;
+        ((ASTNode) _UnaryArithmeticTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof MultArithmeticTermAST0)) return false;
+        MultArithmeticTermAST0 other = (MultArithmeticTermAST0) o;
+        if (! _MultArithmeticTermAST.equals(other.getMultArithmeticTermAST())) return false;
+        if (! _UnaryArithmeticTermAST.equals(other.getUnaryArithmeticTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getMultArithmeticTermAST().hashCode());
+        hash = hash * 31 + (getUnaryArithmeticTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultArithmeticTermAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultArithmeticTermAST1.java
new file mode 100644
index 0000000..d73f581
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultArithmeticTermAST1.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 91:  MultArithmeticTermAST ::= MultArithmeticTermAST DIVIDE UnaryArithmeticTermAST
+ *</b>
+ */
+public class MultArithmeticTermAST1 extends ASTNode implements IMultArithmeticTermAST
+{
+    private IMultArithmeticTermAST _MultArithmeticTermAST;
+    private IUnaryArithmeticTermAST _UnaryArithmeticTermAST;
+
+    public IMultArithmeticTermAST getMultArithmeticTermAST() { return _MultArithmeticTermAST; }
+    public IUnaryArithmeticTermAST getUnaryArithmeticTermAST() { return _UnaryArithmeticTermAST; }
+
+    public MultArithmeticTermAST1(IToken leftIToken, IToken rightIToken,
+                                  IMultArithmeticTermAST _MultArithmeticTermAST,
+                                  IUnaryArithmeticTermAST _UnaryArithmeticTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._MultArithmeticTermAST = _MultArithmeticTermAST;
+        ((ASTNode) _MultArithmeticTermAST).setParent(this);
+        this._UnaryArithmeticTermAST = _UnaryArithmeticTermAST;
+        ((ASTNode) _UnaryArithmeticTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof MultArithmeticTermAST1)) return false;
+        MultArithmeticTermAST1 other = (MultArithmeticTermAST1) o;
+        if (! _MultArithmeticTermAST.equals(other.getMultArithmeticTermAST())) return false;
+        if (! _UnaryArithmeticTermAST.equals(other.getUnaryArithmeticTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getMultArithmeticTermAST().hashCode());
+        hash = hash * 31 + (getUnaryArithmeticTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultArithmeticTermAST2.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultArithmeticTermAST2.java
new file mode 100644
index 0000000..c7cc683
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultArithmeticTermAST2.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 92:  MultArithmeticTermAST ::= MultArithmeticTermAST REMAINDER UnaryArithmeticTermAST
+ *</b>
+ */
+public class MultArithmeticTermAST2 extends ASTNode implements IMultArithmeticTermAST
+{
+    private IMultArithmeticTermAST _MultArithmeticTermAST;
+    private IUnaryArithmeticTermAST _UnaryArithmeticTermAST;
+
+    public IMultArithmeticTermAST getMultArithmeticTermAST() { return _MultArithmeticTermAST; }
+    public IUnaryArithmeticTermAST getUnaryArithmeticTermAST() { return _UnaryArithmeticTermAST; }
+
+    public MultArithmeticTermAST2(IToken leftIToken, IToken rightIToken,
+                                  IMultArithmeticTermAST _MultArithmeticTermAST,
+                                  IUnaryArithmeticTermAST _UnaryArithmeticTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._MultArithmeticTermAST = _MultArithmeticTermAST;
+        ((ASTNode) _MultArithmeticTermAST).setParent(this);
+        this._UnaryArithmeticTermAST = _UnaryArithmeticTermAST;
+        ((ASTNode) _UnaryArithmeticTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof MultArithmeticTermAST2)) return false;
+        MultArithmeticTermAST2 other = (MultArithmeticTermAST2) o;
+        if (! _MultArithmeticTermAST.equals(other.getMultArithmeticTermAST())) return false;
+        if (! _UnaryArithmeticTermAST.equals(other.getUnaryArithmeticTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getMultArithmeticTermAST().hashCode());
+        hash = hash * 31 + (getUnaryArithmeticTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultiplicityConstantAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultiplicityConstantAST0.java
new file mode 100644
index 0000000..6198883
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultiplicityConstantAST0.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 293:  MultiplicityConstantAST ::= one_to_one
+ *</b>
+ */
+public class MultiplicityConstantAST0 extends ASTNodeToken implements IMultiplicityConstantAST
+{
+    public MultiplicityConstantAST0(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultiplicityConstantAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultiplicityConstantAST1.java
new file mode 100644
index 0000000..b715bbc
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultiplicityConstantAST1.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 294:  MultiplicityConstantAST ::= one_to_many
+ *</b>
+ */
+public class MultiplicityConstantAST1 extends ASTNodeToken implements IMultiplicityConstantAST
+{
+    public MultiplicityConstantAST1(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultiplicityConstantAST2.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultiplicityConstantAST2.java
new file mode 100644
index 0000000..abff2b3
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultiplicityConstantAST2.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 295:  MultiplicityConstantAST ::= many_to_one
+ *</b>
+ */
+public class MultiplicityConstantAST2 extends ASTNodeToken implements IMultiplicityConstantAST
+{
+    public MultiplicityConstantAST2(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultiplicityConstantAST3.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultiplicityConstantAST3.java
new file mode 100644
index 0000000..89fb625
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/MultiplicityConstantAST3.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 296:  MultiplicityConstantAST ::= many_to_many
+ *</b>
+ */
+public class MultiplicityConstantAST3 extends ASTNodeToken implements IMultiplicityConstantAST
+{
+    public MultiplicityConstantAST3(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NamespaceDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NamespaceDefAST.java
new file mode 100644
index 0000000..1f5d02c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NamespaceDefAST.java
@@ -0,0 +1,73 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 2:  NamespaceDefAST ::= $Empty
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 3:  NamespaceDefAST ::= namespace QualifiedTypeNameAST SEMICOLON
+ *</b>
+ */
+public class NamespaceDefAST extends ASTNode implements INamespaceDefAST
+{
+    private IQualifiedTypeNameAST _QualifiedTypeNameAST;
+
+    public IQualifiedTypeNameAST getQualifiedTypeNameAST() { return _QualifiedTypeNameAST; }
+
+    public NamespaceDefAST(IToken leftIToken, IToken rightIToken,
+                           IQualifiedTypeNameAST _QualifiedTypeNameAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._QualifiedTypeNameAST = _QualifiedTypeNameAST;
+        ((ASTNode) _QualifiedTypeNameAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof NamespaceDefAST)) return false;
+        NamespaceDefAST other = (NamespaceDefAST) o;
+        if (! _QualifiedTypeNameAST.equals(other.getQualifiedTypeNameAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getQualifiedTypeNameAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NamespaceImportAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NamespaceImportAST0.java
new file mode 100644
index 0000000..f1110d3
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NamespaceImportAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 6:  NamespaceImportAST ::= import QualifiedTypeNameAST SEMICOLON
+ *</b>
+ */
+public class NamespaceImportAST0 extends ASTNode implements INamespaceImportAST
+{
+    private IQualifiedTypeNameAST _QualifiedTypeNameAST;
+
+    public IQualifiedTypeNameAST getQualifiedTypeNameAST() { return _QualifiedTypeNameAST; }
+
+    public NamespaceImportAST0(IToken leftIToken, IToken rightIToken,
+                               IQualifiedTypeNameAST _QualifiedTypeNameAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._QualifiedTypeNameAST = _QualifiedTypeNameAST;
+        ((ASTNode) _QualifiedTypeNameAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof NamespaceImportAST0)) return false;
+        NamespaceImportAST0 other = (NamespaceImportAST0) o;
+        if (! _QualifiedTypeNameAST.equals(other.getQualifiedTypeNameAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getQualifiedTypeNameAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NamespaceImportAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NamespaceImportAST1.java
new file mode 100644
index 0000000..eb3a372
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NamespaceImportAST1.java
@@ -0,0 +1,53 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import org.eclipse.viatra2.lpgparser.*;
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 7:  NamespaceImportAST ::= ERROR_TOKEN
+ *</b>
+ */
+public class NamespaceImportAST1 extends ASTNodeToken implements INamespaceImportAST
+{
+    private VTCLParser environment;
+    public VTCLParser getEnvironment() { return environment; }
+
+    public NamespaceImportAST1(VTCLParser environment, IToken token)    {
+        super(token);
+        this.environment = environment;
+        initialize();
+    }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+
+	void initialize()
+    {
+                //reportErrorTokenMessage(getRhsTokenIndex(1), "Namespace import");
+        }
+
+    }
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NamespaceImportsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NamespaceImportsAST.java
new file mode 100644
index 0000000..05d3d83
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NamespaceImportsAST.java
@@ -0,0 +1,84 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 4:  NamespaceImportsAST ::= $Empty
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 5:  NamespaceImportsAST ::= NamespaceImportsAST NamespaceImportAST
+ *</b>
+ */
+public class NamespaceImportsAST extends ASTNode implements INamespaceImportsAST
+{
+    private NamespaceImportsAST _NamespaceImportsAST;
+    private INamespaceImportAST _NamespaceImportAST;
+
+    /**
+     * The value returned by <b>getNamespaceImportsAST</b> may be <b>null</b>
+     */
+    public NamespaceImportsAST getNamespaceImportsAST() { return _NamespaceImportsAST; }
+    public INamespaceImportAST getNamespaceImportAST() { return _NamespaceImportAST; }
+
+    public NamespaceImportsAST(IToken leftIToken, IToken rightIToken,
+                               NamespaceImportsAST _NamespaceImportsAST,
+                               INamespaceImportAST _NamespaceImportAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._NamespaceImportsAST = _NamespaceImportsAST;
+        if (_NamespaceImportsAST != null) ((ASTNode) _NamespaceImportsAST).setParent(this);
+        this._NamespaceImportAST = _NamespaceImportAST;
+        ((ASTNode) _NamespaceImportAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof NamespaceImportsAST)) return false;
+        NamespaceImportsAST other = (NamespaceImportsAST) o;
+        if (_NamespaceImportsAST == null && other.getNamespaceImportsAST() != null) return false;
+        else if (! _NamespaceImportsAST.equals(other.getNamespaceImportsAST())) return false;
+        if (! _NamespaceImportAST.equals(other.getNamespaceImportAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getNamespaceImportsAST() == null ? 0 : getNamespaceImportsAST().hashCode());
+        hash = hash * 31 + (getNamespaceImportAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NegativePatternAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NegativePatternAST.java
new file mode 100644
index 0000000..559dd21
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NegativePatternAST.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 35:  NegativePatternAST ::= neg PatternCompositionAST
+ *</b>
+ */
+public class NegativePatternAST extends ASTNode implements INegativePatternAST
+{
+    private PatternCompositionAST _PatternCompositionAST;
+
+    public PatternCompositionAST getPatternCompositionAST() { return _PatternCompositionAST; }
+
+    public NegativePatternAST(IToken leftIToken, IToken rightIToken,
+                              PatternCompositionAST _PatternCompositionAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._PatternCompositionAST = _PatternCompositionAST;
+        ((ASTNode) _PatternCompositionAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof NegativePatternAST)) return false;
+        NegativePatternAST other = (NegativePatternAST) o;
+        if (! _PatternCompositionAST.equals(other.getPatternCompositionAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getPatternCompositionAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NonInjectivityConstraintAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NonInjectivityConstraintAST.java
new file mode 100644
index 0000000..b84bc51
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NonInjectivityConstraintAST.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 38:  NonInjectivityConstraintAST ::= PatternVariableRefAST NONINJECTIVE PatternVariableRefAST
+ *</b>
+ */
+public class NonInjectivityConstraintAST extends ASTNode implements INonInjectivityConstraintAST
+{
+    private PatternVariableRefAST _PatternVariableRefAST;
+    private PatternVariableRefAST _PatternVariableRefAST3;
+
+    public PatternVariableRefAST getPatternVariableRefAST() { return _PatternVariableRefAST; }
+    public PatternVariableRefAST getPatternVariableRefAST3() { return _PatternVariableRefAST3; }
+
+    public NonInjectivityConstraintAST(IToken leftIToken, IToken rightIToken,
+                                       PatternVariableRefAST _PatternVariableRefAST,
+                                       PatternVariableRefAST _PatternVariableRefAST3)
+    {
+        super(leftIToken, rightIToken);
+
+        this._PatternVariableRefAST = _PatternVariableRefAST;
+        ((ASTNode) _PatternVariableRefAST).setParent(this);
+        this._PatternVariableRefAST3 = _PatternVariableRefAST3;
+        ((ASTNode) _PatternVariableRefAST3).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof NonInjectivityConstraintAST)) return false;
+        NonInjectivityConstraintAST other = (NonInjectivityConstraintAST) o;
+        if (! _PatternVariableRefAST.equals(other.getPatternVariableRefAST())) return false;
+        if (! _PatternVariableRefAST3.equals(other.getPatternVariableRefAST3())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getPatternVariableRefAST().hashCode());
+        hash = hash * 31 + (getPatternVariableRefAST3().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NumericConstantAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NumericConstantAST0.java
new file mode 100644
index 0000000..05cc946
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NumericConstantAST0.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 298:  NumericConstantAST ::= DecimalIntegerLiteral
+ *</b>
+ */
+public class NumericConstantAST0 extends ASTNodeToken implements INumericConstantAST
+{
+    public NumericConstantAST0(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NumericConstantAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NumericConstantAST1.java
new file mode 100644
index 0000000..40bcf9b
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NumericConstantAST1.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 299:  NumericConstantAST ::= IntegerLiteral
+ *</b>
+ */
+public class NumericConstantAST1 extends ASTNodeToken implements INumericConstantAST
+{
+    public NumericConstantAST1(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NumericConstantAST2.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NumericConstantAST2.java
new file mode 100644
index 0000000..95b79de
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NumericConstantAST2.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 300:  NumericConstantAST ::= FloatingPointLiteral
+ *</b>
+ */
+public class NumericConstantAST2 extends ASTNodeToken implements INumericConstantAST
+{
+    public NumericConstantAST2(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NumericConstantAST3.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NumericConstantAST3.java
new file mode 100644
index 0000000..38ef225
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/NumericConstantAST3.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 301:  NumericConstantAST ::= DoubleLiteral
+ *</b>
+ */
+public class NumericConstantAST3 extends ASTNodeToken implements INumericConstantAST
+{
+    public NumericConstantAST3(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/OptMatchCountAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/OptMatchCountAST.java
new file mode 100644
index 0000000..3ab8bad
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/OptMatchCountAST.java
@@ -0,0 +1,73 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 40:  OptMatchCountAST ::= $Empty
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 41:  OptMatchCountAST ::= HASHMARK CounterVariableAST
+ *</b>
+ */
+public class OptMatchCountAST extends ASTNode implements IOptMatchCountAST
+{
+    private CounterVariableAST _CounterVariableAST;
+
+    public CounterVariableAST getCounterVariableAST() { return _CounterVariableAST; }
+
+    public OptMatchCountAST(IToken leftIToken, IToken rightIToken,
+                            CounterVariableAST _CounterVariableAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._CounterVariableAST = _CounterVariableAST;
+        ((ASTNode) _CounterVariableAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof OptMatchCountAST)) return false;
+        OptMatchCountAST other = (OptMatchCountAST) o;
+        if (! _CounterVariableAST.equals(other.getCounterVariableAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getCounterVariableAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/OptSemicolonAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/OptSemicolonAST.java
new file mode 100644
index 0000000..b07fa7f
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/OptSemicolonAST.java
@@ -0,0 +1,43 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 174:  OptSemicolonAST ::= $Empty
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 175:  OptSemicolonAST ::= SEMICOLON
+ *</b>
+ */
+public class OptSemicolonAST extends ASTNodeToken implements IOptSemicolonAST
+{
+    public OptSemicolonAST(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/OptShareableDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/OptShareableDefAST.java
new file mode 100644
index 0000000..c9be8d9
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/OptShareableDefAST.java
@@ -0,0 +1,43 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 17:  OptShareableDefAST ::= $Empty
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 18:  OptShareableDefAST ::= shareable
+ *</b>
+ */
+public class OptShareableDefAST extends ASTNodeToken implements IOptShareableDefAST
+{
+    public OptShareableDefAST(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ParallelRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ParallelRuleAST.java
new file mode 100644
index 0000000..369a7c6
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ParallelRuleAST.java
@@ -0,0 +1,80 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 172:  ParallelRuleAST ::= parallel LBRACE AsmRulesAST RBRACE OptSemicolonAST
+ *</b>
+ */
+public class ParallelRuleAST extends ASTNode implements IParallelRuleAST
+{
+    private AsmRulesAST _AsmRulesAST;
+    private OptSemicolonAST _OptSemicolonAST;
+
+    public AsmRulesAST getAsmRulesAST() { return _AsmRulesAST; }
+    /**
+     * The value returned by <b>getOptSemicolonAST</b> may be <b>null</b>
+     */
+    public OptSemicolonAST getOptSemicolonAST() { return _OptSemicolonAST; }
+
+    public ParallelRuleAST(IToken leftIToken, IToken rightIToken,
+                           AsmRulesAST _AsmRulesAST,
+                           OptSemicolonAST _OptSemicolonAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._AsmRulesAST = _AsmRulesAST;
+        ((ASTNode) _AsmRulesAST).setParent(this);
+        this._OptSemicolonAST = _OptSemicolonAST;
+        if (_OptSemicolonAST != null) ((ASTNode) _OptSemicolonAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ParallelRuleAST)) return false;
+        ParallelRuleAST other = (ParallelRuleAST) o;
+        if (! _AsmRulesAST.equals(other.getAsmRulesAST())) return false;
+        if (_OptSemicolonAST == null && other.getOptSemicolonAST() != null) return false;
+        else if (! _OptSemicolonAST.equals(other.getOptSemicolonAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getAsmRulesAST().hashCode());
+        hash = hash * 31 + (getOptSemicolonAST() == null ? 0 : getOptSemicolonAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternBodiesAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternBodiesAST.java
new file mode 100644
index 0000000..c81b428
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternBodiesAST.java
@@ -0,0 +1,80 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 19:  PatternBodiesAST ::= PatternBodyAST
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 20:  PatternBodiesAST ::= PatternBodiesAST or PatternBodyAST
+ *</b>
+ */
+public class PatternBodiesAST extends ASTNode implements IPatternBodiesAST
+{
+    private IPatternBodiesAST _PatternBodiesAST;
+    private PatternBodyAST _PatternBodyAST;
+
+    public IPatternBodiesAST getPatternBodiesAST() { return _PatternBodiesAST; }
+    public PatternBodyAST getPatternBodyAST() { return _PatternBodyAST; }
+
+    public PatternBodiesAST(IToken leftIToken, IToken rightIToken,
+                            IPatternBodiesAST _PatternBodiesAST,
+                            PatternBodyAST _PatternBodyAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._PatternBodiesAST = _PatternBodiesAST;
+        ((ASTNode) _PatternBodiesAST).setParent(this);
+        this._PatternBodyAST = _PatternBodyAST;
+        ((ASTNode) _PatternBodyAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof PatternBodiesAST)) return false;
+        PatternBodiesAST other = (PatternBodiesAST) o;
+        if (! _PatternBodiesAST.equals(other.getPatternBodiesAST())) return false;
+        if (! _PatternBodyAST.equals(other.getPatternBodyAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getPatternBodiesAST().hashCode());
+        hash = hash * 31 + (getPatternBodyAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternBodyAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternBodyAST.java
new file mode 100644
index 0000000..1149e5a
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternBodyAST.java
@@ -0,0 +1,73 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 21:  PatternBodyAST ::= LBRACE PatternBodyContentsAST RBRACE
+ *</b>
+ */
+public class PatternBodyAST extends ASTNode implements IPatternBodyAST
+{
+    private PatternBodyContentsAST _PatternBodyContentsAST;
+
+    /**
+     * The value returned by <b>getPatternBodyContentsAST</b> may be <b>null</b>
+     */
+    public PatternBodyContentsAST getPatternBodyContentsAST() { return _PatternBodyContentsAST; }
+
+    public PatternBodyAST(IToken leftIToken, IToken rightIToken,
+                          PatternBodyContentsAST _PatternBodyContentsAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._PatternBodyContentsAST = _PatternBodyContentsAST;
+        if (_PatternBodyContentsAST != null) ((ASTNode) _PatternBodyContentsAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof PatternBodyAST)) return false;
+        PatternBodyAST other = (PatternBodyAST) o;
+        if (_PatternBodyContentsAST == null && other.getPatternBodyContentsAST() != null) return false;
+        else if (! _PatternBodyContentsAST.equals(other.getPatternBodyContentsAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getPatternBodyContentsAST() == null ? 0 : getPatternBodyContentsAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternBodyContentAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternBodyContentAST.java
new file mode 100644
index 0000000..a6b4c6e
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternBodyContentAST.java
@@ -0,0 +1,48 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 26:  PatternBodyContentAST ::= LocalPatternBodyElementAST
+ *<li>Rule 27:  PatternBodyContentAST ::= PatternCompositionAST
+ *<li>Rule 28:  PatternBodyContentAST ::= NegativePatternAST
+ *<li>Rule 29:  PatternBodyContentAST ::= PatternVariableAssignmentAST
+ *<li>Rule 30:  PatternBodyContentAST ::= CheckConditionAST
+ *<li>Rule 31:  PatternBodyContentAST ::= NonInjectivityConstraintAST
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 32:  PatternBodyContentAST ::= ERROR_TOKEN
+ *</b>
+ */
+public class PatternBodyContentAST extends ASTNodeToken implements IPatternBodyContentAST
+{
+    public PatternBodyContentAST(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternBodyContentDefAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternBodyContentDefAST0.java
new file mode 100644
index 0000000..0ba1fb7
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternBodyContentDefAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 24:  PatternBodyContentDefAST ::= PatternBodyContentAST SEMICOLON
+ *</b>
+ */
+public class PatternBodyContentDefAST0 extends ASTNode implements IPatternBodyContentDefAST
+{
+    private IPatternBodyContentAST _PatternBodyContentAST;
+
+    public IPatternBodyContentAST getPatternBodyContentAST() { return _PatternBodyContentAST; }
+
+    public PatternBodyContentDefAST0(IToken leftIToken, IToken rightIToken,
+                                     IPatternBodyContentAST _PatternBodyContentAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._PatternBodyContentAST = _PatternBodyContentAST;
+        ((ASTNode) _PatternBodyContentAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof PatternBodyContentDefAST0)) return false;
+        PatternBodyContentDefAST0 other = (PatternBodyContentDefAST0) o;
+        if (! _PatternBodyContentAST.equals(other.getPatternBodyContentAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getPatternBodyContentAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternBodyContentDefAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternBodyContentDefAST1.java
new file mode 100644
index 0000000..b44c80b
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternBodyContentDefAST1.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 25:  PatternBodyContentDefAST ::= neg GraphPatternDefAST
+ *</b>
+ */
+public class PatternBodyContentDefAST1 extends ASTNode implements IPatternBodyContentDefAST
+{
+    private GraphPatternDefAST _GraphPatternDefAST;
+
+    public GraphPatternDefAST getGraphPatternDefAST() { return _GraphPatternDefAST; }
+
+    public PatternBodyContentDefAST1(IToken leftIToken, IToken rightIToken,
+                                     GraphPatternDefAST _GraphPatternDefAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._GraphPatternDefAST = _GraphPatternDefAST;
+        ((ASTNode) _GraphPatternDefAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof PatternBodyContentDefAST1)) return false;
+        PatternBodyContentDefAST1 other = (PatternBodyContentDefAST1) o;
+        if (! _GraphPatternDefAST.equals(other.getGraphPatternDefAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getGraphPatternDefAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternBodyContentsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternBodyContentsAST.java
new file mode 100644
index 0000000..fc69bd1
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternBodyContentsAST.java
@@ -0,0 +1,84 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 22:  PatternBodyContentsAST ::= $Empty
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 23:  PatternBodyContentsAST ::= PatternBodyContentsAST PatternBodyContentDefAST
+ *</b>
+ */
+public class PatternBodyContentsAST extends ASTNode implements IPatternBodyContentsAST
+{
+    private PatternBodyContentsAST _PatternBodyContentsAST;
+    private IPatternBodyContentDefAST _PatternBodyContentDefAST;
+
+    /**
+     * The value returned by <b>getPatternBodyContentsAST</b> may be <b>null</b>
+     */
+    public PatternBodyContentsAST getPatternBodyContentsAST() { return _PatternBodyContentsAST; }
+    public IPatternBodyContentDefAST getPatternBodyContentDefAST() { return _PatternBodyContentDefAST; }
+
+    public PatternBodyContentsAST(IToken leftIToken, IToken rightIToken,
+                                  PatternBodyContentsAST _PatternBodyContentsAST,
+                                  IPatternBodyContentDefAST _PatternBodyContentDefAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._PatternBodyContentsAST = _PatternBodyContentsAST;
+        if (_PatternBodyContentsAST != null) ((ASTNode) _PatternBodyContentsAST).setParent(this);
+        this._PatternBodyContentDefAST = _PatternBodyContentDefAST;
+        ((ASTNode) _PatternBodyContentDefAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof PatternBodyContentsAST)) return false;
+        PatternBodyContentsAST other = (PatternBodyContentsAST) o;
+        if (_PatternBodyContentsAST == null && other.getPatternBodyContentsAST() != null) return false;
+        else if (! _PatternBodyContentsAST.equals(other.getPatternBodyContentsAST())) return false;
+        if (! _PatternBodyContentDefAST.equals(other.getPatternBodyContentDefAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getPatternBodyContentsAST() == null ? 0 : getPatternBodyContentsAST().hashCode());
+        hash = hash * 31 + (getPatternBodyContentDefAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternCompositionAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternCompositionAST.java
new file mode 100644
index 0000000..b4a7c95
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternCompositionAST.java
@@ -0,0 +1,87 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 36:  PatternCompositionAST ::= find QualifiedTypeNameAST ActualPatternParameterDefAST OptMatchCountAST
+ *</b>
+ */
+public class PatternCompositionAST extends ASTNode implements IPatternCompositionAST
+{
+    private IQualifiedTypeNameAST _QualifiedTypeNameAST;
+    private IActualPatternParameterDefAST _ActualPatternParameterDefAST;
+    private OptMatchCountAST _OptMatchCountAST;
+
+    public IQualifiedTypeNameAST getQualifiedTypeNameAST() { return _QualifiedTypeNameAST; }
+    public IActualPatternParameterDefAST getActualPatternParameterDefAST() { return _ActualPatternParameterDefAST; }
+    /**
+     * The value returned by <b>getOptMatchCountAST</b> may be <b>null</b>
+     */
+    public OptMatchCountAST getOptMatchCountAST() { return _OptMatchCountAST; }
+
+    public PatternCompositionAST(IToken leftIToken, IToken rightIToken,
+                                 IQualifiedTypeNameAST _QualifiedTypeNameAST,
+                                 IActualPatternParameterDefAST _ActualPatternParameterDefAST,
+                                 OptMatchCountAST _OptMatchCountAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._QualifiedTypeNameAST = _QualifiedTypeNameAST;
+        ((ASTNode) _QualifiedTypeNameAST).setParent(this);
+        this._ActualPatternParameterDefAST = _ActualPatternParameterDefAST;
+        ((ASTNode) _ActualPatternParameterDefAST).setParent(this);
+        this._OptMatchCountAST = _OptMatchCountAST;
+        if (_OptMatchCountAST != null) ((ASTNode) _OptMatchCountAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof PatternCompositionAST)) return false;
+        PatternCompositionAST other = (PatternCompositionAST) o;
+        if (! _QualifiedTypeNameAST.equals(other.getQualifiedTypeNameAST())) return false;
+        if (! _ActualPatternParameterDefAST.equals(other.getActualPatternParameterDefAST())) return false;
+        if (_OptMatchCountAST == null && other.getOptMatchCountAST() != null) return false;
+        else if (! _OptMatchCountAST.equals(other.getOptMatchCountAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getQualifiedTypeNameAST().hashCode());
+        hash = hash * 31 + (getActualPatternParameterDefAST().hashCode());
+        hash = hash * 31 + (getOptMatchCountAST() == null ? 0 : getOptMatchCountAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternVariableAssignmentAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternVariableAssignmentAST.java
new file mode 100644
index 0000000..c40a54d
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternVariableAssignmentAST.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 37:  PatternVariableAssignmentAST ::= PatternVariableRefAST EQUAL PatternVariableRefAST
+ *</b>
+ */
+public class PatternVariableAssignmentAST extends ASTNode implements IPatternVariableAssignmentAST
+{
+    private PatternVariableRefAST _PatternVariableRefAST;
+    private PatternVariableRefAST _PatternVariableRefAST3;
+
+    public PatternVariableRefAST getPatternVariableRefAST() { return _PatternVariableRefAST; }
+    public PatternVariableRefAST getPatternVariableRefAST3() { return _PatternVariableRefAST3; }
+
+    public PatternVariableAssignmentAST(IToken leftIToken, IToken rightIToken,
+                                        PatternVariableRefAST _PatternVariableRefAST,
+                                        PatternVariableRefAST _PatternVariableRefAST3)
+    {
+        super(leftIToken, rightIToken);
+
+        this._PatternVariableRefAST = _PatternVariableRefAST;
+        ((ASTNode) _PatternVariableRefAST).setParent(this);
+        this._PatternVariableRefAST3 = _PatternVariableRefAST3;
+        ((ASTNode) _PatternVariableRefAST3).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof PatternVariableAssignmentAST)) return false;
+        PatternVariableAssignmentAST other = (PatternVariableAssignmentAST) o;
+        if (! _PatternVariableRefAST.equals(other.getPatternVariableRefAST())) return false;
+        if (! _PatternVariableRefAST3.equals(other.getPatternVariableRefAST3())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getPatternVariableRefAST().hashCode());
+        hash = hash * 31 + (getPatternVariableRefAST3().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternVariableDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternVariableDefAST.java
new file mode 100644
index 0000000..ddf6191
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternVariableDefAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 42:  PatternVariableDefAST ::= UpperCaseLiteral
+ *</b>
+ */
+public class PatternVariableDefAST extends ASTNodeToken implements IPatternVariableDefAST
+{
+    public PatternVariableDefAST(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternVariableDefRefAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternVariableDefRefAST0.java
new file mode 100644
index 0000000..f6666b2
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternVariableDefRefAST0.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 44:  PatternVariableDefRefAST ::= UpperCaseLiteral
+ *</b>
+ */
+public class PatternVariableDefRefAST0 extends ASTNodeToken implements IPatternVariableDefRefAST
+{
+    public PatternVariableDefRefAST0(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternVariableDefRefAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternVariableDefRefAST1.java
new file mode 100644
index 0000000..6d8c10f
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternVariableDefRefAST1.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 45:  PatternVariableDefRefAST ::= DummyVariableLiteral
+ *</b>
+ */
+public class PatternVariableDefRefAST1 extends ASTNodeToken implements IPatternVariableDefRefAST
+{
+    public PatternVariableDefRefAST1(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternVariableRefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternVariableRefAST.java
new file mode 100644
index 0000000..094304c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PatternVariableRefAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 43:  PatternVariableRefAST ::= UpperCaseLiteral
+ *</b>
+ */
+public class PatternVariableRefAST extends ASTNodeToken implements IPatternVariableRefAST
+{
+    public PatternVariableRefAST(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PostconditionOptAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PostconditionOptAST0.java
new file mode 100644
index 0000000..23515b0
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PostconditionOptAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 67:  PostconditionOptAST ::= postcondition GraphPatternDefAST
+ *</b>
+ */
+public class PostconditionOptAST0 extends ASTNode implements IPostconditionOptAST
+{
+    private GraphPatternDefAST _GraphPatternDefAST;
+
+    public GraphPatternDefAST getGraphPatternDefAST() { return _GraphPatternDefAST; }
+
+    public PostconditionOptAST0(IToken leftIToken, IToken rightIToken,
+                                GraphPatternDefAST _GraphPatternDefAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._GraphPatternDefAST = _GraphPatternDefAST;
+        ((ASTNode) _GraphPatternDefAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof PostconditionOptAST0)) return false;
+        PostconditionOptAST0 other = (PostconditionOptAST0) o;
+        if (! _GraphPatternDefAST.equals(other.getGraphPatternDefAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getGraphPatternDefAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PostconditionOptAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PostconditionOptAST1.java
new file mode 100644
index 0000000..835e32f
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PostconditionOptAST1.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 68:  PostconditionOptAST ::= postcondition PatternCompositionAST
+ *</b>
+ */
+public class PostconditionOptAST1 extends ASTNode implements IPostconditionOptAST
+{
+    private PatternCompositionAST _PatternCompositionAST;
+
+    public PatternCompositionAST getPatternCompositionAST() { return _PatternCompositionAST; }
+
+    public PostconditionOptAST1(IToken leftIToken, IToken rightIToken,
+                                PatternCompositionAST _PatternCompositionAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._PatternCompositionAST = _PatternCompositionAST;
+        ((ASTNode) _PatternCompositionAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof PostconditionOptAST1)) return false;
+        PostconditionOptAST1 other = (PostconditionOptAST1) o;
+        if (! _PatternCompositionAST.equals(other.getPatternCompositionAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getPatternCompositionAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PreconditionDefAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PreconditionDefAST0.java
new file mode 100644
index 0000000..90b1dbe
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PreconditionDefAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 64:  PreconditionDefAST ::= precondition GraphPatternDefAST
+ *</b>
+ */
+public class PreconditionDefAST0 extends ASTNode implements IPreconditionDefAST
+{
+    private GraphPatternDefAST _GraphPatternDefAST;
+
+    public GraphPatternDefAST getGraphPatternDefAST() { return _GraphPatternDefAST; }
+
+    public PreconditionDefAST0(IToken leftIToken, IToken rightIToken,
+                               GraphPatternDefAST _GraphPatternDefAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._GraphPatternDefAST = _GraphPatternDefAST;
+        ((ASTNode) _GraphPatternDefAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof PreconditionDefAST0)) return false;
+        PreconditionDefAST0 other = (PreconditionDefAST0) o;
+        if (! _GraphPatternDefAST.equals(other.getGraphPatternDefAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getGraphPatternDefAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PreconditionDefAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PreconditionDefAST1.java
new file mode 100644
index 0000000..09b9105
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PreconditionDefAST1.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 65:  PreconditionDefAST ::= precondition PatternCompositionAST
+ *</b>
+ */
+public class PreconditionDefAST1 extends ASTNode implements IPreconditionDefAST
+{
+    private PatternCompositionAST _PatternCompositionAST;
+
+    public PatternCompositionAST getPatternCompositionAST() { return _PatternCompositionAST; }
+
+    public PreconditionDefAST1(IToken leftIToken, IToken rightIToken,
+                               PatternCompositionAST _PatternCompositionAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._PatternCompositionAST = _PatternCompositionAST;
+        ((ASTNode) _PatternCompositionAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof PreconditionDefAST1)) return false;
+        PreconditionDefAST1 other = (PreconditionDefAST1) o;
+        if (! _PatternCompositionAST.equals(other.getPatternCompositionAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getPatternCompositionAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PredefinedFunctionCallAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PredefinedFunctionCallAST0.java
new file mode 100644
index 0000000..0dea645
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PredefinedFunctionCallAST0.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 114:  PredefinedFunctionCallAST ::= BuiltInFunctionNameAST LPAREN ArithmeticTermAST RPAREN
+ *</b>
+ */
+public class PredefinedFunctionCallAST0 extends ASTNode implements IPredefinedFunctionCallAST
+{
+    private BuiltInFunctionNameAST _BuiltInFunctionNameAST;
+    private IArithmeticTermAST _ArithmeticTermAST;
+
+    public BuiltInFunctionNameAST getBuiltInFunctionNameAST() { return _BuiltInFunctionNameAST; }
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+
+    public PredefinedFunctionCallAST0(IToken leftIToken, IToken rightIToken,
+                                      BuiltInFunctionNameAST _BuiltInFunctionNameAST,
+                                      IArithmeticTermAST _ArithmeticTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._BuiltInFunctionNameAST = _BuiltInFunctionNameAST;
+        ((ASTNode) _BuiltInFunctionNameAST).setParent(this);
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof PredefinedFunctionCallAST0)) return false;
+        PredefinedFunctionCallAST0 other = (PredefinedFunctionCallAST0) o;
+        if (! _BuiltInFunctionNameAST.equals(other.getBuiltInFunctionNameAST())) return false;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getBuiltInFunctionNameAST().hashCode());
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PredefinedFunctionCallAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PredefinedFunctionCallAST1.java
new file mode 100644
index 0000000..6f37f48
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PredefinedFunctionCallAST1.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 115:  PredefinedFunctionCallAST ::= ConversionFunctionNameAST LPAREN ArithmeticTermAST RPAREN
+ *</b>
+ */
+public class PredefinedFunctionCallAST1 extends ASTNode implements IPredefinedFunctionCallAST
+{
+    private ConversionFunctionNameAST _ConversionFunctionNameAST;
+    private IArithmeticTermAST _ArithmeticTermAST;
+
+    public ConversionFunctionNameAST getConversionFunctionNameAST() { return _ConversionFunctionNameAST; }
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+
+    public PredefinedFunctionCallAST1(IToken leftIToken, IToken rightIToken,
+                                      ConversionFunctionNameAST _ConversionFunctionNameAST,
+                                      IArithmeticTermAST _ArithmeticTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ConversionFunctionNameAST = _ConversionFunctionNameAST;
+        ((ASTNode) _ConversionFunctionNameAST).setParent(this);
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof PredefinedFunctionCallAST1)) return false;
+        PredefinedFunctionCallAST1 other = (PredefinedFunctionCallAST1) o;
+        if (! _ConversionFunctionNameAST.equals(other.getConversionFunctionNameAST())) return false;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getConversionFunctionNameAST().hashCode());
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PrintRuleAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PrintRuleAST0.java
new file mode 100644
index 0000000..f02c067
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PrintRuleAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 153:  PrintRuleAST ::= print LPAREN LogicalTermAST RPAREN SEMICOLON
+ *</b>
+ */
+public class PrintRuleAST0 extends ASTNode implements IPrintRuleAST
+{
+    private ILogicalTermAST _LogicalTermAST;
+
+    public ILogicalTermAST getLogicalTermAST() { return _LogicalTermAST; }
+
+    public PrintRuleAST0(IToken leftIToken, IToken rightIToken,
+                         ILogicalTermAST _LogicalTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._LogicalTermAST = _LogicalTermAST;
+        ((ASTNode) _LogicalTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof PrintRuleAST0)) return false;
+        PrintRuleAST0 other = (PrintRuleAST0) o;
+        if (! _LogicalTermAST.equals(other.getLogicalTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getLogicalTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PrintRuleAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PrintRuleAST1.java
new file mode 100644
index 0000000..d6d6bdc
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PrintRuleAST1.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 154:  PrintRuleAST ::= print LPAREN ArithmeticTermAST COMMA LogicalTermAST RPAREN SEMICOLON
+ *</b>
+ */
+public class PrintRuleAST1 extends ASTNode implements IPrintRuleAST
+{
+    private IArithmeticTermAST _ArithmeticTermAST;
+    private ILogicalTermAST _LogicalTermAST;
+
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+    public ILogicalTermAST getLogicalTermAST() { return _LogicalTermAST; }
+
+    public PrintRuleAST1(IToken leftIToken, IToken rightIToken,
+                         IArithmeticTermAST _ArithmeticTermAST,
+                         ILogicalTermAST _LogicalTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        this._LogicalTermAST = _LogicalTermAST;
+        ((ASTNode) _LogicalTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof PrintRuleAST1)) return false;
+        PrintRuleAST1 other = (PrintRuleAST1) o;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        if (! _LogicalTermAST.equals(other.getLogicalTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        hash = hash * 31 + (getLogicalTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PrintRuleAST2.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PrintRuleAST2.java
new file mode 100644
index 0000000..eddfdc2
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PrintRuleAST2.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 155:  PrintRuleAST ::= println LPAREN LogicalTermAST RPAREN SEMICOLON
+ *</b>
+ */
+public class PrintRuleAST2 extends ASTNode implements IPrintRuleAST
+{
+    private ILogicalTermAST _LogicalTermAST;
+
+    public ILogicalTermAST getLogicalTermAST() { return _LogicalTermAST; }
+
+    public PrintRuleAST2(IToken leftIToken, IToken rightIToken,
+                         ILogicalTermAST _LogicalTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._LogicalTermAST = _LogicalTermAST;
+        ((ASTNode) _LogicalTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof PrintRuleAST2)) return false;
+        PrintRuleAST2 other = (PrintRuleAST2) o;
+        if (! _LogicalTermAST.equals(other.getLogicalTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getLogicalTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PrintRuleAST3.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PrintRuleAST3.java
new file mode 100644
index 0000000..8fb70d0
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/PrintRuleAST3.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 156:  PrintRuleAST ::= println LPAREN ArithmeticTermAST COMMA LogicalTermAST RPAREN SEMICOLON
+ *</b>
+ */
+public class PrintRuleAST3 extends ASTNode implements IPrintRuleAST
+{
+    private IArithmeticTermAST _ArithmeticTermAST;
+    private ILogicalTermAST _LogicalTermAST;
+
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+    public ILogicalTermAST getLogicalTermAST() { return _LogicalTermAST; }
+
+    public PrintRuleAST3(IToken leftIToken, IToken rightIToken,
+                         IArithmeticTermAST _ArithmeticTermAST,
+                         ILogicalTermAST _LogicalTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        this._LogicalTermAST = _LogicalTermAST;
+        ((ASTNode) _LogicalTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof PrintRuleAST3)) return false;
+        PrintRuleAST3 other = (PrintRuleAST3) o;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        if (! _LogicalTermAST.equals(other.getLogicalTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        hash = hash * 31 + (getLogicalTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/QualifiedTypeNameAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/QualifiedTypeNameAST.java
new file mode 100644
index 0000000..368bc1b
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/QualifiedTypeNameAST.java
@@ -0,0 +1,80 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 239:  QualifiedTypeNameAST ::= TypeNameAST
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 240:  QualifiedTypeNameAST ::= QualifiedTypeNameAST DOT TypeNameAST
+ *</b>
+ */
+public class QualifiedTypeNameAST extends ASTNode implements IQualifiedTypeNameAST
+{
+    private IQualifiedTypeNameAST _QualifiedTypeNameAST;
+    private ITypeNameAST _TypeNameAST;
+
+    public IQualifiedTypeNameAST getQualifiedTypeNameAST() { return _QualifiedTypeNameAST; }
+    public ITypeNameAST getTypeNameAST() { return _TypeNameAST; }
+
+    public QualifiedTypeNameAST(IToken leftIToken, IToken rightIToken,
+                                IQualifiedTypeNameAST _QualifiedTypeNameAST,
+                                ITypeNameAST _TypeNameAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._QualifiedTypeNameAST = _QualifiedTypeNameAST;
+        ((ASTNode) _QualifiedTypeNameAST).setParent(this);
+        this._TypeNameAST = _TypeNameAST;
+        ((ASTNode) _TypeNameAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof QualifiedTypeNameAST)) return false;
+        QualifiedTypeNameAST other = (QualifiedTypeNameAST) o;
+        if (! _QualifiedTypeNameAST.equals(other.getQualifiedTypeNameAST())) return false;
+        if (! _TypeNameAST.equals(other.getTypeNameAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getQualifiedTypeNameAST().hashCode());
+        hash = hash * 31 + (getTypeNameAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/RandomRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/RandomRuleAST.java
new file mode 100644
index 0000000..86138ac
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/RandomRuleAST.java
@@ -0,0 +1,80 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 173:  RandomRuleAST ::= random LBRACE AsmRulesAST RBRACE OptSemicolonAST
+ *</b>
+ */
+public class RandomRuleAST extends ASTNode implements IRandomRuleAST
+{
+    private AsmRulesAST _AsmRulesAST;
+    private OptSemicolonAST _OptSemicolonAST;
+
+    public AsmRulesAST getAsmRulesAST() { return _AsmRulesAST; }
+    /**
+     * The value returned by <b>getOptSemicolonAST</b> may be <b>null</b>
+     */
+    public OptSemicolonAST getOptSemicolonAST() { return _OptSemicolonAST; }
+
+    public RandomRuleAST(IToken leftIToken, IToken rightIToken,
+                         AsmRulesAST _AsmRulesAST,
+                         OptSemicolonAST _OptSemicolonAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._AsmRulesAST = _AsmRulesAST;
+        ((ASTNode) _AsmRulesAST).setParent(this);
+        this._OptSemicolonAST = _OptSemicolonAST;
+        if (_OptSemicolonAST != null) ((ASTNode) _OptSemicolonAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof RandomRuleAST)) return false;
+        RandomRuleAST other = (RandomRuleAST) o;
+        if (! _AsmRulesAST.equals(other.getAsmRulesAST())) return false;
+        if (_OptSemicolonAST == null && other.getOptSemicolonAST() != null) return false;
+        else if (! _OptSemicolonAST.equals(other.getOptSemicolonAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getAsmRulesAST().hashCode());
+        hash = hash * 31 + (getOptSemicolonAST() == null ? 0 : getOptSemicolonAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/RelationAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/RelationAST.java
new file mode 100644
index 0000000..3a23424
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/RelationAST.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 52:  RelationAST ::= QualifiedTypeNameAST RelationBodyAST
+ *</b>
+ */
+public class RelationAST extends ASTNode implements IRelationAST
+{
+    private IQualifiedTypeNameAST _QualifiedTypeNameAST;
+    private RelationBodyAST _RelationBodyAST;
+
+    public IQualifiedTypeNameAST getQualifiedTypeNameAST() { return _QualifiedTypeNameAST; }
+    public RelationBodyAST getRelationBodyAST() { return _RelationBodyAST; }
+
+    public RelationAST(IToken leftIToken, IToken rightIToken,
+                       IQualifiedTypeNameAST _QualifiedTypeNameAST,
+                       RelationBodyAST _RelationBodyAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._QualifiedTypeNameAST = _QualifiedTypeNameAST;
+        ((ASTNode) _QualifiedTypeNameAST).setParent(this);
+        this._RelationBodyAST = _RelationBodyAST;
+        ((ASTNode) _RelationBodyAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof RelationAST)) return false;
+        RelationAST other = (RelationAST) o;
+        if (! _QualifiedTypeNameAST.equals(other.getQualifiedTypeNameAST())) return false;
+        if (! _RelationBodyAST.equals(other.getRelationBodyAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getQualifiedTypeNameAST().hashCode());
+        hash = hash * 31 + (getRelationBodyAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/RelationBodyAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/RelationBodyAST.java
new file mode 100644
index 0000000..0a8d211
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/RelationBodyAST.java
@@ -0,0 +1,83 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 53:  RelationBodyAST ::= LPAREN PatternVariableDefRefAST COMMA PatternVariableRefAST COMMA PatternVariableRefAST RPAREN
+ *</b>
+ */
+public class RelationBodyAST extends ASTNode implements IRelationBodyAST
+{
+    private IPatternVariableDefRefAST _PatternVariableDefRefAST;
+    private PatternVariableRefAST _PatternVariableRefAST;
+    private PatternVariableRefAST _PatternVariableRefAST6;
+
+    public IPatternVariableDefRefAST getPatternVariableDefRefAST() { return _PatternVariableDefRefAST; }
+    public PatternVariableRefAST getPatternVariableRefAST() { return _PatternVariableRefAST; }
+    public PatternVariableRefAST getPatternVariableRefAST6() { return _PatternVariableRefAST6; }
+
+    public RelationBodyAST(IToken leftIToken, IToken rightIToken,
+                           IPatternVariableDefRefAST _PatternVariableDefRefAST,
+                           PatternVariableRefAST _PatternVariableRefAST,
+                           PatternVariableRefAST _PatternVariableRefAST6)
+    {
+        super(leftIToken, rightIToken);
+
+        this._PatternVariableDefRefAST = _PatternVariableDefRefAST;
+        ((ASTNode) _PatternVariableDefRefAST).setParent(this);
+        this._PatternVariableRefAST = _PatternVariableRefAST;
+        ((ASTNode) _PatternVariableRefAST).setParent(this);
+        this._PatternVariableRefAST6 = _PatternVariableRefAST6;
+        ((ASTNode) _PatternVariableRefAST6).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof RelationBodyAST)) return false;
+        RelationBodyAST other = (RelationBodyAST) o;
+        if (! _PatternVariableDefRefAST.equals(other.getPatternVariableDefRefAST())) return false;
+        if (! _PatternVariableRefAST.equals(other.getPatternVariableRefAST())) return false;
+        if (! _PatternVariableRefAST6.equals(other.getPatternVariableRefAST6())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getPatternVariableDefRefAST().hashCode());
+        hash = hash * 31 + (getPatternVariableRefAST().hashCode());
+        hash = hash * 31 + (getPatternVariableRefAST6().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/RelationalOpAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/RelationalOpAST.java
new file mode 100644
index 0000000..377baea
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/RelationalOpAST.java
@@ -0,0 +1,42 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 82:  RelationalOpAST ::= LESS
+ *<li>Rule 83:  RelationalOpAST ::= GREATER
+ *<li>Rule 84:  RelationalOpAST ::= LESS_EQUAL
+ *<li>Rule 85:  RelationalOpAST ::= GREATER_EQUAL
+ *</b>
+ */
+public class RelationalOpAST extends ASTNodeToken implements IRelationalOpAST
+{
+    public RelationalOpAST(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/RelationalTermAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/RelationalTermAST.java
new file mode 100644
index 0000000..d6222cc
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/RelationalTermAST.java
@@ -0,0 +1,87 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 80:  RelationalTermAST ::= ArithmeticTermAST
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 81:  RelationalTermAST ::= RelationalTermAST RelationalOpAST ArithmeticTermAST
+ *</b>
+ */
+public class RelationalTermAST extends ASTNode implements IRelationalTermAST
+{
+    private IRelationalTermAST _RelationalTermAST;
+    private RelationalOpAST _RelationalOpAST;
+    private IArithmeticTermAST _ArithmeticTermAST;
+
+    public IRelationalTermAST getRelationalTermAST() { return _RelationalTermAST; }
+    public RelationalOpAST getRelationalOpAST() { return _RelationalOpAST; }
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+
+    public RelationalTermAST(IToken leftIToken, IToken rightIToken,
+                             IRelationalTermAST _RelationalTermAST,
+                             RelationalOpAST _RelationalOpAST,
+                             IArithmeticTermAST _ArithmeticTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._RelationalTermAST = _RelationalTermAST;
+        ((ASTNode) _RelationalTermAST).setParent(this);
+        this._RelationalOpAST = _RelationalOpAST;
+        ((ASTNode) _RelationalOpAST).setParent(this);
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof RelationalTermAST)) return false;
+        RelationalTermAST other = (RelationalTermAST) o;
+        if (! _RelationalTermAST.equals(other.getRelationalTermAST())) return false;
+        if (! _RelationalOpAST.equals(other.getRelationalOpAST())) return false;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getRelationalTermAST().hashCode());
+        hash = hash * 31 + (getRelationalOpAST().hashCode());
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/RelationshipBodyAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/RelationshipBodyAST.java
new file mode 100644
index 0000000..d2b0f11
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/RelationshipBodyAST.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 60:  RelationshipBodyAST ::= LPAREN PatternVariableRefAST COMMA PatternVariableRefAST RPAREN
+ *</b>
+ */
+public class RelationshipBodyAST extends ASTNode implements IRelationshipBodyAST
+{
+    private PatternVariableRefAST _PatternVariableRefAST;
+    private PatternVariableRefAST _PatternVariableRefAST4;
+
+    public PatternVariableRefAST getPatternVariableRefAST() { return _PatternVariableRefAST; }
+    public PatternVariableRefAST getPatternVariableRefAST4() { return _PatternVariableRefAST4; }
+
+    public RelationshipBodyAST(IToken leftIToken, IToken rightIToken,
+                               PatternVariableRefAST _PatternVariableRefAST,
+                               PatternVariableRefAST _PatternVariableRefAST4)
+    {
+        super(leftIToken, rightIToken);
+
+        this._PatternVariableRefAST = _PatternVariableRefAST;
+        ((ASTNode) _PatternVariableRefAST).setParent(this);
+        this._PatternVariableRefAST4 = _PatternVariableRefAST4;
+        ((ASTNode) _PatternVariableRefAST4).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof RelationshipBodyAST)) return false;
+        RelationshipBodyAST other = (RelationshipBodyAST) o;
+        if (! _PatternVariableRefAST.equals(other.getPatternVariableRefAST())) return false;
+        if (! _PatternVariableRefAST4.equals(other.getPatternVariableRefAST4())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getPatternVariableRefAST().hashCode());
+        hash = hash * 31 + (getPatternVariableRefAST4().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ResultArgumentVisitor.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ResultArgumentVisitor.java
new file mode 100644
index 0000000..385fa6a
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ResultArgumentVisitor.java
@@ -0,0 +1,215 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+public interface ResultArgumentVisitor
+{
+    Object visit(ASTNodeToken n, Object o);
+    Object visit(VTCLFile n, Object o);
+    Object visit(NamespaceDefAST n, Object o);
+    Object visit(NamespaceImportsAST n, Object o);
+    Object visit(GTASMDefAST n, Object o);
+    Object visit(MachineContentsAST n, Object o);
+    Object visit(MachineContentAST n, Object o);
+    Object visit(GraphPatternDefAST n, Object o);
+    Object visit(OptShareableDefAST n, Object o);
+    Object visit(PatternBodiesAST n, Object o);
+    Object visit(PatternBodyAST n, Object o);
+    Object visit(PatternBodyContentsAST n, Object o);
+    Object visit(PatternBodyContentAST n, Object o);
+    Object visit(NegativePatternAST n, Object o);
+    Object visit(PatternCompositionAST n, Object o);
+    Object visit(PatternVariableAssignmentAST n, Object o);
+    Object visit(NonInjectivityConstraintAST n, Object o);
+    Object visit(CheckConditionAST n, Object o);
+    Object visit(OptMatchCountAST n, Object o);
+    Object visit(PatternVariableDefAST n, Object o);
+    Object visit(PatternVariableRefAST n, Object o);
+    Object visit(CounterVariableAST n, Object o);
+    Object visit(GraphPatternCallAST n, Object o);
+    Object visit(EntityAST n, Object o);
+    Object visit(EntityBody n, Object o);
+    Object visit(RelationAST n, Object o);
+    Object visit(RelationBodyAST n, Object o);
+    Object visit(RelationshipBodyAST n, Object o);
+    Object visit(GTRuleDefAST n, Object o);
+    Object visit(ActionOptAST n, Object o);
+    Object visit(GTRuleCallAST n, Object o);
+    Object visit(LogicalAndTermAST n, Object o);
+    Object visit(RelationalTermAST n, Object o);
+    Object visit(RelationalOpAST n, Object o);
+    Object visit(BaseArithmeticTermAST n, Object o);
+    Object visit(AsmFunctionDefAST n, Object o);
+    Object visit(ArityAST n, Object o);
+    Object visit(InitialValuesAST n, Object o);
+    Object visit(InitialValueAST n, Object o);
+    Object visit(AsmFunctionLocationAST n, Object o);
+    Object visit(BuiltInFunctionNameAST n, Object o);
+    Object visit(ConversionFunctionNameAST n, Object o);
+    Object visit(AsmRuleDefAST n, Object o);
+    Object visit(AsmRulesAST n, Object o);
+    Object visit(AsmRulesOptAST n, Object o);
+    Object visit(AsmRuleAST n, Object o);
+    Object visit(SkipRuleAST n, Object o);
+    Object visit(FailRuleAST n, Object o);
+    Object visit(CallRuleAST n, Object o);
+    Object visit(AsmFunctionUpdateLocationAST n, Object o);
+    Object visit(LogRuleAST n, Object o);
+    Object visit(LogLevelAST n, Object o);
+    Object visit(SequentialRuleAST n, Object o);
+    Object visit(ParallelRuleAST n, Object o);
+    Object visit(RandomRuleAST n, Object o);
+    Object visit(OptSemicolonAST n, Object o);
+    Object visit(LetRuleAST n, Object o);
+    Object visit(VariableDefinitionsAST n, Object o);
+    Object visit(VariableDefinitionAST n, Object o);
+    Object visit(IterateRuleAST n, Object o);
+    Object visit(ChooseRuleAST n, Object o);
+    Object visit(ForallRuleAST n, Object o);
+    Object visit(WhenRuleAST n, Object o);
+    Object visit(WhenConditionAST n, Object o);
+    Object visit(CreateEntityBodyAST n, Object o);
+    Object visit(CreateRelationBodyAST n, Object o);
+    Object visit(InConstraintOptAST n, Object o);
+    Object visit(DeleteContentsAST n, Object o);
+    Object visit(DeleteSemanticsOptAST n, Object o);
+    Object visit(CopyRuleAST n, Object o);
+    Object visit(CopyContentsAST n, Object o);
+    Object visit(MoveRuleAST n, Object o);
+    Object visit(TwoParametersAST n, Object o);
+    Object visit(ElementUpdateRuleAST n, Object o);
+    Object visit(ElementUpdateOpAST n, Object o);
+    Object visit(QualifiedTypeNameAST n, Object o);
+    Object visit(VariableRefAST n, Object o);
+    Object visit(VariableDefRefAST n, Object o);
+    Object visit(VariableDefAST n, Object o);
+    Object visit(ValueQualifiedNameAST n, Object o);
+    Object visit(ActualParamsAST n, Object o);
+    Object visit(ActualParamsPatternVariablesAST n, Object o);
+    Object visit(TypeOptAST n, Object o);
+    Object visit(ReturnTypeOptAST n, Object o);
+    Object visit(UndefValueAST n, Object o);
+    Object visit(StringConstantAST n, Object o);
+    Object visit(KeywordAsIdentifier n, Object o);
+    Object visit(AnnotationsAST n, Object o);
+    Object visit(AnnotationAST n, Object o);
+    Object visit(AnnotationBodyAST n, Object o);
+    Object visit(KeyValuePairAST n, Object o);
+    Object visit(AnnotationNameAST n, Object o);
+    Object visit(NamespaceImportAST0 n, Object o);
+    Object visit(NamespaceImportAST1 n, Object o);
+    Object visit(PatternBodyContentDefAST0 n, Object o);
+    Object visit(PatternBodyContentDefAST1 n, Object o);
+    Object visit(PatternVariableDefRefAST0 n, Object o);
+    Object visit(PatternVariableDefRefAST1 n, Object o);
+    Object visit(InheritanceAST0 n, Object o);
+    Object visit(InheritanceAST1 n, Object o);
+    Object visit(InstantiationAST0 n, Object o);
+    Object visit(InstantiationAST1 n, Object o);
+    Object visit(GTRuleBodyAST0 n, Object o);
+    Object visit(GTRuleBodyAST1 n, Object o);
+    Object visit(PreconditionDefAST0 n, Object o);
+    Object visit(PreconditionDefAST1 n, Object o);
+    Object visit(PostconditionOptAST0 n, Object o);
+    Object visit(PostconditionOptAST1 n, Object o);
+    Object visit(LogicalTermAST0 n, Object o);
+    Object visit(LogicalTermAST1 n, Object o);
+    Object visit(EqualityTermAST0 n, Object o);
+    Object visit(EqualityTermAST1 n, Object o);
+    Object visit(ArithmeticTermAST0 n, Object o);
+    Object visit(ArithmeticTermAST1 n, Object o);
+    Object visit(MultArithmeticTermAST0 n, Object o);
+    Object visit(MultArithmeticTermAST1 n, Object o);
+    Object visit(MultArithmeticTermAST2 n, Object o);
+    Object visit(UnaryArithmeticTermAST0 n, Object o);
+    Object visit(UnaryArithmeticTermAST1 n, Object o);
+    Object visit(ArityOrTypeDeclAST0 n, Object o);
+    Object visit(ArityOrTypeDeclAST1 n, Object o);
+    Object visit(InitialValuesOptAST0 n, Object o);
+    Object visit(InitialValuesOptAST1 n, Object o);
+    Object visit(TypeConstantsAST0 n, Object o);
+    Object visit(TypeConstantsAST1 n, Object o);
+    Object visit(PredefinedFunctionCallAST0 n, Object o);
+    Object visit(PredefinedFunctionCallAST1 n, Object o);
+    Object visit(UpdateRuleAST0 n, Object o);
+    Object visit(UpdateRuleAST1 n, Object o);
+    Object visit(PrintRuleAST0 n, Object o);
+    Object visit(PrintRuleAST1 n, Object o);
+    Object visit(PrintRuleAST2 n, Object o);
+    Object visit(PrintRuleAST3 n, Object o);
+    Object visit(DoActionOptAST0 n, Object o);
+    Object visit(DoActionOptAST1 n, Object o);
+    Object visit(IfRuleAST0 n, Object o);
+    Object visit(IfRuleAST1 n, Object o);
+    Object visit(TryRuleAST0 n, Object o);
+    Object visit(TryRuleAST1 n, Object o);
+    Object visit(WhenChangeAST0 n, Object o);
+    Object visit(WhenChangeAST1 n, Object o);
+    Object visit(WhenChangeAST2 n, Object o);
+    Object visit(CreateRuleAST0 n, Object o);
+    Object visit(CreateRuleAST1 n, Object o);
+    Object visit(CreateModelElementAST0 n, Object o);
+    Object visit(CreateModelElementAST1 n, Object o);
+    Object visit(CreateRelationshipAST0 n, Object o);
+    Object visit(CreateRelationshipAST1 n, Object o);
+    Object visit(CreateRelationshipAST2 n, Object o);
+    Object visit(CreateRelationshipAST3 n, Object o);
+    Object visit(DeleteRuleAST0 n, Object o);
+    Object visit(DeleteRuleAST1 n, Object o);
+    Object visit(DeleteSemanticsAST0 n, Object o);
+    Object visit(DeleteSemanticsAST1 n, Object o);
+    Object visit(DeleteRelationshipAST0 n, Object o);
+    Object visit(DeleteRelationshipAST1 n, Object o);
+    Object visit(DeleteRelationshipAST2 n, Object o);
+    Object visit(DeleteRelationshipAST3 n, Object o);
+    Object visit(CopySemanticsAST0 n, Object o);
+    Object visit(CopySemanticsAST1 n, Object o);
+    Object visit(TypeNameAST0 n, Object o);
+    Object visit(TypeNameAST1 n, Object o);
+    Object visit(TypeNameAST2 n, Object o);
+    Object visit(TypeNameAST3 n, Object o);
+    Object visit(ValueLocalNameAST0 n, Object o);
+    Object visit(ValueLocalNameAST1 n, Object o);
+    Object visit(FormalParameterDefAST0 n, Object o);
+    Object visit(FormalParameterDefAST1 n, Object o);
+    Object visit(FormalParamsAST0 n, Object o);
+    Object visit(FormalParamsAST1 n, Object o);
+    Object visit(DirectedFormalParameterDefAST0 n, Object o);
+    Object visit(DirectedFormalParameterDefAST1 n, Object o);
+    Object visit(DirectedFormalParamsAST0 n, Object o);
+    Object visit(DirectedFormalParamsAST1 n, Object o);
+    Object visit(DirectionKindAST0 n, Object o);
+    Object visit(DirectionKindAST1 n, Object o);
+    Object visit(DirectionKindAST2 n, Object o);
+    Object visit(ActualParameterDefAST0 n, Object o);
+    Object visit(ActualParameterDefAST1 n, Object o);
+    Object visit(ActualPatternParameterDefAST0 n, Object o);
+    Object visit(ActualPatternParameterDefAST1 n, Object o);
+    Object visit(ConstrainedVariablesAST0 n, Object o);
+    Object visit(ConstrainedVariablesAST1 n, Object o);
+    Object visit(ContainmentConstraintOptAST0 n, Object o);
+    Object visit(ContainmentConstraintOptAST1 n, Object o);
+    Object visit(BooleanConstantAST0 n, Object o);
+    Object visit(BooleanConstantAST1 n, Object o);
+    Object visit(MultiplicityConstantAST0 n, Object o);
+    Object visit(MultiplicityConstantAST1 n, Object o);
+    Object visit(MultiplicityConstantAST2 n, Object o);
+    Object visit(MultiplicityConstantAST3 n, Object o);
+    Object visit(NumericConstantAST0 n, Object o);
+    Object visit(NumericConstantAST1 n, Object o);
+    Object visit(NumericConstantAST2 n, Object o);
+    Object visit(NumericConstantAST3 n, Object o);
+}
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ResultVisitor.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ResultVisitor.java
new file mode 100644
index 0000000..75ca6c7
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ResultVisitor.java
@@ -0,0 +1,215 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+public interface ResultVisitor
+{
+    Object visit(ASTNodeToken n);
+    Object visit(VTCLFile n);
+    Object visit(NamespaceDefAST n);
+    Object visit(NamespaceImportsAST n);
+    Object visit(GTASMDefAST n);
+    Object visit(MachineContentsAST n);
+    Object visit(MachineContentAST n);
+    Object visit(GraphPatternDefAST n);
+    Object visit(OptShareableDefAST n);
+    Object visit(PatternBodiesAST n);
+    Object visit(PatternBodyAST n);
+    Object visit(PatternBodyContentsAST n);
+    Object visit(PatternBodyContentAST n);
+    Object visit(NegativePatternAST n);
+    Object visit(PatternCompositionAST n);
+    Object visit(PatternVariableAssignmentAST n);
+    Object visit(NonInjectivityConstraintAST n);
+    Object visit(CheckConditionAST n);
+    Object visit(OptMatchCountAST n);
+    Object visit(PatternVariableDefAST n);
+    Object visit(PatternVariableRefAST n);
+    Object visit(CounterVariableAST n);
+    Object visit(GraphPatternCallAST n);
+    Object visit(EntityAST n);
+    Object visit(EntityBody n);
+    Object visit(RelationAST n);
+    Object visit(RelationBodyAST n);
+    Object visit(RelationshipBodyAST n);
+    Object visit(GTRuleDefAST n);
+    Object visit(ActionOptAST n);
+    Object visit(GTRuleCallAST n);
+    Object visit(LogicalAndTermAST n);
+    Object visit(RelationalTermAST n);
+    Object visit(RelationalOpAST n);
+    Object visit(BaseArithmeticTermAST n);
+    Object visit(AsmFunctionDefAST n);
+    Object visit(ArityAST n);
+    Object visit(InitialValuesAST n);
+    Object visit(InitialValueAST n);
+    Object visit(AsmFunctionLocationAST n);
+    Object visit(BuiltInFunctionNameAST n);
+    Object visit(ConversionFunctionNameAST n);
+    Object visit(AsmRuleDefAST n);
+    Object visit(AsmRulesAST n);
+    Object visit(AsmRulesOptAST n);
+    Object visit(AsmRuleAST n);
+    Object visit(SkipRuleAST n);
+    Object visit(FailRuleAST n);
+    Object visit(CallRuleAST n);
+    Object visit(AsmFunctionUpdateLocationAST n);
+    Object visit(LogRuleAST n);
+    Object visit(LogLevelAST n);
+    Object visit(SequentialRuleAST n);
+    Object visit(ParallelRuleAST n);
+    Object visit(RandomRuleAST n);
+    Object visit(OptSemicolonAST n);
+    Object visit(LetRuleAST n);
+    Object visit(VariableDefinitionsAST n);
+    Object visit(VariableDefinitionAST n);
+    Object visit(IterateRuleAST n);
+    Object visit(ChooseRuleAST n);
+    Object visit(ForallRuleAST n);
+    Object visit(WhenRuleAST n);
+    Object visit(WhenConditionAST n);
+    Object visit(CreateEntityBodyAST n);
+    Object visit(CreateRelationBodyAST n);
+    Object visit(InConstraintOptAST n);
+    Object visit(DeleteContentsAST n);
+    Object visit(DeleteSemanticsOptAST n);
+    Object visit(CopyRuleAST n);
+    Object visit(CopyContentsAST n);
+    Object visit(MoveRuleAST n);
+    Object visit(TwoParametersAST n);
+    Object visit(ElementUpdateRuleAST n);
+    Object visit(ElementUpdateOpAST n);
+    Object visit(QualifiedTypeNameAST n);
+    Object visit(VariableRefAST n);
+    Object visit(VariableDefRefAST n);
+    Object visit(VariableDefAST n);
+    Object visit(ValueQualifiedNameAST n);
+    Object visit(ActualParamsAST n);
+    Object visit(ActualParamsPatternVariablesAST n);
+    Object visit(TypeOptAST n);
+    Object visit(ReturnTypeOptAST n);
+    Object visit(UndefValueAST n);
+    Object visit(StringConstantAST n);
+    Object visit(KeywordAsIdentifier n);
+    Object visit(AnnotationsAST n);
+    Object visit(AnnotationAST n);
+    Object visit(AnnotationBodyAST n);
+    Object visit(KeyValuePairAST n);
+    Object visit(AnnotationNameAST n);
+    Object visit(NamespaceImportAST0 n);
+    Object visit(NamespaceImportAST1 n);
+    Object visit(PatternBodyContentDefAST0 n);
+    Object visit(PatternBodyContentDefAST1 n);
+    Object visit(PatternVariableDefRefAST0 n);
+    Object visit(PatternVariableDefRefAST1 n);
+    Object visit(InheritanceAST0 n);
+    Object visit(InheritanceAST1 n);
+    Object visit(InstantiationAST0 n);
+    Object visit(InstantiationAST1 n);
+    Object visit(GTRuleBodyAST0 n);
+    Object visit(GTRuleBodyAST1 n);
+    Object visit(PreconditionDefAST0 n);
+    Object visit(PreconditionDefAST1 n);
+    Object visit(PostconditionOptAST0 n);
+    Object visit(PostconditionOptAST1 n);
+    Object visit(LogicalTermAST0 n);
+    Object visit(LogicalTermAST1 n);
+    Object visit(EqualityTermAST0 n);
+    Object visit(EqualityTermAST1 n);
+    Object visit(ArithmeticTermAST0 n);
+    Object visit(ArithmeticTermAST1 n);
+    Object visit(MultArithmeticTermAST0 n);
+    Object visit(MultArithmeticTermAST1 n);
+    Object visit(MultArithmeticTermAST2 n);
+    Object visit(UnaryArithmeticTermAST0 n);
+    Object visit(UnaryArithmeticTermAST1 n);
+    Object visit(ArityOrTypeDeclAST0 n);
+    Object visit(ArityOrTypeDeclAST1 n);
+    Object visit(InitialValuesOptAST0 n);
+    Object visit(InitialValuesOptAST1 n);
+    Object visit(TypeConstantsAST0 n);
+    Object visit(TypeConstantsAST1 n);
+    Object visit(PredefinedFunctionCallAST0 n);
+    Object visit(PredefinedFunctionCallAST1 n);
+    Object visit(UpdateRuleAST0 n);
+    Object visit(UpdateRuleAST1 n);
+    Object visit(PrintRuleAST0 n);
+    Object visit(PrintRuleAST1 n);
+    Object visit(PrintRuleAST2 n);
+    Object visit(PrintRuleAST3 n);
+    Object visit(DoActionOptAST0 n);
+    Object visit(DoActionOptAST1 n);
+    Object visit(IfRuleAST0 n);
+    Object visit(IfRuleAST1 n);
+    Object visit(TryRuleAST0 n);
+    Object visit(TryRuleAST1 n);
+    Object visit(WhenChangeAST0 n);
+    Object visit(WhenChangeAST1 n);
+    Object visit(WhenChangeAST2 n);
+    Object visit(CreateRuleAST0 n);
+    Object visit(CreateRuleAST1 n);
+    Object visit(CreateModelElementAST0 n);
+    Object visit(CreateModelElementAST1 n);
+    Object visit(CreateRelationshipAST0 n);
+    Object visit(CreateRelationshipAST1 n);
+    Object visit(CreateRelationshipAST2 n);
+    Object visit(CreateRelationshipAST3 n);
+    Object visit(DeleteRuleAST0 n);
+    Object visit(DeleteRuleAST1 n);
+    Object visit(DeleteSemanticsAST0 n);
+    Object visit(DeleteSemanticsAST1 n);
+    Object visit(DeleteRelationshipAST0 n);
+    Object visit(DeleteRelationshipAST1 n);
+    Object visit(DeleteRelationshipAST2 n);
+    Object visit(DeleteRelationshipAST3 n);
+    Object visit(CopySemanticsAST0 n);
+    Object visit(CopySemanticsAST1 n);
+    Object visit(TypeNameAST0 n);
+    Object visit(TypeNameAST1 n);
+    Object visit(TypeNameAST2 n);
+    Object visit(TypeNameAST3 n);
+    Object visit(ValueLocalNameAST0 n);
+    Object visit(ValueLocalNameAST1 n);
+    Object visit(FormalParameterDefAST0 n);
+    Object visit(FormalParameterDefAST1 n);
+    Object visit(FormalParamsAST0 n);
+    Object visit(FormalParamsAST1 n);
+    Object visit(DirectedFormalParameterDefAST0 n);
+    Object visit(DirectedFormalParameterDefAST1 n);
+    Object visit(DirectedFormalParamsAST0 n);
+    Object visit(DirectedFormalParamsAST1 n);
+    Object visit(DirectionKindAST0 n);
+    Object visit(DirectionKindAST1 n);
+    Object visit(DirectionKindAST2 n);
+    Object visit(ActualParameterDefAST0 n);
+    Object visit(ActualParameterDefAST1 n);
+    Object visit(ActualPatternParameterDefAST0 n);
+    Object visit(ActualPatternParameterDefAST1 n);
+    Object visit(ConstrainedVariablesAST0 n);
+    Object visit(ConstrainedVariablesAST1 n);
+    Object visit(ContainmentConstraintOptAST0 n);
+    Object visit(ContainmentConstraintOptAST1 n);
+    Object visit(BooleanConstantAST0 n);
+    Object visit(BooleanConstantAST1 n);
+    Object visit(MultiplicityConstantAST0 n);
+    Object visit(MultiplicityConstantAST1 n);
+    Object visit(MultiplicityConstantAST2 n);
+    Object visit(MultiplicityConstantAST3 n);
+    Object visit(NumericConstantAST0 n);
+    Object visit(NumericConstantAST1 n);
+    Object visit(NumericConstantAST2 n);
+    Object visit(NumericConstantAST3 n);
+}
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ReturnTypeOptAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ReturnTypeOptAST.java
new file mode 100644
index 0000000..40cf6bb
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ReturnTypeOptAST.java
@@ -0,0 +1,73 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 282:  ReturnTypeOptAST ::= $Empty
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 283:  ReturnTypeOptAST ::= COLON QualifiedTypeNameAST
+ *</b>
+ */
+public class ReturnTypeOptAST extends ASTNode implements IReturnTypeOptAST
+{
+    private IQualifiedTypeNameAST _QualifiedTypeNameAST;
+
+    public IQualifiedTypeNameAST getQualifiedTypeNameAST() { return _QualifiedTypeNameAST; }
+
+    public ReturnTypeOptAST(IToken leftIToken, IToken rightIToken,
+                            IQualifiedTypeNameAST _QualifiedTypeNameAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._QualifiedTypeNameAST = _QualifiedTypeNameAST;
+        ((ASTNode) _QualifiedTypeNameAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ReturnTypeOptAST)) return false;
+        ReturnTypeOptAST other = (ReturnTypeOptAST) o;
+        if (! _QualifiedTypeNameAST.equals(other.getQualifiedTypeNameAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getQualifiedTypeNameAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/SequentialRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/SequentialRuleAST.java
new file mode 100644
index 0000000..15280d1
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/SequentialRuleAST.java
@@ -0,0 +1,80 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 171:  SequentialRuleAST ::= seq LBRACE AsmRulesAST RBRACE OptSemicolonAST
+ *</b>
+ */
+public class SequentialRuleAST extends ASTNode implements ISequentialRuleAST
+{
+    private AsmRulesAST _AsmRulesAST;
+    private OptSemicolonAST _OptSemicolonAST;
+
+    public AsmRulesAST getAsmRulesAST() { return _AsmRulesAST; }
+    /**
+     * The value returned by <b>getOptSemicolonAST</b> may be <b>null</b>
+     */
+    public OptSemicolonAST getOptSemicolonAST() { return _OptSemicolonAST; }
+
+    public SequentialRuleAST(IToken leftIToken, IToken rightIToken,
+                             AsmRulesAST _AsmRulesAST,
+                             OptSemicolonAST _OptSemicolonAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._AsmRulesAST = _AsmRulesAST;
+        ((ASTNode) _AsmRulesAST).setParent(this);
+        this._OptSemicolonAST = _OptSemicolonAST;
+        if (_OptSemicolonAST != null) ((ASTNode) _OptSemicolonAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof SequentialRuleAST)) return false;
+        SequentialRuleAST other = (SequentialRuleAST) o;
+        if (! _AsmRulesAST.equals(other.getAsmRulesAST())) return false;
+        if (_OptSemicolonAST == null && other.getOptSemicolonAST() != null) return false;
+        else if (! _OptSemicolonAST.equals(other.getOptSemicolonAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getAsmRulesAST().hashCode());
+        hash = hash * 31 + (getOptSemicolonAST() == null ? 0 : getOptSemicolonAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/SkipRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/SkipRuleAST.java
new file mode 100644
index 0000000..dbe316d
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/SkipRuleAST.java
@@ -0,0 +1,59 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 147:  SkipRuleAST ::= skip SEMICOLON
+ *</b>
+ */
+public class SkipRuleAST extends ASTNode implements ISkipRuleAST
+{
+    public SkipRuleAST(IToken leftIToken, IToken rightIToken)
+    {
+        super(leftIToken, rightIToken);
+
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof SkipRuleAST)) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/StringConstantAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/StringConstantAST.java
new file mode 100644
index 0000000..538d053
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/StringConstantAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 297:  StringConstantAST ::= StringLiteral
+ *</b>
+ */
+public class StringConstantAST extends ASTNodeToken implements IStringConstantAST
+{
+    public StringConstantAST(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TryRuleAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TryRuleAST0.java
new file mode 100644
index 0000000..87fc3da
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TryRuleAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 189:  TryRuleAST ::= try AsmRuleAST
+ *</b>
+ */
+public class TryRuleAST0 extends ASTNode implements ITryRuleAST
+{
+    private IAsmRuleAST _AsmRuleAST;
+
+    public IAsmRuleAST getAsmRuleAST() { return _AsmRuleAST; }
+
+    public TryRuleAST0(IToken leftIToken, IToken rightIToken,
+                       IAsmRuleAST _AsmRuleAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._AsmRuleAST = _AsmRuleAST;
+        ((ASTNode) _AsmRuleAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof TryRuleAST0)) return false;
+        TryRuleAST0 other = (TryRuleAST0) o;
+        if (! _AsmRuleAST.equals(other.getAsmRuleAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getAsmRuleAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TryRuleAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TryRuleAST1.java
new file mode 100644
index 0000000..d8329f2
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TryRuleAST1.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 190:  TryRuleAST ::= try AsmRuleAST else AsmRuleAST
+ *</b>
+ */
+public class TryRuleAST1 extends ASTNode implements ITryRuleAST
+{
+    private IAsmRuleAST _AsmRuleAST;
+    private IAsmRuleAST _AsmRuleAST4;
+
+    public IAsmRuleAST getAsmRuleAST() { return _AsmRuleAST; }
+    public IAsmRuleAST getAsmRuleAST4() { return _AsmRuleAST4; }
+
+    public TryRuleAST1(IToken leftIToken, IToken rightIToken,
+                       IAsmRuleAST _AsmRuleAST,
+                       IAsmRuleAST _AsmRuleAST4)
+    {
+        super(leftIToken, rightIToken);
+
+        this._AsmRuleAST = _AsmRuleAST;
+        ((ASTNode) _AsmRuleAST).setParent(this);
+        this._AsmRuleAST4 = _AsmRuleAST4;
+        ((ASTNode) _AsmRuleAST4).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof TryRuleAST1)) return false;
+        TryRuleAST1 other = (TryRuleAST1) o;
+        if (! _AsmRuleAST.equals(other.getAsmRuleAST())) return false;
+        if (! _AsmRuleAST4.equals(other.getAsmRuleAST4())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getAsmRuleAST().hashCode());
+        hash = hash * 31 + (getAsmRuleAST4().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TwoParametersAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TwoParametersAST.java
new file mode 100644
index 0000000..4d8682c
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TwoParametersAST.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 230:  TwoParametersAST ::= LPAREN ArithmeticTermAST COMMA ArithmeticTermAST RPAREN
+ *</b>
+ */
+public class TwoParametersAST extends ASTNode implements ITwoParametersAST
+{
+    private IArithmeticTermAST _ArithmeticTermAST;
+    private IArithmeticTermAST _ArithmeticTermAST4;
+
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+    public IArithmeticTermAST getArithmeticTermAST4() { return _ArithmeticTermAST4; }
+
+    public TwoParametersAST(IToken leftIToken, IToken rightIToken,
+                            IArithmeticTermAST _ArithmeticTermAST,
+                            IArithmeticTermAST _ArithmeticTermAST4)
+    {
+        super(leftIToken, rightIToken);
+
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        this._ArithmeticTermAST4 = _ArithmeticTermAST4;
+        ((ASTNode) _ArithmeticTermAST4).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof TwoParametersAST)) return false;
+        TwoParametersAST other = (TwoParametersAST) o;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        if (! _ArithmeticTermAST4.equals(other.getArithmeticTermAST4())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        hash = hash * 31 + (getArithmeticTermAST4().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeConstantsAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeConstantsAST0.java
new file mode 100644
index 0000000..30d60c8
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeConstantsAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 111:  TypeConstantsAST ::= QualifiedTypeNameAST RPAREN
+ *</b>
+ */
+public class TypeConstantsAST0 extends ASTNode implements ITypeConstantsAST
+{
+    private IQualifiedTypeNameAST _QualifiedTypeNameAST;
+
+    public IQualifiedTypeNameAST getQualifiedTypeNameAST() { return _QualifiedTypeNameAST; }
+
+    public TypeConstantsAST0(IToken leftIToken, IToken rightIToken,
+                             IQualifiedTypeNameAST _QualifiedTypeNameAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._QualifiedTypeNameAST = _QualifiedTypeNameAST;
+        ((ASTNode) _QualifiedTypeNameAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof TypeConstantsAST0)) return false;
+        TypeConstantsAST0 other = (TypeConstantsAST0) o;
+        if (! _QualifiedTypeNameAST.equals(other.getQualifiedTypeNameAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getQualifiedTypeNameAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeConstantsAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeConstantsAST1.java
new file mode 100644
index 0000000..73f328e
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeConstantsAST1.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 112:  TypeConstantsAST ::= QualifiedTypeNameAST COMMA TypeConstantsAST
+ *</b>
+ */
+public class TypeConstantsAST1 extends ASTNode implements ITypeConstantsAST
+{
+    private IQualifiedTypeNameAST _QualifiedTypeNameAST;
+    private ITypeConstantsAST _TypeConstantsAST;
+
+    public IQualifiedTypeNameAST getQualifiedTypeNameAST() { return _QualifiedTypeNameAST; }
+    public ITypeConstantsAST getTypeConstantsAST() { return _TypeConstantsAST; }
+
+    public TypeConstantsAST1(IToken leftIToken, IToken rightIToken,
+                             IQualifiedTypeNameAST _QualifiedTypeNameAST,
+                             ITypeConstantsAST _TypeConstantsAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._QualifiedTypeNameAST = _QualifiedTypeNameAST;
+        ((ASTNode) _QualifiedTypeNameAST).setParent(this);
+        this._TypeConstantsAST = _TypeConstantsAST;
+        ((ASTNode) _TypeConstantsAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof TypeConstantsAST1)) return false;
+        TypeConstantsAST1 other = (TypeConstantsAST1) o;
+        if (! _QualifiedTypeNameAST.equals(other.getQualifiedTypeNameAST())) return false;
+        if (! _TypeConstantsAST.equals(other.getTypeConstantsAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getQualifiedTypeNameAST().hashCode());
+        hash = hash * 31 + (getTypeConstantsAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeNameAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeNameAST0.java
new file mode 100644
index 0000000..ec508d9
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeNameAST0.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 241:  TypeNameAST ::= NameLiteral
+ *</b>
+ */
+public class TypeNameAST0 extends ASTNodeToken implements ITypeNameAST
+{
+    public TypeNameAST0(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeNameAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeNameAST1.java
new file mode 100644
index 0000000..937d748
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeNameAST1.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 242:  TypeNameAST ::= IDENTIFIER
+ *</b>
+ */
+public class TypeNameAST1 extends ASTNodeToken implements ITypeNameAST
+{
+    public TypeNameAST1(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeNameAST2.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeNameAST2.java
new file mode 100644
index 0000000..1d29e61
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeNameAST2.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 243:  TypeNameAST ::= UpperCaseLiteral
+ *</b>
+ */
+public class TypeNameAST2 extends ASTNodeToken implements ITypeNameAST
+{
+    public TypeNameAST2(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeNameAST3.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeNameAST3.java
new file mode 100644
index 0000000..4fbe2af
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeNameAST3.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 245:  TypeNameAST ::= StringLiteral
+ *</b>
+ */
+public class TypeNameAST3 extends ASTNodeToken implements ITypeNameAST
+{
+    public TypeNameAST3(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeOptAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeOptAST.java
new file mode 100644
index 0000000..50ff194
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/TypeOptAST.java
@@ -0,0 +1,73 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 280:  TypeOptAST ::= $Empty
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 281:  TypeOptAST ::= COLON QualifiedTypeNameAST
+ *</b>
+ */
+public class TypeOptAST extends ASTNode implements ITypeOptAST
+{
+    private IQualifiedTypeNameAST _QualifiedTypeNameAST;
+
+    public IQualifiedTypeNameAST getQualifiedTypeNameAST() { return _QualifiedTypeNameAST; }
+
+    public TypeOptAST(IToken leftIToken, IToken rightIToken,
+                      IQualifiedTypeNameAST _QualifiedTypeNameAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._QualifiedTypeNameAST = _QualifiedTypeNameAST;
+        ((ASTNode) _QualifiedTypeNameAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof TypeOptAST)) return false;
+        TypeOptAST other = (TypeOptAST) o;
+        if (! _QualifiedTypeNameAST.equals(other.getQualifiedTypeNameAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getQualifiedTypeNameAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/UnaryArithmeticTermAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/UnaryArithmeticTermAST0.java
new file mode 100644
index 0000000..40517fc
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/UnaryArithmeticTermAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 94:  UnaryArithmeticTermAST ::= MINUS BaseArithmeticTermAST
+ *</b>
+ */
+public class UnaryArithmeticTermAST0 extends ASTNode implements IUnaryArithmeticTermAST
+{
+    private IBaseArithmeticTermAST _BaseArithmeticTermAST;
+
+    public IBaseArithmeticTermAST getBaseArithmeticTermAST() { return _BaseArithmeticTermAST; }
+
+    public UnaryArithmeticTermAST0(IToken leftIToken, IToken rightIToken,
+                                   IBaseArithmeticTermAST _BaseArithmeticTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._BaseArithmeticTermAST = _BaseArithmeticTermAST;
+        ((ASTNode) _BaseArithmeticTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof UnaryArithmeticTermAST0)) return false;
+        UnaryArithmeticTermAST0 other = (UnaryArithmeticTermAST0) o;
+        if (! _BaseArithmeticTermAST.equals(other.getBaseArithmeticTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getBaseArithmeticTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/UnaryArithmeticTermAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/UnaryArithmeticTermAST1.java
new file mode 100644
index 0000000..ecce171
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/UnaryArithmeticTermAST1.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 95:  UnaryArithmeticTermAST ::= NOT BaseArithmeticTermAST
+ *</b>
+ */
+public class UnaryArithmeticTermAST1 extends ASTNode implements IUnaryArithmeticTermAST
+{
+    private IBaseArithmeticTermAST _BaseArithmeticTermAST;
+
+    public IBaseArithmeticTermAST getBaseArithmeticTermAST() { return _BaseArithmeticTermAST; }
+
+    public UnaryArithmeticTermAST1(IToken leftIToken, IToken rightIToken,
+                                   IBaseArithmeticTermAST _BaseArithmeticTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._BaseArithmeticTermAST = _BaseArithmeticTermAST;
+        ((ASTNode) _BaseArithmeticTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof UnaryArithmeticTermAST1)) return false;
+        UnaryArithmeticTermAST1 other = (UnaryArithmeticTermAST1) o;
+        if (! _BaseArithmeticTermAST.equals(other.getBaseArithmeticTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getBaseArithmeticTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/UndefValueAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/UndefValueAST.java
new file mode 100644
index 0000000..9846f95
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/UndefValueAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 290:  UndefValueAST ::= undef
+ *</b>
+ */
+public class UndefValueAST extends ASTNodeToken implements IUndefValueAST
+{
+    public UndefValueAST(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/UpdateRuleAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/UpdateRuleAST0.java
new file mode 100644
index 0000000..5523627
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/UpdateRuleAST0.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 150:  UpdateRuleAST ::= update VariableRefAST EQUAL ArithmeticTermAST SEMICOLON
+ *</b>
+ */
+public class UpdateRuleAST0 extends ASTNode implements IUpdateRuleAST
+{
+    private VariableRefAST _VariableRefAST;
+    private IArithmeticTermAST _ArithmeticTermAST;
+
+    public VariableRefAST getVariableRefAST() { return _VariableRefAST; }
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+
+    public UpdateRuleAST0(IToken leftIToken, IToken rightIToken,
+                          VariableRefAST _VariableRefAST,
+                          IArithmeticTermAST _ArithmeticTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._VariableRefAST = _VariableRefAST;
+        ((ASTNode) _VariableRefAST).setParent(this);
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof UpdateRuleAST0)) return false;
+        UpdateRuleAST0 other = (UpdateRuleAST0) o;
+        if (! _VariableRefAST.equals(other.getVariableRefAST())) return false;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getVariableRefAST().hashCode());
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/UpdateRuleAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/UpdateRuleAST1.java
new file mode 100644
index 0000000..4ac7b8a
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/UpdateRuleAST1.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 151:  UpdateRuleAST ::= update AsmFunctionUpdateLocationAST EQUAL ArithmeticTermAST SEMICOLON
+ *</b>
+ */
+public class UpdateRuleAST1 extends ASTNode implements IUpdateRuleAST
+{
+    private AsmFunctionUpdateLocationAST _AsmFunctionUpdateLocationAST;
+    private IArithmeticTermAST _ArithmeticTermAST;
+
+    public AsmFunctionUpdateLocationAST getAsmFunctionUpdateLocationAST() { return _AsmFunctionUpdateLocationAST; }
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+
+    public UpdateRuleAST1(IToken leftIToken, IToken rightIToken,
+                          AsmFunctionUpdateLocationAST _AsmFunctionUpdateLocationAST,
+                          IArithmeticTermAST _ArithmeticTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._AsmFunctionUpdateLocationAST = _AsmFunctionUpdateLocationAST;
+        ((ASTNode) _AsmFunctionUpdateLocationAST).setParent(this);
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof UpdateRuleAST1)) return false;
+        UpdateRuleAST1 other = (UpdateRuleAST1) o;
+        if (! _AsmFunctionUpdateLocationAST.equals(other.getAsmFunctionUpdateLocationAST())) return false;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getAsmFunctionUpdateLocationAST().hashCode());
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/VTCLFile.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/VTCLFile.java
new file mode 100644
index 0000000..0c9ba64
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/VTCLFile.java
@@ -0,0 +1,91 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 1:  VTCLFile ::= NamespaceDefAST NamespaceImportsAST GTASMDefAST
+ *</b>
+ */
+public class VTCLFile extends ASTNode implements IVTCLFile
+{
+    private NamespaceDefAST _NamespaceDefAST;
+    private NamespaceImportsAST _NamespaceImportsAST;
+    private GTASMDefAST _GTASMDefAST;
+
+    /**
+     * The value returned by <b>getNamespaceDefAST</b> may be <b>null</b>
+     */
+    public NamespaceDefAST getNamespaceDefAST() { return _NamespaceDefAST; }
+    /**
+     * The value returned by <b>getNamespaceImportsAST</b> may be <b>null</b>
+     */
+    public NamespaceImportsAST getNamespaceImportsAST() { return _NamespaceImportsAST; }
+    public GTASMDefAST getGTASMDefAST() { return _GTASMDefAST; }
+
+    public VTCLFile(IToken leftIToken, IToken rightIToken,
+                    NamespaceDefAST _NamespaceDefAST,
+                    NamespaceImportsAST _NamespaceImportsAST,
+                    GTASMDefAST _GTASMDefAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._NamespaceDefAST = _NamespaceDefAST;
+        if (_NamespaceDefAST != null) ((ASTNode) _NamespaceDefAST).setParent(this);
+        this._NamespaceImportsAST = _NamespaceImportsAST;
+        if (_NamespaceImportsAST != null) ((ASTNode) _NamespaceImportsAST).setParent(this);
+        this._GTASMDefAST = _GTASMDefAST;
+        ((ASTNode) _GTASMDefAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof VTCLFile)) return false;
+        VTCLFile other = (VTCLFile) o;
+        if (_NamespaceDefAST == null && other.getNamespaceDefAST() != null) return false;
+        else if (! _NamespaceDefAST.equals(other.getNamespaceDefAST())) return false;
+        if (_NamespaceImportsAST == null && other.getNamespaceImportsAST() != null) return false;
+        else if (! _NamespaceImportsAST.equals(other.getNamespaceImportsAST())) return false;
+        if (! _GTASMDefAST.equals(other.getGTASMDefAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getNamespaceDefAST() == null ? 0 : getNamespaceDefAST().hashCode());
+        hash = hash * 31 + (getNamespaceImportsAST() == null ? 0 : getNamespaceImportsAST().hashCode());
+        hash = hash * 31 + (getGTASMDefAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ValueLocalNameAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ValueLocalNameAST0.java
new file mode 100644
index 0000000..28059c9
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ValueLocalNameAST0.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 251:  ValueLocalNameAST ::= NameLiteral
+ *</b>
+ */
+public class ValueLocalNameAST0 extends ASTNodeToken implements IValueLocalNameAST
+{
+    public ValueLocalNameAST0(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ValueLocalNameAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ValueLocalNameAST1.java
new file mode 100644
index 0000000..bcf3cd9
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ValueLocalNameAST1.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 252:  ValueLocalNameAST ::= IDENTIFIER
+ *</b>
+ */
+public class ValueLocalNameAST1 extends ASTNodeToken implements IValueLocalNameAST
+{
+    public ValueLocalNameAST1(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ValueQualifiedNameAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ValueQualifiedNameAST.java
new file mode 100644
index 0000000..34785c8
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/ValueQualifiedNameAST.java
@@ -0,0 +1,80 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 249:  ValueQualifiedNameAST ::= ValueLocalNameAST
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 250:  ValueQualifiedNameAST ::= QualifiedTypeNameAST DOT TypeNameAST
+ *</b>
+ */
+public class ValueQualifiedNameAST extends ASTNode implements IValueQualifiedNameAST
+{
+    private IQualifiedTypeNameAST _QualifiedTypeNameAST;
+    private ITypeNameAST _TypeNameAST;
+
+    public IQualifiedTypeNameAST getQualifiedTypeNameAST() { return _QualifiedTypeNameAST; }
+    public ITypeNameAST getTypeNameAST() { return _TypeNameAST; }
+
+    public ValueQualifiedNameAST(IToken leftIToken, IToken rightIToken,
+                                 IQualifiedTypeNameAST _QualifiedTypeNameAST,
+                                 ITypeNameAST _TypeNameAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._QualifiedTypeNameAST = _QualifiedTypeNameAST;
+        ((ASTNode) _QualifiedTypeNameAST).setParent(this);
+        this._TypeNameAST = _TypeNameAST;
+        ((ASTNode) _TypeNameAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof ValueQualifiedNameAST)) return false;
+        ValueQualifiedNameAST other = (ValueQualifiedNameAST) o;
+        if (! _QualifiedTypeNameAST.equals(other.getQualifiedTypeNameAST())) return false;
+        if (! _TypeNameAST.equals(other.getTypeNameAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getQualifiedTypeNameAST().hashCode());
+        hash = hash * 31 + (getTypeNameAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/VariableDefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/VariableDefAST.java
new file mode 100644
index 0000000..83f9a42
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/VariableDefAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 248:  VariableDefAST ::= UpperCaseLiteral
+ *</b>
+ */
+public class VariableDefAST extends ASTNodeToken implements IVariableDefAST
+{
+    public VariableDefAST(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/VariableDefRefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/VariableDefRefAST.java
new file mode 100644
index 0000000..e2ee104
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/VariableDefRefAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 247:  VariableDefRefAST ::= UpperCaseLiteral
+ *</b>
+ */
+public class VariableDefRefAST extends ASTNodeToken implements IVariableDefRefAST
+{
+    public VariableDefRefAST(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/VariableDefinitionAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/VariableDefinitionAST.java
new file mode 100644
index 0000000..2dc7548
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/VariableDefinitionAST.java
@@ -0,0 +1,87 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 179:  VariableDefinitionAST ::= VariableDefAST TypeOptAST EQUAL ArithmeticTermAST
+ *</b>
+ */
+public class VariableDefinitionAST extends ASTNode implements IVariableDefinitionAST
+{
+    private VariableDefAST _VariableDefAST;
+    private TypeOptAST _TypeOptAST;
+    private IArithmeticTermAST _ArithmeticTermAST;
+
+    public VariableDefAST getVariableDefAST() { return _VariableDefAST; }
+    /**
+     * The value returned by <b>getTypeOptAST</b> may be <b>null</b>
+     */
+    public TypeOptAST getTypeOptAST() { return _TypeOptAST; }
+    public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
+
+    public VariableDefinitionAST(IToken leftIToken, IToken rightIToken,
+                                 VariableDefAST _VariableDefAST,
+                                 TypeOptAST _TypeOptAST,
+                                 IArithmeticTermAST _ArithmeticTermAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._VariableDefAST = _VariableDefAST;
+        ((ASTNode) _VariableDefAST).setParent(this);
+        this._TypeOptAST = _TypeOptAST;
+        if (_TypeOptAST != null) ((ASTNode) _TypeOptAST).setParent(this);
+        this._ArithmeticTermAST = _ArithmeticTermAST;
+        ((ASTNode) _ArithmeticTermAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof VariableDefinitionAST)) return false;
+        VariableDefinitionAST other = (VariableDefinitionAST) o;
+        if (! _VariableDefAST.equals(other.getVariableDefAST())) return false;
+        if (_TypeOptAST == null && other.getTypeOptAST() != null) return false;
+        else if (! _TypeOptAST.equals(other.getTypeOptAST())) return false;
+        if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getVariableDefAST().hashCode());
+        hash = hash * 31 + (getTypeOptAST() == null ? 0 : getTypeOptAST().hashCode());
+        hash = hash * 31 + (getArithmeticTermAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/VariableDefinitionsAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/VariableDefinitionsAST.java
new file mode 100644
index 0000000..1b20427
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/VariableDefinitionsAST.java
@@ -0,0 +1,80 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 177:  VariableDefinitionsAST ::= VariableDefinitionAST
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 178:  VariableDefinitionsAST ::= VariableDefinitionsAST COMMA VariableDefinitionAST
+ *</b>
+ */
+public class VariableDefinitionsAST extends ASTNode implements IVariableDefinitionsAST
+{
+    private IVariableDefinitionsAST _VariableDefinitionsAST;
+    private VariableDefinitionAST _VariableDefinitionAST;
+
+    public IVariableDefinitionsAST getVariableDefinitionsAST() { return _VariableDefinitionsAST; }
+    public VariableDefinitionAST getVariableDefinitionAST() { return _VariableDefinitionAST; }
+
+    public VariableDefinitionsAST(IToken leftIToken, IToken rightIToken,
+                                  IVariableDefinitionsAST _VariableDefinitionsAST,
+                                  VariableDefinitionAST _VariableDefinitionAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._VariableDefinitionsAST = _VariableDefinitionsAST;
+        ((ASTNode) _VariableDefinitionsAST).setParent(this);
+        this._VariableDefinitionAST = _VariableDefinitionAST;
+        ((ASTNode) _VariableDefinitionAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof VariableDefinitionsAST)) return false;
+        VariableDefinitionsAST other = (VariableDefinitionsAST) o;
+        if (! _VariableDefinitionsAST.equals(other.getVariableDefinitionsAST())) return false;
+        if (! _VariableDefinitionAST.equals(other.getVariableDefinitionAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getVariableDefinitionsAST().hashCode());
+        hash = hash * 31 + (getVariableDefinitionAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/VariableRefAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/VariableRefAST.java
new file mode 100644
index 0000000..f1b4f11
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/VariableRefAST.java
@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 246:  VariableRefAST ::= UpperCaseLiteral
+ *</b>
+ */
+public class VariableRefAST extends ASTNodeToken implements IVariableRefAST
+{
+    public VariableRefAST(IToken token) { super(token); initialize(); }
+
+    public int hashCode()
+    {
+        return toString().hashCode();
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/Visitor.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/Visitor.java
new file mode 100644
index 0000000..900ae1a
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/Visitor.java
@@ -0,0 +1,215 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+public interface Visitor
+{
+    void visit(ASTNodeToken n);
+    void visit(VTCLFile n);
+    void visit(NamespaceDefAST n);
+    void visit(NamespaceImportsAST n);
+    void visit(GTASMDefAST n);
+    void visit(MachineContentsAST n);
+    void visit(MachineContentAST n);
+    void visit(GraphPatternDefAST n);
+    void visit(OptShareableDefAST n);
+    void visit(PatternBodiesAST n);
+    void visit(PatternBodyAST n);
+    void visit(PatternBodyContentsAST n);
+    void visit(PatternBodyContentAST n);
+    void visit(NegativePatternAST n);
+    void visit(PatternCompositionAST n);
+    void visit(PatternVariableAssignmentAST n);
+    void visit(NonInjectivityConstraintAST n);
+    void visit(CheckConditionAST n);
+    void visit(OptMatchCountAST n);
+    void visit(PatternVariableDefAST n);
+    void visit(PatternVariableRefAST n);
+    void visit(CounterVariableAST n);
+    void visit(GraphPatternCallAST n);
+    void visit(EntityAST n);
+    void visit(EntityBody n);
+    void visit(RelationAST n);
+    void visit(RelationBodyAST n);
+    void visit(RelationshipBodyAST n);
+    void visit(GTRuleDefAST n);
+    void visit(ActionOptAST n);
+    void visit(GTRuleCallAST n);
+    void visit(LogicalAndTermAST n);
+    void visit(RelationalTermAST n);
+    void visit(RelationalOpAST n);
+    void visit(BaseArithmeticTermAST n);
+    void visit(AsmFunctionDefAST n);
+    void visit(ArityAST n);
+    void visit(InitialValuesAST n);
+    void visit(InitialValueAST n);
+    void visit(AsmFunctionLocationAST n);
+    void visit(BuiltInFunctionNameAST n);
+    void visit(ConversionFunctionNameAST n);
+    void visit(AsmRuleDefAST n);
+    void visit(AsmRulesAST n);
+    void visit(AsmRulesOptAST n);
+    void visit(AsmRuleAST n);
+    void visit(SkipRuleAST n);
+    void visit(FailRuleAST n);
+    void visit(CallRuleAST n);
+    void visit(AsmFunctionUpdateLocationAST n);
+    void visit(LogRuleAST n);
+    void visit(LogLevelAST n);
+    void visit(SequentialRuleAST n);
+    void visit(ParallelRuleAST n);
+    void visit(RandomRuleAST n);
+    void visit(OptSemicolonAST n);
+    void visit(LetRuleAST n);
+    void visit(VariableDefinitionsAST n);
+    void visit(VariableDefinitionAST n);
+    void visit(IterateRuleAST n);
+    void visit(ChooseRuleAST n);
+    void visit(ForallRuleAST n);
+    void visit(WhenRuleAST n);
+    void visit(WhenConditionAST n);
+    void visit(CreateEntityBodyAST n);
+    void visit(CreateRelationBodyAST n);
+    void visit(InConstraintOptAST n);
+    void visit(DeleteContentsAST n);
+    void visit(DeleteSemanticsOptAST n);
+    void visit(CopyRuleAST n);
+    void visit(CopyContentsAST n);
+    void visit(MoveRuleAST n);
+    void visit(TwoParametersAST n);
+    void visit(ElementUpdateRuleAST n);
+    void visit(ElementUpdateOpAST n);
+    void visit(QualifiedTypeNameAST n);
+    void visit(VariableRefAST n);
+    void visit(VariableDefRefAST n);
+    void visit(VariableDefAST n);
+    void visit(ValueQualifiedNameAST n);
+    void visit(ActualParamsAST n);
+    void visit(ActualParamsPatternVariablesAST n);
+    void visit(TypeOptAST n);
+    void visit(ReturnTypeOptAST n);
+    void visit(UndefValueAST n);
+    void visit(StringConstantAST n);
+    void visit(KeywordAsIdentifier n);
+    void visit(AnnotationsAST n);
+    void visit(AnnotationAST n);
+    void visit(AnnotationBodyAST n);
+    void visit(KeyValuePairAST n);
+    void visit(AnnotationNameAST n);
+    void visit(NamespaceImportAST0 n);
+    void visit(NamespaceImportAST1 n);
+    void visit(PatternBodyContentDefAST0 n);
+    void visit(PatternBodyContentDefAST1 n);
+    void visit(PatternVariableDefRefAST0 n);
+    void visit(PatternVariableDefRefAST1 n);
+    void visit(InheritanceAST0 n);
+    void visit(InheritanceAST1 n);
+    void visit(InstantiationAST0 n);
+    void visit(InstantiationAST1 n);
+    void visit(GTRuleBodyAST0 n);
+    void visit(GTRuleBodyAST1 n);
+    void visit(PreconditionDefAST0 n);
+    void visit(PreconditionDefAST1 n);
+    void visit(PostconditionOptAST0 n);
+    void visit(PostconditionOptAST1 n);
+    void visit(LogicalTermAST0 n);
+    void visit(LogicalTermAST1 n);
+    void visit(EqualityTermAST0 n);
+    void visit(EqualityTermAST1 n);
+    void visit(ArithmeticTermAST0 n);
+    void visit(ArithmeticTermAST1 n);
+    void visit(MultArithmeticTermAST0 n);
+    void visit(MultArithmeticTermAST1 n);
+    void visit(MultArithmeticTermAST2 n);
+    void visit(UnaryArithmeticTermAST0 n);
+    void visit(UnaryArithmeticTermAST1 n);
+    void visit(ArityOrTypeDeclAST0 n);
+    void visit(ArityOrTypeDeclAST1 n);
+    void visit(InitialValuesOptAST0 n);
+    void visit(InitialValuesOptAST1 n);
+    void visit(TypeConstantsAST0 n);
+    void visit(TypeConstantsAST1 n);
+    void visit(PredefinedFunctionCallAST0 n);
+    void visit(PredefinedFunctionCallAST1 n);
+    void visit(UpdateRuleAST0 n);
+    void visit(UpdateRuleAST1 n);
+    void visit(PrintRuleAST0 n);
+    void visit(PrintRuleAST1 n);
+    void visit(PrintRuleAST2 n);
+    void visit(PrintRuleAST3 n);
+    void visit(DoActionOptAST0 n);
+    void visit(DoActionOptAST1 n);
+    void visit(IfRuleAST0 n);
+    void visit(IfRuleAST1 n);
+    void visit(TryRuleAST0 n);
+    void visit(TryRuleAST1 n);
+    void visit(WhenChangeAST0 n);
+    void visit(WhenChangeAST1 n);
+    void visit(WhenChangeAST2 n);
+    void visit(CreateRuleAST0 n);
+    void visit(CreateRuleAST1 n);
+    void visit(CreateModelElementAST0 n);
+    void visit(CreateModelElementAST1 n);
+    void visit(CreateRelationshipAST0 n);
+    void visit(CreateRelationshipAST1 n);
+    void visit(CreateRelationshipAST2 n);
+    void visit(CreateRelationshipAST3 n);
+    void visit(DeleteRuleAST0 n);
+    void visit(DeleteRuleAST1 n);
+    void visit(DeleteSemanticsAST0 n);
+    void visit(DeleteSemanticsAST1 n);
+    void visit(DeleteRelationshipAST0 n);
+    void visit(DeleteRelationshipAST1 n);
+    void visit(DeleteRelationshipAST2 n);
+    void visit(DeleteRelationshipAST3 n);
+    void visit(CopySemanticsAST0 n);
+    void visit(CopySemanticsAST1 n);
+    void visit(TypeNameAST0 n);
+    void visit(TypeNameAST1 n);
+    void visit(TypeNameAST2 n);
+    void visit(TypeNameAST3 n);
+    void visit(ValueLocalNameAST0 n);
+    void visit(ValueLocalNameAST1 n);
+    void visit(FormalParameterDefAST0 n);
+    void visit(FormalParameterDefAST1 n);
+    void visit(FormalParamsAST0 n);
+    void visit(FormalParamsAST1 n);
+    void visit(DirectedFormalParameterDefAST0 n);
+    void visit(DirectedFormalParameterDefAST1 n);
+    void visit(DirectedFormalParamsAST0 n);
+    void visit(DirectedFormalParamsAST1 n);
+    void visit(DirectionKindAST0 n);
+    void visit(DirectionKindAST1 n);
+    void visit(DirectionKindAST2 n);
+    void visit(ActualParameterDefAST0 n);
+    void visit(ActualParameterDefAST1 n);
+    void visit(ActualPatternParameterDefAST0 n);
+    void visit(ActualPatternParameterDefAST1 n);
+    void visit(ConstrainedVariablesAST0 n);
+    void visit(ConstrainedVariablesAST1 n);
+    void visit(ContainmentConstraintOptAST0 n);
+    void visit(ContainmentConstraintOptAST1 n);
+    void visit(BooleanConstantAST0 n);
+    void visit(BooleanConstantAST1 n);
+    void visit(MultiplicityConstantAST0 n);
+    void visit(MultiplicityConstantAST1 n);
+    void visit(MultiplicityConstantAST2 n);
+    void visit(MultiplicityConstantAST3 n);
+    void visit(NumericConstantAST0 n);
+    void visit(NumericConstantAST1 n);
+    void visit(NumericConstantAST2 n);
+    void visit(NumericConstantAST3 n);
+}
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/WhenChangeAST0.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/WhenChangeAST0.java
new file mode 100644
index 0000000..1618637
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/WhenChangeAST0.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 194:  WhenChangeAST ::= new LPAREN VariableRefAST RPAREN
+ *</b>
+ */
+public class WhenChangeAST0 extends ASTNode implements IWhenChangeAST
+{
+    private VariableRefAST _VariableRefAST;
+
+    public VariableRefAST getVariableRefAST() { return _VariableRefAST; }
+
+    public WhenChangeAST0(IToken leftIToken, IToken rightIToken,
+                          VariableRefAST _VariableRefAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._VariableRefAST = _VariableRefAST;
+        ((ASTNode) _VariableRefAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof WhenChangeAST0)) return false;
+        WhenChangeAST0 other = (WhenChangeAST0) o;
+        if (! _VariableRefAST.equals(other.getVariableRefAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getVariableRefAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/WhenChangeAST1.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/WhenChangeAST1.java
new file mode 100644
index 0000000..a0e14c8
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/WhenChangeAST1.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 195:  WhenChangeAST ::= delete LPAREN VariableRefAST RPAREN
+ *</b>
+ */
+public class WhenChangeAST1 extends ASTNode implements IWhenChangeAST
+{
+    private VariableRefAST _VariableRefAST;
+
+    public VariableRefAST getVariableRefAST() { return _VariableRefAST; }
+
+    public WhenChangeAST1(IToken leftIToken, IToken rightIToken,
+                          VariableRefAST _VariableRefAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._VariableRefAST = _VariableRefAST;
+        ((ASTNode) _VariableRefAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof WhenChangeAST1)) return false;
+        WhenChangeAST1 other = (WhenChangeAST1) o;
+        if (! _VariableRefAST.equals(other.getVariableRefAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getVariableRefAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/WhenChangeAST2.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/WhenChangeAST2.java
new file mode 100644
index 0000000..95371b6
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/WhenChangeAST2.java
@@ -0,0 +1,69 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 196:  WhenChangeAST ::= changed LPAREN VariableRefAST RPAREN
+ *</b>
+ */
+public class WhenChangeAST2 extends ASTNode implements IWhenChangeAST
+{
+    private VariableRefAST _VariableRefAST;
+
+    public VariableRefAST getVariableRefAST() { return _VariableRefAST; }
+
+    public WhenChangeAST2(IToken leftIToken, IToken rightIToken,
+                          VariableRefAST _VariableRefAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._VariableRefAST = _VariableRefAST;
+        ((ASTNode) _VariableRefAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof WhenChangeAST2)) return false;
+        WhenChangeAST2 other = (WhenChangeAST2) o;
+        if (! _VariableRefAST.equals(other.getVariableRefAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getVariableRefAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/WhenConditionAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/WhenConditionAST.java
new file mode 100644
index 0000000..1be52ad
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/WhenConditionAST.java
@@ -0,0 +1,80 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<em>
+ *<li>Rule 192:  WhenConditionAST ::= WhenChangeAST
+ *</em>
+ *<p>
+ *<b>
+ *<li>Rule 193:  WhenConditionAST ::= WhenConditionAST COMMA WhenChangeAST
+ *</b>
+ */
+public class WhenConditionAST extends ASTNode implements IWhenConditionAST
+{
+    private IWhenConditionAST _WhenConditionAST;
+    private IWhenChangeAST _WhenChangeAST;
+
+    public IWhenConditionAST getWhenConditionAST() { return _WhenConditionAST; }
+    public IWhenChangeAST getWhenChangeAST() { return _WhenChangeAST; }
+
+    public WhenConditionAST(IToken leftIToken, IToken rightIToken,
+                            IWhenConditionAST _WhenConditionAST,
+                            IWhenChangeAST _WhenChangeAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._WhenConditionAST = _WhenConditionAST;
+        ((ASTNode) _WhenConditionAST).setParent(this);
+        this._WhenChangeAST = _WhenChangeAST;
+        ((ASTNode) _WhenChangeAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof WhenConditionAST)) return false;
+        WhenConditionAST other = (WhenConditionAST) o;
+        if (! _WhenConditionAST.equals(other.getWhenConditionAST())) return false;
+        if (! _WhenChangeAST.equals(other.getWhenChangeAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getWhenConditionAST().hashCode());
+        hash = hash * 31 + (getWhenChangeAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/WhenRuleAST.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/WhenRuleAST.java
new file mode 100644
index 0000000..9fed290
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/ast/WhenRuleAST.java
@@ -0,0 +1,76 @@
+/**
+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*
+* This file was generated automatically based upon the VTCL LPG Parser
+* VTCLParser.g 
+*/
+
+package org.eclipse.viatra2.lpgparser.ast;
+
+import lpg.lpgjavaruntime.*;
+
+/**
+ *<b>
+ *<li>Rule 191:  WhenRuleAST ::= when LPAREN WhenConditionAST RPAREN do AsmRuleAST
+ *</b>
+ */
+public class WhenRuleAST extends ASTNode implements IWhenRuleAST
+{
+    private IWhenConditionAST _WhenConditionAST;
+    private IAsmRuleAST _AsmRuleAST;
+
+    public IWhenConditionAST getWhenConditionAST() { return _WhenConditionAST; }
+    public IAsmRuleAST getAsmRuleAST() { return _AsmRuleAST; }
+
+    public WhenRuleAST(IToken leftIToken, IToken rightIToken,
+                       IWhenConditionAST _WhenConditionAST,
+                       IAsmRuleAST _AsmRuleAST)
+    {
+        super(leftIToken, rightIToken);
+
+        this._WhenConditionAST = _WhenConditionAST;
+        ((ASTNode) _WhenConditionAST).setParent(this);
+        this._AsmRuleAST = _AsmRuleAST;
+        ((ASTNode) _AsmRuleAST).setParent(this);
+        initialize();
+    }
+
+    public boolean equals(Object o)
+    {
+        if (o == this) return true;
+        //
+        // The supers call is not required for now because Ast nodes
+        // can only extend the root Ast, AstToken and AstList and none
+        // of these nodes contain children.
+        //
+        // if (! super.equals(o)) return false;
+        //
+        if (! (o instanceof WhenRuleAST)) return false;
+        WhenRuleAST other = (WhenRuleAST) o;
+        if (! _WhenConditionAST.equals(other.getWhenConditionAST())) return false;
+        if (! _AsmRuleAST.equals(other.getAsmRuleAST())) return false;
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int hash = 7;
+        hash = hash * 31 + (getWhenConditionAST().hashCode());
+        hash = hash * 31 + (getAsmRuleAST().hashCode());
+        return hash;
+    }
+
+    public void accept(Visitor v) { v.visit(this); }
+    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
+    public Object accept(ResultVisitor v) { return v.visit(this); }
+    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
+}
+
+
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/btVTCLParserTemplateD.g b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/btVTCLParserTemplateD.g
new file mode 100644
index 0000000..7d83c9f
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/btVTCLParserTemplateD.g
@@ -0,0 +1,447 @@
+--
+--
+-- In a parser using this template, the following macro may be redefined:
+--
+--     $additional_interfaces
+--     $ast_class
+--
+-- B E G I N N I N G   O F   T E M P L A T E   btVTCLParserTemplateD
+--
+%Options programming_language=java,margin=4,backtrack
+%Options table,error_maps,scopes
+%options prefix=TK_,
+%options action=("*.java", "/.", "./")
+%options ParseTable=lpg.lpgjavaruntime.ParseTable
+
+--
+-- This template requires that the name of the EOF token be set
+-- to EOF_TOKEN to be consistent with LexerTemplateD and LexerTemplateE
+--
+$EOF
+    EOF_TOKEN
+$End
+
+$ERROR
+    ERROR_TOKEN
+$End
+
+$Define
+
+    $Header
+    /.
+                //
+                // Rule $rule_number:  $rule_text
+                //./
+
+    $BeginAction
+    /. $Header
+                case $rule_number: {./
+
+    $EndAction
+    /.          break;
+                }./
+
+    $BeginJava
+    /.$BeginAction
+                    $symbol_declarations./
+
+    $EndJava /.$EndAction./
+
+    $NoAction
+    /. $Header
+                case $rule_number:
+                    break;./
+
+    $BadAction
+    /. $Header
+                case $rule_number:
+                    throw new Error("No action specified for rule " + $rule_number);./
+
+    $NullAction
+    /. $Header
+                case $rule_number:
+                    setResult(null);
+                    break;./
+
+    $BeginActions
+    /.
+        public void ruleAction(int ruleNumber)
+        {
+            switch (ruleNumber)
+            {./
+
+    $SplitActions
+    /.
+	            default:
+	                ruleAction$rule_number(ruleNumber);
+	                break;
+	        }
+	        return;
+	    }
+	
+	    public void ruleAction$rule_number(int ruleNumber)
+	    {
+	        switch (ruleNumber)
+	        {./
+
+    $EndActions
+    /.
+                default:
+                    break;
+            }
+            return;
+        }./
+
+    --
+    -- Macros that may be needed in a parser using this template
+    --
+    $additional_interfaces /../
+    $ast_class /.$ast_type./
+
+    --
+    -- Old deprecated macros that should NEVER be used.
+    --
+    $setSym1 /. // macro setSym1 is deprecated. Use function setResult
+                getParser().setSym1./
+    $setResult /. // macro setResult is deprecated. Use function setResult
+                 getParser().setSym1./
+    $getSym /. // macro getSym is deprecated. Use function getRhsSym
+              getParser().getSym./
+    $getToken /. // macro getToken is deprecated. Use function getRhsTokenIndex
+                getParser().getToken./
+    $getIToken /. // macro getIToken is deprecated. Use function getRhsIToken
+                 super.getIToken./
+    $getLeftSpan /. // macro getLeftSpan is deprecated. Use function getLeftSpan
+                   getParser().getFirstToken./
+    $getRightSpan /. // macro getRightSpan is deprecated. Use function getRightSpan
+                    getParser().getLastToken./
+$End
+
+$Globals
+    /.import lpg.lpgjavaruntime.*;
+    ./
+$End
+
+$Headers
+    /.
+import org.eclipse.viatra2.errors.info.ErrorInformation;
+import org.eclipse.viatra2.errors.info.Location;
+import org.eclipse.viatra2.lpgparser.loader.VTCLMessages;
+import org.eclipse.viatra2.errors.info.ErrorInformation.ErrorKind;
+import org.eclipse.viatra2.errors.info.ErrorInformation.ErrorSeverity;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.eclipse.viatra2.lpgparser.loader.ExplanationGenerator;
+	  
+    public class $action_type extends PrsStream implements RuleAction$additional_interfaces {
+        final String PARSER_MARKER = "org.eclipse.viatra2.loaders.vtclparsermarker";
+
+        ExplanationGenerator generator = new ExplanationGenerator(this);
+
+        private java.util.List<ErrorInformation> allErrorInfos = new java.util.ArrayList<ErrorInformation>();
+	    public java.util.List<ErrorInformation> getAllErrorInfos() {
+            return allErrorInfos;
+        }
+        
+        public void clearParseErrorList() {
+	    if (allErrorInfos == null)
+		    allErrorInfos = new java.util.ArrayList<ErrorInformation>();
+	    else
+		    allErrorInfos.clear();
+    }
+    
+        private static ParseTable prs = new $prs_type();
+        private BacktrackingParser btParser;
+
+        public BacktrackingParser getParser() { return btParser; }
+        private void setResult(Object object) { btParser.setSym1(object); }
+        public Object getRhsSym(int i) { return btParser.getSym(i); }
+
+        public int getRhsTokenIndex(int i) { return btParser.getToken(i); }
+        public IToken getRhsIToken(int i) { return super.getIToken(getRhsTokenIndex(i)); }
+        
+        public int getRhsFirstTokenIndex(int i) { return btParser.getFirstToken(i); }
+        public IToken getRhsFirstIToken(int i) { return super.getIToken(getRhsFirstTokenIndex(i)); }
+
+        public int getRhsLastTokenIndex(int i) { return btParser.getLastToken(i); }
+        public IToken getRhsLastIToken(int i) { return super.getIToken(getRhsLastTokenIndex(i)); }
+
+        public int getLeftSpan() { return btParser.getFirstToken(); }
+        public IToken getLeftIToken()  { return super.getIToken(getLeftSpan()); }
+
+        public int getRightSpan() { return btParser.getLastToken(); }
+        public IToken getRightIToken() { return super.getIToken(getRightSpan()); }
+
+        public int getRhsErrorTokenIndex(int i) {
+            int index = btParser.getToken(i);
+            IToken err = super.getIToken(index);
+            return (err instanceof ErrorToken ? index : 0);
+        }
+        public ErrorToken getRhsErrorIToken(int i) {
+            int index = btParser.getToken(i);
+            IToken err = super.getIToken(index);
+            return (ErrorToken) (err instanceof ErrorToken ? err : null);
+        }
+
+        public $action_type(LexStream lexStream) {
+            super(lexStream);
+
+            try {
+                super.remapTerminalSymbols(orderedTerminalSymbols(), $prs_type.EOFT_SYMBOL);
+            } catch(NullExportedSymbolsException e) {
+            } catch(NullTerminalSymbolsException e) {
+            } catch(UnimplementedTerminalsException e) {
+                java.util.ArrayList unimplemented_symbols = e.getSymbols();
+                System.out.println("The Lexer will not scan the following token(s):");
+                for (int i = 0; i < unimplemented_symbols.size(); i++) {
+                    Integer id = (Integer) unimplemented_symbols.get(i);
+                    System.out.println("    " + $sym_type.orderedTerminalSymbols[id.intValue()]);               
+                }
+                System.out.println();                        
+            }
+            catch(UndefinedEofSymbolException e) {
+                throw new Error(new UndefinedEofSymbolException
+                                    ("The Lexer does not implement the Eof symbol " +
+                                     $sym_type.orderedTerminalSymbols[$prs_type.EOFT_SYMBOL]));
+            } 
+        }
+
+        public String[] orderedTerminalSymbols() { return $sym_type.orderedTerminalSymbols; }
+        public String getTokenKindName(int kind) { return $sym_type.orderedTerminalSymbols[kind]; }
+        public int getEOFTokenKind() { return $prs_type.EOFT_SYMBOL; }
+        public PrsStream getParseStream() { return this; }
+        
+    
+	/**
+	 * Called when encountering a single bad character. Do not report
+	 * this error at this point.
+	 */
+	public void reportError(int left_char, int right_char) {
+//		System.out.println("reportError(int, int)");	    
+	}
+
+	/**
+	 * Reports the parse error by setting the error to <code>errorString</code>
+	 * 
+	 * @param errorCode the error code
+	 * @param locationInfo
+	 * @param leftToken the token to the left of the error
+	 * @param rightToken the token to the right of the error
+	 * @param tokenText the text of the bad token
+	 */
+	public void reportError(int errorCode, String locationInfo, int leftToken, int rightToken, String tokenText) {
+	
+	    int leftTokenLoc = (leftToken > rightToken ? rightToken : leftToken);
+	    int rightTokenLoc = rightToken;
+	    String errorString;
+	
+	    if (getLine(leftTokenLoc)  <= 0) {
+	 	    errorString =  VTCLMessages.InvalidVTCL_ERROR_;
+	        allErrorInfos.add(new ErrorInformation(errorString, PARSER_MARKER, ErrorKind.PARSE_ERROR)); 
+	    } 
+	    else {
+      Location location = new Location(
+    		getLine(leftTokenLoc),
+    		getColumn(leftTokenLoc), 
+		getEndLine(rightTokenLoc),
+		getEndColumn(rightTokenLoc) + 1,
+		getStartOffset(leftTokenLoc),
+		getEndOffset(rightTokenLoc));
+		
+		switch (errorCode) {
+		case EOF_CODE:
+		case MISPLACED_CODE:
+	        case DELETION_CODE:
+	            errorString = " Syntax error: " + errorMsgText[errorCode] + " " +    
+	    		      	'"' + computeInputString(
+	    				getIToken(leftToken).getStartOffset(),
+	    				getIToken(rightToken).getEndOffset()) + '"';
+	            break;
+	        case INVALID_TOKEN_CODE:
+	             errorString = " Syntax error: Token" +  " " +    
+	    		          '"' + computeInputString(
+	    				getIToken(leftToken).getStartOffset(),
+	    				getIToken(rightToken).getEndOffset()) + '"'
+                              + " " + errorMsgText[errorCode] + ".";
+	             String explanation = generator.calculateErrorExplanation(tokenText, leftToken, rightToken);
+	             if (explanation != "") {
+	    	     errorString = errorString + " Cause: " + explanation + ".";
+	            }
+	        break;
+	
+		case MERGE_CODE:
+		case BEFORE_CODE:
+		case INSERTION_CODE:
+		case SCOPE_CODE:
+		case SUBSTITUTION_CODE: // includes SECONDARY_CODE
+		    errorString = " Syntax error: " + tokenText + " " + errorMsgText[errorCode] + " " + 
+			'"' + computeInputString(
+				getIToken(leftToken).getStartOffset(),
+				getIToken(rightToken).getEndOffset()) + '"';
+		    break;
+	
+		default:
+		    errorString = " Syntax error: " + errorMsgText[errorCode] + " at token " + tokenText;
+		break;
+		}
+		allErrorInfos.add(new 
+			ErrorInformation(errorString,
+				PARSER_MARKER,
+				ErrorKind.PARSE_ERROR,
+				location,
+				ErrorSeverity.ERROR));
+	 }
+	    
+	}
+	 
+
+	/**
+	 * Returns a single line string representation of the input chars
+	 * for the given range.
+	 * 
+	 * @param left left most char index
+	 * @param right right most char index
+	 * @return a single line string representation of the input chars
+	 */
+	private String computeInputString(int left, int right) {
+		StringBuffer result = new StringBuffer(right - left + 1);
+		char[] chars = getInputChars();
+
+		for (int i = left; i <= right; i++) {
+			if (chars[i] == '\t') {
+				result.append(' ');
+			} else if (chars[i] == '\n' || chars[i] == '\r' || chars[i] == '\f') {
+				if (i > 0) {
+					if (!Character.isWhitespace(chars[i-1])) {
+						result.append(' ');
+					}
+				}
+			} else {
+				result.append(chars[i]);
+			}
+				
+		}
+		return result.toString();
+	}
+	
+
+        
+    /**
+     * Report error message for given error_token by calling 
+     * method <code>reportError/5</code> is called finally
+     * @param error_token 
+     * @param msg 
+     */
+    public final void reportErrorTokenMessage(int error_token, String msg)
+    {
+        allErrorInfos.add(new 
+		ErrorInformation(msg, 
+				PARSER_MARKER,
+			    ErrorKind.PARSE_ERROR,
+				getLine(error_token),  
+				getColumn(error_token),
+				getEndLine(error_token),
+				getEndColumn(error_token)));
+    }
+
+    /** 
+     * This SymbolTable class is from the IMP project
+     */
+    public static class SymbolTable {
+        private Map<String,ASTNode> table = new HashMap<String,ASTNode>();
+
+        public void addDefinition(String name, ASTNode def) { table.put(name, def); }
+        public ASTNode lookup(String name) { return table.get(name); }
+        public List<String> allSymbolsOfType(Class type) {
+            List<String> result= new ArrayList<String>();
+
+            for(String sym: table.keySet()) {
+                ASTNode def= table.get(sym);
+
+                if (type.isInstance(def))
+                    result.add(sym);
+            }
+            return result;
+        }
+        public <T> List<T> allDefsOfType(Class<T> type) {
+            List<T> result = new ArrayList<T>();
+            
+            for(String sym: table.keySet()) {
+                ASTNode def= table.get(sym);
+
+                if (type.isInstance(def))
+                    result.add((T) def);
+            }
+            return result;
+        }
+        public Set<String> allSymbols() { return table.keySet(); }
+    }
+//    protected static SymbolTable symtab;
+//    { symtab = new SymbolTable(); }
+
+        public $ast_class parser()
+        {
+            return parser(null, 0);
+        }
+        
+        public $ast_class parser(Monitor monitor)
+        {
+            return parser(monitor, 0);
+        }
+        
+        public $ast_class parser(int error_repair_count)
+        {
+            return parser(null, error_repair_count);
+        }
+
+        public $ast_class parser(Monitor monitor, int error_repair_count)
+        {
+            try
+            {
+                btParser = new BacktrackingParser(monitor, this, prs, this);
+            }
+            catch (NotBacktrackParseTableException e)
+            {
+                throw new Error(new NotBacktrackParseTableException
+                                    ("Regenerate $prs_type.java with -BACKTRACK option"));
+            }
+            catch (BadParseSymFileException e)
+            {
+                throw new Error(new BadParseSymFileException("Bad Parser Symbol File -- $sym_type.java"));
+            }
+
+            try
+            {
+                return ($ast_class) btParser.parse(error_repair_count);
+            }
+            catch (BadParseException e)
+            {
+                reset(e.error_token); // point to error token
+                DiagnoseParser diagnoseParser = new DiagnoseParser(this, prs);
+                diagnoseParser.diagnose(e.error_token);
+            }
+
+            return null;
+        }
+
+    ./
+
+$End
+
+$Rules
+    /.$BeginActions./
+$End
+
+$Trailers
+    /.
+        $EndActions
+    }
+    ./
+$End
+
+--
+-- E N D   O F   T E M P L A T E
+--
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/loader/ExplanationGenerator.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/loader/ExplanationGenerator.java
new file mode 100644
index 0000000..6d7fe04
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/loader/ExplanationGenerator.java
@@ -0,0 +1,60 @@
+/**
+* Copyright (c) 2008 - 2010 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*/
+/**
+ * 
+ */
+package org.eclipse.viatra2.lpgparser.loader;
+
+import org.apache.commons.lang.math.NumberUtils;
+import org.eclipse.viatra2.lpgparser.VTCLParser;
+
+/**
+ * Explanation generator class for the VTCL parser.
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class ExplanationGenerator {
+	
+	VTCLParser parser;
+	
+	/**
+	 * Initializes an explanation generator using a VTCL parser object.
+	 * @param parser
+	 */
+	public ExplanationGenerator(VTCLParser parser) {
+		this.parser = parser;
+	}
+
+	/**
+	 * Calculates an explanation about the parser error.
+	 * @param tokenText
+	 * @param leftToken
+	 * @param rightToken
+	 * @return the generated explanation
+	 */
+	public String calculateErrorExplanation(String tokenText, int leftToken, int rightToken) {
+		if (tokenText.contentEquals("\"VariableRefAST\"") || tokenText.contentEquals("\"VariableDefAST\"")) {
+			return calculateExplanationVariableRef(leftToken);
+		}
+		return "";
+	}
+	
+	private String calculateExplanationVariableRef(int leftToken) {
+		String description = parser.getIToken(leftToken).toString();
+		if (NumberUtils.isNumber(description)) {
+			return VTCLMessages.ExplanationCode_INVALIDNUMBER;
+		}
+		if (!description.matches("[A-Z][?]*")) {
+			return VTCLMessages.ExplanationCode_REFSTARTCAPITAL;
+		}
+		return "";
+	}
+}
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/loader/LPGVTCLLoader.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/loader/LPGVTCLLoader.java
new file mode 100644
index 0000000..0dbff82
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/loader/LPGVTCLLoader.java
@@ -0,0 +1,285 @@
+/**
+* Copyright (c) 2007 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   OptXware - Initial API and implementation
+*
+* Created: 
+* 		2007.09.28	Daniel Varro
+*/
+
+package org.eclipse.viatra2.lpgparser.loader;
+
+import java.io.InputStream;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.errors.info.ErrorInformation;
+import org.eclipse.viatra2.errors.info.ErrorInformation.ErrorSeverity;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.loaders.Loader;
+import org.eclipse.viatra2.logger.Logger;
+
+/**
+ * Summary: 
+ * 	This class manages how to parse and load a VTCL transformation to the 
+ *  VIATRA framework.  
+ * 
+ * Description: 
+ * 	LPGVTCLLoader initiates the parsing of a VTCL file with respect to an open 
+ *  VIATRA framework. In case of successful parsing (i.e when no error messages
+ *  are retrieved by the parser or the validator), it returns the EMF model of
+ *  the transformation.    
+ *   
+ * @author Daniel Varro
+ *
+ */
+public class LPGVTCLLoader implements Loader {
+
+	/**
+	 * This method of the interface {@link Loader} is not currently in use
+	 */
+	public Object process(InputStream f, IFramework fw)	throws VPMRuntimeException 
+	{
+		throw new VPMRuntimeException("The VTCL loader does not support loading from an InputStream.");
+	}
+
+	/**
+	 * 	This method initiates the parsing of a VTCL file with respect to an open 
+	 *  VIATRA framework. In case of successful parsing (i.e when no error messages
+	 *  are retrieved by the parser or the validator), it returns the EMF model of
+	 *  the transformation. If there are errors a null value is returned as result    
+	 * 
+	 */
+	public Object processFile(String fileName, IFramework framework) throws VPMRuntimeException {
+		Machine machine = loadMachineFromFile(fileName, framework);
+		return machine;
+	}
+	
+	private Machine loadMachineFromFile(String fileName, IFramework framework) throws VPMRuntimeException {
+		// Lookup parseController in framework and create one if none is present
+		VTCLParserManager parserManager = (VTCLParserManager) framework.getVTCLParserManager();
+		VTCLParseController parseController = parserManager.lookupAndCreateParseController(fileName);
+		//VTCLParseController parseController = new VTCLParseController();
+    	Logger log = framework.getLogger();
+    	Machine m = null;
+    	try {
+    		// TODO: Check that parserController is already initialized
+			//parseController.initialize(fileName, framework);
+			
+			// Call parser
+			//ParserResult result = parseController.parseAndBuild();
+			parseController.parseAndBuild();
+			
+			boolean hasErrors = false;
+			boolean hasWarnings = false;
+			// Report if there are no errors
+			if (parseController.getErrors() != null && parseController.getErrors().size() > 0) {
+				// First check if there are errors
+				Iterator<ErrorInformation> it1 = parseController.getErrors().iterator();
+				while (!hasErrors && it1.hasNext()) {
+					ErrorInformation error = it1.next();
+					if (error.getErrorSeverity().compareTo(ErrorSeverity.ERROR) == 0) {
+						hasErrors = true;
+					} else if (error.getErrorSeverity().compareTo(ErrorSeverity.WARNING) == 0) {
+						hasWarnings = true;
+					}
+				}
+				
+				// Report errors and warnings
+				List<ErrorInformation> errorList = parseController.getErrors();
+				for (int i = 0; i < errorList.size(); i++) {
+					ErrorInformation errorInfo = errorList.get(i);
+					String errorMsg = errorInfo.getMessageWithLocation();
+					ErrorSeverity errorSeverity = errorInfo.getErrorSeverity();
+					switch (errorSeverity) {
+					case ERROR:
+						log.error(errorMsg);
+						break;
+					case WARNING:
+						log.warning(errorMsg);
+						break;
+					default:
+						break;
+					}
+				}
+				
+			}
+			if (!hasErrors) {
+				//Add the GTASM Machine to the framework, if there are no errors
+				//Machine m = (Machine) result.module.getMachine().get(0);
+				m = parseController.getMachine();
+				// TODO: This code should be rewritten to accommodate the new MachineWrapper				
+				framework.addMachine(m.getFqn(), m);
+				String msg = (hasWarnings) ? "Parsing completed, but there are some warnings in the Error Log. Transformation " +
+						parseController.getMachine().getName() +
+						" can now be executed in the VIATRA Frameworks view" : "Parsing completed successfully. Transformation " +
+						parseController.getMachine().getName() +
+						" can now be executed in the VIATRA Frameworks view";
+				log.info(msg);
+			}
+		} catch (Exception e) {
+			throw new VPMRuntimeException("Error during the loading of the VTCL file: " + e.getMessage(), e);
+		}
+		return m;
+//
+//		String[] args = new String[]{"-d", fileName};
+//        Option option;
+//        VTCLLexer vtcl_lexer;
+//        VTCLParser vtcl_parser;
+//        Module vtclModule;
+//
+//        ASTNode ast;
+//
+//        try
+//        {
+//            option = new Option(args);
+//            option.readInputChars();
+//            vtcl_lexer = new VTCLLexer(option.getInputChars(), option.getFileName()); // Create the lexer
+//            vtcl_lexer.setTab(4);
+//            vtcl_parser = new VTCLParser(vtcl_lexer);	// Create the parser
+//            vtcl_lexer.lexer(vtcl_parser); // Lex the stream to produce the token stream
+////            if (option.dumpTokens())
+////            {
+////                System.out.println("\n****Output Tokens: \n");
+////                vtcl_parser.dumpTokens();
+////            }
+//            ast = vtcl_parser.parser(100); // Parse the token stream to produce an AST
+//        	Logger log = framework.getLogger();
+//            if (ast == null) {
+////            	System.out.println("****Failure");
+////            	System.out.println("Number of parser errors: " + vtcl_parser.getAllErrorInfos().size());
+//            	for (int i = 0; i < vtcl_parser.getAllErrorInfos().size(); i++) {
+//            		ErrorInformation errorInfo = vtcl_parser.getAllErrorInfos().get(i);
+//            		String errorMsg = errorInfo.getMessageWithLocation();
+//            		ErrorSeverity errorSeverity = errorInfo.getErrorSeverity();
+//            		switch (errorSeverity) {
+//					case ERROR:
+//						log.error(errorMsg);
+//						break;
+//					case WARNING:
+//						log.warning(errorMsg);
+//						break;
+//					default:
+//						break;
+//					}
+//            	}
+//            }
+//            else
+//            {
+////            	System.out.println("*** Parsing completed ***");
+//            	// Initializing a sample model space
+//            	IModelSpace modelSpace = framework.getTopmodel();
+//            	// Retrieve native functions from framework
+//            	ASMNativeFunction[] asmNativeFunctions = framework.getNativeFunctionManager().getAllNativeFunctions();
+//
+//            	// Starting the model builder
+//            	VTCLModelBuilder modelBuilder = new VTCLModelBuilder(modelSpace, asmNativeFunctions);
+//            	// Setting the file name for the model builder
+//            	modelBuilder.setFileName(fileName);
+//            	vtclModule = (Module) ast.accept(modelBuilder);
+//            	
+//            	// Reporting parser errors
+////            	System.out.println("Number of parser errors: " + vtcl_parser.getAllErrorInfos().size());
+//            	for (int i = 0; i < vtcl_parser.getAllErrorInfos().size(); i++) {
+//            		ErrorInformation errorInfo = vtcl_parser.getAllErrorInfos().get(i);
+//            		String errorMsg = errorInfo.getMessageWithLocation();
+////            	    System.out.println(errorMsg);
+//            		ErrorSeverity errorSeverity = errorInfo.getErrorSeverity();
+//            		switch (errorSeverity) {
+//					case ERROR:
+//						log.error(errorMsg);
+//						break;
+//					case WARNING:
+//						log.warning(errorMsg);
+//						break;
+//					default:
+//						break;
+//					}
+//            	}
+//            	
+//            	// Reporting model resolution and validation errors
+////            	System.out.println("*** Starting model builder ***");
+//            	VTCLModelResolver modelResolver = modelBuilder.getModelResolver();
+////            	System.out.println("Number of validation errors: " + 
+////            		modelResolver.getAllReferenceErrorInfos().size());
+//            	// Reporting model validation errors 
+//            	for (int i = 0; i < modelResolver.getAllReferenceErrorInfos().size(); i++) {
+//            		ErrorInformation errorInfo = modelResolver.getAllReferenceErrorInfos().get(i);
+//            		String errorMsg = errorInfo.getMessageWithLocation();
+////            	    System.out.println(errorMsg);
+//            		ErrorSeverity errorSeverity = errorInfo.getErrorSeverity();
+//            		switch (errorSeverity) {
+//					case ERROR:
+//						log.error(errorMsg);
+//						break;
+//					case WARNING:
+//						log.warning(errorMsg);
+//						break;
+//					default:
+//						break;
+//					}
+//            	}
+//            	if (modelResolver.getAllReferenceErrorInfos().size() == 0 && 
+//            		vtcl_parser.getAllErrorInfos().size() == 0) {
+//            		String msg = "Parsing completed successfully. Transformation " +
+//            					((Machine) vtclModule.getMachine().get(0)).getName() +
+//            					" can now be executed in the VIATRA Frameworks view";
+//            		log.info(msg);
+//            		//return vtclModule.getMachine().get(0);
+//            		Machine m = (Machine)vtclModule.getMachine().get(0);
+//            		framework.addMachine(m.getFqn(), m);
+//            	}
+//            	// Checks if we have only warnings
+//            	else {
+//                	boolean hasErrors = false;
+//                	// First check if there are parser errors
+//                	List<ErrorInformation> parserErrors = vtcl_parser.getAllErrorInfos();
+//                	Iterator<ErrorInformation> it1 = parserErrors.iterator();
+//                	while (!hasErrors && it1.hasNext()) {
+//						ErrorInformation error = it1.next();
+//						if (error.getErrorSeverity().compareTo(ErrorSeverity.ERROR) == 0) {
+//							hasErrors = true;
+//						}
+//					}
+//                	
+//                	// Then check if there are validation errors
+//                	List<ErrorInformation> errors = modelResolver.getAllReferenceErrorInfos();
+//                	Iterator<ErrorInformation> it = errors.iterator();
+//                	while (!hasErrors && it.hasNext()) {
+//						ErrorInformation error = it.next();
+//						if (error.getErrorSeverity().compareTo(ErrorSeverity.ERROR) == 0) {
+//							hasErrors = true;
+//						}
+//					}
+//                	if (!hasErrors) {
+//                		String msg = "Parsing completed successfully. Transformation " +
+//                					((Machine) vtclModule.getMachine().get(0)).getName() +
+//                					" can now be executed in the VIATRA Frameworks view";
+//                		log.info(msg);
+//                		//return vtclModule.getMachine().get(0);
+//                		Machine m = (Machine)vtclModule.getMachine().get(0);
+//                		framework.addMachine(m.getFqn(), m);
+//                	}
+//                	else {
+//                		//return null;
+//                	}
+//            		
+//            	}
+//            }
+//        }
+//        catch (Exception e)
+//        {
+//            System.err.println(e.getMessage());
+//            e.printStackTrace();
+//        }
+//        //return null;
+	}
+
+}
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/loader/VTCLMessages.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/loader/VTCLMessages.java
new file mode 100644
index 0000000..bc4b4f1
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/loader/VTCLMessages.java
@@ -0,0 +1,87 @@
+/**
+* Copyright (c) 2007 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*/
+
+package org.eclipse.viatra2.lpgparser.loader;
+
+/**
+ * VTCL Parser Error messages 
+ *
+ */
+public class VTCLMessages {
+	public static final String VTCLParseErrorCodes_LEX_ERROR = "Lexer error";
+	public static final String VTCLParseErrorCodes_ERROR = "Error";
+	public static final String VTCLParseErrorCodes_BEFORE = "BEFORE";
+	public static final String VTCLParseErrorCodes_INSERTION = "INSERTION";
+	public static final String VTCLParseErrorCodes_INVALID = "INVALID";
+	public static final String VTCLParseErrorCodes_SUBSTITUTION_SECONDARY = "SUBSTITION SECONDARY";
+	public static final String VTCLParseErrorCodes_DELETION = "DELETION";
+	public static final String VTCLParseErrorCodes_MERGE = "MERGE";
+	public static final String VTCLParseErrorCodes_MISPLACED = "MISPLACED";
+	public static final String VTCLParseErrorCodes_SCOPE = "SCOPE";
+	public static final String VTCLParseErrorCodes_EOF = "EOF";
+	public static final String VTCLParseErrorCodes_INVALID_TOKEN = "INVALID TOKEN";
+	public static final String VTCLValidationErrorCodes_VARIABLE_TYPE_UNRESOLVABLE = "Type of Variable '{1}' cannot be resolved ";
+	public static final String VTCLValidationErrorCodes_ASMFUN_TYPE_UNRESOLVABLE = "Type of ASM function '{1}' cannot be resolved ";
+	public static final String VTCLValidationErrorCodes_ENTITY_TYPE_UNRESOLVABLE = "Type of Entity cannot be resolved ";
+	public static final String VTCLValidationErrorCodes_RELATION_TYPE_UNRESOLVABLE = "Type of Relation cannot be resolved ";
+	public static final String VTCLValidationErrorCodes_RELATION_SRC_TYPE_ERROR = "The source end of Relation is not properly typed. The actual type is '{1}' while expecting '{2}'.";
+	public static final String VTCLValidationErrorCodes_RELATION_TRG_TYPE_ERROR = "The target end of Relation is not properly typed. The actual type is '{1}' while expecting '{2}'.";
+	public static final String VTCLValidationErrorCodes_AMBIGUOUS_TYPE_RESOLUTION = "Ambiguous type of model element. Possible resolutions are {ALL}. This ambiguity is most probably caused by conflicting import declarations";
+	public static final String VTCLValidationErrorCodes_SOURCE_UNRESOLVABLE = "Source end of Relation cannot be resolved ";
+	public static final String VTCLValidationErrorCodes_SOURCE_LOCALLY_UNRESOLVABLE = "Source end of Relation cannot be resolved locally ";
+	public static final String VTCLValidationErrorCodes_TARGET_UNRESOLVABLE = "Target end of Relation cannot be resolved ";
+	public static final String VTCLValidationErrorCodes_TARGET_LOCALLY_UNRESOLVABLE = "Target end of Relation cannot be resolved locally ";
+	public static final String VTCLValidationErrorCodes_IMPORT_UNRESOLVABLE = "Import declaration '{1}' is unresolvable";
+	// TODO: Implement this error message
+	public static final String VTCLValidationErrorCodes_CHECK_VARIABLE_LOCALLY_UNRESOLVABLE = "Variable '{1}' in check condition cannot be resolved locally ";
+	public static final String VTCLValidationErrorCodes_SUPPLIER_UNRESOLVABLE = "Supplier (type or supertype) end of Relationship cannot be resolved ";
+	public static final String VTCLValidationErrorCodes_SUPPLIER_LOCALLY_UNRESOLVABLE = "Supplier (type or supertype) end of Relationship cannot be resolved locally ";
+	public static final String VTCLValidationErrorCodes_CLIENT_UNRESOLVABLE = "Client (instance or subtype) end  of Relationship cannot be resolved ";
+	public static final String VTCLValidationErrorCodes_CLIENT_LOCALLY_UNRESOLVABLE = "Client (instance or subtype) end of Relationship cannot be resolved locally ";
+	public static final String VTCLValidationErrorCodes_PATTERN_CALL_UNRESOLVABLE = "Pattern Call '{1}' cannot be resolved ";
+	public static final String VTCLValidationErrorCodes_PATTERN_PARAMETER_MISMATCH = "Parameter mismatch in pattern call. Expecting '{1}' ";
+	public static final String VTCLValidationErrorCodes_GTRULE_CALL_UNRESOLVABLE = "GT Rule Invocation '{1}' cannot be resolved ";
+	public static final String VTCLValidationErrorCodes_GTRULE_PARAMETER_MISMATCH = "Parameter mismatch in GT rule invocation. Expecting '{1}'";
+	public static final String VTCLValidationErrorCodes_ASMRULE_INVOC_UNRESOLVABLE = "ASM Call Rule '{1}' cannot be resolved ";
+	public static final String VTCLValidationErrorCodes_ASMRULE_PARAMETER_MISMATCH = "Parameter mismatch in ASM rule invocation. Expecting '{1}' ";
+	public static final String VTCLValidationErrorCodes_ASMFUN_INVOC_UNRESOLVABLE = "ASM Function Invocation cannot be resolved ";
+	public static final String VTCLValidationErrorCodes_ASMFUN_PARAMETER_MISMATCH = "Parameter mismatch in ASM function. Expecting '{1}' ";
+	public static final String VTCLValidationErrorCodes_ASMFUN_UPDATE_UNRESOLVABLE = "The ASM Function '{1}' to be updated cannot be resolved ";
+	public static final String VTCLValidationErrorCodes_DUPLICATE_PATTERNVAR_DEFINITION = "Duplicate definition of pattern variable '{1}'";
+	public static final String VTCLValidationErrorCodes_DUPLICATE_ASMVAR_DEFINITION = "Duplicate definition of ASM variable '{1}'";
+	public static final String VTCLValidationErrorCodes_DUPLICATE_GTVAR_DEFINITION = "Duplicate definition of variable '{1}' in GT rule";
+	public static final String VTCLValidationErrorCodes_VARIABLE_REF_UNRESOLVABLE = "Variable Reference '{1}' cannot be resolved ";
+	public static final String VTCLValidationErrorCodes_DUPLICATE_ASMFUN_NAME = "Duplicate definition of ASM function '{1}'";
+	public static final String VTCLValidationErrorCodes_DUPLICATE_ASMRULE_NAME = "Duplicate definition of ASM rule '{1}'";
+	public static final String VTCLValidationErrorCodes_DUPLICATE_PATTERN_NAME = "Duplicate definition of pattern '{1}'";
+	public static final String VTCLValidationErrorCodes_DUPLICATE_GTRULE_NAME = "Duplicate definition of GT rule '{1}'";
+	public static final String VTCLValidationErrorCodes_ASMFUN_ARITY_INITVALUE_MISMATCH = "The initial values of ASM function does not match its arity ";
+	public static final String VTCLValidationErrorCodes_POSTCONDITION_OR_PATTERN_NOT_ALLOWED = "OR-pattern in '{1}' is not allowed to be used as a postcondition of GT Rule '{2}'";
+	public static final String VTCLValidationErrorCodes_POSTCONDITION_IGNORE_NAC = "Negative patterns are ignored when using pattern '{1}' as a postcondition of GT Rule '{2}'.";
+	public static final String VTCLValidationErrorCodes_POSTCONDITION_IGNORE_CHECK = "Check expressions are ignored when using pattern '{1}' as a postcondition of GT Rule '{2}'.";
+	public static final String VTCLValidationErrorCodes_NONEXISTING_MODELELEM_CONSTANT = "Model element constant '{1}' is non-existing in the model space.";
+	public static final String VTCLValidationErrorCodes_UNUSED_VARIABLE = "Variable '{1}' is not currently in use";
+	public static final String VTCLValidationErrorCodes_UNARY_INCOMPATIBLE_TYPES = "Operator '{1}' is undefined for the argument type ('{2}')";
+	public static final String VTCLValidationErrorCodes_BINARY_INCOMPATIBLE_TYPES = "Operator '{1}' is undefined for the argument types ('{2}', '{3}')";
+	public static final String VTCLValidationErrorCodes_PATTVVARIABLECONSTRAINT_AMBIGOUS = "The left and right values of a pattern variable constraint should be different";
+	public static final String VTCLValidationErrorCodes_PATTPARAM_NOT_LOCALLY_DEFINED = "Pattern parameter '{1}' is not defined locally. Please check if it is intentional.";
+	public static final String VTCLValidationErrorCodes_INVALID_MATCH_COUNTER= "Match counters are not allowed to be used in {2}: '{1}'.";
+	public static final String VTCLValidationErrorCodes_INCOMPATIBLE_ACTUALPARAM_TYPE= "The type '{1}' of actual parameter is not compatible with the type '{2}' of symbolic parameter '{3}'. See the definition of '{4}'.";
+	public static final String VTCLValidationErrorCodes_INCOMPATIBLE_VARIABLEREF_TYPE= "The type '{1}' of variable reference is not compatible with the type '{2}' of its definition.";
+	public static final String VTCLValidationErrorCodes_INCOMPATIBLE_TYPE_IN_UPDATE= "Type incompatible assignment: left value is of type '{1}', right value is of type '{2}'.";
+	public static final String VTCLValidationErrorCodes_INCOMPATIBLE_INITIALVALUE_TYPE= "Type incompatible initialization: expecting a term of type '{1}' instead of '{2}'.";
+//	public static final String VTCLValidationErrorCodes_MODELELEM_CONSTANT_INSTEADOF_VARIABLE = "Model element constant '{1}' is non-existing in the model space. However, there is definition for variable {2}";
+	public static final String InvalidVTCL_ERROR_ = "INVALID VTCL ERROR";
+	public static final String ErrorReport_RowColumn = "Error Report_RowColumn";
+	
+	public static final String ExplanationCode_INVALIDNUMBER = "Number constants cannot be used here";
+	public static final String ExplanationCode_REFSTARTCAPITAL = "Variable and Parameter names should start with a capital letter";
+}
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/loader/VTCLParseController.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/loader/VTCLParseController.java
new file mode 100644
index 0000000..0c26f63
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/loader/VTCLParseController.java
@@ -0,0 +1,344 @@
+/**
+* Copyright (c) 2007 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*/
+
+package org.eclipse.viatra2.lpgparser.loader;
+
+import java.io.IOException;
+import java.util.List;
+
+import lpg.lpgjavaruntime.DiagnoseParser;
+import lpg.lpgjavaruntime.ParseTable;
+
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.errors.info.ErrorInformation;
+import org.eclipse.viatra2.errors.info.ErrorInformation.ErrorSeverity;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module;
+import org.eclipse.viatra2.lpgparser.Option;
+import org.eclipse.viatra2.lpgparser.VTCLLexer;
+import org.eclipse.viatra2.lpgparser.VTCLParser;
+import org.eclipse.viatra2.lpgparser.VTCLParserprs;
+import org.eclipse.viatra2.lpgparser.ast.ASTNode;
+import org.eclipse.viatra2.lpgparser.modelbuilder.VTCLModelBuilder;
+import org.eclipse.viatra2.lpgparser.modelbuilder.VTCLModelResolver;
+import org.eclipse.viatra2.lpgparser.typechecker.VTCLTypeChecker;
+import org.eclipse.viatra2.natives.ASMNativeFunction;
+
+/**
+ * This class is responsible for calling the parser and the model builder for 
+ * a given file. It stores the AST and, in case of successful build process, 
+ * it also stores the GTASM machine.  
+ * @author Daniel Varro
+ *
+ */
+public class VTCLParseController  {
+
+	protected ASTNode fAst;
+	protected VTCLParser fParser;
+	protected VTCLModelResolver fModelResolver;
+	protected VTCLModelBuilder fModelBuilder;
+	protected VTCLTypeChecker fTypeChecker;
+	protected VTCLLexer fLexer;
+//	protected IASTNodeLocator fNodeLocator;
+
+	protected Module fVtclModule;
+	protected String fFileName;
+	protected IFramework fFramework;
+	
+	protected List<ErrorInformation> errors;
+
+    protected char fKeywords[][];
+    protected boolean fIsKeyword[];
+
+    public VTCLModelResolver getModelResolver() {
+    	return fModelResolver;
+    }
+
+    public VTCLModelBuilder getModelBuilder() {
+    	return fModelBuilder;
+    }
+    
+    public VTCLTypeChecker getTypeChecker() {
+    	return fTypeChecker;
+    }
+    
+	public String getFileName() {
+		return fFileName;
+	}
+	
+//	public IFramework getFramework() {
+//		return fFramework;
+//	}
+	
+	public VTCLParser getParser() {
+		return fParser;
+	}
+
+	public VTCLLexer getLexer() {
+		return fLexer;
+	}
+
+	public Module getModule() {
+		return fVtclModule;
+	}
+	
+//	public IASTNodeLocator getNodeLocator() {
+//		return fNodeLocator;
+//	}
+	
+	public Machine getMachine() {
+		if (fVtclModule!=null)
+		{
+			if (fVtclModule.getMachine()!=null)
+			{
+				return fVtclModule.getMachine().get(0);
+			}
+		}
+		return null;
+	}
+	
+	public ASTNode getCurrentAst() {
+		return fAst;
+	}
+
+	public boolean hasErrors() {
+		if (!errors.isEmpty()) {
+			for (ErrorInformation error : errors) {
+				if (error.getErrorSeverity().compareTo(ErrorSeverity.ERROR) == 0) {
+					return true;
+				}
+			}
+			return false;
+		}
+		else return false;
+	}
+	
+	public List<ErrorInformation> getErrors() {
+		return errors;
+	}
+
+
+
+	public void initialize(String filename, IFramework framework) {
+		fFileName = filename;
+		fFramework = framework;
+		if (errors != null) {
+			errors.clear();
+		}
+		//if (fParser == null || fLexer == null) {
+		createLexerAndParser();
+		//}
+		if (fModelBuilder == null) {
+			createModelBuilder();
+		}
+		// Clearing error lists
+    	fParser.clearParseErrorList();
+    	fModelResolver.clearAllReferenceErrors();
+    	fTypeChecker.clearAllTypeErrors();
+	}
+	
+//	public void terminate() {
+//		fFileName = null;
+//		fFramework = null;
+//		fLexer = null;
+//		fParser = null;
+//		errors.clear();
+//		errors.null;
+//	}
+
+	private void createModelBuilder() {
+        if (fFramework != null) {
+        	IModelSpace modelSpace = fFramework.getTopmodel();
+        	// Retrieve native functions from framework
+        	ASMNativeFunction[] asmNativeFunctions = fFramework.getNativeFunctionManager().getAllNativeFunctions();
+        	// Creating model builder
+        	fModelBuilder = new VTCLModelBuilder(modelSpace, asmNativeFunctions);
+        	// Setting the file name for the model builder
+        	fModelBuilder.setFileName(fFileName);
+        	// Setting the model resolver
+        	fModelResolver = fModelBuilder.getModelResolver();
+        	fTypeChecker = fModelBuilder.getTypeChecker();
+        }
+	}
+	
+	private void createLexerAndParser() {
+		String[] args = new String[]{"-d", fFileName};
+		Option option;
+		try {
+            option = new Option(args);
+            option.readInputChars();
+            fLexer = new VTCLLexer(option.getInputChars(), option.getFileName()); // Create the lexer
+            fLexer.setTab(4);
+            fParser = new VTCLParser(fLexer);
+			//fParser = new VTCLParser(fLexer.getLexStream());
+            // Setting message handler (available from LPG 2.0)
+			//IMessageHandler handler = new ErrorMessageCreator(fParser);
+            //fParser.setMessageHandler(handler);
+//            fNodeLocator = new AstLocator();
+		} catch (IOException e) {
+			throw new Error(e);
+		}
+	}
+
+//	public ParserResult parseAndBuild(IProgressMonitor monitor) throws VPMRuntimeException
+	public void parseAndBuild() throws VPMRuntimeException
+	{
+//		MyMonitor my_monitor= new MyMonitor(monitor);		
+    	parse();
+    	if (fAst != null && !hasErrors())
+    	{
+    		build();
+            // Returns with ParserResult
+            //return new ParserResult(errors, fVtclModule);
+        }
+		//return null;
+	}
+
+	/**
+	 * build() should be never called without a previous successful call to parse()
+	 */
+	protected void build() {
+		if (fAst != null)
+		{
+			// Clear reference errors
+        	fModelResolver.clearAllReferenceErrors();
+        	// Clear all type errors
+        	fTypeChecker.clearAllTypeErrors();
+			// Initiate model building
+			Module vtclModule = (Module) fAst.accept(fModelBuilder);
+
+			// Reporting model resolution and validation errors
+			errors.addAll(fModelResolver.getAllReferenceErrorInfos());
+			// Update the VTCL module if not null
+			fVtclModule = vtclModule;
+			if (!hasErrors()) {
+				// Initiate type checking if all references are resolved
+				fTypeChecker.doTypeChecking();
+				// Reporting type errors
+				errors.addAll(fTypeChecker.getAllTypeErrorInfos());
+			}
+			else {
+				// Clear all elements scheduled for type checking in case of errors
+				fTypeChecker.initializeTypeChecker();
+			}
+		}	
+	}
+
+	protected void parse() {
+        try
+        {
+        	// Initialization (available from LPG 2.0)
+//        	fLexer.initialize(fFileName);
+//        	fParser.resetTokenStream();        	
+        	// Clear all errors
+        	fParser.clearParseErrorList();
+    		if (errors != null) {
+    			errors.clear();
+    		}
+        	
+        	// Lex the stream to produce the token stream
+            fLexer.lexer(fParser); 
+            
+            // Parse the token stream to produce an AST
+//            ASTNode ast = fParser.parser(-1); // TODO: Needed for LPG 2.0 
+            ASTNode ast = fParser.parser(100);
+            
+            // Check if there are parser errors 
+            int errorIndex = fParser.getTokens().size() - 1;
+            if (fParser.getFirstRealToken(errorIndex) != errorIndex) {
+            	ParseTable prsTable = new VTCLParserprs();
+    			//ParseTable prsTable = fParser.getParseTable();
+    			DiagnoseParser diagnoseParser = new DiagnoseParser(fParser, prsTable );
+    			diagnoseParser.diagnose();
+            }
+
+            // If the AST is valid, then save it
+            if (ast != null) {
+            	fAst = ast;
+            }
+            errors = fParser.getAllErrorInfos();
+            // Initialize keywords on first run
+        	if (fKeywords == null)
+        	    initKeywords();
+            // Return ParserResult (with existing VTCL Module) 
+        }
+        catch (Exception e)
+        {
+            System.err.println(e.getMessage());
+            e.printStackTrace();
+        }
+		
+	}
+	
+	public void parseOnly() throws VPMRuntimeException 
+//	public ParserResult parseOnly(IProgressMonitor monitor) throws VPMRuntimeException 
+	{
+//		MyMonitor my_monitor= new MyMonitor(monitor);
+    	parse();
+        //return new ParserResult(errors, fVtclModule);
+    	// Return no VTCLModule in case of parseOnly
+    	//return new ParserResult(errors, null);
+	}
+
+    private void initKeywords() {
+    	String tokenKindNames[]= fParser.getParseStream().orderedTerminalSymbols();
+
+    	this.fIsKeyword= new boolean[tokenKindNames.length];
+    	this.fKeywords= new char[tokenKindNames.length][];
+
+    	int[] keywordKinds= fLexer.getKeywordKinds();
+
+    	for(int i= 1; i < keywordKinds.length; i++) {
+    	    int index= fParser.getParseStream().mapKind(keywordKinds[i]);
+    	    fIsKeyword[index]= true;
+    	    fKeywords[index]= fParser.getParseStream().orderedTerminalSymbols()[index].toCharArray();
+    	}
+        }
+
+//    public void exportAST(String fileName) throws IOException {
+//    	System.out.println(fileName);
+//		File f = new File(fileName);
+//		// f.createNewFile();
+//		FileOutputStream stream = new FileOutputStream(f);
+//		exportAST(stream);
+//    }
+//    
+//    private void exportAST(FileOutputStream stream) {
+//		PrintWriter out = new PrintWriter(stream);
+//		out.println("<?xml version=\"1.0\" ?>");
+//		out.println("<AST>");
+//		if (fAst != null) {
+//			visitAstNode(out, fAst);
+//		}
+//		out.println("</AST>");
+//		out.flush();
+//		out.close();
+//		
+//	}
+//    
+//    private void visitAstNode (PrintWriter out, ASTNode node) {
+//    	out.println("<" + node.getClass().getSimpleName() + ">");
+//    	out.print("<leftToken>");
+//    	out.print(node.getLeftIToken().toString());
+//    	out.println("</leftToken>");
+//    	out.print("<rightToken>");
+//    	out.print(node.getRightIToken().toString());
+//    	out.println("</rightToken>");
+//    	for (Iterator iter = node.getChildren().iterator(); iter.hasNext();) {
+//			ASTNode child = (ASTNode) iter.next();
+//			visitAstNode(out, child);
+//		}
+//    	out.println("</" + node.getClass().getSimpleName() + ">");
+//    }
+
+}
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/loader/VTCLParserFactory.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/loader/VTCLParserFactory.java
new file mode 100644
index 0000000..02ae105
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/loader/VTCLParserFactory.java
@@ -0,0 +1,23 @@
+/**
+* Copyright (c) 2008 - 2010 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*/
+package org.eclipse.viatra2.lpgparser.loader;

+

+

+import org.eclipse.viatra2.framework.IFrameworkService;

+import org.eclipse.viatra2.framework.IFrameworkServiceFactory;

+

+public class VTCLParserFactory implements IFrameworkServiceFactory {

+	

+	public IFrameworkService create() {

+		return new VTCLParserManager();

+	}

+

+}

diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/loader/VTCLParserManager.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/loader/VTCLParserManager.java
new file mode 100644
index 0000000..63dd523
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/loader/VTCLParserManager.java
@@ -0,0 +1,91 @@
+/**
+* Copyright (c) 2008 - 2010 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*/
+package org.eclipse.viatra2.lpgparser.loader;

+

+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.framework.IFrameworkService;
+

+public class VTCLParserManager implements IFrameworkService {

+	private Map<String,VTCLParseController> parse_controllers = new HashMap<String, VTCLParseController>();

+	private IFramework framework;

+	

+	

+	/**

+	 * Creates a new {@link VTCLParseController} for a given file

+	 * @param vtclFileName

+	 * @return {@link VTCLParseController}

+	 */

+	public VTCLParseController createParseController(String vtclFileName) {

+		VTCLParseController parseController = parse_controllers.get(vtclFileName);		

+		if (parseController == null) {

+			parseController = new VTCLParseController();

+			parse_controllers.put(vtclFileName, parseController);			

+			// Initialize parse controller

+			parseController.initialize(vtclFileName, framework);

+		} // do nothing if a parse controller is already registered for the file

+		return parseController;

+	}

+

+	/**

+	 * Deletes a new {@link VTCLParseController} for a given file

+	 * @param vtclFileName

+	 */

+	public void deleteParseController(String vtclFileName) {

+		VTCLParseController parseController = parse_controllers.get(vtclFileName); 

+		if (parseController != null) {

+			// TODO: Check if a terminate() method is needed for parseController

+			parse_controllers.remove(vtclFileName);			

+		}

+	}

+

+	/**

+	 * Looks up the {@link VTCLParseController} associated to a given file name
+	 * @param vtclFileName 
+	 * @return the corresponding parse controller

+	 */

+	public VTCLParseController lookupParseController(String vtclFileName) {

+		VTCLParseController parseController = parse_controllers.get(vtclFileName);

+		if (parseController != null) {

+			return parseController;

+		}

+		else {

+			return null;

+		}

+		

+	}

+

+	/**

+	 * Looks up the {@link VTCLParseController} associated to a given file, and

+	 * creates a new one if none exists.

+	 * @param vtclFileName

+	 * @return {@link VTCLParseController}

+	 */

+	public VTCLParseController lookupAndCreateParseController(String vtclFileName) {

+		VTCLParseController parseController = lookupParseController(vtclFileName); 

+		if (parseController != null) {

+			parseController.initialize(vtclFileName, framework);

+			return parseController;

+		}

+		else {

+			return createParseController(vtclFileName);

+		}

+	}

+	

+	public void init(IFramework fw) {

+		this.framework = fw;

+		

+	}

+

+

+}

diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/modelbuilder/IAnnotationKeys.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/modelbuilder/IAnnotationKeys.java
new file mode 100644
index 0000000..ad5674f
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/modelbuilder/IAnnotationKeys.java
@@ -0,0 +1,31 @@
+/**
+* Copyright (c) 2007 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*/
+
+package org.eclipse.viatra2.lpgparser.modelbuilder;
+
+import org.eclipse.viatra2.gtasm.support.helper.GTASMHelper;
+
+public interface IAnnotationKeys 
+{
+	/**
+	 * @deprecated Use {@link GTASMHelper#NODE_INFORMATION} instead
+	 */
+	public static final String NODE_INFORMATION = GTASMHelper.NODE_INFORMATION;
+	/**
+	 * @deprecated Use {@link GTASMHelper#NODE_OFFSET} instead
+	 */
+	public static final String NODE_OFFSET = GTASMHelper.NODE_OFFSET;
+	public static final String ASMFUN_REFERENCE = "asmfun_ref";
+	public static final String ASMRULE_REFERENCE = "asmrule_ref";
+	public static final String VARIABLE_REFERENCE = "var_ref";
+	public static final String PATTERN_REFERENCE = "pattern_ref";
+	public static final String GTRULE_REFERENCE = "gtrule_ref";
+}
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/modelbuilder/ModelBuilderHelper.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/modelbuilder/ModelBuilderHelper.java
new file mode 100644
index 0000000..8647db9
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/modelbuilder/ModelBuilderHelper.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2009-2011, Zoltan Ujhelyi and Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+
+/**
+ * 
+ */
+package org.eclipse.viatra2.lpgparser.modelbuilder;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.viatra2.errors.info.Location;
+import org.eclipse.viatra2.gtasm.support.helper.GTASMHelper;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation;
+
+/**
+ * Helper methods for the model builder and type resolver classes
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class ModelBuilderHelper {
+
+	/**
+	 * Returns the annotation of a ModelElement corresponding to a specific
+	 * annotation key
+	 * @param key
+	 *            {@link IAnnotationKeys}, typically the location
+	 * @param annotations
+	 *            the list of annotation of the model element
+	 * @return annotation the first {@link Annotation} stored at the specific
+	 *         key
+	 */
+	public static Annotation lookupAnnotation(String key, List<Annotation> annotations) {
+		boolean found = false;
+		Annotation annotation = null;
+		// Seek for pattern variable in the symbolic parameters of the pattern
+		// header
+		Iterator<Annotation> iter1 = annotations.iterator();
+		while (!found && iter1.hasNext()) {
+			annotation = iter1.next();
+			// Check if the names are corresponding
+			if (annotation.getKey().equals(key)) {
+				found = true;
+			}
+		}
+		return annotation;
+
+	}
+	
+	public static Location createLocationInfo(AnnotatedElement node) {
+		EList<Annotation> annotations = node.getAnnotations();
+		Location location = createLocationInfo(annotations);
+		return location;
+	}
+
+	/**
+	 * Calculates the location information from a list of annotations. If no
+	 * location annotations are present in the list, it returns a location with
+	 * (0,0,0,0) user-readable and (0:0) offset-value.
+	 * @param annotations
+	 *            a non-null list of annotations
+	 * @return the created location
+	 */
+	public static Location createLocationInfo(List<Annotation> annotations) {
+		// Report reference resolution error
+		Annotation locInfo = ModelBuilderHelper.lookupAnnotation(GTASMHelper.NODE_INFORMATION,
+				annotations);
+		Annotation offsetInfo = ModelBuilderHelper.lookupAnnotation(GTASMHelper.NODE_OFFSET, annotations);
+		// Handle empty annotations
+		String locationStr = (locInfo != null) ? locInfo.getValue()
+				: "0,0,0,0";
+		String offsetStr = (offsetInfo != null) ? offsetInfo.getValue() : "0:0";
+		Location location = new Location(locationStr, offsetStr);
+		return location;
+	}
+}
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/modelbuilder/VTCLModelBuilder.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/modelbuilder/VTCLModelBuilder.java
new file mode 100644
index 0000000..603ee69
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/modelbuilder/VTCLModelBuilder.java
@@ -0,0 +1,5268 @@
+/**

+* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.

+* All rights reserved.   This program and the accompanying materials

+* are made available under the terms of the Eclipse Public License v1.0

+* which accompanies this distribution, and is available at

+* http://www.eclipse.org/legal/epl-v10.html

+*

+* Contributors:

+*   Daniel Varro - Initial API and implementation

+*/

+

+package org.eclipse.viatra2.lpgparser.modelbuilder;

+

+import java.io.File;

+import java.util.ArrayList;

+import java.util.Iterator;

+import java.util.List;

+

+import lpg.lpgjavaruntime.DiagnoseParser;

+import lpg.lpgjavaruntime.IToken;

+

+import org.apache.commons.lang.StringEscapeUtils;

+import org.eclipse.viatra2.core.IModelSpace;

+import org.eclipse.viatra2.errors.info.Location;

+import org.eclipse.viatra2.gtasm.support.helper.GTASMHelper;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ChooseRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CollectionIteratorRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRulesFactory;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ForallRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.IterateRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.LetRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.NestedRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.ParallelRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.RandomRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.SequentialRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.WhenRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.CoreFactory;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.RuntimeAnnotationElement;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.impl.CoreFactoryImpl;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ChangeEvent;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsFactory;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ImportDeclaration;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.NamespaceDefinition;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ChangeKind;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ContainmentMode;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.CopySemantics;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DeleteSemantics;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.DirectionKind;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.LogLevel;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.MultiplicityKind;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.FailRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.LogRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintLnRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.PrintRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateVariable;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SimpleRulesFactory;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.SkipRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.impl.SimpleRulesFactoryImpl;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.NativeFunctionInvocation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.TermsFactory;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.And;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.BuiltInFunctionsFactory;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ConversionOperation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Division;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Equals;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Minus;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Multiply;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Not;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.NotEquals;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Or;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Plus;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.RelationalOperation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Remainder;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.XOr;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.ContainmentConstraint;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTMatchCounter;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtFactory;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.NonInjectivityConstraint;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableAssignment;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableConstraint;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.CopymoveFactory;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.ModelCopyRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.copymove.MoveRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateInstanceOf;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreateSupertypeOf;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.CreationFactory;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.ElementCreateRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.EntityCreateRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationshipCreateRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteInstanceOf;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeleteSupertypeOf;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.DeletionFactory;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.ElementDeleteRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.deletion.RelationshipDeleteRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.SetRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.update.UpdateFactory;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.ElementReference;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.QueryFunctionsFactory;

+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelFactory;

+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity;

+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;

+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation;

+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.SupertypeOf;

+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.TypeOf;

+import org.eclipse.viatra2.lpgparser.ast.*;

+import org.eclipse.viatra2.lpgparser.typechecker.VTCLTypeChecker;

+import org.eclipse.viatra2.natives.ASMNativeFunction;

+

+/**

+ * This class implements a recursive traversal of the VTCL AST in order to build

+ * an EMF representation of the VTCL program.

+ *

+ * @author Daniel Varro

+ *

+ */

+public class VTCLModelBuilder extends AbstractResultVisitor {

+

+	private VTCLModelResolver modelResolver = null;

+	private VTCLTypeChecker typeChecker = null;

+

+	public VTCLModelBuilder(IModelSpace modelSpace, ASMNativeFunction[] asmNativeFunctions) {

+		modelResolver = new VTCLModelResolver( modelSpace, asmNativeFunctions);

+		typeChecker = new VTCLTypeChecker(modelSpace);

+		//modelResolver.setTypeAssignments(typeChecker.getTypeAssignments());

+	}

+

+	public VTCLTypeChecker getTypeChecker() {

+		return typeChecker;

+	}

+

+	public VTCLModelResolver getModelResolver()  {

+		return modelResolver;

+	}

+

+	private String fileName = "";

+	public String getFileName() {

+		return fileName;

+	}

+

+	public void setFileName(String fileName) {

+		this.fileName = fileName;

+	}

+

+

+

+	private DiagnoseParser diagnoseParser = null;

+	public DiagnoseParser getDiagnoseParser() {

+		return diagnoseParser;

+	}

+

+	public void setDiagnoseParser(DiagnoseParser diagnoseParser) {

+		this.diagnoseParser = diagnoseParser;

+	}

+

+//	private Object diagnoseOnce(VTCLParser parser) {

+//		if (getDiagnoseParser() == null) {

+//			ParseTable prsTable = new VTCLParserprs();

+//			DiagnoseParser diagnoseParser = new DiagnoseParser(parser, prsTable );

+//			setDiagnoseParser(diagnoseParser);

+////			diagnoseParser.diagnose(n.getEnvironment().badToken());

+//			diagnoseParser.diagnose();

+//		}

+//		return null;

+//

+//	}

+

+	/**

+	 * Removes the "s surrounding a quoted string, if any.

+	 *

+	 * @param quoted a possibly quoted string

+	 * @return <code>quoted</code> without the surrounding quotes, or just

+	 *	 <code>quoted</code> verbatim if there were none

+	 */

+	private String unquote(String quoted) {

+		String result = quoted;

+

+		if ((result != null) && (result.length() > 1)) {

+			int max = result.length() - 1;

+

+			if ((result.charAt(0) == '"') && (quoted.charAt(max) == '"')) {

+				result = result.substring(1, max);

+				// this is a regexp, so the backslash needs to be

+				//   re-escaped, thus "\\" is rendered in a Java

+				//   string literal as "\\\\"

+				result = result.replaceAll("\\\\\"", "\"");  //$NON-NLS-2$//$NON-NLS-1$

+			}

+			else if ((result.charAt(0) == '\'') && (quoted.charAt(max) == '\'')) {

+				result = result.substring(1, max);

+				// Maybe, the following line should be \\\\\" instead of \\\\\'

+				result = result.replaceAll("\\\\\'", "\'");  //$NON-NLS-2$//$NON-NLS-1$

+			}

+		}

+		return result;

+	}

+

+

+//	/**

+//	* Creates an annotation to store the fully qualified name of

+//	* referenced elements for the second run (to resolve references)

+//	*

+//	* @param element : a GTASMElement (from the model)

+//	* @param kind : AnnotationKey

+//	* @param value : the String to be stored

+//	*/

+//	@SuppressWarnings("unchecked")

+//	private void annotateElement(GTASMElement element, String kind, String value) {

+//	Annotation info = CoreFactoryImpl.eINSTANCE.createAnnotation();

+//	info.setKey(kind);

+//	info.setValue(value);

+//	element.getAnnotations().add(info);

+//	}

+

+	/**

+	 * Copies line and column information as annotation to the model element

+	 * This node is called whenever a new GTASM model element is created

+	 *

+	 * @param node : an ASTNode node (from the AST)

+	 * @param element : a GTASMElement (from the model)

+	 */

+	private void createNodeInfoFor(ASTNode node, AnnotatedElement element)

+	{

+		element.getAnnotations().add( createNodeInfoFrom(node));

+		element.getAnnotations().add( createNodeOffsetFrom(node));

+	}

+

+	private Annotation createNodeInfoFrom(ASTNode node)

+	{

+		Annotation nodeInfo = CoreFactoryImpl.eINSTANCE.createAnnotation();

+		nodeInfo.setKey(GTASMHelper.NODE_INFORMATION);

+		int bl = node.getLeftIToken().getLine();

+		int bc = node.getLeftIToken().getColumn();

+		int el = node.getRightIToken().getEndLine();

+		int ec = node.getRightIToken().getEndColumn();

+		if (bl == el && bc == ec) {

+			ec = ec + 1;

+		}

+		Location location = new Location(bl, bc, el, ec);

+		String value = location.toString();

+		nodeInfo.setValue(value);

+		return nodeInfo;

+	}

+

+	private Annotation createNodeOffsetFrom(ASTNode node) {

+		Annotation nodeOffset = CoreFactoryImpl.eINSTANCE.createAnnotation();

+		nodeOffset.setKey(GTASMHelper.NODE_OFFSET);

+		int start = node.getLeftIToken().getStartOffset();

+		int end = node.getRightIToken().getEndOffset();

+		String value = String.format("%d:%d", start, end);

+		nodeOffset.setValue(value);

+		return nodeOffset;

+	}

+

+	/**

+	 * Copies line annotation from one GTASMElement to the other

+	 * @param fromElem

+	 * @param toElem

+	 */

+	private void copyNodeInfoFrom(GTASMElement fromElem, GTASMElement toElem) {

+		String locStr = GTASMHelper.extractAnnotation(fromElem, GTASMHelper.NODE_INFORMATION);

+		if (locStr != "") {

+			Annotation nodeInfo = CoreFactoryImpl.eINSTANCE.createAnnotation();

+			nodeInfo.setKey(GTASMHelper.NODE_INFORMATION);

+			nodeInfo.setValue(locStr);

+			toElem.getAnnotations().add( nodeInfo);

+		}

+		String offsetStr = GTASMHelper.extractAnnotation(toElem, GTASMHelper.NODE_OFFSET);

+		if (offsetStr != "") {

+			Annotation nodeOffset = CoreFactoryImpl.eINSTANCE.createAnnotation();

+			nodeOffset.setKey(GTASMHelper.NODE_OFFSET);

+			nodeOffset.setValue(offsetStr);

+			toElem.getAnnotations().add( nodeOffset);

+		}

+	}

+

+

+	@Override

+	public Object unimplementedVisitor(String s) {

+		System.out.println(s);

+		return String.valueOf("UnimplementedVisitor");

+	}

+

+	@Override

+	public Object visit(VTCLFile n) {

+		Module emfModule = DefinitionsFactory.eINSTANCE.createModule();

+		if (n.getNamespaceDefAST() != null) {

+			n.getNamespaceDefAST().accept(this, emfModule);

+		}

+

+		if (n.getNamespaceImportsAST() != null) {

+			n.getNamespaceImportsAST().accept(this, emfModule);

+		}

+		n.getGTASMDefAST().accept(this, emfModule);

+		// Set File Name of Module

+		emfModule.setFileName(fileName);

+		// Set Name of Module to be short file name -- Istvan

+		File f = new File(fileName);

+		emfModule.setName(f.getName());

+		return emfModule;

+	}

+

+	/**

+	 * Visiting a {@link NamespaceDefAST} AST node and

+	 * creating a {@link NamespaceDefinition} model element

+	 * @param n : {@link NamespaceDefAST}

+	 * @param o : {@link Module}

+	 */

+	@Override

+	public Object visit(NamespaceDefAST n, Object o) {

+		Module emfModule = (Module) o;

+		String namespaceFqn = (String) n.getQualifiedTypeNameAST().accept(this);

+		NamespaceDefinition namespace = DefinitionsFactory.eINSTANCE.createNamespaceDefinition();

+		namespace.setNamespaceValue(namespaceFqn);

+		namespace.setName(namespace.getNamespaceValue());

+		emfModule.setNamespace(namespace);

+		createNodeInfoFor(n,namespace);

+		return namespace;

+	}

+

+

+//	/**

+//	* Visiting a {@link NamespaceDefAST1} (ERROR_TOKEN)

+//	* @param n : {@link NamespaceDefAST1}

+//	*/

+//	@Override

+//	public Object visit(NamespaceDefAST1 n, Object o) {

+//	ParseTable prsTable = new VTCLParserprs();

+//	DiagnoseParser diagnoseParser = new DiagnoseParser(n.getEnvironment(), prsTable );

+//	diagnoseParser.diagnose(n.getEnvironment().badToken());

+//	return null;

+//	}

+

+

+

+	/**

+	 * Visiting a {@link NamespaceImportsAST} AST node to process

+	 * all Namespace imports one by one

+	 * @param n : {@link NamespaceImportAST0}

+	 */

+	@Override

+	public Object visit(NamespaceImportsAST n, Object o) {

+		Module emfModule = (Module) o;

+		// First add the left-most declarations

+		if (n.getNamespaceImportsAST() != null) {

+			n.getNamespaceImportsAST().accept(this, emfModule);

+		}

+		// Then add the right-most (unprocessed) declaration

+		ImportDeclaration importDecl = (ImportDeclaration) n.getNamespaceImportAST().accept(this);

+		if (importDecl != null) {

+			emfModule.getImport().add(importDecl);

+			importDecl.setName(importDecl.getImportValue());

+		}

+		return emfModule;

+	}

+

+

+	/**

+	 * Visiting a {@link NamespaceImportAST0}, and

+	 * creating an {@link ImportDeclaration}

+	 * @param n : {@link NamespaceImportAST0}

+	 */

+	@Override

+	public Object visit(NamespaceImportAST0 n) {

+		// Import declaration is valid

+		String importStr = (String) n.getQualifiedTypeNameAST().accept(this);

+		ImportDeclaration importDecl = DefinitionsFactory.eINSTANCE.createImportDeclaration();

+		importDecl.setImportValue(importStr);

+		createNodeInfoFor(n,importDecl);

+		modelResolver.resolveNamespaceImport(importDecl);

+		return importDecl;

+	}

+

+	/**

+	 * Visiting a {@link NamespaceImportAST1} (ERROR_TOKEN)

+	 * @param n : {@link NamespaceImportAST1}

+	 */

+	@Override

+	public Object visit(NamespaceImportAST1 n) {

+		return null;

+		//return diagnoseOnce(n.getEnvironment());

+	}

+

+	/**

+	 * Visiting a GTASMDefAST node

+	 * and creating a Machine  model element

+	 * @param n : Current AST node of type GTASMDefAST

+	 * @param o : a VTCL Module

+	 */

+	@Override

+	public Object visit(GTASMDefAST n, Object o) {

+		Module emfModule = (Module) o;

+		// Creating a new Machine

+		Machine emfMachine = DefinitionsFactory.eINSTANCE.createMachine();

+		// Initializing buffers for unresolved elements

+		modelResolver.setMachine(emfMachine);

+		modelResolver.clearBuffers();

+		// Setting its name and namespace

+		String localName = (String) n.getTypeNameAST().accept(this);

+		NamespaceDefinition namespace = emfModule.getNamespace();

+		emfMachine.setName(localName);

+		emfMachine.setFqn(((namespace != null) ? namespace.getNamespaceValue() + "." + localName : localName ) );

+		// Adding the Machine to the Module

+		emfModule.getMachine().add(emfMachine);

+		// Processing the contents

+		n.getMachineContentsAST().accept(this, emfMachine);

+		createNodeInfoFor(n, emfMachine);

+		// Processing runtime annotations

+		if (n.getOptAnnotationsAST() != null) {

+			n.getOptAnnotationsAST().accept(this, emfMachine.getRuntimeAnnotations());

+		}

+		//Loading documentation

+		loadDocumentationComments(n, emfMachine);

+		modelResolver.resolveModel();

+		return emfModule;

+	}

+

+	/**

+	 * Visiting a MachineContentsAST node

+	 * @param n : Current AST node of type MachineContentsAST

+	 * @param o : a Machine

+	 */

+	@Override

+	public Object visit(MachineContentsAST n, Object o) {

+		Machine asmMachine = (Machine) o;

+		n.getMachineContentsAST().accept(this, asmMachine);

+		n.getMachineContentAST().accept(this, asmMachine);

+		return asmMachine;

+	}

+

+

+

+	@Override

+	public Object visit(MachineContentAST n) {

+		return null;

+		//return diagnoseOnce(n.getEnvironment());

+	}

+	@Override

+	public Object visit(MachineContentAST n, Object o) {

+		return visit(n);

+	}

+

+	/**

+	 * Visiting an AsmRuleDefAST node and

+	 * creating an (ASM) Rule

+	 * @param n : Current AST node of type AsmRuleDefAST

+	 * @param o : a Machine

+	 */

+	@Override

+	public Object visit(AsmRuleDefAST n, Object o) {

+		Machine asmMachine = (Machine) o;

+		Rule asmRule = DefinitionsFactory.eINSTANCE.createRule();

+		// Setting the name of the ASM Rule

+		String ruleStr = (String) n.getTypeNameAST().accept(this);

+		asmRule.setName(ruleStr);

+		asmRule.setFqn( asmMachine.getFqn() + "." + ruleStr);

+		if (ruleStr.equals( "main")) {

+			asmMachine.setMainRule(asmRule);

+		}

+		asmRule.setNamespace(asmMachine);

+		asmMachine.getAsmRuleDefinitions().add(asmRule);

+		// Process formal parameters

+		n.getDirectedFormalParameterDefAST().accept(this, asmRule.getSymParameters());

+		for (Iterator<SymbolicRuleParameter> iter = asmRule.getSymParameters().iterator(); iter.hasNext();) {

+			SymbolicRuleParameter param = iter.next();

+			asmRule.getLocalVariables().add(param.getVariable());

+		}

+		// Processing the body of the rule

+//		ASMRuleInvocation body =  (ASMRuleInvocation)

+		n.getAsmRuleAST().accept(this, asmRule);

+//		asmRule.setBody(body);

+		createNodeInfoFor(n, asmRule);

+		// Processing runtime annotations

+		if (n.getOptAnnotationsAST() != null) {

+			n.getOptAnnotationsAST().accept(this, asmRule.getRuntimeAnnotations());

+		}

+		//Loading documentation

+		loadDocumentationComments(n, asmRule);

+		return asmMachine;

+	}

+

+

+	/**

+	 * Visiting an AsmRuleAST (ERROR_TOKEN)

+	 * @param n : AsmRuleAST

+	 * @param o :

+	 */

+	@Override

+	public Object visit(AsmRuleAST n, Object o) {

+		return null;

+		//return diagnoseOnce(n.getEnvironment());

+	}

+

+

+//	************** Sec. 5.2.1 Pattern definition ************************** //

+

+

+	/**

+	 * Visiting a GraphPatternDefAST node and creating a GTPattern

+	 * (should be called from a machine)

+	 *

+	 * @param n : GraphPatternDefAST

+	 * @param o : Machine

+	 * @return machine: Machine

+	 */

+	@Override

+	public Object visit(GraphPatternDefAST n, Object o) {

+		Machine machine = (Machine) o;

+		// Create a new GTPattern

+		GTPattern pattern = GtFactory.eINSTANCE.createGTPattern();

+		pattern.setNamespace(machine);

+		pattern.setContainer(machine);

+		// Set non-injective matching strategy if pattern is defined as sharable

+		if (n.getOptShareableDefAST() != null) {

+			pattern.setDistinctMatching(false);

+		}

+		// Default matching strategy is distinct matching

+		else {

+			pattern.setDistinctMatching(true);

+		}

+		// Setting the name of the pattern

+		String patternName = (String) n.getTypeNameAST().accept(this);

+		pattern.setName(patternName);

+		pattern.setFqn(machine.getFqn() + "." + patternName);

+		// Processing symbolic parameters

+		n.getFormalParameterDefAST().accept(this, pattern.getSymParameters());

+		// Processing pattern bodies

+		n.getPatternBodiesAST().accept(this, pattern.getPatternBodies());

+		// Creating node information

+		createNodeInfoFor(n, pattern);

+		// Processing runtime annotations

+		if (n.getOptAnnotationsAST() != null) {

+			n.getOptAnnotationsAST().accept(this, pattern.getRuntimeAnnotations());

+		}

+		//Loading documentation

+		loadDocumentationComments(n, pattern);

+		// Type checking

+		typeChecker.getPatternDefToCheck().add(pattern);

+		return machine;

+	}

+

+	/**

+	 * Visiting a GraphPatternDefAST node and creating a GTPattern

+	 * (should be called from negative patterns or GT Rules)

+	 *

+	 * @param n : {@link GraphPatternDefAST}

+	 * @return pattern : {@link GTPattern}, which is created

+	 */

+	@Override

+	public Object visit(GraphPatternDefAST n) {

+		// Create a new GTPattern

+		GTPattern pattern = GtFactory.eINSTANCE.createGTPattern();

+		// Set non-injective matching strategy if pattern is defined as sharable

+		if (n.getOptShareableDefAST() != null) {

+			pattern.setDistinctMatching(false);

+		}

+		// Default matching strategy is distinct matching

+		else {

+			pattern.setDistinctMatching(true);

+		}

+		// Setting the name of the pattern

+		pattern.setName((String) n.getTypeNameAST().accept(this));

+		// Processing symbolic parameters

+		n.getFormalParameterDefAST().accept(this, pattern.getSymParameters());

+		// Processing pattern bodies

+		n.getPatternBodiesAST().accept(this, pattern.getPatternBodies());

+		// Creating node information

+		createNodeInfoFor(n, pattern);

+		// Processing runtime annotations

+		if (n.getOptAnnotationsAST() != null) {

+			n.getOptAnnotationsAST().accept(this, pattern.getRuntimeAnnotations());

+		}

+		//Loading documentation

+		loadDocumentationComments(n, pattern);

+		// Type checking

+		typeChecker.getPatternDefToCheck().add(pattern);

+		return pattern;

+	}

+

+//	/**

+//	* Visiting a GraphPatternDefAST1 node (ERROR_TOKEN)

+//	*

+//	* @param n : GraphPatternDefAST1

+//	*/

+//	@Override

+//	public Object visit(GraphPatternDefAST1 n) {

+//	if (getDiagnoseParser() == null) {

+//	ParseTable prsTable = new VTCLParserprs();

+//	DiagnoseParser diagnoseParser = new DiagnoseParser(n.getEnvironment(), prsTable );

+//	setDiagnoseParser(diagnoseParser);

+////	diagnoseParser.diagnose(n.getEnvironment().badToken());

+//	diagnoseParser.diagnose();

+//	}

+//	return null;

+//	}

+//	@Override

+//	public Object visit(GraphPatternDefAST1 n, Object o) {

+//	return visit(n);

+//	}

+

+

+

+	/**

+	 * Visiting a PatternBodiesAST node and adding a new GTPatternBody

+	 * to the list of GTPatternBodies of the current GTPattern

+	 *

+	 * @param n : PatternBodiesAST

+	 * @param o : list of {@link GTPatternBody}

+	 * @return pattern : GTPattern

+	 */

+	@Override

+	public Object visit(PatternBodiesAST n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<GTPatternBody> patternList = (List<GTPatternBody>) o;

+		n.getPatternBodiesAST().accept(this, patternList);

+		n.getPatternBodyAST().accept(this, patternList);

+		return patternList;

+	}

+

+

+	/**

+	 * Visiting a PatternBodyAST0 node and creating a GTPatternBody

+	 * A new Entity is also created as the top-level container of the pattern graph

+	 *

+	 * @param n : PatternBodyAST0

+	 * @param o : List (of GTPatternBody)

+	 * @return patternList : of GTPatternBody containing the current body

+	 */

+	@Override

+	public Object visit(PatternBodyAST n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<GTPatternBody> patternList = (List<GTPatternBody>) o;

+		GTPatternBody body = GtFactory.eINSTANCE.createGTPatternBody();

+		// Clearing helper collections

+		modelResolver.getOrphanBodyElements(body).clear();

+		modelResolver.getUnresolvedPatternVariableRefs(body).clear();

+		modelResolver.getBodyMapElement4Var(body).clear();

+		modelResolver.getBodyMapVar4Element(body).clear();

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		// Create a new container entity for local pattern elements

+		Entity topElement = EditmodelFactory.eINSTANCE.createEntity();

+		topElement.setName("top");

+		body.setPatternGraph(topElement);

+		// Add the new body to the GTPattern

+		patternList.add(body);

+		// Process the contents of the pattern body

+		if (n.getPatternBodyContentsAST() != null) {

+			n.getPatternBodyContentsAST().accept(this, body);

+		}

+		createNodeInfoFor(n, topElement);

+		// Resolve model element references

+		modelResolver.resolveModelElementReferences(body);

+		modelResolver.resolvePatternVariableRefs(body);

+		modelResolver.resolveVariableRefsInRule(body);

+		// Type checking for the check condition is carried out as for regular terms

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		// Resolving type strings

+		modelResolver.resolveEntityTypesInBody(body);

+		modelResolver.resolveRelationTypesInBody(body);

+		// Report if a pattern parameter is not used in the body

+		modelResolver.reportUnusedPatternParameter(body);

+		return patternList;

+	}

+

+//	/**

+//	* Visiting a PatternBodyAST1 node (ERROR_TOKEN)

+//	*

+//	* @param n : PatternBodyAST1

+//	* @param o : GTPattern

+//	*/

+//	@Override

+//	public Object visit(PatternBodyAST1 n, Object o) {

+//	ParseTable prsTable = new VTCLParserprs();

+//	DiagnoseParser diagnoseParser = new DiagnoseParser(n.getEnvironment(), prsTable );

+//	diagnoseParser.diagnose(n.getEnvironment().badToken());

+//	return o;

+//	}

+

+	/**

+	 * Visiting a PatternBodyContentAST node (ERROR_TOKEN)

+	 *

+	 * @param n : PatternBodyContentAST

+	 * @param o : GTPatternBody

+	 */

+	@Override

+	public Object visit(PatternBodyContentAST n, Object o) {

+		return null;

+		//return diagnoseOnce(n.getEnvironment());

+	}

+

+	/**

+	 * Visiting a PatternBodyContentsAST node and processing the next BodyContent

+	 * (Entity, Relation, Relationship, PatternComposition, NegativePattern,

+	 * PatternVariableAssignment, CheckCondition)

+	 *

+	 * @param n : PatternBodyContentAST

+	 * @param o : GTPatternBody

+	 */

+	@Override

+	public Object visit(PatternBodyContentsAST n, Object o) {

+		GTPatternBody body = (GTPatternBody) o;

+		if (n.getPatternBodyContentsAST() != null) {

+			// Clearing the helper attribute storing orphan pattern elements

+			// Processing pattern body content

+			n.getPatternBodyContentsAST().accept(this, body);

+			// Resolving model element references for relations and relationships within pattern

+		}

+		n.getPatternBodyContentDefAST().accept(this, body);

+		return body;

+	}

+

+	/**

+	 * Visiting a PatternCompositionAST node and creating a GTPatternCall

+	 * (should be called from as part of a normal pattern body)

+	 *

+	 * @param n : PatternCompositionAST

+	 * @param o : GTPatternBody

+	 * @return body : GTPatternBody

+	 */

+	@Override

+	public Object visit(PatternCompositionAST n, Object o) {

+		GTPatternBody body = (GTPatternBody) o;

+		// Create a new GTPatternCall

+		GTPatternCall patternCall = TermsFactory.eINSTANCE.createGTPatternCall();

+		createNodeInfoFor(n, patternCall);

+		// Store the name of the called pattern as the FQN of the patternCall

+		String patternName = (String) n.getQualifiedTypeNameAST().accept(this);

+		patternCall.setFqn(patternName);

+		patternCall.setName(patternName);

+		// Adding the new pattern call to the body

+		body.getCalledPatterns().add(patternCall);

+		// Process the actual parameters of the called pattern

+		n.getActualPatternParameterDefAST().accept(this, patternCall.getActualParameters());

+		for (Term param : patternCall.getActualParameters()) {

+			// Create a PatternVariable definition if varRef cannot be resolved

+			// Return the corresponding PatternVariable, if already defined

+			VariableReference varRef = (VariableReference) param;

+			modelResolver.resolveLocalVariableInPattern(varRef, body);

+			// Type checking

+			typeChecker.getTermsToCheck().add(varRef);

+		}

+		// Type check compatibility of actual parameters

+		typeChecker.getPatternCallToCheck().add(patternCall);

+		if (n.getOptMatchCountAST() != null) {

+			VariableReference varRef = (VariableReference) n.getOptMatchCountAST().accept(this);

+			// Always create a new PatternVariable definition

+			PatternVariable varDef = modelResolver.createPatternVariableFromReference(varRef);

+			body.getLocalVariables().add(varDef);

+			// Create node information for the new variable definition

+			createNodeInfoFor(/*(ASTNode)*/ n.getOptMatchCountAST().getCounterVariableAST(), varDef);

+			// Add variable definition to the local variables of the pattern body

+			body.getLocalVariables().add(varDef);

+			// Create a match counter

+			GTMatchCounter matchCounter = GtFactory.eINSTANCE.createGTMatchCounter();

+			matchCounter.setPatternCall(patternCall);

+			matchCounter.setVariableReference(varRef);

+			// Create node information for the match counter

+			createNodeInfoFor(/*(ASTNode)*/ n.getOptMatchCountAST(), matchCounter);

+		}

+		// Resolve the reference to the called pattern in a later stage

+		modelResolver.getUnresolvedPatternCalls().add(patternCall);

+		return patternCall;

+	}

+

+	/**

+	 * Visiting a PatternCompositionAST node and creating a GTPatternCall

+	 * (should be called from as part of a negative pattern composition)

+	 *

+	 * @param n : PatternCompositionAST

+	 * @return body : GTPatternBody

+	 */

+	@Override

+	public Object visit(PatternCompositionAST n) {

+		// Create a new GTPatternCall

+		GTPatternCall patternCall = TermsFactory.eINSTANCE.createGTPatternCall();

+		// Store the name of the called pattern as the FQN of the patternCall

+		String patternName = (String) n.getQualifiedTypeNameAST().accept(this);

+		patternCall.setFqn(patternName);

+		patternCall.setName(patternName);

+		createNodeInfoFor(n, patternCall);

+		// Process the actual parameters of the called pattern

+		n.getActualPatternParameterDefAST().accept(this, patternCall.getActualParameters());

+		// Type checking the actual parameters?

+		for (Term param : patternCall.getActualParameters()) {

+			VariableReference varRef = (VariableReference) param;

+			// We do not need to call resolveLocalVariableInPattern as negative patterns do not create variables in caller

+			// Type checking for variable references

+			typeChecker.getTermsToCheck().add(varRef);

+		}

+		// Type check compatibility of actual parameters

+		typeChecker.getPatternCallToCheck().add(patternCall);

+		// Initiate to resolve variable references in the caller, NOT here

+		// Resolve the reference to the called pattern in a later stage

+		modelResolver.getUnresolvedPatternCalls().add(patternCall);

+		return patternCall;

+	}

+

+

+	/**

+	 * Visiting a NegativePatternAST0 node (Negative pattern call)

+	 * and creating a negative GTPatternCall

+	 *

+	 * @param n : NegativePatternAST0

+	 * @param o : GTPatternBody

+	 * @return body : GTPatternBody

+	 */

+	@Override

+	public Object visit(NegativePatternAST n, Object o) {

+		GTPatternBody body = (GTPatternBody) o;

+		GTPatternCall patternCall = (GTPatternCall) n.getPatternCompositionAST().accept(this);

+		if (patternCall != null) {

+			body.getNegativePatterns().add(patternCall);

+			// Resolve variable references in a later stage

+			for (Term param : patternCall.getActualParameters()) {

+				VariableReference varRef = (VariableReference) param;

+				modelResolver.resolveLocalVariableInPattern(varRef, body);

+				// Type checking for variable references

+				typeChecker.getTermsToCheck().add(varRef);

+			}

+		}

+		// Type check compatibility of actual parameters

+		typeChecker.getPatternCallToCheck().add(patternCall);

+		// Match counters are not allowed in negative pattern calls

+		if (n.getPatternCompositionAST().getOptMatchCountAST() != null) {

+			modelResolver.reportInvalidMatchCounter(patternCall, "negative pattern calls");

+		}

+//		// Resolve the reference to the called pattern in a later stage

+//		unresolvedPatternCalls.add(patternCall);

+		return body;

+	}

+

+	/**

+	 * Visiting a {@link PatternBodyContentDefAST0} node (Body content with SEMICOLON)

+	 * and creating a negative GTPatternCall and a GTPattern

+	 *

+	 * @param n : NegativePatternAST1

+	 * @param o : GTPatternBody

+	 * @return body : GTPatternBody

+	 */

+	@Override

+	public Object visit(PatternBodyContentDefAST0 n, Object o) {

+		return n.getPatternBodyContentAST().accept(this, o);

+	}

+

+	/**

+	 * Visiting a {@link PatternBodyContentDefAST1} node (Negative pattern definition)

+	 * and creating a negative GTPatternCall and a GTPattern

+	 *

+	 * @param n : {@link PatternBodyContentDefAST1}

+	 * @param o : {@link GTPatternBody}

+	 * @return body : {@link GTPatternBody}

+	 */

+	@Override

+	public Object visit(PatternBodyContentDefAST1 n, Object o) {

+		GTPatternBody body = (GTPatternBody) o;

+		// Create a local GT pattern definition

+		GTPattern pattern = (GTPattern) n.getGraphPatternDefAST().accept(this);

+		body.getGtPatternDefinitions().add(pattern);

+		pattern.setNamespace(body.getHeader().getNamespace());

+		// Set FQN of the negative pattern

+		String fqn = body.getHeader().getFqn();

+		pattern.setFqn((fqn != null)? fqn + "." + pattern.getName() : pattern.getName());

+		// Create a negative GT pattern call

+		GTPatternCall patternCall = TermsFactory.eINSTANCE.createGTPatternCall();

+		body.getNegativePatterns().add(patternCall);

+		// Set the reference to the locally defined pattern

+		patternCall.setCalledPattern(pattern);

+		// Create actual parameters of the called pattern from the symbolic parameters

+		for (Object symParam: pattern.getSymParameters()) {

+			PatternVariable patternVar = (PatternVariable) symParam;

+			// Create a VariableReference

+			VariableReference varRef = TermsFactory.eINSTANCE.createVariableReference();

+			varRef.setName(patternVar.getName());

+			patternCall.getActualParameters().add(varRef);

+			// Resolve the reference to the variable of the CALLER pattern in a later stage

+			modelResolver.resolveLocalVariableInPattern(varRef, body);

+			// Type checking

+			typeChecker.getTermsToCheck().add(varRef);

+		}

+		copyNodeInfoFrom( pattern, patternCall);

+		return patternCall;

+	}

+

+

+	/**

+	 * Visiting a CheckConditionAST node and

+	 * returning a Term model element

+	 * @param n : Current AST node of type CheckConditionAST

+	 * @param o : GTPatternBody

+	 * @return checkCond : Term

+	 */

+	@Override

+	public Object visit(CheckConditionAST n, Object o) {

+		GTPatternBody body = (GTPatternBody) o;

+		Term checkCond = (Term) n.getLogicalTermAST().accept(this);

+		body.getCheckExpressions().add(checkCond);

+		// Type checking for check condition

+		typeChecker.getTermsToCheck().add(checkCond);

+		return checkCond;

+	}

+

+	/**

+	 * Visiting a PatternVariableAssignmentAST node and

+	 * returning a PatternVariableAssignment model element

+	 * @param n : Current AST node of type PatternVariableAssignmentAST

+	 * @param o : GTPatternBody

+	 * @return the created PatternVariableAssignment

+	 */

+	@Override

+	public Object visit(PatternVariableAssignmentAST n, Object o) {

+		GTPatternBody body = (GTPatternBody) o;

+		// Process left and right values

+		VariableReference left = (VariableReference) n.getPatternVariableRefAST().accept(this);

+		VariableReference right = (VariableReference) n.getPatternVariableRefAST3().accept(this);

+		// Create new PatternVariableAssignment

+		PatternVariableAssignment varAssign = GtFactory.eINSTANCE.createPatternVariableAssignment();

+		varAssign.setName(n.getPatternVariableRefAST().toString());

+//		varAssign.setLeftValue(left);

+//		varAssign.setRightValue(right);

+		body.getVariableAssignments().add(varAssign);

+		// Create node information

+		createNodeInfoFor(n, varAssign);

+//		// Check that left and right values are different

+//		modelResolver.validatePatternVariableConstraint(varAssign);

+//		// Resolve VariableReferences in a later stage

+//		modelResolver.getUnresolvedPatternVariableRefs(body).add(left);

+//		modelResolver.getUnresolvedPatternVariableRefs(body).add(right);

+		createPatternVariableConstraint(varAssign, left, right, body);

+		return varAssign;

+	}

+

+	/**

+	 * Visiting a {@link NonInjectivityConstraintAST} node and

+	 * returning a {@link NonInjectivityConstraint} model element

+	 * @param n : Current AST node of type {@link NonInjectivityConstraintAST}

+	 * @param o : GTPatternBody

+	 * @return the created {@link NonInjectivityConstraint}

+	 */

+	@Override

+	public Object visit(NonInjectivityConstraintAST n, Object o) {

+		GTPatternBody body = (GTPatternBody) o;

+		// Process left and right values

+		VariableReference left = (VariableReference) n.getPatternVariableRefAST().accept(this);

+		VariableReference right = (VariableReference) n.getPatternVariableRefAST3().accept(this);

+		// Create new PatternVariableAssignment

+		NonInjectivityConstraint noninjConstraint = GtFactory.eINSTANCE.createNonInjectivityConstraint();

+		body.getNonInjectivityConstraints().add(noninjConstraint);

+		// Create node information

+		createNodeInfoFor(n, noninjConstraint);

+		createPatternVariableConstraint(noninjConstraint, left, right, body);

+		return noninjConstraint;

+	}

+

+	/**

+	 * Provides uniform handling for pattern variable assignments and non-injectivity constraints

+	 * @param constraint : {@link PatternVariableConstraint}

+	 * @param left : {@link VariableReference}

+	 * @param right : {@link VariableReference}

+	 * @param body : {@link GTPatternBody}

+	 */

+	protected void createPatternVariableConstraint(PatternVariableConstraint constraint,

+			                                      VariableReference left,

+			                                      VariableReference right,

+			                                      GTPatternBody body) {

+		constraint.setLeftValue(left);

+		constraint.setRightValue(right);

+		// Check that left and right values are different

+		modelResolver.validatePatternVariableConstraint(constraint);

+		// Resolve VariableReferences in a later stage

+		modelResolver.getUnresolvedPatternVariableRefs(body).add(left);

+		modelResolver.getUnresolvedPatternVariableRefs(body).add(right);

+	}

+

+	/**

+	 * Visiting a PatternVariableDefAST node (definition) and

+	 * returning a PatternVariable

+	 * @param n : Current AST node of type PatternVariableDefAST

+	 * @return var : PatternVariable

+	 */

+	@Override

+	public Object visit(PatternVariableDefAST n) {

+		PatternVariable var = GtFactory.eINSTANCE.createPatternVariable();

+		var.setName(n.toString());

+		createNodeInfoFor(n, var);

+		return var;

+	}

+

+	/**

+	 * Visiting a PatternVariableDefAST node as part of FormalParamsAST

+	 * returning the parameter list with a VariableReference

+	 * @param n : Current AST node of type PatternVariableRefAST

+	 * @param o : List (of PatternVariable)

+	 * @return parameterList: List (of PatternVariable)

+	 */

+	@Override

+	public Object visit(PatternVariableDefAST n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting a PatternVariableRefAST node (variable reference) and

+	 * returning a VariableReference

+	 * @param n : Current AST node of type PatternVariableRefAST

+	 * @return varRef : VariableReference

+	 */

+	@Override

+	public Object visit(PatternVariableRefAST n) {

+		VariableReference varRef = TermsFactory.eINSTANCE.createVariableReference();

+		varRef.setName(n.toString());

+		createNodeInfoFor(n, varRef);

+		return varRef;

+	}

+

+	/**

+	 * Visiting a PatternVariableRefAST node as part of a ActualParamsPatternVariablesAST

+	 * returning the parameter list with a VariableReference

+	 * @param n : Current AST node of type PatternVariableRefAST

+	 * @param o : List (of VariableReference)

+	 * @return parameterList: List (of VariableReference)

+	 */

+	@Override

+	public Object visit(PatternVariableRefAST n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting a {@link PatternVariableDefRefAST0} node

+	 * (variable definition and reference used in entity and relation definitions)

+	 * and returning a VariableReference

+	 * @param n : Current AST node of type {@link PatternVariableDefRefAST0}

+	 * @return varRef : VariableReference

+	 */

+	@Override

+	public Object visit(PatternVariableDefRefAST0 n) {

+		VariableReference varRef = TermsFactory.eINSTANCE.createVariableReference();

+		varRef.setName(n.toString());

+		createNodeInfoFor(n, varRef);

+		return varRef;

+	}

+

+	/**

+	 * Visiting a {@link PatternVariableDefRefAST1} node

+	 * (variable definition and reference used in entity and relation defs)

+	 * and returning a VariableReference

+	 * @param n : Current AST node of type {@link PatternVariableDefRefAST1}

+	 * @return varRef : VariableReference

+	 */

+	@Override

+	public Object visit(PatternVariableDefRefAST1 n) {

+		VariableReference varRef = TermsFactory.eINSTANCE.createVariableReference();

+		varRef.setName(n.toString());

+		createNodeInfoFor(n, varRef);

+		return varRef;

+	}

+

+	/**

+	 * Visiting a {@link CounterVariableAST} node (variable defined for match counters)

+	 * and returning a VariableReference

+	 * @param n : Current AST node of type {@link CounterVariableAST}

+	 * @return varRef : VariableReference

+	 */

+	@Override

+	public Object visit(CounterVariableAST n) {

+		VariableReference varRef = TermsFactory.eINSTANCE.createVariableReference();

+		varRef.setName(n.toString());

+		// Counter variables are always integers

+		varRef.setKind(ValueKind.INTEGER_LITERAL);

+		varRef.setType("datatypes.Integer");

+		createNodeInfoFor(n, varRef);

+		return varRef;

+	}

+

+	@Override

+	public Object visit(CounterVariableAST n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+

+	/**

+	 * Visiting a GraphPatternCallAST node (from an ASM rule or condition)

+	 * and creating a GTPatternCall model element

+	 * @param n : Current AST node of type GraphPatternCallAST

+	 * @return patternCall : GTPatternCall

+	 */

+	@Override

+	public Object visit(GraphPatternCallAST n) {

+		// Creating a GTPatternCall

+		GTPatternCall patternCall = TermsFactory.eINSTANCE.createGTPatternCall();

+		// Processing actual parameters

+		n.getActualParameterDefAST().accept(this, patternCall.getActualParameters());

+		// Type check compatibility of actual parameters

+		typeChecker.getPatternCallToCheck().add(patternCall);

+		// Store the name of the called pattern as the FQN of the patternCall

+		String patternName = (String) n.getQualifiedTypeNameAST().accept(this);

+		patternCall.setFqn(patternName);

+		if (n.getOptMatchCountAST() != null) {

+			VariableReference varRef = (VariableReference) n.getOptMatchCountAST().accept(this);

+			modelResolver.addVariableReferenceToStack(varRef);

+			// Type check compatibility for variable reference

+			typeChecker.getTermsToCheck().add(varRef);

+			// Create a match counter

+			GTMatchCounter matchCounter = GtFactory.eINSTANCE.createGTMatchCounter();

+			matchCounter.setPatternCall(patternCall);

+			matchCounter.setVariableReference(varRef);

+			// Create node information for the match counter

+			createNodeInfoFor(/*(ASTNode)*/ n.getOptMatchCountAST(), matchCounter);

+		}

+		// Resolve the reference to the called pattern in a later stage

+		modelResolver.getUnresolvedPatternCalls().add(patternCall);

+		// Creating node information

+		createNodeInfoFor(n, patternCall);

+		return patternCall;

+	}

+

+	/**

+	 * Visiting an {@link OptMatchCountAST} node and returning a {@link VariableReference}

+	 * @param n : Current AST node of type {@link OptMatchCountAST}

+	 * @return variableRef: {@link VariableReference}

+	 */

+	@Override

+	public Object visit(OptMatchCountAST n) {

+		return n.getCounterVariableAST().accept(this);

+	}

+

+

+

+//	*********** Sec. 5.2.2 - 5.2.4 Entity, Relation, Relationship description //

+

+

+	/**

+	 * Visiting an EntityAST node and

+	 * returning an Entity model element

+	 * @param n : Current AST node of type EntityAST

+	 * @param o : GTPatternBody

+	 * @return entity : Entity

+	 */

+	@Override

+	public Object visit(EntityAST n, Object o) {

+		GTPatternBody body = (GTPatternBody) o;

+		// Process the body of the entity

+		ModelElement entity = (ModelElement) n.getEntityBody().accept(this, body);

+		PatternVariable varDef = modelResolver.getBodyMapVar4Element(body).get(entity);

+		// Process type name and create an element wrapper

+		String typeName = (String) n.getQualifiedTypeNameAST().accept(this);

+		entity.setTypeStr(typeName);

+		// Process containment constraint (if any)

+		if (n.getContainmentConstraintOptAST() != null) {

+			ContainmentConstraint contConstr = (ContainmentConstraint) n.getContainmentConstraintOptAST().accept(this);

+			if (contConstr != null) {

+				contConstr.setVariable(varDef);

+				body.getContainmentConstraints().add(contConstr);

+			}

+		}

+//		if (n.getEntityValueOptAST() != null) {

+//		Term value = (Term) n.getEntityValueOptAST().accept(this);

+//		// Check if this is correct: only a String is allowed as a value of an Entity

+//		// This could be a real Term, since this can only be used in the as a postcondition

+//		// Maybe, values should be forbidden by the parser

+//		entity.setValue(value.toString());

+

+//		}

+		// Create annotation

+		createNodeInfoFor(n, entity);

+		return entity;

+	}

+

+	/**

+	 * Visiting an EntityBodyAST node and

+	 * creating an PatternVariable referring to the Entity

+	 * @param n : Current AST node of type EntityBodyAST

+	 * @param o : {@link GTPatternBody}

+	 * @return entity : {@link Entity}

+	 */

+	@Override

+	public Object visit(EntityBody n, Object o) {

+		GTPatternBody body = (GTPatternBody) o;

+		IPatternVariableDefRefAST patternVariableDefRefAST = n.getPatternVariableDefRefAST();

+		VariableReference varRef = (VariableReference) patternVariableDefRefAST.accept(this);

+		// Create a PatternVariable definition if varRef is not yet defined

+		// Return the corresponding PatternVariable, if already defined

+		PatternVariable varDef = modelResolver.lookupVariableDefByName(varRef.getName(), body);

+		if (varDef == null) {

+			varDef = modelResolver.createPatternVariableFromReference(varRef);

+			body.getLocalVariables().add(varDef);

+			createNodeInfoFor((ASTNode) patternVariableDefRefAST, varDef);

+		}

+		else {

+			varRef.setVariable(varDef);

+		}

+//		PatternVariable varDef = modelResolver.resolveLocalVariable(varRef, body);

+		// Create an entity model element

+		Entity entity = EditmodelFactory.eINSTANCE.createEntity();

+		entity.setName(varRef.getName());

+		// Adding the VariableReference

+		entity.getVariableReferences().add(varRef);

+		// Adding entity as a usage of the PatternVariable

+		// The same PatternVariable may be used in different bodies!

+		varDef.getElementInPattern().add(entity);

+		// Recording the new pair of VariableDefinition-Entity to the helper BodyMap

+		modelResolver.storeVarDefForModelElement(body, varDef, entity);

+		// Setting the parent (container) of the entity

+		entity.setParent(body.getPatternGraph());

+		if (patternVariableDefRefAST instanceof PatternVariableDefRefAST0) {

+			createNodeInfoFor((PatternVariableDefRefAST0)patternVariableDefRefAST, entity);

+		} else if (patternVariableDefRefAST instanceof PatternVariableDefRefAST1) {

+			createNodeInfoFor((PatternVariableDefRefAST1)patternVariableDefRefAST, entity);

+		}

+		return entity;

+	}

+

+

+//	/**

+//	* Visiting an EntityValueOptAST node and

+//	* returning a Term (an Entity value)

+//	* @param n : Current AST node of type EntityBodyAST

+//	* @return term : Term

+//	*/

+//	@Override

+//	public Object visit(EntityValueOptAST n) {

+//	return n.getArithmeticTermAST().accept(this);

+//	}

+

+

+	/**

+	 * Visiting a RelationAST node and

+	 * returning a Relation model element

+	 * @param n : Current AST node of type RelationAST

+	 * @param o : GTPatternBody

+	 * @return relation : Relation

+	 */

+	@Override

+	public Object visit(RelationAST n, Object o) {

+		GTPatternBody body = (GTPatternBody) o;

+		// Process the body of the relation

+		Relation relation = (Relation) n.getRelationBodyAST().accept(this, body);

+		// Process type name and create an element wrapper

+		String typeName = (String) n.getQualifiedTypeNameAST().accept(this);

+		relation.setTypeStr(typeName);

+		// Add relation temporarily to the list of orphan elements

+		modelResolver.getOrphanBodyElements(body).add(relation);

+		return relation;

+	}

+

+	/**

+	 * Visiting a RelationBodyAST node and

+	 * returning a PatternVariable referring to the Relation model element

+	 * @param n : Current AST node of type RelationBodyAST

+	 * @param o : GTPatternBody

+	 * @return relation : Relation

+	 */

+	@Override

+	public Object visit(RelationBodyAST n, Object o) {

+		GTPatternBody body = (GTPatternBody) o;

+		IPatternVariableDefRefAST varDefAST = n.getPatternVariableDefRefAST();

+		VariableReference varRef = (VariableReference) varDefAST.accept(this);

+		// Return the corresponding PatternVariable, if already defined

+		PatternVariable varDef = modelResolver.lookupVariableDefByName(varRef.getName(), body);

+		if (varDef == null) {

+			varDef = modelResolver.createPatternVariableFromReference(varRef);

+			body.getLocalVariables().add(varDef);

+			createNodeInfoFor((ASTNode) varDefAST, varDef);

+		}

+		else {

+			varRef.setVariable(varDef);

+		}

+		// Create a relation model element

+		Relation relation = EditmodelFactory.eINSTANCE.createRelation();

+		relation.setName(varRef.getName());

+		// Adding the VariableReference for the name

+		relation.getVariableReferences().add(varRef);

+		// Adding relation as a usage of the PatternVariable

+		// The same PatternVariable may be used in different bodies!

+		varDef.getElementInPattern().add(relation);

+		// Processing the source model element

+		VariableReference srcVar = (VariableReference) n.getPatternVariableRefAST().accept(this);

+		relation.getVariableReferences().add(srcVar);

+		relation.setFromStr(srcVar.getName());

+		// The source variable reference should be resolved

+		modelResolver.getUnresolvedPatternVariableRefs(body).add(srcVar);

+		// Processing the target model element

+		VariableReference trgVar = (VariableReference) n.getPatternVariableRefAST6().accept(this);

+		relation.getVariableReferences().add(trgVar);

+		relation.setToStr(trgVar.getName());

+		// The target variable reference should be resolved

+		modelResolver.getUnresolvedPatternVariableRefs(body).add(trgVar);

+		// Recording the new pair to the helper BodyMap

+		modelResolver.storeVarDefForModelElement(body, varDef, relation);

+		if (varDefAST instanceof PatternVariableDefRefAST0) {

+			createNodeInfoFor((PatternVariableDefRefAST0)varDefAST, relation);

+		} else if (varDefAST instanceof PatternVariableDefRefAST1) {

+			createNodeInfoFor((PatternVariableDefRefAST1)varDefAST, relation);

+		}

+		return relation;

+	}

+

+

+	/**

+	 * Visiting an {@link InheritanceAST0} node (supertypeOf) and

+	 * returning a SupertypeOf relationship

+	 * @param n : Current AST node of type InheritanceAST0

+	 * @param o : {@link GTPatternBody}

+	 * @return the created {@link SupertypeOf} relationship

+	 */

+	@Override

+	public Object visit(InheritanceAST0 n, Object o) {

+		GTPatternBody body = (GTPatternBody) o;

+		// Creating a SupertypeOf relationship

+		SupertypeOf relship = EditmodelFactory.eINSTANCE.createSupertypeOf();

+		List<VariableReference> parameters = new ArrayList<VariableReference>();

+		n.getRelationshipBodyAST().accept(this, parameters);

+		// Setting the supertype

+		VariableReference supplierVar = parameters.get(0);

+		modelResolver.getUnresolvedPatternVariableRefs(body).add(supplierVar);

+		relship.setSupplierStr(supplierVar.getName());

+		// Setting the subtype

+		VariableReference clientVar = parameters.get(1);

+		modelResolver.getUnresolvedPatternVariableRefs(body).add(clientVar);

+		relship.setClientStr(clientVar.getName());

+		// Adding temporarily to the list of orphan pattern elements

+		modelResolver.getOrphanBodyElements(body).add(relship);

+		// Adding VariableReferences to the Relationship

+		relship.getVariableReferences().add(supplierVar);

+		relship.getVariableReferences().add(clientVar);

+		// Creating location information

+		createNodeInfoFor(n, relship);

+		return relship;

+	}

+

+	/**

+	 * Visiting an {@link InheritanceAST1} node (subtypeOf) and

+	 * returning a SupertypeOf relationship

+	 * @param n : Current AST node of type InheritanceAST1

+	 * @param o : {@link GTPatternBody}

+	 * @return the created {@link SupertypeOf} relationship

+	 */

+	@Override

+	public Object visit(InheritanceAST1 n, Object o) {

+		GTPatternBody body = (GTPatternBody) o;

+		// Creating a SupertypeOf relationship

+		SupertypeOf relship = EditmodelFactory.eINSTANCE.createSupertypeOf();

+		List<VariableReference> parameters = new ArrayList<VariableReference>();

+		n.getRelationshipBodyAST().accept(this, parameters);

+		// Setting the supertype

+		VariableReference supplierVar = parameters.get(1);

+		modelResolver.getUnresolvedPatternVariableRefs(body).add(supplierVar);

+		relship.setSupplierStr(supplierVar.getName());

+		// Setting the subtype

+		VariableReference clientVar = parameters.get(0);

+		modelResolver.getUnresolvedPatternVariableRefs(body).add(clientVar);

+		relship.setClientStr(clientVar.getName());

+		// Adding temporarily to the list of orphan pattern elements

+		modelResolver.getOrphanBodyElements(body).add(relship);

+		// Adding VariableReferences to the Relationship

+		relship.getVariableReferences().add(supplierVar);

+		relship.getVariableReferences().add(clientVar);

+		// Creating location information

+		createNodeInfoFor(n, relship);

+		return relship;

+	}

+

+	/**

+	 * Visiting an {@link InstantiationAST0} node (typeOf) and

+	 * returning a TypeOf relationship

+	 * @param n : Current AST node of type InstantiationAST0

+	 * @param o : {@link GTPatternBody}

+	 * @return the created {@link TypeOf} relationship

+	 */

+	@Override

+	public Object visit(InstantiationAST0 n, Object o) {

+		GTPatternBody body = (GTPatternBody) o;

+		// Creating a TypeOf relationship

+		TypeOf relship = EditmodelFactory.eINSTANCE.createTypeOf();

+		// Process the body of the relationship

+		List<VariableReference> parameters = new ArrayList<VariableReference>();

+		n.getRelationshipBodyAST().accept(this, parameters);

+		// Setting the type

+		VariableReference supplierVar = parameters.get(0);

+		modelResolver.getUnresolvedPatternVariableRefs(body).add(supplierVar);

+		relship.setSupplierStr(supplierVar.getName());

+		// Setting the instance

+		VariableReference clientVar = parameters.get(1);

+		modelResolver.getUnresolvedPatternVariableRefs(body).add(clientVar);

+		relship.setClientStr(clientVar.getName());

+		// Adding temporarily to the list of orphan pattern elements

+		modelResolver.getOrphanBodyElements(body).add(relship);

+		// Adding VariableReferences to the Relationship

+		relship.getVariableReferences().add(supplierVar);

+		relship.getVariableReferences().add(clientVar);

+		// Creating location information

+		createNodeInfoFor(n, relship);

+		return relship;

+	}

+

+	/**

+	 * Visiting an {@link InstantiationAST1} node (instanceOf) and

+	 * returning a TypeOf relationship

+	 * @param n : Current AST node of type InstantiationAST1

+	 * @param o : {@link GTPatternBody}

+	 * @return the created {@link TypeOf} relationship

+	 */

+	@Override

+	public Object visit(InstantiationAST1 n, Object o) {

+		GTPatternBody body = (GTPatternBody) o;

+		List<VariableReference> parameters = new ArrayList<VariableReference>();

+		n.getRelationshipBodyAST().accept(this, parameters);

+		// Creating a TypeOf relationship

+		TypeOf relship = EditmodelFactory.eINSTANCE.createTypeOf();

+		// Setting the type

+		VariableReference supplierVar = parameters.get(1);

+		modelResolver.getUnresolvedPatternVariableRefs(body).add(supplierVar);

+		relship.setSupplierStr(supplierVar.getName());

+		// Setting the instance

+		VariableReference clientVar = parameters.get(0);

+		modelResolver.getUnresolvedPatternVariableRefs(body).add(clientVar);

+		relship.setClientStr(clientVar.getName());

+		// Adding temporarily to the list of orphan pattern elements

+		modelResolver.getOrphanBodyElements(body).add(relship);

+		// Adding VariableReferences to the Relationship

+		relship.getVariableReferences().add(supplierVar);

+		relship.getVariableReferences().add(clientVar);

+		// Creating location information

+		createNodeInfoFor(n, relship);

+		return relship;

+	}

+

+	/**

+	 * Visiting an {@link RelationshipBodyAST} node  and

+	 * returning a List of VariableReferences

+	 * @param n : Current AST node of type RelationshipBodyAST

+	 * @param o : {@link List} (of VariableReferences)

+	 * @return parameteters: {@link List}  (of VariableReferences)

+	 */

+	@Override

+	public Object visit(RelationshipBodyAST n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<VariableReference> parameters = (List<VariableReference>) o;

+		VariableReference first = (VariableReference) n.getPatternVariableRefAST().accept(this);

+		parameters.add(first);

+		VariableReference second = (VariableReference) n.getPatternVariableRefAST4().accept(this);

+		parameters.add(second);

+		return parameters;

+	}

+

+

+//	************** Sec. 5.3 Graph transformation rules ********************** //

+

+	/**

+	 * Visiting a {@link GTRuleDefAST} AST node and

+	 * creating a {@link GTRule}

+	 *

+	 *  @param n : {@link GTRuleDefAST}

+	 *  @param o : is expected to be {@link Machine}

+	 *  @return machine : {@link Machine}

+	 */

+	@Override

+	public Object visit(GTRuleDefAST n, Object o) {

+		Machine machine = (Machine) o;

+		// Creating a new GTRule

+		GTRule rule = GtFactory.eINSTANCE.createGTRule();

+		rule.setNamespace(machine);

+		// Setting the name of the GT rule

+		String ruleName = (String) n.getTypeNameAST().accept(this);

+		rule.setName(ruleName);

+		rule.setFqn(machine.getFqn() + "." + ruleName);

+		// Processing symbolic parameters

+		n.getDirectedFormalParameterDefAST().accept(this, rule.getSymParameters());

+		for (Iterator<SymbolicRuleParameter> iter = rule.getSymParameters().iterator(); iter.hasNext();) {

+			SymbolicRuleParameter param = iter.next();

+			rule.getLocalVariables().add(param.getVariable());

+		}

+		// Processing GTRule body

+		n.getGTRuleBodyAST().accept(this, rule);

+		// Creating node information

+		createNodeInfoFor(n, rule);

+		// Processing runtime annotations

+		if (n.getOptAnnotationsAST() != null) {

+			n.getOptAnnotationsAST().accept(this, rule.getRuntimeAnnotations());

+		}

+		//Loading documentation

+		loadDocumentationComments(n, rule);

+		return machine;

+	}

+

+	/**

+	 * Visiting a {@link GTRuleBodyAST0} node

+	 * and processing precondition, postcondition and action parts

+	 *

+	 * @param n : {@link GTRuleBodyAST0}

+	 * @param o : expected to be GTRule

+	 * @return rule : {@link GTRule}

+	 */

+	@Override

+	public Object visit(GTRuleBodyAST0 n, Object o) {

+		GTRule rule = (GTRule) o;

+		n.getPreconditionDefAST().accept(this, rule);

+		if (n.getPostconditionOptAST() != null) {

+			n.getPostconditionOptAST().accept(this, rule);

+		}

+		if (n.getActionOptAST() != null) {

+			n.getActionOptAST().accept(this, rule);

+		}

+		return rule;

+	}

+

+	/**

+	 * Visiting a {@link GTRuleBodyAST1} node (ERROR_TOKEN)

+	 *

+	 * @param n : {@link GTRuleBodyAST1}

+	 * @param o : expected to be GTRule

+	 */

+	@Override

+	public Object visit(GTRuleBodyAST1 n, Object o) {

+		return null;

+		//return diagnoseOnce(n.getEnvironment());

+	}

+

+	/**

+	 * Visiting a {@link PreconditionDefAST0} node

+	 * for a locally defined pattern

+	 *

+	 * @param n : {@link PreconditionDefAST0}

+	 * @param o : expected to be a {@link GTRule}

+	 * @return rule : {@link GTRule}

+	 */

+	@Override

+	public Object visit(PreconditionDefAST0 n, Object o) {

+		GTRule rule = (GTRule) o;

+		// Creating a new GTPattern definition

+		GTPattern lhs = (GTPattern) n.getGraphPatternDefAST().accept(this);

+		rule.getGtPatternDefinitions().add(lhs);

+		// Create a GT pattern call

+		GTPatternCall patternCall = TermsFactory.eINSTANCE.createGTPatternCall();

+		rule.setPrecondition(patternCall);

+		// Set the reference to the locally defined pattern

+		patternCall.setCalledPattern(lhs);

+		// Create actual parameters of the called pattern from the symbolic parameters

+		for (Object symParam: lhs.getSymParameters()) {

+			PatternVariable patternVar = (PatternVariable) symParam;

+			// Create a VariableReference

+			VariableReference varRef = TermsFactory.eINSTANCE.createVariableReference();

+			varRef.setName(patternVar.getName());

+			patternCall.getActualParameters().add(varRef);

+			modelResolver.resolveLocalVariableInGTRule(varRef, rule);

+			// Type checking for parameters

+			typeChecker.getTermsToCheck().add(varRef);

+		}

+		return rule;

+	}

+

+	/**

+	 * Visiting a {@link PreconditionDefAST1} node

+	 * for a predefined pattern

+	 *

+	 * @param n : {@link PreconditionDefAST1}

+	 * @param o : expected to be a {@link GTRule}

+	 * @return rule : {@link GTRule}

+	 */

+	@Override

+	public Object visit(PreconditionDefAST1 n, Object o) {

+		GTRule rule = (GTRule) o;

+		GTPatternCall patternCall = (GTPatternCall) n.getPatternCompositionAST().accept(this);

+		rule.setPrecondition(patternCall);

+		// Resolve variable references

+		for (Object param : patternCall.getActualParameters()) {

+			VariableReference varRef = (VariableReference) param;

+			modelResolver.resolveLocalVariableInGTRule(varRef, rule);

+			// Type checking for parameters

+			typeChecker.getTermsToCheck().add(varRef);

+		}

+		// Type check compatibility of actual parameters

+		typeChecker.getPatternCallToCheck().add(patternCall);

+		return rule;

+	}

+

+

+

+

+	/**

+	 * Visiting a {@link PostconditionOptAST0} node

+	 * for a locally defined pattern

+	 *

+	 * @param n : {@link PostconditionOptAST0}

+	 * @param o : expected to be a {@link GTRule}

+	 * @return rule : {@link GTRule}

+	 */

+	@Override

+	public Object visit(PostconditionOptAST0 n, Object o) {

+		GTRule rule = (GTRule) o;

+		// Creating a new GTPattern definition

+		GTPattern rhs = (GTPattern) n.getGraphPatternDefAST().accept(this);

+		rule.getGtPatternDefinitions().add(rhs);

+		// Create a GT pattern call

+		GTPatternCall patternCall = TermsFactory.eINSTANCE.createGTPatternCall();

+		rule.setPostcondition(patternCall);

+		// Set the reference to the locally defined pattern

+		patternCall.setCalledPattern(rhs);

+		// Create actual parameters of the called pattern from the symbolic parameters

+		for (Object symParam: rhs.getSymParameters()) {

+			PatternVariable patternVar = (PatternVariable) symParam;

+			// Create a VariableReference

+			VariableReference varRef = TermsFactory.eINSTANCE.createVariableReference();

+			varRef.setName(patternVar.getName());

+			patternCall.getActualParameters().add(varRef);

+			modelResolver.resolveLocalVariableInGTRule(varRef, rule);

+			// Type checking for parameters

+			typeChecker.getTermsToCheck().add(varRef);

+		}

+		return rule;

+	}

+

+	/**

+	 * Visiting a {@link PostconditionOptAST1} node

+	 * for a predefined pattern

+	 *

+	 * @param n : {@link PostconditionOptAST1}

+	 * @param o : expected to be a {@link GTRule}

+	 * @return rule : {@link GTRule}

+	 */

+	@Override

+	public Object visit(PostconditionOptAST1 n, Object o) {

+		GTRule rule = (GTRule) o;

+		GTPatternCall patternCall = (GTPatternCall) n.getPatternCompositionAST().accept(this);

+		rule.setPostcondition(patternCall);

+		// Resolve variable references

+		for (Object param : patternCall.getActualParameters()) {

+			VariableReference varRef = (VariableReference) param;

+			modelResolver.resolveLocalVariableInGTRule(varRef, rule);

+			// Type checking for parameters

+			typeChecker.getTermsToCheck().add(varRef);

+		}

+		// Type check compatibility of actual parameters

+		typeChecker.getPatternCallToCheck().add(patternCall);

+		// Match counters are not allowed in postconditions

+		if (n.getPatternCompositionAST().getOptMatchCountAST() != null) {

+			modelResolver.reportInvalidMatchCounter(patternCall, "postconditions");

+		}

+		return rule;

+	}

+

+

+	/**

+	 * Visiting an {@link ActionOptAST} node

+	 *

+	 * @param n : {@link ActionOptAST}

+	 * @param o : expected to be a {@link GTRule}

+	 * @return rule : {@link GTRule}

+	 */

+	@Override

+	public Object visit(ActionOptAST n, Object o) {

+		GTRule gtRule = (GTRule) o;

+		// Creating a SeqRule

+		SequentialRule seqRule = CompoundRulesFactory.eINSTANCE.createSequentialRule();

+		gtRule.setAction(seqRule);

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		// Recording the action-gtRule pair (used when resolving variable refs)

+		modelResolver.getActionRuleMap().put(seqRule, gtRule);

+		// Processing the action body

+		n.getAsmRulesAST().accept(this, seqRule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		createNodeInfoFor(n, seqRule);

+		return gtRule;

+	}

+

+

+	/**

+	 * Visiting a {@link GTRuleCallAST} node

+	 * and creating a {@link GTRuleInvocation}

+	 *

+	 * @param n : {@link GTRuleCallAST}

+	 * @return gtRuleInvoc : {@link GTRuleInvocation}

+	 */

+	@Override

+	public Object visit(GTRuleCallAST n) {

+		// Creating a GTRuleC invocation

+		GTRuleInvocation gtRuleInvoc = SimpleRulesFactory.eINSTANCE.createGTRuleInvocation();

+		// Processing actual parameters

+		n.getActualParameterDefAST().accept(this, gtRuleInvoc.getActualParameters());

+		// Store the name of the called pattern as the FQN of the patternCall

+		String patternName = (String) n.getQualifiedTypeNameAST().accept(this);

+		gtRuleInvoc.setFqn(patternName);

+		gtRuleInvoc.setName(patternName);

+		// Type check compatibility of actual parameters of GT rule invocation

+		typeChecker.getGtRuleInvocsToCheck().add(gtRuleInvoc);

+		// Type checking for actual parameters

+		for (Object param : gtRuleInvoc.getActualParameters()) {

+			Term term = (Term) param;

+			typeChecker.getTermsToCheck().add(term);

+		}

+		// Resolve the reference to the called pattern in a later stage

+		modelResolver.getUnresolvedGTRuleInvoc().add(gtRuleInvoc);

+		// Creating node information

+		createNodeInfoFor(n, gtRuleInvoc);

+		return gtRuleInvoc;

+	}

+

+//	************** Sec. 5.4 ASM Terms and Formulas ************************** //

+

+//	************** Sec. 5.4.1 Logical Terms *************************

+

+	/**

+	 * Visiting a LogicalTermAST0 node (OR) and

+	 * returning an Or RelationalOperation

+	 * @param n : Current AST node of type LogicalTermAST0

+	 */

+	@Override

+	public Object visit(LogicalTermAST0 n) {

+		Term leftOperand = (Term) n.getLogicalTermAST().accept(this);

+		Term rightOperand = (Term) n.getLogicalAndTermAST().accept(this);

+		Or logicalTerm = BuiltInFunctionsFactory.eINSTANCE.createOr();

+		// Adding term parameters

+		logicalTerm.getActualParameters().add(leftOperand);

+		logicalTerm.getActualParameters().add(rightOperand);

+		createNodeInfoFor(n, logicalTerm);

+		// No type checking here

+		// typeChecker.typeCheckTerm(logicalTerm, leftOperand, rightOperand);

+		return logicalTerm;

+	}

+	@Override

+	public Object visit(LogicalTermAST0 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting a LogicalTermAST1 node (XOR) and

+	 * returning an Xor RelationalOperation

+	 * @param n : Current AST node of type LogicalTermAST1

+	 */

+	@Override

+	public Object visit(LogicalTermAST1 n) {

+		Term leftOperand = (Term) n.getLogicalTermAST().accept(this);

+		Term rightOperand = (Term) n.getLogicalAndTermAST().accept(this);

+		XOr logicalTerm = BuiltInFunctionsFactory.eINSTANCE.createXOr();

+		logicalTerm.getActualParameters().add(leftOperand);

+		logicalTerm.getActualParameters().add(rightOperand);

+		createNodeInfoFor(n, logicalTerm);

+		// No type checking

+		//typeChecker.typeCheckTerm(logicalTerm, leftOperand, rightOperand);

+		return logicalTerm;

+	}

+	@Override

+	public Object visit(LogicalTermAST1 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting a LogicalAndTermAST node (AND) and

+	 * returning an And RelationalOperation

+	 * @param n : Current AST node of type LogicalAndTermAST

+	 */

+	@Override

+	public Object visit(LogicalAndTermAST n) {

+		Term leftOperand = (Term) n.getLogicalAndTermAST().accept(this);

+		Term rightOperand = (Term) n.getEqualityTermAST().accept(this);

+		And logicalTerm = BuiltInFunctionsFactory.eINSTANCE.createAnd();

+		logicalTerm.getActualParameters().add(leftOperand);

+		logicalTerm.getActualParameters().add(rightOperand);

+		createNodeInfoFor(n, logicalTerm);

+		// No type checking

+		//typeChecker.typeCheckTerm(logicalTerm, leftOperand, rightOperand);

+		return logicalTerm;

+	}

+	@Override

+	public Object visit(LogicalAndTermAST n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+

+	/**

+	 * Visiting an {@link EqualityTermAST0} node (==) and

+	 * returning an {@link Equals} RelationalOperation

+	 * @param n : Current AST node of type {@link EqualityTermAST0}

+	 */

+	@Override

+	public Object visit(EqualityTermAST0 n) {

+		Term leftOperand = (Term) n.getEqualityTermAST().accept(this);

+		Term rightOperand = (Term) n.getRelationalTermAST().accept(this);

+		RelationalOperation equalTerm = BuiltInFunctionsFactory.eINSTANCE.createEquals();

+		equalTerm.getActualParameters().add(leftOperand);

+		equalTerm.getActualParameters().add(rightOperand);

+		createNodeInfoFor(n, equalTerm);

+		// No type checking

+		//typeChecker.typeCheckTerm(equalTerm, leftOperand, rightOperand);

+		return equalTerm;

+	}

+

+	@Override

+	public Object visit(EqualityTermAST0 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+

+	/**

+	 * Visiting an {@link EqualityTermAST1} node (!=) and

+	 * returning an {@link NotEquals} RelationalOperation

+	 * @param n : Current AST node of type {@link EqualityTermAST1}

+	 */

+	@Override

+	public Object visit(EqualityTermAST1 n) {

+		Term leftOperand = (Term) n.getEqualityTermAST().accept(this);

+		Term rightOperand = (Term) n.getRelationalTermAST().accept(this);

+		RelationalOperation equalTerm = BuiltInFunctionsFactory.eINSTANCE.createNotEquals();

+		equalTerm.getActualParameters().add(leftOperand);

+		equalTerm.getActualParameters().add(rightOperand);

+		createNodeInfoFor(n, equalTerm);

+		// No type checking

+		// typeChecker.typeCheckTerm(equalTerm, leftOperand, rightOperand);

+		return equalTerm;

+	}

+

+

+	@Override

+	public Object visit(EqualityTermAST1 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+

+

+

+	/**

+	 * Visiting an {@link RelationalTermAST} node (<,>,<=,>=) and

+	 * returning the corresponding {@link RelationalOperation}

+	 * @param n : Current AST node of type {@link RelationalTermAST}

+	 */

+	@Override

+	public Object visit(RelationalTermAST n) {

+		Term leftOperand = (Term) n.getRelationalTermAST().accept(this);

+		Term rightOperand = (Term) n.getArithmeticTermAST().accept(this);

+		RelationalOperation relTerm = (RelationalOperation) n.getRelationalOpAST().accept(this);

+		relTerm.getActualParameters().add(leftOperand);

+		relTerm.getActualParameters().add(rightOperand);

+		createNodeInfoFor(n, relTerm);

+		// No type checking

+		// typeChecker.typeCheckTerm(relTerm, leftOperand, rightOperand);

+		return relTerm;

+	}

+

+	@Override

+	public Object visit(RelationalTermAST n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+//	/**

+//	 * Visiting a BaseLogicalTermAST0 node (NOT) and

+//	 * returning an NOT RelationalOperation

+//	 * @param n : Current AST node of type BaseLogicalTermAST0

+//	 */

+//	@SuppressWarnings("unchecked")

+//	@Override

+//	public Object visit(BaseLogicalTermAST0 n) {

+//		Term leftOperand = (Term) n.getBaseLogicalTermAST().accept(this);

+//		Not logicalTerm = BuiltInFunctionsFactory.eINSTANCE.createNot();

+//		logicalTerm.getActualParameters().add(leftOperand);

+//		createNodeInfoFor(n, logicalTerm);

+//		return logicalTerm;

+//	}

+//	@Override

+//	public Object visit(BaseLogicalTermAST0 n, Object o) {

+//		return defaultListVisit(n, (List<?>) o);

+//	}

+//

+//	/**

+//	 * Visiting a BaseLogicalTermAST1 node ( expr ) and

+//	 * returning its content as a LogicalTerm (without parenthesis)

+//	 * @param n : Current AST node of type BaseLogicalTermAST0

+//	 */

+//	@Override

+//	public Object visit(BaseLogicalTermAST1 n) {

+//		return (Term) n.getLogicalTermAST().accept(this);

+//	}

+//	@Override

+//	public Object visit(BaseLogicalTermAST1 n, Object o) {

+//		return defaultListVisit(n, (List<?>) o);

+//	}

+//

+//	/**

+//	 * Visiting a BaseLogicalTermAST2 node (RelationalOperation) and

+//	 * returning a RelationalOperation with ArithmeticTerms as parameters

+//	 * @param n : Current AST node of type BaseLogicalTermAST2

+//	 */

+//	@SuppressWarnings("unchecked")

+//	@Override

+//	public Object visit(BaseLogicalTermAST2 n) {

+//		RelationalOperation relOp = (RelationalOperation) n.getRelationalOpAST().accept(this);

+//		Term leftOperand = (Term) n.getArithmeticTermAST().accept(this);

+//		Term rightOperand = (Term) n.getArithmeticTermAST3().accept(this);

+//		relOp.getActualParameters().add(leftOperand);

+//		relOp.getActualParameters().add(rightOperand);

+//		createNodeInfoFor(n, relOp);

+//		return relOp;

+//	}

+//	@Override

+//	public Object visit(BaseLogicalTermAST2 n, Object o) {

+//		return defaultListVisit(n, (List<?>) o);

+//	}

+

+	/**

+	 * Visiting a {@link RelationalOpAST} node (<,>,<=,>=) and

+	 * returning a {@link RelationalOperation}

+	 * @param n : Current AST node of type {@link RelationalOpAST}

+	 */

+	@Override

+	public Object visit(RelationalOpAST n) {

+		RelationalOperation op = null;

+		String opStr = n.toString();

+		if (opStr.equals("<")) {

+			op = BuiltInFunctionsFactory.eINSTANCE.createLessThan();

+			op.setName("<");

+		}

+		else if (opStr.equals(">")) {

+			op = BuiltInFunctionsFactory.eINSTANCE.createGreaterThan();

+			op.setName(">");

+		}

+		else if (opStr.equals("<=")) {

+			op = BuiltInFunctionsFactory.eINSTANCE.createLessThanOrEqualTo();

+			op.setName("<=");

+		}

+		else if (opStr.equals(">=")) {

+			op = BuiltInFunctionsFactory.eINSTANCE.createGreaterThanOrEqualTo();

+			op.setName(">=");

+		}

+		return op;

+	}

+	@Override

+	public Object visit(RelationalOpAST n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+

+//	************** Sec. 5.4 ASM Terms and Formulas ************************** //

+

+

+	/**

+	 * Visiting a ArithmeticTermAST0 node (PLUS) and

+	 * returning a Plus  ArithmeticOperation

+	 * @param n : Current AST node of type ArithmeticTermAST0

+	 */

+	@Override

+	public Object visit(ArithmeticTermAST0 n) {

+		Term leftOperand = (Term) n.getArithmeticTermAST().accept(this);

+		Term rightOperand = (Term) n.getMultArithmeticTermAST().accept(this);

+		Plus arithmeticTerm = BuiltInFunctionsFactory.eINSTANCE.createPlus();

+		arithmeticTerm.getActualParameters().add(leftOperand);

+		arithmeticTerm.getActualParameters().add(rightOperand);

+		createNodeInfoFor(n, arithmeticTerm);

+		arithmeticTerm.setName("PLUS");

+		// No type checking

+		// typeChecker.typeCheckTerm(arithmeticTerm, leftOperand, rightOperand);

+		return arithmeticTerm;

+	}

+	/**

+	 * Visiting a ArithmeticTermAST0 node (PLUS) and adding it to the list

+	 * represented by o

+	 * @param n : Current AST node of type ArithmeticTermAST0

+	 * @param o : List

+	 * @return list : List

+	 */

+	@SuppressWarnings("rawtypes")

+	@Override

+	public Object visit(ArithmeticTermAST0 n, Object o) {

+		return defaultListVisit(n, (List) o);

+	}

+

+	/**

+	 * Visiting a ArithmeticTermAST1 node (MINUS) and

+	 * returning a Minus ArithmeticOperation

+	 * @param n : Current AST node of type ArithmeticTermAST1

+	 */

+	@Override

+	public Object visit(ArithmeticTermAST1 n) {

+		Term leftOperand = (Term) n.getArithmeticTermAST().accept(this);

+		Term rightOperand = (Term) n.getMultArithmeticTermAST().accept(this);

+		Minus arithmeticTerm = BuiltInFunctionsFactory.eINSTANCE.createMinus();

+		arithmeticTerm.getActualParameters().add(leftOperand);

+		arithmeticTerm.getActualParameters().add(rightOperand);

+		createNodeInfoFor(n, arithmeticTerm);

+		arithmeticTerm.setName("MINUS");

+		// No type checking

+		// typeChecker.typeCheckTerm(arithmeticTerm, leftOperand, rightOperand);

+		return arithmeticTerm;

+	}

+	/**

+	 * Visiting a ArithmeticTermAST1 node (MINUS) and adding it to the list

+	 * represented by o

+	 * @param n : Current AST node of type ArithmeticTermAST1

+	 * @param o : List

+	 * @return list : List

+	 */

+	@SuppressWarnings("rawtypes")

+	@Override

+	public Object visit(ArithmeticTermAST1 n, Object o) {

+		return defaultListVisit(n, (List) o);

+	}

+

+	/**

+	 * Visiting a MultArithmeticTermAST0 node (MULTIPLY) and

+	 * returning a Multiply ArithmeticOperation

+	 * @param n : Current AST node of type MultArithmeticTermAST0

+	 */

+	@Override

+	public Object visit(MultArithmeticTermAST0 n) {

+		Term leftOperand = (Term) n.getMultArithmeticTermAST().accept(this);

+		Term rightOperand = (Term) n.getUnaryArithmeticTermAST().accept(this);

+		Multiply arithmeticTerm = BuiltInFunctionsFactory.eINSTANCE.createMultiply();

+		arithmeticTerm.getActualParameters().add(leftOperand);

+		arithmeticTerm.getActualParameters().add(rightOperand);

+		createNodeInfoFor(n, arithmeticTerm);

+		arithmeticTerm.setName("MULTIPLY");

+		// No type checking

+		// typeChecker.typeCheckTerm(arithmeticTerm, leftOperand, rightOperand);

+		return arithmeticTerm;

+	}

+	/**

+	 * Visiting a MultArithmeticTermAST0 node (MINUS) and adding it to the list

+	 * represented by o

+	 * @param n : Current AST node of type ArithmeticTermAST1

+	 * @param o : List

+	 * @return list : List

+	 */

+	@SuppressWarnings("rawtypes")

+	@Override

+	public Object visit(MultArithmeticTermAST0 n, Object o) {

+		return defaultListVisit(n, (List) o);

+	}

+

+

+	/**

+	 * Visiting a MultArithmeticTermAST1 node (DIVIDE) and

+	 * returning a Division ArithmeticOperation

+	 * @param n : Current AST node of type MultArithmeticTermAST1

+	 */

+	@Override

+	public Object visit(MultArithmeticTermAST1 n) {

+		Term leftOperand = (Term) n.getMultArithmeticTermAST().accept(this);

+		Term rightOperand = (Term) n.getUnaryArithmeticTermAST().accept(this);

+		Division arithmeticTerm = BuiltInFunctionsFactory.eINSTANCE.createDivision();

+		arithmeticTerm.getActualParameters().add(leftOperand);

+		arithmeticTerm.getActualParameters().add(rightOperand);

+		createNodeInfoFor(n, arithmeticTerm);

+		arithmeticTerm.setName("DIVIDE");

+		// No type checking

+		// typeChecker.typeCheckTerm(arithmeticTerm, leftOperand, rightOperand);

+		return arithmeticTerm;

+	}

+	@Override

+	public Object visit(MultArithmeticTermAST1 n, Object o) {

+		return visit(n);

+	}

+

+	/**

+	 * Visiting a MultArithmeticTermAST2 node (REMAINDER) and

+	 * returning a Remainder ArithmeticOperation

+	 * @param n : Current AST node of type MultArithmeticTermAST2

+	 */

+	@Override

+	public Object visit(MultArithmeticTermAST2 n) {

+		Term leftOperand = (Term) n.getMultArithmeticTermAST().accept(this);

+		Term rightOperand = (Term) n.getUnaryArithmeticTermAST().accept(this);

+		Remainder arithmeticTerm = BuiltInFunctionsFactory.eINSTANCE.createRemainder();

+		arithmeticTerm.getActualParameters().add(leftOperand);

+		arithmeticTerm.getActualParameters().add(rightOperand);

+		createNodeInfoFor(n, arithmeticTerm);

+		arithmeticTerm.setName("REMAINDER");

+		// No type checking

+		// typeChecker.typeCheckTerm(arithmeticTerm, leftOperand, rightOperand);

+		return arithmeticTerm;

+	}

+	@Override

+	public Object visit(MultArithmeticTermAST2 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+

+

+

+	/**

+	 * Visiting a {@link UnaryArithmeticTermAST0} (MINUS) and

+	 * returning a {@link Minus} BuiltInFunction (with a single parameter)

+	 * @param n : Current AST node of type {@link UnaryArithmeticTermAST0}

+	 */

+	@Override

+	public Object visit(UnaryArithmeticTermAST0 n) {

+//		Term leftOperand = (Term) n.getNavigationTermAST().accept(this);

+		Term leftOperand = (Term) n.getBaseArithmeticTermAST().accept(this);

+		Minus unaryTerm = BuiltInFunctionsFactory.eINSTANCE.createMinus();

+		unaryTerm.getActualParameters().add(leftOperand);

+		createNodeInfoFor(n, unaryTerm);

+		unaryTerm.setName("MINUS");

+		// No type checking

+		// typeChecker.typeCheckTerm(unaryTerm, leftOperand);

+		return unaryTerm;

+	}

+

+	@Override

+	public Object visit(UnaryArithmeticTermAST0 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting a {@link UnaryArithmeticTermAST1} (NOT) and

+	 * returning a {@link Not} BuiltInFunction (with a single parameter)

+	 * @param n : Current AST node of type {@link UnaryArithmeticTermAST1}

+	 */

+	@Override

+	public Object visit(UnaryArithmeticTermAST1 n) {

+//		Term leftOperand = (Term) n.getNavigationTermAST().accept(this);

+		Term leftOperand = (Term) n.getBaseArithmeticTermAST().accept(this);

+		Not unaryTerm = BuiltInFunctionsFactory.eINSTANCE.createNot();

+		unaryTerm.getActualParameters().add(leftOperand);

+		createNodeInfoFor(n, unaryTerm);

+		unaryTerm.setName("NOT");

+		// No type checking

+		// typeChecker.typeCheckTerm(unaryTerm, leftOperand);

+		return unaryTerm;

+	}

+

+	@Override

+	public Object visit(UnaryArithmeticTermAST1 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+

+//	/**

+//	 * Visiting a {@link NavigationTermAST} (->) and

+//	 * returning a {@link NavigationExpression} term

+//	 * @param n : Current AST node of type {@link NavigationTermAST}

+//	 */

+//	@Override

+//	public Object visit(NavigationTermAST n) {

+//		Term baseTerm = (Term) n.getBaseArithmeticTermAST().accept(this);

+//		String roleStr = (String) n.getTypeNameAST().accept(this);

+//		Navigation navigationExpr = QueryFunctionsFactory.eINSTANCE.createNavigation();

+//		navigationExpr.setArgument(baseTerm);

+//		navigationExpr.setNavigationRole(roleStr);

+//		createNodeInfoFor(n, navigationExpr);

+//		// Type checking

+//		navigationExpr.setKind(modelResolver.typeCheckTerm(navigationExpr, baseTerm));

+//		// Validating navigation

+//		// Navigation checking at compile time

+//		return navigationExpr;

+//	}

+//	@Override

+//	public Object visit(NavigationTermAST n, Object o) {

+//		return defaultListVisit(n, (List<?>) o);

+//	}

+

+

+//	/**

+//	 * Visiting a BaseArithmeticTermAST0 node (MINUS) and

+//	 * returning a Minus ArithmeticOperation  (with a single parameter)

+//	 * @param n : Current AST node of type BaseArithmeticTermAST0

+//	 */

+//	@SuppressWarnings("unchecked")

+//	@Override

+//	public Object visit(BaseArithmeticTermAST0 n) {

+//		Term leftOperand = (Term) n.getValueAST().accept(this);

+//		Minus arithmeticTerm = BuiltInFunctionsFactory.eINSTANCE.createMinus();

+//		arithmeticTerm.getActualParameters().add(leftOperand);

+//		createNodeInfoFor(n, arithmeticTerm);

+//		return arithmeticTerm;

+//	}

+//	@Override

+//	public Object visit(BaseArithmeticTermAST0 n, Object o) {

+//		return defaultListVisit(n, (List<?>) o);

+//	}

+

+

+	/**

+	 * Visiting a {@link BaseArithmeticTermAST} node ( expr ) and

+	 * returning the internal ArithmeticTerm (without the parentheses)

+	 * @param n : Current AST node of type {@link BaseArithmeticTermAST}

+	 */

+	@Override

+	public Object visit(BaseArithmeticTermAST n) {

+		return /*(Term)*/ n.getLogicalTermAST().accept(this);

+	}

+	@Override

+	public Object visit(BaseArithmeticTermAST n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+

+//	***************** Sec. 5.4.3. ASM Functions  ********************

+

+	/**

+	 * Visiting an {@link AsmFunctionDefAST} node and

+	 * returning an ASM function

+	 * @param n : Current AST node of type {@link AsmFunctionDefAST}

+	 * @param o : The container machine of the ASM function

+	 * @return asmFun : {@link ASMFunction}

+	 */

+	@Override

+	public Object visit(AsmFunctionDefAST n, Object o) {

+		Machine machine = (Machine) o;

+		ASMFunction asmFun = DefinitionsFactory.eINSTANCE.createASMFunction();

+		// Setting the name

+		String asmFunStr = (String) n.getTypeNameAST().accept(this);

+		asmFun.setFqn(machine.getFqn() + "." + asmFunStr);

+		asmFun.setName(asmFunStr);

+		asmFun.setNamespace(machine);

+

+		// Setting the arity / types of arities

+		n.getArityOrTypeDeclAST().accept(this, asmFun);

+		// Resolving return type specification

+		if (n.getReturnTypeOptAST() != null) {

+			n.getReturnTypeOptAST().accept(this, asmFun);

+		}

+		// Setting initial values

+		n.getInitialValuesOptAST().accept(this, asmFun.getInitialValues());

+		// Processing runtime annotations

+		if (n.getOptAnnotationsAST() != null) {

+			n.getOptAnnotationsAST().accept(this, asmFun.getRuntimeAnnotations());

+		}

+		//Loading documentation

+		loadDocumentationComments(n, asmFun);

+		// Validate that initial value definitions correspond to arity

+		modelResolver.validateAsmFunctionInitialValues(asmFun);

+		createNodeInfoFor(n, asmFun);

+		return asmFun;

+	}

+

+

+

+	/**

+	 * Visiting an {@link ArityOrTypeDeclAST0} node (arity definition) and

+	 * returning an ASM function

+	 * @param n : Current AST node of type {@link ArityOrTypeDeclAST0}

+	 * @param o : The ASM function for which we define arity

+	 * @return asmFun : {@link ASMFunction}

+	 */

+	@Override

+	public Object visit(ArityOrTypeDeclAST0 n, Object o) {

+		ASMFunction asmFun = (ASMFunction) o;

+		// Setting the arity

+		Integer arity = (Integer) n.getArityAST().accept(this);

+		asmFun.setArity(arity.intValue());

+		return asmFun;

+	}

+

+	/**

+	 * Visiting an {@link ArityOrTypeDeclAST1} node (type definition) and

+	 * returning an ASM function

+	 * @param n : Current AST node of type {@link ArityOrTypeDeclAST1}

+	 * @param o : The ASM function for which we define types

+	 * @return asmFun : {@link ASMFunction}

+	 */

+	@Override

+	public Object visit(ArityOrTypeDeclAST1 n, Object o) {

+		ASMFunction asmFun = (ASMFunction) o;

+		n.getTypeConstantsAST().accept(this, asmFun);

+		// Set the arity

+		asmFun.setArity(asmFun.getArgumentTypes().size());

+		return asmFun;

+	}

+

+

+

+

+

+	/**

+	 * Visiting an ArityAST node (DecimalIntegerLiteral) and

+	 * returning an Integer value

+	 * @param n : Current AST node of type RelationalOpAST5

+	 */

+	@Override

+	public Object visit(ArityAST n) {

+		return Integer.parseInt(n.toString());

+	}

+

+	/**

+	 * Visiting an InitialValueAST node and adding it to the list of InitialValues

+	 * returning the List of InitialValues

+	 * @param n : Current AST node of type InitialValueAST

+	 * @param o : List of InitialValues

+	 */

+	@Override

+	public Object visit(InitialValueAST n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<InitialValue> initValueList = (List<InitialValue>) o;

+		// Creating a new InitialValue

+		InitialValue initValue = DefinitionsFactory.eINSTANCE.createInitialValue();

+		initValueList.add(initValue);

+		// Processing the location

+		n.getActualParameterDefAST().accept(this, initValue.getLocations());

+		for (Object object : initValue.getLocations()) {

+			Term location = (Term) object;

+			// Type check compatibility of the location

+			typeChecker.getTermsToCheck().add(location);

+		}

+		// Processing the value

+		Term value = (Term) n.getArithmeticTermAST().accept(this);

+		initValue.setValue(value);

+		// Type check term

+		typeChecker.getTermsToCheck().add(value);

+		// Type check compatibility of initial value vs. type

+		typeChecker.getInitValuesToCheck().add(initValue);

+		createNodeInfoFor(n, initValue);

+		return initValueList;

+	}

+

+	/**

+	 * Visiting an InitialValuesAST node and adding it to the list of InitialValues

+	 * returning the List of InitialValues

+	 * @param n : Current AST node of type InitialValuesAST

+	 * @param o : List of InitialValues

+	 */

+	@Override

+	public Object visit(InitialValuesAST n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<InitialValue> initValueList = (List<InitialValue>) o;

+		n.getInitialValuesAST().accept(this, initValueList);

+		n.getInitialValueAST().accept(this, initValueList);

+		return initValueList;

+	}

+

+	/**

+	 * Visiting an InitialValuesOptAST0 node (empty definition)

+	 * returning the empty List of InitialValue

+	 * @param n : Current AST node of type InitialValuesOptAST0

+	 * @param o : List of InitialValues

+	 */

+	@Override

+	public Object visit(InitialValuesOptAST0 n, Object o) {

+		return o;

+	}

+

+	/**

+	 * Visiting an InitialValuesOptAST1 node (with InitialValue definitions)

+	 * returning the List of InitialValues

+	 * @param n : Current AST node of type InitialValuesOptAST1

+	 * @param o : List of InitialValues

+	 */

+	@Override

+	public Object visit(InitialValuesOptAST1 n, Object o) {

+		return n.getInitialValuesAST().accept(this, o);

+	}

+

+

+	/**

+	 * Visiting an AsmFunctionLocationAST node (as part of an Update rule)

+	 * returning a RuleUpdateASMFunction

+	 * This code is called as a left value in an UpdateRule

+	 * @param n : Current AST node of type AsmFunctionLocationAST

+	 * @param o : RuleUpdateASMFunction

+	 * @return updateRule

+	 */

+	@Override

+	public Object visit(AsmFunctionUpdateLocationAST n, Object o) {

+		RuleUpdateASMFunction updateRule = (RuleUpdateASMFunction) o;

+		// Store the name of the ASM Function as the FQN of the rule

+		Constant asmFunConst = (Constant) n.getASMFunctionNameAST().accept(this);

+		updateRule.setFqn(asmFunConst.getValue());

+		// Processing actual parameters

+		n.getActualParameterDefAST().accept(this, updateRule.getLocations());

+		// Type checking the location

+		for (Object object : updateRule.getLocations()) {

+			Term location = (Term) object;

+			typeChecker.getTermsToCheck().add(location);

+		}

+		// Resolve the called ASM Function in a later stage

+		modelResolver.getUnresolvedAsmFunctionUpdates().add(updateRule);

+		return updateRule;

+	}

+

+	/**

+	 * Visiting an AsmFunctionLocationAST node (as part of a Term)

+	 * returning an ASMFunctionInvocation

+	 * This code is called as a right value (Term)

+	 * @param n : Current AST node of type AsmFunctionLocationAST

+	 */

+	@Override

+	public Object visit(AsmFunctionLocationAST n) {

+		FunctionInvocation funInvoc = null;

+		Constant asmFunConst= (Constant) n.getASMFunctionNameAST().accept(this);

+		String funInvocStr = asmFunConst.getValue();

+		// In case of native functions

+		if (modelResolver.lookupNativeAsmFunction(funInvocStr)) {

+			NativeFunctionInvocation nativeFunInvoc = TermsFactory.eINSTANCE.createNativeFunctionInvocation();

+			// Store the name of the called native ASM Function

+			nativeFunInvoc.setFunctionName(funInvocStr);

+			funInvoc = nativeFunInvoc;

+			// Type check compatibility of actual parameters

+			typeChecker.getNativeFunInvocsToCheck().add(nativeFunInvoc);

+		}

+		// In case of regular ASM functions

+		else {

+			ASMFunctionInvocation asmFunInvoc = TermsFactory.eINSTANCE.createASMFunctionInvocation();

+			// Store the name of the called ASM Function as the FQN

+			asmFunInvoc.setFqn(asmFunConst.getValue());

+			// Resolve the called ASM Function in the validation phase

+			modelResolver.getUnresolvedAsmFunctionInvocations().add(asmFunInvoc);

+			funInvoc = asmFunInvoc;

+			// Type check compatibility of actual parameters

+			typeChecker.getAsmFunInvocsToCheck().add(asmFunInvoc);

+		}

+		// Processing actual parameters

+		n.getActualParameterDefAST().accept(this, funInvoc.getActualParameters());

+		createNodeInfoFor(n, funInvoc);

+		funInvoc.setName(n.getASMFunctionNameAST().toString());

+		return funInvoc;

+	}

+	@Override

+	public Object visit(AsmFunctionLocationAST n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+

+//	***************** Sec. 5.4.4. Built-in Functions ********************

+

+	/**

+	 * Visiting a BuiltInFunctionNameAST node and

+	 * returning the appropriate ModelElementQuery

+	 * @param n : Current AST node of type BuiltInFunctionNameAST

+	 */

+	@Override

+	public Object visit(BuiltInFunctionNameAST n) {

+		ModelElementQuery fun = null;

+		String funStr = n.toString();

+		if (funStr.equals("ref")) {

+			fun = QueryFunctionsFactory.eINSTANCE.createElementReference();

+		}

+		else if (funStr.equals("fqn")) {

+			fun = QueryFunctionsFactory.eINSTANCE.createFullyQualifiedName();

+		}

+		else if (funStr.equals("name")) {

+			fun = QueryFunctionsFactory.eINSTANCE.createName();

+		}

+		else if (funStr.equals("value")) {

+			fun = QueryFunctionsFactory.eINSTANCE.createValue();

+		}

+		else if (funStr.equals("source")) {

+			fun = QueryFunctionsFactory.eINSTANCE.createSource();

+		}

+		else if (funStr.equals("target")) {

+			fun = QueryFunctionsFactory.eINSTANCE.createTarget();

+		}

+		else if (funStr.equals("multiplicity")) {

+			fun = QueryFunctionsFactory.eINSTANCE.createMultiplicity();

+		}

+		else if (funStr.equals("aggregation")) {

+			fun = QueryFunctionsFactory.eINSTANCE.createAggregate();

+		}

+		else if (funStr.equals("inverse")) {

+			fun = QueryFunctionsFactory.eINSTANCE.createInverse();

+		} else {

+			//TODO Invalid built-in function - error/exception handling

+			return null;

+		}

+		fun.setName(funStr);

+		return fun;

+	}

+	@Override

+	public Object visit(BuiltInFunctionNameAST n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+

+	/**

+	 * Visiting a ConversionFunctionNameAST node and

+	 * returning the appropriate ConversionOperation

+	 * @param n : Current AST node of type ConversionFunctionNameAST

+	 */

+	@Override

+	public Object visit(ConversionFunctionNameAST n) {

+		ConversionOperation fun = null;

+		String funStr = n.toString();

+		if (funStr.equals("toBoolean")) {

+			fun = BuiltInFunctionsFactory.eINSTANCE.createToBoolean();

+		}

+		else if (funStr.equals("toString")) {

+			fun = BuiltInFunctionsFactory.eINSTANCE.createToString();

+		}

+		else if (funStr.equals("toInteger")) {

+			fun = BuiltInFunctionsFactory.eINSTANCE.createToInt();

+		}

+		else if (funStr.equals("toDouble")) {

+			fun = BuiltInFunctionsFactory.eINSTANCE.createToDouble();

+		}

+		else if (funStr.equals("toMultiplicity")) {

+			fun = BuiltInFunctionsFactory.eINSTANCE.createToMultiplicity();

+		} else {

+			//TODO Invalid conversion function - error/exception handling

+			return null;

+		}

+		fun.setName(funStr);

+		return fun;

+	}

+	@Override

+	public Object visit(ConversionFunctionNameAST n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+

+	/**

+	 * Visiting a PredefinedFunctionCallAST0 node (Model query function) and

+	 * returning a ModelElementQuery

+	 * @param n : Current AST node of type PredefinedFunctionCallAST0

+	 */

+	@Override

+	public Object visit(PredefinedFunctionCallAST0 n) {

+		ModelElementQuery modelQuery = (ModelElementQuery) n.getBuiltInFunctionNameAST().accept(this);

+		Term argument = (Term) n.getArithmeticTermAST().accept(this);

+		modelQuery.setArgument(argument);

+		createNodeInfoFor(n, modelQuery);

+		// No type checking

+		// typeChecker.typeCheckTerm(modelQuery, argument);

+		return modelQuery;

+	}

+	@Override

+	public Object visit(PredefinedFunctionCallAST0 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting a PredefinedFunctionCallAST1 node (Conversion function) and

+	 * returning a ConversionOperation

+	 * @param n : Current AST node of type PredefinedFunctionCallAST1

+	 */

+	@Override

+	public Object visit(PredefinedFunctionCallAST1 n) {

+		ConversionOperation convOp = (ConversionOperation) n.getConversionFunctionNameAST().accept(this);

+		Term argument = (Term) n.getArithmeticTermAST().accept(this);

+		convOp.getActualParameters().add(argument);

+		createNodeInfoFor(n, convOp);

+		// No type checking

+		// typeChecker.typeCheckTerm(convOp, argument);

+		return convOp;

+	}

+	@Override

+	public Object visit(PredefinedFunctionCallAST1 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+//	*************** Sec. 5.5.1 Simple ASM Rules ******************

+

+	protected void assignCaller(ASMRuleInvocation ruleInvoc, Object caller) {

+		if (caller instanceof ASMRuleInvocation) {

+			ASMRuleInvocation callerInvoc = (ASMRuleInvocation) caller;

+			ruleInvoc.setCaller(callerInvoc);

+		}

+		else if (caller instanceof Rule) {

+			Rule callerRule = (Rule) caller;

+			callerRule.setBody(ruleInvoc);

+		}

+	}

+

+

+

+	/**

+	 * Visiting a FailRuleAST node, and creating a FailRule model element

+	 * @param n : Current AST node of type FailRuleAST

+	 * @param o : is expected to be a ASMRuleInvocation or Rule

+	 * @return rule : FailRule

+	 */

+	@Override

+	public Object visit(FailRuleAST n, Object o) {

+		FailRule rule = SimpleRulesFactory.eINSTANCE.createFailRule();

+		assignCaller(rule, o);

+		createNodeInfoFor(n, rule);

+		rule.setName("FailRule");

+		return rule;

+	}

+

+

+	/**

+	 * Visiting a IfRuleAST node without an "else" branch

+	 * and creating a ConditionalRuleIf model element

+	 * @param n : Current AST node of type IfRuleAST0

+	 * @param o : is expected to be a ASMRuleInvocation or Rule

+	 */

+	@Override

+	public Object visit(IfRuleAST0 n, Object o) {

+		// Creating an IfRule

+		ConditionalRuleIf ifRule = SimpleRulesFactory.eINSTANCE.createConditionalRuleIf();

+		// Assigning the caller (ASM Rule definition or invocation)

+		assignCaller(ifRule, o);

+		// Reset buffer for unresolved variables

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		// Visiting the condition

+		Term condition = (Term) n.getLogicalTermAST().accept(this);

+		ifRule.setExpressionToTest(condition);

+		// Type checking condition

+		typeChecker.getTermsToCheck().add(condition);

+		modelResolver.resolveVariableRefsInRule(ifRule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		// Visiting the if branch

+		ASMRuleInvocation ifBranch = (ASMRuleInvocation) n.getAsmRuleAST().accept(this, ifRule);

+		ifRule.setRuleTrue(ifBranch);

+		createNodeInfoFor(n, ifRule);

+		ifRule.setName("IfRule");

+		return ifRule;

+	}

+

+	/**

+	 * Visiting a IfRuleAST node WITH an "else" branch

+	 * and creating a ConditionalRuleIf model element

+	 * @param n : Current AST node of type IfRuleAST0

+	 * @param o : is expected to be a ASMRuleInvocation or Rule

+	 */

+	@Override

+	public Object visit(IfRuleAST1 n, Object o) {

+		// Creating an IfRule

+		ConditionalRuleIf ifRule = SimpleRulesFactory.eINSTANCE.createConditionalRuleIf();

+		assignCaller(ifRule, o);

+		// Reset buffer for unresolved variables

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+//		modelResolver.getUnresolvedVariableRefs().clear();

+		// Processing the condition

+		Term condition = (Term) n.getLogicalTermAST().accept(this);

+		ifRule.setExpressionToTest(condition);

+		// Type checking condition

+		typeChecker.getTermsToCheck().add(condition);

+		// Resolving variable references in Condition

+		modelResolver.resolveVariableRefsInRule(ifRule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		// Processing the if branch

+		ASMRuleInvocation ifBranch = (ASMRuleInvocation) n.getAsmRuleAST().accept(this, ifRule);

+		ifRule.setRuleTrue(ifBranch);

+		// Processing the else branch

+		ASMRuleInvocation elseBranch = (ASMRuleInvocation) n.getAsmRuleAST7().accept(this, ifRule);

+		ifRule.setRuleFalse(elseBranch);

+		createNodeInfoFor(n, ifRule);

+		ifRule.setName("IfRule");

+		return ifRule;

+	}

+

+

+	/**

+	 * Visiting a TryRuleAST node without an "else" branch

+	 * and creating a ConditionalRuleTry model element

+	 * @param n : Current AST node of type TryRuleAST0

+	 * @param o : is expected to be a ASMRuleInvocation or Rule

+	 */

+	@Override

+	public Object visit(TryRuleAST0 n, Object o) {

+		// Create new TryRule

+		ConditionalRuleTry tryRule = SimpleRulesFactory.eINSTANCE.createConditionalRuleTry();

+		assignCaller(tryRule, o);

+		// Visiting the try branch

+		ASMRuleInvocation tryBranch = (ASMRuleInvocation) n.getAsmRuleAST().accept(this, tryRule);

+		tryRule.setRuleToTry(tryBranch);

+		createNodeInfoFor(n, tryRule);

+		tryRule.setName("TryRule");

+		return tryRule;

+	}

+

+

+	/**

+	 * Visiting a TryRuleAST node WITH an "else" branch

+	 * and creating a ConditionalRuleTry model element

+	 * @param n : Current AST node of type TryRuleAST0

+	 * @param o : is expected to be a ASMRuleInvocation

+	 */

+	@Override

+	public Object visit(TryRuleAST1 n, Object o) {

+		// Create new TryRule

+		ConditionalRuleTry tryRule = SimpleRulesFactory.eINSTANCE.createConditionalRuleTry();

+		assignCaller(tryRule, o);

+		// Processing the try branch

+		ASMRuleInvocation tryBranch = (ASMRuleInvocation) n.getAsmRuleAST().accept(this, tryRule);

+		tryRule.setRuleToTry(tryBranch);

+		// Processing the else branch

+		ASMRuleInvocation elseBranch = (ASMRuleInvocation) n.getAsmRuleAST4().accept(this, tryRule);

+		tryRule.setRuleElse(elseBranch);

+		createNodeInfoFor(n, tryRule);

+		tryRule.setName("TryRule");

+		return tryRule;

+	}

+

+

+	/**

+	 * Visiting a SkipRuleAST node, and creating an EMF model element SkipRule

+	 * @param n : Current AST node of type SkipRuleAST

+	 * @param o : is expected to be a ASMRuleInvocation or ASM Rule

+	 */

+	@Override

+	public Object visit(SkipRuleAST n, Object o) {

+		SkipRule rule = SimpleRulesFactory.eINSTANCE.createSkipRule();

+		assignCaller(rule, o);

+		createNodeInfoFor(n, rule);

+		rule.setName("SkipRule");

+		return rule;

+	}

+

+

+	/**

+	 * Visiting a CallRuleAST node, and creating a CallRule model element

+	 * @param n : Current AST node of type CallRuleAST

+	 * @param o : is expected to be a ASMRuleInvocation

+	 */

+	@Override

+	public Object visit(CallRuleAST n, Object o) {

+		// Create new CallRule

+		CallRule callRule = SimpleRulesFactory.eINSTANCE.createCallRule();

+		assignCaller(callRule, o);

+		// Reset buffer for unresolved variables

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		// Setting the name of the called ASMRule

+		String ruleName =  (String) n.getQualifiedTypeNameAST().accept(this);

+		callRule.setFqn(ruleName);

+		callRule.setName(ruleName);

+		// Setting the actual parameters

+		n.getActualParameterDefAST().accept(this, callRule.getActualParameters());

+		// Type checking actual parameters

+		for (Object param : callRule.getActualParameters()) {

+			Term term = (Term) param;

+			typeChecker.getTermsToCheck().add(term);

+		}

+		// Type check compatibility of actual parameters

+		typeChecker.getAsmCallRuleToCheck().add(callRule);

+		// Resolving variable references

+		modelResolver.resolveVariableRefsInRule(callRule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		// Creating node information

+		createNodeInfoFor(n, callRule);

+		// Resolve the reference to the called rule in a later stage

+		modelResolver.getUnresolvedAsmRuleCalls().add(callRule);

+		callRule.setName("CallRule");

+		return callRule;

+	}

+

+	/**

+	 * Visiting a LogRuleAST node, and creating a LogRule model element

+	 * @param n : Current AST node of type LogRuleAST

+	 * @param o : is expected to be a ASMRuleInvocation

+	 */

+	@Override

+	public Object visit(LogRuleAST n, Object o) {

+		// Then create LogRule model element

+		LogRule logRule = SimpleRulesFactory.eINSTANCE.createLogRule();

+		assignCaller(logRule, o);

+		// Reset buffer for unresolved variables

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		// Process Log level

+		LogLevel logLevel =  (LogLevel) n.getLogLevelAST().accept(this);

+		logRule.setLevel(logLevel);

+		// Process the term to log

+		Term logTerm = (Term) n.getArithmeticTermAST().accept(this);

+		logRule.setOut(logTerm);

+		// Type checking term

+		typeChecker.getTermsToCheck().add(logTerm);

+		// Resolve variable references in the out term

+		modelResolver.resolveVariableRefsInRule(logRule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		createNodeInfoFor(n, logRule);

+		logRule.setName("LogRule");

+		return logRule;

+	}

+

+	/**

+	 * Visiting the LogLevelAST node, and returning its LogLevel

+	 * @param n : Current AST node

+	 */

+	@Override

+	public Object visit(LogLevelAST n) {

+		String logStr = n.toString();

+		if (logStr.equals("debug")) {

+			return LogLevel.DEBUG_LITERAL;

+		}

+		else if (logStr.equals("info")) {

+			return LogLevel.INFO_LITERAL;

+		}

+		else if (logStr.equals("warning")) {

+			return LogLevel.WARNING_LITERAL;

+		}

+		else if (logStr.equals("error")) {

+			return LogLevel.ERROR_LITERAL;

+		}

+		else if (logStr.equals("fatal")) {

+			return LogLevel.FATAL_LITERAL;

+		}

+		return null;

+	}

+

+

+

+	/**

+	 * Visiting a {@link PrintRuleAST0} node (print), and creating a PrintRule model element

+	 * @param n : Current AST node of type PrintRuleAST0

+	 * @param o : Object o is expected to be a ASMRuleInvocation

+	 * @return printRule: {@link PrintRule}

+	 */

+	@Override

+	public Object visit(PrintRuleAST0 n, Object o) {

+		// Create a PrintRule

+		PrintRule printRule = SimpleRulesFactoryImpl.eINSTANCE.createPrintRule();

+		assignCaller(printRule, o);

+		// Reset buffer for unresolved variables

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		// Visit the term to print

+		Term printTerm = (Term) n.getLogicalTermAST().accept(this);

+		printRule.setOut(printTerm);

+		// Type checking term

+		typeChecker.getTermsToCheck().add(printTerm);

+		// Resolve variable references in the out term

+		modelResolver.resolveVariableRefsInRule(printRule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		createNodeInfoFor(n, printRule);

+		printRule.setName("PrintRule");

+		return printRule;

+	}

+

+	/**

+	 * Visiting a {@link PrintRuleAST1} node (print with buffer), and

+	 * creating a PrintLnRule model element

+	 * @param n : Current AST node of type PrintRuleAST1

+	 * @param o : Object o is expected to be a ASMRuleInvocation

+	 * @return printRule : the new {@link PrintRule}

+	 */

+	@Override

+	public Object visit(PrintRuleAST1 n, Object o) {

+		// Create a PrintRule

+		PrintRule printRule = SimpleRulesFactoryImpl.eINSTANCE.createPrintRule();

+		assignCaller(printRule, o);

+		// Reset buffer for unresolved variables

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		// Visit the buffer to print to

+		Term buffer = (Term) n.getArithmeticTermAST().accept(this);

+		printRule.setBuffer(buffer);

+		// Process the term to print

+		Term printTerm = (Term) n.getLogicalTermAST().accept(this);

+		printRule.setOut(printTerm);

+		// Type checking term

+		typeChecker.getTermsToCheck().add(printTerm);

+		// Resolve variable references in the out term

+		modelResolver.resolveVariableRefsInRule(printRule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		createNodeInfoFor(n, printRule);

+		printRule.setName("PrintRule");

+		return printRule;

+	}

+	/**

+	 * Visiting a {@link PrintRuleAST2} node (println), and creating a PrintRule model element

+	 * @param n : Current AST node of type PrintRuleAST0

+	 * @param o : Object o is expected to be a ASMRuleInvocation

+	 * @return printRule: {@link PrintLnRule}

+	 */

+	@Override

+	public Object visit(PrintRuleAST2 n, Object o) {

+		// Create a PrintRule

+		PrintLnRule printRule = SimpleRulesFactoryImpl.eINSTANCE.createPrintLnRule();

+		assignCaller(printRule, o);

+		// Reset buffer for unresolved variables

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		// Visit the term to print

+		Term printTerm = (Term) n.getLogicalTermAST().accept(this);

+		printRule.setOut(printTerm);

+		// Type checking term

+		typeChecker.getTermsToCheck().add(printTerm);

+		// Resolve variable references in the out term

+		modelResolver.resolveVariableRefsInRule(printRule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		createNodeInfoFor(n, printRule);

+		printRule.setName("PrintLNRule");

+		return printRule;

+	}

+

+	/**

+	 * Visiting a {@link PrintRuleAST3} node (println with buffer), and

+	 * creating a PrintLnRule model element

+	 * @param n : Current AST node of type PrintRuleAST1

+	 * @param o : Object o is expected to be a ASMRuleInvocation

+	 * @return printRule : the new {@link PrintLnRule}

+	 */

+	@Override

+	public Object visit(PrintRuleAST3 n, Object o) {

+		// Create a PrintRule

+		PrintLnRule printRule = SimpleRulesFactoryImpl.eINSTANCE.createPrintLnRule();

+		assignCaller(printRule, o);

+		// Reset buffer for unresolved variables

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		// Visit the buffer to print to

+		Term buffer = (Term) n.getArithmeticTermAST().accept(this);

+		printRule.setBuffer(buffer);

+		// Process the term to print

+		Term printTerm = (Term) n.getLogicalTermAST().accept(this);

+		printRule.setOut(printTerm);

+		// Type checking term

+		typeChecker.getTermsToCheck().add(printTerm);

+		// Resolve variable references in the out term

+		modelResolver.resolveVariableRefsInRule(printRule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		createNodeInfoFor(n, printRule);

+		printRule.setName("PrintLnRule");

+		return printRule;

+	}

+

+

+	/**

+	 * Visiting an UpdateRuleAST0 node (for variable updates), and

+	 * creating a RuleUpdateVariable model element.

+	 * The references to the predefined variable used here are not resolved

+	 * @param n : Current AST node of type UpdateRuleAST0

+	 * @param o : Object o is expected to be a ASMRuleInvocation

+	 */

+	@Override

+	public Object visit(UpdateRuleAST0 n, Object o) {

+		// Create new Variable Update Rule

+		RuleUpdateVariable updateRule = SimpleRulesFactory.eINSTANCE.createRuleUpdateVariable();

+		assignCaller(updateRule, o);

+		// Reset buffer for unresolved variables

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		// Process the variable to be updated

+		VariableReference variableRef = (VariableReference) n.getVariableRefAST().accept(this);

+		updateRule.setVariable(variableRef);

+		// Type checking for variable reference

+		typeChecker.getTermsToCheck().add(variableRef);

+		// Process the term as the right value

+		Term term = (Term) n.getArithmeticTermAST().accept(this);

+		updateRule.setValue(term);

+		// Type checking for term

+		typeChecker.getTermsToCheck().add(term);

+		// Schedule type compatibility checking for Left and Right values

+		typeChecker.getUpdateRulesToCheck().add(updateRule);

+		// Resolve variable references in the term

+		modelResolver.resolveVariableRefsInRule(updateRule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		createNodeInfoFor(n, updateRule);

+		updateRule.setName("UpdateRule");

+		return updateRule;

+	}

+

+	/**

+	 * Visiting an UpdateRuleAST1 node (for ASM function updates), and

+	 * creating a RuleUpdateASMFunction model element.

+	 * The references to the predefined variable used here are not resolved

+	 * @param n : Current AST node of type UpdateRuleAST1

+	 * @param o : Object o is expected to be a ASMRuleInvocation

+	 */

+	@Override

+	public Object visit(UpdateRuleAST1 n, Object o) {

+		RuleUpdateASMFunction updateRule = SimpleRulesFactory.eINSTANCE.createRuleUpdateASMFunction();

+		assignCaller(updateRule, o);

+		// Reset buffer for unresolved variables

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		// Process the ASM function to be updated

+		n.getAsmFunctionUpdateLocationAST().accept(this, updateRule);

+		// Process the term as the right value

+		Term term = (Term) n.getArithmeticTermAST().accept(this);

+		updateRule.setValue(term);

+		// Type checking for term

+		typeChecker.getTermsToCheck().add(term);

+		// Resolve variable references in the term

+		modelResolver.resolveVariableRefsInRule(updateRule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		// Schedule type compatibility checking for Left and Right values

+		typeChecker.getUpdateRulesToCheck().add(updateRule);

+		createNodeInfoFor(n, updateRule);

+		updateRule.setName("UpdateRule");

+		return updateRule;

+	}

+

+//	*************** Sec. 5.5.2. Compound ASM Rules ******************

+

+	/**

+	 * Visiting a ChooseRuleAST node and

+	 * creating a ChooseRule model element.

+	 * @param n : Current AST node of type ChooseRuleAST

+	 * @param o : Object o is expected to be a ASMRuleInvocation

+	 */

+	@Override

+	public Object visit(ChooseRuleAST n, Object o) {

+		// Create a choose rule

+		ChooseRule chooseRule = CompoundRulesFactory.eINSTANCE.createChooseRule();

+		assignCaller(chooseRule, o);

+		// Reset buffer for unresolved variables

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		// Process variable definitions (if any)

+		if (n.getConstrainedVariablesOptAST() != null) {

+			n.getConstrainedVariablesOptAST().accept(this, chooseRule);

+		}

+		// Process condition

+		Object cond = n.getConditionAST().accept(this);

+		// Check if the condition is a term (including ASMFunctionInvocation)

+		if (cond instanceof Term) {

+			Term term = (Term) cond;

+			chooseRule.setCondition(term);

+			chooseRule.setGtrule(null);

+			// Type checking for term

+			typeChecker.getTermsToCheck().add(term);

+			chooseRule.setName("ChooseRuleWithTerm");

+		}

+		// or a GTRuleInvocation

+		else if (cond instanceof GTRuleInvocation) {

+			GTRuleInvocation gtrule = (GTRuleInvocation) cond;

+			chooseRule.setGtrule(gtrule);

+			chooseRule.setCondition(null);

+			// Type check actual parameters of GTRuleInvocation is already scheduled

+			chooseRule.setName("ChooseRuleWithGTRule");

+		}

+		// Resolve variable references in the condition

+		modelResolver.resolveVariableRefsInRule(chooseRule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		// Process the body of the rule

+		n.getDoActionOptAST().accept(this, chooseRule);

+		createNodeInfoFor(n, chooseRule);

+		return chooseRule;

+	}

+

+	/**

+	 * Visiting a ForallRuleAST node and

+	 * creating a ForallRule model element.

+	 * @param n : Current AST node of type ForallRuleAST

+	 * @param o : Object o is expected to be a ASMRuleInvocation

+	 */

+	@Override

+	public Object visit(ForallRuleAST n, Object o) {

+		// Create a ForallRule

+		ForallRule forallRule = CompoundRulesFactory.eINSTANCE.createForallRule();

+		assignCaller(forallRule, o);

+		// Reset buffer for unresolved variables

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		// Process variable definitions (if any)

+		if (n.getConstrainedVariablesOptAST() != null) {

+			n.getConstrainedVariablesOptAST().accept(this, forallRule);

+		}

+		// Process condition

+		Object cond = n.getConditionAST().accept(this);

+		// Check if the condition is a term

+		if (cond instanceof Term) {

+			Term term = (Term) cond;

+			forallRule.setCondition(term);

+			forallRule.setGtrule(null);

+			// Type checking for term

+			typeChecker.getTermsToCheck().add(term);

+			forallRule.setName("ForallRuleWithTerm");

+		}

+		// or a GTRuleInvocation

+		else if (cond instanceof GTRuleInvocation) {

+			GTRuleInvocation gtrule = (GTRuleInvocation) cond;

+			forallRule.setGtrule(gtrule);

+			forallRule.setCondition(null);

+			// Type check actual parameters of GTRuleInvocation is already scheduled

+			forallRule.setName("ForallRuleWithGTRule");

+		}

+		// Resolve variable references in the condition

+		modelResolver.resolveVariableRefsInRule(forallRule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		// Process the body of the rule

+		n.getDoActionOptAST().accept(this, forallRule);

+		createNodeInfoFor(n, forallRule);

+		return forallRule;

+	}

+

+	/**

+	* Visiting a {@link DoActionOptAST0} node and

+	* creating a default {@link SkipRule} model element as body

+	* @param n : Current AST node of type {@link DoActionOptAST0}

+	* @param o : Object o is expected to be a {@link CollectionIteratorRule}

+	*/

+	@Override

+	public Object visit(DoActionOptAST0 n, Object o) {

+		CollectionIteratorRule callerRule = (CollectionIteratorRule) o;

+		SkipRule skipRule = SimpleRulesFactory.eINSTANCE.createSkipRule();

+		skipRule.setCaller(callerRule);

+		callerRule.setBody(skipRule);

+		// Node info is not created here

+		skipRule.setName("SkipRule");

+		return skipRule;

+	}

+

+	/**

+	 * Visiting a {@link DoActionOptAST1} node

+	 * @param n : Current AST node of type {@link DoActionOptAST1}

+	 * @param o : Object o is expected to be a {@link CollectionIteratorRule}

+	 */

+	@Override

+	public Object visit(DoActionOptAST1 n, Object o) {

+		CollectionIteratorRule callerRule = (CollectionIteratorRule) o;

+		ASMRuleInvocation asmRule = (ASMRuleInvocation) n.getAsmRuleAST().accept(this, callerRule);

+		callerRule.setBody(asmRule);

+		return asmRule;

+	}

+

+	/**

+	 * Visiting an IterateRuleAST node and

+	 * creating an IterateRule model element.

+	 * @param n : Current AST node of type IterateRuleAST

+	 * @param o : Object o is expected to be an ASMRuleInvocation

+	 */

+	@Override

+	public Object visit(IterateRuleAST n, Object o) {

+		// Create an IterateRule

+		IterateRule iterateRule = CompoundRulesFactory.eINSTANCE.createIterateRule();

+		assignCaller(iterateRule, o);

+		// Processing the body

+		ASMRuleInvocation bodyRule = (ASMRuleInvocation) n.getAsmRuleAST().accept(this, iterateRule);

+		iterateRule.setBody(bodyRule);

+		createNodeInfoFor(n, iterateRule);

+		return iterateRule;

+	}

+

+	/**

+	 * Visiting a {@link WhenRuleAST} and creating a {@link WhenRule} element

+	 * @param n : Current AST node of type {@link WhenRuleAST}

+	 * @param o : Object o is expected to be an ASMRuleInvocation

+	 */

+	@Override

+	public Object visit(WhenRuleAST n, Object o) {

+		WhenRule whenRule = CompoundRulesFactory.eINSTANCE.createWhenRule();

+		assignCaller(whenRule, o);

+		// Process condition

+		n.getWhenConditionAST().accept(this, whenRule.getConditions());

+		// Processing the body

+		ASMRuleInvocation bodyRule = (ASMRuleInvocation) n.getAsmRuleAST().accept(this, whenRule);

+		whenRule.setBody(bodyRule);

+		// Create node info

+		createNodeInfoFor(n, whenRule);

+		whenRule.setName("WhenCondition");

+		return whenRule;

+	}

+

+

+	/**

+	 * Visiting a {@link WhenChangeAST0} (new clause)

+	 * @param n : Current AST node of type {@link WhenChangeAST0}

+	 * @param o : List of {@link ChangeEvent} as when conditions

+	 */

+	@Override

+	public Object visit(WhenChangeAST0 n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<ChangeEvent> conditionList = (List<ChangeEvent>) o;

+		VariableReference varRef = (VariableReference) n.getVariableRefAST().accept(this);

+		ChangeEvent changeEvent = createChangeEvent(/*(ASTNode)*/ n, ChangeKind.NEW, varRef);

+		conditionList.add(changeEvent);

+		return conditionList;

+	}

+

+	/**

+	 * Visiting a {@link WhenChangeAST1} (delete clause)

+	 * @param n : Current AST node of type {@link WhenChangeAST1}

+	 * @param o : List of {@link ChangeEvent} as when conditions

+	 */

+	@Override

+	public Object visit(WhenChangeAST1 n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<ChangeEvent> conditionList = (List<ChangeEvent>) o;

+		VariableReference varRef = (VariableReference) n.getVariableRefAST().accept(this);

+		ChangeEvent changeEvent = createChangeEvent(/*(ASTNode)*/ n, ChangeKind.DELETE, varRef);

+		conditionList.add(changeEvent);

+		return conditionList;

+	}

+

+	/**

+	 * Visiting a {@link WhenChangeAST2} (changed clause)

+	 * @param n : Current AST node of type {@link WhenChangeAST2}

+	 * @param o : List of {@link ChangeEvent} as when conditions

+	 */

+	@Override

+	public Object visit(WhenChangeAST2 n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<ChangeEvent> conditionList = (List<ChangeEvent>) o;

+		VariableReference varRef = (VariableReference) n.getVariableRefAST().accept(this);

+		ChangeEvent changeEvent = createChangeEvent(/*(ASTNode)*/ n, ChangeKind.CHANGED, varRef);

+		conditionList.add(changeEvent);

+		return conditionList;

+	}

+

+	/**

+	 * Creates a {@link ChangeEvent}

+	 * @param n : ASTNode representing the change event

+	 * @param kind : new, delete or changed

+	 * @return the new {@link ChangeEvent}

+	 */

+	protected ChangeEvent createChangeEvent(ASTNode n, ChangeKind kind, VariableReference varRef) {

+		ChangeEvent changeEvent = DefinitionsFactory.eINSTANCE.createChangeEvent();

+		changeEvent.setChangeKind(ChangeKind.CHANGED);

+		changeEvent.setVariableReference(varRef);

+		createNodeInfoFor(n, changeEvent);

+		return changeEvent;

+	}

+

+	/**

+	 * Visiting a {@link WhenConditionAST}

+	 * @param n : Current AST node of type {@link WhenConditionAST}

+	 * @param o : List of {@link ChangeEvent} as when conditions

+	 */

+	@Override

+	public Object visit(WhenConditionAST n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<ChangeEvent> conditionList = (List<ChangeEvent>) o;

+		n.getWhenConditionAST().accept(this, conditionList);

+		n.getWhenChangeAST().accept(this, conditionList);

+		return conditionList;

+	}

+

+

+	/**

+	 * Visiting a LetRuleAST node and

+	 * creating an LetRule model element.

+	 * @param n : Current AST node of type LetRuleAST

+	 * @param o : Object o is expected to be an ASMRuleInvocation or Rule

+	 */

+	@Override

+	public Object visit(LetRuleAST n, Object o) {

+		// Create a LetRule

+		LetRule letRule = CompoundRulesFactory.eINSTANCE.createLetRule();

+		assignCaller(letRule, o);

+		// Reset buffer for unresolved variables in the variable definition part

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		// Processing variable definitions

+		n.getVariableDefinitionsAST().accept(this, letRule);

+		// Resolve variable references in the condition

+		modelResolver.resolveVariableRefsInRule(letRule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		// Processing the body

+		ASMRuleInvocation bodyRule = (ASMRuleInvocation) n.getAsmRuleAST().accept(this, letRule);

+		letRule.setBody(bodyRule);

+		createNodeInfoFor(n, letRule);

+		letRule.setName("LetRule");

+		return letRule;

+	}

+

+	/**

+	 * Visiting a RandomRuleAST node

+	 * creating a RandomRule model element.

+	 * @param n : Current AST node of type RandomRuleAST

+	 * @param o : Object o is expected to be an ASMRuleInvocation

+	 */

+	@Override

+	public Object visit(RandomRuleAST n, Object o) {

+		// Creating a RandomRule

+		RandomRule randomRule = CompoundRulesFactory.eINSTANCE.createRandomRule();

+		assignCaller(randomRule, o);

+		// Processing the subrules

+		n.getAsmRulesAST().accept(this, randomRule);

+		createNodeInfoFor(n, randomRule);

+		randomRule.setName("RandomRule");

+		return randomRule;

+	}

+

+	/**

+	 * Visiting a {@link SequentialRuleAST} node

+	 * creating a {@link SequentialRule} model element.

+	 * @param n : Current AST node of type {@link SequentialRuleAST}

+	 * @param o : Object o is expected to be an ASMRuleInvocation

+	 */

+	@Override

+	public Object visit(SequentialRuleAST n, Object o) {

+		SequentialRule seqRule = CompoundRulesFactory.eINSTANCE.createSequentialRule();

+		assignCaller(seqRule, o);

+		n.getAsmRulesAST().accept(this, seqRule);

+		createNodeInfoFor(n, seqRule);

+		seqRule.setName("SequentialRule");

+		return seqRule;

+	}

+

+	/**

+	 * Visiting a {@link ParallelRuleAST} node

+	 * creating a {@link ParallelRule} model element.

+	 * @param n : Current AST node of type {@link ParallelRuleAST}

+	 * @param o : Object o is expected to be an {@link ASMRuleInvocation}

+	 */

+	@Override

+	public Object visit(ParallelRuleAST n, Object o) {

+		ParallelRule parRule = CompoundRulesFactory.eINSTANCE.createParallelRule();

+		assignCaller(parRule, o);

+		n.getAsmRulesAST().accept(this, parRule);

+		createNodeInfoFor(n, parRule);

+		parRule.setName("ParallelRule");

+		return parRule;

+	}

+

+	/**

+	 * Visiting ActualParamsPatternVariablesAST node and return its ActualParams

+	 * @param n : Current AST node of type ActualParamsPatternVariablesAST

+	 * @param o : List of Parameters

+	 */

+	@Override

+	public Object visit(ActualParamsPatternVariablesAST n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<VariableReference> paramList = (List<VariableReference>) o;

+		if (n.getActualParamsPatternVariablesAST() != null) {

+			n.getActualParamsPatternVariablesAST().accept(this, paramList);

+		}

+		VariableReference varRef = (VariableReference) n.getPatternVariableRefAST().accept(this);

+		paramList.add(varRef);

+		//createNodeInfoFor(n, varRef);

+		return paramList;

+	}

+

+	/**

+	 * Visiting an AsmRulesAST node

+	 * @param n : Current AST node of type AsmRulesAST

+	 * @param o : Object o is expected to be a NestedRule

+	 */

+	@Override

+	public Object visit(AsmRulesAST n, Object o) {

+		NestedRule callerRule = (NestedRule) o;

+		if (n.getAsmRulesOptAST() != null) {

+			n.getAsmRulesOptAST().accept(this, callerRule);

+		}

+		ASMRuleInvocation bodyRule = (ASMRuleInvocation) n.getAsmRuleAST().accept(this, callerRule);

+		if (bodyRule != null) {

+			callerRule.getSubrules().add(bodyRule);

+		}

+		return callerRule;

+	}

+

+	/**

+	 * Visiting an AsmRulesOptAST node

+	 * @param n : Current AST node of type AsmRulesOptAST

+	 * @param o : Object o is expected to be a NestedRule

+	 */

+	@Override

+	public Object visit(AsmRulesOptAST n, Object o) {

+		NestedRule callerRule = (NestedRule) o;

+		if (n.getAsmRulesOptAST() != null) {

+			n.getAsmRulesOptAST().accept(this, callerRule);

+		}

+		ASMRuleInvocation bodyRule = (ASMRuleInvocation) n.getAsmRuleAST().accept(this, callerRule);

+		if (bodyRule != null) {

+			callerRule.getSubrules().add(bodyRule);

+		}

+		return callerRule;

+	}

+

+	/**

+	 * Visiting a VariableDefinitionsAST node

+	 * @param n : Current AST node of type VariableDefinitionsAST

+	 * @param o : Object o is expected to be a LetRule

+	 */

+	@Override

+	public Object visit(VariableDefinitionsAST n, Object o) {

+		LetRule callerRule = (LetRule) o;

+		n.getVariableDefinitionsAST().accept(this, callerRule);

+		n.getVariableDefinitionAST().accept(this, callerRule);

+		return callerRule;

+	}

+

+	/**

+	 * Visiting a VariableDefinitionAST node

+	 * @param n : Current AST node of type VariableDefinitionsAST

+	 * @param o : Object o is expected to be a LetRule

+	 */

+	@Override

+	public Object visit(VariableDefinitionAST n, Object o) {

+		LetRule callerRule = (LetRule) o;

+		// Create a variable definition

+		VariableDefinition varDef = DefinitionsFactory.eINSTANCE.createVariableDefinition();

+		// Process the variable

+		Variable var = (Variable) n.getVariableDefAST().accept(this);

+		varDef.setVariable(var);

+		varDef.setName(var.getName());

+		varDef.setFqn(var.getFqn());

+		// Process the values

+		Term value = (Term) n.getArithmeticTermAST().accept(this);

+		varDef.setValue(value);

+		// Type checking for value

+		typeChecker.getTermsToCheck().add(value);

+		// Add new variable to the caller rule

+		callerRule.getLocalVariables().add(var);

+		callerRule.getDefinitions().add(varDef);

+		// Process type information

+		if (n.getTypeOptAST() != null) {

+			n.getTypeOptAST().accept(this, var);

+		}

+		// Typecheck compatibility of initial value with its type

+		typeChecker.getVarDefsToCheck().add(varDef);

+		createNodeInfoFor(n, varDef);

+		return callerRule;

+	}

+

+

+//	***************** Sec. 5.5.3 Model Manipulation Rules *************

+

+	/**

+	 * Visiting a {@link CreateRuleAST0} and

+	 * creating an {@link ElementCreateRule} model element

+	 * @param n : Current AST node of type {@link CreateRuleAST0}

+	 * @param o : expected to be an {@link ASMRuleInvocation} or {@link Rule}

+	 * @return rule : ElementCreateRule

+	 */

+	@Override

+	public Object visit(CreateRuleAST0 n, Object o) {

+		// Reset buffer for unresolved variables

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		ElementCreateRule rule = (ElementCreateRule) n.getCreateModelElementAST().accept(this);

+		assignCaller(rule, o);

+		// Resolve variable references in the condition

+		modelResolver.resolveVariableRefsInRule(rule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		rule.setName("ElementCreateRule");

+		return rule;

+	}

+

+	/**

+	 * Visiting a {@link CreateRuleAST1} and

+	 * creating a {@link RelationshipCreateRule}

+	 * @param n : Current AST node of type {@link CreateRuleAST1}

+	 * @param o : expected to be an {@link ASMRuleInvocation} or {@link Rule}

+	 * @return The created {@link RelationshipCreateRule}

+	 */

+	@Override

+	public Object visit(CreateRuleAST1 n, Object o) {

+		// Reset buffer for unresolved variables

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		// Create a RelationshipCreateRule

+		RelationshipCreateRule rule = (RelationshipCreateRule) n.getCreateRelationshipAST().accept(this);

+		assignCaller(rule, o);

+		// Resolve variable references in the condition

+		modelResolver.resolveVariableRefsInRule(rule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		createNodeInfoFor(n, rule);

+		rule.setName("RelationshipCreateRule");

+		return rule;

+	}

+

+	/**

+	 * Visiting a {@link CreateModelElementAST0} (Entity Creation) and

+	 * creating an {@link EntityCreateRule} model element

+	 * @param n : Current AST node of type {@link CreateModelElementAST0}

+	 * @return The created {@link EntityCreateRule}

+	 */

+	@Override

+	public Object visit(CreateModelElementAST0 n) {

+		EntityCreateRule rule = CreationFactory.eINSTANCE.createEntityCreateRule();

+		createNodeInfoFor(n, rule);

+		String typeStr = (String) n.getQualifiedTypeNameAST().accept(this);

+

+//		// The type of the model element is represented as a model element constant

+//		Constant typeConst = TermsFactory.eINSTANCE.createConstant();

+//		typeConst.setValue(typeStr);

+//		typeConst.setKind(ValueKind.MODELELEMENT_LITERAL);

+//		rule.setType(typeConst);

+

+		// This issue should be handled in the interpreter

+		if (!typeStr.equals("entity") && !typeStr.equals("vpm.entity")) {

+			// Create an element reference in compliance with the previous parser

+			ElementReference elemRef = QueryFunctionsFactory.eINSTANCE.createElementReference();

+			Constant typeConst = TermsFactory.eINSTANCE.createConstant();

+			String value;

+			if (!typeStr.contentEquals("")) {

+				value = typeStr;

+			} else {

+				value = n.getQualifiedTypeNameAST().toString();

+			}

+			typeConst.setValue(value);

+			elemRef.setName("ref(" + value + ")");

+			typeConst.setName(value);

+			typeConst.setKind(ValueKind.STRING_LITERAL);

+			elemRef.setArgument(typeConst);

+			rule.setType(elemRef);

+

+			// Resolve the type name

+			modelResolver.resolveTypesInASMRules(rule, typeStr);

+

+		}

+		VariableReference varRef =  (VariableReference) n.getCreateEntityBodyAST().accept(this);

+		// Type check compatibility of variable reference and its definition

+		typeChecker.getTermsToCheck().add(varRef);

+		rule.setTargetVariable(varRef);

+		if (n.getInConstraintOptAST() != null) {

+			Term parent = (Term) n.getInConstraintOptAST().accept(this);

+			rule.setParent(parent);

+			// Type checking

+			typeChecker.getTermsToCheck().add(parent);

+		}

+		rule.setName("EntityCreateRule");

+		return rule;

+	}

+

+	/**

+	 * Visiting a {@link CreateModelElementAST1} (Relation Creation) and

+	 * creating a {@link RelationCreateRule} model element

+	 * @param n : Current AST node of type {@link CreateModelElementAST1}

+	 * @return The created {@link RelationCreateRule}

+	 */

+	@Override

+	public Object visit(CreateModelElementAST1 n) {

+		RelationCreateRule rule = CreationFactory.eINSTANCE.createRelationCreateRule();

+		createNodeInfoFor(n, rule);

+		String typeStr = (String) n.getQualifiedTypeNameAST().accept(this);

+//		// The type of the model element is represented as a model element constant

+//		Constant typeConst = TermsFactory.eINSTANCE.createConstant();

+//		typeConst.setKind(ValueKind.MODELELEMENT_LITERAL);

+//		typeConst.setValue(typeStr);

+//		rule.setType(typeConst);

+

+		// This issue should be handled in the interpreter

+		if (!typeStr.equals("relation") && !typeStr.equals("vpm.entity.relation")) {

+			// Create an element reference in compliance with the previous parser

+			ElementReference elemRef = QueryFunctionsFactory.eINSTANCE.createElementReference();

+			Constant typeConst = TermsFactory.eINSTANCE.createConstant();

+			String value;

+			if (!typeStr.contentEquals("")) {

+				value = typeStr;

+			} else {

+				value = n.getQualifiedTypeNameAST().toString();

+			}

+			typeConst.setValue(value);

+			typeConst.setName(value);

+			elemRef.setName("ref(" + value + ")");

+			typeConst.setKind(ValueKind.STRING_LITERAL);

+			elemRef.setArgument(typeConst);

+			rule.setType(elemRef);

+

+			// Resolve the type name

+			modelResolver.resolveTypesInASMRules(rule, typeStr);

+		}

+		n.getCreateRelationBodyAST().accept(this, rule);

+		rule.setName("RelationCreateRule");

+		return rule;

+	}

+

+	/**

+	 * Visiting a {@link CreateEntityBodyAST} and

+	 * returning a {@link VariableReference} model element

+	 * @param n : Current AST node of type {@link CreateEntityBodyAST}

+	 * @return {@link VariableReference}

+	 */

+	@Override

+	public Object visit(CreateEntityBodyAST n) {

+		return /*(VariableReference)*/ n.getVariableRefAST().accept(this);

+	}

+

+

+

+

+	/**

+	 * Visiting an {@link InConstraintOptAST} and

+	 * returning a {@link Term} model element

+	 * @param n : Current AST node of type {@link InConstraintOptAST}

+	 * @return {@link Term}

+	 */

+	@Override

+	public Object visit(InConstraintOptAST n) {

+		return /*(Term)*/ n.getArithmeticTermAST().accept(this);

+	}

+

+	/**

+	 * Visiting a {@link CreateRelationBodyAST} and

+	 * setting the source and target of a {@link RelationCreateRule}

+	 * @param n : Current AST node of type {@link CreateRelationBodyAST}

+	 * @return {@link RelationCreateRule}

+	 */

+	@Override

+	public Object visit(CreateRelationBodyAST n, Object o) {

+		RelationCreateRule rule = (RelationCreateRule) o;

+		VariableReference varRef = (VariableReference) n.getVariableDefRefAST().accept(this);

+		// Type check compatibility of variable reference and its definition

+		typeChecker.getTermsToCheck().add(varRef);

+		Term src = (Term) n.getArithmeticTermAST().accept(this);

+		Term trg = (Term) n.getArithmeticTermAST6().accept(this);

+		rule.setTargetVariable(varRef);

+		rule.setSource(src);

+		rule.setTarget(trg);

+		// Type checking src

+		typeChecker.getTermsToCheck().add(src);

+		// Type checking trg

+		typeChecker.getTermsToCheck().add(trg);

+		rule.setName("RelationCreateRule");

+		return rule;

+	}

+

+	/**

+	 * Commonly used code by different types of RelationshipCreateRules

+	 * @param rule : {@link RelationshipCreateRule}

+	 * @param first : {@link Term}

+	 * @param second : {@link Term}

+	 */

+	protected void commonCreateTasks(RelationshipCreateRule rule, Term first, Term second) {

+		rule.setSuper(first);

+		rule.setSub(second);

+	}

+

+	/**

+	 * Visiting a {@link CreateRelationshipAST0} (supertypeOf) and

+	 * creating a {@link CreateSupertypeOf} rule with

+	 * first parameter as super and second parameter as sub

+	 * @param n : Current AST node of type {@link CreateRelationshipAST0}

+	 * @return The created {@link CreateSupertypeOf} rule

+	 */

+	@Override

+	public Object visit(CreateRelationshipAST0 n) {

+		List<Term> parameters = new ArrayList<Term>();

+		n.getTwoParametersAST().accept(this, parameters);

+		CreateSupertypeOf rule = CreationFactory.eINSTANCE.createCreateSupertypeOf();

+		commonCreateTasks(rule, parameters.get(0), parameters.get(1));

+		rule.setName("CreateSupertypeOfRule");

+		return rule;

+	}

+

+	/**

+	 * Visiting a {@link CreateRelationshipAST1} (subtypeOf) and

+	 * creating a {@link CreateSupertypeOf} rule with

+	 * first parameter as sub and second parameter as super.

+	 * There is no CreateSubtypeOf element in the model.

+	 * @param n : Current AST node of type {@link CreateRelationshipAST1}

+	 * @return The created {@link CreateSupertypeOf} rule

+	 */

+	@Override

+	public Object visit(CreateRelationshipAST1 n) {

+		List<Term> parameters = new ArrayList<Term>();

+		n.getTwoParametersAST().accept(this, parameters);

+		CreateSupertypeOf rule = CreationFactory.eINSTANCE.createCreateSupertypeOf();

+		commonCreateTasks(rule, parameters.get(1), parameters.get(0));

+		rule.setName("CreateSubtypeOfRule");

+		return rule;

+	}

+

+	/**

+	 * Visiting a {@link CreateRelationshipAST2} (typeOf) and

+	 * creating a {@link CreateInstanceOf} rule with

+	 * first parameter as sub and second parameter as super

+	 * @param n : Current AST node of type {@link CreateRelationshipAST2}

+	 * @return The created {@link CreateInstanceOf} rule

+	 */

+	@Override

+	public Object visit(CreateRelationshipAST2 n) {

+		List<Term> parameters = new ArrayList<Term>();

+		n.getTwoParametersAST().accept(this, parameters);

+		CreateInstanceOf rule = CreationFactory.eINSTANCE.createCreateInstanceOf();

+		commonCreateTasks(rule, parameters.get(0), parameters.get(1));

+		rule.setName("CreateTypeOfRule");

+		return rule;

+	}

+

+	/**

+	 * Visiting a {@link CreateRelationshipAST3} (instanceOf) and

+	 * creating a {@link CreateInstanceOf} rule with

+	 * first parameter as super and second parameter as sub

+	 * @param n : Current AST node of type {@link CreateRelationshipAST3}

+	 * @return The created {@link CreateInstanceOf} rule

+	 */

+	@Override

+	public Object visit(CreateRelationshipAST3 n) {

+		List<Term> parameters = new ArrayList<Term>();

+		n.getTwoParametersAST().accept(this, parameters);

+		CreateInstanceOf rule = CreationFactory.eINSTANCE.createCreateInstanceOf();

+		commonCreateTasks(rule, parameters.get(1), parameters.get(0));

+		rule.setName("CreateInstanceOfRule");

+		return rule;

+	}

+

+	/**

+	 * Visiting a {@link DeleteRuleAST0} (model element) and

+	 * creating an {@link ElementDeleteRule} model element

+	 * @param n : Current AST node of type {@link DeleteRuleAST0}

+	 * @param o : expected to be an {@link ASMRuleInvocation} or {@link Rule}

+	 * @return The created {@link ElementDeleteRule}

+	 */

+	@Override

+	public Object visit(DeleteRuleAST0 n, Object o) {

+		// Reset buffer for unresolved variables

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		// Creating a new delete node

+		ElementDeleteRule rule = (ElementDeleteRule) n.getDeleteContentsAST().accept(this);

+		assignCaller(rule, o);

+		// Resolve variable references in the condition

+		modelResolver.resolveVariableRefsInRule(rule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		createNodeInfoFor(n, rule);

+		rule.setName("ElementDeleteRule");

+		return rule;

+	}

+

+	/**

+	 * Visiting a {@link DeleteRuleAST1} (relationship) and

+	 * creating a {@link RelationshipDeleteRule}

+	 * @param n : Current AST node of type {@link DeleteRuleAST1}

+	 * @param o : expected to be an {@link ASMRuleInvocation} or {@link Rule}

+	 * @return The created {@link RelationshipDeleteRule}

+	 */

+	@Override

+	public Object visit(DeleteRuleAST1 n, Object o) {

+		// Reset buffer for unresolved variables

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		RelationshipDeleteRule rule = (RelationshipDeleteRule) n.getDeleteRelationshipAST().accept(this);

+		assignCaller(rule, o);

+		// Resolve variable references in the condition

+		modelResolver.resolveVariableRefsInRule(rule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		createNodeInfoFor(n, rule);

+		rule.setName("RelationshipDeleteRule");

+		return rule;

+	}

+

+

+	@Override

+	public Object visit(DeleteContentsAST n) {

+		ElementDeleteRule rule = DeletionFactory.eINSTANCE.createElementDeleteRule();

+		Term element = (Term) n.getArithmeticTermAST().accept(this);

+		rule.setElement(element);

+		// Type checking

+		typeChecker.getTermsToCheck().add(element);

+		if (n.getDeleteSemanticsOptAST() != null) {

+			DeleteSemantics semantics = (DeleteSemantics) n.getDeleteSemanticsOptAST().accept(this);

+			rule.setSemantics(semantics);

+		}

+		else {

+			// Default semantics: Delete contents, i.e. DROP_CONTENT_LITERAL

+			rule.setSemantics(DeleteSemantics.DROP_CONTENT_LITERAL);

+		}

+		return rule;

+	}

+

+

+	/**

+	 * Visiting a DeleteSemanticsAST0 node (delete_content) and

+	 * returning DeleteSemantics.DROP_CONTENT_LITERAL

+	 * @param n : Current AST node of type DeleteSemanticsAST0

+	 * @return rule : DeleteSemantics

+	 */

+	@Override

+	public Object visit(DeleteSemanticsAST0 n) {

+		return DeleteSemantics.DROP_CONTENT_LITERAL;

+	}

+

+	/**

+	 * Visiting a DeleteSemanticsAST1 node (move_content) and

+	 * returning DeleteSemantics.MOVE_CONTENT_LITERAL

+	 * @param n : Current AST node of type DeleteSemanticsAST1

+	 * @return rule : DeleteSemantics

+	 */

+	@Override

+	public Object visit(DeleteSemanticsAST1 n) {

+		return DeleteSemantics.MOVE_CONTENT_LITERAL;

+	}

+

+	@Override

+	public Object visit(DeleteSemanticsOptAST n) {

+		return n.getDeleteSemanticsAST().accept(this);

+	}

+

+	/**

+	 * Commonly used code by different types of {@link RelationshipDeleteRule}s

+	 * @param rule : {@link RelationshipDeleteRule}

+	 * @param first : {@link Term}

+	 * @param second : {@link Term}

+	 */

+	protected void commonDeleteTasks(RelationshipDeleteRule rule, Term first, Term second) {

+		rule.setSuper(first);

+		rule.setSub(second);

+	}

+

+	/**

+	 * Visiting a {@link DeleteRelationshipAST0} (supertypeOf) and

+	 * creating a {@link DeleteSupertypeOf} rule with

+	 * first parameter as super and second parameter as sub

+	 * @param n : Current AST node of type {@link DeleteRelationshipAST0}

+	 * @return The created {@link DeleteSupertypeOf} rule

+	 */

+	@Override

+	public Object visit(DeleteRelationshipAST0 n) {

+		List<Term> parameters = new ArrayList<Term>();

+		n.getTwoParametersAST().accept(this, parameters);

+		DeleteSupertypeOf rule = DeletionFactory.eINSTANCE.createDeleteSupertypeOf();

+		commonDeleteTasks(rule, parameters.get(0), parameters.get(1));

+		rule.setName("DeleteSupertypeOfRule");

+		return rule;

+	}

+

+	/**

+	 * Visiting a {@link DeleteRelationshipAST1} (subtypeOf) and

+	 * creating a {@link DeleteSupertypeOf} rule with

+	 * first parameter as sub and second parameter as super

+	 * @param n : Current AST node of type {@link DeleteRelationshipAST1}

+	 * @return The created {@link DeleteSupertypeOf} rule

+	 */

+	@Override

+	public Object visit(DeleteRelationshipAST1 n) {

+		List<Term> parameters = new ArrayList<Term>();

+		n.getTwoParametersAST().accept(this, parameters);

+		DeleteSupertypeOf rule = DeletionFactory.eINSTANCE.createDeleteSupertypeOf();

+		commonDeleteTasks(rule, parameters.get(1), parameters.get(0));

+		rule.setName("DeleteSubtypeRule");

+		return rule;

+	}

+

+	/**

+	 * Visiting a {@link DeleteRelationshipAST2} (typeOf) and

+	 * creating a {@link DeleteInstanceOf} rule with

+	 * first parameter as sub and second parameter as super

+	 * @param n : Current AST node of type {@link DeleteRelationshipAST2}

+	 * @return The created {@link DeleteInstanceOf} rule

+	 */

+	@Override

+	public Object visit(DeleteRelationshipAST2 n) {

+		List<Term> parameters = new ArrayList<Term>();

+		n.getTwoParametersAST().accept(this, parameters);

+		DeleteInstanceOf rule = DeletionFactory.eINSTANCE.createDeleteInstanceOf();

+		commonDeleteTasks(rule, parameters.get(0), parameters.get(1));

+		rule.setName("DeleteTypeOfRule");

+		return rule;

+	}

+

+	/**

+	 * Visiting a {@link DeleteRelationshipAST3} (instanceOf) and

+	 * creating a {@link DeleteInstanceOf} rule with

+	 * first parameter as super and second parameter as sub

+	 * @param n : Current AST node of type {@link DeleteRelationshipAST3}

+	 * @return The created {@link DeleteInstanceOf} rule

+	 */

+	@Override

+	public Object visit(DeleteRelationshipAST3 n) {

+		List<Term> parameters = new ArrayList<Term>();

+		n.getTwoParametersAST().accept(this, parameters);

+		DeleteInstanceOf rule = DeletionFactory.eINSTANCE.createDeleteInstanceOf();

+		commonDeleteTasks(rule, parameters.get(1), parameters.get(0));

+		rule.setName("DeleteInstanceOfRule");

+		return rule;

+	}

+

+

+	/**

+	 * Visiting a {@link CopyRuleAST} and

+	 * creating a {@link ModelCopyRule} model element

+	 * @param n : Current AST node of type {@link CopyRuleAST}

+	 * @param o : expected to be an {@link ASMRuleInvocation} or {@link Rule}

+	 * @return The created {@link ModelCopyRule}

+	 */

+	@Override

+	public Object visit(CopyRuleAST n, Object o) {

+		// Create copy rule

+		ModelCopyRule rule = CopymoveFactory.eINSTANCE.createModelCopyRule();

+		assignCaller(rule, o);

+		// Reset buffer for unresolved variables

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		// Process the contents of the rule

+		n.getCopyContentsAST().accept(this, rule);

+		// Resolve variable references in the condition

+		modelResolver.resolveVariableRefsInRule(rule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		createNodeInfoFor(n, rule);

+		rule.setName("CopyRule");

+		return rule;

+	}

+

+	/**

+	 * Visiting a CopyContentsAST and

+	 * setting the contents of the CopyRule model element

+	 * @param n : Current AST node of type MoveRuleAST

+	 * @param o : expected to be a CopyRule

+	 * @return rule : CopyRule

+	 */

+	@Override

+	public Object visit(CopyContentsAST n, Object o) {

+		ModelCopyRule rule = (ModelCopyRule) o;

+		Term srcRoot = (Term) n.getArithmeticTermAST().accept(this);

+		Term trgCont = (Term) n.getArithmeticTermAST3().accept(this);

+		VariableReference trgVar = (VariableReference) n.getVariableRefAST().accept(this);

+		CopySemantics semantics = (CopySemantics) n.getCopySemanticsAST().accept(this);

+		rule.setSrcRoot(srcRoot);

+		rule.setTrgContainer(trgCont);

+		rule.setTargetVariable(trgVar);

+		rule.setSemantics(semantics);

+		// Type checking

+		typeChecker.getTermsToCheck().add(srcRoot);

+		typeChecker.getTermsToCheck().add(trgCont);

+		rule.setName("CopyRule");

+		return rule;

+	}

+

+

+	/**

+	 * Visiting a CopySemanticsAST0 and

+	 * returning CopySemantics.COPY_OUTER_EDGES_LITERAL

+	 * @param n : Current AST node of type CopySemanticsAST0

+	 * @return : CopySemantics

+	 */

+	@Override

+	public Object visit(CopySemanticsAST0 n) {

+		return CopySemantics.COPY_OUTER_EDGES_LITERAL;

+	}

+

+	/**

+	 * Visiting a CopySemanticsAST1 and

+	 * returning CopySemantics.DROP_OUTER_EDGES_LITERAL

+	 * @param n : Current AST node of type CopySemanticsAST1

+	 * @return : CopySemantics

+	 */

+	@Override

+	public Object visit(CopySemanticsAST1 n) {

+		return CopySemantics.DROP_OUTER_EDGES_LITERAL;

+	}

+

+	/**

+	 * Visiting a {@link MoveRuleAST} and

+	 * creating a {@link MoveRule} model element

+	 * @param n : Current AST node of type {@link MoveRuleAST}

+	 * @param o : expected to be an {@link ASMRuleInvocation}

+	 * @return The created {@link MoveRule}

+	 */

+	@Override

+	public Object visit(MoveRuleAST n, Object o) {

+		// Creating a MoveRule

+		MoveRule rule = CopymoveFactory.eINSTANCE.createMoveRule();

+		assignCaller(rule, o);

+		// Reset buffer for unresolved variables

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		// Processing parameters

+		List<Term> parameters = new ArrayList<Term>();

+		n.getTwoParametersAST().accept(this, parameters);

+		rule.setSrcRoot(parameters.get(0));

+		rule.setTrgContainer(parameters.get(1));

+		// Resolve variable references in the condition

+		modelResolver.resolveVariableRefsInRule(rule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		createNodeInfoFor(n, rule);

+		rule.setName("MoveRule");

+		return rule;

+	}

+

+

+	/**

+	 * Visiting an ElementUpdateRuleAST and

+	 * creating a SetRule model element

+	 * @param n : Current AST node of type ElementUpdateOpAST0

+	 * @param o : expected to be an ASMRuleInvocation

+	 * @return rule : SetRule

+	 */

+	@Override

+	public Object visit(ElementUpdateRuleAST n, Object o) {

+		// Reset buffer for unresolved variables

+		modelResolver.getUnresolvedVariableRefsStack().push(new ArrayList<VariableReference>());

+		SetRule setRule = (SetRule) n.getElementUpdateOpAST().accept(this);

+		assignCaller(setRule, o);

+		// Processing parameters

+		List<Term> parameters = new ArrayList<Term>();

+		n.getTwoParametersAST().accept(this, parameters);

+		setRule.setElement(parameters.get(0));

+		setRule.setValue(parameters.get(1));

+		// Resolve variable references in the condition

+		modelResolver.resolveVariableRefsInRule(setRule);

+		modelResolver.getUnresolvedVariableRefsStack().pop();

+		createNodeInfoFor(n, setRule);

+		return setRule;

+	}

+

+	/**

+	 * Visiting an ElementUpdateOpAST and

+	 * creating a RenameRule model element

+	 * @param n : Current AST node of type ElementUpdateOpAST0

+	 * @return rule : RenameRule

+	 */

+	@Override

+	public Object visit(ElementUpdateOpAST n) {

+		String updStr = n.toString();

+		SetRule updRule = null;

+		if (updStr.equals("rename")) {

+			updRule = UpdateFactory.eINSTANCE.createRenameRule();

+		}

+		else if (updStr.equals("setValue")) {

+			updRule =UpdateFactory.eINSTANCE.createSetValueRule();

+		}

+		else if (updStr.equals("setFrom")) {

+			updRule = UpdateFactory.eINSTANCE.createSetRelationFrom();

+		}

+		else if (updStr.equals("setTo")) {

+			updRule = UpdateFactory.eINSTANCE.createSetRelationTo();

+		}

+		else if (updStr.equals("setMultiplicity")) {

+			updRule = UpdateFactory.eINSTANCE.createSetMultiplicityRule();

+		}

+		else if (updStr.equals("setAggregation")) {

+			updRule = UpdateFactory.eINSTANCE.createSetAggregationRule();

+		}

+		else if (updStr.equals("setInverse")) {

+			updRule = UpdateFactory.eINSTANCE.createSetInverseRule();

+		}

+		if (updRule != null) {

+			updRule.setName(updStr);

+		}

+		return updRule;

+	}

+

+

+	/**

+	 * Visiting a TwoParametersAST node, and

+	 * setting the parameters of the list passed as parameter

+	 * @param n : Current AST node of type TwoParametersAST

+	 * @param o : expected to be a List of Term

+	 */

+	@Override

+	public Object visit(TwoParametersAST n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<Term> parameters = (List<Term>) o;

+		Term firstParam = (Term) n.getArithmeticTermAST().accept(this);

+		Term secondParam = (Term) n.getArithmeticTermAST4().accept(this);

+		parameters.add(firstParam);

+		parameters.add(secondParam);

+		// Type checking

+		typeChecker.getTermsToCheck().add(firstParam);

+		typeChecker.getTermsToCheck().add(secondParam);

+		return parameters;

+	}

+

+

+//	**************** Sec. 5.6.2 Names and Types ****************************  //

+

+	/**

+	 * Visiting a {@link VariableDefRefAST} node and returning its name as a String

+	 * @param n : Current AST node of type {@link VariableDefRefAST}

+	 */

+	@Override

+	public Object visit(VariableDefRefAST n) {

+		VariableReference varRef = createVariableReference(n);

+		varRef.setName(n.toString());

+		modelResolver.addVariableReferenceToStack(varRef);

+		return varRef;

+	}

+

+//	/**

+//	 * Visiting a {@link VariableDefRefAST1} node and returning its name as a String

+//	 * @param n : Current AST node of type {@link VariableDefRefAST1}

+//	 */

+//	@SuppressWarnings("unchecked")

+//	@Override

+//	public Object visit(VariableDefRefAST1 n) {

+//		// No resolution is needed when variable starts with '_'

+//		// There is no corresponding variable definition for this var reference

+//		return createVariableReference(n);

+//	}

+

+	/**

+	 * Visiting a VariableDefRefAST node and returning its name as a String

+	 * @param n : Current AST node of type VariableRefAST

+	 * @param o : List of Actual Parameters

+	 */

+	@Override

+	public Object visit(VariableDefRefAST n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+

+	/**

+	 * Visiting a VariableRefAST node and returning its name as a String

+	 * @param n : Current AST node of type VariableRefAST

+	 */

+	@Override

+	public Object visit(VariableRefAST n) {

+		VariableReference varRef = createVariableReference(n);

+		varRef.setName(n.toString());

+		modelResolver.addVariableReferenceToStack(varRef);

+		return varRef;

+	}

+

+	protected VariableReference createVariableReference(ASTNode n) {

+		VariableReference varRef = TermsFactory.eINSTANCE.createVariableReference();

+		varRef.setName(n.toString());

+		createNodeInfoFor(n, varRef);

+		return varRef;

+	}

+

+	/**

+	 * Visiting a VariableRefAST node and returning its name as a String

+	 * @param n : Current AST node of type VariableRefAST

+	 * @param o : List of Actual Parameters

+	 */

+	@Override

+	public Object visit(VariableRefAST n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting a VariableDefAST node and returning its name as a String

+	 * @param n : Current AST node of type VariableDefAST

+	 */

+	@Override

+	public Object visit(VariableDefAST n) {

+		Variable var = DefinitionsFactory.eINSTANCE.createVariable();

+		var.setName(n.toString());

+		createNodeInfoFor(n, var);

+		return var;

+	}

+

+

+	/**

+	 * Visiting a QualifiedTypeNameAST node and returning its FQN as a String

+	 * @param n : Current AST node of type {@link QualifiedTypeNameAST}

+	 */

+	@Override

+	public Object visit(QualifiedTypeNameAST n) {

+		String leftStr = (String) n.getQualifiedTypeNameAST().accept(this);

+		String rightStr = (String) n.getTypeNameAST().accept(this);

+		return new String(leftStr + '.' + rightStr);

+	}

+	@Override

+	public Object visit(QualifiedTypeNameAST n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+//	/**

+//	* Visiting an {@link ASMFunctionNameAST0} node and returning its FQN as a String

+//	* @param n : Current AST node of type {@link ASMFunctionNameAST0}

+//	*/

+//	@Override

+//	public Object visit(ASMFunctionNameAST0 n) {

+//	// Return the unquoted string by removing the ' ' pair

+//	return unquote(n.toString());

+//	}

+//	@Override

+//	public Object visit(ASMFunctionNameAST0 n, Object o) {

+//	return defaultListVisit(n, (List<?>) o);

+//	}

+

+//	/**

+//	* Visiting {@link ASMFunctionNameAST1} node (an Identifier) and

+//	* return it as a String

+//	* @param n : Current AST node of type {@link ASMFunctionNameAST1}

+//	*/

+//	@Override

+//	public Object visit(ASMFunctionNameAST1 n) {

+//	return defaultVisit(n);

+//	}

+//	@Override

+//	public Object visit(ASMFunctionNameAST1 n, Object o) {

+//	return defaultListVisit(n, (List<?>) o);

+//	}

+

+//	/**

+//	* Visiting an {@link ASMFunctionNameAST2}  node and returning its FQN as a String

+//	* @param n : Current AST node of type {@link ASMFunctionNameAST2}

+//	*/

+//	@Override

+//	public Object visit(ASMFunctionNameAST2 n) {

+//	String leftStr = (String) n.getQualifiedTypeNameAST().accept(this);

+//	String rightStr = (String) n.getTypeNameAST().accept(this);

+//	return new String(leftStr + '.' + rightStr);

+//	}

+//	@Override

+//	public Object visit(ASMFunctionNameAST2 n, Object o) {

+//	return defaultListVisit(n, (List<?>) o);

+//	}

+

+

+	/**

+	 * Visiting a ValueQualifiedNameAST node (ModelElementRef)

+	 * and returning an Constant (of kind ModelElement)

+	 * @param n : Current AST node of type ValueQualifiedNameAST

+	 */

+	@Override

+	public Object visit(ValueQualifiedNameAST n) {

+		// Collect the FQN

+		String leftStr = (String) n.getQualifiedTypeNameAST().accept(this);

+		String rightStr = (String) n.getTypeNameAST().accept(this);

+		return createModelElementConstant(n, leftStr + "." + rightStr);

+//		// Create a new Constant

+//		Constant modelElemConst = TermsFactory.eINSTANCE.createConstant();

+//		modelElemConst.setKind(ValueKind.MODELELEMENT_LITERAL);

+//		modelElemConst.setValue(leftStr + "." + rightStr);

+//		// Creating node information

+//		createNodeInfoFor(n, modelElemConst);

+//		// Lookup constant value if parent of AST node is not ValueQualifiedNameAST

+//		// and it is not an AsmFunctionLocation

+//		if (! (n.getParent() instanceof IValueQualifiedNameAST) &&

+//				! (n.getParent() instanceof IAsmFunctionLocationAST) &&

+//				! (n.getParent() instanceof IAsmFunctionUpdateLocationAST)) {

+//			// Initiate lookup

+//			modelResolver.resolveModelElementConstant(modelElemConst);

+//		}

+//		return modelElemConst;

+	}

+	@Override

+	public Object visit(ValueQualifiedNameAST n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting {@link ValueLocalNameAST0} node (a NameLiteral) and

+	 * return it as an unquoted ElementReference

+	 * @param n : Current AST node of type {@link ValueLocalNameAST0}

+	 */

+	@Override

+	public Object visit(ValueLocalNameAST0 n) {

+		String localStr = unquote( n.toString());

+		return createModelElementConstant(n, localStr);

+	}

+	@Override

+	public Object visit(ValueLocalNameAST0 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting {@link ValueLocalNameAST1} node (an Identifier) and

+	 * return it as a ElementReference

+	 * @param n : Current AST node of type {@link ValueLocalNameAST1}

+	 */

+	@Override

+	public Object visit(ValueLocalNameAST1 n) {

+		String localStr = unquote( n.toString());

+		return createModelElementConstant(n, localStr);

+	}

+	@Override

+	public Object visit(ValueLocalNameAST1 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Creates a model element constant from ASTNode n and

+	 * tries to resolve its name in the model space upon certain conditions

+	 * @param n : AST node

+	 * @return : Constant of kind Model Element

+	 */

+	protected Constant createModelElementConstant(ASTNode n, String nameStr) {

+		// Create a new Constant

+		Constant modelElemConst = TermsFactory.eINSTANCE.createConstant();

+		modelElemConst.setKind(ValueKind.MODELELEMENT_LITERAL);

+		modelElemConst.setValue( nameStr);

+		modelElemConst.setName(nameStr);

+		// Creating node information

+		createNodeInfoFor(n, modelElemConst);

+		// Lookup constant value if parent of AST node is not ValueQualifiedNameAST

+

+		if (! (n.getParent() instanceof IValueQualifiedNameAST) &&

+				! (n.getParent() instanceof IAsmFunctionLocationAST) &&

+				! (n.getParent() instanceof IAsmFunctionUpdateLocationAST)) {

+			// Initiate lookup and set types

+			String fqnStr = modelResolver.resolveModelElementConstant(modelElemConst);

+			if (fqnStr != null) {

+				modelElemConst.setFqn(fqnStr);

+			}

+		}

+		return modelElemConst;

+	}

+

+

+

+	/**

+	 * Visiting TypeNameAST0 node (a NameLiteral) and

+	 * return it as an unquoted String

+	 * @param n : Current AST node of type TypeNameAST0

+	 */

+	@Override

+	public Object visit(TypeNameAST0 n) {

+		// Return the unquoted string by removing the ' ' pair

+		return unquote(n.toString());

+	}

+	@Override

+	public Object visit(TypeNameAST0 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting TypeNameAST1 node (an Identifier) and

+	 * return it as a String

+	 * @param n : Current AST node of type TypeNameAST1

+	 */

+	@Override

+	public Object visit(TypeNameAST1 n) {

+		return defaultVisit(n);

+	}

+	@Override

+	public Object visit(TypeNameAST1 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting TypeNameAST2 node (an UpperCaseLiteral) and

+	 * return it as a String

+	 * @param n : Current AST node of type TypeNameAST2

+	 */

+	@Override

+	public Object visit(TypeNameAST2 n) {

+		return defaultVisit(n);

+	}

+	@Override

+	public Object visit(TypeNameAST2 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	@Override

+	public String visit(TypeNameAST3 n) {

+		return unquote((String)defaultVisit(n));

+	}

+

+	/**

+	 * Visiting {@link KeywordAsIdentifier} node as part of an FQN

+	 * return it as a String

+	 * @param n : Current AST node of type {@link KeywordAsIdentifier}

+	 * @param o : List

+	 * @return String for the keyword

+	 */

+	@Override

+	public Object visit(KeywordAsIdentifier n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting {@link KeywordAsIdentifier} node  as part of an FQN

+	 * return it as a String

+	 * @param n : Current AST node of type {@link KeywordAsIdentifier}

+	 * @return String for the keyword

+	 */

+	@Override

+	public Object visit(KeywordAsIdentifier n) {

+		return defaultVisit(n);

+	}

+

+	/**

+	 * The ASTNode node n is visited and added to the list

+	 * @param n : ASTNode

+	 * @param list : List

+	 * @return list: List (with the result from visiting n)

+	 */

+	@SuppressWarnings({ "unchecked", "rawtypes" })

+	protected List defaultListVisit(ASTNode n, List list) {

+		Object element = n.accept(this);

+		list.add(element);

+		return list;

+	}

+

+

+	/**

+	 * ASTNode n is returned as a string

+	 */

+	protected Object defaultVisit(ASTNode n) {

+//		return new String(n.toString());

+		return n.toString();

+	}

+

+//	**************** Sec. 5.6.3 Parameters ****************************  //

+

+	/**

+	 * Visiting {@link ActualParameterDefAST0} node and

+	 * return its ActualParams

+	 * @param n : Current AST node of type {@link ActualParameterDefAST0}

+	 * @param o : List of Parameters

+	 */

+	@Override

+	public Object visit(ActualParameterDefAST0 n, Object o) {

+		return n.getActualParamsAST().accept(this, o);

+	}

+

+	/**

+	 * Visiting {@link ActualParameterDefAST1} node and

+	 * return its ActualParams

+	 * @param n : Current AST node of type {@link ActualParameterDefAST1}

+	 * @param o : List of Parameters

+	 */

+	@Override

+	public Object visit(ActualParameterDefAST1 n, Object o) {

+		return o;

+	}

+

+//	/**

+//	* Visiting a {@link ActualParameterDefAST2} node (ERROR_TOKEN)

+//	*

+//	* @param n : {@link ActualParameterDefAST2}

+//	* @param o : List of Parameters

+//	*/

+//	@Override

+//	public Object visit(ActualParameterDefAST2 n, Object o) {

+//	if (getDiagnoseParser() == null) {

+//	ParseTable prsTable = new VTCLParserprs();

+//	DiagnoseParser diagnoseParser = new DiagnoseParser(n.getEnvironment(), prsTable );

+//	setDiagnoseParser(diagnoseParser);

+////	diagnoseParser.diagnose(n.getEnvironment().badToken());

+//	diagnoseParser.diagnose();

+//	}

+//	Constant undef = TermsFactory.eINSTANCE.createConstant();

+//	undef.setKind(ValueKind.UNDEF_LITERAL);

+//	undef.setValue("undef");

+//	return o;

+//	}

+

+	/**

+	 * Visiting ActualParamsAST node and return its ActualParams

+	 * @param n : Current AST node of type ActualParamsAST

+	 * @param o : List of Parameters

+	 */

+	@Override

+	public Object visit(ActualParamsAST n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<Term> paramList = (List<Term>) o;

+		n.getActualParamsAST().accept(this, paramList);

+		Term lastParameter = (Term) n.getArithmeticTermAST().accept(this);

+		paramList.add(lastParameter);

+		//typeChecker.getTermsToCheck().addAll(paramList);

+		return paramList;

+	}

+

+

+	/**

+	 * Visiting {@link ActualPatternParameterDefAST0} node and

+	 * return its ActualParams

+	 * @param n : Current AST node of type {@link ActualPatternParameterDefAST0}

+	 * @param paramList : List of Parameters

+	 */

+	@Override

+	public Object visit(ActualPatternParameterDefAST0 n, Object paramList) {

+		return n.getActualParamsPatternVariablesAST().accept(this, paramList);

+	}

+

+	/**

+	 * Visiting {@link ActualPatternParameterDefAST1} node and

+	 * return its ActualParams

+	 * @param n : Current AST node of type {@link ActualPatternParameterDefAST1}

+	 * @param paramList : List of Parameters

+	 */

+	@Override

+	public Object visit(ActualPatternParameterDefAST1 n, Object paramList) {

+		return paramList;

+	}

+

+

+//	/**

+//	* Visiting {@link ActualPatternParameterDefAST2} node (ERROR_TOKEN)

+//	* @param n : Current AST node of type {@link ActualPatternParameterDefAST2}

+//	* @param paramList : List of Parameters

+//	*/

+//	@Override

+//	public Object visit(ActualPatternParameterDefAST2 n, Object o) {

+//	if (getDiagnoseParser() == null) {

+//	ParseTable prsTable = new VTCLParserprs();

+//	DiagnoseParser diagnoseParser = new DiagnoseParser(n.getEnvironment(), prsTable );

+//	setDiagnoseParser(diagnoseParser);

+////	diagnoseParser.diagnose(n.getEnvironment().badToken());

+//	diagnoseParser.diagnose();

+//	}

+//	return o;

+//	}

+

+	/**

+	 * Visiting {@link DirectedFormalParameterDefAST0} node and

+	 * return its FormalParams as a list

+	 * @param n : Current AST node of type {@link DirectedFormalParameterDefAST0}

+	 * @param paramList : List of Parameters

+	 */

+	@Override

+	public Object visit(DirectedFormalParameterDefAST0 n, Object paramList) {

+		return n.getDirectedFormalParamsAST().accept(this, paramList);

+	}

+	/**

+	 * Visiting {@link DirectedFormalParameterDefAST1} node and

+	 * return its FormalParams as a list

+	 * @param n : Current AST node of type {@link DirectedFormalParameterDefAST1}

+	 * @param paramList : List of Parameters

+	 */

+	@Override

+	public Object visit(DirectedFormalParameterDefAST1 n, Object paramList) {

+		return paramList;

+	}

+

+

+//	/**

+//	* Visiting DirectedFormalParameterDefAST1 node (ERROR_TOKEN)

+//	* @param n : Current AST node of type DirectedFormalParameterDefAST1

+//	* @param paramList : List of Parameters

+//	*/

+//	@Override

+//	public Object visit(DirectedFormalParameterDefAST2 n, Object paramList) {

+//	if (getDiagnoseParser() == null) {

+//	ParseTable prsTable = new VTCLParserprs();

+//	DiagnoseParser diagnoseParser = new DiagnoseParser(n.getEnvironment(), prsTable );

+//	setDiagnoseParser(diagnoseParser);

+////	diagnoseParser.diagnose(n.getEnvironment().badToken());

+//	diagnoseParser.diagnose();

+//	}

+//	return paramList;

+//	}

+

+	/**

+	 * Visiting {@link DirectedFormalParamsAST0} node

+	 * @param n : Current AST node of type {@link DirectedFormalParamsAST1}

+	 * @param o : List of parameters (SymbolicRuleParameter)

+	 */

+	@Override

+	public Object visit(DirectedFormalParamsAST0 n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<SymbolicRuleParameter> paramList = (List<SymbolicRuleParameter>) o;

+		// Obtain direction and variable

+		DirectionKind direction = (DirectionKind) n.getDirectionKindAST().accept(this);

+		Variable var = (Variable) n.getVariableDefAST().accept(this);

+		// Retrieve type information

+		if (n.getTypeOptAST() != null) {

+			n.getTypeOptAST().accept(this, var);

+		}

+		// Create a new SymbolicRuleParameter

+		addDirectedFormalParam(n, direction, var, paramList);

+		return paramList;

+	}

+

+	/**

+	 * Visiting {@link DirectedFormalParamsAST1} node

+	 * @param n : Current AST node of type {@link DirectedFormalParamsAST1}

+	 * @param o : List of parameters (SymbolicRuleParameter)

+	 */

+	@Override

+	public Object visit(DirectedFormalParamsAST1 n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<SymbolicRuleParameter> paramList = (List<SymbolicRuleParameter>) o;

+		n.getDirectedFormalParamsAST().accept(this, paramList);

+		// Obtain direction and variable

+		DirectionKind direction = (DirectionKind) n.getDirectionKindAST().accept(this);

+		Variable var = (Variable) n.getVariableDefAST().accept(this);

+		// Retrieve type information

+		if (n.getTypeOptAST() != null) {

+			n.getTypeOptAST().accept(this, var);

+		}

+		// Create a new SymbolicRuleParameter

+		addDirectedFormalParam(n, direction, var, paramList);

+		return paramList;

+	}

+

+	/**

+	 * Visiting {@link DirectedFormalParamsAST1} node

+	 * @param n : Current AST node of type {@link DirectedFormalParamsAST1}

+	 * @param direction : {@link DirectionKind}

+	 * @param var : {@link Variable}

+	 * @param paramList : List of parameters (SymbolicRuleParameter)

+	 */

+	protected void addDirectedFormalParam(ASTNode n, DirectionKind direction, Variable var, List<SymbolicRuleParameter> paramList ) {

+		// Create a new SymbolicRuleParameter

+		SymbolicRuleParameter ruleParam = DefinitionsFactory.eINSTANCE.createSymbolicRuleParameter();

+		ruleParam.setDirection(direction);

+		ruleParam.setVariable(var);

+		ruleParam.setName(var.getName());

+		// Add the new SymbolicRuleParameter to the parameter list

+		paramList.add(ruleParam);

+		// Creating node information

+		createNodeInfoFor(n, ruleParam);

+	}

+

+	/**

+	 * Visiting {@link FormalParameterDefAST0} node (of a GTPattern) and

+	 * returning a list of PatternVariables

+	 * @param n : Current AST node of type {@link FormalParameterDefAST0}

+	 * @param paramList : List of parameters (PatternVariable)

+	 */

+	@Override

+	public Object visit(FormalParameterDefAST0 n, Object paramList) {

+		return n.getFormalParamsAST().accept(this, paramList);

+	}

+

+	/**

+	 * Visiting {@link FormalParameterDefAST1} node (of a GTPattern) and

+	 * returning a list of PatternVariables

+	 * @param n : Current AST node of type {@link FormalParameterDefAST1}

+	 * @param paramList : List of parameters (PatternVariable)

+	 */

+	@Override

+	public Object visit(FormalParameterDefAST1 n, Object paramList) {

+		return paramList;

+	}

+

+//	/**

+//	* Visiting {@link FormalParameterDefAST2} node (ERROR_TOKEN)

+//	* @param n : Current AST node of type {@link FormalParameterDefAST2}

+//	* @param paramList : List of parameters (PatternVariable)

+//	*/

+//	@Override

+//	public Object visit(FormalParameterDefAST2 n, Object paramList) {

+//	if (getDiagnoseParser() == null) {

+//	ParseTable prsTable = new VTCLParserprs();

+//	DiagnoseParser diagnoseParser = new DiagnoseParser(n.getEnvironment(), prsTable );

+//	setDiagnoseParser(diagnoseParser);

+////	diagnoseParser.diagnose(n.getEnvironment().badToken());

+//	diagnoseParser.diagnose();

+//	}

+//	return paramList;

+//	}

+

+	/**

+	 * Visiting {@link FormalParamsAST0} node  (of a GTPattern)

+	 * @param n : Current AST node of type {@link FormalParamsAST0}

+	 * @param o : List of parameters (PatternVariable)

+	 */

+	@Override

+	public Object visit(FormalParamsAST0 n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<PatternVariable> paramList = (List<PatternVariable>) o;

+		PatternVariable lastVar = (PatternVariable) n.getPatternVariableDefAST().accept(this);

+		// Obtaining type information

+		if (n.getTypeOptAST() != null) {

+			n.getTypeOptAST().accept(this, lastVar);

+		}

+		paramList.add(lastVar);

+		return paramList;

+	}

+

+	/**

+	 * Visiting {@link FormalParamsAST1} node  (of a GTPattern)

+	 * @param n : Current AST node of type {@link FormalParamsAST1}

+	 * @param o : List of parameters (PatternVariable)

+	 */

+	@Override

+	public Object visit(FormalParamsAST1 n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<PatternVariable> paramList = (List<PatternVariable>) o;

+		n.getFormalParamsAST().accept(this, paramList);

+		PatternVariable lastVar = (PatternVariable) n.getPatternVariableDefAST().accept(this);

+		// Obtaining type information

+		if (n.getTypeOptAST() != null) {

+			n.getTypeOptAST().accept(this, lastVar);

+		}

+		paramList.add(lastVar);

+		return paramList;

+	}

+

+	/**

+	 * Visiting {@link ConstrainedVariablesAST0} node (appears in ChooseRule and ForallRule)

+	 * @param n : Current AST node of type {@link ConstrainedVariablesAST0}

+	 * @param o : {@link CollectionIteratorRule}

+	 * @return rule: {@link CollectionIteratorRule}

+	 */

+	@Override

+	public Object visit(ConstrainedVariablesAST0 n, Object o) {

+		CollectionIteratorRule rule = (CollectionIteratorRule) o;

+		Variable var = (Variable) n.getVariableDefAST().accept(this);

+		rule.getLocalVariables().add(var);

+		// Process type information

+		if (n.getTypeOptAST() != null) {

+			n.getTypeOptAST().accept(this, var);

+		}

+		// Process containment constraints

+		if (n.getContainmentConstraintOptAST() != null) {

+			ContainmentConstraint contConst = (ContainmentConstraint) n.getContainmentConstraintOptAST().accept(this);

+			contConst.setVariable(var);

+			rule.getContainmentConstraints().add(contConst);

+		}

+		return rule;

+	}

+

+	/**

+	 * Visiting {@link ConstrainedVariablesAST1} node (appears in ChooseRule and ForallRule)

+	 * @param n : Current AST node of type {@link ConstrainedVariablesAST1}

+	 * @param o : {@link CollectionIteratorRule}

+	 */

+	@Override

+	public Object visit(ConstrainedVariablesAST1 n, Object o) {

+		CollectionIteratorRule rule = (CollectionIteratorRule) o;

+		n.getConstrainedVariablesAST().accept(this, rule);

+		Variable var = (Variable) n.getVariableDefAST().accept(this);

+		rule.getLocalVariables().add(var);

+		// Process type information

+		if (n.getTypeOptAST() != null) {

+			n.getTypeOptAST().accept(this, var);

+		}

+		// Process containment constraints

+		if (n.getContainmentConstraintOptAST() != null) {

+			ContainmentConstraint contConst = (ContainmentConstraint) n.getContainmentConstraintOptAST().accept(this);

+			contConst.setVariable(var);

+			rule.getContainmentConstraints().add(contConst);

+		}

+		return rule;

+	}

+

+	/**

+	 * Visiting ContainmentConstraintOptAST0 node (IN)

+	 * @param n : Current AST node of type ContainmentConstraintOptAST0

+	 */

+	@Override

+	public Object visit(ContainmentConstraintOptAST0 n) {

+		Term scope = (Term) n.getArithmeticTermAST().accept(this);

+		ContainmentConstraint contConstr = GtFactory.eINSTANCE.createContainmentConstraint();

+		contConstr.setParent(scope);

+		contConstr.setMode(ContainmentMode.IN_LITERAL);

+		// Creating node information

+		createNodeInfoFor(n, scope);

+		// Type checking for scope

+		typeChecker.getTermsToCheck().add(scope);

+		return contConstr;

+	}

+

+	/**

+	 * Visiting ContainmentConstraintOptAST0 node (BELOW)

+	 * @param n : Current AST node of type ContainmentConstraintOptAST0

+	 */

+	@Override

+	public Object visit(ContainmentConstraintOptAST1 n) {

+		Term scope = (Term) n.getArithmeticTermAST().accept(this);

+		ContainmentConstraint contConstr = GtFactory.eINSTANCE.createContainmentConstraint();

+		contConstr.setParent(scope);

+		contConstr.setMode(ContainmentMode.BELOW_LITERAL);

+		// Creating node information

+		createNodeInfoFor(n, scope);

+		// Type checking for scope

+		typeChecker.getTermsToCheck().add(scope);

+		return contConstr;

+	}

+

+	/**

+	 * Visiting DirectionKindAST0 node

+	 * @param n : Current AST node of type DirectionKindAST0

+	 */

+	@Override

+	public Object visit(DirectionKindAST0 n) {

+		return DirectionKind.IN_LITERAL;

+	}

+

+	/**

+	 * Visiting DirectionKindAST1 node

+	 * @param n : Current AST node of type DirectionKindAST1

+	 */

+	@Override

+	public Object visit(DirectionKindAST1 n) {

+		return DirectionKind.OUT_LITERAL;

+	}

+

+	/**

+	 * Visiting DirectionKindAST2 node

+	 * @param n : Current AST node of type DirectionKindAST2

+	 */

+	@Override

+	public Object visit(DirectionKindAST2 n) {

+		return DirectionKind.INOUT_LITERAL;

+	}

+

+

+//	****************** Sec. 5.6.4 Constants ****************************

+

+	/**

+	 * Visiting the BooleanConstantAST0 node (false) and

+	 * returning a Constant of kind Boolean

+	 * @param n : Current AST node of type BooleanConstantAST0

+	 */

+	@Override

+	public Object visit(BooleanConstantAST0 n) {

+		Constant constant = TermsFactory.eINSTANCE.createConstant();

+		constant.setKind(ValueKind.BOOLEAN_LITERAL);

+		constant.setType("datatypes.Boolean");

+		constant.setValue(String.valueOf(false));

+		constant.setName(String.valueOf(false));

+		// Creating node information

+		createNodeInfoFor(n, constant);

+		return constant;

+	}

+	@Override

+	public Object visit(BooleanConstantAST0 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting the BooleanConstantAST1 node (true) and

+	 * returning a Constant of kind Boolean

+	 * @param n : Current AST node of type BooleanConstantAST1

+	 */

+	@Override

+	public Object visit(BooleanConstantAST1 n) {

+		Constant constant = TermsFactory.eINSTANCE.createConstant();

+		constant.setKind(ValueKind.BOOLEAN_LITERAL);

+		constant.setType("datatypes.Boolean");

+		constant.setValue(String.valueOf(true));

+		constant.setName(String.valueOf(true));

+		// Creating node information

+		createNodeInfoFor(n, constant);

+		return constant;

+	}

+	@Override

+	public Object visit(BooleanConstantAST1 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting a one_to_one MultiplicityConstantAST0 node and

+	 * returning a Constant of kind Multiplicity

+	 * @param n : Current AST node of type MultiplicityConstantAST0

+	 */

+	@Override

+	public Object visit(MultiplicityConstantAST0 n) {

+		Constant constant = TermsFactory.eINSTANCE.createConstant();

+		constant.setKind(ValueKind.MULTIPLICITY_LITERAL);

+		constant.setType("datatypes.MultiplicityKind");

+		constant.setValue(MultiplicityKind.ONE_TO_ONE_LITERAL.toString());

+		constant.setName(MultiplicityKind.ONE_TO_ONE_LITERAL.toString());

+		// Creating node information

+		createNodeInfoFor(n, constant);

+		return constant;

+	}

+	@Override

+	public Object visit(MultiplicityConstantAST0 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting a one_to_many MultiplicityConstantAST1 node and

+	 * returning a Constant of kind Multiplicity

+	 * @param n : Current AST node of type MultiplicityConstantAST1

+	 */

+	@Override

+	public Object visit(MultiplicityConstantAST1 n) {

+		Constant constant = TermsFactory.eINSTANCE.createConstant();

+		constant.setKind(ValueKind.MULTIPLICITY_LITERAL);

+		constant.setType("datatypes.MultiplicityKind");

+		constant.setValue(MultiplicityKind.ONE_TO_MANY_LITERAL.toString());

+		constant.setName(MultiplicityKind.ONE_TO_MANY_LITERAL.toString());

+		// Creating node information

+		createNodeInfoFor(n, constant);

+		return constant;

+	}

+	@Override

+	public Object visit(MultiplicityConstantAST1 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting a many_to_one MultiplicityConstantAST2 node and

+	 * returning a Constant of kind Multiplicity

+	 * @param n : Current AST node of type MultiplicityConstantAST2

+	 */

+	@Override

+	public Object visit(MultiplicityConstantAST2 n) {

+		Constant constant = TermsFactory.eINSTANCE.createConstant();

+		constant.setKind(ValueKind.MULTIPLICITY_LITERAL);

+		constant.setType("datatypes.MultiplicityKind");

+		constant.setValue(MultiplicityKind.MANY_TO_ONE_LITERAL.toString());

+		constant.setName(MultiplicityKind.MANY_TO_ONE_LITERAL.toString());

+		// Creating node information

+		createNodeInfoFor(n, constant);

+		return constant;

+	}

+	@Override

+	public Object visit(MultiplicityConstantAST2 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting a many_to_many MultiplicityConstantAST3 node and

+	 * returning a Constant of kind Multiplicity

+	 * @param n : Current AST node of type MultiplicityConstantAST3

+	 */

+	@Override

+	public Object visit(MultiplicityConstantAST3 n) {

+		Constant constant = TermsFactory.eINSTANCE.createConstant();

+		constant.setKind(ValueKind.MULTIPLICITY_LITERAL);

+		constant.setType("datatypes.MultiplicityKind");

+		constant.setValue(MultiplicityKind.MANY_TO_MANY_LITERAL.toString());

+		constant.setName(MultiplicityKind.MANY_TO_MANY_LITERAL.toString());

+		// Creating node information

+		createNodeInfoFor(n, constant);

+		return constant;

+	}

+	@Override

+	public Object visit(MultiplicityConstantAST3 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting a NumericConstantAST node (DecimalIntegerLiteral) and

+	 * returning a Constant of kind IntegerLiteral

+	 * @param n : Current AST node of type NumericConstantAST0

+	 */

+	@Override

+	public Object visit(NumericConstantAST0 n) {

+		Constant constant = TermsFactory.eINSTANCE.createConstant();

+		constant.setKind(ValueKind.INTEGER_LITERAL);

+		constant.setType("datatypes.Integer");

+		constant.setValue(n.toString());

+		constant.setName(n.toString());

+		// Creating node information

+		createNodeInfoFor(n, constant);

+		return constant;

+	}

+	@Override

+	public Object visit(NumericConstantAST0 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting a NumericConstantAST node (IntegerLiteral) and

+	 * returning a Constant of kind IntegerLiteral

+	 * @param n : Current AST node of type NumericConstantAST1

+	 */

+	@Override

+	public Object visit(NumericConstantAST1 n) {

+		Constant constant = TermsFactory.eINSTANCE.createConstant();

+		constant.setKind(ValueKind.INTEGER_LITERAL);

+		constant.setType("datatypes.Integer");

+		constant.setValue(n.toString());

+		constant.setName(n.toString());

+		// Creating node information

+		createNodeInfoFor(n, constant);

+		return constant;

+	}

+	@Override

+	public Object visit(NumericConstantAST1 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting a NumericConstantAST node (FloatingPointLiteral) and

+	 * returning a Constant of kind  DoubleLiteral

+	 * @param n : Current AST node of type NumericConstantAST2

+	 */

+	@Override

+	public Object visit(NumericConstantAST2 n) {

+		Constant constant = TermsFactory.eINSTANCE.createConstant();

+		constant.setKind(ValueKind.DOUBLE_LITERAL);

+		constant.setType("datatypes.Double");

+		constant.setValue(n.toString());

+		constant.setName(n.toString());

+		// Creating node information

+		createNodeInfoFor(n, constant);

+		return constant;

+	}

+	@Override

+	public Object visit(NumericConstantAST2 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting a NumericConstantAST node (DoubleLiteral) and

+	 * returning a Constant of kind  DoubleLiteral

+	 * @param n : Current AST node of type NumericConstantAST2

+	 */

+	@Override

+	public Object visit(NumericConstantAST3 n) {

+		Constant constant = TermsFactory.eINSTANCE.createConstant();

+		constant.setKind(ValueKind.DOUBLE_LITERAL);

+		constant.setType("datatypes.Double");

+		constant.setValue(n.toString());

+		constant.setName(n.toString());

+		// Creating node information

+		createNodeInfoFor(n, constant);

+		return constant;

+	}

+	@Override

+	public Object visit(NumericConstantAST3 n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting a StringConstantAST node and returning a Constant of kind String

+	 * @param n : Current AST node of type StringConstantAST

+	 */

+	@Override

+	public Object visit(StringConstantAST n) {

+		Constant constant = TermsFactory.eINSTANCE.createConstant();

+		constant.setKind(ValueKind.STRING_LITERAL);

+		constant.setType("datatypes.String");

+		constant.setName("datatypes.String");

+		// Unquoting and unescaping string literal

+		constant.setValue( StringEscapeUtils.unescapeJava(unquote(n.toString() )));

+		// Creating node information

+		createNodeInfoFor(n, constant);

+		return constant;

+	}

+	@Override

+	public Object visit(StringConstantAST n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+	/**

+	 * Visiting an UndefValueAST node and returning an "undef" Constant

+	 * @param n : Current AST node of type UndefValueAST

+	 */

+	@Override

+	public Object visit(UndefValueAST n) {

+		Constant constant = TermsFactory.eINSTANCE.createConstant();

+		constant.setKind(ValueKind.UNDEF_LITERAL);

+		constant.setType("TOP");

+		constant.setValue("undef");

+		constant.setName("undef");

+		// Creating node information

+		createNodeInfoFor(n, constant);

+		return constant;

+	}

+	@Override

+	public Object visit(UndefValueAST n, Object o) {

+		return defaultListVisit(n, (List<?>) o);

+	}

+

+//	****************** Annotations ****************************

+

+//	/**

+//	 * Visiting an {@link AnnotationAST0} node (with empty parameter set)

+//	 * and creating a {@link RuntimeAnnotation}

+//	 * @param n : current AST node of type {@link AnnotationAST0}

+//	 * @param o : the list of annotations attached to an element

+//	 */

+//	@Override

+//	public Object visit(AnnotationAST0 n, Object o) {

+//		EList<RuntimeAnnotation> annotationList = (EList<RuntimeAnnotation>) o;

+//		RuntimeAnnotation annotation = CoreFactory.eINSTANCE.createRuntimeAnnotation();

+//		String name = (String) n.getValueQualifiedNameAST().accept(this);

+//		annotation.setAnnotationName(name);

+//		// annotation for RuntimeAnnotation

+//		createNodeInfoFor(n, annotation);

+//		annotationList.add(annotation);

+//		return annotationList;

+//	}

+

+	/**

+	 * Visiting an {@link AnnotationAST} node (with parameters)

+	 * and creating a {@link RuntimeAnnotation}

+	 * @param n current AST node of type {@link AnnotationAST}

+	 * @param o the list of {@link RuntimeAnnotation}s attached to an element

+	 */

+	@Override

+	public Object visit(AnnotationAST n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<RuntimeAnnotation> annotationList = (List<RuntimeAnnotation>) o;

+		RuntimeAnnotation annotation = CoreFactory.eINSTANCE.createRuntimeAnnotation();

+		String annotationName = (String) n.getAnnotationNameAST().accept(this);

+		annotation.setAnnotationName(annotationName);

+		n.getAnnotationBodyAST().accept(this, annotation.getElements());

+		annotationList.add(annotation);

+		// annotation for RuntimeAnnotation

+		createNodeInfoFor(n, annotation);

+		return annotationList;

+	}

+

+

+	/**

+	 * Visiting an {@link AnnotationBodyAST} node to process its parameters

+	 * @param n : current AST node of type {@link AnnotationBodyAST}

+	 * @param o : the list of {@link RuntimeAnnotationElement}

+	 */

+	@Override

+	public Object visit(AnnotationBodyAST n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<RuntimeAnnotationElement> annotationList = (List<RuntimeAnnotationElement>) o;

+		// Processing subelements first

+		n.getAnnotationBodyAST().accept(this, annotationList);

+		n.getKeyValuePairAST().accept(this,annotationList);

+		return annotationList;

+	}

+

+

+

+	/**

+	 * Visiting an {@link AnnotationsAST} related to a GTASM element

+	 * @param n : current AST node of type {@link AnnotationsAST}

+	 * @param o : the list of {@link RuntimeAnnotation}s

+	 */

+	@Override

+	public Object visit(AnnotationsAST n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<RuntimeAnnotation> annotationList = (List<RuntimeAnnotation>) o;

+		n.getAnnotationsAST().accept(this, annotationList);

+		n.getAnnotationAST().accept(this,annotationList);

+		return annotationList;

+	}

+

+	/**

+	 * Visiting a {@link KeyValuePairAST} node and create

+	 * a {@link RuntimeAnnotationElement} model element

+	 * @param n : current AST node of type {@link KeyValuePairAST}

+	 * @param o : the list of {@link RuntimeAnnotationElement}

+	 */

+	@Override

+	public Object visit(KeyValuePairAST n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<RuntimeAnnotationElement> annotationList = (List<RuntimeAnnotationElement>) o;

+		RuntimeAnnotationElement annotationElement = CoreFactory.eINSTANCE.createRuntimeAnnotationElement();

+		// Visiting key and value

+		String key = (String) n.getTypeNameAST().accept(this);

+		String value = (String) n.getTypeNameAST3().accept(this);

+		annotationElement.setKey(key);

+		annotationElement.setValue(value);

+		annotationList.add(annotationElement);

+		// Create node information

+		createNodeInfoFor(n, annotationElement);

+		return annotationElement;

+	}

+

+

+	/**

+	 * This method should be called as an AnnotationAST

+	 */

+	@Override

+	public Object visit(AnnotationNameAST n, Object o) {

+		@SuppressWarnings("unchecked")

+		List<RuntimeAnnotation> annotationList = (List<RuntimeAnnotation>) o;

+		RuntimeAnnotation annotation = CoreFactory.eINSTANCE.createRuntimeAnnotation();

+		String name = n.toString();

+		annotation.setAnnotationName(name);

+		// annotation for RuntimeAnnotation

+		createNodeInfoFor(n, annotation);

+		annotationList.add(annotation);

+		return annotationList;

+	}

+

+	/**

+	 * This method should be called inside an Annotation with parameters

+	 */

+	@Override

+	public Object visit(AnnotationNameAST n) {

+		return defaultVisit(n);

+	}

+

+

+//	****************** Type declaration for variables ****************************

+

+

+

+	/**

+	 * Visiting a {@link TypeOptAST} and return a corresponding

+	 * model element {@link Constant}

+	 * @param n : current AST node of type {@link TypeOptAST}

+	 * @param o : the typed variable

+	 * @return model element {@link Constant}

+	 */

+	@Override

+	public Object visit(TypeOptAST n, Object o) {

+		Variable var = (Variable) o;

+		String typeStr =  (String) n.getQualifiedTypeNameAST().accept(this);

+		TypeConstant typeConst = createTypeConstant(n, typeStr);

+		var.setVariableType(typeConst);

+		modelResolver.resolveAsmType(var, typeConst.getName());

+

+//		TypeConstant typeConst = DefinitionsFactory.eINSTANCE.createTypeConstant();

+//		typeConst.setName(typeStr);

+//		var.setVariableType(typeConst);

+//		// Creating node information

+//		createNodeInfoFor(n, typeConst);

+//		// Resolve type constant

+//		modelResolver.resolveAsmType(var, typeStr);

+//		// Note that the kind parameter of constants corresponding to a type

+//		// are used differently here. While formally, they should be always strings,

+//		// they are resolved according to the "typeStr" by getValueKind()

+//		typeConst.setKind(getValueKind(typeStr));

+		return typeConst;

+	}

+

+

+	/**

+	 * Visiting a {@link ReturnTypeOptAST} (of an ASMFunction)

+	 * and return a corresponding model element {@link TypeConstant} as its type

+	 * @param n : current AST node of type {@link ReturnTypeOptAST}

+	 * @param o : the typed ASM function

+	 * @return model element {@link TypeConstant}

+	 */

+	@Override

+	public Object visit(ReturnTypeOptAST n, Object o) {

+		ASMFunction asmFun = (ASMFunction) o;

+		String typeStr =  (String) n.getQualifiedTypeNameAST().accept(this);

+		TypeConstant typeConst =  createTypeConstant(n, typeStr);

+		asmFun.setReturnType(typeConst);

+		// Resolve type constant

+		modelResolver.resolveAsmType(asmFun, typeStr);

+

+//		TypeConstant typeConst =  DefinitionsFactory.eINSTANCE.createTypeConstant();

+//		typeConst.setName(typeStr);

+//		asmFun.setReturnType(typeConst);

+//		// Creating node information

+//		createNodeInfoFor(n, typeConst);

+//		// Resolve type constant

+//		modelResolver.resolveAsmType(asmFun, typeStr);

+//		// Note that the kind parameter of constants corresponding to a type

+//		// are used differently. While formally, they should be always strings,

+//		// they are resolved according to the "typeStr" by getValueKind()

+//		typeConst.setKind(getValueKind(typeStr));

+		return typeConst;

+	}

+

+

+

+	/**

+	 * Visiting a {@link TypeConstantsAST0} (of an ASMFunction)

+	 * and return a corresponding model element {@link TypeConstant} as its type

+	 * @param n : current AST node of type {@link TypeConstantsAST0}

+	 * @param o : the typed ASM function

+	 * @return ASM function {@link ASMFunction}

+	 */

+	@Override

+	public Object visit(TypeConstantsAST0 n, Object o) {

+		ASMFunction asmFun = (ASMFunction) o;

+		String typeStr =  (String) n.getQualifiedTypeNameAST().accept(this);

+		TypeConstant typeConst =  createTypeConstant(n, typeStr);

+		asmFun.getArgumentTypes().add(typeConst);

+		// Resolve type constant

+		modelResolver.resolveAsmType(typeConst, typeStr);

+		return asmFun;

+	}

+

+	/**

+	 * Visiting a {@link TypeConstantsAST1} (of an ASMFunction)

+	 * and return a corresponding model element {@link TypeConstant} as its type

+	 * @param n : current AST node of type {@link TypeConstantsAST1}

+	 * @param o : the typed ASM function

+	 * @return ASM function {@link ASMFunction}

+	 */

+	@Override

+	public Object visit(TypeConstantsAST1 n, Object o) {

+		ASMFunction asmFun = (ASMFunction) o;

+		String typeStr =  (String) n.getQualifiedTypeNameAST().accept(this);

+		TypeConstant typeConst =  createTypeConstant(n, typeStr);

+		asmFun.getArgumentTypes().add(typeConst);

+		// Resolve type constant

+		modelResolver.resolveAsmType(typeConst, typeStr);

+		// Process other type constants

+		n.getTypeConstantsAST().accept(this, asmFun);

+		return asmFun;

+	}

+

+	protected TypeConstant createTypeConstant(ASTNode n, String typeStr) {

+		TypeConstant typeConst =  DefinitionsFactory.eINSTANCE.createTypeConstant();

+		if ("ENTITY".equals(typeStr.toUpperCase())) {

+			typeStr = "ENTITY";

+		} else if ("RELATION".equals(typeStr.toUpperCase())) {

+			typeStr = "RELATION";

+		}

+		typeConst.setName(typeStr);

+		typeConst.setFqn(typeStr); //Required for type checker

+		// Creating node information

+		createNodeInfoFor(n, typeConst);

+		// Note that the kind parameter of constants corresponding to a type

+		// are used differently. While formally, they should be always strings,

+		// they are resolved according to the "typeStr" by getValueKind()

+		typeConst.setKind(typeChecker.getTypeResolver().getValueKind(typeStr));

+		return typeConst;

+	}

+

+

+	private Object loadDocumentationComments(ASTNode n, Object o) {

+		AnnotatedElement element = (AnnotatedElement) o;

+		List<Annotation> annotations = element.getAnnotations();

+		Annotation doc = CoreFactory.eINSTANCE.createAnnotation();

+		//Loading documentation string

+		IToken[] adjuncts = n.getPrecedingAdjuncts();

+		String text = "";

+		for (IToken adjunct : adjuncts) {

+			String adjString = adjunct.toString();

+			if (adjString.startsWith("/**")) {

+				text = adjString;

+			}

+		}

+		if (text == "") return null;

+		/*

+		 * Preprocessing text: removing all line breaks, multiple whitespaces

+		 * and starting star characters.

+		 */

+		text = text.substring(text.indexOf("/**") + 3);

+		text = text.replaceAll("\\r", "");

+		text = text.replaceAll("\\*/", "");

+		String[] lines = text.split("\\n");

+		StringBuilder sb = new StringBuilder();

+		for (String line : lines) {

+			int index = 0;

+			while (index < line.length()

+					&& (Character.isWhitespace(line.charAt(index)) || line

+							.charAt(index) == '*')) {

+				index++;

+			}

+			sb.append(line.substring(index));

+			sb.append(" ");

+		}

+		text = sb.toString().replaceAll("\\s+", " ");

+		// Adding annotations

+		doc.setKey("viatradoc");

+		doc.setValue(text);

+		annotations.add(doc);

+		return doc;

+	}

+

+}

diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/modelbuilder/VTCLModelResolver.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/modelbuilder/VTCLModelResolver.java
new file mode 100644
index 0000000..8928b9a
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/modelbuilder/VTCLModelResolver.java
@@ -0,0 +1,2351 @@
+/**
+ * Copyright (c) 2007 - 2009OptXware Research and Development LLC.
+ * All rights reserved.   This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Daniel Varro - Initial API and implementation
+ */
+
+package org.eclipse.viatra2.lpgparser.modelbuilder;
+
+import java.util.ArrayList;
+import java.util.EmptyStackException;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Stack;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.core.simple.UniqueNameProvider;
+import org.eclipse.viatra2.errors.info.ErrorInformation;
+import org.eclipse.viatra2.errors.info.ErrorInformation.ErrorKind;
+import org.eclipse.viatra2.errors.info.ErrorInformation.ErrorSeverity;
+import org.eclipse.viatra2.errors.info.Location;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.gtasm.support.helper.GTASMHelper;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.BlockRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.CompoundRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.compoundRules.NestedRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.GTASMElement;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ImportDeclaration;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Module;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ASMRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleIf;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.ConditionalRuleTry;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GtFactory;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableAssignment;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableConstraint;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.ElementCreateRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.EntityCreateRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.manipulationRules.creation.RelationCreateRule;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.ElementReference;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.EditmodelFactory;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.SupertypeOf;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.TypeOf;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.VPMElement;
+import org.eclipse.viatra2.lpgparser.loader.VTCLMessages;
+import org.eclipse.viatra2.lpgparser.typechecker.TypeResolver;
+import org.eclipse.viatra2.lpgparser.typechecker.VTCLTypeNameConstants;
+import org.eclipse.viatra2.natives.ASMNativeFunction;
+
+/**
+ * This class is responsible for resolving references when parsing a VTCL file.
+ * Some of the methods are also accessed by TransformationContent.java when
+ * reloading transformations to model spaces
+ * @author Daniel Varro
+ */
+public class VTCLModelResolver {
+
+	private static final String PARSER_MARKER = "org.eclipse.viatra2.loaders.vtclparsermarker";
+
+	public VTCLModelResolver() {
+		modelSpace = null;
+		modelManager = null;
+		asmNativeFunctions = null;
+		typeResolver = new TypeResolver();
+		uniqueNameProvider = null;
+	}
+
+	public VTCLModelResolver(IModelSpace aModelSpace,
+			ASMNativeFunction[] allAsmNativeFunctions) {
+		modelSpace = aModelSpace;
+		modelManager = modelSpace.getModelManager();
+		asmNativeFunctions = allAsmNativeFunctions;
+		typeResolver = new TypeResolver();
+		uniqueNameProvider = new UniqueNameProvider();
+	}
+
+	private ASMNativeFunction[] asmNativeFunctions;
+	private IModelSpace modelSpace;
+	private IModelManager modelManager;
+	private TypeResolver typeResolver;
+	// private TypeAssignments typeAssignments;
+	private UniqueNameProvider uniqueNameProvider;
+
+	public IModelSpace getModelSpace() {
+		return modelSpace;
+	}
+
+	public IModelManager getModelManager() {
+		return modelManager;
+	}
+
+	public ASMNativeFunction[] getNativeFunctions() {
+		return asmNativeFunctions;
+	}
+
+	private Machine storedMachine;
+
+	/**
+	 * Returns the machine that is stored inside the model resolver for
+	 * resolution.
+	 * @return the machine to be resolved.
+	 */
+	public Machine getMachine() {
+		return storedMachine;
+	}
+
+	/**
+	 * Sets the {@link Machine} whose elements have to be resolved for the model
+	 * resolver.
+	 * @param machine
+	 *            the machine to be resolved.
+	 */
+	public void setMachine(Machine machine) {
+		this.storedMachine = machine;
+	}
+
+	/**
+	 * Clears all buffers in the model resolver. It is the callers
+	 * responsibility to call this method before the model elements are
+	 * resolved.
+	 */
+	public void clearBuffers() {
+		unresolvedPatternCalls.clear();
+		unresolvedAsmFunctionInvocations.clear();
+		unresolvedAsmFunctionUpdates.clear();
+		unresolvedAsmRuleCalls.clear();
+		unresolvedGTRuleInvoc.clear();
+	}
+	
+	/**
+	 * Resolves the elements of the previously loaded machine. It is the callers
+	 * responsibility to call both {@link VTCLModelResolver#clearBuffers()} and
+	 * {@link VTCLModelResolver#setMachine(Machine)} before calling this method.
+	 */
+	public void resolveModel() {
+		resolvePatternCalls(storedMachine);
+		resolveAsmFunInvocations(storedMachine);
+		resolveAsmFunUpdates(storedMachine);
+		resolveAsmRulesInvocations(storedMachine);
+		resolveGTRuleInvocations(storedMachine);
+		validateDistinctVariables(storedMachine);
+		validateNoDuplicateNames(storedMachine);
+	}
+
+	private List<ErrorInformation> referenceResolutionErrorInfos = new ArrayList<ErrorInformation>();
+
+	public List<ErrorInformation> getAllReferenceErrorInfos() {
+		return referenceResolutionErrorInfos;
+	}
+
+	public void clearAllReferenceErrors() {
+		referenceResolutionErrorInfos.clear();
+	}
+
+	private Map<GTPatternBody, List<VPMElement>> orphanBodyElements = new HashMap<GTPatternBody, List<VPMElement>>();
+
+	public List<VPMElement> getOrphanBodyElements(GTPatternBody body) {
+		if (orphanBodyElements.get(body) == null) {
+			List<VPMElement> list = new ArrayList<VPMElement>();
+			orphanBodyElements.put(body, list);
+			return list;
+		} else
+			return orphanBodyElements.get(body);
+	}
+
+	private Stack<List<VariableReference>> unresolvedVariableRefsStack = new Stack<List<VariableReference>>();
+
+	// public List<VariableReference> getTopUnresolvedVariableRefs() {
+	// if (unresolvedVariableRefsStack.peek() == null) {
+	// return new ArrayList<VariableReference>();
+	// }
+	// else
+	// return unresolvedVariableRefsStack.peek();
+	// }
+	public Stack<List<VariableReference>> getUnresolvedVariableRefsStack() {
+		return unresolvedVariableRefsStack;
+	}
+
+	public void addVariableReferenceToStack(VariableReference varRef) {
+		// added by Istvan
+		try {
+			unresolvedVariableRefsStack.peek();
+		} catch (EmptyStackException e) {
+			unresolvedVariableRefsStack
+					.push(new ArrayList<VariableReference>());
+		}
+		// end added section
+		unresolvedVariableRefsStack.peek().add(varRef);
+	}
+
+	private List<GTPatternCall> unresolvedPatternCalls = new ArrayList<GTPatternCall>();
+
+	public List<GTPatternCall> getUnresolvedPatternCalls() {
+		return unresolvedPatternCalls;
+	}
+
+	private List<RuleUpdateASMFunction> unresolvedAsmFunctionUpdates = new ArrayList<RuleUpdateASMFunction>();
+
+	public List<RuleUpdateASMFunction> getUnresolvedAsmFunctionUpdates() {
+		return unresolvedAsmFunctionUpdates;
+	}
+
+	private List<ASMFunctionInvocation> unresolvedAsmFunctionInvocations = new ArrayList<ASMFunctionInvocation>();
+
+	public List<ASMFunctionInvocation> getUnresolvedAsmFunctionInvocations() {
+		return unresolvedAsmFunctionInvocations;
+	}
+
+	private List<CallRule> unresolvedAsmRuleCalls = new ArrayList<CallRule>();
+
+	public List<CallRule> getUnresolvedAsmRuleCalls() {
+		return unresolvedAsmRuleCalls;
+	}
+
+	private List<GTRuleInvocation> unresolvedGTRuleInvoc = new ArrayList<GTRuleInvocation>();
+
+	public List<GTRuleInvocation> getUnresolvedGTRuleInvoc() {
+		return unresolvedGTRuleInvoc;
+	}
+	
+	private Map<GTPatternBody, List<VariableReference>> unresolvedPatternVariableRefs = new HashMap<GTPatternBody, List<VariableReference>>();
+
+	public List<VariableReference> getUnresolvedPatternVariableRefs(
+			GTPatternBody body) {
+		if (unresolvedPatternVariableRefs.get(body) == null) {
+			List<VariableReference> list = new ArrayList<VariableReference>();
+			unresolvedPatternVariableRefs.put(body, list);
+			return list;
+		} else
+			return unresolvedPatternVariableRefs.get(body);
+	}
+
+	private Map<GTPatternBody, Map<PatternVariable, ModelElement>> bodyMapElement2Var = new HashMap<GTPatternBody, Map<PatternVariable, ModelElement>>();
+
+	public Map<PatternVariable, ModelElement> getBodyMapElement4Var(
+			GTPatternBody body) {
+		if (bodyMapElement2Var.get(body) == null) {
+			HashMap<PatternVariable, ModelElement> map = new HashMap<PatternVariable, ModelElement>();
+			bodyMapElement2Var.put(body, map);
+			return map;
+		} else
+			return bodyMapElement2Var.get(body);
+	}
+
+	private Map<GTPatternBody, Map<ModelElement, PatternVariable>> bodyMapVar2Element = new HashMap<GTPatternBody, Map<ModelElement, PatternVariable>>();
+
+	public Map<ModelElement, PatternVariable> getBodyMapVar4Element(
+			GTPatternBody body) {
+		if (bodyMapVar2Element.get(body) == null) {
+			HashMap<ModelElement, PatternVariable> map = new HashMap<ModelElement, PatternVariable>();
+			bodyMapVar2Element.put(body, map);
+			return map;
+		} else
+			return bodyMapVar2Element.get(body);
+	}
+
+	private Map<ASMRuleInvocation, GTRule> actionRuleMap = new HashMap<ASMRuleInvocation, GTRule>();
+
+	public Map<ASMRuleInvocation, GTRule> getActionRuleMap() {
+		return actionRuleMap;
+	}
+
+	public void resolveNamespaceImport(ImportDeclaration declaration) {
+		if (modelManager.getElementByName(declaration.getImportValue()) == null) {
+			String[] context = new String[] { declaration.getImportValue() };
+			addReferenceResolutionError(declaration.getAnnotations(),
+					VTCLMessages.VTCLValidationErrorCodes_IMPORT_UNRESOLVABLE,
+					ErrorSeverity.ERROR, context);
+		}
+	}
+
+	/**
+	 * Tries to resolve a VariableReference to one of the local Variable of the
+	 * GTRule. If no such Variable is found, then a new Variable is created.
+	 * @param varRef
+	 *            : a VariableReference
+	 * @param rule
+	 *            : a GTRule
+	 * @return varDef : a Variable
+	 */
+	public Variable resolveLocalVariableInGTRule(VariableReference varRef,
+			GTRule rule) {
+		Variable varDef = lookupVariableDefByName(varRef.getName(), rule);
+		if (varDef != null) {
+			varRef.setVariable(varDef);
+		}
+		// If a corresponding Variable definition is not found
+		else {
+			varDef = createPatternVariableFromReference(varRef);
+			rule.getLocalVariables().add(varDef);
+			Annotation annotation = ModelBuilderHelper.lookupAnnotation(
+					GTASMHelper.NODE_INFORMATION, varRef.getAnnotations());
+			if (annotation != null) {
+				varDef.getAnnotations().add(annotation);
+			}
+		}
+		return varDef;
+	}
+
+	/**
+	 * Tries to resolve a VariableReference to one of the local PatternVariable
+	 * of the Pattern. If no such PatternVariable is found, then a new
+	 * PatternVariable is created.
+	 * @param varRef
+	 *            : a {@link VariableReference}
+	 * @param body
+	 *            : the container pattern body ({@link GTPatternBody})
+	 * @return varDef : a PatternVariable
+	 */
+	public PatternVariable resolveLocalVariableInPattern(
+			VariableReference varRef, GTPatternBody body) {
+		PatternVariable varDef = lookupVariableDefByName(varRef.getName(), body);
+		if (varDef != null) {
+			varRef.setVariable(varDef);
+		}
+		// If a corresponding PatternVariable definition is not found
+		else {
+			varDef = createPatternVariableFromReference(varRef);
+			body.getLocalVariables().add(varDef);
+			Annotation annotation = ModelBuilderHelper.lookupAnnotation(
+					GTASMHelper.NODE_INFORMATION, varRef.getAnnotations());
+			if (annotation != null) {
+				varDef.getAnnotations().add(annotation);
+			}
+		}
+		return varDef;
+	}
+
+	/**
+	 * Tries to resolve unresolved VariableReferences to existing
+	 * PatternVariables of the GTPatternBody.
+	 * @param body
+	 *            : a GTPatternBody
+	 */
+	public void resolvePatternVariableRefs(GTPatternBody body) {
+		List<VariableReference> list = getUnresolvedPatternVariableRefs(body);
+		for (VariableReference varRef : list) {
+			PatternVariable varDef = lookupVariableDefByName(varRef.getName(),
+					body);
+			if (varDef != null) {
+				varRef.setVariable(varDef);
+			}
+			// Report error if a corresponding PatternVariable cannot be found
+			else {
+				String[] context = new String[] { varRef.getName() };
+				addReferenceResolutionError(
+						varRef.getAnnotations(),
+						VTCLMessages.VTCLValidationErrorCodes_VARIABLE_REF_UNRESOLVABLE,
+						ErrorSeverity.ERROR, context);
+			}
+
+		}
+	}
+
+	public PatternVariable createPatternVariableFromReference(
+			VariableReference varRef) {
+		PatternVariable varDef = GtFactory.eINSTANCE.createPatternVariable();
+		varRef.setVariable(varDef);
+		// Generate a unique variable name for the new PatternVariable
+		if (varRef.getName().charAt(0) == '_') {
+			varDef.setName(uniqueNameProvider.uniqueName("Var"));
+		} else {
+			varDef.setName(varRef.getName());
+		}
+		return varDef;
+	}
+
+	public void resolveModelElementReferences(GTPatternBody body) {
+		List<VPMElement> orphanElements = getOrphanBodyElements(body);
+		for (Object object : orphanElements) {
+			if (object instanceof Relation) {
+				Relation relation = (Relation) object;
+				resolveRelationReferences(relation, body);
+			} else if (object instanceof SupertypeOf) {
+				SupertypeOf relship = (SupertypeOf) object;
+				resolveRelationshipReferences(relship, body);
+			} else if (object instanceof TypeOf) {
+				TypeOf relship = (TypeOf) object;
+				resolveRelationshipReferences(relship, body);
+			}
+
+		}
+	}
+
+	/**
+	 * Resolves the source and target of a {@link Relation} if possible by using
+	 * the model elements defined in the {@link GTPatternBody}. If no
+	 * corresponding model element is found then we check if the corresponding
+	 * VariableReference exists as a pattern parameter or in a pattern
+	 * composition, thus a relation will be partially resolved in such a case.
+	 * @param relation
+	 *            : {@link Relation} to be resolved
+	 * @param body
+	 *            : {@link GTPatternBody}
+	 */
+	private void resolveRelationReferences(Relation relation, GTPatternBody body) {
+		// Seek for the source model element
+		PatternVariable srcVar = lookupVariableDefByName(relation.getFromStr(),
+				body);
+		if (srcVar != null && bodyMapElement2Var.get(body).get(srcVar) != null) {
+			// Lookup the variable in the currently processed Body
+			ModelElement srcElem = bodyMapElement2Var.get(body).get(srcVar);
+			// Setting the source
+			relation.setFrom(srcElem);
+			// Setting the PatternVariable of the VariableReference
+			VariableReference srcRef = relation.getVariableReferences().get(1);
+			srcRef.setVariable(srcVar);
+		}
+		// If there is a PatternVariable, but no corresponding model element ->
+		// warning
+		else if (srcVar != null
+				&& bodyMapElement2Var.get(body).get(srcVar) == null) {
+			// If the source cannot be resolved locally, then add the relation
+			// to the ElementWrappers of the body
+			body.getDanglingRelations().add(relation);
+			addReferenceResolutionError(
+					lookupVariableRefByName(relation.getFromStr(), relation)
+							.getAnnotations(),
+					VTCLMessages.VTCLValidationErrorCodes_SOURCE_LOCALLY_UNRESOLVABLE,
+					ErrorSeverity.WARNING, new String[] {}); // empty context
+			// Add the relation to the elementWrappers buffer to preserve it in
+			// the EMF model
+		}
+		// If no corresponding PatternVariable exists -> error
+		else {
+			// addReferenceResolutionError( relation.getAnnotations(),
+			addReferenceResolutionError(lookupVariableRefByName(
+					relation.getFromStr(), relation).getAnnotations(),
+					VTCLMessages.VTCLValidationErrorCodes_SOURCE_UNRESOLVABLE,
+					ErrorSeverity.ERROR, new String[] {}); // empty context
+		}
+
+		// Seek for the target model element
+		PatternVariable trgVar = lookupVariableDefByName(relation.getToStr(),
+				body);
+		if (trgVar != null && bodyMapElement2Var.get(body).get(trgVar) != null) {
+			// Assume that the last element is the current element processed
+			ModelElement trgElem = bodyMapElement2Var.get(body).get(trgVar);
+			// Setting the target
+			relation.setTo(trgElem);
+			// Setting the PatternVariable of the VariableReference
+			VariableReference trgRef = relation.getVariableReferences().get(2);
+			trgRef.setVariable(trgVar);
+		}
+		// If there is a PatternVariable, but no corresponding model element ->
+		// warning
+		else if (trgVar != null
+				&& bodyMapElement2Var.get(body).get(trgVar) == null) {
+			addReferenceResolutionError(
+					lookupVariableRefByName(relation.getToStr(), relation)
+							.getAnnotations(),
+					VTCLMessages.VTCLValidationErrorCodes_TARGET_LOCALLY_UNRESOLVABLE,
+					ErrorSeverity.WARNING, new String[] {}); // empty context
+		}
+		// If no corresponding PatternVariable exists -> error
+		else {
+			// addReferenceResolutionError( relation.getAnnotations(),
+			addReferenceResolutionError(lookupVariableRefByName(
+					relation.getToStr(), relation).getAnnotations(),
+					VTCLMessages.VTCLValidationErrorCodes_TARGET_UNRESOLVABLE,
+					ErrorSeverity.ERROR, new String[] {}); // empty context
+		}
+
+	}
+
+	private void resolveRelationshipReferences(Relationship relship,
+			GTPatternBody body) {
+		// Seek for the source model element
+		PatternVariable clientVar = lookupVariableDefByName(relship
+				.getClientStr(), body);
+		if (clientVar != null
+				&& bodyMapElement2Var.get(body).get(clientVar) != null) {
+			// Lookup the variable
+			ModelElement clientElem = bodyMapElement2Var.get(body).get(
+					clientVar);
+			// Setting the source
+			relship.setClient(clientElem);
+			// Setting the PatternVariable of the VariableReference
+			VariableReference clientRef = relship.getVariableReferences()
+					.get(1);
+			clientRef.setVariable(clientVar);
+		}
+		// If there is a PatternVariable, but no corresponding model element
+		else if (clientVar != null
+				&& bodyMapElement2Var.get(body).get(clientVar) == null) {
+			// If the client cannot be resolved locally, then add the
+			// relationship
+			// as to the list of dangling relationship in order to get
+			// serialized
+			body.getDanglingRelationships().add(relship);
+			addReferenceResolutionError(
+					lookupVariableRefByName(relship.getClientStr(), relship)
+							.getAnnotations(),
+					VTCLMessages.VTCLValidationErrorCodes_CLIENT_LOCALLY_UNRESOLVABLE,
+					ErrorSeverity.WARNING, new String[] {}); // empty context
+		}
+		// If no corresponding PatternVariable exists, this is an error
+		else {
+			// addReferenceResolutionError( relship.getAnnotations(),
+			addReferenceResolutionError(lookupVariableRefByName(
+					relship.getClientStr(), relship).getAnnotations(),
+					VTCLMessages.VTCLValidationErrorCodes_CLIENT_UNRESOLVABLE,
+					ErrorSeverity.ERROR, new String[] {}); // empty context
+		}
+
+		// Seek for the source model element
+		PatternVariable supplierVar = lookupVariableDefByName(relship
+				.getSupplierStr(), body);
+		if (supplierVar != null
+				&& bodyMapElement2Var.get(body).get(supplierVar) != null) {
+			// Lookup the variable
+			ModelElement supplierElem = bodyMapElement2Var.get(body).get(
+					supplierVar);
+			// Setting the target
+			relship.setSupplier(supplierElem);
+			// Setting the PatternVariable of the VariableReference
+			VariableReference supplierRef = relship.getVariableReferences()
+					.get(0);
+			supplierRef.setVariable(supplierVar);
+		}
+		// If there is a PatternVariable, but no corresponding model element
+		else if (supplierVar != null
+				&& bodyMapElement2Var.get(body).get(supplierVar) == null) {
+			addReferenceResolutionError(
+					lookupVariableRefByName(relship.getSupplierStr(), relship)
+							.getAnnotations(),
+					VTCLMessages.VTCLValidationErrorCodes_SUPPLIER_LOCALLY_UNRESOLVABLE,
+					ErrorSeverity.WARNING, new String[] {}); // empty context
+		}
+		// If no corresponding PatternVariable exists, this is an error
+		else {
+			addReferenceResolutionError(
+					lookupVariableRefByName(relship.getSupplierStr(), relship)
+							.getAnnotations(),
+					VTCLMessages.VTCLValidationErrorCodes_SUPPLIER_UNRESOLVABLE,
+					ErrorSeverity.ERROR, new String[] {}); // empty context
+		}
+	}
+
+	/**
+	 * Creates an ErrorInformation
+	 * @param annotations
+	 *            : location information of the error
+	 * @param errorString
+	 *            : textual representation of the error (VTCLMessages should be
+	 *            used)
+	 * @param errorSeverity
+	 *            : severity of the error
+	 * @param context
+	 *            : list of contextual information
+	 */
+	public void addReferenceResolutionError(List<Annotation> annotations,
+			String errorString, ErrorSeverity errorSeverity, String[] context) {
+		Location location = ModelBuilderHelper.createLocationInfo(annotations);
+		ErrorInformation errorInfo = new ErrorInformation(errorString,
+				PARSER_MARKER, ErrorKind.VALIDATION_ERROR, location,
+				errorSeverity);
+		// Bind contextual parameters of error strings
+		errorInfo.bind(context);
+		referenceResolutionErrorInfos.add(errorInfo);
+	}
+
+	public void storeVarDefForModelElement(GTPatternBody body,
+			PatternVariable varDef, ModelElement me) {
+		if (getBodyMapElement4Var(body).get(varDef) == null) {
+			getBodyMapElement4Var(body).put(varDef, me);
+		}
+		// TODO this code assumes, every use of a pattern variable is a variable definition - it should be rewritten
+		// Add an error if a variable is defined multiple times
+		else {
+			String[] context = new String[] { varDef.getName() };
+			addReferenceResolutionError(
+					varDef.getAnnotations(),
+					VTCLMessages.VTCLValidationErrorCodes_DUPLICATE_PATTERNVAR_DEFINITION,
+					ErrorSeverity.WARNING, context);
+		}
+		// Add the inverse reference between model element and its variable
+		getBodyMapVar4Element(body).put(me, varDef);
+	}
+
+	public GTPattern reportGtPatternCallResolutionError(GTPatternCall call,
+			GTPattern patternDef, IFramework fw) {
+		String nameStr = call.getFqn();
+		int callArity = call.getActualParameters().size();
+		// If not found locally, initiate lookup in other machines
+		if (patternDef == null) {
+			int lastDotIndex = nameStr.lastIndexOf(".");
+			// If ruleName is a fully qualified name which can be separated to
+			// machine+rule
+			if (lastDotIndex != -1) {
+				String machineStr = nameStr.substring(0, lastDotIndex);
+				// TODO: This code should be rewritten to accommodate the new
+				// MachineWrapper
+				Machine extMachine = (Machine) fw.getMachineByFQN(machineStr);
+				if (extMachine != null) {
+					patternDef = lookupGTPattern(nameStr, callArity, extMachine);
+				}
+			}
+		}
+		// Set the GTPatternCall correspondingly
+		if (patternDef != null) {
+			if (patternDef.getSymParameters().size() == call
+					.getActualParameters().size()) {
+				call.setCalledPattern(patternDef);
+			}
+			// Report if the number of actual parameters do not match with the
+			// number of formal parameters
+			else {
+				String arity = String.valueOf(patternDef.getSymParameters()
+						.size());
+				String[] context = new String[] { patternDef.getFqn() + "/"
+						+ arity };
+				addReferenceResolutionError(
+						call.getAnnotations(),
+						VTCLMessages.VTCLValidationErrorCodes_PATTERN_PARAMETER_MISMATCH,
+						ErrorSeverity.ERROR, context);
+			}
+		}
+		// Otherwise report an error that pattern call cannot be resolved
+		else {
+			String arity = String.valueOf(call.getActualParameters().size());
+			String[] context = new String[] { call.getFqn() + "/" + arity };
+			addReferenceResolutionError(
+					call.getAnnotations(),
+					VTCLMessages.VTCLValidationErrorCodes_PATTERN_CALL_UNRESOLVABLE,
+					ErrorSeverity.ERROR, context);
+		}
+		return patternDef;
+	}
+
+	public void resolvePatternCalls(Machine machine) {
+		List<GTPatternCall> list = getUnresolvedPatternCalls();
+		for (GTPatternCall call : list) {
+			String nameStr = call.getFqn();
+			int arity = call.getActualParameters().size();
+			// Seek for GTPattern definition locally
+			GTPattern patternDef = lookupGTPattern(nameStr, arity, machine);
+			reportGtPatternCallResolutionError(call, patternDef, modelSpace
+					.getFramework());
+		}
+	}
+
+	public GTRule reportGtRuleResolutionError(GTRuleInvocation gtInvoc,
+			GTRule gtRuleDef, IFramework fw) {
+		String nameStr = gtInvoc.getFqn();
+		int callArity = gtInvoc.getActualParameters().size();
+		// If not found locally, initiate lookup in other machines
+		if (gtRuleDef == null) {
+			int lastDotIndex = nameStr.lastIndexOf(".");
+			// If ruleName is a fully qualified name which can be separated to
+			// machine+rule
+			if (lastDotIndex != -1) {
+				String machineStr = nameStr.substring(0, lastDotIndex);
+				// TODO: This code should be rewritten to accommodate the new
+				// MachineWrapper
+				Machine extMachine = (Machine) fw.getMachineByFQN(machineStr);
+				if (extMachine != null) {
+					gtRuleDef = lookupGTRule(nameStr, callArity, extMachine);
+				}
+			}
+		}
+		if (gtRuleDef != null) {
+			// Check if parameters are matching
+			if (gtRuleDef.getSymParameters().size() == gtInvoc
+					.getActualParameters().size()) {
+				gtInvoc.setRule(gtRuleDef);
+			} else {
+				String arity = String.valueOf(gtRuleDef.getSymParameters()
+						.size());
+				String[] context = new String[] { gtRuleDef.getName() + "/"
+						+ arity };
+				addReferenceResolutionError(
+						gtInvoc.getAnnotations(),
+						VTCLMessages.VTCLValidationErrorCodes_GTRULE_PARAMETER_MISMATCH,
+						ErrorSeverity.ERROR, context);
+			}
+		}
+		// Otherwise report an error
+		else {
+			String arity = String.valueOf(gtInvoc.getActualParameters().size());
+			String[] context = new String[] { gtInvoc.getName() + "/" + arity };
+			addReferenceResolutionError(
+					gtInvoc.getAnnotations(),
+					VTCLMessages.VTCLValidationErrorCodes_GTRULE_CALL_UNRESOLVABLE,
+					ErrorSeverity.ERROR, context);
+		}
+		return gtRuleDef;
+	}
+
+	public void resolveGTRuleInvocations(Machine machine) {
+		List<GTRuleInvocation> list = getUnresolvedGTRuleInvoc();
+		for (GTRuleInvocation gtInvoc : list) {
+			String nameStr = gtInvoc.getFqn();
+			int arity = gtInvoc.getActualParameters().size();
+			// Seek for GTPattern definition locally
+			GTRule gtRuleDef = lookupGTRule(nameStr, arity, machine);
+			reportGtRuleResolutionError(gtInvoc, gtRuleDef, modelSpace
+					.getFramework());
+		}
+	}
+
+	public ASMFunction reportFunInvocResolutionError(
+			ASMFunctionInvocation funInvoc, ASMFunction asmFunDef, IFramework fw) {
+		String nameStr = funInvoc.getFqn();
+		int callArity = funInvoc.getActualParameters().size();
+		// If not found locally, initiate lookup in other machines
+		if (asmFunDef == null) {
+			int lastDotIndex = nameStr.lastIndexOf(".");
+			// If ruleName is a fully qualified name we separate the machine
+			// string
+			if (lastDotIndex != -1) {
+				String machineStr = nameStr.substring(0, lastDotIndex);
+				Machine extMachine = (Machine) fw.getMachineByFQN(machineStr);
+				// TODO: This code should be rewritten to accommodate the new
+				// MachineWrapper
+				if (extMachine != null) {
+					asmFunDef = lookupAsmFunction(nameStr, callArity,
+							extMachine, true);
+				}
+			}
+		}
+		// If found, set the ASMFunctionInvocation correspondingly
+		if (asmFunDef != null) {
+			// Check the number of parameters
+			if (asmFunDef.getArity() == funInvoc.getActualParameters().size()) {
+				funInvoc.setCalledFunction(asmFunDef);
+			}
+			// Check that the number of actual parameters match with formal
+			// definition
+			else {
+				String arity = String.valueOf(asmFunDef.getArity());
+				String[] context = new String[] { asmFunDef.getName() + "/"
+						+ arity };
+				addReferenceResolutionError(
+						funInvoc.getAnnotations(),
+						VTCLMessages.VTCLValidationErrorCodes_ASMFUN_PARAMETER_MISMATCH,
+						ErrorSeverity.ERROR, context);
+			}
+		}
+		// Otherwise report an error
+		else {
+			String arity = String
+					.valueOf(funInvoc.getActualParameters().size());
+			String[] context = new String[] { funInvoc.getName() + "/" + arity };
+			addReferenceResolutionError(
+					funInvoc.getAnnotations(),
+					VTCLMessages.VTCLValidationErrorCodes_ASMFUN_INVOC_UNRESOLVABLE,
+					ErrorSeverity.ERROR, context);
+		}
+		return asmFunDef;
+	}
+
+	public void resolveAsmFunInvocations(Machine machine) {
+		List<ASMFunctionInvocation> list = getUnresolvedAsmFunctionInvocations();
+		for (ASMFunctionInvocation funInvoc : list) {
+			String nameStr = funInvoc.getFqn();
+			int arity = funInvoc.getActualParameters().size();
+			// Lookup with conditions for right values (i.e. RHS of an
+			// assignment)
+			ASMFunction asmFunDef = lookupAsmFunction(nameStr, arity, machine,
+					true);
+			reportFunInvocResolutionError(funInvoc, asmFunDef, modelSpace
+					.getFramework());
+		}
+	}
+
+	public ASMFunction reportAsmFunUpdateResolutionError(
+			RuleUpdateASMFunction updateRule, ASMFunction asmFunDef,
+			IFramework fw) {
+		String nameStr = updateRule.getFqn();
+		int callArity = updateRule.getLocations().size();
+		// If not found locally, initiate lookup in other machines
+		if (asmFunDef == null) {
+			int lastDotIndex = nameStr.lastIndexOf(".");
+			// If ruleName is a fully qualified name we separate the machine
+			// string
+			if (lastDotIndex != -1) {
+				String machineStr = nameStr.substring(0, lastDotIndex);
+				// TODO: This code should be rewritten to accommodate the new
+				// MachineWrapper
+				Machine extMachine = (Machine) fw.getMachineByFQN(machineStr);
+				if (extMachine != null) {
+					asmFunDef = lookupAsmFunction(nameStr, callArity,
+							extMachine, false);
+				}
+			}
+		}
+		// If found, set the ASMFunctionInvocation correspondingly
+		if (asmFunDef != null) {
+			if (asmFunDef.getArity() == updateRule.getLocations().size()) {
+				updateRule.setFunction(asmFunDef);
+			} else {
+				String arity = String.valueOf(asmFunDef.getArity());
+				String[] context = new String[] { asmFunDef.getName() + "/"
+						+ arity };
+				addReferenceResolutionError(
+						updateRule.getAnnotations(),
+						VTCLMessages.VTCLValidationErrorCodes_ASMFUN_PARAMETER_MISMATCH,
+						ErrorSeverity.ERROR, context);
+			}
+		}
+		// Otherwise report an error
+		else {
+			String arity = String.valueOf(updateRule.getLocations().size());
+			String[] context = new String[] { updateRule.getFqn() + "/" + arity };
+			addReferenceResolutionError(
+					updateRule.getAnnotations(),
+					VTCLMessages.VTCLValidationErrorCodes_ASMFUN_UPDATE_UNRESOLVABLE,
+					ErrorSeverity.ERROR, context);
+		}
+		return asmFunDef;
+	}
+
+	public void resolveAsmFunUpdates(Machine machine) {
+		List<RuleUpdateASMFunction> list = getUnresolvedAsmFunctionUpdates();
+		for (RuleUpdateASMFunction updateRule : list) {
+			String nameStr = updateRule.getFqn();
+			int arity = updateRule.getLocations().size();
+			// Lookup with conditions for right values (i.e. RHS of an
+			// assignment)
+			ASMFunction asmFunDef = lookupAsmFunction(nameStr, arity, machine,
+					false);
+			reportAsmFunUpdateResolutionError(updateRule, asmFunDef, modelSpace
+					.getFramework());
+		}
+	}
+
+	public Rule reportAsmRuleInvocResolutionError(CallRule ruleInvoc,
+			Rule ruleDef, IFramework fw) {
+		String ruleName = ruleInvoc.getFqn();
+		int callArity = ruleInvoc.getActualParameters().size();
+		// If not found locally, initiate lookup in other machines
+		if (ruleDef == null) {
+			int lastDotIndex = ruleName.lastIndexOf(".");
+			// If ruleName is a fully qualified name which can be separated to
+			// machine+rule
+			if (lastDotIndex != -1) {
+				String machineStr = ruleName.substring(0, lastDotIndex);
+				// TODO: This code should be rewritten to accommodate the new
+				// MachineWrapper
+				Machine extMachine = (Machine) fw.getMachineByFQN(machineStr);
+				if (extMachine != null) {
+					ruleDef = lookupAsmRule(ruleName, callArity, extMachine);
+				}
+			}
+		}
+		// If found, set the ASMFunctionInvocation correspondingly
+		if (ruleDef != null) {
+			if (ruleDef.getSymParameters().size() == ruleInvoc
+					.getActualParameters().size()) {
+				ruleInvoc.setRule(ruleDef);
+			} else {
+				String arity = String
+						.valueOf(ruleDef.getSymParameters().size());
+				String[] context = new String[] { ruleDef.getName() + "/"
+						+ arity };
+				addReferenceResolutionError(
+						ruleInvoc.getAnnotations(),
+						VTCLMessages.VTCLValidationErrorCodes_ASMRULE_PARAMETER_MISMATCH,
+						ErrorSeverity.ERROR, context);
+			}
+		}
+		// Otherwise report an error
+		else {
+			String arity = String.valueOf(ruleInvoc.getActualParameters()
+					.size());
+			String[] context = new String[] { ruleName + "/" + arity };
+			addReferenceResolutionError(
+					ruleInvoc.getAnnotations(),
+					VTCLMessages.VTCLValidationErrorCodes_ASMRULE_INVOC_UNRESOLVABLE,
+					ErrorSeverity.ERROR, context);
+		}
+		return ruleDef;
+	}
+
+	public void resolveAsmRulesInvocations(Machine machine) {
+		List<CallRule> list = getUnresolvedAsmRuleCalls();
+		for (CallRule ruleInvoc : list) {
+			String ruleName = ruleInvoc.getFqn();
+			int arity = ruleInvoc.getActualParameters().size();
+			// Lookup with conditions for Left values (i.e. LHS of an
+			// assignment)
+			Rule ruleDef = lookupAsmRule(ruleName, arity, machine);
+			reportAsmRuleInvocResolutionError(ruleInvoc, ruleDef, modelSpace
+					.getFramework());
+		}
+	}
+
+	public void resolveVariableRefsInRule(GTASMElement defScope) {
+		List<VariableReference> list = unresolvedVariableRefsStack.peek();
+		for (VariableReference varRef : list) {
+			Variable varDef = null;
+			// If resolution is initiated from an ASMRuleInvocation
+			if (defScope instanceof ASMRuleInvocation) {
+				ASMRuleInvocation ruleInvoc = (ASMRuleInvocation) defScope;
+				// Lookup VariableDefinition in the ASM Rule
+				varDef = traverseCallHierarchy(varRef.getName(), ruleInvoc);
+			}
+			// If resolution is initiated from a GTPatternBody
+			else if (defScope instanceof GTPatternBody) {
+				GTPatternBody body = (GTPatternBody) defScope;
+				varDef = lookupVariableDefByName(varRef.getName(), body);
+			}
+			{
+
+			}
+			// If found, set the variable reference appropriately
+			if (varDef != null) {
+				varRef.setVariable(varDef);
+			}
+			// Otherwise report an error
+			else {
+				String[] context = new String[] { varRef.getName() };
+				addReferenceResolutionError(
+						varRef.getAnnotations(),
+						VTCLMessages.VTCLValidationErrorCodes_VARIABLE_REF_UNRESOLVABLE,
+						ErrorSeverity.ERROR, context);
+			}
+		}
+	}
+
+	/*
+	 * public ModelElement resolveElementWrapper(String typeStr, GTPatternBody
+	 * body) { boolean found = false; ModelElement modelElement = null; Iterator
+	 * iter = body.getElementWrappers().iterator(); while (!found &&
+	 * iter.hasNext()) { modelElement = (ModelElement) iter.next(); } return
+	 * null; }
+	 */
+
+	// public void typeChecking(Machine machine) {
+	// // Processing each GTPattern defined in the machine
+	// for (Iterator iter = machine.getGtPatternDefinitions().iterator();
+	// iter.hasNext();) {
+	// GTPattern pattern = (GTPattern) iter.next();
+	// for (Iterator iter2 = pattern.getPatternBodies().iterator();
+	// iter2.hasNext();) {
+	// GTPatternBody body = (GTPatternBody) iter2.next();
+
+	// }
+
+	// }
+	// }
+
+	public void resolveEntityTypesInBody(GTPatternBody body) {
+		Entity top = body.getPatternGraph();
+		for (Iterator<?> iter = top.getComponents().iterator(); iter.hasNext();) {
+			Entity entity = (Entity) iter.next();
+			List<String> fqnList = lookupEntityType(getMachine(), entity
+					.getTypeStr());
+			resolveTypeNames(entity, fqnList, body);
+		}
+	}
+
+	// protected Machine lookupMachine(GTPatternBody body) {
+	// GTPattern pattern= body.getHeader();
+	// Machine machine = pattern.getNamespace();
+	// if (machine != null) {
+	// return machine;
+	// }
+	// // If pattern is part of a GTRule
+	// else if (pattern.eContainer() instanceof GTRule) {
+	// GTRule gtRule = (GTRule) pattern.eContainer();
+	// return gtRule.getNamespace();
+	// }
+	// // If pattern is defined as a negative pattern of another pattern body
+	// else if (pattern.eContainer() instanceof GTPatternBody) {
+	// GTPatternBody parentBody = (GTPatternBody) pattern.eContainer();
+	// return lookupMachine(parentBody);
+	// }
+	// return null;
+	// }
+
+	public void resolveRelationTypesInBody(GTPatternBody body) {
+		// Resolve the types of dangling relations
+		for (Iterator<?> iter = body.getDanglingRelations().iterator(); iter
+				.hasNext();) {
+			Relation relation = (Relation) iter.next();
+			// Resolving type strings
+			List<String> fqnList = lookupRelationType(getMachine(), relation
+					.getTypeStr());
+			resolveTypeNames(relation, fqnList, body);
+			// Type checking for the end of relations
+			checkRelationEndTypes(relation);
+		}
+
+		// Resolve types of relations leading out from an entity
+		Entity top = body.getPatternGraph();
+		for (Iterator<?> iter = top.getComponents().iterator(); iter.hasNext();) {
+			Entity entity = (Entity) iter.next();
+			checkRelationsFrom(body, entity);
+		}
+	}
+
+	private void checkRelationsFrom(GTPatternBody body, ModelElement element) {
+		for (Iterator<?> iter2 = element.getRelationsFrom().iterator(); iter2
+				.hasNext();) {
+			Relation relation = (Relation) iter2.next();
+			// Resolving type names
+			List<String> fqnList2 = lookupRelationType(getMachine(), relation
+					.getTypeStr());
+			resolveTypeNames(relation, fqnList2, body);
+			// Type checking for the end of relations
+			checkRelationEndTypes(relation);
+			checkRelationsFrom(body, relation);
+		}
+	}
+
+	private class TypeInfo {
+		boolean isValid;
+		IModelElement type;
+
+		public TypeInfo(boolean isValid, IModelElement type) {
+			this.isValid = isValid;
+			this.type = type;
+		}
+	}
+
+	/**
+	 * Calculates the type of a model element while fulfilling a type equality
+	 * constraint.
+	 * @param element
+	 * @param expectedType
+	 * @return
+	 */
+	private TypeInfo calculateVariableType(ModelElement element,
+			IModelElement expectedType) {
+		boolean found = false;
+		Iterator<?> it = element.getType().iterator();
+		IModelElement actualType = null;
+		while (!found && it.hasNext()) {
+			ModelElement typeSrc = (ModelElement) it.next();
+			// Seeking for the actual VPM representation of the type
+			actualType = modelManager
+					.getElementByName(typeSrc.getRealElement());
+			// If the source of the relation type is a supertype of the expected
+			// vpmTypeOfSrcElementInPattern
+			// -> proper type found
+			if (actualType != null) {
+				if ((expectedType == actualType || expectedType
+						.isSupertypeOf(actualType))) {
+					found = true;
+				}
+			}
+		}
+		return new TypeInfo(found, actualType);
+	}
+
+	/**
+	 * Checking that both ends of a relation are appropriately typed The source
+	 * (target) end of the type of a relation should be a supertype or exactly
+	 * the same type as the type of the source model element. Formally, if
+	 * type() denote the type of a model element and src() and trg() denote its
+	 * source and target end, then src(type(r)) >= type(src(r)) and trg(type(r))
+	 * >= type(trg(r))
+	 * @param relation
+	 */
+	private void checkRelationEndTypes(Relation relation) {
+		if (!relation.getType().isEmpty()) {
+			// TODO: Type checking for multiple types
+			Relation typeRel = (Relation) relation.getType().get(0);
+			IRelation vpmTypeOfRelInPattern = modelManager
+					.getRelationByName(typeRel.getRealElement());
+			// If there is a VPM relation corresponding to the type string
+			if (vpmTypeOfRelInPattern != null) {
+				// Type checking the source model element
+				if (relation.getFrom() != null) {
+					// Accessing the source element of the relation
+					ModelElement source = relation.getFrom();
+					if (!source.getType().isEmpty()) {
+						TypeInfo info = calculateVariableType(source,
+								vpmTypeOfRelInPattern.getFrom());
+						if (!info.isValid) {
+							IModelElement vpmTypeOfSrcElementInPattern = info.type;
+							String expectedTypeStr = vpmTypeOfRelInPattern
+									.getFrom().getFullyQualifiedName();
+							if (vpmTypeOfSrcElementInPattern != null) {
+								String actualTypeStr = vpmTypeOfSrcElementInPattern
+										.getFullyQualifiedName();
+								String[] context = new String[] {
+										actualTypeStr, expectedTypeStr };
+								addReferenceResolutionError(
+										relation.getAnnotations(),
+										VTCLMessages.VTCLValidationErrorCodes_RELATION_SRC_TYPE_ERROR,
+										ErrorSeverity.ERROR, context);
+							} else {
+								addReferenceResolutionError(
+										relation.getAnnotations(),
+										VTCLMessages.VTCLValidationErrorCodes_SOURCE_UNRESOLVABLE,
+										ErrorSeverity.WARNING, new String[0]);
+							}
+						}
+					}
+				}
+				// Type checking the target model element
+				if (relation.getTo() != null) {
+					ModelElement target = relation.getTo();
+					if (!target.getType().isEmpty()) {
+						TypeInfo info = calculateVariableType(target,
+								vpmTypeOfRelInPattern.getTo());
+						if (!info.isValid) {
+							IModelElement vpmTypeOfTrgElementInPattern = info.type;
+							String expectedTypeStr = vpmTypeOfRelInPattern
+									.getTo().getFullyQualifiedName();
+							if (vpmTypeOfTrgElementInPattern != null) {
+								String actualTypeStr = vpmTypeOfTrgElementInPattern
+										.getFullyQualifiedName();
+								String[] context = new String[] {
+										actualTypeStr, expectedTypeStr };
+								addReferenceResolutionError(
+										relation.getAnnotations(),
+										VTCLMessages.VTCLValidationErrorCodes_RELATION_TRG_TYPE_ERROR,
+										ErrorSeverity.ERROR, context);
+							} else {
+								addReferenceResolutionError(
+										relation.getAnnotations(),
+										VTCLMessages.VTCLValidationErrorCodes_TARGET_UNRESOLVABLE,
+										ErrorSeverity.WARNING, new String[0]);
+							}
+
+						}
+
+					}
+				}
+			}
+
+		}
+	}
+
+	/**
+	 * Resolves the types used in an {@link EntityCreateRule} or a
+	 * {@link RelationCreateRule}.
+	 * @param rule
+	 *            : The {@link ElementCreateRule} to be resolved
+	 * @param typeStr
+	 *            : The string representation of the type of the element to be
+	 *            created
+	 */
+	public void resolveTypesInASMRules(ElementCreateRule rule, String typeStr) {
+		List<String> fqnList = null;
+		if (rule instanceof EntityCreateRule) {
+			fqnList = lookupEntityType(getMachine(), typeStr);
+		} else if (rule instanceof RelationCreateRule) {
+			fqnList = lookupRelationType(getMachine(), typeStr);
+		}
+		if (fqnList != null) {
+			// If the type can be resolved uniquely: change the type in
+			// ElementReference
+			if (fqnList.size() == 1) {
+				ElementReference elemRef = (ElementReference) rule.getType();
+				Constant typeCons = (Constant) elemRef.getArgument();
+				typeCons.setValue(fqnList.get(0));
+			}
+			// If there are multiple resolutions
+			if (fqnList.size() > 1) {
+				// Collect all possible names
+				String[] context = new String[fqnList.size()];
+				for (int i = 0; i < fqnList.size(); i++) {
+					context[i] = fqnList.get(i);
+				}
+
+				addReferenceResolutionError(
+						rule.getAnnotations(),
+						VTCLMessages.VTCLValidationErrorCodes_AMBIGUOUS_TYPE_RESOLUTION,
+						ErrorSeverity.ERROR, context);
+			}
+			// If the type cannot be resolved
+			else if (fqnList.size() == 0) {
+				if (rule instanceof EntityCreateRule) {
+					addReferenceResolutionError(
+							rule.getAnnotations(),
+							VTCLMessages.VTCLValidationErrorCodes_ENTITY_TYPE_UNRESOLVABLE,
+							ErrorSeverity.ERROR, new String[] {}); // empty
+					// context
+
+				} else if (rule instanceof RelationCreateRule) {
+					addReferenceResolutionError(
+							rule.getAnnotations(),
+							VTCLMessages.VTCLValidationErrorCodes_RELATION_TYPE_UNRESOLVABLE,
+							ErrorSeverity.ERROR, new String[] {}); // empty
+					// context
+				}
+			}
+		}
+
+	}
+
+	private void resolveTypeNames(AnnotatedElement element, List<String> fqnList) {
+		resolveTypeNames(element, fqnList, null);
+	}
+
+	private void resolveTypeNames(AnnotatedElement element,
+			List<String> fqnList, GTPatternBody body) {
+		// If the type can be resolved
+		if (fqnList.size() == 1) {
+			if (element instanceof Entity) {
+				Entity entity = (Entity) element;
+				resolveEntity(entity, fqnList.get(0), body);
+			} else if (element instanceof Relation) {
+				Relation relation = (Relation) element;
+				resolveRelation(relation, fqnList.get(0), body);
+			} else if (element instanceof Variable) {
+				Variable variable = (Variable) element;
+				resolveAsmVariableType(variable, fqnList.get(0));
+			} else if (element instanceof ASMFunction) {
+				ASMFunction asmFun = (ASMFunction) element;
+				resolveAsmFunctionType(asmFun, fqnList.get(0));
+			} else if (element instanceof TypeConstant) {
+				TypeConstant typeConst = (TypeConstant) element;
+				resolveTypeConstantType(typeConst, fqnList.get(0));
+			}
+		}
+		// If there are multiple resolutions
+		else if (fqnList.size() > 1) {
+			// Collect all possible names
+			String[] context = new String[fqnList.size()];
+			for (int i = 0; i < fqnList.size(); i++) {
+				context[i] = fqnList.get(i);
+			}
+			addReferenceResolutionError(
+					element.getAnnotations(),
+					VTCLMessages.VTCLValidationErrorCodes_AMBIGUOUS_TYPE_RESOLUTION,
+					ErrorSeverity.ERROR, context);
+		}
+		// If the type cannot be resolved
+		else if (fqnList.size() == 0) {
+			if (element instanceof Entity) {
+				Entity entity = (Entity) element;
+				addReferenceResolutionError(
+						entity.getAnnotations(),
+						VTCLMessages.VTCLValidationErrorCodes_ENTITY_TYPE_UNRESOLVABLE,
+						ErrorSeverity.ERROR, new String[] {}); // empty context
+
+			} else if (element instanceof Relation) {
+				Relation relation = (Relation) element;
+				addReferenceResolutionError(
+						relation.getAnnotations(),
+						VTCLMessages.VTCLValidationErrorCodes_RELATION_TYPE_UNRESOLVABLE,
+						ErrorSeverity.ERROR, new String[] {}); // empty context
+			} else if (element instanceof Variable) {
+				Variable variable = (Variable) element;
+				String[] context = new String[] { variable.getName() };
+				addReferenceResolutionError(
+						variable.getVariableType().getAnnotations(),
+						VTCLMessages.VTCLValidationErrorCodes_VARIABLE_TYPE_UNRESOLVABLE,
+						ErrorSeverity.ERROR, context);
+			} else if (element instanceof ASMFunction) {
+				ASMFunction asmFun = (ASMFunction) element;
+				String[] context = new String[] { asmFun.getName() };
+				addReferenceResolutionError(
+						asmFun.getReturnType().getAnnotations(),
+						VTCLMessages.VTCLValidationErrorCodes_ASMFUN_TYPE_UNRESOLVABLE,
+						ErrorSeverity.ERROR, context);
+			}
+		}
+	}
+
+	private void resolveTypeConstantType(TypeConstant typeConst, String fqn) {
+		if (!fqn.equals("entity") && !fqn.equals("vpm.entity")
+				&& !fqn.equals("ENTITY") && !fqn.equals("relation")
+				&& !fqn.equals("vpm.entity.relation")
+				&& !fqn.equals("RELATION")) {
+			if (typeConst != null) {
+				typeConst.setFqn(fqn);
+			}
+		} else {
+			typeConst.setFqn(typeConst.getName());
+		}
+	}
+
+	private void resolveAsmFunctionType(ASMFunction asmFun, String fqn) {
+		if (!fqn.equals("entity") && !fqn.equals("vpm.entity")
+				&& !fqn.equals("relation")
+				&& !fqn.equals("vpm.entity.relation")) {
+			TypeConstant typeConst = asmFun.getReturnType();
+			if (typeConst != null) {
+				typeConst.setFqn(fqn);
+			}
+		}
+
+	}
+
+	private void resolveAsmVariableType(Variable variable, String fqn) {
+		if (!fqn.equals("entity") && !fqn.equals("vpm.entity")
+				&& !fqn.equals("relation")
+				&& !fqn.equals("vpm.entity.relation")) {
+			TypeConstant typeConst = variable.getVariableType();
+			if (typeConst != null) {
+				typeConst.setFqn(fqn);
+			}
+		}
+	}
+
+	private void resolveEntity(Entity entity, String fqn, GTPatternBody body) {
+		if (!fqn.contentEquals(VTCLTypeNameConstants.TOP)
+				&& !fqn.contentEquals(VTCLTypeNameConstants.ENTITY)
+				&& !fqn.equals("entity") && !fqn.equals("vpm.entity")) {
+			Entity typeEntity = (Entity) resolveElementInElementWrapper(fqn,
+					body, true);
+			if (typeEntity != null) {
+				// Adding the type
+				entity.getType().add(typeEntity);
+				// Adding a TypeOf element required by the pattern matcher
+				TypeOf relship = EditmodelFactory.eINSTANCE.createTypeOf();
+				// Setting the type
+				relship.setSupplier(typeEntity);
+				relship.setSupplierStr(typeEntity.getName());
+				// Setting the instance
+				relship.setClient(entity);
+				relship.setClientStr(entity.getName());
+			}
+		}
+	}
+
+	private void resolveRelation(Relation relation, String fqn,
+			GTPatternBody body) {
+		if (!fqn.contentEquals(VTCLTypeNameConstants.TOP)
+				&& !fqn.contentEquals(VTCLTypeNameConstants.RELATION)
+				&& !fqn.equals("relation")
+				&& !fqn.equals("vpm.entity.relation")) {
+			Relation typeRelation = (Relation) resolveElementInElementWrapper(
+					fqn, body, false);
+			if (typeRelation != null) {
+				// Adding the type
+				relation.getType().add(typeRelation);
+				// Adding a TypeOf element required by the pattern matcher
+				TypeOf relship = EditmodelFactory.eINSTANCE.createTypeOf();
+				// Setting the type
+				relship.setSupplier(typeRelation);
+				relship.setSupplierStr(typeRelation.getName());
+				// Setting the instance
+				relship.setClient(relation);
+				relship.setClientStr(relation.getName());
+			}
+		}
+	}
+
+	private ModelElement resolveElementInElementWrapper(String fqn,
+			GTPatternBody body, boolean isEntity) {
+		ModelElement element = lookupElementWrapperInBody(fqn, body
+				.getElementWrappers());
+		if (element == null) {
+			IModelElement type = modelManager.getElementByName(fqn);
+			if (type != null && type.isEntity()) {
+				Entity typeEntity = EditmodelFactory.eINSTANCE.createEntity();
+				typeEntity.setRealElement(fqn);
+				typeEntity.setName(fqn);
+				typeEntity.setTypeStr(fqn);
+				body.getElementWrappers().add(typeEntity);
+				return typeEntity;
+			} else if (type != null && type.isRelation()) {
+				Relation typeRelation = EditmodelFactory.eINSTANCE
+						.createRelation();
+				typeRelation.setRealElement(fqn);
+				typeRelation.setName(fqn);
+				typeRelation.setTypeStr(fqn);
+				body.getElementWrappers().add(typeRelation);
+				return typeRelation;
+			}
+		}
+		return element;
+	}
+
+	// -------------------------- Lookup methods ----------------------------
+
+	/**
+	 * Returns a local {@link PatternVariable} definition in a
+	 * {@link GTPatternBody} (if any) having a name corresponding to varStr. If
+	 * multiple variables have the same name in GTRule, this error is ignored
+	 * here.
+	 * @param varStr
+	 *            : String, the name of the variable we are seeking
+	 * @param body
+	 *            : {@link GTPatternBody} a graph pattern
+	 * @return varDef : {@link Variable}, which is found in body
+	 */
+	public PatternVariable lookupVariableDefByName(String varStr,
+			GTPatternBody body) {
+		// Skip lookup if the variable reference starts with '_' character
+		if (varStr.charAt(0) == '_') return null;
+		for (PatternVariable varDef : body.getHeader().getSymParameters()) {
+			if (varStr.equals(varDef.getName())) return varDef;
+		}
+		for (PatternVariable varDef : body.getLocalVariables()) {
+			if (varStr.equals(varDef.getName())) return varDef;
+		}
+		return null;
+	}
+
+	/**
+	 * Returns a local {@link Variable} definition in a {@link GTRule} (if any)
+	 * having a name corresponding to varStr. If multiple variables have the
+	 * same name in GTRule, this error is ignored here.
+	 * @param varStr
+	 *            : String, the name of the variable we are seeking
+	 * @param rule
+	 *            : {@link GTRule} a graph transformation rule
+	 * @return varDef : the first {@link Variable} with proper name in GTRule
+	 *         (if found)
+	 */
+	public Variable lookupVariableDefByName(String varStr, GTRule rule) {
+		for (Variable varDef : rule.getLocalVariables()) {
+			if (varStr.equals(varDef.getName())) return varDef;
+		}
+		return null;
+	}
+
+	/**
+	 * Returns a {@link VariableReference} corresponding to a {@link VPMElement}
+	 * (if any) having a name corresponding to varStr. If multiple variables
+	 * have the same name in GTRule, this error is ignored here.
+	 * @param varStr
+	 *            : String, the name of the variable we are seeking
+	 * @param localElement
+	 *            : a local {@link VPMElement}
+	 * @return varDef : the first {@link VariableReference} with corresponding
+	 *         name in {@link VPMElement} (if found)
+	 */
+	public VariableReference lookupVariableRefByName(String varStr,
+			VPMElement localElement) {
+		for (VariableReference varRef : localElement.getVariableReferences()) {
+			if (varStr.equals(varRef.getName())) return varRef;
+		}
+		return null;
+	}
+
+	/**
+	 * Traverses the call hierarchy of ASMRuleInvocations in order to resolve
+	 * the VariableReference with an name varName
+	 * @param varName
+	 *            : the name of the variable reference to be resolved
+	 * @param ruleInvoc
+	 *            : the current ASMRuleInvocation
+	 * @return The resolved variable (definition)
+	 */
+
+	public Variable traverseCallHierarchy(String varName,
+			ASMRuleInvocation ruleInvoc) {
+		Variable var = null;
+		// Try to find Variable locally in the lists of localVariables
+		if (ruleInvoc instanceof BlockRule) {
+			BlockRule rule = (BlockRule) ruleInvoc;
+			var = lookupVariableDefInRule(varName, rule.getLocalVariables());
+		}
+
+		// If the variable is not found locally, traverse recursively up in the
+		// call hierarchy
+		if (var == null && ruleInvoc.getCaller() != null) {
+			return traverseCallHierarchy(varName, ruleInvoc.getCaller());
+		}
+		// If it is already the body of an ASMRule, lookup in rule parameter
+		// list
+		else if (var == null && ruleInvoc.getAsmRule() != null) {
+			Rule asmRule = ruleInvoc.getAsmRule();
+			var = lookupVariableDefInRule(varName, asmRule.getLocalVariables());
+		}
+		// An action part of the GT rule is reached (no link to the GTRule
+		// itself)
+		else if (var == null && ruleInvoc.getAsmRule() == null) {
+			GTRule gtRule = actionRuleMap.get(ruleInvoc);
+			if (gtRule != null) {
+				var = lookupVariableDefInRule(varName, gtRule
+						.getLocalVariables());
+			}
+		}
+		return var;
+	}
+
+	/**
+	 * Returns a local {@link Variable} definition in an ASM Rule (if any)
+	 * having a name corresponding to varName. If multiple variables have the
+	 * same name in Rule, this error is ignored here.
+	 * @param varName
+	 *            : String, the name of the variable we are seeking
+	 * @param list
+	 *            : List of {@link Variable} definitions
+	 * @return varDef : the first {@link Variable} in the list (if found)
+	 */
+	protected Variable lookupVariableDefInRule(String varName, List<Variable> list) {
+		for (Variable varDef : list) {
+			if (varName.equals(varDef.getName())) return varDef;
+		}
+		return null;
+	}
+
+	/**
+	 * Returns a {@link GTPattern} defined in a {@link Machine} (if any) having
+	 * a name corresponding to patternName.
+	 * @param patternName
+	 *            : String, the name of the {@link GTPattern} we are seeking
+	 * @param arity
+	 * @param machine
+	 *            : {@link Machine} we are seeking in
+	 * @return patternDef : the first {@link GTPattern} (if found)
+	 */
+	public GTPattern lookupGTPattern(String patternName, int arity,
+			Machine machine) {
+		for (GTPattern patternDef : machine.getGtPatternDefinitions()) {
+			if ((patternName.equals(patternDef.getFqn()) || patternName
+					.equals(patternDef.getName()))
+					&& arity == patternDef.getSymParameters().size()) {
+				return patternDef;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns a {@link GTRule} defined in a {@link Machine} (if any) having a
+	 * name corresponding to ruleName.
+	 * @param ruleName
+	 *            : String, the name of the {@link GTRule} we are seeking
+	 * @param arity
+	 * @param machine
+	 *            : {@link Machine} we are seeking in
+	 * @return gtRuleDef : the first {@link GTRule} in machine (if found)
+	 */
+	public GTRule lookupGTRule(String ruleName, int arity, Machine machine) {
+		for (GTRule gtRuleDef : machine.getGtRuleDefinitions()) {
+			if ((ruleName.equals(gtRuleDef.getFqn()) || ruleName
+					.equals(gtRuleDef.getName()))
+					&& arity == gtRuleDef.getSymParameters().size()) {
+				return gtRuleDef;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns an ASM {@link Rule} defined in a {@link Machine} (if any) having
+	 * a name corresponding to ruleName.
+	 * @param ruleName
+	 *            : String, the name of the ASM {@link Rule} we are seeking
+	 * @param arity
+	 * @param machine
+	 *            : {@link Machine} we are seeking in
+	 * @return ruleDef : the first {@link Rule} in machine (if found)
+	 */
+	public Rule lookupAsmRule(String ruleName, int arity, Machine machine) {
+		for (Rule ruleDef : machine.getAsmRuleDefinitions()) {
+			if ((ruleName.equals(ruleDef.getFqn()) || ruleName.equals(ruleDef
+					.getName()))
+					&& arity == ruleDef.getSymParameters().size()) {
+				return ruleDef;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns an {@link ASMFunction} defined in a {@link Machine} (if any)
+	 * having a name corresponding to the String asmFunName.
+	 * @param asmFunName
+	 *            : String, the name of the {@link ASMFunction} we are seeking
+	 * @param arity
+	 * @param machine
+	 *            : {@link Machine} we are seeking in
+	 * @param isRValue
+	 *            : denotes if the ASMFunction is used as a right value in a
+	 *            term
+	 * @return asmFunDef : the first {@link ASMFunction} in machine (if found)
+	 */
+	public ASMFunction lookupAsmFunction(String asmFunName, int arity,
+			Machine machine, boolean isRValue) {
+		for (ASMFunction asmFunDef : machine.getAsmFunctionDefinitions()) {
+			if ((asmFunName.equals(asmFunDef.getFqn()) || asmFunName
+					.equals(asmFunDef.getName()))
+					&& arity == asmFunDef.getArity()) {
+				return asmFunDef;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns true if there is a native ASM function having a name
+	 * corresponding to the String asmFunName. Native ASM functions can only be
+	 * used as a right value
+	 * @param asmFunName
+	 *            : String, the name of the ASMNativeFunction we are seeking
+	 * @return true, if there is a native ASM function with the corresponding
+	 *         name
+	 */
+	public boolean lookupNativeAsmFunction(String asmFunName) {
+		for (ASMNativeFunction nativeFunction : getNativeFunctions()) {
+			if (asmFunName.equals(nativeFunction.getName())) return true;
+		}
+		return false;
+	}
+
+	/**
+	 * Returns a {@link ModelElement} listed in elementWrappers of a pattern
+	 * body (if any) having a name corresponding to the String fqn.
+	 * @param fqn
+	 *            : Fully qualified name of the element being sought
+	 * @param elementWrappers
+	 *            : List of {@link ModelElement}s (Entities and Relations)
+	 * @return {@link ModelElement}
+	 */
+	public ModelElement lookupElementWrapperInBody(String fqn,
+			List<ModelElement> elementWrappers) {
+		for (ModelElement element : elementWrappers) {
+			if (fqn.equals(element.getName())) return element;
+		}
+		return null;
+	}
+
+
+
+	/**
+	 * Searches for a VPM equivalent of the "type" parameter in the model space.
+	 * Type is tried to be resolved first as an absolute FQN and then as a
+	 * relative FQN (prefixed by the import declarations of the module)
+	 * @param machine
+	 *            : {@link Machine}
+	 * @param type
+	 *            : String representation of the type to be resolved
+	 * @return List<String> : the fully qualified name of the VPM elements found
+	 */
+	public List<String> lookupEntityType(Machine machine, String type) {
+		List<String> nameList = new ArrayList<String>();
+		// If the type name is "entity", handle differently
+		if (type.equals("entity") || type.equals("vpm.entity")
+				|| type.equals("ENTITY")) {
+			// nameList.add(type);
+			nameList.add("ENTITY");
+			return nameList;
+		}
+		// Accessing the container module
+		Module module = machine.getModule();
+		// It is irrelevant if the type of the entity is a local name or FQN
+		// Try to resolve type name as an fqn
+		IEntity e = modelManager.getEntityByName(type);
+		if (e != null) {
+			nameList.add(e.getFullyQualifiedName());
+			return nameList;
+		}
+
+		// check in imports
+		for (ImportDeclaration id : module.getImport()) {
+			String fqn = fqn(id.getImportValue(), type);
+			e = modelManager.getEntityByName(fqn);
+			if (e != null) {
+				nameList.add(e.getFullyQualifiedName());
+			}
+		}
+		return nameList;
+	}
+
+	/**
+	 * Searches for a VPM equivalent of the "type" parameter in the model space.
+	 * Type is tried to be resolved first as an absolute FQN and then as a
+	 * relative FQN (prefixed by the import declarations of the module)
+	 * @param machine
+	 *            : {@link Machine}
+	 * @param type
+	 *            : String representation of the type to be resolved
+	 * @return List<String> : the fully qualified name of the VPM elements found
+	 */
+	public List<String> lookupRelationType(Machine machine, String type) {
+		List<String> nameList = new ArrayList<String>();
+		// If the type name is "relation", handle differently
+		if (type.equals("relation") || type.equals("vpm.entity.relation")
+				|| type.equals("RELATION")) {
+			// nameList.add(type);
+			nameList.add("RELATION");
+			return nameList;
+		}
+		// Accessing the container module
+		Module module = (Module) machine.eContainer();
+		// Try to resolve type name as an fqn
+		IRelation r = modelManager.getRelationByName(type);
+		if (r != null) {
+			nameList.add(r.getFullyQualifiedName());
+		}
+
+		// check it also in imports, and report
+		for (ImportDeclaration id : module.getImport()) {
+			String fqn = fqn(id.getImportValue(), type);
+			r = modelManager.getRelationByName(fqn);
+			if (r != null) {
+				nameList.add(r.getFullyQualifiedName());
+			}
+		}
+		return nameList;
+	}
+
+	/**
+	 * Returns the fully qualified name concatenated from <b>ns</b> and <b>n</b>
+	 * @param ns
+	 *            : The namespace string
+	 * @param n
+	 *            : The local name
+	 * @return the string concatenated as <b>ns+"."+n</b>
+	 */
+	private String fqn(String ns, String n) {
+		if (ns == null) return n;
+		if (ns.length() == 0) return n;
+		// if (n.indexOf('.')>=0) return n;
+		return ns + "." + n;
+	}
+
+	// public Machine lookupMachine(ASMRuleInvocation ruleInvoc) {
+	// // If the variable is not found locally, traverse recursively up in the
+	// call hierarchy
+	// if (ruleInvoc.getCaller() != null) {
+	// return lookupMachine(ruleInvoc.getCaller());
+	// }
+	// // If it is already the body of an ASMRule, lookup in rule parameter list
+	// else if (ruleInvoc.getAsmRule() != null) {
+	// Rule asmRule = ruleInvoc.getAsmRule();
+	// return asmRule.getNamespace();
+	// }
+	// // An action part of the GT rule is reached (no link to the GTRule
+	// itself)
+	// else if (ruleInvoc.getAsmRule() == null) {
+	// GTRule gtRule = actionRuleMap.get(ruleInvoc);
+	// if (gtRule != null) {
+	// return gtRule.getNamespace();
+	// }
+	// }
+	// return null;
+	// }
+
+	// ------------- Additional validations ---------------------
+
+	/**
+	 * Runs validations to reveal multiply defined variables in machine
+	 * @param machine
+	 *            : the {@link Machine} being validated
+	 */
+	public void validateDistinctVariables(Machine machine) {
+		for (Iterator<?> iter = machine.getAsmRuleDefinitions().iterator(); iter
+				.hasNext();) {
+			Rule asmRule = (Rule) iter.next();
+			validateDistinctVariablesAsmRule(asmRule);
+		}
+
+		for (Iterator<?> iter = machine.getGtRuleDefinitions().iterator(); iter
+				.hasNext();) {
+			GTRule gtRule = (GTRule) iter.next();
+			validateDistinctVariablesGTRule(gtRule);
+			validatePostcondition(gtRule);
+		}
+
+		for (Iterator<?> iter = machine.getGtPatternDefinitions().iterator(); iter
+				.hasNext();) {
+			GTPattern pattern = (GTPattern) iter.next();
+			validateDistinctVariablesPattern(pattern);
+
+		}
+	}
+
+	/**
+	 * Validates if the postcondition of gtRule does not contain OR patterns,
+	 * check expressions or negative patterns.
+	 * @param gtRule
+	 *            : {@link GTRule} to be checked
+	 */
+	private void validatePostcondition(GTRule gtRule) {
+		GTPatternCall rhsCall = gtRule.getPostcondition();
+		if (rhsCall != null) {
+			GTPattern rhs = rhsCall.getCalledPattern();
+			if (rhs != null) {
+				if (rhs.getPatternBodies().size() > 1) {
+					String[] context = new String[] { rhs.getName(),
+							gtRule.getName() };
+					addReferenceResolutionError(
+							rhs.getAnnotations(),
+							VTCLMessages.VTCLValidationErrorCodes_POSTCONDITION_OR_PATTERN_NOT_ALLOWED,
+							ErrorSeverity.ERROR, context);
+				}
+				for (Iterator<?> it = rhs.getPatternBodies().iterator(); it
+						.hasNext();) {
+					GTPatternBody body = (GTPatternBody) it.next();
+					for (Iterator<?> it2 = body.getCheckExpressions()
+							.iterator(); it2.hasNext();) {
+						Term term = (Term) it2.next();
+						String[] context = new String[] { rhs.getName(),
+								gtRule.getName() };
+						addReferenceResolutionError(
+								term.getAnnotations(),
+								VTCLMessages.VTCLValidationErrorCodes_POSTCONDITION_IGNORE_CHECK,
+								ErrorSeverity.WARNING, context);
+					}
+					for (Iterator<?> it3 = body.getNegativePatterns()
+							.iterator(); it3.hasNext();) {
+						GTPatternCall gtCall = (GTPatternCall) it3.next();
+						String[] context = new String[] { rhs.getName(),
+								gtRule.getName() };
+						addReferenceResolutionError(
+								gtCall.getAnnotations(),
+								VTCLMessages.VTCLValidationErrorCodes_POSTCONDITION_IGNORE_NAC,
+								ErrorSeverity.WARNING, context);
+
+					}
+
+				}
+			}
+
+		}
+
+	}
+
+	/**
+	 * All variables of a GTRule should be named differently. This is checked
+	 * for locally defined variables, and validations are initiated for each
+	 * locally defined subpattern and the action part
+	 * @param gtRule
+	 *            : GTRule to be checked for distinctness of variable names
+	 */
+
+	public void validateDistinctVariablesGTRule(GTRule gtRule) {
+		Set<String> variableNames = new HashSet<String>();
+		// Check rule parameters for distinct variables
+		for (Iterator<?> iter = gtRule.getLocalVariables().iterator(); iter
+				.hasNext();) {
+			Variable varDef = (Variable) iter.next();
+			checkNameExistence(
+					varDef,
+					variableNames,
+					VTCLMessages.VTCLValidationErrorCodes_DUPLICATE_GTVAR_DEFINITION);
+			checkVariableIsInUse(varDef,
+					VTCLMessages.VTCLValidationErrorCodes_UNUSED_VARIABLE);
+		}
+		// Check the action part
+		if (gtRule.getAction() != null) {
+			checkSubruleInvocations(gtRule.getAction(), variableNames);
+		}
+
+		// Check distinct variables in subpatterns
+		for (Iterator<?> iter = gtRule.getGtPatternDefinitions().iterator(); iter
+				.hasNext();) {
+			GTPattern pattern = (GTPattern) iter.next();
+			validateDistinctVariablesPattern(pattern);
+		}
+	}
+
+	/**
+	 * All variables of a GTPattern should be named differently. This is checked
+	 * for locally defined variables in each pattern body, and validations are
+	 * initiated for each locally defined subpattern
+	 * @param pattern
+	 *            : GTPattern to be checked for distinctness of variable names
+	 */
+	public void validateDistinctVariablesPattern(GTPattern pattern) {
+		Set<String> variableNames = new HashSet<String>();
+		// Check rule parameters for distinct variables
+		for (PatternVariable varDef : pattern.getSymParameters()) {
+			checkNameExistence(
+					varDef,
+					variableNames,
+					VTCLMessages.VTCLValidationErrorCodes_DUPLICATE_PATTERNVAR_DEFINITION);
+			checkVariableIsInUse(varDef,
+					VTCLMessages.VTCLValidationErrorCodes_UNUSED_VARIABLE);
+		}
+		Set<String> localVarNames = new HashSet<String>();
+		for (GTPatternBody body : pattern.getPatternBodies()) {
+			// Create a copy of variable names
+			localVarNames.clear();
+			for (String nameStr : variableNames) {
+				localVarNames.add(nameStr);
+			}
+			// Validate the distinctness of local pattern variables
+			for (PatternVariable bodyVarDef : body.getLocalVariables()) {
+				checkNameExistence(
+						bodyVarDef,
+						localVarNames,
+						VTCLMessages.VTCLValidationErrorCodes_DUPLICATE_PATTERNVAR_DEFINITION);
+				checkVariableIsInUse(bodyVarDef,
+						VTCLMessages.VTCLValidationErrorCodes_UNUSED_VARIABLE);
+			}
+			// Validate locally defined subpatterns
+			for (GTPattern subPattern: body.getGtPatternDefinitions()) {
+				validateDistinctVariablesPattern(subPattern);
+			}
+		}
+	}
+
+	/**
+	 * All variables of an ASM rule should be named differently. This is checked
+	 * for local variables of the rule, and recursively, for all subrule
+	 * invocations within the ASM rule. Critical cases are those with local
+	 * variable definitions (LetRule, ChooseRule, and ForallRule) and those that
+	 * call subrule(s)
+	 * @param asmRule
+	 *            : an ASM {@link Rule}
+	 */
+	public void validateDistinctVariablesAsmRule(Rule asmRule) {
+		Set<String> varNames = new HashSet<String>();
+		// Check rule parameters for distinct variables
+		for (Iterator<?> iter = asmRule.getLocalVariables().iterator(); iter
+				.hasNext();) {
+			Variable varDef = (Variable) iter.next();
+			checkNameExistence(
+					varDef,
+					varNames,
+					VTCLMessages.VTCLValidationErrorCodes_DUPLICATE_ASMVAR_DEFINITION);
+			checkVariableIsInUse(varDef,
+					VTCLMessages.VTCLValidationErrorCodes_UNUSED_VARIABLE);
+		}
+		// Check distinct variables in rule body
+		checkSubruleInvocations(asmRule.getBody(), varNames);
+	}
+
+	/**
+	 * Helper function for validateDistinctVariablesAsmRule. It recursively
+	 * traverses all the subrules within the ASM rule
+	 * @param ruleInvoc
+	 *            : The currently processed {@link ASMRuleInvocation}
+	 * @param varNames
+	 *            : The set of variable names obtained up to now
+	 */
+	protected void checkSubruleInvocations(ASMRuleInvocation ruleInvoc,
+			Set<String> varNames) {
+		// Checking variables defined locally -> Let rule, Choose rule, Forall
+		// rule
+		if (ruleInvoc instanceof BlockRule) {
+			BlockRule rule = (BlockRule) ruleInvoc;
+			for (Iterator<?> iter = rule.getLocalVariables().iterator(); iter
+					.hasNext();) {
+				Variable varDef = (Variable) iter.next();
+				checkNameExistence(
+						varDef,
+						varNames,
+						VTCLMessages.VTCLValidationErrorCodes_DUPLICATE_ASMVAR_DEFINITION);
+				checkVariableIsInUse(varDef,
+						VTCLMessages.VTCLValidationErrorCodes_UNUSED_VARIABLE);
+			}
+		}
+		// // Checking that ASM rule is called with proper number of parameters
+		// if (ruleInvoc instanceof CallRule) {
+		// CallRule callRule = (CallRule) ruleInvoc;
+		// Rule ruleDef = callRule.getAsmRule();
+		// if (ruleDef != null) {
+		// if (callRule.getActualParameters().size() !=
+		// ruleDef.getSymParameters().size()) {
+		// modelResolver.addReferenceResolutionError(
+		// callRule.getAnnotations(),
+		// VTCLMessages.VTCLValidationErrorCodes_DUPLICATE_ASMFUN_NAME,
+		// ErrorSeverity.ERROR);
+		// }
+		// }
+
+		// }
+
+		// Recursive call for ConditionalRuleIf to process bodies
+		if (ruleInvoc instanceof ConditionalRuleIf) {
+			ConditionalRuleIf rule = (ConditionalRuleIf) ruleInvoc;
+			ASMRuleInvocation subRule1 = rule.getRuleTrue();
+			if (subRule1 != null) {
+				Set<String> varNamesIf = new HashSet<String>(varNames);
+				checkSubruleInvocations(subRule1, varNamesIf);
+			}
+			ASMRuleInvocation subRule2 = rule.getRuleFalse();
+			if (subRule2 != null) {
+				Set<String> varNamesIf = new HashSet<String>(varNames);
+				checkSubruleInvocations(subRule2, varNamesIf);
+			}
+		}
+		// Recursive call for ConditionalRuleTry to process bodies
+		else if (ruleInvoc instanceof ConditionalRuleTry) {
+			ConditionalRuleTry rule = (ConditionalRuleTry) ruleInvoc;
+			ASMRuleInvocation subRule1 = rule.getRuleToTry();
+			if (subRule1 != null) {
+				Set<String> varNamesTry = new HashSet<String>(varNames);
+				checkSubruleInvocations(subRule1, varNamesTry);
+			}
+			ASMRuleInvocation subRule2 = rule.getRuleElse();
+			if (subRule2 != null) {
+				Set<String> varNamesTry = new HashSet<String>(varNames);
+				checkSubruleInvocations(subRule2, varNamesTry);
+			}
+		}
+		// Recursive call for CompoundRules to process body
+		else if (ruleInvoc instanceof CompoundRule) {
+			CompoundRule rule = (CompoundRule) ruleInvoc;
+			ASMRuleInvocation subRule = rule.getBody();
+			if (subRule != null) {
+				checkSubruleInvocations(subRule, varNames);
+			}
+		}
+		// Recursive call for NestedRules to process subrules
+		else if (ruleInvoc instanceof NestedRule) {
+			NestedRule rule = (NestedRule) ruleInvoc;
+			// Iterate over all subrules
+			for (Iterator<?> iter = rule.getSubrules().iterator(); iter
+					.hasNext();) {
+				ASMRuleInvocation subRule = (ASMRuleInvocation) iter.next();
+				// Store varNames as oldVarNames
+				Set<String> oldVarNames = new HashSet<String>(varNames);
+				// Check subrules
+				checkSubruleInvocations(subRule, varNames);
+				// Restore varNames for next iteration
+				varNames = oldVarNames;
+			}
+		}
+	}
+
+	/**
+	 * Helper function to check if the name of a GTASMElement is not distinct,
+	 * i.e. already contained in names. Name existence is not checked when the
+	 * name of the model element starts with an _ In such a case, an error
+	 * message is reported otherwise, the name of the GTASMElement is added to
+	 * names.
+	 * @param element
+	 *             The current GTASMElement to be checked for existence
+	 * @param names
+	 *             The set of names obtained up to now
+	 * @param errorCode
+	 *             The type of the error message that should be reported
+	 */
+	protected void checkNameExistence(GTASMElement element, Set<String> names,
+			String errorCode) {
+		if (!names.contains(element.getName())) {
+			if (element.getName().charAt(0) != '_') {
+				names.add(element.getName());
+			}
+		} else {
+			String[] context = new String[] { element.getName() };
+			addReferenceResolutionError(element.getAnnotations(), errorCode,
+					ErrorSeverity.ERROR, context);
+		}
+	}
+
+	/**
+	 * Helper function to check if the signature of a GTASMElement (rule,
+	 * pattern, gtrule or ASM function) is not distinct, i.e. already contained
+	 * in names. In such a case, an error message is reported otherwise, the
+	 * signature of the GTASMElement is added to names.
+	 * @param element
+	 *            : The GTASM element currently processed
+	 * @param signature
+	 *            : The signature of the current GTASMElement to be checked for
+	 *            existence
+	 * @param names
+	 *            : The set of signatures obtained up to now
+	 * @param errorCode
+	 *            : The type of the error message that should be reported
+	 */
+	protected void checkSignatureExistence(GTASMElement element,
+			String signature, Set<String> names, String errorCode) {
+		if (!names.contains(signature)) {
+			names.add(signature);
+		} else {
+			String[] context = new String[] { signature };
+			addReferenceResolutionError(element.getAnnotations(), errorCode,
+					ErrorSeverity.ERROR, context);
+		}
+	}
+
+	/**
+	 * Duplicates (name clashes) between ASM functions, GT rules, patterns and
+	 * ASM rules defined within the same Machine.
+	 * @param machine
+	 *            : {@link Machine} to be validated
+	 */
+
+	public void validateNoDuplicateNames(Machine machine) {
+		Set<String> asmFunNames = new HashSet<String>();
+		for (ASMFunction asmFun : machine.getAsmFunctionDefinitions()) {
+			String signature = asmFun.getName() + "/"
+					+ String.valueOf(asmFun.getArity());
+			checkSignatureExistence(asmFun, signature, asmFunNames,
+					VTCLMessages.VTCLValidationErrorCodes_DUPLICATE_ASMFUN_NAME);
+		}
+
+		Set<String> asmRuleNames = new HashSet<String>();
+		for (Rule asmRule : machine.getAsmRuleDefinitions()) {
+			String signature = asmRule.getName() + "/"
+					+ String.valueOf(asmRule.getSymParameters().size());
+			checkSignatureExistence(
+					asmRule,
+					signature,
+					asmRuleNames,
+					VTCLMessages.VTCLValidationErrorCodes_DUPLICATE_ASMRULE_NAME);
+		}
+
+		Set<String> patternNames = new HashSet<String>();
+		for (GTPattern pattern : machine.getGtPatternDefinitions()) {
+			String signature = pattern.getName() + "/"
+					+ String.valueOf(pattern.getSymParameters().size());
+			checkSignatureExistence(
+					pattern,
+					signature,
+					patternNames,
+					VTCLMessages.VTCLValidationErrorCodes_DUPLICATE_PATTERN_NAME);
+		}
+
+		Set<String> gtRuleNames = new HashSet<String>();
+		for (GTRule gtRule : machine.getGtRuleDefinitions()) {
+			String signature = gtRule.getName() + "/"
+					+ String.valueOf(gtRule.getSymParameters().size());
+			checkSignatureExistence(gtRule, signature, gtRuleNames,
+					VTCLMessages.VTCLValidationErrorCodes_DUPLICATE_GTRULE_NAME);
+			Set<String> containedPatternNames = new HashSet<String>();
+			//Check for local pattern name uniquity as well
+			for (GTPattern pattern : gtRule.getGtPatternDefinitions()) {
+				String pSignature = pattern.getName() + "/"
+						+ String.valueOf(pattern.getSymParameters().size());
+				checkSignatureExistence(
+						pattern,
+						pSignature,
+						containedPatternNames,
+						VTCLMessages.VTCLValidationErrorCodes_DUPLICATE_PATTERN_NAME);
+			}
+		}
+	}
+
+	/**
+	 * The initial parameter definitions of an {@link ASMFunction} should always
+	 * correspond to its Arity
+	 * @param asmFun
+	 *            : {@link ASMFunction} to be validated
+	 */
+	public void validateAsmFunctionInitialValues(ASMFunction asmFun) {
+		for (Iterator<?> initIter = asmFun.getInitialValues().iterator(); initIter
+				.hasNext();) {
+			InitialValue initValue = (InitialValue) initIter.next();
+			if (initValue.getLocations().size() != asmFun.getArity()) {
+				addReferenceResolutionError(
+						initValue.getAnnotations(),
+						VTCLMessages.VTCLValidationErrorCodes_ASMFUN_ARITY_INITVALUE_MISMATCH,
+						ErrorSeverity.ERROR, new String[] {});
+			}
+		}
+	}
+
+	/**
+	 * Checks if a model element constant meConst is existing in the model
+	 * space. Issues an error if this is not the case:
+	 * @param meConst
+	 *            : model element constant to be checked
+	 * @return The fully qualified name of the resolved model element, or "" if
+	 *         no such element exists
+	 */
+	public String resolveModelElementConstant(Constant meConst) {
+		// Get the value of the model element constant (FQN of model element)
+		String name = meConst.getValue();
+		// Lookup model element
+		IModelElement element = modelManager.getElementByName(name);
+		// Add type information to the constant
+		if (element != null) {
+			// Type checking
+			String typeStr = typeResolver.lookupType(element);
+			meConst.setType(typeStr);
+			// ValueKind kind = typeResolver.getValueKind(typeStr);
+			meConst.setKind(ValueKind.MODELELEMENT_LITERAL);
+		}
+		// Issue an error message if model element is non-existing
+		else {
+			String[] context = new String[] { name };
+			addReferenceResolutionError(
+					meConst.getAnnotations(),
+					VTCLMessages.VTCLValidationErrorCodes_NONEXISTING_MODELELEM_CONSTANT,
+					ErrorSeverity.ERROR, context);
+			// Add type information
+			meConst.setType(VTCLTypeNameConstants.TOP);
+			meConst.setKind(ValueKind.UNDEF_LITERAL);
+			return "";
+		}
+		// Fully qualified name of model element is retrieved
+		return element.getFullyQualifiedName();
+
+	}
+
+	/**
+	 * Checks if a model element constant meConst is existing in the model
+	 * space. Issues an error if this is not the case:
+	 * @param element
+	 *            : annotated element to be checked
+	 * @param typeStr
+	 *            : the assumed type string
+	 */
+	public void resolveAsmType(AnnotatedElement element, String typeStr) {
+		List<String> fqnList1 = lookupEntityType(getMachine(), typeStr);
+		List<String> fqnList2 = lookupRelationType(getMachine(), typeStr);
+		fqnList1.addAll(fqnList2);
+		resolveTypeNames(element, fqnList1);
+	}
+
+	/**
+	 * Checks if a variable definition is actually referred to by some variable
+	 * references, and issues a warning if it is not the case.
+	 * @param varDef
+	 * @param errorCode
+	 */
+	protected void checkVariableIsInUse(Variable varDef, String errorCode) {
+		if (varDef.getReferences().isEmpty()) {
+			String[] context = new String[] { varDef.getName() };
+			addReferenceResolutionError(varDef.getAnnotations(), errorCode,
+					ErrorSeverity.WARNING, context);
+		}
+	}
+
+	/**
+	 * Reports an error message when a match counter is used in a negative
+	 * pattern call.
+	 * @param patternCall
+	 * @param element
+	 */
+	public void reportInvalidMatchCounter(GTPatternCall patternCall,
+			String element) {
+		String[] context = new String[] { patternCall.getName(), element };
+		addReferenceResolutionError(patternCall.getAnnotations(),
+				VTCLMessages.VTCLValidationErrorCodes_INVALID_MATCH_COUNTER,
+				ErrorSeverity.ERROR, context);
+	}
+
+	/**
+	 * Issues a warning if a formal parameter of a graph pattern does not appear
+	 * in the body (as an entity, a relation or in a pattern variable
+	 * assignment)
+	 * @param body
+	 */
+	public void reportUnusedPatternParameter(GTPatternBody body) {
+		for (Iterator<?> iter = body.getHeader().getSymParameters().iterator(); iter
+				.hasNext();) {
+			PatternVariable varDef = (PatternVariable) iter.next();
+			boolean found = false;
+			Iterator<?> itEnt = body.getPatternGraph().getComponents()
+					.iterator();
+			// Check all entities inside the top-level pattern graph
+			while (!found && itEnt.hasNext()) {
+				Entity ent = (Entity) itEnt.next();
+				if (ent.getName().equals(varDef.getName())) {
+					found = true;
+				}
+				// Check all relations leading out of the entity
+				Iterator<?> itRels = ent.getRelationsFrom().iterator();
+				while (!found && itRels.hasNext()) {
+					Relation rel = (Relation) itRels.next();
+					if (rel.getName().equals(varDef.getName())) {
+						found = true;
+					}
+				}
+			}
+			// Check all (positive) pattern calls
+			for (Iterator<?> itPattCall = body.getCalledPatterns().iterator(); !found
+					&& itPattCall.hasNext();) {
+				GTPatternCall pattCall = (GTPatternCall) itPattCall.next();
+				// Check actual parameters
+				for (Iterator<?> itParams = pattCall.getActualParameters()
+						.iterator(); !found && itParams.hasNext();) {
+					Term param = (Term) itParams.next();
+					// If actual parameter is a VariableReference
+					if (param instanceof VariableReference) {
+						if (param.getName().equals(varDef.getName())) {
+							found = true;
+						}
+					}
+
+				}
+			}
+			// Check all dangling relations
+			for (Iterator<?> itDangRels = body.getDanglingRelations()
+					.iterator(); !found && itDangRels.hasNext();) {
+				Relation rel = (Relation) itDangRels.next();
+				if (rel.getName().equals(varDef.getName())) {
+					found = true;
+				}
+			}
+
+			// Check all pattern variable assignments
+			for (Iterator<?> itPVA = body.getVariableAssignments().iterator(); !found
+					&& itPVA.hasNext();) {
+				PatternVariableAssignment pva = (PatternVariableAssignment) itPVA
+						.next();
+				if (pva.getLeftValue().getName().equals(varDef.getName())) {
+					found = true;
+				}
+				if (pva.getRightValue().getName().equals(varDef.getName())) {
+					found = true;
+				}
+			}
+			// // Check containment constraints
+			// for (Iterator<?> itContCons =
+			// body.getContainmentConstraints().iterator(); !found &&
+			// itContCons.hasNext();) {
+			// ContainmentConstraint contConstr = (ContainmentConstraint)
+			// itContCons.next();
+			// Term parentTerm = (Term) contConstr.getParent();
+			// if (parentTerm instanceof VariableReference) {
+			// if (parentTerm.getName().equals(varDef.getName())) {
+			// found = true;
+			// }
+			// }
+			// }
+			// Issue a warning if no reference is found
+			if (!found) {
+				String[] context = new String[] { varDef.getName() };
+				addReferenceResolutionError(
+						varDef.getAnnotations(),
+						VTCLMessages.VTCLValidationErrorCodes_PATTPARAM_NOT_LOCALLY_DEFINED,
+						ErrorSeverity.WARNING, context);
+			}
+		}
+
+	}
+
+	/**
+	 * Check that the left and right variables are different
+	 * @param varAssign
+	 */
+	public void validatePatternVariableConstraint(
+			PatternVariableConstraint varAssign) {
+		if (varAssign.getLeftValue().getName().equals(
+				varAssign.getRightValue().getName())) {
+			addReferenceResolutionError(
+					varAssign.getAnnotations(),
+					VTCLMessages.VTCLValidationErrorCodes_PATTVVARIABLECONSTRAINT_AMBIGOUS,
+					ErrorSeverity.ERROR, new String[] {}); // Empty context
+		}
+	}
+
+}
diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/CustomTypeJudgementCheck.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/CustomTypeJudgementCheck.java
new file mode 100644
index 0000000..0bdf8bf
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/CustomTypeJudgementCheck.java
@@ -0,0 +1,85 @@
+/**
+* Copyright (c) 2008 - 2010 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*/
+package org.eclipse.viatra2.lpgparser.typechecker;

+

+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Constant;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;
+

+public class CustomTypeJudgementCheck {

+

+	public static final String typeElementReference(IModelManager modelManager, Term operand) {

+		// TODO: Maybe, a sophisticated static analysis could be carried out here

+		if (operand instanceof Constant) {

+			Constant constant = (Constant) operand;

+			return constant.getValue();

+		} else {
+			return VTCLTypeNameConstants.TOP;
+		}

+	}

+

+	/**

+	 * Custom type checking: if operand can be resolved to a metamodel relation

+	 * then returns its source model element as type

+	 * 

+	 * @param modelManager

+	 * @param operand

+	 * @return type of the source model element

+	 */

+	public static final String typeSource(IModelManager modelManager, String operand) {

+		IModelElement element = modelManager.getElementByName(operand); 

+		if (element != null && element instanceof IRelation) {

+			IRelation relation = (IRelation) element;

+			return relation.getFrom().getFullyQualifiedName();

+		}
+		else return VTCLTypeNameConstants.TOP;
+	}

+

+

+	/**

+	 * Custom type checking: if operand can be resolved to a metamodel relation

+	 * then returns its target model element as type

+	 * 

+	 * @param modelManager

+	 * @param operand FQN of a relation

+	 * @return type of the target model element

+	 */

+	public static final String typeTarget(IModelManager modelManager, String operand) {

+		IModelElement element = modelManager.getElementByName(operand); 

+		if (element != null && element instanceof IRelation) {

+			IRelation relation = (IRelation) element;

+			return relation.getFrom().getFullyQualifiedName();

+		}
+		else return VTCLTypeNameConstants.TOP;
+	}

+

+	/**

+	 * Custom type checking: if operand can be resolved to a metamodel relation

+	 * then returns its inverse relation as type

+	 * 

+	 * @param modelManager

+	 * @param operand FQN of a relation

+	 * @return type of the inverse

+	 */

+	public static final String typeInverse(IModelManager modelManager, String operand) {

+		IModelElement element = modelManager.getElementByName(operand); 

+		if (element != null && element instanceof IRelation) {

+			IRelation relation = (IRelation) element;

+			IRelation inverse = relation.getInverse();

+			if (inverse!= null) {

+				return inverse.getFullyQualifiedName();

+			}

+		}
+		return VTCLTypeNameConstants.TOP;
+	}

+}

diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/StringPair.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/StringPair.java
new file mode 100644
index 0000000..7b25daf
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/StringPair.java
@@ -0,0 +1,68 @@
+/**
+* Copyright (c) 2008 - 2010 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*/
+package org.eclipse.viatra2.lpgparser.typechecker;

+

+public class StringPair {

+

+	protected String name;

+	protected String firstArg;

+	

+	

+	

+	public StringPair(String name, String firstArg) {

+		this.name = name;

+		this.firstArg = firstArg;

+	}

+

+

+	public String getName() {

+		return name;

+	}

+

+	public String getFirstArg() {

+		return firstArg;

+	}

+

+

+	@Override

+	public int hashCode() {

+		final int prime = 7919;

+		int result = 1;

+		result = prime * result

+				+ ((firstArg == null) ? 0 : firstArg.hashCode());

+		result = prime * result + ((name == null) ? 0 : name.hashCode());

+		return result;

+	}

+

+

+

+	@Override

+	public boolean equals(Object obj) {

+		if (obj == null){

+			return false;

+		}

+		else if (this == obj) {

+			return true;

+		}

+		if (getClass() != obj.getClass())

+			return false;

+		if (obj instanceof StringPair) {

+			StringPair strTriple = (StringPair) obj;

+			if (strTriple.getName().equals(name) && 

+				strTriple.getFirstArg().equals(firstArg)) {

+				return true;

+			}

+		}

+		return false;

+	}

+	

+	

+}

diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/StringTriple.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/StringTriple.java
new file mode 100644
index 0000000..3128769
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/StringTriple.java
@@ -0,0 +1,74 @@
+/**
+* Copyright (c) 2008 - 2010 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*/
+package org.eclipse.viatra2.lpgparser.typechecker;

+

+public class StringTriple {

+

+	protected String name;

+	protected String firstArg;

+	protected String secondArg;

+	

+	

+	

+	public StringTriple(String name, String firstArg, String secondArg) {

+		this.name = name;

+		this.firstArg = firstArg;

+		this.secondArg = secondArg;

+	}

+

+

+	public String getName() {

+		return name;

+	}

+

+	public String getFirstArg() {

+		return firstArg;

+	}

+

+	public String getSecondArg() {

+		return secondArg;

+	}

+

+

+	@Override

+	public int hashCode() {

+		final int prime = 7919;

+		int result = 1;

+		result = prime * result

+				+ ((firstArg == null) ? 0 : firstArg.hashCode());

+		result = prime * result + ((name == null) ? 0 : name.hashCode());

+		result = prime * result

+				+ ((secondArg == null) ? 0 : secondArg.hashCode());

+		return result;

+	}

+

+	

+	@Override

+	public boolean equals(Object obj) {

+		if (obj == null){

+			return false;

+		}

+		else if (this == obj) {

+			return true;

+		}

+		else if (obj instanceof StringTriple) {

+			StringTriple strTriple = (StringTriple) obj;

+			if (strTriple.getName().equals(name) && 

+				strTriple.getFirstArg().equals(firstArg) && 

+				strTriple.getSecondArg().equals(secondArg)) {

+				return true;

+			}

+		}

+		return false;

+	}

+	

+	

+}

diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/TermTypeChecker.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/TermTypeChecker.java
new file mode 100644
index 0000000..66df2b7
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/TermTypeChecker.java
@@ -0,0 +1,309 @@
+/**

+* Copyright (c) 2007 OptXware Research and Development LLC.

+* All rights reserved.   This program and the accompanying materials

+* are made available under the terms of the Eclipse Public License v1.0

+* which accompanies this distribution, and is available at

+* http://www.eclipse.org/legal/epl-v10.html

+*

+* Contributors:

+*   Daniel Varro - Initial API and implementation

+*

+*/

+

+package org.eclipse.viatra2.lpgparser.typechecker;

+

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.And;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Division;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Equals;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThan;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.GreaterThanOrEqualTo;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThan;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.LessThanOrEqualTo;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Minus;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Multiply;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Not;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.NotEquals;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Or;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Plus;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.Remainder;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToBoolean;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToDouble;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToInt;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToModelElement;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToMultiplicity;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ToString;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.XOr;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Aggregate;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.ElementReference;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.FullyQualifiedName;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Inverse;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Multiplicity;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Name;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Source;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Target;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.modelmanagement.queryFunctions.Value;

+

+/**

+ * This class contains elementary type checking rules for terms in 

+ * GTASM programs. 

+ * 

+ * @author Daniel Varro

+ *

+ */

+public class TermTypeChecker {

+	private static ValueKind undef = ValueKind.UNDEF_LITERAL;

+	private static ValueKind bool = ValueKind.BOOLEAN_LITERAL;

+	private static ValueKind str = ValueKind.STRING_LITERAL;

+	private static ValueKind intg = ValueKind.INTEGER_LITERAL;

+	private static ValueKind dbl = ValueKind.DOUBLE_LITERAL;

+	private static ValueKind model = ValueKind.MODELELEMENT_LITERAL;

+	private static ValueKind multi = ValueKind.MULTIPLICITY_LITERAL;

+	private static ValueKind error = ValueKind.ERROR_LITERAL;

+

+	private final static ValueKind [][] logicalOperator = {

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			{bool,  bool,  error, error, error, bool,  error,  undef}, // undef

+			{bool,  bool , error, error, error, bool,  error, undef}, // boolean

+			{error, error, error, error, error, error, error, undef}, // string

+			{error, error, error, error, error, error, error, undef}, // integer

+			{error, error, error, error, error, error, error, undef}, // double

+			{bool,  bool,  error, error, error, error, error, undef}, // model element

+			{undef, error, error, error, error, error, multi, undef}, // multiplicity

+			{undef, undef, undef, undef, undef, undef, undef, undef}, // error

+		}; 

+

+	// TODO: Check that this is different from the spec

+	private final static ValueKind [][] equalNotEqualOperator = {

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			{bool, bool,  bool,  bool,  bool,  bool,  bool,  undef}, // undef

+			{bool, bool , error, error, error, bool, error, undef}, // boolean

+			{bool, error, bool , error, error, bool, error, undef}, // string

+			{bool, error, error, bool , bool , bool, error, undef}, // integer

+			{bool, error, error, bool , bool , bool, error, undef}, // double

+			{bool, bool,  bool,  bool,  bool,  bool, error, undef}, // model element

+			{bool, error, error, error, error, error, bool , undef}, // multiplicity

+			{undef, undef, undef, undef, undef, undef, undef, undef}, // error

+		}; 

+

+	private final static ValueKind [][] relationalOperator = {

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			{bool, error, error, bool,  bool,  bool,  bool,  undef}, // undef

+			{error,error, error, error, error, error, error, undef}, // boolean

+			{error,error, error, error, error, error, error, undef}, // string

+			{bool, error, error, bool , bool , bool,  error, undef}, // integer

+			{bool, error, error, bool , bool , bool,  error, undef}, // double

+			{bool, error, error, bool,  bool,  bool,  error, undef}, // model element

+			{bool, error, error, error, error, error, bool , undef}, // multiplicity

+			{undef, undef, undef, undef, undef, undef, undef, undef}, // error

+		}; 

+

+

+	private final static ValueKind [][] addOperator = { 

+	//   undef, bool,  str,   intg,  dbl,   model, multi, error

+		{undef, undef, str  , undef, undef, undef, undef, undef}, // undef

+		{undef, error, str  , error, error, error, error, undef}, // boolean

+		{str  , str  , str  , str  , str  , str  , str  , str}, // string

+		{undef, error, str  , intg , dbl  , error, error, undef}, // integer

+		{undef, error, str  , dbl  , dbl  , error, error, undef}, // double

+		{undef, error, str  , error, error, model, error, undef}, // model element

+		{undef, error, str  , error, error, error, error, undef}, // multiplicity

+		{undef, undef, str, undef, undef, undef, undef, undef}, // error

+	}; 

+

+	private final static ValueKind [][] subtractMultiplyDivideOperator = { 

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			{undef, undef, undef, undef, undef, undef, undef, undef}, // undef

+			{undef, error, error, error, error, error, error, undef}, // boolean

+			{undef, error, error, error, error, error, error, undef}, // string

+			{undef, error, error, intg , dbl  , error, error, undef}, // integer

+			{undef, error, error, dbl  , dbl  , error, error, undef}, // double

+			{undef, error, error, error, error, model, error, undef}, // model element

+			{undef, error, error, error, error, error, error, undef}, // multiplicity

+			{undef, undef, undef, undef, undef, undef, undef, undef}, // error

+		}; 

+

+	private final static ValueKind [][] remainderOperator = { 

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			{undef, undef, undef, undef, undef, undef, undef, undef}, // undef

+			{undef, error, error, error, error, error, error, undef}, // boolean

+			{undef, error, error, error, error, error, error, undef}, // string

+			{undef, error, error, intg , error, error, error, undef}, // integer

+			{undef, error, error, error, error, error, error, undef}, // double

+			{undef, error, error, error, error, error, error, undef}, // model element

+			{undef, error, error, error, error, error, error, undef}, // multiplicity

+			{undef, undef, undef, undef, undef, undef, undef, undef}, // error

+		}; 

+

+	// ----------------------- Unary operators in terms ------------------

+	

+	private final static ValueKind [] notOperator = { 

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			 undef, bool,  error, error, error, error, error, undef

+		}; 

+

+	private final static ValueKind [] minusOperator = { 

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			 undef, error, error, intg,  dbl,   error, error, undef

+		}; 

+

+	// Optimistic approach is taken in case of "undef"

+	private final static ValueKind [] aggregate = { 

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			 bool , error, error, error, error, bool , error, undef

+		}; 

+	private final static ValueKind [] source = { 

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			 model, error, error, error, error, model, error, undef

+		}; 

+	private final static ValueKind [] target = { 

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			 model, error, error, error, error, model, error, undef

+		}; 

+	private final static ValueKind [] ref = { 

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			 model, error, model, error, error, error, error, undef

+		}; 

+	private final static ValueKind [] fqn = { 

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			 str  , error, error, error, error, str  , error, undef

+		}; 

+	private final static ValueKind [] name = { 

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			 str  , error, error, error, error, str  , error, undef

+		}; 

+	private final static ValueKind [] value = { 

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			 str  , error, error, error, error, str  , error, undef

+		}; 

+	private final static ValueKind [] inverse = { 

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			 model, error, error, error, error, model, error, undef

+		}; 

+	private final static ValueKind [] multiplicity = { 

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			 multi, error, error, error, error, multi, error, undef

+		}; 

+

+	private final static ValueKind [] toString = { 

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			 str  , str ,  str,   str ,  str,   str  , str  , str

+		}; 

+	private final static ValueKind [] toInt = { 

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			 intg , error, intg,  intg,  intg,  error, error, undef

+		}; 

+	private final static ValueKind [] toDouble = { 

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			 dbl  , error, dbl,   dbl ,  dbl,   error, error, undef

+		}; 

+	private final static ValueKind [] toBoolean = { 

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+			 bool,  bool,  bool,  bool,  bool,  error, error, undef

+		}; 

+//	private final static ValueKind [] toModelElement = { 

+//		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+//		     model, error, model, error, error, model, error, undef

+//		}; 

+	private final static ValueKind [] toMultiplicity = { 

+		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+		     multi, error, multi, error, error, error, multi, undef

+		}; 

+

+//	private final static ValueKind [] navigation = { 

+//		//   undef, bool,  str,   intg,  dbl,   model, multi, error

+//	         model, error, error, error, error, model, error, undef

+//		}; 

+

+	/**

+	 * Typechecking for unary operators

+	 * @param term : current term to typecheck

+	 * @param operand : the type of the operand

+	 * @return {@link ValueKind}

+	 */

+	public static final ValueKind typeCheck(Term term, ValueKind operand) {

+		if (term instanceof Not) {return notOperator[operand.getValue()]; }

+		else if (term instanceof Minus) {return minusOperator[operand.getValue()]; }

+		else if (term instanceof Aggregate) {return aggregate[operand.getValue()]; }

+		else if (term instanceof Source) {return source[operand.getValue()]; }

+		else if (term instanceof Target) {return target[operand.getValue()]; }

+		else if (term instanceof ElementReference) {return ref[operand.getValue()]; }

+		else if (term instanceof FullyQualifiedName) {return fqn[operand.getValue()]; }

+		else if (term instanceof Name) {return name[operand.getValue()]; }

+		else if (term instanceof Value) {return value[operand.getValue()]; }

+		else if (term instanceof Inverse) {return inverse[operand.getValue()]; }

+		else if (term instanceof Multiplicity) {return multiplicity[operand.getValue()]; }

+		else if (term instanceof ToString) {return toString[operand.getValue()]; }

+		else if (term instanceof ToInt) {return toInt[operand.getValue()]; }

+		else if (term instanceof ToDouble) {return toDouble[operand.getValue()]; }

+		else if (term instanceof ToBoolean) {return toBoolean[operand.getValue()]; }

+//		else if (term instanceof ToModelElement) {return toModelElement[operand.getValue()]; }

+		else if (term instanceof ToMultiplicity) {return toMultiplicity[operand.getValue()]; }

+//		else if (term instanceof Navigation) {return navigation[operand.getValue()]; }

+		else return ValueKind.ERROR_LITERAL;

+	}

+

+	/**

+	 * Typechecking for binary operators

+	 * @param term : current term to typecheck

+	 * @param left : the type of the left operand

+	 * @param right : the type of the right operand

+	 * @return {@link ValueKind}

+	 */

+	public static final ValueKind typeCheck(Term term, ValueKind left, ValueKind right) {

+		if (term instanceof Or) {return logicalOperator[left.getValue()][right.getValue()]; }

+		else if (term instanceof XOr) {return logicalOperator[left.getValue()][right.getValue()]; }

+		else if (term instanceof And) {return logicalOperator[left.getValue()][right.getValue()]; }

+		else if (term instanceof Equals) {return equalNotEqualOperator[left.getValue()][right.getValue()]; }

+		else if (term instanceof NotEquals) {return equalNotEqualOperator[left.getValue()][right.getValue()]; }

+		else if (term instanceof GreaterThan) {return relationalOperator[left.getValue()][right.getValue()]; }

+		else if (term instanceof LessThan) {return relationalOperator[left.getValue()][right.getValue()]; }

+		else if (term instanceof GreaterThanOrEqualTo) {return relationalOperator[left.getValue()][right.getValue()]; }

+		else if (term instanceof LessThanOrEqualTo) {return relationalOperator[left.getValue()][right.getValue()]; }

+		else if (term instanceof Plus) {return addOperator[left.getValue()][right.getValue()]; }

+		else if (term instanceof Minus) {return subtractMultiplyDivideOperator[left.getValue()][right.getValue()]; }

+		else if (term instanceof Multiply) {return subtractMultiplyDivideOperator[left.getValue()][right.getValue()]; }

+		else if (term instanceof Division) {return subtractMultiplyDivideOperator[left.getValue()][right.getValue()]; }

+		else if (term instanceof Remainder) {return remainderOperator[left.getValue()][right.getValue()]; }

+		else return ValueKind.ERROR_LITERAL;

+	}

+	

+	public static final String getOperationString(Term term) {

+		if (term instanceof Not) {return "!"; }

+		else if (term instanceof Minus) {return "-"; }

+		else if (term instanceof Aggregate) {return "aggregation"; }

+		else if (term instanceof Source) {return "source"; }

+		else if (term instanceof Target) {return "target"; }

+		else if (term instanceof ElementReference) {return "ref"; }

+		else if (term instanceof FullyQualifiedName) {return "fqn"; }

+		else if (term instanceof Name) {return "name"; }

+		else if (term instanceof Value) {return "value"; }

+		else if (term instanceof Inverse) {return "inverse"; }

+		else if (term instanceof Multiplicity) {return "multiplicity"; }

+		else if (term instanceof ToString) {return "toString"; }

+		else if (term instanceof ToInt) {return "toInteger"; }

+		else if (term instanceof ToDouble) {return "toDouble"; }

+		else if (term instanceof ToBoolean) {return "toBoolean"; }

+		else if (term instanceof ToModelElement) {return "toModelElement"; }

+		else if (term instanceof ToMultiplicity) {return "toMultiplicity"; }

+//		else if (term instanceof Navigation) {return "->"; }

+		else if (term instanceof Or) {return "||"; }

+		else if (term instanceof XOr) {return "xor"; }

+		else if (term instanceof And) {return "&&"; }

+		else if (term instanceof Equals) {return "=="; }

+		else if (term instanceof NotEquals) {return "!="; }

+		else if (term instanceof GreaterThan) {return ">"; }

+		else if (term instanceof LessThan) {return "<"; }

+		else if (term instanceof GreaterThanOrEqualTo) {return ">="; }

+		else if (term instanceof LessThanOrEqualTo) {return "<="; }

+		else if (term instanceof Plus) {return "+"; }

+		else if (term instanceof Minus) {return "-"; }

+		else if (term instanceof Multiply) {return "*"; }

+		else if (term instanceof Division) {return "/"; }

+		else if (term instanceof Remainder) {return "%"; }

+		else return "unknown";

+	}

+

+

+}

diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/TypeResolver.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/TypeResolver.java
new file mode 100644
index 0000000..a209ea4
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/TypeResolver.java
@@ -0,0 +1,458 @@
+/**
+* Copyright (c) 2008 - 2010 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*/
+/**

+* Copyright (c) 2008 OptXware Research and Development LLC.

+* All rights reserved.   This program and the accompanying materials

+* are made available under the terms of the Eclipse Public License v1.0

+* which accompanies this distribution, and is available at

+* http://www.eclipse.org/legal/epl-v10.html

+*

+* Contributors:

+*   Daniel Varro - Initial API and implementation

+*/

+package org.eclipse.viatra2.lpgparser.typechecker;

+

+import java.util.ArrayList;

+import java.util.Collection;

+import java.util.HashSet;

+import java.util.Iterator;

+import java.util.List;

+import java.util.Set;

+

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.core.IModelManager;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;

+

+/**

+ * This class provides elementary boolean operations over the lattice of 

+ * VPM types.

+ *  

+ * Valid strings of types representations are as follows

+ * - "TOP": All concepts and terms are instances

+ * - "MODELELEMENT": All element from the model space are instances

+ * - "ENTITY": All entities are instances

+ * - "RELATION": All relations are instances

+ * - FQN of any element from the VPM model space, with special treatment for

+ *   - datatypes.String

+ *   - datatypes.Boolean

+ *   - datatypes.Integer

+ *   - datatypes.Double

+ *   - datatypes.MultiplicityKind

+ * - "BOTTOM": The error type, no instances are available 

+ * @author varro

+ *

+ */

+public class TypeResolver {

+

+	/**

+	 * Retrieves the least upper bound (LUB, or OR-join) of types 

+	 * typeStr1 and typeStr2 according to the VPM type hierarchy

+	 * @param modelManager 

+	 * @param typeStr1

+	 * @param typeStr2

+	 * @return String representation of the LUB type

+	 */

+	public String leastUpperBound(IModelManager modelManager, String typeStr1, String typeStr2) {

+		// If typeStr1 <- typeStr2, then typeStr1

+		if (isSupertype(modelManager, typeStr1, typeStr2)) {

+			return typeStr1;

+		}

+		// If typeStr2 <- typeStr1, then typeStr2

+		else if (isSupertype(modelManager, typeStr2, typeStr1)) {

+			return typeStr2;

+		}

+//		if (typeStr1 != null && typeStr2 != null) {

+//			String result = checkOrPrimitiveTypes(typeStr1, typeStr2);

+//			if (result != null) {

+//				return result;

+//			}

+//		}

+		// First lookup the FQN typeStr1 in the model space

+		IModelElement me1 = modelManager.getElementByName(typeStr1);

+		// Then lookup the FQN typeStr2 in the model space

+		IModelElement me2 = modelManager.getElementByName(typeStr2);

+		// Return the TOP type if any of them is unresolvable 

+		if (me1 == null || me2 == null) {

+			return "TOP";

+		}

+		// If me2 -> me1, return the more general me1

+		if (me1.isSubtypeOf(me2)) {

+			return me1.getFullyQualifiedName();

+		}

+		// If me1 -> me2, return the more general me2

+		else if (me2.isSubtypeOf(me1)) {

+			return me2.getFullyQualifiedName();

+		}

+		Set<IModelElement> commonSupertypes = new HashSet<IModelElement>();

+		traverseSupertypeHierarchy(me1, me2, commonSupertypes);

+		if (!commonSupertypes.isEmpty()) {

+			if (commonSupertypes.size() == 1) {

+				return commonSupertypes.iterator().next().getFullyQualifiedName();

+			}

+			else {

+				// TODO: Report error if multiple resolutions are possible

+				return "BOTTOM";

+			}

+		}

+		if (me1.isEntity() && me2.isEntity()) {

+			return "ENTITY";

+		}

+		else if (me1.isRelation() && me2.isRelation()) {

+			return "RELATION";

+		}

+		else {

+			return "MODELELEMENT";			

+		}

+	}

+

+	protected void traverseSupertypeHierarchy(IModelElement current, 

+			IModelElement other, Set<IModelElement> resolutionSet) {

+		List<IModelElement> toTraverseList = new ArrayList<IModelElement>();

+		for (IModelElement element : current.getSupertypes()) {

+			if (other.isSupertypeOf(element)) {

+				boolean subtypeFound = false;

+				Iterator<IModelElement> iter = resolutionSet.iterator();

+				while (!subtypeFound && iter.hasNext()) {

+					IModelElement existing = iter.next();

+					if (element.isSubtypeOf(existing)) {

+						subtypeFound = true;

+					}

+				}

+				if (!subtypeFound) {

+					resolutionSet.add(element);

+				}

+			}

+			else {

+				toTraverseList.add(element);

+			}

+		}

+		for (IModelElement toTraverse : toTraverseList) {

+			traverseSupertypeHierarchy(toTraverse, other, resolutionSet);

+		}

+	}

+

+	protected String checkOrPrimitiveTypes(String typeStr1, String typeStr2) {

+		if (typeStr1.equals("TOP") || typeStr2.equals("TOP")) {

+			return "TOP";

+		}

+		// TODO: Check how to mask a bottom

+//		else if (typeStr1.equals("BOTTOM") || typeStr2.equals("BOTTOM") ) {

+//			return "TOP";

+//		}

+		

+		else if (typeStr1.equals("BOTTOM")) {

+			return typeStr2;

+		}

+		else if ( typeStr2.equals("BOTTOM")) {

+			return typeStr1;

+		}

+		else if (typeStr1.equals("MODELELEMENT") && 

+					(typeStr2.equals("ENTITY") || 

+					 typeStr2.equals("RELATION")))  {

+			return "MODELELEMENT";

+		}

+		else if (typeStr2.equals("MODELELEMENT") && 

+				(typeStr1.equals("ENTITY") || 

+				 typeStr1.equals("RELATION")))  {

+			return "MODELELEMENT";

+		}

+		else if (typeStr1.equals("ENTITY") && typeStr2.equals("ENTITY")) {

+			return "ENTITY";

+		}

+		else if (typeStr1.equals("RELATION") && typeStr2.equals("RELATION")) {

+			return "RELATION";

+		}

+		else if (typeStr1.equals("RELATION") && typeStr2.equals("ENTITY") ||

+				typeStr1.equals("ENTITY") && typeStr2.equals("RELATION")) {

+			return "MODELELEMENT";

+		}

+		else return null;

+		

+	}

+

+	protected String checkAndPrimitiveTypes(String typeStr1, String typeStr2) {

+		if (typeStr1.equals("TOP") ) {

+			return typeStr2;

+		}

+		else if (typeStr2.equals("TOP")) {

+			return typeStr1;

+		}

+		else if (typeStr1.equals("BOTTOM") || 

+				 typeStr2.equals("BOTTOM")) {

+			return "BOTTOM";

+		}

+//		else if (typeStr1.equals("MODELELEMENT") && 

+//					(typeStr2.equals("ENTITY") || 

+//					 typeStr2.equals("RELATION")))  {

+//			return "TOP";

+//		}

+		else if ( typeStr2.equals("MODELELEMENT") && typeStr1.equals("MODELELEMENT"))  {

+			return "MODELELEMENT";

+		}

+		else if ( typeStr2.equals("MODELELEMENT") && typeStr1.equals("ENTITY") || 

+				  typeStr1.equals("MODELELEMENT") && typeStr2.equals("ENTITY") )  {

+			return "ENTITY";

+		}

+		else if (typeStr2.equals("MODELELEMENT") && typeStr1.equals("RELATION") || 

+				 typeStr1.equals("MODELELEMENT") && typeStr2.equals("RELATION") )  {

+			return "RELATION";

+		}

+		

+		else if (typeStr1.equals("ENTITY") && typeStr2.equals("RELATION") ||

+				typeStr2.equals("ENTITY") && typeStr1.equals("RELATION")) {

+			return "BOTTOM";

+		}

+

+		else return null;

+		

+	}

+

+	

+	public String greatestLowerBound(IModelManager modelManager, String typeStr1, String typeStr2) {

+		// If typeStr1 <- typeStr2

+		if (isSupertype(modelManager, typeStr1, typeStr2)) {

+			return typeStr2;

+		}

+		// If typeStr2 <- typeStr1

+		else if (isSupertype(modelManager, typeStr2, typeStr1)) {

+			return typeStr1;

+		}

+//		// Check for primitive types

+//		if (typeStr1 != null && typeStr2 != null) {

+//			String result = checkAndPrimitiveTypes(typeStr1, typeStr2);

+//			if (result != null) {

+//				return result;

+//			}

+//		}

+		// First lookup the FQN typeStr1 in the model space

+		IModelElement me1 = modelManager.getElementByName(typeStr1);

+		// Then lookup the FQN typeStr2 in the model space

+		IModelElement me2 = modelManager.getElementByName(typeStr2);

+		// Return the TOP type if any of them is unresolvable 

+		if (me1 == null || me2 == null) {

+			return "BOTTOM";

+		}

+		// If me2 -> me1, return the less general me2

+		if (me1.isSubtypeOf(me2)) {

+			return me2.getFullyQualifiedName();

+		}

+		// If me1 -> me2, return the less general me1

+		else if (me2.isSubtypeOf(me1)) {

+			return me1.getFullyQualifiedName();

+		}

+		Set<IModelElement> commonSubtypes = new HashSet<IModelElement>();

+		traverseSubtypeHierarchy(me1, me2, commonSubtypes);

+		if (!commonSubtypes.isEmpty()) {

+			if (commonSubtypes.size() == 1) {

+				return commonSubtypes.iterator().next().getFullyQualifiedName();

+			}

+			// TODO: Report error if multiple resolutions are possible

+			else {

+				return "BOTTOM";

+			}

+		}

+		if (me1.isEntity() && me2.isEntity()) {

+			return "ENTITY";

+		}

+		else if (me1.isRelation() && me2.isRelation()) {

+			return "RELATION";

+		}

+		else {

+			return "BOTTOM";			

+		}

+	

+	}

+	

+	protected void traverseSubtypeHierarchy(IModelElement current, 

+			IModelElement other, Set<IModelElement> resolutionSet) {

+		List<IModelElement> toTraverseList = new ArrayList<IModelElement>();

+		for (IModelElement element : current.getSubtypes()) {

+			if (other.isSubtypeOf(element)) {

+				boolean supertypeFound = false;

+				Iterator<IModelElement> iter = resolutionSet.iterator();

+				while (!supertypeFound && iter.hasNext()) {

+					IModelElement existing = iter.next();

+					if (element.isSupertypeOf(existing)) {

+						supertypeFound = true;

+					}

+				}

+				if (!supertypeFound) {

+					resolutionSet.add(current);

+				}

+			}

+			else {

+				toTraverseList.add(element);

+			}

+		}

+		for (IModelElement toTraverse : toTraverseList) {

+			traverseSubtypeHierarchy(toTraverse, other, resolutionSet);

+		}

+	}

+

+	/**

+	 * Checks if the model element represented by supertypeStr is a supertype of

+	 * the model element represented by subtypeStr according to the model manager.

+	 * If any of the two strings are "TOP", it returns with true. 

+	 * @param modelManager : {@link IModelManager} to query types

+	 * @param supertypeStr : string representation of the supertype

+	 * @param subtypeStr : string representation of the subtype

+	 * @return true, if the supertype relation holds

+	 */

+	public boolean isSupertype(IModelManager modelManager, String supertypeStr, String subtypeStr) {

+		// TODO: Check if the handling of TOP and BOTTOM is correct

+		if (supertypeStr.equals("TOP") || subtypeStr.equals("TOP")) {

+			return true;

+		}

+		else if (supertypeStr.equals("BOTTOM")) {

+			return false;

+		}

+		else if (subtypeStr.equals("BOTTOM")) {

+			return true;

+		}

+		else if (supertypeStr.equals("MODELELEMENT")) {

+			if (subtypeStr.equals("MODELELEMENT") || 

+				subtypeStr.equals("ENTITY") || 

+				subtypeStr.equals("RELATION")) {

+				return true;

+			}

+			else {

+				IModelElement subElem = modelManager.getElementByName(subtypeStr);

+				if (subElem != null) {

+					return true;

+				}

+				else {

+					return false;

+				}

+			}

+				

+		}

+		else if (supertypeStr.equals("ENTITY")) {

+			if (subtypeStr.equals("ENTITY")) {

+				return true;

+			}

+			else if (subtypeStr.equals("MODELELEMENT") ||

+					 subtypeStr.equals("RELATION")) {

+				return false;

+			}

+			else {

+				IModelElement subElem = modelManager.getElementByName(subtypeStr);

+				if (subElem != null && subElem.isEntity()) {

+					return true;

+				}

+				else {

+					return false;

+				}

+			}

+		}

+		else if (supertypeStr.equals("RELATION")) {

+			if (subtypeStr.equals("RELATION")) {

+				return true;

+			}

+			else if (subtypeStr.equals("MODELELEMENT") ||

+					 subtypeStr.equals("ENTITY")) {

+				return false;

+			}

+			else {

+				IModelElement subElem = modelManager.getElementByName(subtypeStr);

+				if (subElem != null && subElem.isRelation()) {

+					return true;

+				}

+				else {

+					return false;

+				}

+			}

+		}

+		else {

+			IModelElement superElem = modelManager.getElementByName(supertypeStr);

+			IModelElement subElem = modelManager.getElementByName(subtypeStr);

+			if (superElem != null && subElem != null && (subElem == superElem ||

+				superElem.isSupertypeOf(subElem))) {

+				return true;

+			}

+			else {

+				return false;

+			}

+		}

+	}

+

+	

+	/**

+	 * Returns the fully qualified name of the type of a model element

+	 * @param modelElement : the model element to be queried

+	 * @return : the FQN of the type of this model element

+	 */

+	public String lookupType(IModelElement modelElement) {

+		Collection<IModelElement> types = modelElement.getTypes();

+		int size = types.size();

+		switch (size) {

+		case 0:

+			// No type is found

+			if (modelElement.isEntity()) {

+				return "ENTITY";

+			}

+			else if (modelElement.isRelation()) {

+				return "RELATION";

+			}

+			else return "MODELELEMENT";

+		case 1: 

+			// A single type is found

+			return types.iterator().next().getFullyQualifiedName();

+

+		default:

+			// More than a single type is found

+			// TODO: Refine this if needed to more sophisticated type handling

+			if (modelElement.isEntity()) {

+				return "ENTITY";

+			}

+			else if (modelElement.isRelation()) {

+				return "RELATION";

+			}

+			else return "MODELELEMENT";

+		}

+	}

+

+

+	/**

+	 * Obtains the ValueKind for a given type. It resolves references to 

+	 * built-in types, i.e. String, Boolean, Integer, Double 

+	 * (which reside in the "datatypes" model fragment)

+	 * @param typeStr : fully qualified name of a model element

+	 * @return ValueKind

+	 */

+	public ValueKind getValueKind(String typeStr) {

+		if (typeStr.equals("datatypes.String")) {

+			return ValueKind.STRING_LITERAL;

+		}

+		else if (typeStr.equals("datatypes.Boolean")) {

+			return ValueKind.BOOLEAN_LITERAL;

+		}

+		else if (typeStr.equals("datatypes.Integer")) {

+			return ValueKind.INTEGER_LITERAL;

+		}

+		else if (typeStr.equals("datatypes.Double")) {

+			return ValueKind.DOUBLE_LITERAL;

+		}

+		else if (typeStr.equals("datatypes.Multiplicity")) {

+			return ValueKind.MULTIPLICITY_LITERAL;

+		}

+		else if (typeStr.equals("TOP")) {

+			return ValueKind.UNDEF_LITERAL;

+		}

+		else if (typeStr.equals("BOTTOM")) {

+			return ValueKind.ERROR_LITERAL;

+		}

+		else {

+			return ValueKind.MODELELEMENT_LITERAL;

+		}

+	}

+

+	

+}

diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/VTCLTypeChecker.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/VTCLTypeChecker.java
new file mode 100644
index 0000000..37aa383
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/VTCLTypeChecker.java
@@ -0,0 +1,1408 @@
+/**

+ * Copyright (c) 2008 OptXware Research and Development LLC.

+ * All rights reserved.   This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *   Daniel Varro - Initial API and implementation

+ */

+package org.eclipse.viatra2.lpgparser.typechecker;

+

+import java.io.File;

+import java.io.IOException;

+import java.util.ArrayList;

+import java.util.HashMap;

+import java.util.List;

+import java.util.Map;

+

+import org.eclipse.emf.ecore.EObject;

+import org.eclipse.emf.ecore.resource.Resource;

+import org.eclipse.emf.ecore.resource.ResourceSet;

+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;

+import org.eclipse.emf.ecore.xmi.XMIResource;

+import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;

+import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.core.IModelManager;

+import org.eclipse.viatra2.core.IModelSpace;

+import org.eclipse.viatra2.errors.VPMRuntimeException;

+import org.eclipse.viatra2.errors.info.ErrorInformation;

+import org.eclipse.viatra2.errors.info.ErrorInformation.ErrorKind;

+import org.eclipse.viatra2.errors.info.ErrorInformation.ErrorSeverity;

+import org.eclipse.viatra2.errors.info.Location;

+import org.eclipse.viatra2.framework.FrameworkManager;

+import org.eclipse.viatra2.gtasm.typerules.BinaryTypeJudgement;

+import org.eclipse.viatra2.gtasm.typerules.CustomTypeJudgement;

+import org.eclipse.viatra2.gtasm.typerules.RuleSet;

+import org.eclipse.viatra2.gtasm.typerules.TypeJudgement;

+import org.eclipse.viatra2.gtasm.typerules.TypeRule;

+import org.eclipse.viatra2.gtasm.typerules.TyperulesPackage;

+import org.eclipse.viatra2.gtasm.typerules.UnaryTypeJudgement;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.Annotation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.ASMFunction;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.DefinitionsFactory;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.InitialValue;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Rule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.SymbolicRuleParameter;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.TypeConstant;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Variable;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.VariableDefinition;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.enums.ValueKind;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.CallRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.GTRuleInvocation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdate;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateASMFunction;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.simpleRules.RuleUpdateVariable;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ASMFunctionInvocation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.FunctionInvocation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.ModelElementQuery;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.NativeFunctionInvocation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.Term;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.VariableReference;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ArithmeticOperation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.ConversionOperation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.builtInFunctions.RelationalOperation;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTRule;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable;

+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariableAssignment;

+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity;

+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;

+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation;

+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship;

+import org.eclipse.viatra2.lpgparser.loader.VTCLMessages;

+import org.eclipse.viatra2.lpgparser.modelbuilder.ModelBuilderHelper;

+

+/**

+ * This class is responsible for type checking of VTCL programs.

+ * @author Daniel Varro

+ */

+public class VTCLTypeChecker {

+	private static final String PARSER_MARKER = "org.eclipse.viatra2.loaders.vtclparsermarker";

+

+	private IModelSpace modelSpace;

+	private IModelManager modelManager;

+	private TypeResolver typeResolver = new TypeResolver();

+	// private TypeAssignments typeAssignments = new TypeAssignments();

+	private RuleSet typeRuleSet = null;

+	private Map<String, List<CustomTypeJudgement>> customTypeRuleMap = null;

+	private Map<StringTriple, BinaryTypeJudgement> binaryTypeRuleMap = null;

+	private Map<StringPair, UnaryTypeJudgement> unaryTypeRuleMap = null;

+

+	private List<Term> termsToCheck = new ArrayList<Term>();

+	private List<GTRuleInvocation> gtRuleInvocsToCheck = new ArrayList<GTRuleInvocation>();

+	private List<CallRule> asmCallRuleToCheck = new ArrayList<CallRule>();

+	private List<ASMFunctionInvocation> asmFunInvocsToCheck = new ArrayList<ASMFunctionInvocation>();

+	private List<NativeFunctionInvocation> nativeFunInvocsToCheck = new ArrayList<NativeFunctionInvocation>();

+	private List<GTPatternCall> patternCallToCheck = new ArrayList<GTPatternCall>();

+	private List<RuleUpdate> updateRulesToCheck = new ArrayList<RuleUpdate>();

+	private List<InitialValue> initValuesToCheck = new ArrayList<InitialValue>();

+	private List<VariableDefinition> varDefsToCheck = new ArrayList<VariableDefinition>();

+	private List<GTPattern> gtPatternDefToCheck = new ArrayList<GTPattern>();

+

+	protected enum AbstractionKind {

+		FIRST, SECOND, BOTH

+	};

+

+	public VTCLTypeChecker(IModelSpace aModelSpace) {

+		modelSpace = aModelSpace;

+		modelSpace = aModelSpace;

+		modelSpace = aModelSpace;

+		modelSpace = aModelSpace;

+		modelSpace = aModelSpace;

+		modelSpace = aModelSpace;

+		modelSpace = aModelSpace;

+		modelSpace = aModelSpace;

+		modelManager = modelSpace.getModelManager();

+		typeRuleSet = null;

+		try {

+			initializeTypeRuleSet();

+		} catch (VPMRuntimeException e) {

+			// This exception should never be thrown

+			e.printStackTrace();

+		}

+	}

+

+	public TypeResolver getTypeResolver() {

+		return typeResolver;

+	}

+

+	/**

+	 * Returns the type assignment repository

+	 * @return the type assignment repository

+	 */

+	/*

+	 * public TypeAssignments getTypeAssignments() { return typeAssignments; }

+	 */

+

+	public List<Term> getTermsToCheck() {

+		return termsToCheck;

+	}

+

+	public List<ASMFunctionInvocation> getAsmFunInvocsToCheck() {

+		return asmFunInvocsToCheck;

+	}

+

+	public List<NativeFunctionInvocation> getNativeFunInvocsToCheck() {

+		return nativeFunInvocsToCheck;

+	}

+

+	public List<GTRuleInvocation> getGtRuleInvocsToCheck() {

+		return gtRuleInvocsToCheck;

+	}

+

+	public List<CallRule> getAsmCallRuleToCheck() {

+		return asmCallRuleToCheck;

+	}

+

+	public List<GTPatternCall> getPatternCallToCheck() {

+		return patternCallToCheck;

+	}

+

+	public List<RuleUpdate> getUpdateRulesToCheck() {

+		return updateRulesToCheck;

+	}

+

+	public List<InitialValue> getInitValuesToCheck() {

+		return initValuesToCheck;

+	}

+

+	public List<VariableDefinition> getVarDefsToCheck() {

+		return varDefsToCheck;

+	}

+

+	public List<GTPattern> getPatternDefToCheck() {

+		return gtPatternDefToCheck;

+	}

+

+	private List<ErrorInformation> typeErrorInfos = new ArrayList<ErrorInformation>();

+

+	public List<ErrorInformation> getAllTypeErrorInfos() {

+		return typeErrorInfos;

+	}

+

+	public void clearAllTypeErrors() {

+		typeErrorInfos.clear();

+	}

+

+	/**

+	 * Creates an ErrorInformation

+	 * @param annotations

+	 *            : location information of the error

+	 * @param errorString

+	 *            : textual representation of the error (VTCLMessages should be

+	 *            used)

+	 * @param errorSeverity

+	 *            : severity of the error

+	 * @param context

+	 *            : list of contextual information

+	 */

+	public void addTypeError(List<Annotation> annotations, String errorString,

+			ErrorSeverity errorSeverity, String[] context) {

+		Location location = ModelBuilderHelper.createLocationInfo(annotations);

+		ErrorInformation errorInfo = new ErrorInformation(errorString,

+				PARSER_MARKER, ErrorKind.VALIDATION_ERROR, location,

+				errorSeverity);

+		// Bind contextual parameters of error strings

+		errorInfo.bind(context);

+		typeErrorInfos.add(errorInfo);

+	}

+

+	public void loadTypeRules(File file) throws VPMRuntimeException {

+		// Create a resource set.

+		ResourceSet resourceSet = new ResourceSetImpl();

+		resourceSet.getPackageRegistry().put(TyperulesPackage.eNS_URI,

+				TyperulesPackage.eINSTANCE);

+		Resource res = resourceSet.getResource(org.eclipse.emf.common.util.URI

+				.createFileURI(file.getAbsolutePath()), true);

+		try {

+			res.load(null);

+		} catch (IOException e) {

+			throw new VPMRuntimeException("Type rules cannot be loaded");

+		}

+		if (res.getContents().get(0) instanceof RuleSet) {

+			RuleSet rs = (RuleSet) res.getContents().get(0);

+			// The new rule set extends the existing one

+			rs.setExtends(typeRuleSet);

+			// Save the new rule set

+			typeRuleSet = rs;

+		}

+		// TODO: Filter deactivated rules

+		// filterDeactivatedTypeRules();

+	}

+

+	public void initializeTypeChecker() {

+		clearAllTypeErrors();

+		clearLists();

+	}

+

+	/**

+	 * Empties to lists containing various task elements

+	 */

+	private void clearLists() {

+		termsToCheck.clear();

+		asmCallRuleToCheck.clear();

+		gtRuleInvocsToCheck.clear();

+		asmFunInvocsToCheck.clear();

+		nativeFunInvocsToCheck.clear();

+		patternCallToCheck.clear();

+		updateRulesToCheck.clear();

+		initValuesToCheck.clear();

+		varDefsToCheck.clear();

+		gtPatternDefToCheck.clear();

+	}

+

+	/**

+	 * This method initiates type checking for all - Terms collected in

+	 * termsToCheck - CallRules collected in asmCallRuleToCheck -

+	 * GTRuleInvocations collected in gtRuleInvocsToCheck -

+	 * ASMFunctionInvocations collected in asmFunInvocsToCheck -

+	 * NativeFunctionInvocations collected in nativeFunInvocsToCheck -

+	 * GTPatternCalls (from pattern composition) collected in patternCallToCheck

+	 */

+	public void doTypeChecking() {

+		try {

+			assert (typeErrorInfos.isEmpty()) : "Type error list is not empty";

+			// Infer types for pattern variable references

+			for (GTPattern patternDef : gtPatternDefToCheck) {

+				typeCheckPatternDefinition(patternDef);

+			}

+			for (Term term : termsToCheck) {

+				typeCheckTerm(term);

+			}

+			for (CallRule callRule : asmCallRuleToCheck) {

+				typeCheckCallRule(callRule);

+			}

+			for (GTRuleInvocation gtRuleInvoc : gtRuleInvocsToCheck) {

+				typeCheckGTRuleCall(gtRuleInvoc);

+			}

+			for (ASMFunctionInvocation asmFunInvoc : asmFunInvocsToCheck) {

+				typeCheckAsmFunctionInvocation(asmFunInvoc);

+			}

+			for (NativeFunctionInvocation nativeFunInvoc : nativeFunInvocsToCheck) {

+				typeCheckNativeFunctionInvocation(nativeFunInvoc);

+			}

+			for (GTPatternCall patternCall : patternCallToCheck) {

+				typeCheckPatternCall(patternCall);

+			}

+			for (RuleUpdate updateRule : updateRulesToCheck) {

+				typeCheckUpdateRule(updateRule);

+			}

+			for (InitialValue initValue : initValuesToCheck) {

+				typeCheckInitialValue(initValue);

+			}

+			for (VariableDefinition varDef : varDefsToCheck) {

+				typeCheckVariableDefinition(varDef);

+			}

+		} finally {

+			clearLists();

+		}

+	}

+

+	protected void initializeTypeRuleSet() throws VPMRuntimeException {

+		String bundleStr = "org.eclipse.viatra2.gtasm.typing.model";

+		String fileName = "/model/VTCLCore.typerules";

+		File file = FrameworkManager.getFileFromBundle(bundleStr, fileName);

+		if (file == null) {

+			throw new VPMRuntimeException("Type rule file cannot be found");

+		}

+		// Create a resource set.

+

+		// added by Istvan to make it work in headless mode

+		Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put

+	       ("typerules",

+	        new XMIResourceFactoryImpl()

+	        {

+	          public Resource createResource(org.eclipse.emf.common.util.URI uri)

+	          {

+	            XMIResource xmiResource = new XMIResourceImpl(uri);

+	            return xmiResource;

+	          }

+	        });

+

+

+		ResourceSet resourceSet = new ResourceSetImpl();

+		resourceSet.getPackageRegistry().put(TyperulesPackage.eNS_URI,

+				TyperulesPackage.eINSTANCE);

+		Resource res = resourceSet.getResource(org.eclipse.emf.common.util.URI

+				.createFileURI(file.getAbsolutePath()), true);

+		try {

+			res.load(null);

+		} catch (IOException e) {

+			throw new VPMRuntimeException("Type rules cannot be loaded");

+		}

+		if (res.getContents().get(0) instanceof RuleSet) {

+			typeRuleSet = (RuleSet) res.getContents().get(0);

+		}

+

+		if (typeRuleSet != null) {

+			binaryTypeRuleMap = new HashMap<StringTriple, BinaryTypeJudgement>();

+			unaryTypeRuleMap = new HashMap<StringPair, UnaryTypeJudgement>();

+			customTypeRuleMap = new HashMap<String, List<CustomTypeJudgement>>();

+			for (TypeRule typeRule : typeRuleSet.getTyperules()) {

+				List<CustomTypeJudgement> customList = null;

+				for (TypeJudgement judgement : typeRule.getJudgements()) {

+					if (judgement instanceof BinaryTypeJudgement) {

+						BinaryTypeJudgement binaryJudge = (BinaryTypeJudgement) judgement;

+						StringTriple triple = new StringTriple(typeRule

+								.getOperator(), binaryJudge.getFirstOperand(),

+								binaryJudge.getSecondOperand());

+						binaryTypeRuleMap.put(triple, binaryJudge);

+					} else if (judgement instanceof UnaryTypeJudgement) {

+						UnaryTypeJudgement unaryJudge = (UnaryTypeJudgement) judgement;

+						StringPair pair = new StringPair(

+								typeRule.getOperator(), unaryJudge.getOperand());

+						unaryTypeRuleMap.put(pair, unaryJudge);

+

+					} else if (judgement instanceof CustomTypeJudgement) {

+						CustomTypeJudgement customJudge = (CustomTypeJudgement) judgement;

+						customList = customTypeRuleMap.get(typeRule

+								.getOperator());

+						if (customList == null) {

+							customList = new ArrayList<CustomTypeJudgement>();

+						}

+						customList.add(customJudge);

+

+					}

+				}

+				customTypeRuleMap.put(typeRule.getOperator(), customList);

+			}

+		}

+	}

+

+	protected void typeCheckPatternDefinition(GTPattern patternDef) {

+		// Process pattern parameters

+		for (PatternVariable patternVar : patternDef.getSymParameters()) {

+			TypeConstant typeConst = DefinitionsFactory.eINSTANCE

+					.createTypeConstant();

+			typeConst.setKind(ValueKind.UNDEF_LITERAL);

+			typeConst.setFqn(VTCLTypeNameConstants.TOP);

+			// Infer types for all references

+			for (Object varRefObj : patternVar.getReferences()) {

+				VariableReference varRef = (VariableReference) varRefObj;

+				typeConst = inferTypeForPatternVariableRef(varRef, typeConst);

+			}

+			inferTypeForPatternVariableDef(patternVar, typeConst);

+		}

+		// Process all bodies

+		for (GTPatternBody body : patternDef.getPatternBodies()) {

+			// Process local pattern variables

+			for (PatternVariable patternVar : body.getLocalVariables()) {

+				TypeConstant typeConst = DefinitionsFactory.eINSTANCE

+						.createTypeConstant();

+				typeConst.setKind(ValueKind.UNDEF_LITERAL);

+				typeConst.setFqn(VTCLTypeNameConstants.TOP);

+				for (Object varRefObj : patternVar.getReferences()) {

+					VariableReference varRef = (VariableReference) varRefObj;

+					typeConst = inferTypeForPatternVariableRef(varRef,

+							typeConst);

+				}

+				inferTypeForPatternVariableDef(patternVar, typeConst);

+			}

+		}

+	}

+

+	/**

+	 * @param varRef

+	 * @param prevTypeConst

+	 * @return

+	 */

+	protected TypeConstant inferTypeForPatternVariableRef(

+			VariableReference varRef, TypeConstant prevTypeConst) {

+		EObject parent = varRef.eContainer();

+		String typeStr = null;

+		ValueKind kind;

+		// Handling model elements (entity, relation) in pattern body

+		if (parent instanceof ModelElement) {

+			ModelElement element = (ModelElement) parent;

+			// If it is the first variable reference of an entity/relation

+			if (varRef.equals(element.getVariableReferences().get(0))

+					|| prevTypeConst == null) {

+				// Check if type is defined

+				if (!element.getType().isEmpty()) {

+					ModelElement type = element.getType().get(0);

+					typeStr = type.getName();

+				} else {

+					if (parent instanceof Entity) {

+						typeStr = VTCLTypeNameConstants.ENTITY;

+					} else if (parent instanceof Relation) {

+						typeStr = VTCLTypeNameConstants.RELATION;

+					} else {

+						typeStr = VTCLTypeNameConstants.MODELELEMENT;

+					}

+				}

+				// Determine the LUB of variable reference types

+				if (prevTypeConst != null

+						&& !prevTypeConst.getKind().equals(

+								ValueKind.UNDEF_LITERAL)) {

+					// TODO: Distinguish between variables in OR patterns and

+					// within the same body

+					typeStr = typeResolver.leastUpperBound(modelManager,

+							typeStr, prevTypeConst.getFqn());

+				}

+			}

+			// If variable reference is not the first

+			else {

+				typeStr = typeResolver.greatestLowerBound(modelManager,

+						VTCLTypeNameConstants.MODELELEMENT, prevTypeConst

+								.getFqn());

+			}

+			kind = ValueKind.MODELELEMENT_LITERAL;

+			// Schedule variable reference for type checking

+			termsToCheck.add(varRef);

+		}

+		// Relationship definition

+		else if (parent instanceof Relationship) {

+			typeStr = VTCLTypeNameConstants.MODELELEMENT;

+			kind = ValueKind.MODELELEMENT_LITERAL;

+			// Schedule variable reference for type checking

+			termsToCheck.add(varRef);

+			// Determine the GLB of variable reference types

+			if (prevTypeConst != null) {

+				typeStr = typeResolver.greatestLowerBound(modelManager,

+						typeStr, prevTypeConst.getFqn());

+			}

+		}

+		// Pattern Variable Assignment

+		else if (parent instanceof PatternVariableAssignment) {

+			typeStr = VTCLTypeNameConstants.MODELELEMENT;

+			kind = ValueKind.MODELELEMENT_LITERAL;

+			// Schedule variable reference for type checking

+			termsToCheck.add(varRef);

+			// Determine the GLB of variable reference types

+			if (prevTypeConst != null) {

+				typeStr = typeResolver.greatestLowerBound(modelManager,

+						typeStr, prevTypeConst.getFqn());

+			}

+		}

+		// All other cases (should be checked separately)

+		else {

+			if (prevTypeConst != null) {

+				typeStr = prevTypeConst.getFqn();

+				kind = prevTypeConst.getKind();

+			} else {

+				typeStr = VTCLTypeNameConstants.TOP;

+				kind = ValueKind.MODELELEMENT_LITERAL;

+			}

+		}

+		varRef.setType(typeStr);

+		varRef.setKind(kind);

+

+		/*if (typeStr.contentEquals(VTCLTypeNameConstants.MODELELEMENT)

+				|| typeStr.contentEquals(VTCLTypeNameConstants.ENTITY)

+				|| typeStr.contentEquals(VTCLTypeNameConstants.RELATION)) {

+			return null;

+		}*/

+		TypeConstant resultTypeConst = DefinitionsFactory.eINSTANCE

+				.createTypeConstant();

+		// Set result type constant

+		resultTypeConst.setFqn(typeStr);

+		resultTypeConst.setKind(kind);

+

+		return resultTypeConst;

+	}

+

+	protected void inferTypeForPatternVariableDef(PatternVariable varDef,

+			TypeConstant typeConst) {

+		// Type inference is only required when the type of varDef is not

+		// explicitly defined

+		if (varDef.getVariableType() == null && typeConst != null) {

+			varDef.setVariableType(typeConst);

+		}

+	}

+

+	protected void typecheckPatternBody(GTPatternBody body) {

+		// For each pattern variable definition below body

+		for (Object paramObject : body.getHeader().getSymParameters()) {

+			PatternVariable param = (PatternVariable) paramObject;

+			// For each variable reference

+			for (Object varRefObj : param.getReferences()) {

+				VariableReference varRef = (VariableReference) varRefObj;

+				// Get the parent of the variable reference

+				EObject parent = varRef.eContainer();

+				if (parent instanceof ModelElement) {

+					ModelElement element = (ModelElement) parent;

+					if (!element.getType().isEmpty()) {

+						ModelElement type = element.getType().get(0);

+						String typeStr = type.getName();

+						varRef.setType(typeStr);

+					} else {

+						if (parent instanceof Entity) {

+							varRef.setType(VTCLTypeNameConstants.ENTITY);

+						} else if (parent instanceof Relation) {

+							varRef.setType(VTCLTypeNameConstants.RELATION);

+						} else {

+							varRef.setType(VTCLTypeNameConstants.MODELELEMENT);

+						}

+					}

+					varRef.setKind(ValueKind.MODELELEMENT_LITERAL);

+				}

+				// GTPatternCalls are already handled

+				else if (parent instanceof PatternVariableAssignment) {

+					// TODO Check if the LHS and RHS are compatible

+					// PatternVariableAssignment pva =

+					// (PatternVariableAssignment) parent;
+				}

+

+			}

+		}

+		// Register its type

+		// Allocate type for its variable definition

+	}

+

+	/**

+	 * Recursive traversal of the term

+	 * @param term

+	 */

+	protected void typeCheckTerm(Term term) {

+		if (term instanceof RelationalOperation

+				|| term instanceof ArithmeticOperation

+				|| term instanceof ConversionOperation) {

+			FunctionInvocation funInvoc = (FunctionInvocation) term;

+			if (funInvoc.getActualParameters().size() == 1) {

+				Term operand = funInvoc.getActualParameters().get(0);

+				if (operand.getType() == null) {

+					// Typecheck operand (if needed)

+					typeCheckTerm(operand);

+				}

+				// Typecheck the current term

+				typeCheckUnaryTerm(term, operand);

+

+			} else if (funInvoc.getActualParameters().size() == 2) {

+				// Typecheck left operand (when needed)

+				Term leftOperand = funInvoc.getActualParameters().get(0);

+				if (leftOperand.getType() == null) {

+					typeCheckTerm(leftOperand);

+				}

+				// Typecheck right operand (if needed)

+				Term rightOperand = funInvoc.getActualParameters().get(1);

+				if (rightOperand.getType() == null) {

+					typeCheckTerm(rightOperand);

+				}

+				// Typecheck the current term

+				typeCheckBinaryTerm(term, leftOperand, rightOperand);

+			}

+		} else if (term instanceof ASMFunctionInvocation) {

+			ASMFunctionInvocation asmFunInvoc = (ASMFunctionInvocation) term;

+			for (Object param : asmFunInvoc.getActualParameters()) {

+				Term actualParam = (Term) param;

+				if (actualParam.getType() == null) {

+					typeCheckTerm(actualParam);

+				}

+			}

+			ASMFunction asmFunDef = asmFunInvoc.getCalledFunction();

+			// All GT rule invocations should be resolved prior to type checking

+			assert (asmFunDef != null) : "ASM function definition is not resolved for "

+					+ asmFunInvoc.getFqn();

+			if (asmFunDef.getReturnType() != null) {

+				TypeConstant type = asmFunDef.getReturnType();

+				asmFunInvoc.setType(type.getFqn());

+				asmFunInvoc.setKind(type.getKind());

+			} else {

+				asmFunInvoc.setType(VTCLTypeNameConstants.TOP);

+				asmFunInvoc.setKind(ValueKind.UNDEF_LITERAL);

+			}

+			// typeCheckAsmFunctionInvocation(asmFunInvoc);

+		} else if (term instanceof NativeFunctionInvocation) {

+			NativeFunctionInvocation nativeFunInvoc = (NativeFunctionInvocation) term;

+			for (Object param : nativeFunInvoc.getActualParameters()) {

+				Term actualParam = (Term) param;

+				if (actualParam.getType() == null) {

+					typeCheckTerm(actualParam);

+				}

+			}

+			// TODO: Provide better return type if possible

+			nativeFunInvoc.setType(VTCLTypeNameConstants.TOP);

+			nativeFunInvoc.setKind(ValueKind.UNDEF_LITERAL);

+			// typeCheckNativeFunctionInvocation(nativeFunInvoc);

+

+		} else if (term instanceof ModelElementQuery) {

+			ModelElementQuery meQuery = (ModelElementQuery) term;

+			Term argument = meQuery.getArgument();

+			if (argument.getType() == null) {

+				typeCheckTerm(argument);

+			}

+			typeCheckUnaryTerm(term, argument);

+		} else if (term instanceof GTPatternCall) {

+			GTPatternCall patternCall = (GTPatternCall) term;

+			for (Object param : patternCall.getActualParameters()) {

+				Term actualParam = (Term) param;

+				if (actualParam.getType() == null) {

+					typeCheckTerm(actualParam);

+				}

+			}

+			// Set the type information for pattern call (used as a term)

+			patternCall.setKind(ValueKind.BOOLEAN_LITERAL);

+			patternCall.setType("datatypes.Boolean");

+			// typeCheckPatternCall(patternCall);

+		} else if (term instanceof VariableReference) {

+			VariableReference varRef = (VariableReference) term;

+			typeCheckVariableReference(varRef);

+		} else {

+			// assert false;

+		}

+	}

+

+	/**

+	 * Provides type checking for a {@link VariableReference}: it looks up the

+	 * type of its corresponding {@link Variable} definition

+	 * @param varRef

+	 *            : the {@link VariableReference} to be checked

+	 */

+	protected void typeCheckVariableReference(VariableReference varRef) {

+		Variable varDef = varRef.getVariable();

+		if (varDef == null) {

+			varRef.setType(VTCLTypeNameConstants.TOP);

+			varRef.setKind(ValueKind.UNDEF_LITERAL);

+			return;

+		}

+		if (varDef.getVariableType() != null) {

+			TypeConstant typeConstant = varDef.getVariableType();

+			String typeStr = typeConstant.getFqn();

+			ValueKind kind = typeConstant.getKind();

+			// Set type for variable reference

+			if (typeStr != null && !typeStr.equals("")) {

+				assert (kind != null) : "Kind of type constant is not yet set";

+				// If the type of the variable reference is not yet set

+				// assign it according to the type of the variable definition

+				if (varRef.getType() == null) {

+					varRef.setType(typeStr);

+					varRef.setKind(kind);

+				}

+				// Check type compatibility if both values are set

+				else {

+					if (!typeResolver.isSupertype(modelManager, typeStr, varRef

+							.getType())) {

+						// If inconsistent, report error

+						String[] context = new String[] { varRef.getType(),

+								typeStr };

+						addTypeError(

+								varRef.getAnnotations(),

+								VTCLMessages.VTCLValidationErrorCodes_INCOMPATIBLE_VARIABLEREF_TYPE,

+								ErrorSeverity.WARNING, context);

+					}

+				}

+			} else {

+				if (varRef.getType() == null) {

+					varRef.setType(VTCLTypeNameConstants.TOP);

+					varRef.setKind(ValueKind.UNDEF_LITERAL);

+				}

+			}

+		} else {

+			if (varRef.getType() == null) {

+				varRef.setType(VTCLTypeNameConstants.TOP);

+				varRef.setKind(ValueKind.UNDEF_LITERAL);

+			}

+		}

+	}

+

+	/**

+	 * Provides type checking for the actual parameters of a

+	 * {@link GTRuleInvocation}

+	 * @param gtRuleInvoc

+	 *            : the {@link GTRuleInvocation} to be checked

+	 */

+	protected void typeCheckGTRuleCall(GTRuleInvocation gtRuleInvoc) {

+		GTRule gtRuleDef = gtRuleInvoc.getRule();

+		// All GT rule invocations should be resolved prior to type checking

+		assert (gtRuleDef != null) : "GT rule is not resolved for "

+				+ gtRuleInvoc.getFqn();

+		assert (gtRuleDef.getSymParameters().size() == gtRuleInvoc

+				.getActualParameters().size()) : "Parameter mismatch in GT rule invocation";

+		for (int i = 0; i < gtRuleDef.getSymParameters().size(); i++) {

+			SymbolicRuleParameter symParam = gtRuleDef.getSymParameters()

+					.get(i);

+			Variable varDef = symParam.getVariable();

+			assert (varDef != null) : "Variable is not resolved for Symbolic parameter";

+			Term actualParam = gtRuleInvoc.getActualParameters().get(i);

+			if (varDef.getVariableType() != null) {

+				TypeConstant type = varDef.getVariableType();

+				// Check consistency of types

+				if (!typeResolver.isSupertype(modelManager, type.getFqn(),

+						actualParam.getType())) {

+					// If inconsistent, report error

+					String[] context = new String[] { actualParam.getType(),

+							type.getFqn(), varDef.getName(),

+							gtRuleInvoc.getFqn() };

+					addTypeError(

+							actualParam.getAnnotations(),

+							VTCLMessages.VTCLValidationErrorCodes_INCOMPATIBLE_ACTUALPARAM_TYPE,

+							ErrorSeverity.WARNING, context);

+				}

+			}

+		}

+

+	}

+

+	/**

+	 * Provides type checking for the actual parameters of a

+	 * {@link GTPatternCall}

+	 * @param patternCall

+	 *            : the {@link GTPatternCall} to be checked

+	 */

+	protected void typeCheckPatternCall(GTPatternCall patternCall) {

+		GTPattern patternDef = patternCall.getCalledPattern();

+		// All pattern calls should be resolved prior to type checking

+		assert (patternDef != null) : "Pattern definition is not resolved";

+		assert (patternDef.getSymParameters().size() == patternCall

+				.getActualParameters().size()) : "Parameter mismatch in pattern call";

+		for (int i = 0; i < patternDef.getSymParameters().size(); i++) {

+			PatternVariable symParam = patternDef.getSymParameters().get(i);

+			Term actualParam = patternCall.getActualParameters().get(i);

+			if (symParam.getVariableType() != null) {

+				TypeConstant type = symParam.getVariableType();

+				// Check consistency of types

+				// TODO this is a workaround for a nullpointer e

+				String actualParamType = actualParam.getType();

+				String paramType = type.getFqn();

+				if (!typeResolver.isSupertype(modelManager, paramType,

+						actualParamType)

+						&& !typeResolver.isSupertype(modelManager,

+								actualParamType, paramType)) {

+					// If inconsistent, report a warning, as a subpattern can

+					// strengthen a precondition

+					String[] context = new String[] { actualParamType,

+							paramType, symParam.getName(), patternCall.getFqn() };

+					addTypeError(

+							actualParam.getAnnotations(),

+							VTCLMessages.VTCLValidationErrorCodes_INCOMPATIBLE_ACTUALPARAM_TYPE,

+							ErrorSeverity.WARNING, context);

+				}

+			}

+		}

+

+	}

+

+	/**

+	 * Provides type compatibility checking for the actual parameters of a

+	 * {@link CallRule}

+	 * @param callRule

+	 *            : the {@link CallRule} to be checked

+	 */

+	protected void typeCheckCallRule(CallRule callRule) {

+		Rule ruleDef = callRule.getRule();

+		// All pattern calls should be resolved prior to type checking

+		assert (ruleDef != null) : "ASM rule is not resolved";

+		assert (ruleDef.getSymParameters().size() == callRule

+				.getActualParameters().size()) : "Parameter mismatch in call rule";

+		for (int i = 0; i < ruleDef.getSymParameters().size(); i++) {

+			SymbolicRuleParameter symParam = ruleDef.getSymParameters().get(i);

+			Variable varDef = symParam.getVariable();

+			assert (varDef != null) : "Variable cannot be resolved for Symbolic rule parameter";

+			Term actualParam = callRule.getActualParameters().get(i);

+			if (varDef.getVariableType() != null) {

+				TypeConstant type = varDef.getVariableType();

+				// Check consistency of types

+				if (!typeResolver.isSupertype(modelManager, type.getFqn(),

+						actualParam.getType())) {

+					// If inconsistent, report error

+					String[] context = new String[] { actualParam.getType(),

+							type.getFqn(), varDef.getName(), callRule.getFqn() };

+					addTypeError(

+							actualParam.getAnnotations(),

+							VTCLMessages.VTCLValidationErrorCodes_INCOMPATIBLE_ACTUALPARAM_TYPE,

+							ErrorSeverity.WARNING, context);

+				}

+			}

+		}

+

+	}

+

+	/**

+	 * Provides type compatibility checking for the left and right values of a

+	 * {@link RuleUpdate}

+	 * @param updateRule

+	 *            : the {@link RuleUpdate} to be checked

+	 */

+	protected void typeCheckUpdateRule(RuleUpdate updateRule) {

+		// Determine the type of its left value

+		String leftValueType = "";

+		if (updateRule instanceof RuleUpdateVariable) {

+			RuleUpdateVariable varUpdateRule = (RuleUpdateVariable) updateRule;

+			VariableReference varRef = varUpdateRule.getVariable();

+			assert (varRef != null);

+			// We assume that the type of varRef is already resolved

+			leftValueType = varRef.getType();

+		} else if (updateRule instanceof RuleUpdateASMFunction) {

+			RuleUpdateASMFunction asmFunUpdateRule = (RuleUpdateASMFunction) updateRule;

+			ASMFunction asmFunDef = asmFunUpdateRule.getFunction();

+			assert (asmFunDef != null);

+			TypeConstant typeConst = asmFunDef.getReturnType();

+			if (typeConst != null) {

+				leftValueType = typeConst.getFqn();

+			} else {

+				leftValueType = VTCLTypeNameConstants.TOP;

+			}

+			// Check type consistency of locations

+			if (!asmFunDef.getArgumentTypes().isEmpty()) {

+				for (int i = 0; i < asmFunUpdateRule.getLocations().size(); i++) {

+					Term term = asmFunUpdateRule.getLocations().get(i);

+					TypeConstant typeConstArg = asmFunDef.getArgumentTypes()

+							.get(i);

+					typeCheckCompatibility(term, typeConstArg.getFqn(), term

+							.getType());

+				}

+

+			}

+		}

+		// Determine the type of its right value

+		Term value = updateRule.getValue();

+		assert (value != null);

+		String rightValueType = value.getType();

+		// Issue an error message if the type of left value is not a supertype

+		// of the right value

+		if (!typeResolver.isSupertype(modelManager, leftValueType,

+				rightValueType)) {

+			String[] context = new String[] { leftValueType, rightValueType };

+			addTypeError(

+					updateRule.getAnnotations(),

+					VTCLMessages.VTCLValidationErrorCodes_INCOMPATIBLE_TYPE_IN_UPDATE,

+					ErrorSeverity.WARNING, context);

+		}

+	}

+

+	protected void typeCheckNativeFunctionInvocation(

+			NativeFunctionInvocation nativeFunInvoc) {

+		// FIXME To be completed later

+

+	}

+

+	protected void typeCheckAsmFunctionInvocation(

+			ASMFunctionInvocation asmFunInvoc) {

+		ASMFunction asmFun = asmFunInvoc.getCalledFunction();

+		assert (asmFun != null);

+		if (!asmFun.getArgumentTypes().isEmpty()) {

+			for (int i = 0; i < asmFunInvoc.getActualParameters().size(); i++) {

+				Term term = asmFunInvoc.getActualParameters().get(i);

+				TypeConstant typeConst = asmFun.getArgumentTypes().get(i);

+				typeCheckCompatibility(term, typeConst.getFqn(), term.getType());

+			}

+		}

+	}

+

+	protected void typeCheckInitialValue(InitialValue initValue) {

+		ASMFunction asmFun = (ASMFunction) initValue.eContainer();

+		// Check if initial value is consistent with type

+		if (!asmFun.getArgumentTypes().isEmpty()) {

+			for (int i = 0; i < initValue.getLocations().size(); i++) {

+				Term term = initValue.getLocations().get(i);

+				TypeConstant typeConst = asmFun.getArgumentTypes().get(i);

+				typeCheckCompatibility(term, typeConst.getFqn(), term.getType());

+			}

+		}

+		// Check if value is consistent with return type

+		if (asmFun.getReturnType() != null) {

+			Term term = initValue.getValue();

+			TypeConstant typeConst = asmFun.getReturnType();

+			typeCheckCompatibility(term, typeConst.getFqn(), term.getType());

+		}

+	}

+

+	protected void typeCheckVariableDefinition(VariableDefinition varDefine) {

+		// Check if initial value of a variable is consistent with its type

+		Variable var = varDefine.getVariable();

+		TypeConstant typeConst = var.getVariableType();

+		if (typeConst != null) {

+			Term initValue = varDefine.getValue();

+			typeCheckCompatibility(varDefine, typeConst.getFqn(), initValue

+					.getType());

+		}

+	}

+

+	protected void typeCheckCompatibility(AnnotatedElement element,

+			String supertypeStr, String subtypeStr) {

+		if (!typeResolver.isSupertype(modelManager, supertypeStr, subtypeStr)) {

+			// If inconsistent, report error

+			String[] context = new String[] { supertypeStr, subtypeStr };

+			addTypeError(

+					element.getAnnotations(),

+					VTCLMessages.VTCLValidationErrorCodes_INCOMPATIBLE_INITIALVALUE_TYPE,

+					ErrorSeverity.WARNING, context);

+		}

+	}

+

+	protected void typeCheckBinaryTerm(Term term, Term leftOperand,

+			Term rightOperand) {

+		// // Type checking

+		// TODO: Enable the following code if needed for double-checking

+		ValueKind resultKind = TermTypeChecker.typeCheck(term, leftOperand

+				.getKind(), rightOperand.getKind());

+		term.setKind(resultKind);

+		// // Report type error

+		// if (resultKind.getValue() == ValueKind.ERROR) {

+		// String[] context = new String[]{

+		// TermTypeChecker.getOperationString(term),

+		// leftOperand.getKind().getName(), rightOperand.getKind().getName()};

+		// addTypeError(

+		// term.getAnnotations(),

+		// VTCLMessages.VTCLValidationErrorCodes_BINARY_INCOMPATIBLE_TYPES,

+		// ErrorSeverity.WARNING,

+		// context);

+		// }

+		// String based Type checking

+		String resultType = typeCheckBinaryTerm(term.eClass().getName(),

+				leftOperand, rightOperand);

+		term.setType(resultType);

+		// Report type error

+		if (resultType.equals(VTCLTypeNameConstants.BOTTOM)) {

+			String[] context = new String[] {

+					TermTypeChecker.getOperationString(term),

+					leftOperand.getType(), rightOperand.getType() };

+			addTypeError(

+					term.getAnnotations(),

+					VTCLMessages.VTCLValidationErrorCodes_BINARY_INCOMPATIBLE_TYPES,

+					ErrorSeverity.WARNING, context);

+		}

+	}

+

+	protected void typeCheckUnaryTerm(Term term, Term operand) {

+		ValueKind resultKind = TermTypeChecker.typeCheck(term, operand

+				.getKind());

+		term.setKind(resultKind);

+		// // Report type error

+		// if (resultKind.getValue() == ValueKind.ERROR) {

+		// String[] context = new String[]{

+		// TermTypeChecker.getOperationString(term),

+		// operand.getKind().getName(), };

+		// addTypeError(

+		// term.getAnnotations(),

+		// VTCLMessages.VTCLValidationErrorCodes_UNARY_INCOMPATIBLE_TYPES,

+		// ErrorSeverity.WARNING,

+		// context);

+		// }

+		// String based Type checking

+		String resultType = typeCheckUnaryTerm(term.eClass().getName(), operand);

+		term.setType(resultType);

+		// Report type error

+		// TODO resultType nullcheck shouldn't be needed
+		if (resultType.equals(VTCLTypeNameConstants.BOTTOM)) {

+			String[] context = new String[] {

+					TermTypeChecker.getOperationString(term), operand.getType() };

+			addTypeError(

+					term.getAnnotations(),

+					VTCLMessages.VTCLValidationErrorCodes_UNARY_INCOMPATIBLE_TYPES,

+					ErrorSeverity.WARNING, context);

+		}

+

+	}

+

+	protected final String[] longTypeCheckList = {

+			VTCLTypeNameConstants.MYSELF, VTCLTypeNameConstants.STAR,

+			VTCLTypeNameConstants.SUPERTYPE, VTCLTypeNameConstants.ENTITY,

+			VTCLTypeNameConstants.RELATION, VTCLTypeNameConstants.MODELELEMENT };

+	protected final String[] builtInTypeCheckList = {

+			VTCLTypeNameConstants.MYSELF, VTCLTypeNameConstants.STAR };

+	protected final String[] topTypeCheckList = { VTCLTypeNameConstants.TOP,

+			VTCLTypeNameConstants.STAR };

+	protected final String[] bottomTypeCheckList = { VTCLTypeNameConstants.BOTTOM };

+

+	protected String nextTypeToCheck(String typeCode, String operand) {

+		if (typeCode.equals(String.valueOf(VTCLTypeNameConstants.MYSELF))) {

+			return operand;

+		} else if (typeCode.equals(String.valueOf(VTCLTypeNameConstants.STAR))) {

+			return String.valueOf("*");

+		} else if (typeCode.equals(String

+				.valueOf(VTCLTypeNameConstants.SUPERTYPE))) {

+			// TODO: Handle this case properly

+			return String.valueOf(VTCLTypeNameConstants.SUPERTYPE);

+		} else {

+			return typeCode;

+		}

+	}

+

+	private String[] createTypeCheckList(ValueKind kind, String type) {

+		if (kind.equals(ValueKind.MODELELEMENT_LITERAL)) {

+			IModelElement element = modelManager.getElementByName(type);

+			if (element != null) {

+				if (element.isEntity()) {

+					String[] resultList = { VTCLTypeNameConstants.MYSELF,

+							VTCLTypeNameConstants.STAR,

+							VTCLTypeNameConstants.SUPERTYPE,

+							VTCLTypeNameConstants.ENTITY,

+							VTCLTypeNameConstants.MODELELEMENT };

+					return resultList;

+				} else if (element.isRelation()) {

+					String[] resultList = { VTCLTypeNameConstants.MYSELF,

+							VTCLTypeNameConstants.STAR,

+							VTCLTypeNameConstants.SUPERTYPE,

+							VTCLTypeNameConstants.RELATION,

+							VTCLTypeNameConstants.MODELELEMENT };

+					return resultList;

+				} else {

+					// This case should never happen
+					String[] resultList = { VTCLTypeNameConstants.MYSELF,

+							VTCLTypeNameConstants.STAR,

+							VTCLTypeNameConstants.SUPERTYPE,

+							VTCLTypeNameConstants.MODELELEMENT };

+					return resultList;

+				}

+			}

+			// TODO: Handle case when type cannot be resolved in the model space

+			else {

+				if (type.equals(VTCLTypeNameConstants.ENTITY)

+						|| type.equals("entity")) {

+					String[] resultList = { VTCLTypeNameConstants.STAR,

+							VTCLTypeNameConstants.ENTITY,

+							VTCLTypeNameConstants.MODELELEMENT };

+					return resultList;

+				} else if (type.equals(VTCLTypeNameConstants.RELATION)

+						|| type.equals("relation")) {

+					String[] resultList = { VTCLTypeNameConstants.STAR,

+							VTCLTypeNameConstants.RELATION,

+							VTCLTypeNameConstants.MODELELEMENT };

+					return resultList;

+				} else {

+					String[] resultList = { VTCLTypeNameConstants.STAR,

+							VTCLTypeNameConstants.MODELELEMENT };

+					return resultList;

+				}

+

+			}

+		} else if (kind.equals(ValueKind.UNDEF_LITERAL)) {

+			return topTypeCheckList;

+		} else if (kind.equals(ValueKind.ERROR_LITERAL)) {

+			return bottomTypeCheckList;

+		} else {

+			return builtInTypeCheckList;

+		}

+	}

+

+	protected String typeCheckBinaryTerm(String termClassName,

+			Term leftOperandTerm, Term rightOperandTerm) {

+		String leftOperand = leftOperandTerm.getType();

+		String rightOperand = rightOperandTerm.getType();

+		String[] leftCheckList;

+		String[] rightCheckList;

+		ValueKind leftKind = leftOperandTerm.getKind(); // typeResolver.getValueKind(leftOperand);

+		ValueKind rightKind = rightOperandTerm.getKind(); // typeResolver.getValueKind(rightOperand);

+		leftCheckList = createTypeCheckList(leftKind, leftOperand);

+		rightCheckList = createTypeCheckList(rightKind, rightOperand);

+

+		for (String leftType : leftCheckList) {

+			String leftCheck = nextTypeToCheck(leftType, leftOperand);

+			for (String rightType : rightCheckList) {

+				String rightCheck = nextTypeToCheck(rightType, rightOperand);

+				StringTriple triple = new StringTriple(termClassName,

+						leftCheck, rightCheck);

+				BinaryTypeJudgement judgement = binaryTypeRuleMap.get(triple);

+				if (judgement != null) {

+					return judgement.getResult();

+				}

+			}

+		}

+

+		// // GivenType x GivenType

+		// StringTriple triple = new StringTriple(termClassName, leftOperand,

+		// rightOperand);

+		// BinaryTypeJudgement judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// IModelElement leftElement =

+		// modelManager.getElementByName(leftOperand);

+		// IModelElement rightElement =

+		// modelManager.getElementByName(rightOperand);

+		// if (leftElement != null) {

+		// // ENTITY x GivenType

+		// if (leftElement.isEntity()) {

+		// triple = new StringTriple(termClassName, "ENTITY", rightOperand);

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// if (rightElement != null) {

+		// // ENTITY x ENTITY

+		// if (rightElement.isEntity()) {

+		// triple = new StringTriple(termClassName, "ENTITY", "ENTITY");

+		// }

+		// // ENTITY x RELATION

+		// else if (rightElement.isRelation()) {

+		// triple = new StringTriple(termClassName, "ENTITY", "RELATION");

+		// }

+		// // ENTITY x MODELELEMENT

+		// else {

+		// triple = new StringTriple(termClassName, "ENTITY", "MODELELEMENT");

+		// }

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// }

+		// // rightOperand cannot be resolved to a model element

+		// // else {

+		// // ENTITY x TOP

+		// triple = new StringTriple(termClassName, "ENTITY", "TOP");

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// // ENTITY x *

+		// triple = new StringTriple(termClassName, "ENTITY", "*");

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// // }

+		// }

+		// // RELATION x GivenType

+		// else if (leftElement.isRelation()) {

+		// triple = new StringTriple(termClassName, "RELATION", rightOperand);

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// if (rightElement != null) {

+		// // RELATION x ENTITY

+		// if (rightElement.isEntity()) {

+		// triple = new StringTriple(termClassName, "RELATION", "ENTITY");

+		// }

+		// // RELATION x RELATION

+		// else if (rightElement.isRelation()) {

+		// triple = new StringTriple(termClassName, "RELATION", "RELATION");

+		// }

+		// // RELATION x MODELELEMENT

+		// else {

+		// triple = new StringTriple(termClassName, "RELATION", "MODELELEMENT");

+		// }

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// }

+		// // rightOperand cannot be resolved to a model element

+		// // else {

+		// // RELATION x TOP

+		// triple = new StringTriple(termClassName, "RELATION", "TOP");

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// // RELATION x *

+		// triple = new StringTriple(termClassName, "RELATION", "*");

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// // }

+		// }

+		// // MODELELEMENT x GivenType

+		// else {

+		// triple = new StringTriple(termClassName, "MODELELEMENT",

+		// rightOperand);

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// if (rightElement != null) {

+		// // MODELELEMENT x ENTITY

+		// if (rightElement.isEntity()) {

+		// triple = new StringTriple(termClassName, "MODELELEMENT", "ENTITY");

+		// }

+		// // MODELELEMENT x RELATION

+		// else if (rightElement.isRelation()) {

+		// triple = new StringTriple(termClassName, "MODELELEMENT", "RELATION");

+		// }

+		// // MODELELEMENT x MODELELEMENT

+		// else {

+		// triple = new StringTriple(termClassName, "MODELELEMENT",

+		// "MODELELEMENT");

+		// }

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// }

+		// // rightOperand cannot be resolved to a model element

+		// // else {

+		// // MODELELEMENT x TOP

+		// triple = new StringTriple(termClassName, "MODELELEMENT", "TOP");

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// // ENTITY x *

+		// triple = new StringTriple(termClassName, "MODELELEMENT", "*");

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// // }

+		// }

+		// }

+		// // leftOperand cannot be resolved to a model element

+		// // else {

+		// // TOP X GivenType

+		// triple = new StringTriple(termClassName, "TOP", rightOperand);

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// if (rightElement != null) {

+		// // TOP x ENTITY

+		// if (rightElement.isEntity()) {

+		// triple = new StringTriple(termClassName, "TOP", "ENTITY");

+		// }

+		// // TOP x RELATION

+		// else if (rightElement.isRelation()) {

+		// triple = new StringTriple(termClassName, "TOP", "RELATION");

+		// }

+		// // TOP x MODELELEMENT

+		// else {

+		// triple = new StringTriple(termClassName, "TOP", "MODELELEMENT");

+		// }

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// }

+		// // rightOperand cannot be resolved to a model element

+		// // else {

+		// // TOP x TOP

+		// triple = new StringTriple(termClassName, "TOP", "TOP");

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// // TOP x *

+		// triple = new StringTriple(termClassName, "TOP", "*");

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// // }

+		//

+		// // * X GivenType

+		// triple = new StringTriple(termClassName, "*", rightOperand);

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// if (rightElement != null) {

+		// // * x ENTITY

+		// if (rightElement.isEntity()) {

+		// triple = new StringTriple(termClassName, "*", "ENTITY");

+		// }

+		// // * x RELATION

+		// else if (rightElement.isRelation()) {

+		// triple = new StringTriple(termClassName, "*", "RELATION");

+		// }

+		// // * x MODELELEMENT

+		// else {

+		// triple = new StringTriple(termClassName, "*", "MODELELEMENT");

+		// }

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// }

+		// // rightOperand cannot be resolved to a model element

+		// // else {

+		// // * x TOP

+		// triple = new StringTriple(termClassName, "*", "TOP");

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// // * x *

+		// triple = new StringTriple(termClassName, "*", "*");

+		// judgement = binaryTypeRuleMap.get(triple);

+		// if (judgement != null) {

+		// return judgement.getResult();

+		// }

+		// // }

+		// // }

+		return VTCLTypeNameConstants.BOTTOM;

+	}

+

+	protected String typeCheckUnaryTerm(String termClassName, Term operand) {

+		String operandStr = operand.getType();

+		String resultType = VTCLTypeNameConstants.BOTTOM;

+		// XXX when multiple custom judgements are available, the result might

+		// vary

+		// Handle custom type judgment

+		List<CustomTypeJudgement> customList = customTypeRuleMap

+				.get(termClassName);

+		if (customList != null) {

+			for (CustomTypeJudgement customJudgement : customList) {

+				if (customJudgement.getName().equals("typeSource")) {

+					resultType = CustomTypeJudgementCheck.typeSource(

+							modelManager, operandStr);

+				} else if (customJudgement.getName().equals("typeTarget")) {

+					resultType = CustomTypeJudgementCheck.typeTarget(

+							modelManager, operandStr);

+				} else if (customJudgement.getName().equals("typeInverse")) {

+					resultType = CustomTypeJudgementCheck.typeInverse(

+							modelManager, operandStr);

+				} else if (customJudgement.getName().equals(

+						"typeElementReference")) {

+					resultType = CustomTypeJudgementCheck.typeElementReference(

+							modelManager, operand);

+				}

+			}

+		}

+		// If Custom judgement was successful, return its result

+		if (resultType != VTCLTypeNameConstants.BOTTOM) {

+			return resultType;

+		}

+		String[] leftCheckList;

+		ValueKind leftKind = operand.getKind();// typeResolver.getValueKind(operandStr);

+		leftCheckList = createTypeCheckList(leftKind, operandStr);

+		// XXX in case of multiple matching unary type rules the result may vary

+		for (String leftType : leftCheckList) {

+			String leftCheck = nextTypeToCheck(leftType, operandStr);

+			StringPair pair = new StringPair(termClassName, leftCheck);

+			UnaryTypeJudgement judgement = unaryTypeRuleMap.get(pair);

+			if (judgement != null) {

+				return judgement.getResult();

+			}

+		}

+

+		//

+		// // Handle unary type judgment: with given operand

+		// StringPair pair = new StringPair(termClassName, operand);

+		// UnaryTypeJudgement unaryJudgement = unaryTypeRuleMap.get(pair);

+		// if (unaryJudgement != null) {

+		// return unaryJudgement.getResult();

+		// }

+		// IModelElement element = modelManager.getElementByName(operand);

+		// // Handle unary type judgment: with ENTITY or RELATION

+		// if (element != null) {

+		// if (element.isEntity()) {

+		// pair = new StringPair(termClassName, "ENTITY");

+		// }

+		// else if (element.isRelation()) {

+		// pair = new StringPair(termClassName, "RELATION");

+		//

+		// }

+		// // Handle unary type judgment: with MODELELEMENT

+		// else {

+		// pair = new StringPair(termClassName, "MODELELEMENT");

+		// }

+		// unaryJudgement = unaryTypeRuleMap.get(pair);

+		// if (unaryJudgement != null) {

+		// return unaryJudgement.getResult();

+		// }

+		// }

+		// // else {

+		// // Handle unary type judgment: with TOP

+		// pair = new StringPair(termClassName, "TOP");

+		// unaryJudgement = unaryTypeRuleMap.get(pair);

+		// if (unaryJudgement != null) {

+		// return unaryJudgement.getResult();

+		// }

+		// // Handle unary type judgment: with *

+		// pair = new StringPair(termClassName, "*");

+		// unaryJudgement = unaryTypeRuleMap.get(pair);

+		// if (unaryJudgement != null) {

+		// return unaryJudgement.getResult();

+		// }

+		// // }

+		return resultType;

+	}

+

+}

diff --git a/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/VTCLTypeNameConstants.java b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/VTCLTypeNameConstants.java
new file mode 100644
index 0000000..8bce64f
--- /dev/null
+++ b/org.eclipse.viatra2.loaders.vtcl_lpgparser/src/org/eclipse/viatra2/lpgparser/typechecker/VTCLTypeNameConstants.java
@@ -0,0 +1,58 @@
+/**
+* Copyright (c) 2008 - 2010 OptXware Research and Development LLC.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Daniel Varro - Initial API and implementation
+*/
+/**
+ * 
+ */
+package org.eclipse.viatra2.lpgparser.typechecker;
+
+/**
+ * @author Zoltan Ujhelyi
+ */
+public class VTCLTypeNameConstants {
+	/**
+	 * Represents a supertype in the context of the type checker
+	 */
+	public static final String SUPERTYPE = "SUPERTYPE";
+	/**
+	 * Represents an any type value in the type checker
+	 */
+	public static final String STAR = "STAR";
+	/**
+	 * Represent the self type in the type checker
+	 */
+	public static final String MYSELF = "MYSELF";
+	/**
+	 * Represents an invalid type value (contradictory constraints)
+	 */
+	public static final String BOTTOM = "BOTTOM";
+	/**
+	 * Represents an unknown type value (any type is possible)
+	 */
+	public static final String TOP = "TOP";
+	/**
+	 * Represents a model element type (common parent)
+	 */
+	public static final String MODELELEMENT = "MODELELEMENT";
+	/**
+	 * Represents a relation type (common parent)
+	 */
+	public static final String RELATION = "RELATION";
+	/**
+	 * Represents an entity type (common parent)
+	 */
+	public static final String ENTITY = "ENTITY";
+
+	public static boolean isConcreteTypeString(String typeStr) {
+		return !typeStr.contentEquals(VTCLTypeNameConstants.MODELELEMENT)
+				&& !typeStr.contentEquals(VTCLTypeNameConstants.ENTITY)
+				&& !typeStr.contentEquals(VTCLTypeNameConstants.RELATION);
+	}
+}
diff --git a/org.eclipse.viatra2.visualisation/.classpath b/org.eclipse.viatra2.visualisation/.classpath
new file mode 100644
index 0000000..ad32c83
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.viatra2.visualisation/.fbprefs b/org.eclipse.viatra2.visualisation/.fbprefs
new file mode 100644
index 0000000..ae881fe
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/.fbprefs
@@ -0,0 +1,156 @@
+#FindBugs User Preferences
+#Tue Jan 20 00:17:54 CET 2009
+detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true
+detectorBCPMethodReturnCheck=BCPMethodReturnCheck|false
+detectorBadAppletConstructor=BadAppletConstructor|false
+detectorBadResultSetAccess=BadResultSetAccess|true
+detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true
+detectorBadUseOfReturnValue=BadUseOfReturnValue|true
+detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true
+detectorBooleanReturnNull=BooleanReturnNull|true
+detectorBuildInterproceduralCallGraph=BuildInterproceduralCallGraph|false
+detectorBuildObligationPolicyDatabase=BuildObligationPolicyDatabase|true
+detectorCallToUnsupportedMethod=CallToUnsupportedMethod|true
+detectorCalledMethods=CalledMethods|true
+detectorCheckCalls=CheckCalls|false
+detectorCheckExpectedWarnings=CheckExpectedWarnings|false
+detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true
+detectorCheckTypeQualifiers=CheckTypeQualifiers|true
+detectorCloneIdiom=CloneIdiom|true
+detectorComparatorIdiom=ComparatorIdiom|true
+detectorConfusedInheritance=ConfusedInheritance|true
+detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true
+detectorCrossSiteScripting=CrossSiteScripting|true
+detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true
+detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true
+detectorDontUseEnum=DontUseEnum|true
+detectorDroppedException=DroppedException|true
+detectorDumbMethodInvocations=DumbMethodInvocations|true
+detectorDumbMethods=DumbMethods|true
+detectorDuplicateBranches=DuplicateBranches|true
+detectorEmptyZipFileEntry=EmptyZipFileEntry|true
+detectorEqStringTest=EqStringTest|false
+detectorEqualsOperandShouldHaveClassCompatibleWithThis=EqualsOperandShouldHaveClassCompatibleWithThis|true
+detectorFieldItemSummary=FieldItemSummary|true
+detectorFinalizerNullsFields=FinalizerNullsFields|true
+detectorFindBadCast=FindBadCast|false
+detectorFindBadCast2=FindBadCast2|true
+detectorFindBadEqualsImplementation=FindBadEqualsImplementation|false
+detectorFindBadForLoop=FindBadForLoop|true
+detectorFindBugsSummaryStats=FindBugsSummaryStats|true
+detectorFindCircularDependencies=FindCircularDependencies|false
+detectorFindDeadLocalStores=FindDeadLocalStores|true
+detectorFindDoubleCheck=FindDoubleCheck|true
+detectorFindEmptySynchronizedBlock=FindEmptySynchronizedBlock|true
+detectorFindFieldSelfAssignment=FindFieldSelfAssignment|true
+detectorFindFinalizeInvocations=FindFinalizeInvocations|true
+detectorFindFloatEquality=FindFloatEquality|true
+detectorFindFloatMath=FindFloatMath|false
+detectorFindHEmismatch=FindHEmismatch|true
+detectorFindInconsistentSync2=FindInconsistentSync2|true
+detectorFindJSR166LockMonitorenter=FindJSR166LockMonitorenter|true
+detectorFindLocalSelfAssignment2=FindLocalSelfAssignment2|true
+detectorFindMaskedFields=FindMaskedFields|true
+detectorFindMismatchedWaitOrNotify=FindMismatchedWaitOrNotify|true
+detectorFindNakedNotify=FindNakedNotify|true
+detectorFindNonSerializableStoreIntoSession=FindNonSerializableStoreIntoSession|true
+detectorFindNonSerializableValuePassedToWriteObject=FindNonSerializableValuePassedToWriteObject|true
+detectorFindNonShortCircuit=FindNonShortCircuit|true
+detectorFindNullDeref=FindNullDeref|true
+detectorFindNullDerefsInvolvingNonShortCircuitEvaluation=FindNullDerefsInvolvingNonShortCircuitEvaluation|true
+detectorFindOpenStream=FindOpenStream|true
+detectorFindPuzzlers=FindPuzzlers|true
+detectorFindRefComparison=FindRefComparison|true
+detectorFindReturnRef=FindReturnRef|true
+detectorFindRunInvocations=FindRunInvocations|true
+detectorFindSelfComparison=FindSelfComparison|true
+detectorFindSelfComparison2=FindSelfComparison2|true
+detectorFindSleepWithLockHeld=FindSleepWithLockHeld|true
+detectorFindSpinLoop=FindSpinLoop|true
+detectorFindSqlInjection=FindSqlInjection|true
+detectorFindTwoLockWait=FindTwoLockWait|true
+detectorFindUncalledPrivateMethods=FindUncalledPrivateMethods|true
+detectorFindUnconditionalWait=FindUnconditionalWait|true
+detectorFindUninitializedGet=FindUninitializedGet|true
+detectorFindUnrelatedTypesInGenericContainer=FindUnrelatedTypesInGenericContainer|true
+detectorFindUnreleasedLock=FindUnreleasedLock|true
+detectorFindUnsatisfiedObligation=FindUnsatisfiedObligation|true
+detectorFindUnsyncGet=FindUnsyncGet|true
+detectorFindUselessControlFlow=FindUselessControlFlow|true
+detectorFormatStringChecker=FormatStringChecker|true
+detectorHugeSharedStringConstants=HugeSharedStringConstants|true
+detectorIDivResultCastToDouble=IDivResultCastToDouble|true
+detectorIncompatMask=IncompatMask|true
+detectorInconsistentAnnotations=InconsistentAnnotations|true
+detectorInefficientMemberAccess=InefficientMemberAccess|false
+detectorInefficientToArray=InefficientToArray|true
+detectorInfiniteLoop=InfiniteLoop|true
+detectorInfiniteRecursiveLoop=InfiniteRecursiveLoop|true
+detectorInfiniteRecursiveLoop2=InfiniteRecursiveLoop2|false
+detectorInheritanceUnsafeGetResource=InheritanceUnsafeGetResource|true
+detectorInitializationChain=InitializationChain|true
+detectorInstantiateStaticClass=InstantiateStaticClass|true
+detectorInvalidJUnitTest=InvalidJUnitTest|true
+detectorIteratorIdioms=IteratorIdioms|true
+detectorLazyInit=LazyInit|true
+detectorLoadOfKnownNullValue=LoadOfKnownNullValue|true
+detectorLockedFields=LockedFields|false
+detectorMethodReturnCheck=MethodReturnCheck|true
+detectorMethods=Methods|true
+detectorMultithreadedInstanceAccess=MultithreadedInstanceAccess|true
+detectorMutableLock=MutableLock|true
+detectorMutableStaticFields=MutableStaticFields|true
+detectorNaming=Naming|true
+detectorNoteAnnotationRetention=NoteAnnotationRetention|true
+detectorNoteCheckReturnValue=NoteCheckReturnValue|true
+detectorNoteCheckReturnValueAnnotations=NoteCheckReturnValueAnnotations|true
+detectorNoteDirectlyRelevantTypeQualifiers=NoteDirectlyRelevantTypeQualifiers|true
+detectorNoteJCIPAnnotation=NoteJCIPAnnotation|true
+detectorNoteNonNullAnnotations=NoteNonNullAnnotations|true
+detectorNoteNonnullReturnValues=NoteNonnullReturnValues|true
+detectorNoteSuppressedWarnings=NoteSuppressedWarnings|true
+detectorNoteUnconditionalParamDerefs=NoteUnconditionalParamDerefs|true
+detectorNumberConstructor=NumberConstructor|true
+detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true
+detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true
+detectorPublicSemaphores=PublicSemaphores|false
+detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true
+detectorReadReturnShouldBeChecked=ReadReturnShouldBeChecked|true
+detectorRedundantInterfaces=RedundantInterfaces|true
+detectorReflectiveClasses=ReflectiveClasses|true
+detectorRepeatedConditionals=RepeatedConditionals|true
+detectorResolveAllReferences=ResolveAllReferences|false
+detectorRuntimeExceptionCapture=RuntimeExceptionCapture|true
+detectorSerializableIdiom=SerializableIdiom|true
+detectorStartInConstructor=StartInConstructor|true
+detectorStaticCalendarDetector=StaticCalendarDetector|true
+detectorStringConcatenation=StringConcatenation|true
+detectorSuperfluousInstanceOf=SuperfluousInstanceOf|true
+detectorSuspiciousThreadInterrupted=SuspiciousThreadInterrupted|true
+detectorSwitchFallthrough=SwitchFallthrough|true
+detectorSynchronizationOnSharedBuiltinConstant=SynchronizationOnSharedBuiltinConstant|true
+detectorSynchronizeAndNullCheckField=SynchronizeAndNullCheckField|true
+detectorSynchronizeOnClassLiteralNotGetClass=SynchronizeOnClassLiteralNotGetClass|true
+detectorSynchronizingOnContentsOfFieldToProtectField=SynchronizingOnContentsOfFieldToProtectField|true
+detectorTestASM=TestASM|false
+detectorTestDataflowAnalysis=TestDataflowAnalysis|false
+detectorTestingGround=TestingGround|false
+detectorTrainFieldStoreTypes=TrainFieldStoreTypes|true
+detectorTrainNonNullAnnotations=TrainNonNullAnnotations|true
+detectorTrainUnconditionalDerefParams=TrainUnconditionalDerefParams|true
+detectorURLProblems=URLProblems|true
+detectorUncallableMethodOfAnonymousClass=UncallableMethodOfAnonymousClass|true
+detectorUnnecessaryMath=UnnecessaryMath|true
+detectorUnreadFields=UnreadFields|true
+detectorUseObjectEquals=UseObjectEquals|false
+detectorUselessSubclassMethod=UselessSubclassMethod|false
+detectorVarArgsProblems=VarArgsProblems|true
+detectorVolatileUsage=VolatileUsage|true
+detectorWaitInLoop=WaitInLoop|true
+detectorWrongMapIterator=WrongMapIterator|true
+detectorXMLFactoryBypass=XMLFactoryBypass|true
+detector_threshold=2
+effort=min
+filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,EXPERIMENTAL,I18N,MALICIOUS_CODE,MT_CORRECTNESS,PERFORMANCE,SECURITY,STYLE|false
+filter_settings_neg=|
+run_at_full_build=false
diff --git a/org.eclipse.viatra2.visualisation/.project b/org.eclipse.viatra2.visualisation/.project
new file mode 100644
index 0000000..7ae47b2
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.viatra2.visualisation</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.viatra2.visualisation/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.viatra2.visualisation/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..bef7d8f
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Fri Jan 21 11:03:49 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.6
diff --git a/org.eclipse.viatra2.visualisation/META-INF/MANIFEST.MF b/org.eclipse.viatra2.visualisation/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..315067b
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/META-INF/MANIFEST.MF
@@ -0,0 +1,30 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: VIATRA2 R3 Modelspace Visualisation Plugin
+Bundle-SymbolicName: org.eclipse.viatra2.visualisation;singleton:=true
+Bundle-Version: 3.3.0.qualifier
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.viatra2.gui,
+ org.eclipse.viatra2.core2;bundle-version="3.0.0";visibility:=reexport,
+ org.eclipse.zest.core;bundle-version="[1.1.0,2.0.0)";visibility:=reexport,
+ org.eclipse.zest.layouts;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.viatra2.editor;bundle-version="3.0.0",
+ org.eclipse.ui.views,
+ org.eclipse.viatra2.gtasm.model;bundle-version="3.0.0",
+ org.eclipse.core.resources,
+ org.eclipse.ui.views.properties.tabbed,
+ org.eclipse.ui.ide;bundle-version="3.5.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-Activator: org.eclipse.viatra2.visualisation.VisualisationPlugin
+Bundle-ClassPath: .
+Bundle-Vendor: Zoltan Ujhelyi / BUTE-DMIS
+Export-Package: org.eclipse.viatra2.visualisation,
+ org.eclipse.viatra2.visualisation.common.extensions,
+ org.eclipse.viatra2.visualisation.common.filters,
+ org.eclipse.viatra2.visualisation.common.labelproviders,
+ org.eclipse.viatra2.visualisation.layouts;uses:="org.eclipse.zest.layouts",
+ org.eclipse.viatra2.visualisation.modelspace.datasource,
+ org.eclipse.viatra2.visualisation.modelspace.datasource.filter,
+ org.eclipse.viatra2.visualisation.view
diff --git a/org.eclipse.viatra2.visualisation/build.properties b/org.eclipse.viatra2.visualisation/build.properties
new file mode 100644
index 0000000..be5d19a
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               html/,\
+               icons/,\
+               toc.xml
+jre.compilation.profile = JavaSE-1.6
diff --git a/org.eclipse.viatra2.visualisation/html/configuration.html b/org.eclipse.viatra2.visualisation/html/configuration.html
new file mode 100644
index 0000000..6c94cdc
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/html/configuration.html
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+  <title>Model Space Visualisation Configuration</title>
+  <link type="text/css" rel="stylesheet" media="all" href="style.css">
+</head>
+
+<body>
+<h1>Model Space Visualisation Configuration</h1>
+
+<h2>Color Configuration</h2>
+
+<p>It is possible to redefine the colors used in the visualisation of the model
+space elements. The color definitions allow to set the colors of the three
+visual elements:</p>
+<ul>
+  <li>Entity Nodes</li>
+  <li>Relation Nodes (only present when using the Full Modelspace Provider)</li>
+  <li>Arcs </li>
+</ul>
+
+<p>The settings are present in the <strong>Colors and Fonts</strong> preference
+page (<em>General/Appearance/Colors and Fonts</em>) where a new category called
+Viatra2 Visualisation is used to define colors for the graphical elements.</p>
+
+<div class="image">
+<img src="images/colors.png"> 
+
+<p>The color configuration preference page</p>
+</div>
+
+<p>There is a live preview graph available in the Preference page, which always
+displays how the graph would look with the currently selected colors. It is
+possible to select any arc or graph node to allow checking the colors of the
+highlighted elements.</p>
+
+<p><strong>Please note!</strong> When the color settings are changed when a
+model space is already being visualised the changes will not represented
+automatically. The colors are only refreshed after the redrawing of the graph
+(which can be triggered e.g. by selecting a layout algorithm).</p>
+</body>
+</html>
diff --git a/org.eclipse.viatra2.visualisation/html/handling.html b/org.eclipse.viatra2.visualisation/html/handling.html
new file mode 100644
index 0000000..422fe0c
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/html/handling.html
@@ -0,0 +1,130 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+<title>Using the Graph View</title>
+<link type="text/css" rel="stylesheet" media="all" href="style.css">
+</head>
+
+<body>
+<h1>Using the Graph View</h1>
+
+<h2 id="elementselect">Selecting Model Elements</h2>
+<h3>Using the Viatra Model Editor to Select the Model Elements</h3>
+<p>Four new menu items are added to the popup menu of the Viatra
+Model Editor:</p>
+<dl>
+	<dt>Add Selected Subtree to the Graph View</dt>
+	<dd>Using this menu item it is possible to add a containment
+	subtree to the graph view. This menu item is enabled if a single model
+	element is selected in the model editor.</dd>
+	<dt>Remove Selected Subtree from the Graph View</dt>
+	<dd>Using this menu item it is possible to remove a containment
+	subtree from the graph view. This menu item is enabled if a single
+	model element is selected in the model editor.</dd>
+	<dt>Add Selected Elements to the Graph View</dt>
+	<dd>Using this menu item it is possible to add a list of selected
+	elements (but only the selected elements) to the graph viewer. This
+	menu item is enabled if at least a single model element is selected in
+	the model editor.</dd>
+	<dt>Remove Selected Elements from the Graph View</dt>
+	<dd>Using this menu item it is possible to remove a list of
+	selected elements (but only the selected elements) from the graph view.
+	This menu item is enabled if at least a single model element is
+	selected in the model editor.</dd>
+</dl>
+<p>By using any of the described methods when adding a relation to
+the graph, it makes sure, that both ends of the relation are present in
+the graph viewer, while removing any model element will make sure that
+any connected relations will also be removed.</p>
+
+<p>It is also possible to use the <strong>Visualise Model
+Space</strong> menu item in the popup menu of the model space in <em>Viatra2
+Model Spaces</em> view. This item will add the entire model space to the
+graph viewer (the same result can be reached when using the Add Selected
+Subtree to the Graph View menu item of the root element in the menu
+editor)
+<p><strong>Warning!</strong> If a lot of model elements are selected
+for inclusion, the addition process can hang the computer/Eclipse
+instance for quite a lot of time. To avoid this it is not recommended to
+select more than a few dozens of model elements.</p>
+
+<h3>Using the Model Space Visualisation View to Select Model
+Elements</h3>
+<p>The selected elements in the Model Space Visualisation view can
+be removed by pressing the Del or Backspace keys.</p>
+<p>The <strong>Filter</strong> submenu in the pulldown menu of the view contains options to remove
+the built-in relationships from the graph view: if checked, the elements respectively will hide
+the containment, the inheritance and the typeOf relationships. 

+<h2 id="view">View related settings</h2>
+
+<p>It is possible to set some display options in the view pulldown
+menu. These options include the setting of the automatic layout
+algorithm, setting a visualisation type and changing the zoom level.</p>
+<p>To change to zoom level, use the predefined levels in the
+pulldown menu of the view (these are Page, 50%, 75%, 100%, 150%, 200%,
+250%, 300%, 400%), the changes will be visible instantly.
+<h3>Layout algorithms</h3>
+<p>Currently five layout algorithms are included: Radial, Spring,
+Grid, Hierarchy and Simulated Cooling layout.</p>
+<dl>
+	<dt>Radial layout</dt>
+	<dd>Tries to represent the graph nodes on concentric circles. <img
+		src="images/layout_radial.png"
+		alt="A sample of the radial layout algorithm" /></dd>
+	<dt>Spring layout</dt>
+	<dd>Models each model arc as a spring, while the nodes shall
+	become as far from each other as possible.<img
+		src="images/layout_spring.png"
+		alt="A sample of the spring layout algorithm" /></dd>
+	<dt>Grid layout</dt>
+	<dd>Places all nodes at a point of a grid and draws the arcs
+	between these grid points. <img src="images/layout_grid.png"
+		alt="A sample of the grid layout algorithm."></dd>
+	<dt>Hierarchy layout</dt>
+	<dd>Tries to show a hierarchy of the selected model elements. <img
+		src="images/layout_hierarchy.png"
+		alt="A sample of the hierarchy layout algorithm" /></dd>
+	<dt>Simulated Cooling layout</dt>
+	<dd>Tries to show a graph looking generally good (nodes are far
+	from each other, the arcs should not cross, etc.). <img
+		src="images/layout_cooling.png"
+		alt="A sample of the simulated cooling layout algorithm" /></dd>
+</dl>
+<h3>Providers</h3>
+<p>The system allows representing the relations either as nodes or
+arcs in the graph. To achieve this, you have to choose between the
+available content providers: full provider and reduced provider.</p>
+
+<dl>
+	<dt>Full provider</dt>
+	<dd>The full provider displays relations as nodes, allowing the
+	visualisation of the relations between the relations. The examples in
+	the layout section were using the full provider.</dd>
+	<dt>Reduced provider</dt>
+	<dd>The reduced provider displays relations as arcs in the graph,
+	thus making the visualised graph smaller. In this reduced size the
+	containment, inheritance and typeOf relationships can also be
+	presented.<img src="images/provider_reduced.png"
+		alt="A sample of the reduced provider" /></dd>
+</dl>
+
+<h2 id="capabilities">Other capabilities</h2>
+<p>It is possible to save the graph as a PNG graphics file using the
+<strong>Save image as file</strong> menu item in the pulldown menu.</p>
+<p>The view synchronises the selection of the graph model and the
+model editor: it tries to select exactly the same elements in both
+representations (it is possible that some elements are selected in the
+model editor that are not present in the graph - in this case it is not
+guaranteed that the selection is kept the same in the editor and the
+view).</p>
+<p>If a new model element is added in the model editor it will not
+be automatically added to the graph viewer - but it is possible that
+after changing it's settings it will appear (if one of it's containers
+contained elements are added to the graph previously).</p>
+<p>The <strong>Properties</strong> view can also be used together
+with the Model Space Visualiser: the selected elements properties will
+appear there in the same way as they would when using the Model Editor.</p>
+</body>
+</html>
diff --git a/org.eclipse.viatra2.visualisation/html/images/addsubtree.png b/org.eclipse.viatra2.visualisation/html/images/addsubtree.png
new file mode 100644
index 0000000..6371a3b
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/html/images/addsubtree.png
Binary files differ
diff --git a/org.eclipse.viatra2.visualisation/html/images/colors.png b/org.eclipse.viatra2.visualisation/html/images/colors.png
new file mode 100644
index 0000000..e640ea9
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/html/images/colors.png
Binary files differ
diff --git a/org.eclipse.viatra2.visualisation/html/images/graph.png b/org.eclipse.viatra2.visualisation/html/images/graph.png
new file mode 100644
index 0000000..0d4da52
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/html/images/graph.png
Binary files differ
diff --git a/org.eclipse.viatra2.visualisation/html/images/layout_cooling.png b/org.eclipse.viatra2.visualisation/html/images/layout_cooling.png
new file mode 100644
index 0000000..e57697d
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/html/images/layout_cooling.png
Binary files differ
diff --git a/org.eclipse.viatra2.visualisation/html/images/layout_grid.png b/org.eclipse.viatra2.visualisation/html/images/layout_grid.png
new file mode 100644
index 0000000..59786ae
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/html/images/layout_grid.png
Binary files differ
diff --git a/org.eclipse.viatra2.visualisation/html/images/layout_hierarchy.png b/org.eclipse.viatra2.visualisation/html/images/layout_hierarchy.png
new file mode 100644
index 0000000..280915e
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/html/images/layout_hierarchy.png
Binary files differ
diff --git a/org.eclipse.viatra2.visualisation/html/images/layout_radial.png b/org.eclipse.viatra2.visualisation/html/images/layout_radial.png
new file mode 100644
index 0000000..59786ae
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/html/images/layout_radial.png
Binary files differ
diff --git a/org.eclipse.viatra2.visualisation/html/images/layout_spring.png b/org.eclipse.viatra2.visualisation/html/images/layout_spring.png
new file mode 100644
index 0000000..a4c6299
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/html/images/layout_spring.png
Binary files differ
diff --git a/org.eclipse.viatra2.visualisation/html/images/provider_reduced.png b/org.eclipse.viatra2.visualisation/html/images/provider_reduced.png
new file mode 100644
index 0000000..7676361
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/html/images/provider_reduced.png
Binary files differ
diff --git a/org.eclipse.viatra2.visualisation/html/started.html b/org.eclipse.viatra2.visualisation/html/started.html
new file mode 100644
index 0000000..b2021bf
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/html/started.html
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+  <title>How to Visualise a Model Space?</title>
+  <link type="text/css" rel="stylesheet" media="all" href="style.css">
+</head>
+
+<body>
+<h2>How to Visualise a Model Space?</h2>
+
+<p>In order to visualise a model space it has to be opened (if you are unsure
+how to do this there is a tutorial in the <a
+href="http://wiki.eclipse.org/VIATRA2/Basics">VIATRA wiki</a> web page).</p>
+
+<h2>Adding elements to the graph view</h2>
+
+<p>To create the graph the model elements used in the graph have to be chosen.
+This can happen by right-clicking an element, and selecting the <strong>Add
+Selected Subtree to the Graph View</strong> menu item.</p>
+
+<div class="image">
+<img src="images/addsubtree.png"> 
+
+<p>Selecting the subtree to add</p>
+</div>
+
+<div class="image">
+<img src="images/graph.png"> 
+
+<p>The visualised subtree</p>
+</div>
+
+<p>After the selection happened in a short time the graph appear in the
+<strong>Model Space Visualisation</strong> view (and the view opens if it was
+not open).</p>
+
+<p></p>
+
+<p><strong>Warning!</strong> If a lot of model elements are selected for
+inclusion, the addition process can hang the computer/Eclipse instance for
+quite a lot of time. To avoid this it is not recommended to select more than a
+few dozens of model elements.</p>
+
+<p></p>
+
+<p>For more details related to adding model elements to the graph view see: <a
+href="handling.html#elementselect">Selecting Model Elements</a>.</p>
+
+<h2>Using the Graph View</h2>
+
+<p>It is possible to alter the graph output after it is created. With the help
+of the mouse the nodes can be moved anywhere in the view, thus manually
+correcting the layout.</p>
+
+<p>In the view pulldown menu there are further options to select an automatic
+layout, hide some relationships, etc. These are described in detail in <a
+href="handling.html#view">View Related Settings</a>.</p>
+
+<p>It is also possible to save the created graph as a PNG image using the view
+dropdown menu.</p>
+
+<p>For more details related to customizing the graph view see: <a
+href="handling.html#view">View Related Settings</a> and <a
+href="configuration.html">Configuration</a>.</p>
+</body>
+</html>
diff --git a/org.eclipse.viatra2.visualisation/html/style.css b/org.eclipse.viatra2.visualisation/html/style.css
new file mode 100644
index 0000000..2b5f216
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/html/style.css
@@ -0,0 +1,15 @@
+@CHARSET "UTF-8";
+
+.image{
+	margin-left: auto;
+	margin-right: auto;
+	text-align: center;
+}
+
+.image p{
+	margin-top: 0px;
+}
+
+dt{
+	font-weight: bold;
+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.visualisation/html/visualisation.html b/org.eclipse.viatra2.visualisation/html/visualisation.html
new file mode 100644
index 0000000..00ad36a
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/html/visualisation.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+	<title>Model Space Visualisation</title>
+</head>
+
+<body>
+<h1>Model Space Visualisation</h1>
+<ul>
+<li><a href="started.html">Getting started</a></li>
+<li><a href="handling.html">Using the Graph View</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+</ul>
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.viatra2.visualisation/icons/clear.gif b/org.eclipse.viatra2.visualisation/icons/clear.gif
new file mode 100644
index 0000000..af30a42
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/icons/clear.gif
Binary files differ
diff --git a/org.eclipse.viatra2.visualisation/icons/nav_backward.gif b/org.eclipse.viatra2.visualisation/icons/nav_backward.gif
new file mode 100644
index 0000000..740e8ca
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/icons/nav_backward.gif
Binary files differ
diff --git a/org.eclipse.viatra2.visualisation/icons/refresh.gif b/org.eclipse.viatra2.visualisation/icons/refresh.gif
new file mode 100644
index 0000000..e383147
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/icons/refresh.gif
Binary files differ
diff --git a/org.eclipse.viatra2.visualisation/icons/viatra_logo.png b/org.eclipse.viatra2.visualisation/icons/viatra_logo.png
new file mode 100644
index 0000000..6819429
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/icons/viatra_logo.png
Binary files differ
diff --git a/org.eclipse.viatra2.visualisation/plugin.xml b/org.eclipse.viatra2.visualisation/plugin.xml
new file mode 100644
index 0000000..2f5f9a7
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/plugin.xml
@@ -0,0 +1,413 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+   <extension-point id="org.eclipse.viatra2.visualisation.customization" name="VIATRA2 Model Visualizer Customization" schema="schema/org.eclipse.viatra2.visualisation.customization.exsd"/>
+   <extension
+         point="org.eclipse.help.toc">
+      <toc
+            file="toc.xml"
+            primary="true">
+      </toc>
+   </extension>
+   <extension
+         id="org.eclipse.viatra2.visualisation.modelspace"
+         name="Model Space Visualisation"
+         point="org.eclipse.viatra2.gui.contributedAction">
+      <contributedAction
+            class="org.eclipse.viatra2.visualisation.modelspace.actions.VisualiseModelSpaceAction"
+            enablesForType="org.eclipse.viatra2.framework.IFramework">
+      </contributedAction>
+   </extension>
+   <extension
+         point="org.eclipse.ui.views">
+      <category
+            id="org.eclipse.viatra2.frameworkgui"
+            name="VIATRA2 Framework Release3">
+      </category>
+      <view
+            category="org.eclipse.viatra2.frameworkgui"
+            class="org.eclipse.viatra2.visualisation.view.ViatraVisualisationView"
+            icon="icons/viatra_logo.png"
+            id="org.eclipse.viatra2.visualisation.view"
+            name="Viatra Visualisation"
+            restorable="true">
+      </view>
+   </extension>
+   <extension
+         point="org.eclipse.viatra2.editor.menuactions">
+      <actions
+            class="org.eclipse.viatra2.visualisation.modelspace.actions.AddSelectedSubtreeAction"
+            id="org.eclipse.viatra2.visualisation.addSelectedElementAction"
+            key="Visualization"
+            name="Add Selected Subtree to the Graph"
+            ordering_number="100">
+      </actions>
+      <actions
+            class="org.eclipse.viatra2.visualisation.modelspace.actions.RemoveSelectedSubtreeAction"
+            id="org.eclipse.viatra2.visualisation.removeSelectedSubtreeAction"
+            key="Visualization"
+            name="Remove subtree from the Graph"
+            ordering_number="102">
+      </actions>
+      <actions
+            class="org.eclipse.viatra2.visualisation.modelspace.actions.AddSelectedElementsAction"
+            id="org.eclipse.viatra2.visualisation.addSelectedElements"
+            key="Visualization"
+            name="Add Selected Elements to the Subtree"
+            ordering_number="101">
+      </actions>
+      <actions
+            class="org.eclipse.viatra2.visualisation.modelspace.actions.RemoveSelectedElementsAction"
+            id="org.eclipse.viatra2.visualisation.removeSelectedElements"
+            key="Visualization"
+            name="Remove selected elements"
+            ordering_number="103">
+      </actions>
+   </extension>
+   <extension
+         point="org.eclipse.ui.themes">
+      <themeElementCategory
+            class="org.eclipse.viatra2.visualisation.color.ColorPreviewFrame"
+            id="org.eclipse.viatra2.visualisation.theme"
+            label="Viatra2 Visualisation">
+         <description>
+            This category is used to describe the colors of the specific nodes in the VIATRA2 Visualisation View.
+         </description>
+      </themeElementCategory>
+      <colorDefinition
+            categoryId="org.eclipse.viatra2.visualisation.theme"
+            id="org.eclipse.viatra2.visualisation.entity.background"
+            label="Node: Entity Background Color"
+            value="55,112,231">
+         <description>
+            This color is used as the background color of the Entity nodes.
+         </description>
+      </colorDefinition>
+      <colorDefinition
+            categoryId="org.eclipse.viatra2.visualisation.theme"
+            id="org.eclipse.viatra2.visualisation.entity.highlight"
+            label="Node: Entity Highlight Color"
+            value="136,26,113">
+         <description>
+            This color is used as the Highlight color of the Entity nodes.
+         </description>
+      </colorDefinition>
+      <colorDefinition
+            categoryId="org.eclipse.viatra2.visualisation.theme"
+            id="org.eclipse.viatra2.visualisation.entity.foreground"
+            label="Node: Entity Text Color"
+            value="255,255,255">
+         <description>
+            This color is used as the Text color in Entity nodes.
+         </description>
+      </colorDefinition>
+      <colorDefinition
+            categoryId="org.eclipse.viatra2.visualisation.theme"
+            id="org.eclipse.viatra2.visualisation.entity.border"
+            label="Node: Entity Border Color"
+            value="216,226,248">
+         <description>
+            This color is used as the border color of the Entity nodes.
+         </description>
+      </colorDefinition>
+      <colorDefinition
+            categoryId="org.eclipse.viatra2.visualisation.theme"
+            id="org.eclipse.viatra2.visualisation.entity.borderhighlight"
+            label="Node: Entity Border Highlight Color"
+            value="255,255,0">
+         <description>
+            This color is used as the border color of the highlighted Entity nodes.
+         </description>
+      </colorDefinition>
+            <colorDefinition
+            categoryId="org.eclipse.viatra2.visualisation.theme"
+            id="org.eclipse.viatra2.visualisation.relation.background"
+            label="Node: Relation Background Color"
+            value="49,255,85">
+         <description>
+            This color is used as the background color of the Relation nodes.
+         </description>
+      </colorDefinition>
+      <colorDefinition
+            categoryId="org.eclipse.viatra2.visualisation.theme"
+            id="org.eclipse.viatra2.visualisation.relation.highlight"
+            label="Node: Relation Highlight Color"
+            value="136,26,113">
+         <description>
+            This color is used as the Highlight color of the Relation nodes.
+         </description>
+      </colorDefinition>
+      <colorDefinition
+            categoryId="org.eclipse.viatra2.visualisation.theme"
+            id="org.eclipse.viatra2.visualisation.relation.foreground"
+            label="Node: Relation Text Color"
+            value="255,255,255">
+         <description>
+            This color is used as the Text color in Relation nodes.
+         </description>
+      </colorDefinition>
+      <colorDefinition
+            categoryId="org.eclipse.viatra2.visualisation.theme"
+            id="org.eclipse.viatra2.visualisation.relation.border"
+            label="Node: Relation Border Color"
+            value="139,150,171">
+         <description>
+            This color is used as the border color of the Relation nodes.
+         </description>
+      </colorDefinition>
+      <colorDefinition
+            categoryId="org.eclipse.viatra2.visualisation.theme"
+            id="org.eclipse.viatra2.visualisation.relation.borderhighlight"
+            label="Node: Relation Border Highlight Color"
+            value="139,150,171">
+         <description>
+            This color is used as the border color of the highlighted Relation nodes.
+         </description>
+      </colorDefinition>
+      <colorDefinition
+            categoryId="org.eclipse.viatra2.visualisation.theme"
+            id="org.eclipse.viatra2.visualisation.pattern.background"
+            label="Node: Pattern Background Color"
+            value="202,129,56">
+		 <description>
+            This color is used as the background color of the Pattern nodes.
+         </description>
+      </colorDefinition>
+      <colorDefinition
+            categoryId="org.eclipse.viatra2.visualisation.theme"
+            id="org.eclipse.viatra2.visualisation.pattern.highlight"
+            label="Node: Pattern Highlight Color"
+            value="136,27,113">
+         <description>
+            This color is used as the Highlight color of the Pattern nodes.
+         </description>
+      </colorDefinition>
+      <colorDefinition
+            categoryId="org.eclipse.viatra2.visualisation.theme"
+            id="org.eclipse.viatra2.visualisation.pattern.foreground"
+            label="Node: Pattern Text Color"
+            value="255,255,255">
+         <description>
+            This color is used as the Text color in Pattern nodes.
+         </description>
+      </colorDefinition>
+      <colorDefinition
+            id="org.eclipse.viatra2.visualisation.pattern.border"
+            label="Node: Pattern Border Color"
+            value="202,129,56">
+         <description>
+            This color is used as the border color of the Pattern nodes.
+         </description>
+      </colorDefinition>
+      <colorDefinition
+            id="org.eclipse.viatra2.visualisation.pattern.borderhighlight"
+            label="Node: Pattern Border Highlight Color"
+            value="136,27,113">
+         <description>
+            This color is used as the border color of the highlighted Pattern nodes.
+         </description>
+      </colorDefinition>
+      <colorDefinition
+            categoryId="org.eclipse.viatra2.visualisation.theme"
+            id="org.eclipse.viatra2.visualisation.arc"
+            label="Arc: Color"
+            value="50,36,136">
+         <description>
+            This color is used for the Arcs and the Arc captions.
+         </description>
+      </colorDefinition>
+      <colorDefinition
+            categoryId="org.eclipse.viatra2.visualisation.theme"
+            id="org.eclipse.viatra2.visualisation.archighlight"
+            label="Arc: Highlight Color"
+            value="136,26,113">
+         <description>
+            This color is used for the highlighted Arcs and the Arc captions.
+         </description>
+      </colorDefinition>
+      <colorDefinition
+            categoryId="org.eclipse.viatra2.visualisation.theme"
+            id="org.eclipse.viatra2.visualisation.parameter"
+            label="Arc: Parameter Matching Color"
+            value="97,113,104">
+         <description>
+            This color is used for the parameter matching arcs and their captions.
+         </description>
+      </colorDefinition>
+      <colorDefinition
+            categoryId="org.eclipse.viatra2.visualisation.theme"
+            id="org.eclipse.viatra2.visualisation.parameterhighlight"
+            label="Arc: Parameter Matching Highlight Color"
+            value="136,26,113">
+         <description>
+            This color is used for the highlighted parameter matching arcs and their captions.
+         </description>
+      </colorDefinition>
+   </extension>
+   <extension
+         id="org.eclipse.viatra2.visualisation.patterns"
+         name="Pattern Visualisation"
+         point="org.eclipse.viatra2.gui.contributedAction">
+      <contributedAction
+            class="org.eclipse.viatra2.visualisation.patterns.actions.VisualisePatternGraphAction"
+            enablesForType="org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine">
+      </contributedAction>
+   </extension>
+   <extension
+         point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
+      <propertyContributor
+            contributorId="org.eclipse.viatra2.visualisation.view">
+         <propertyCategory
+               category="Basic"></propertyCategory>
+      </propertyContributor>
+   </extension>
+   <extension
+         point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
+      <propertyTabs
+            contributorId="org.eclipse.viatra2.visualisation.view">
+         <propertyTab
+               category="Basic"
+               id="org.eclipse.viatra2.visualisation.patternpropertytab"
+               label="Basic">
+         </propertyTab>
+      </propertyTabs>
+   </extension>
+   <extension
+         point="org.eclipse.ui.views.properties.tabbed.propertySections">
+      <propertySections
+            contributorId="org.eclipse.viatra2.visualisation.view">
+         <propertySection
+               class="org.eclipse.viatra2.visualisation.patterns.properties.NamePropertySection"
+               id="org.eclipse.viatra2.visualisation.namePropertySection"
+               tab="org.eclipse.viatra2.visualisation.patternpropertytab">
+            <input
+                  type="org.eclipse.viatra2.visualisation.patterns.viewmodel.AbstractViewModelElement">
+            </input>
+         </propertySection>
+         <propertySection
+               afterSection="org.eclipse.viatra2.visualisation.namePropertySection"
+               class="org.eclipse.viatra2.visualisation.patterns.properties.ParametersPropertySection"
+               id="org.eclipse.viatra2.visualisation.parameterPropertySection"
+               tab="org.eclipse.viatra2.visualisation.patternpropertytab">
+            <input
+                  type="org.eclipse.viatra2.visualisation.patterns.viewmodel.ViewPattern">
+            </input>
+         </propertySection>
+         <propertySection
+               afterSection="org.eclipse.viatra2.visualisation.namePropertySection"
+               class="org.eclipse.viatra2.visualisation.patterns.properties.TypePropertySection"
+               id="org.eclipse.viatra2.visualisation.typepropertysection"
+               tab="org.eclipse.viatra2.visualisation.patternpropertytab">
+            <input
+                  type="org.eclipse.viatra2.visualisation.patterns.viewmodel.AbstractViewModelElement">
+            </input>
+         </propertySection>
+      </propertySections>
+   </extension>
+   <extension
+         point="org.eclipse.viatra2.visualisation.customization">
+      <category
+            id="org.eclipse.viatra2.visualisation.generic"
+            name="Generic"
+            orderID="0">
+      </category>
+      <algorithm
+            category="org.eclipse.viatra2.visualisation.generic"
+            id="org.eclipse.viatra2.visualisation.gridlayout"
+            layoutalgorithm="org.eclipse.viatra2.visualisation.layouts.algorithms.GridLayout"
+            name="Grid Layout">
+      </algorithm>
+      <algorithm
+            category="org.eclipse.viatra2.visualisation.generic"
+            id="org.eclipse.viatra2.visualisation.springlayout"
+            layoutalgorithm="org.eclipse.viatra2.visualisation.layouts.algorithms.SpringLayout"
+            name="Spring layout">
+      </algorithm>
+      <algorithm
+            category="org.eclipse.viatra2.visualisation.generic"
+            id="org.eclipse.viatra2.visualisation.radiallayout"
+            layoutalgorithm="org.eclipse.viatra2.visualisation.layouts.algorithms.RadialLayout"
+            name="Radial Layout">
+      </algorithm>
+      <algorithm
+            category="org.eclipse.viatra2.visualisation.generic"
+            id="org.eclipse.viatra2.visualisation.treehierarchylayout"
+            layoutalgorithm="org.eclipse.viatra2.visualisation.layouts.algorithms.HierarchyAlgorithm"
+            name="Tree Hierarchy Layout">
+      </algorithm>
+      <algorithm
+            category="org.eclipse.viatra2.visualisation.generic"
+            id="org.eclipse.viatra2.visualisation.radiallayout_noderesize"
+            layoutalgorithm="org.eclipse.viatra2.visualisation.layouts.algorithms.RadialLayout_NodeResize"
+            name="Radial Layout (Node resize)">
+      </algorithm>
+      <preset
+            category="org.eclipse.viatra2.visualisation.generic"
+            filters="org.eclipse.viatra2.visualisation.filterconfiguration.default"
+            id="org.eclipse.viatra2.visualisation.preset.default"
+            labelprovider="org.eclipse.viatra2.visualisation.labelprovider.smart.highlight"
+            layout="org.eclipse.viatra2.visualisation.radiallayout"
+            name="Default visualisation preset">
+      </preset>
+      <labelprovider
+            category="org.eclipse.viatra2.visualisation.generic"
+            description="The built-in labelprovider."
+            id="org.eclipse.viatra2.visualisation.labelprovider.default"
+            labelprovider="org.eclipse.viatra2.visualisation.modelspace.datasource.ModelSpaceLabelProvider"
+            name="Default labelprovider">
+      </labelprovider>
+      <filterconfiguration
+            category="org.eclipse.viatra2.visualisation.generic"
+            description="Contains only an empty filter."
+            id="org.eclipse.viatra2.visualisation.filterconfiguration.default"
+            name="Default filter configuration">
+         <filterreference
+               filterID="org.eclipse.viatra2.visualisation.filter.default"
+               name="default">
+         </filterreference>
+      </filterconfiguration>
+      <filter
+            category="org.eclipse.viatra2.visualisation.generic"
+            description="Empty filter"
+            filter="org.eclipse.viatra2.visualisation.common.filters.DefaultFilter"
+            id="org.eclipse.viatra2.visualisation.filter.default"
+            name="Default filter">
+      </filter>
+      <labelprovider
+            category="org.eclipse.viatra2.visualisation.generic"
+            description="Smart label provider."
+            id="org.eclipse.viatra2.visualisation.labelprovider.smart"
+            labelprovider="org.eclipse.viatra2.visualisation.common.labelproviders.SmartLabelProvider"
+            name="Smart Labelprovider">
+      </labelprovider>
+      <labelprovider
+            category="org.eclipse.viatra2.visualisation.generic"
+            id="org.eclipse.viatra2.visualisation.labelprovider.smart.highlight"
+            labelprovider="org.eclipse.viatra2.visualisation.common.labelproviders.HighlightableSmartLabelProvider"
+            name="Smart labelprovider with highlight support">
+      </labelprovider>
+   </extension>
+   <extension
+         point="org.eclipse.viatra2.core2.nativefunction">
+      <function
+            class="org.eclipse.viatra2.visualisation.common.labelproviders.natives.HighlightFunction">
+      </function>
+      <function
+            class="org.eclipse.viatra2.visualisation.common.labelproviders.natives.UnHighlightFunction">
+      </function>
+      <function
+            class="org.eclipse.viatra2.visualisation.common.labelproviders.natives.RefreshFunction">
+      </function>
+      <function
+            class="org.eclipse.viatra2.visualisation.common.labelproviders.natives.GetColorFunction">
+      </function>
+      <function
+            class="org.eclipse.viatra2.visualisation.common.labelproviders.natives.ClearHighlightsFunction">
+      </function>
+      <function
+            class="org.eclipse.viatra2.visualisation.common.labelproviders.natives.RedrawFunction">
+      </function>
+   </extension>
+  
+
+</plugin>
diff --git a/org.eclipse.viatra2.visualisation/schema/org.eclipse.viatra2.visualisation.customization.exsd b/org.eclipse.viatra2.visualisation/schema/org.eclipse.viatra2.visualisation.customization.exsd
new file mode 100644
index 0000000..97090e7
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/schema/org.eclipse.viatra2.visualisation.customization.exsd
@@ -0,0 +1,398 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.viatra2.visualisation" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.viatra2.visualisation" id="org.eclipse.viatra2.visualisation.customization" name="VIATRA2 Model Visualization Customization"/>
+      </appInfo>
+      <documentation>
+         This extension point can be used to customize the appearance of the VIATRA2 Model Visualizer. The extension point allows defining both generic and domain-specific layouts.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence minOccurs="1" maxOccurs="unbounded">
+            <choice>
+               <element ref="algorithm"/>
+               <element ref="filter"/>
+               <element ref="filterconfiguration"/>
+               <element ref="preset"/>
+               <element ref="labelprovider"/>
+               <element ref="category"/>
+            </choice>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="algorithm">
+      <annotation>
+         <documentation>
+            A layout algorithm for the VIATRA2 model visualizer.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A unique string identifier of the layout algorithm
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A name representing the algorithm on the user interface.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="description" type="string">
+            <annotation>
+               <documentation>
+                  Longer description of the layout algorithm.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="layoutalgorithm" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn=":org.eclipse.viatra2.visualisation.layouts.IViatraLayoutAlgorithm"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="category" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.viatra2.visualisation.customization/category/@id"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="category">
+      <annotation>
+         <documentation>
+            Category for layout customizations.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  This ID identifies the category
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  This name identifies the category on the user interface.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="orderID" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="filter">
+      <annotation>
+         <documentation>
+            A visualization filter for the VIATRA2 model visualizer.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="description" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="filter" type="string">
+            <annotation>
+               <documentation>
+                  A filter class that specifies which elements should be removed from the visualization.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.jface.viewers.ViewerFilter:"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="category" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.viatra2.visualisation.customization/category/@id"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="labelprovider">
+      <annotation>
+         <documentation>
+            A label provider customization for the VIATRA2 model visualizer.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="description" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="labelprovider" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A label provider class that determines the string label for each model object shown in the visualization.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.viatra2.visualisation.ViatraColoredLabelProvider:"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="category" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.viatra2.visualisation.customization/category/@id"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="filterconfiguration">
+      <complexType>
+         <sequence minOccurs="1" maxOccurs="unbounded">
+            <element ref="filterreference"/>
+         </sequence>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="description" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="category" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.viatra2.visualisation.customization/category/@id"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="preset">
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="layout" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.viatra2.visualisation.customization/algorithm/@id"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="labelprovider" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.viatra2.visualisation.customization/labelprovider/@id"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="filters" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.viatra2.visualisation.customization/filterconfiguration/@id"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="category" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.viatra2.visualisation.customization/category/@id"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="filterreference">
+      <complexType>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="filterID" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.viatra2.visualisation.customization/filter/@id"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         R3.1
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         [Enter extension point usage example here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiinfo"/>
+      </appInfo>
+      <documentation>
+         [Enter API information here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+
+</schema>
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/IVisualisationDescriptor.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/IVisualisationDescriptor.java
new file mode 100644
index 0000000..42c5f7e
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/IVisualisationDescriptor.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *    Istvan Rath - add support for labelprovider override
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.services.IDisposable;
+import org.eclipse.viatra2.visualisation.common.extensions.FilterConfiguration;
+import org.eclipse.viatra2.visualisation.common.extensions.VisualisationPreset;
+import org.eclipse.viatra2.visualisation.layouts.IViatraLayoutAlgorithm;
+
+/**
+ * This interface describes a visualisation task for the view. It also details
+ * menu and toolbar contributions.
+ * @author Zoltan Ujhelyi
+ */
+public interface IVisualisationDescriptor extends IDisposable, IAdaptable {
+
+	/**
+	 * Adds the menu contributions related to the visualisation to a selected
+	 * manager.
+	 * @param manager
+	 */
+	void addMenuContributions(IMenuManager manager);
+
+	/**
+	 * Adds the toolbar contributions related to the visualisation to a selected
+	 * manager.
+	 * @param manager
+	 */
+	void addToolbarContributions(IToolBarManager manager);
+
+	/**
+	 * Creates the item to be displayed in the form. It also initializes the
+	 * graph viewer.
+	 * @param parent the parent element to create the components in.
+	 */
+	void createFormContributions(Composite parent);
+
+	/**
+	 * Returns the viewer described by the descriptor.
+	 * @return the graph viewer component
+	 */
+	ViatraGraphViewer getViewer();
+
+	/**
+	 * Clears the described graph model
+	 */
+	void clearGraphModel();
+
+	/**
+	 * Removes the selected elements from the graph model
+	 */
+	void removeSelection();
+
+	/**
+	 * Set the layout algorithm
+	 * @param algorithm
+	 */
+	void setLayoutAlgorithm(IViatraLayoutAlgorithm algorithm);
+	
+	/**
+	 * Sets a visualisation preset for the visualisation.
+	 * @param vp the preset to set
+	 */
+	void setVisualisationPreset(VisualisationPreset vp);
+	
+	/**
+	 * Sets the label provider.
+	 * @param provider
+	 */
+	void setLabelProvider(ViatraColoredLabelProvider provider);
+
+	/**
+	 * Sets the label provider.
+	 * @param provider
+	 * @param doRefresh TODO
+	 */
+	void setLabelProvider(ViatraColoredLabelProvider provider, boolean doRefresh);
+	
+	/**
+	 * Sets a filter configuration on the visualizer.
+	 * @param fc
+	 */
+	void setFilterConfiguration(FilterConfiguration fc);
+
+	/**
+	 * Sets a filter configuration on the visualizer.
+	 * @param fc
+	 * @param doRefresh TODO
+	 */
+	void setFilterConfiguration(FilterConfiguration fc, boolean doRefresh);
+
+	/**
+	 * Redraws the graph elements without reapplying the layout. For reapplying
+	 * the layout see {@link IVisualisationDescriptor#redrawGraph()}.
+	 */
+	void refreshGraph();
+
+	/**
+	 * Redraws the corresponding graph elements, including a reapplication of
+	 * the layout, and reapplies the selected components. To avoid reapplying
+	 * the layout see {@link IVisualisationDescriptor#refreshGraph}.
+	 */
+	void redrawGraph();
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/ViatraColoredLabelProvider.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/ViatraColoredLabelProvider.java
new file mode 100644
index 0000000..98832d5
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/ViatraColoredLabelProvider.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation;
+
+import org.eclipse.jface.resource.ColorRegistry;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.themes.ITheme;
+import org.eclipse.ui.themes.IThemeManager;
+
+/**
+ * An abstract label provider class that listens to changes in the platform
+ * color registry.
+ * @author Zoltan Ujhelyi
+ */
+public abstract class ViatraColoredLabelProvider extends LabelProvider {
+
+	protected Color ENTITY_BG, ENTITY_HL, ENTITY_FG, ENTITY_BO, ENTITY_BOHL;
+	protected Color RELATION_BG, RELATION_HL, RELATION_FG, RELATION_BO,
+			RELATION_BOHL;
+	protected Color PATTERN_BG, PATTERN_HL, PATTERN_FG, PATTERN_BO,
+			PATTERN_BOHL;
+	protected Color ARC, ARC_HL;
+	protected Color PARAM, PARAM_HL;
+	private ITheme theme;
+	private IPropertyChangeListener listener = new IPropertyChangeListener() {
+
+		public void propertyChange(PropertyChangeEvent event) {
+			reloadColors();
+		}
+	};
+
+	/**
+	 * Initializes the colored label provider and loads the color theme
+	 * information from the color registry.
+	 */
+	public ViatraColoredLabelProvider() {
+		super();
+		IThemeManager themeManager = PlatformUI.getWorkbench()
+				.getThemeManager();
+		ITheme currentTheme = themeManager.getCurrentTheme();
+		loadTheme(currentTheme);
+	}
+
+	/**
+	 * Loads the color information from a theme
+	 * @param theme
+	 *            the theme to load
+	 */
+	public void loadTheme(ITheme theme) {
+		if (this.theme != null)
+			this.theme.removePropertyChangeListener(listener);
+		this.theme = theme;
+		this.theme.addPropertyChangeListener(listener);
+		reloadColors();
+	}
+
+	/**
+	 * <p>
+	 * Reloads the color theme from the Color Registry of the currently selected
+	 * theme.
+	 * </p>
+	 * <p>
+	 * <strong>Warning!</strong> Reloading the colors does not trigger the
+	 * redraw of the graph, so changes might not be visible instantly.
+	 * </p>
+	 */
+	public void reloadColors() {
+		ColorRegistry colorRegistry = theme.getColorRegistry();
+		ENTITY_BG = colorRegistry
+				.get("org.eclipse.viatra2.visualisation.entity.background");
+		ENTITY_HL = colorRegistry
+				.get("org.eclipse.viatra2.visualisation.entity.highlight");
+		ENTITY_FG = colorRegistry
+				.get("org.eclipse.viatra2.visualisation.entity.foreground");
+		ENTITY_BO = colorRegistry
+				.get("org.eclipse.viatra2.visualisation.entity.border");
+		ENTITY_BOHL = colorRegistry
+				.get("org.eclipse.viatra2.visualisation.entity.borderhighlight");
+		RELATION_BG = colorRegistry
+				.get("org.eclipse.viatra2.visualisation.relation.background");
+		RELATION_HL = colorRegistry
+				.get("org.eclipse.viatra2.visualisation.relation.highlight");
+		RELATION_FG = colorRegistry
+				.get("org.eclipse.viatra2.visualisation.relation.foreground");
+		RELATION_BO = colorRegistry
+				.get("org.eclipse.viatra2.visualisation.relation.border");
+		RELATION_BOHL = colorRegistry
+				.get("org.eclipse.viatra2.visualisation.relation.borderhighlight");
+		PATTERN_BG = colorRegistry
+				.get("org.eclipse.viatra2.visualisation.pattern.background");
+		PATTERN_HL = colorRegistry
+				.get("org.eclipse.viatra2.visualisation.pattern.highlight");
+		PATTERN_FG = colorRegistry
+				.get("org.eclipse.viatra2.visualisation.pattern.foreground");
+		PATTERN_BO = colorRegistry
+				.get("org.eclipse.viatra2.visualisation.pattern.border");
+		PATTERN_BOHL = colorRegistry
+				.get("org.eclipse.viatra2.visualisation.pattern.borderhighlight");
+		ARC = colorRegistry.get("org.eclipse.viatra2.visualisation.arc");
+		ARC_HL = colorRegistry
+				.get("org.eclipse.viatra2.visualisation.archighlight");
+		PARAM = colorRegistry
+				.get("org.eclipse.viatra2.visualisation.parameter");
+		PARAM_HL = colorRegistry
+				.get("org.eclipse.viatra2.visualisation.parameterhighlight");
+	}
+
+	@Override
+	public void dispose() {
+		if (theme != null) theme.removePropertyChangeListener(listener);
+		super.dispose();
+	}
+
+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/ViatraGraphViewer.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/ViatraGraphViewer.java
new file mode 100644
index 0000000..c091328
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/ViatraGraphViewer.java
@@ -0,0 +1,174 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.SWTGraphics;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.ImageLoader;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.zest.core.viewers.GraphViewer;
+import org.eclipse.zest.core.widgets.Graph;
+import org.eclipse.zest.core.widgets.GraphConnection;
+import org.eclipse.zest.core.widgets.GraphNode;
+
+/**
+ * This class is used as a generic graph viewer component. It acts as the parent
+ * of all graph viewers.
+ * @author Zoltan Ujhelyi
+ */
+public class ViatraGraphViewer extends GraphViewer {
+
+	protected IVisualisationDescriptor descriptor;
+	KeyAdapter keyListener = new KeyAdapter() {
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.
+		 * events.KeyEvent)
+		 */
+		@Override
+		public void keyPressed(KeyEvent e) {
+			if (e.keyCode == SWT.DEL || e.character == 8) {
+				descriptor.removeSelection();
+				refresh();
+			} else
+				super.keyPressed(e);
+		}
+
+	};
+
+	/**
+	 * Initializes the viewer.
+	 * @param composite
+	 * @param style
+	 *            the style for the viewer and for the layout algorithm
+	 */
+	public ViatraGraphViewer(Composite composite, int style) {
+		super(composite, style);
+		graph.addKeyListener(keyListener);
+	}
+
+	/**
+	 * @param descriptor
+	 *            the descriptor to set
+	 */
+	public void setDescriptor(IVisualisationDescriptor descriptor) {
+		this.descriptor = descriptor;
+	}
+
+	@Override
+	public void refresh() {
+		super.refresh();
+		styleConnections();
+	}
+
+	/**
+	 * Extra styling of the connections - it adds curved arcs to the graph where
+	 * needed.
+	 */
+	public void styleConnections() {
+		for (Object _conn : graph.getConnections().toArray()) {
+			GraphConnection conn = (GraphConnection) _conn;
+			GraphNode source = conn.getSource();
+			GraphNode dest = conn.getDestination();
+			LinkedList<GraphConnection> rightList = getConnectionList(source,
+					dest);
+
+			LinkedList<GraphConnection> leftList = null;
+
+			if (dest != source) {
+				leftList = getConnectionList(dest, source);
+			}
+			int size = leftList != null ? leftList.size() + rightList.size()
+					: rightList.size();
+			// adjust the arcs going from source to destination
+			adjustCurves(rightList, size);
+			// adjust the arcs going from destination to source
+			if (leftList != null) {
+				adjustCurves(leftList, size);
+			}
+		}
+	}
+
+	private void adjustCurves(List<GraphConnection> connections, int size) {
+		/*
+		 * The connections should be curved if source and dest are equal, or
+		 * there are multiple arcs between two nodes
+		 */
+		for (int i = 0; i < connections.size(); i++) {
+			GraphConnection conn = connections.get(i);
+			int radius = 30;
+			if (conn.getSource() == conn.getDestination()) {
+				radius = 60;
+			} else if (size < 2) {
+				radius = 0;
+			}
+			conn.setCurveDepth((i + 1) * radius);
+		}
+	}
+
+	private LinkedList<GraphConnection> getConnectionList(GraphNode source,
+			GraphNode dest) {
+		LinkedList<GraphConnection> list = new LinkedList<GraphConnection>();
+		@SuppressWarnings("rawtypes")
+		Iterator i = source.getSourceConnections().iterator();
+		while (i.hasNext()) {
+			GraphConnection c = (GraphConnection) i.next();
+			if (c.getDestination() == dest) {
+				list.add(c);
+			}
+		}
+		return list;
+	}
+
+	/**
+	 * Saves the graph as an image file. The supported formats are the ones that
+	 * is supported by the SWT ImageLoader class.
+	 * @param filename
+	 *            the filename to save the file into
+	 * @param format
+	 *            the image format to use
+	 * @see ImageLoader
+	 */
+	public void saveImage(String filename, int format) {
+		Graph g = (Graph) getControl();
+		Rectangle bounds = g.getContents().getBounds();
+		Point size = new Point(g.getContents().getSize().width, g.getContents()
+				.getSize().height);
+		org.eclipse.draw2d.geometry.Point viewLocation = g.getViewport()
+				.getViewLocation();
+		final Image image = new Image(null, size.x, size.y);
+		GC gc = new GC(image);
+		SWTGraphics swtGraphics = new SWTGraphics(gc);
+
+		swtGraphics.translate(-1 * bounds.x + viewLocation.x, -1 * bounds.y
+				+ viewLocation.y);
+		g.getViewport().paint(swtGraphics);
+		gc.copyArea(image, 0, 0);
+		gc.dispose();
+		ImageLoader loader = new ImageLoader();
+		loader.data = new ImageData[] { image.getImageData() };
+		loader.save(filename, format);
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/VisualisationManager.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/VisualisationManager.java
new file mode 100644
index 0000000..eedc417
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/VisualisationManager.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011, Istvan Rath and Zoltan Ujhelyi
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.visualisation;
+
+/**
+ * The visualisation manager stores and manages different visualisations. It can
+ * be used to detect whether a specific visualisation had been initialized.
+ * @author Zoltan Ujhelyi
+ */
+public class VisualisationManager {
+
+	// Currently only a single source-descriptor pair is supported
+	// HashMap<Object, IVisualisationDescriptor> descriptors;
+	Object source = null;
+	IVisualisationDescriptor descriptor = null;
+
+	/**
+	 * Loads a visualisation descriptor together with its source element to the
+	 * manager
+	 * @param source
+	 * @param descriptor
+	 */
+	public void loadDescriptor(Object source,
+			IVisualisationDescriptor descriptor) {
+		this.source = source;
+		this.descriptor = descriptor;
+	}
+
+	/**
+	 * Removes a visualisation descriptor from the manager
+	 * @param source
+	 */
+	public void unloadDescriptor(Object source) {
+		if (this.source != null && this.source.equals(source)) {
+			source = null;
+			descriptor = null;
+		}
+	}
+
+	/**
+	 * Returns the corresponding visualisation descriptor to its source element
+	 * @param source
+	 * @return the visualisation descriptor
+	 */
+	public IVisualisationDescriptor getVisualisation(Object source) {
+		if (this.source != null && this.source.equals(source)) {
+			return descriptor;
+		}
+		return null;
+	}
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/VisualisationPlugin.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/VisualisationPlugin.java
new file mode 100644
index 0000000..e750cc1
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/VisualisationPlugin.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class VisualisationPlugin extends AbstractUIPlugin {
+
+	/**
+	 * The plug-in ID
+	 */
+	public static final String PLUGIN_ID = "org.eclipse.viatra2.visualisation";
+
+	// The shared instance
+	private static VisualisationPlugin plugin;
+	private VisualisationManager manager;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+	 * )
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		manager = new VisualisationManager();
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+	 * )
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		manager = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance
+	 * @return the shared instance
+	 */
+	public static VisualisationPlugin getDefault() {
+		return plugin;
+	}
+
+	/**
+	 * Returns a visualisation manager component that allows a central management of different visualisations
+	 * @return the visualisation manager component
+	 */
+	public static VisualisationManager getVisualisationManager() {
+		return plugin.manager;
+	}
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/color/ColorPreviewFrame.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/color/ColorPreviewFrame.java
new file mode 100644
index 0000000..01ac9a9
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/color/ColorPreviewFrame.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.color;
+
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.themes.ITheme;
+import org.eclipse.ui.themes.IThemePreview;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.visualisation.modelspace.ModelSpaceGraphViewer;
+import org.eclipse.viatra2.visualisation.modelspace.datasource.GraphArc;
+import org.eclipse.zest.core.viewers.IGraphEntityRelationshipContentProvider;
+import org.eclipse.zest.core.widgets.ZestStyles;
+import org.eclipse.zest.layouts.LayoutStyles;
+import org.eclipse.zest.layouts.algorithms.RadialLayoutAlgorithm;
+
+/**
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class ColorPreviewFrame implements IThemePreview {
+	
+	ModelSpaceGraphViewer gv;
+	ITheme theme;
+	IPropertyChangeListener listener = new IPropertyChangeListener() {
+		
+		public void propertyChange(PropertyChangeEvent event) {
+			reloadTheme();
+		}
+	};
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.themes.IThemePreview#createControl(org.eclipse.swt.widgets.Composite, org.eclipse.ui.themes.ITheme)
+	 */
+	public void createControl(Composite parent, ITheme currentTheme) {
+		this.theme = currentTheme;
+		currentTheme.addPropertyChangeListener(listener);
+		gv = new ModelSpaceGraphViewer(parent, SWT.NONE);
+		gv.setLayoutAlgorithm(new RadialLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING|ZestStyles.IGNORE_INVISIBLE_LAYOUT), true);
+		gv.loadTheme(currentTheme);
+		gv.setConnectionStyle(ZestStyles.CONNECTIONS_DIRECTED);
+		gv.setContentProvider(new IGraphEntityRelationshipContentProvider() {
+			PreviewEntity entity1 = new PreviewEntity("Entity1");
+			PreviewEntity entity2 = new PreviewEntity("Entity2");
+			PreviewRelation relation = new PreviewRelation("Relation");
+		
+			public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
+		
+			public void dispose() {}
+		
+			public Object[] getElements(Object inputElement) {
+				return new Object[] {entity1, entity2, relation};
+			}
+		
+			public Object[] getRelationships(Object source, Object dest) {
+				if (!(source.equals(entity1) && dest.equals(relation)) 
+						&& !(source.equals(relation) && dest.equals(entity2))) return null;
+				GraphArc arc = new GraphArc((IModelElement)source,(IModelElement)dest, "relation");
+				return new Object[] {arc};
+			}
+		});
+		gv.setInput(null);
+	}
+	
+	void reloadTheme() {
+		gv.refreshTheme();
+		gv.setInput(null);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.themes.IThemePreview#dispose()
+	 */
+	public void dispose() {
+		theme.removePropertyChangeListener(listener);
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/color/PreviewEntity.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/color/PreviewEntity.java
new file mode 100644
index 0000000..648e425
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/color/PreviewEntity.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.color;
+
+import java.util.Collection;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+
+/**
+ * This class represents a dummy element for the live preview in the color preferences
+ * @author Zoltan Ujhelyi
+ *
+ */
+class PreviewEntity extends PreviewModelElement implements IEntity {
+	
+	/**
+	 * Initializes a preview entity
+	 * @param name
+	 */
+	public PreviewEntity(String name) {
+		super(name);
+	}
+
+	public Collection<IModelElement> getAllComponents() {
+		return null;
+	}
+
+	public IModelElement getContentByName(String n) {
+		return null;
+	}
+
+	public IModelElement getContentByType(IModelElement n) {
+		return null;
+	}
+
+	public Collection<IModelElement> getContents() {
+		return null;
+	}
+
+	public IEntity getParent() {
+		return null;
+	}
+
+	public String getValue() {
+		return null;
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/color/PreviewModelElement.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/color/PreviewModelElement.java
new file mode 100644
index 0000000..91d5590
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/color/PreviewModelElement.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.color;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.core.constraint.EConstraint;
+
+/**
+ * This class represents a dummy model element used in the Preview Graph
+ * in the Color Settings dialog
+ * @author Zoltan Ujhelyi
+ *
+ */
+class PreviewModelElement implements IModelElement {
+	
+	String name;
+	/**
+	 * Initializes a preview model element
+	 * @param name
+	 */
+	public PreviewModelElement(String name) {
+		this.name = name;
+	}
+
+	public Collection<IModelElement> getAllElementsInNamespace() {
+		return null;
+	}
+
+	public Collection<IModelElement> getAllInstances() {
+		return null;
+	}
+
+	public Collection<IRelation> getAllRelationFromByType(IRelation type) {
+		return null;
+	}
+
+	public Collection<IModelElement> getAllRelationSourceByType(IRelation type) {
+		return null;
+	}
+
+	public Collection<IModelElement> getAllRelationTargetByType(IRelation type) {
+		return null;
+	}
+
+	public Collection<IRelation> getAllRelationToByType(IRelation type) {
+		return null;
+	}
+
+	public Collection<IModelElement> getAllSubtypes() {
+		return null;
+	}
+
+	public Collection<IModelElement> getAllSupertypes() {
+		return null;
+	}
+
+	public Collection<IModelElement> getAllTypes() {
+		return null;
+	}
+
+	public IModelElement getElementInNamespaceByName(String name) {
+		return null;
+	}
+
+	public Collection<IModelElement> getElementsInNamespace() {
+		return null;
+	}
+
+	public Collection<IModelElement> getElementsInRelation(
+			EConstraint relationType) {
+		return null;
+	}
+
+	public String getFullyQualifiedName() {
+		return name;
+	}
+
+	public String getID() {
+		return name;
+	}
+
+	public Collection<IModelElement> getInstances() {
+		return null;
+	}
+
+	public boolean getIsFinalType() {
+		return false;
+	}
+
+	public IModelSpace getModelSpace() {
+		return null;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public IModelElement getNamespace() {
+		return null;
+	}
+
+	public IRelation getRelationByName(String n) {
+		return null;
+	}
+
+	public IRelation getRelationByType(IModelElement n) {
+		return null;
+	}
+
+	public IRelation getRelationFromByName(String name) {
+		return null;
+	}
+
+	public IRelation getRelationFromByType(IModelElement type) {
+		return null;
+	}
+
+	public IModelElement getRelationSourceByType(IRelation type) {
+		return null;
+	}
+
+	public IModelElement getRelationTargetByType(IRelation type) {
+		return null;
+	}
+
+	public IRelation getRelationToByName(String name) {
+		return null;
+	}
+
+	public IRelation getRelationToByType(IModelElement type) {
+		return null;
+	}
+
+	public Collection<IRelation> getRelations() {
+		return null;
+	}
+
+	public Collection<IRelation> getRelationsFrom() {
+		return null;
+	}
+
+	public Collection<IRelation> getRelationsTo() {
+		return null;
+	}
+
+	public Collection<IModelElement> getSubtypes() {
+		return null;
+	}
+
+	public Collection<IModelElement> getSupertypes() {
+		return null;
+	}
+
+	public Collection<IModelElement> getTypes() {
+		return new ArrayList<IModelElement>();
+	}
+
+	public String getViewInfo() {
+		return null;
+	}
+
+	public boolean isBelowNamespace(IModelElement grandpa) {
+		return false;
+	}
+
+	public boolean isDeleted() {
+		return false;
+	}
+
+	public boolean isDirectInstanceOf(IModelElement inst) {
+		return false;
+	}
+
+	public boolean isDirectSubtypeOf(IModelElement sub) {
+		return false;
+	}
+
+	public boolean isDirectSupertypeOf(IModelElement sup) {
+		return false;
+	}
+
+	public boolean isDirectTypeOf(IModelElement type) {
+		return false;
+	}
+
+	public boolean isEntity() {
+		return false;
+	}
+
+	public boolean isInstanceOf(IModelElement type) {
+		return false;
+	}
+
+	public boolean isRelation() {
+		return false;
+	}
+
+	public boolean isSubtypeOf(IModelElement sup) {
+		return false;
+	}
+
+	public boolean isSupertypeOf(IModelElement sup) {
+		return false;
+	}
+
+	public boolean isTypeOf(IModelElement inst) {
+		return false;
+	}
+
+	public int compareTo(IModelElement o) {
+		return 0;
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/color/PreviewRelation.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/color/PreviewRelation.java
new file mode 100644
index 0000000..eda88cc
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/color/PreviewRelation.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.color;
+
+import org.eclipse.viatra2.core.EMultiplicityKind;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+
+/**
+ * This class is used as a dummy IRelation element to provide live preview
+ * in the color settings page.
+ * @author Zoltan Ujhelyi
+ *
+ */
+class PreviewRelation extends PreviewModelElement implements IRelation {
+	
+	/**
+	 * Initializes a preview relation
+	 * @param name
+	 */
+	public PreviewRelation(String name) {
+		super(name);
+	}
+
+	public IModelElement getFrom() {
+		return null;
+	}
+
+	public IRelation getInverse() {
+		return null;
+	}
+
+	public boolean getIsAggregation() {
+		return false;
+	}
+
+	public boolean getIsAnyFrom() {
+		return false;
+	}
+
+	public boolean getIsAnyTo() {
+		return false;
+	}
+
+	public EMultiplicityKind getMultiplicity() {
+		return null;
+	}
+
+	public IModelElement getTo() {
+		return null;
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/color/package-info.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/color/package-info.java
new file mode 100644
index 0000000..e8a0dd4
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/color/package-info.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011, Istvan Rath and Zoltan Ujhelyi
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+/**
+ * This package contains classes for the Live Preview
+ * in the Eclipse Color Preferences page.
+ * @author Zoltan Ujhelyi 
+ */
+package org.eclipse.viatra2.visualisation.color;
+
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/action/SelectProviderAction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/action/SelectProviderAction.java
new file mode 100644
index 0000000..2c1fccc
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/action/SelectProviderAction.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.common.action;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.viatra2.visualisation.view.ViatraVisualisationView;
+
+/**
+ * An action that allows setting the content provider for the graph viewer
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class SelectProviderAction extends Action {
+
+	IContentProvider provider;
+	
+	/**
+	 * Initializes a Select Provider action
+	 * @param name the name in the user interface that represents the content provider
+	 * @param provider the content provider
+	 */
+	public SelectProviderAction(String name, IContentProvider provider) {
+		super(name,AS_RADIO_BUTTON);
+		this.provider = provider;
+		setToolTipText("Selects the " + name + " provider.");
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		String viewId = "org.eclipse.viatra2.visualisation.view";
+		ViatraVisualisationView view = (ViatraVisualisationView) PlatformUI
+		.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+			.findViewReference(viewId).getView(false);
+		view.setProvider(provider);
+	}
+	
+	
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/action/SetAutoLayoutAction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/action/SetAutoLayoutAction.java
new file mode 100644
index 0000000..9253e83
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/action/SetAutoLayoutAction.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.common.action;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.viatra2.visualisation.view.ViatraVisualisationView;
+
+/**
+ * An action that allows setting the content provider for the graph viewer
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class SetAutoLayoutAction extends Action {
+	
+	/**
+	 * Initializes a Select Provider action
+	 * @param name the name in the user interface that represents the content provider
+	 */
+	public SetAutoLayoutAction(String name) {
+		super(name,AS_CHECK_BOX);
+		setToolTipText("Selects the " + name + " provider.");
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		String viewId = "org.eclipse.viatra2.visualisation.view";
+		ViatraVisualisationView view = (ViatraVisualisationView) PlatformUI
+		.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+			.findViewReference(viewId).getView(false);
+		view.setAutoLayout(isChecked());
+	}
+	
+	
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/extensions/Category.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/extensions/Category.java
new file mode 100644
index 0000000..3c08b48
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/extensions/Category.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.common.extensions;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.viatra2.visualisation.ViatraColoredLabelProvider;
+import org.eclipse.viatra2.visualisation.layouts.IViatraLayoutAlgorithm;
+
+/**
+ * DTO for Categories.
+ * refers to:
+ *  - filters
+ *  - filterconfigurations
+ *  - layouts
+ *  - labelproviders
+ *  - presets
+ * @author istvan
+ *
+ */
+public class Category {
+	/**
+	 * The string identifier of the category
+	 */
+	public String id;
+	/**
+	 * The name of the category (visible in the user interface)
+	 */
+	public String name;
+	/**
+	 * A weight used to provide a consistent ordering of the categories
+	 */
+	public String orderID="0";
+	/**
+	 * All filters defined in the category
+	 */
+	public Map<String,NamedElement<ViewerFilter>> filters;
+	/**
+	 * All label providers defined in the category
+	 */
+	public Map<String,NamedElement<ViatraColoredLabelProvider>> labelproviders;
+	/**
+	 * All layout algorithms defined in the category
+	 */
+	public Map<String,NamedElement<IViatraLayoutAlgorithm>> layouts;
+	/**
+	 * All filter configurations defined in the category
+	 */
+	public Map<String,NamedElement<FilterConfiguration>> filterConfigurations;
+	/**
+	 * All presets stored in the category
+	 */
+	public Map<String,NamedElement<VisualisationPreset>> presets;
+	/**
+	 * Initializes a category with the selected id, name and orderID
+	 * @param _id
+	 * @param _name
+	 * @param _orderID
+	 */
+	public Category(String _id, String _name, String _orderID){
+		this.id=_id; this.name=_name; if (_orderID!=null) { this.orderID=_orderID; };
+		filters = new HashMap<String,NamedElement<ViewerFilter>>();
+		labelproviders = new HashMap<String, NamedElement<ViatraColoredLabelProvider>>();
+		layouts = new HashMap<String, NamedElement<IViatraLayoutAlgorithm>>();
+		filterConfigurations = new HashMap<String, NamedElement<FilterConfiguration>>();
+		presets = new HashMap<String, NamedElement<VisualisationPreset>>();
+	}
+	
+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/extensions/FilterConfiguration.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/extensions/FilterConfiguration.java
new file mode 100644
index 0000000..a3fb3c4
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/extensions/FilterConfiguration.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.common.extensions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ViewerFilter;
+
+/**
+ * DTO for Filter configurations. An ordered list of filters.
+ * @author istvan
+ *
+ */
+public class FilterConfiguration {
+	public String id, name, description;
+	public List<NamedElement<ViewerFilter>> filters;
+	public FilterConfiguration(String _id, String _name, String _desc) {
+		this.id=_id; this.name=_name; this.description=_desc;
+		filters = new ArrayList<NamedElement<ViewerFilter>>();
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/extensions/NamedElement.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/extensions/NamedElement.java
new file mode 100644
index 0000000..92b2526
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/extensions/NamedElement.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.common.extensions;
+
+/**
+ * Simple generic DTO for holding a reference to a pair of String,T
+ * @author istvan rath
+ *
+ * @param <T>
+ */
+public class NamedElement<T> {
+	public String name;
+	public T element;
+	public NamedElement(String _name, T _obj) {
+		this.name = _name;
+		this.element = _obj;
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/extensions/VisualisationPreset.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/extensions/VisualisationPreset.java
new file mode 100644
index 0000000..8fba9ea
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/extensions/VisualisationPreset.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.common.extensions;
+
+import org.eclipse.viatra2.visualisation.ViatraColoredLabelProvider;
+import org.eclipse.viatra2.visualisation.layouts.IViatraLayoutAlgorithm;
+
+/**
+ * DTO for a visualisation preset.
+ * @author istvan
+ *
+ */
+public class VisualisationPreset {
+	public String id,name;
+	public NamedElement<ViatraColoredLabelProvider> labelprovider;
+	public NamedElement<IViatraLayoutAlgorithm> layout;
+	public FilterConfiguration filters;
+	public VisualisationPreset(
+			String _id, String _name,
+			NamedElement<ViatraColoredLabelProvider> _labelprovider,
+			NamedElement<IViatraLayoutAlgorithm> _layout,
+			FilterConfiguration _filters) {
+		this.id=_id; this.name=_name;
+		this.labelprovider=_labelprovider;
+		this.layout=_layout;
+		this.filters=_filters;
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/extensions/internal/ExtensionAccess.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/extensions/internal/ExtensionAccess.java
new file mode 100644
index 0000000..592d190
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/extensions/internal/ExtensionAccess.java
@@ -0,0 +1,292 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.common.extensions.internal;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.viatra2.visualisation.ViatraColoredLabelProvider;
+import org.eclipse.viatra2.visualisation.VisualisationPlugin;
+import org.eclipse.viatra2.visualisation.common.extensions.Category;
+import org.eclipse.viatra2.visualisation.common.extensions.FilterConfiguration;
+import org.eclipse.viatra2.visualisation.common.extensions.NamedElement;
+import org.eclipse.viatra2.visualisation.common.extensions.VisualisationPreset;
+import org.eclipse.viatra2.visualisation.layouts.IViatraLayoutAlgorithm;
+
+/**
+ * Accessor class to extensions to the visualizer. 
+ * @author Istvan Rath
+ *
+ */
+public class ExtensionAccess {
+
+	private static final String ExtensionID = "org.eclipse.viatra2.visualisation.customization";
+
+	private static class CategoryComparator implements Comparator<Category>, Serializable {
+
+		private static final long serialVersionUID = 6726325608227073546L;
+
+		public int compare(Category o1, Category o2) {
+			String order1 = o1.orderID;
+			String order2 = o2.orderID;
+			int order = order1.compareTo(order2);
+			if (order == 0) {
+				order = o1.name.compareTo(o2.name);
+			}
+			if (order == 0) {
+				order = o1.id.compareTo(o2.id);
+			}
+			return order;
+		}
+
+	}
+	
+	/**
+	 * This is a singleton class for acessing the visualisation extensions
+	 */
+	public final static ExtensionAccess instance = new ExtensionAccess();
+	
+	private ExtensionAccess() {}
+	
+	/**
+	 * Reinitializes the access to the extensions by reading all extensions again.
+	 */
+	public static void reInit() {
+		instance.readExtensionPoint();
+	}
+	
+	/**
+	 * Returns all visualisation categories defined in extensions
+	 * @return the collection of created categories
+	 */
+	public static SortedSet<Category> getAllCategories() {
+		SortedSet<Category> sortedCategores=new TreeSet<Category>(new CategoryComparator());
+		sortedCategores.addAll(instance.categories.values());
+		return sortedCategores;
+	}
+	
+	/**
+	 * Returns all layout algorithms defined in extensions
+	 * @return the collection of defined layout algorithms
+	 */
+	public static Collection<NamedElement<IViatraLayoutAlgorithm>> getAllLayoutAlgorithms() {
+		
+		return instance.defaultCategory.layouts.values();
+	}
+	
+	/**
+	 * Returns all defined label providers
+	 * @return the collection of all defined label providers
+	 */
+	public static Collection<NamedElement<ViatraColoredLabelProvider>> getAllLabelProviders() {
+		return instance.defaultCategory.labelproviders.values();
+	}
+	
+	/**
+	 * Returns all defined filters
+	 * @return the collection of defined filters
+	 */
+	public static Collection<NamedElement<ViewerFilter>> getAllFilters() {
+		return instance.defaultCategory.filters.values();
+	}
+	
+	/**
+	 * Returns all defined visualisation presets
+	 * @return the collection of defined presets
+	 */
+	public static Collection<NamedElement<VisualisationPreset>> getAllPresets() {
+		return instance.defaultCategory.presets.values();
+	}
+	
+	/**
+	 * Calculates the category object for a selected category ID
+	 * @param id
+	 * @return the corresponding category object for a string ID
+	 */
+	public static Category getCategoryById(String id) {
+		return instance.categories.get(id);
+	}
+	
+	/**
+	 * Returns all filter configurations in extensions
+	 * @return the collection of all defined filter configurations
+	 */
+	public static Collection<NamedElement<FilterConfiguration>> getAllFilterConfigurations() {
+		return instance.defaultCategory.filterConfigurations.values();
+	}
+	
+	// etc. a lot of other lookup functions can be added if necessary 
+	
+	
+	/**
+	 * The "default" category, to which all extensions belong.
+	 */
+	private Category defaultCategory;
+	
+	/**
+	 * A map of categories defined using our extension point.
+	 * key: category ID
+	 */
+	Map<String, Category> categories;
+	
+	
+	private void _readCategories() {
+		categories = new HashMap<String, Category>();
+		defaultCategory = new Category("default","default","default");
+		IConfigurationElement[] config = 
+			Platform.getExtensionRegistry().getConfigurationElementsFor(ExtensionID);
+		for (IConfigurationElement element : config) {
+			try {
+				if ("category".equals(element.getName())) {
+					String name = element.getAttribute("name");
+					String id = element.getAttribute("id");
+					String orderid = element.getAttribute("orderID");
+					Category c = new Category(id,name,orderid);
+					categories.put(id, c);
+				}
+			} catch (Exception e) {
+				Platform.getLog(VisualisationPlugin.getDefault().getBundle()).log(new Status(IStatus.ERROR, 
+						VisualisationPlugin.PLUGIN_ID, e.getMessage()));
+			}
+		}
+		
+	}
+	
+	private<T> void registerElement( 
+			IConfigurationElement element,
+			String attrName,
+			Map<String,NamedElement<T>> genericTargetMap,
+			Map<String,NamedElement<T>> specificTargetMap) throws CoreException {
+		String name = element.getAttribute("name");
+		String id = element.getAttribute("id");
+		@SuppressWarnings("unchecked")
+		T obj = (T) element.createExecutableExtension(attrName);
+		NamedElement<T> ne = new NamedElement<T>(name, obj);
+		genericTargetMap.put(id, ne);
+		if (specificTargetMap!=null) {
+			specificTargetMap.put(id, ne);
+		}
+	}
+	
+	private void _readExecutables() {
+		IConfigurationElement[] config = 
+			Platform.getExtensionRegistry().getConfigurationElementsFor(ExtensionID);
+		for (IConfigurationElement element : config) {
+			try {
+				if ("algorithm".equals(element.getName())) {
+					Map<String,NamedElement<IViatraLayoutAlgorithm>> map = null;
+					if (element.getAttribute("category")!=null) {
+						map = categories.get(element.getAttribute("category")).layouts;
+					}
+					registerElement(element,"layoutalgorithm",defaultCategory.layouts,map);
+				}
+				else if ("filter".equals(element.getName())) {
+					Map<String,NamedElement<ViewerFilter>> map = null;
+					if (element.getAttribute("category")!=null) {
+						map = categories.get(element.getAttribute("category")).filters;
+					}
+					registerElement(element,"filter",defaultCategory.filters,map);
+				}
+				else if ("labelprovider".equals(element.getName())) {
+					Map<String,NamedElement<ViatraColoredLabelProvider>> map = null;
+					if (element.getAttribute("category")!=null) {
+						map = categories.get(element.getAttribute("category")).labelproviders;
+					}
+					registerElement(element,"labelprovider",defaultCategory.labelproviders,map);
+				}
+			} catch (Exception e) {
+				Platform.getLog(VisualisationPlugin.getDefault().getBundle()).log(new Status(IStatus.ERROR, 
+						VisualisationPlugin.PLUGIN_ID, e.getMessage()));				
+			}
+		}
+	}
+	
+	private void _readFilterConfigurations() {
+		IConfigurationElement[] config = 
+			Platform.getExtensionRegistry().getConfigurationElementsFor(ExtensionID);
+		for (IConfigurationElement element : config) {
+			try {
+				if ("filterconfiguration".equals(element.getName())) {
+					String id = element.getAttribute("id");
+					String name = element.getAttribute("name");
+					String description = element.getAttribute("description");
+					FilterConfiguration fc = new FilterConfiguration(id, name, description);
+					for (IConfigurationElement cd : element.getChildren("filterreference")) {
+						String filterID = cd.getAttribute("filterID");
+						if (filterID!=null) {
+							fc.filters.add(defaultCategory.filters.get(filterID));
+						}
+					}
+					NamedElement<FilterConfiguration> _fc = new NamedElement<FilterConfiguration>(name, fc);
+					defaultCategory.filterConfigurations.put(id, _fc);
+					if (element.getAttribute("category")!=null) {
+						categories.get(element.getAttribute("category")).filterConfigurations.put(id, _fc);
+					}
+				}
+			}
+			catch (Exception e) {
+				Platform.getLog(VisualisationPlugin.getDefault().getBundle()).log(new Status(IStatus.ERROR, 
+						VisualisationPlugin.PLUGIN_ID, e.getMessage()));				
+			}
+		}
+	}
+	
+	private void _readPresets() {
+		IConfigurationElement[] config = 
+			Platform.getExtensionRegistry().getConfigurationElementsFor(ExtensionID);
+		for (IConfigurationElement element : config) {
+			try {
+				if ("preset".equals(element.getName())) {
+					String id = element.getAttribute("id");
+					String name = element.getAttribute("name");
+					// process layout and labelprovider
+					NamedElement<IViatraLayoutAlgorithm> layout = defaultCategory.layouts.get(element.getAttribute("layout"));
+					NamedElement<ViatraColoredLabelProvider> labelprovider = defaultCategory.labelproviders.get(element.getAttribute("labelprovider"));
+					// process filterconfiguration
+					FilterConfiguration filterconfig = defaultCategory.filterConfigurations.get(element.getAttribute("filters")).element;
+					if (layout!=null && labelprovider!=null && filterconfig!=null) {
+						VisualisationPreset vp = new VisualisationPreset(id,name,labelprovider,layout,filterconfig);
+						NamedElement<VisualisationPreset> vp_named = new NamedElement<VisualisationPreset>(name, vp);
+						defaultCategory.presets.put(id,vp_named);
+						Map<String,NamedElement<VisualisationPreset>> map = null;
+						if (element.getAttribute("category")!=null) {
+							map = categories.get(element.getAttribute("category")).presets;
+							map.put(name,vp_named);
+						}
+					}
+				}
+			}
+			catch (Exception e) {
+				Platform.getLog(VisualisationPlugin.getDefault().getBundle()).log(new Status(IStatus.ERROR, 
+						VisualisationPlugin.PLUGIN_ID, e.getMessage()));				
+			}
+		}
+	}
+	
+	private void readExtensionPoint() {
+		// the read order is very important here!
+		_readCategories();
+		_readExecutables();
+		_readFilterConfigurations();
+		_readPresets();
+	}
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/filters/DefaultFilter.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/filters/DefaultFilter.java
new file mode 100644
index 0000000..7976921
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/filters/DefaultFilter.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.common.filters;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+
+/**
+ * Empty filter.
+ * @author istvan rath
+ *
+ */
+public class DefaultFilter extends ViewerFilter {
+
+	@Override
+	public boolean select(Viewer viewer, Object parentElement, Object element) {
+		return true;
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/filters/TypeBasedFilter.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/filters/TypeBasedFilter.java
new file mode 100644
index 0000000..54bf874
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/filters/TypeBasedFilter.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2011, Istvan Rath, Zoltan Ujhelyi, Daniel Varro
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.visualisation.common.filters;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IModelSpace;
+
+/**
+ * Type-based abstract viewer filter, provides facilities
+ * to filter the model space view according to a given set of
+ *  - allowed
+ *  - disallowed
+ * VPM types.
+ * 
+ * @author Istvan Rath
+ *
+ */
+public abstract class TypeBasedFilter extends ViewerFilter {
+	
+	protected final static List<String> allowedTypeIDs = new ArrayList<String>();
+	
+	protected final static List<String> disallowedTypeIDs = new ArrayList<String>();
+	
+	/**
+	 * hash used to detect when the filter is being used for a different modelspace than previously.
+	 */
+	int modelSpaceHash;
+
+	@Override
+	public final boolean select(Viewer viewer, Object parentElement, Object element) {
+		if (element instanceof IModelElement) {
+			IModelElement modelElement = (IModelElement) element;
+			IModelSpace ms = modelElement.getModelSpace();
+			IModelManager mm = ms.getModelManager();
+			
+			if(!allowedTypeIDs.isEmpty() && ms.hashCode() != modelSpaceHash){
+				modelSpaceHash = ms.hashCode();
+				allowedTypeIDs.clear();
+			}
+			if(allowedTypeIDs.isEmpty()){
+				fillAllowedTypeIDs(mm);
+			}
+			if(!disallowedTypeIDs.isEmpty() && ms.hashCode() != modelSpaceHash){
+				modelSpaceHash = ms.hashCode();
+				allowedTypeIDs.clear();
+			}
+			if(disallowedTypeIDs.isEmpty()){
+				fillDisallowedTypeIDs(mm);
+			}
+			if (!allowedTypeIDs.isEmpty()) {
+				for (String typeId : allowedTypeIDs) {
+					IModelElement type = mm.getElementByID(typeId);
+					if (modelElement.isInstanceOf(type)) {
+						return true;
+					}
+				}
+				return false;
+			}
+			else if (!disallowedTypeIDs.isEmpty()) {
+				for (String typeId : disallowedTypeIDs) {
+					IModelElement type = mm.getElementByID(typeId);
+					if (modelElement.isInstanceOf(type)) {
+						return false;
+					}
+				}
+				return true;
+			}
+		}
+		return true;
+	}
+
+	protected abstract void fillAllowedTypeIDs(IModelManager manager);
+	
+	protected abstract void fillDisallowedTypeIDs(IModelManager manager);
+	
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/HighlightableSmartLabelProvider.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/HighlightableSmartLabelProvider.java
new file mode 100644
index 0000000..aa0d91f
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/HighlightableSmartLabelProvider.java
@@ -0,0 +1,203 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.common.labelproviders;
+
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.eclipse.jface.resource.ColorRegistry;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelSpace;
+
+/**
+ * "Smart" label provider that displays useful labels.
+ * This variant supports highlighting of certain elements.
+ * @author istvan rath
+ *
+ */
+public class HighlightableSmartLabelProvider extends SmartLabelProvider {
+
+	/**
+	 * FQN -> Set<Weakref<IModelElement> map to hold
+	 * weak refs to model element from multiple model spaces.
+	 */
+	private static Map<String, Collection<WeakReference<IModelElement>>> highlightedElements =
+		new TreeMap<String, Collection<WeakReference<IModelElement>>>();
+	
+	private static Map<String, Color> highlightColor =
+		new TreeMap<String, Color>();
+	
+	/**
+	 * Add an element to the set of highlighted elements.
+	 * @param me the model element to highlight
+	 */
+	public static void highlightElement(IModelElement me) {
+		highlightElement(me, null);
+	}
+	
+	/**
+	 * Highlights an element with a selected color string. Color strings could
+	 * be instantiated using
+	 * {@link HighlightableSmartLabelProvider#registerColor(int, int, int)}.
+	 * @param me
+	 *            the model element to highlight
+	 * @param colorKey
+	 *            the color key to use
+	 */
+	public static void highlightElement(IModelElement me, String colorKey) {
+		String key = getKey(me);
+		Collection<WeakReference<IModelElement>> set = 
+			highlightedElements.get(key);
+		if (set==null) {
+			set = new ArrayList<WeakReference<IModelElement>>();
+			highlightedElements.put(key, set);
+		}
+		set.add(new WeakReference<IModelElement>(me));
+		if (colorKey!=null && hlCReg.get(colorKey)!=null){
+			highlightColor.put(key, hlCReg.get(colorKey));
+		}
+	}
+	/**
+	 * Clears all the highlights from a given modelspace.
+	 * @param msp
+	 */
+	public static void clearHighlights(IModelSpace msp){
+		for (Collection<WeakReference<IModelElement>> c :highlightedElements.values()) {
+			Collection<WeakReference<IModelElement>> toRemove = 
+				new ArrayList<WeakReference<IModelElement>>();
+			for (WeakReference<IModelElement> wr : c) {
+				if (wr.get().getModelSpace().equals(msp)) {
+					toRemove.add(wr);
+				}
+			}
+			c.removeAll(toRemove);
+		}
+	}
+	
+	private static String getKey(IModelElement me) {
+		return me.getID();
+	}
+	
+	/**
+	 * Remove an element from the set of highlighted ones.
+	 * @param me 
+	 */
+	public static void unhighlightElement(IModelElement me) {
+		String key = getKey(me);
+		Collection<WeakReference<IModelElement>> set = 
+			highlightedElements.get(key);
+		if (set!=null) {
+			WeakReference<IModelElement> toRemove = null;
+			for (WeakReference<IModelElement> target : set) {
+				if (Equals(target.get(), me)) {					
+					toRemove = target;
+					break;
+				}
+			}
+			if (toRemove!=null) {
+				set.remove(toRemove);
+			}
+		}
+		highlightColor.remove(key);
+	}
+	
+	private static boolean Equals(IModelElement me0, IModelElement me1) {
+		return me0.equals(me1) && me0.getModelSpace().equals(me1.getModelSpace());
+	}
+	
+	public static boolean isHighlighted(IModelElement me) {
+		String key = getKey(me);
+		Collection<WeakReference<IModelElement>> set = 
+			highlightedElements.get(key);
+		if (set!=null) {
+			for (WeakReference<IModelElement> target : set) {
+				if (Equals(target.get(), me)) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+	
+	/**
+	 * Color registry for storing highlight colors.
+	 */
+	private static ColorRegistry hlCReg = new ColorRegistry();
+	
+	private Color HL;
+	private static final int highlightwidth = 3;
+	
+	
+	public static String registerColor(int r, int g, int b) {
+		RGB rgb = new RGB(r,g,b);
+		if (hlCReg.get(rgb.toString())==null) {
+			hlCReg.put(rgb.toString(), rgb);
+		}
+		return rgb.toString();
+	}
+	
+	public HighlightableSmartLabelProvider() {
+		hlCReg.put("highlight", new RGB(255, 0, 0));
+		HL = hlCReg.get("highlight");
+	}
+	
+	@Override
+	public int getBorderWidth(Object entity) {
+		// if an entity is highlighted -> increase border width
+		if (entity instanceof IModelElement && isHighlighted((IModelElement)entity)) {
+			return highlightwidth;
+		}
+		return super.getBorderWidth(entity);
+	}
+	
+	@Override
+	public Color getBorderColor(Object entity) {
+		Color c = _getColor(entity);
+		return c!=null?c:super.getBorderColor(entity);
+	}
+	
+	@Override
+	public Color getBackgroundColour(Object entity) {
+		Color c = _getColor(entity);
+		return c!=null?c:super.getBackgroundColour(entity);
+	}
+	
+	@Override
+	public int getLineWidth(Object rel) {
+		// if a relation is highlighted -> increase width
+		if (rel instanceof IModelElement && isHighlighted((IModelElement)rel)) {
+			return highlightwidth;
+		}
+		return super.getLineWidth(rel);
+	}
+	
+	 @Override
+	public Color getColor(Object entity) {
+		Color c = _getColor(entity);
+		return c!=null?c:super.getColor(entity);
+	}
+	 
+	 private Color _getColor(Object entity) {
+		 if (entity instanceof IModelElement && isHighlighted((IModelElement)entity)) {
+				Color c = highlightColor.get(getKey((IModelElement)entity));
+				if (c!=null) {
+					return c;
+				}
+				return HL;
+		 }
+		 return null;
+	 }
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/IFigureFactory.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/IFigureFactory.java
new file mode 100644
index 0000000..8d52e44
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/IFigureFactory.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.common.labelproviders;
+
+import org.eclipse.draw2d.IFigure;
+
+/**
+ * Factory interface for creating custom figures for visualization.
+ * @author istvan rath
+ *
+ */
+public interface IFigureFactory {
+
+	/**
+	 * Create a {@link IFigure} for a given model object.
+	 * @param element
+	 * @return the created figure for the selected element
+	 */
+	public IFigure createFigure(Object element);
+	
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/ImageLabelProvider.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/ImageLabelProvider.java
new file mode 100644
index 0000000..947e081
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/ImageLabelProvider.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.common.labelproviders;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.zest.core.viewers.IFigureProvider;
+
+/**
+ * Simple label provider that delegates the creation of custom figures to a factory.
+ * If no figure is created, it behaves like the smart label provider.
+ * @author istvan rath
+ *
+ */
+public class ImageLabelProvider extends HighlightableSmartLabelProvider implements IFigureProvider
+{
+
+	IFigureFactory factory;
+	
+	public void setFactory(IFigureFactory factory) {
+		this.factory = factory;
+	}
+	
+	
+	public IFigure getFigure(Object element) {
+		if (factory!=null) {
+			return factory.createFigure(element);
+		}
+		return null;
+	}
+	
+	@Override
+	public Color getBackgroundColour(Object entity) {
+		if (getFigure(entity)!=null) {
+			// we have a custom figure
+			// no background unless we are highlighted
+			if (isHighlighted((IModelElement)entity)) {
+				return super.getBackgroundColour(entity);
+			}
+			else {
+				return null;
+			}
+		}
+		return super.getBackgroundColour(entity);
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/ImageMapFigureFactory.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/ImageMapFigureFactory.java
new file mode 100644
index 0000000..77fc77f
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/ImageMapFigureFactory.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.common.labelproviders;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.viatra2.visualisation.common.labelproviders.internal.ImageCenteringFigure;
+
+/**
+ * 
+ * @author istvan rath
+ *
+ */
+public abstract class ImageMapFigureFactory implements IFigureFactory {
+
+	/**
+	 * Get the figure identification key for a given element. This will identify 
+	 * what figure will be assigned to the the element.
+	 * 
+	 * @param element
+	 * @return
+	 */
+	protected abstract String getKey(Object element);
+	
+	private Map<String, Image> images = new HashMap<String, Image>();
+	
+	private SmartLabelProvider labelprovider;
+	
+	public void setLabelProvider(SmartLabelProvider lp) {
+		this.labelprovider=lp;
+	}
+	
+	public void putImage(String key, Image im) {
+		images.put(key, im);
+	}
+	
+	public final IFigure createFigure(Object element) {
+		String key = getKey(element);
+		if (key!=null && images.get(key)!=null) {
+			String labelContents = "";
+			if (labelprovider!=null) {
+				labelContents = labelprovider.getText(element);
+			}
+			return new ImageCenteringFigure(true, images.get(key),labelContents,labelprovider.getTooltip(element));
+		}
+		return null;
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/SmartLabelProvider.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/SmartLabelProvider.java
new file mode 100644
index 0000000..f5fb0ed
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/SmartLabelProvider.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.common.labelproviders;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.text.FlowPage;
+import org.eclipse.draw2d.text.TextFlow;
+import org.eclipse.jface.resource.FontRegistry;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.visualisation.modelspace.datasource.ModelSpaceLabelProvider;
+
+/**
+ * "Smart" label provider that displays useful labels.
+ * @author istvan rath
+ *
+ */
+public class SmartLabelProvider extends ModelSpaceLabelProvider {
+
+	FontRegistry fontRegistry;
+	
+	public SmartLabelProvider() {
+		fontRegistry = new FontRegistry(Display.getDefault());
+		fontRegistry.put("default", new FontData[]{new FontData("Sans", 9, SWT.BOLD)} );
+		fontRegistry.put("code", new FontData[]{new FontData("Sans", 9, SWT.NORMAL)});
+	}
+	
+	protected static String getTypesAsString(IModelElement element) {
+		StringBuffer r = new StringBuffer();
+		for (IModelElement type : element.getTypes()) {
+			if (r.length()>0) r.append(",");
+			r.append(type.getName());
+		}
+		return r.toString();
+	}
+	
+	protected static String getShortText2(String s) {
+		return s;
+	}
+	
+	@Override
+	public String getText(Object element) {
+		if (element instanceof IModelElement) {
+			IModelElement me = (IModelElement)element;
+			String nameStr = "";
+			if (!me.getName().startsWith("uN")) {
+				nameStr+=me.getName();
+			}
+			if (element instanceof IEntity) {
+				IEntity ent = (IEntity)element;
+				// if there is a value, display that too
+				if (ent.getValue()!=null && ent.getValue().length()>0) {
+					//return ent.getValue();
+					nameStr += " {"+ent.getValue()+"}";
+				}
+			}
+//			else if (element instanceof IRelation) {
+				// relation-specific tricks
+//			}
+			String typeStr = getShortText2(getTypesAsString(me));
+			if (typeStr.length()>0) {
+				return nameStr+": "+typeStr;
+			}
+			return nameStr;			
+		}
+		return super.getText(element);
+	}	
+	
+	
+	
+	@Override
+	public boolean fisheyeNode(Object entity) {
+		return false; // "fisheye" nodes don't work too well with tooltips
+	}
+	
+	
+	@Override
+	public IFigure getTooltip(Object entity) {
+		if (entity instanceof IModelElement) {
+			IModelElement me = (IModelElement)entity;
+			
+			FlowPage fp = new FlowPage();
+			
+			TextFlow nameTf = new TextFlow();
+			nameTf.setFont(fontRegistry.get("default"));
+			TextFlow infoTf = new TextFlow();
+			infoTf.setFont(fontRegistry.get("code"));
+			
+			nameTf.setText(me.getName());
+			String info="\n";
+			info+="FQN: "+me.getFullyQualifiedName()+"\n";
+			info+="Namespace: "+me.getNamespace().getName()+"\n";
+			info+="Types: "+getTypesAsString(me)+"\n";
+			if (me instanceof IEntity) {
+				info+="Value: "+((IEntity)me).getValue()+"\n";
+			}
+			info+="Comments: "+me.getViewInfo()+"\n";
+			infoTf.setText(info);
+			fp.add(nameTf);
+			fp.add(infoTf);
+			return fp;
+		}
+		return null;
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/internal/ColorFactory.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/internal/ColorFactory.java
new file mode 100644
index 0000000..7f2af64
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/internal/ColorFactory.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011, Istvan Rath and Zoltan Ujhelyi
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.visualisation.common.labelproviders.internal;
+
+import java.util.HashMap;
+
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * A factory class for creating colors.
+ * @author Istvan Rath
+ *
+ */
+public class ColorFactory 
+{
+
+	private static ColorFactory instance = new ColorFactory();
+	
+	/**
+	 * Returns the singleton class for storing colors
+	 * @return the singleton factory
+	 */
+	public static ColorFactory getInstance()
+	{
+		if (instance == null)
+			instance = new ColorFactory();
+		return instance;
+	}
+	
+	private ColorFactory()
+	{
+		colors = new HashMap<RGB, Color>();
+	}
+	
+	private HashMap<RGB, Color> colors;
+	
+	/**
+	 * Returns the required color (by RGB code). If the same color is asked twice, the factory returns the same value
+	 * @param R
+	 * @param G
+	 * @param B
+	 * @return the corresponding color object
+	 */
+	public static Color getColor(int R, int G, int B)
+	{
+		Color color = getInstance().colors.get(new RGB(R,G,B));
+		if (color == null)
+		{
+			color = new Color(Display.getCurrent(),R,G,B);
+			getInstance().colors.put(new RGB(R,G,B), color);
+		}
+		return color;
+	}
+	
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/internal/DashedBorder.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/internal/DashedBorder.java
new file mode 100644
index 0000000..01477b9
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/internal/DashedBorder.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011, Istvan Rath and Zoltan Ujhelyi
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.visualisation.common.labelproviders.internal;

+

+import org.eclipse.draw2d.Graphics;

+import org.eclipse.draw2d.IFigure;

+import org.eclipse.draw2d.LineBorder;

+import org.eclipse.draw2d.geometry.Insets;

+import org.eclipse.swt.SWT;

+import org.eclipse.swt.graphics.Color;

+

+public class DashedBorder extends LineBorder {

+

+	public DashedBorder(Color color, int width) 

+	{

+		super(color, width);

+	}

+	

+	@Override

+	public void paint(IFigure figure, Graphics graphics, Insets insets) {

+		graphics.setLineStyle(SWT.LINE_DASH);

+		super.paint(figure, graphics, insets);

+	}

+	

+}

diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/internal/ImageCenteringFigure.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/internal/ImageCenteringFigure.java
new file mode 100644
index 0000000..21f71bf
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/internal/ImageCenteringFigure.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011, Istvan Rath and Zoltan Ujhelyi
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.visualisation.common.labelproviders.internal;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Shape;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * Figure class centering an Image and a Label below it.
+ * @author Istvan Rath
+ *
+ */
+public class ImageCenteringFigure extends ShapeCenteringFigure
+{
+
+	private Image im;
+	
+	public ImageCenteringFigure(boolean needBorder, Image image,String labelText,IFigure tooltip) 
+	{
+		super(needBorder,labelText,tooltip);
+		im = image;
+	}
+	
+	public ImageCenteringFigure(Image image,String labelText,IFigure tooltip) 
+	{
+		super(false,labelText,tooltip);
+		im = image;
+	}
+
+	/*
+	@Override
+	protected void createAnchors() 
+	{
+		iIncomingAnchor = new ChopboxAnchor(iShapeFigure);
+		iOutgoingAnchor = new ChopboxAnchor(iShapeFigure);
+	}
+	 */
+	/**
+	 * Override in subclasses if not original image file size is desired.
+	 * @return
+	 */
+	protected Dimension getShapeDimension()
+	{
+		if (im!=null)
+		{
+			org.eclipse.swt.graphics.Rectangle bounds = im.getBounds();
+			return new Dimension(bounds.width, bounds.height);
+		}
+		return new Dimension(50,50);
+	}
+	
+	public class ImageShape extends Shape
+	{
+		@Override
+		protected void fillShape(Graphics graphics) 
+		{
+			Rectangle ca = ImageShape.this.getClientArea();
+			org.eclipse.swt.graphics.Rectangle bounds = im.getBounds();
+			graphics.drawImage(im,
+					0,0,
+					bounds.width, bounds.height,
+					ca.x, ca.y,
+					ca.width, ca.height
+					);
+		}
+		@Override
+		protected void outlineShape(Graphics graphics) {
+			// outline is empty			
+		}
+	}
+	
+	@Override
+	protected void createShapeFigure() 
+	{
+        iShapeFigure = new ImageShape();
+		iShapeFigure.setOpaque(false);
+		iShapeFigure.setBackgroundColor(ColorFactory.getColor(239,235,231));
+		iShapeFigure.setForegroundColor(ColorFactory.getColor(70,70,70));
+		iShapeFigure.setSize(getShapeDimension());
+	}
+
+
+
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/internal/LocalCoordinatePanel.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/internal/LocalCoordinatePanel.java
new file mode 100644
index 0000000..0e18591
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/internal/LocalCoordinatePanel.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011, Istvan Rath and Zoltan Ujhelyi
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.visualisation.common.labelproviders.internal;
+
+import org.eclipse.draw2d.Panel;
+
+/**
+ * A simple implementation of the standard draw2d Panel with local coordinates.
+ * 
+ * @author Istvan Rath
+ */
+public class LocalCoordinatePanel extends Panel {
+	protected boolean useLocalCoordinates() {
+		// This must be here to allow relative position of children from their
+		// parents position.
+		return true;
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/internal/ShapeCenteringFigure.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/internal/ShapeCenteringFigure.java
new file mode 100644
index 0000000..d67aba5
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/internal/ShapeCenteringFigure.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011, Istvan Rath and Zoltan Ujhelyi
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.visualisation.common.labelproviders.internal;
+
+import org.eclipse.draw2d.BorderLayout;
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.DelegatingLayout;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Locator;
+import org.eclipse.draw2d.Panel;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.Shape;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.text.FlowPage;
+import org.eclipse.draw2d.text.TextFlow;
+import org.eclipse.jface.resource.FontRegistry;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.FontData;
+
+
+/**
+ * This figure class will provide a "Label" and a "Shape" which will be centered above the label.
+ * @author Istvan Rath
+ *
+ */
+public abstract class ShapeCenteringFigure extends Figure 
+{
+	protected Shape iShapeFigure;
+	protected BorderLayout iLayout;
+	
+
+	
+	static FontRegistry registry = new FontRegistry();
+	
+	static {
+		registry.put("default", new FontData[]{new FontData("Sans", 9, SWT.BOLD)} );
+		registry.put("code", new FontData[]{new FontData("Sans", 9, SWT.NORMAL)});
+	}
+	
+	/**
+	 * This helper class will be given as a constraint for the image figure.
+	 * 
+	 */
+	protected class CenteringLocator implements Locator
+	{
+		/**
+		 * The image figure will be centered.
+		 */
+		public void relocate(IFigure target) 
+		{
+			IFigure parent = target.getParent();
+			int width = iShapeFigure.getSize().width;
+			int height = iShapeFigure.getSize().height;
+			int x = parent.getClientArea().width / 2 - width / 2;
+			int y = parent.getClientArea().height / 2 - height / 2;
+			target.setLocation(new Point(x,y));
+		}	
+	}
+	
+	protected boolean isActivated = false;
+		
+	protected boolean needBorder = false;
+	
+	IFigure tooltip;
+	
+	public ShapeCenteringFigure(boolean _needBorder, String labelText, IFigure tooltip) 
+	{
+		this.needBorder = _needBorder;
+		this.tooltip = tooltip;
+	
+		
+		
+		
+		// Create general layout
+        iLayout = new BorderLayout();
+        // Create bottom panel for label
+        Panel ptmp = new LocalCoordinatePanel();
+        ptmp.setOpaque(true);
+        ptmp.setLayoutManager(new BorderLayout());
+         
+        
+    	FlowPage fp = new FlowPage();
+    	fp.setHorizontalAligment(PositionConstants.CENTER);
+    	fp.setMaximumSize(new Dimension(100,100));
+    	TextFlow label = new TextFlow();
+		label.setFont(registry.get("code"));
+		label.setText(labelText);
+		fp.add(label);
+		
+        
+        // Add label to panel and add bottom panel to the whole figure
+        ptmp.add(fp);
+        
+        ptmp.getLayoutManager().setConstraint(fp, BorderLayout.CENTER);
+        add(ptmp);
+        iLayout.setConstraint(ptmp, BorderLayout.BOTTOM);
+        // Create center panel for the shape figure
+        Panel ptop = new LocalCoordinatePanel();
+        ptop.setOpaque(true);
+        ptop.setLayoutManager(new DelegatingLayout());
+        // Create shape figure
+        createShapeFigure();
+
+		// add shape figure to top panel
+		ptop.add(iShapeFigure);
+		ptop.getLayoutManager().setConstraint(iShapeFigure, new CenteringLocator());
+		add(ptop);
+		iLayout.setConstraint(ptop, BorderLayout.CENTER);
+		
+		// set whole size
+		setSize(10+Math.max(iShapeFigure.getSize().width, fp.getPreferredSize().width),
+				3+iShapeFigure.getSize().height+fp.getPreferredSize().height);
+		setLayoutManager(iLayout);
+		setOpaque(true);	
+	
+		if (needBorder) {
+			setBorder(new DashedBorder(ColorConstants.gray, 1));
+		}
+		
+		isActivated = true;
+	}
+	
+	/**
+	 * Subclasses should initialize the iShapeFigure internal member in this method.
+	 */
+	protected abstract void createShapeFigure();
+	
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.draw2d.Figure#useLocalCoordinates()
+	 */
+	@Override
+	protected boolean useLocalCoordinates() {
+		return true;
+	}
+
+	@Override
+	public IFigure getToolTip() {
+		return tooltip;
+	}
+	
+	protected abstract Dimension getShapeDimension();
+	
+}
+	
+	
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/AbstractVisualisationFunction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/AbstractVisualisationFunction.java
new file mode 100644
index 0000000..d1b9ae2
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/AbstractVisualisationFunction.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011, Istvan Rath and Zoltan Ujhelyi
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.visualisation.common.labelproviders.natives;
+
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.logger.Logger;
+import org.eclipse.viatra2.natives.ASMNativeFunction;
+import org.eclipse.viatra2.visualisation.IVisualisationDescriptor;
+import org.eclipse.viatra2.visualisation.VisualisationPlugin;
+
+/**
+ * @author Zoltan Ujhelyi
+ *
+ */
+public abstract class AbstractVisualisationFunction implements
+		ASMNativeFunction {
+	
+	protected IVisualisationDescriptor descriptor;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.natives.ASMNativeFunction#evaluate(org.eclipse.viatra2.core.IModelSpace, java.lang.Object[])
+	 */
+	@Override
+	public Object evaluate(IModelSpace msp, Object[] params)
+			throws VPMRuntimeException {
+		descriptor = VisualisationPlugin.getVisualisationManager().getVisualisation(msp.getFramework());
+		if (descriptor != null) {
+			return run(msp, params);
+		} else {
+			msp.getFramework().getLogger().message(Logger.WARNING, "Visualisation is not initialized");
+			return Boolean.FALSE;
+		}
+	}
+
+	protected abstract Object run(IModelSpace msp, Object[] params) throws VPMRuntimeException;
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/ClearHighlightsFunction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/ClearHighlightsFunction.java
new file mode 100644
index 0000000..d21c9d3
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/ClearHighlightsFunction.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.common.labelproviders.natives;
+
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.visualisation.common.labelproviders.HighlightableSmartLabelProvider;
+
+/**
+ * Native function to remove all previously existing highlights from viz.
+ * @author istvan rath
+ *
+ */
+public class ClearHighlightsFunction extends AbstractVisualisationFunction {
+
+	public Object run(IModelSpace msp, Object[] params) throws VPMRuntimeException {
+		HighlightableSmartLabelProvider.clearHighlights(msp);
+		return Boolean.TRUE;
+	}
+
+	public String getName() {
+		return "viz.clearhighlights";
+	}
+
+	public String getID() {
+		return getName();
+	}
+
+	public String getDescription() {
+		return "removes all highlights from viz";
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/GetColorFunction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/GetColorFunction.java
new file mode 100644
index 0000000..e32e13f
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/GetColorFunction.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.common.labelproviders.natives;
+
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.natives.NativeFunctionParameter;
+import org.eclipse.viatra2.natives.VIATRANativeFunction;
+import org.eclipse.viatra2.visualisation.common.labelproviders.HighlightableSmartLabelProvider;
+
+/**
+ * Native function that registers a color to be used for visualization.
+ * @author istvan rath
+ *
+ */
+@VIATRANativeFunction(name="viz.getcolor", 
+		params = { 
+			@NativeFunctionParameter(
+					name = "R", 
+					type = { NativeFunctionParameter.ParameterType.INTEGER }
+					),
+					@NativeFunctionParameter(
+							name = "G", 
+							type = { NativeFunctionParameter.ParameterType.INTEGER }
+							),
+							@NativeFunctionParameter(
+									name = "B", 
+									type = { NativeFunctionParameter.ParameterType.INTEGER }
+									),
+			}, 
+		returns = { NativeFunctionParameter.ParameterType.STRING })
+public class GetColorFunction extends AbstractVisualisationFunction {
+
+
+	public Object run(IModelSpace msp, Object[] params)	throws VPMRuntimeException {
+		int r=0,g=0,b=0;
+		int i = 0;
+		for (Object o : params) {
+			try {
+			switch (i%3) {
+			case 0: r=Integer.parseInt(o.toString()); break;
+			case 1: g=Integer.parseInt(o.toString()); break;
+			case 2: b=Integer.parseInt(o.toString()); break;
+			}
+			i++;
+			} catch (NumberFormatException e) { }
+		}
+		return HighlightableSmartLabelProvider.registerColor(r, g, b);
+	}
+
+	public String getName() {
+		return "viz.getcolor";
+	}
+
+	public String getID() {
+		return getName();
+	}
+
+	public String getDescription() {
+		return "Registers a color to be used in viz highlighting";
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/HighlightFunction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/HighlightFunction.java
new file mode 100644
index 0000000..a17c99e
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/HighlightFunction.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.common.labelproviders.natives;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.natives.NativeFunctionParameter;
+import org.eclipse.viatra2.natives.VIATRANativeFunction;
+import org.eclipse.viatra2.visualisation.common.labelproviders.HighlightableSmartLabelProvider;
+
+/**
+ * Native function which allows VTCL code to highlight something on the visualization.
+ * @author istvan rath
+ *
+ */
+@VIATRANativeFunction(name="viz.highlight",
+		params={
+		@NativeFunctionParameter(
+				isVarArg=false,
+				name = "highlightColor",
+				description="(OPTIONAL) highlight color key (returned by getColor) to use",
+				type = { NativeFunctionParameter.ParameterType.STRING }
+		),
+		@NativeFunctionParameter(
+				isVarArg=true,
+				description="model element to highlight", 
+				name = "modelElement", 
+				type = { NativeFunctionParameter.ParameterType.MODEL_ELEMENT }),
+				
+		},
+		returns={NativeFunctionParameter.ParameterType.BOOLEAN})
+public class HighlightFunction extends AbstractVisualisationFunction {
+
+	public Object run(IModelSpace msp, Object[] params)	throws VPMRuntimeException {
+		
+		String colorKey = null;
+		
+		// ignore order of parameters
+		List<IModelElement> elementsToHighlight = new ArrayList<IModelElement>();
+		
+		for (Object element: params) {
+			if (element instanceof String) {
+				colorKey = (String)element;
+			}
+			if (element instanceof IModelElement) {
+				elementsToHighlight.add((IModelElement)element);
+			}
+		}
+		
+		for (IModelElement me : elementsToHighlight) {
+			HighlightableSmartLabelProvider.highlightElement(me,colorKey);
+		}
+		
+		return Boolean.TRUE;
+	}
+
+	public String getName() {
+		return "viz.highlight";
+	}
+
+	public String getID() {
+		return "viz.highlight";
+	}
+
+	public String getDescription() {
+		return "Highlights an element in the visualization";
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/RedrawFunction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/RedrawFunction.java
new file mode 100644
index 0000000..da7d30c
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/RedrawFunction.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011, Istvan Rath and Zoltan Ujhelyi
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.viatra2.visualisation.common.labelproviders.natives;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.natives.NativeFunctionParameter;
+import org.eclipse.viatra2.natives.VIATRANativeFunction;
+
+/**
+ * @author Zoltan Ujhelyi
+ *
+ */
+@VIATRANativeFunction(name="viz.redraw",
+		params={@NativeFunctionParameter(
+				isVarArg=false,
+				description="amount of millisecs to sleep", 
+				name = "sleep", 
+				type = { NativeFunctionParameter.ParameterType.INTEGER }),
+				
+		},
+		returns={NativeFunctionParameter.ParameterType.BOOLEAN})
+public class RedrawFunction extends AbstractVisualisationFunction {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.natives.ASMNativeFunction#evaluate(org.eclipse.viatra2.core.IModelSpace, java.lang.Object[])
+	 */
+	public Object run(IModelSpace msp, Object[] params)
+			throws VPMRuntimeException {
+		// synced viz refresh
+		Display.getDefault().syncExec(new Runnable() {
+			public void run() {
+//				try {
+//					String viewId = "org.eclipse.viatra2.visualisation.view";
+//					
+//					IViewReference vref = PlatformUI
+//					.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+//					.findViewReference(viewId);
+//					
+//					if (vref!=null) {
+//						ViatraVisualisationView view = (ViatraVisualisationView) vref.getView(false);
+//						if (view!=null) {
+//							view.redraw();
+//						}
+//					}
+//				}
+//				catch (Throwable t) {
+//					t.printStackTrace();
+//				}
+				descriptor.redrawGraph();
+			}
+		});
+		
+		
+		for (Object element: params) {
+			if (element instanceof Integer) {
+				try {
+					Thread.sleep((Integer)element);
+				} catch (InterruptedException e) {
+//					throw new VPMRuntimeException("Interrupted while refreshing",e);
+					// we don't really do anything meaningful here
+				}
+			}
+		}
+		
+		return Boolean.TRUE;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.natives.ASMNativeFunction#getName()
+	 */
+	public String getName() {
+		return "viz.redraw";
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.natives.ASMNativeFunction#getID()
+	 */
+	public String getID() {
+		return "viz.redraw";
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.natives.ASMNativeFunction#getDescription()
+	 */
+	public String getDescription() {
+		return "Updates the visualisation by re-applying the layout.";
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/RefreshFunction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/RefreshFunction.java
new file mode 100644
index 0000000..3ece3d6
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/RefreshFunction.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.common.labelproviders.natives;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.natives.NativeFunctionParameter;
+import org.eclipse.viatra2.natives.VIATRANativeFunction;
+
+/**
+ * Native function which allows VTCL code perform a deep refresh on the visualization,
+ * and also pauses the VTCL execution thread if desired.
+ * @author istvan rath
+ *
+ */
+@VIATRANativeFunction(name="viz.refresh",
+		params={@NativeFunctionParameter(
+				isVarArg=false,
+				description="amount of millisecs to sleep", 
+				name = "sleep", 
+				type = { NativeFunctionParameter.ParameterType.INTEGER }),
+				
+		},
+		returns={NativeFunctionParameter.ParameterType.BOOLEAN})
+public class RefreshFunction extends AbstractVisualisationFunction {
+
+	public Object run(IModelSpace msp, Object[] params)
+			throws VPMRuntimeException {
+				
+		// synced viz refresh
+		Display.getDefault().syncExec(new Runnable() {
+			public void run() {
+//				try {
+//					String viewId = "org.eclipse.viatra2.visualisation.view";
+//					
+//					IViewReference vref = PlatformUI
+//					.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+//					.findViewReference(viewId);
+//					
+//					if (vref!=null) {
+//						ViatraVisualisationView view = (ViatraVisualisationView) vref.getView(false);
+//						if (view!=null) {
+//							view.refresh();
+//						}
+//					}
+//				}
+//				catch (Throwable t) {
+//					t.printStackTrace();
+//				}
+				descriptor.refreshGraph();
+			}
+		});
+		
+		for (Object element: params) {
+			if (element instanceof Integer) {
+				try {
+					Thread.sleep((Integer)element);
+				} catch (InterruptedException e) {
+//					throw new VPMRuntimeException("Interrupted while refreshing",e);
+					// we don't really do anything meaningful here
+				}
+			}
+		}
+		
+		return Boolean.TRUE;
+	}
+
+	public String getName() {
+		return "viz.refresh";
+	}
+
+	public String getID() {
+		return "viz.refresh";
+	}
+
+	public String getDescription() {
+		return "Refreshes the visualization";
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/UnHighlightFunction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/UnHighlightFunction.java
new file mode 100644
index 0000000..e67c565
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/common/labelproviders/natives/UnHighlightFunction.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.common.labelproviders.natives;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.errors.VPMRuntimeException;
+import org.eclipse.viatra2.natives.NativeFunctionParameter;
+import org.eclipse.viatra2.natives.VIATRANativeFunction;
+import org.eclipse.viatra2.visualisation.common.labelproviders.HighlightableSmartLabelProvider;
+
+/**
+ * Native function which allows VTCL code to unhighlight something on the visualization.
+ * @author istvan rath
+ *
+ */
+@VIATRANativeFunction(name="viz.unhighlight",
+		params={@NativeFunctionParameter(
+				isVarArg=true,
+				description="model element to unhighlight", 
+				name = "modelElement", 
+				type = { NativeFunctionParameter.ParameterType.MODEL_ELEMENT }),
+				
+		},
+		returns={NativeFunctionParameter.ParameterType.BOOLEAN})
+public class UnHighlightFunction extends AbstractVisualisationFunction {
+
+	public Object run(IModelSpace msp, Object[] params)
+			throws VPMRuntimeException {
+		
+		for (Object element: params) {
+			if (element instanceof IModelElement) {
+				HighlightableSmartLabelProvider.unhighlightElement((IModelElement)element);
+			}
+		}
+		
+		// viz refresh
+		/*
+		Display.getDefault().syncExec(new Runnable() {
+			public void run() {
+				try {
+					String viewId = "org.eclipse.viatra2.visualisation.view";
+					ViatraVisualisationView view = (ViatraVisualisationView) PlatformUI
+					.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+						.findViewReference(viewId).getView(false);
+					if (view!=null) {
+						view.deepRefresh();
+					}
+				}
+				catch (Throwable t) {
+					t.printStackTrace();
+				}
+			}
+		});*/
+		
+		return Boolean.TRUE;
+	}
+
+	public String getName() {
+		return "viz.unhighlight";
+	}
+
+	public String getID() {
+		return "viz.unhighlight";
+	}
+
+	public String getDescription() {
+		return "Un-highlights an element in the visualization";
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/AbstractViatraLayoutAlgorithm.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/AbstractViatraLayoutAlgorithm.java
new file mode 100644
index 0000000..a824a7b
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/AbstractViatraLayoutAlgorithm.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.layouts;
+
+import org.eclipse.zest.core.widgets.ZestStyles;
+import org.eclipse.zest.layouts.LayoutStyles;
+
+/**
+ * @author Zoltan Ujhelyi
+ *
+ */
+public abstract class AbstractViatraLayoutAlgorithm implements IViatraLayoutAlgorithm {
+	
+	protected int layoutStyle = LayoutStyles.NO_LAYOUT_NODE_RESIZING | LayoutStyles.ENFORCE_BOUNDS
+	| ZestStyles.IGNORE_INVISIBLE_LAYOUT;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.visualisation.layouts.IViatraLayoutAlgorithm#getFilters()
+	 */
+//	public ViewerFilter[] getFilters() {
+//		return new ViewerFilter[0];
+//	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/IViatraLayoutAlgorithm.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/IViatraLayoutAlgorithm.java
new file mode 100644
index 0000000..c6d2f3f
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/IViatraLayoutAlgorithm.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.layouts;
+
+import org.eclipse.zest.layouts.LayoutAlgorithm;
+
+/**
+ * An interface describing a layout algorithm. In most cases its recommended to
+ * override the AbstractViatraLayoutAlgorithm abstract class instead of this
+ * class.
+ * @author Zoltan Ujhelyi
+ */
+public interface IViatraLayoutAlgorithm {
+
+	/**
+	 * Returns the layout algorithm to apply
+	 * @return the layout algorithm
+	 */
+	public LayoutAlgorithm getAlgorithm();
+
+	/**
+	 * Return filters to apply together with the layout algorithm. The extension
+	 * point handler presumes, the array is not null; if no filters are used, an
+	 * empty array should be used.
+	 * @return an array of filters
+	 */
+//	public ViewerFilter[] getFilters();
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/algorithms/GridLayout.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/algorithms/GridLayout.java
new file mode 100644
index 0000000..e504e7c
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/algorithms/GridLayout.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.layouts.algorithms;
+
+import org.eclipse.viatra2.visualisation.layouts.AbstractViatraLayoutAlgorithm;
+import org.eclipse.zest.layouts.LayoutAlgorithm;
+import org.eclipse.zest.layouts.algorithms.GridLayoutAlgorithm;
+
+/**
+ * A grid layout algorithm: it puts the nodes into a grid where the number of columns depends on the number of nodes.
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class GridLayout extends AbstractViatraLayoutAlgorithm{
+
+	public LayoutAlgorithm getAlgorithm() {
+		GridLayoutAlgorithm gridAlgorithm = new GridLayoutAlgorithm(layoutStyle);
+		return gridAlgorithm;
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/algorithms/HierarchyAlgorithm.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/algorithms/HierarchyAlgorithm.java
new file mode 100644
index 0000000..6ed3a94
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/algorithms/HierarchyAlgorithm.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.layouts.algorithms;
+
+import org.eclipse.viatra2.visualisation.layouts.AbstractViatraLayoutAlgorithm;
+import org.eclipse.zest.layouts.LayoutAlgorithm;
+import org.eclipse.zest.layouts.algorithms.CompositeLayoutAlgorithm;
+import org.eclipse.zest.layouts.algorithms.DirectedGraphLayoutAlgorithm;
+import org.eclipse.zest.layouts.algorithms.HorizontalShift;
+
+/**
+ * An algorithm for visualizing hierarchies in a tree.
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class HierarchyAlgorithm extends AbstractViatraLayoutAlgorithm{
+
+	public LayoutAlgorithm getAlgorithm() {
+		CompositeLayoutAlgorithm compositeAlgorithm = new CompositeLayoutAlgorithm(
+				layoutStyle, new LayoutAlgorithm[] {
+						new DirectedGraphLayoutAlgorithm(layoutStyle),
+						new HorizontalShift(layoutStyle) });
+		return compositeAlgorithm;
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/algorithms/RadialLayout.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/algorithms/RadialLayout.java
new file mode 100644
index 0000000..2d09261
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/algorithms/RadialLayout.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.layouts.algorithms;
+
+import org.eclipse.viatra2.visualisation.layouts.AbstractViatraLayoutAlgorithm;
+import org.eclipse.zest.layouts.LayoutAlgorithm;
+import org.eclipse.zest.layouts.algorithms.RadialLayoutAlgorithm;
+
+/**
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class RadialLayout extends AbstractViatraLayoutAlgorithm {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.visualisation.layouts.IViatraLayoutAlgorithm#getAlgorithm()
+	 */
+	public LayoutAlgorithm getAlgorithm() {
+		RadialLayoutAlgorithm radialAlgorithm = new RadialLayoutAlgorithm(
+		layoutStyle);
+//		LayoutStyles.NO_LAYOUT_NODE_RESIZING | ZestStyles.IGNORE_INVISIBLE_LAYOUT | 
+//		ZestStyles.NODES_NO_LAYOUT_RESIZE);
+		return radialAlgorithm;
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/algorithms/RadialLayout_NodeResize.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/algorithms/RadialLayout_NodeResize.java
new file mode 100644
index 0000000..026fc7b
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/algorithms/RadialLayout_NodeResize.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.layouts.algorithms;
+
+import org.eclipse.viatra2.visualisation.layouts.AbstractViatraLayoutAlgorithm;
+import org.eclipse.zest.core.widgets.ZestStyles;
+import org.eclipse.zest.layouts.LayoutAlgorithm;
+import org.eclipse.zest.layouts.LayoutStyles;
+import org.eclipse.zest.layouts.algorithms.RadialLayoutAlgorithm;
+
+/**
+ * @author Istvan Rath
+ *
+ */
+public class RadialLayout_NodeResize extends AbstractViatraLayoutAlgorithm {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.visualisation.layouts.IViatraLayoutAlgorithm#getAlgorithm()
+	 */
+	public LayoutAlgorithm getAlgorithm() {
+		RadialLayoutAlgorithm radialAlgorithm = new RadialLayoutAlgorithm(
+				LayoutStyles.ENFORCE_BOUNDS | ZestStyles.IGNORE_INVISIBLE_LAYOUT);
+		return radialAlgorithm;
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/algorithms/SpringLayout.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/algorithms/SpringLayout.java
new file mode 100644
index 0000000..06b59d2
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/layouts/algorithms/SpringLayout.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.layouts.algorithms;
+
+import org.eclipse.viatra2.visualisation.layouts.AbstractViatraLayoutAlgorithm;
+import org.eclipse.zest.layouts.LayoutAlgorithm;
+import org.eclipse.zest.layouts.algorithms.SpringLayoutAlgorithm;
+
+/**
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class SpringLayout extends AbstractViatraLayoutAlgorithm{
+
+	public LayoutAlgorithm getAlgorithm() {
+		SpringLayoutAlgorithm springAlgorithm = new SpringLayoutAlgorithm(layoutStyle);
+		springAlgorithm.setRandom(true);
+		return springAlgorithm;
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/ModelSpaceGraphViewer.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/ModelSpaceGraphViewer.java
new file mode 100644
index 0000000..b48789c
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/ModelSpaceGraphViewer.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2009-2010 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.themes.ITheme;
+import org.eclipse.viatra2.visualisation.ViatraGraphViewer;
+import org.eclipse.viatra2.visualisation.modelspace.datasource.ModelSpaceLabelProvider;
+
+/**
+ * This GraphViewer component is the same as the component present in Zest
+ * except of the selection handling.
+ * @author Zoltan Ujhelyi
+ */
+public class ModelSpaceGraphViewer extends ViatraGraphViewer {
+
+	private ModelSpaceLabelProvider labelProvider = new ModelSpaceLabelProvider();
+
+	/**
+	 * Initializes the graph viewer
+	 * @param composite
+	 * @param style
+	 *            the style for the viewer and for the layout algorithm
+	 * @see SWT#V_SCROLL
+	 * @see SWT#H_SCROLL
+	 */
+	public ModelSpaceGraphViewer(Composite composite, int style) {
+		super(composite, style);
+		setLabelProvider(labelProvider);
+	}
+
+	/**
+	 * Loads the color information from a theme
+	 * @param theme
+	 */
+	public void loadTheme(ITheme theme) {
+		labelProvider.loadTheme(theme);
+	}
+
+	/**
+	 * Notifies the Label Provider to reload the colors according the settings
+	 * XXX it should not be needed but without this call the color preview is
+	 * not in sync with the settings
+	 */
+	public void refreshTheme() {
+		labelProvider.reloadColors();
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/ModelSpaceVisualisationDescriptor.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/ModelSpaceVisualisationDescriptor.java
new file mode 100644
index 0000000..fdcd80d
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/ModelSpaceVisualisationDescriptor.java
@@ -0,0 +1,509 @@
+/*******************************************************************************
+ * Copyright (c) 2009-2010 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *    Istvan Rath - add support for visualisation presets and labelprovider override
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Stack;
+
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.viatra2.core.ICoreNotificationListener;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.notification.ICoreNotificationObject;
+import org.eclipse.viatra2.core.notification.NotificationType;
+import org.eclipse.viatra2.framework.FrameworkManager;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.framework.IFrameworkListChangedListener;
+import org.eclipse.viatra2.treeeditor.ViatraTreeEditor;
+import org.eclipse.viatra2.visualisation.IVisualisationDescriptor;
+import org.eclipse.viatra2.visualisation.ViatraColoredLabelProvider;
+import org.eclipse.viatra2.visualisation.ViatraGraphViewer;
+import org.eclipse.viatra2.visualisation.common.extensions.FilterConfiguration;
+import org.eclipse.viatra2.visualisation.common.extensions.NamedElement;
+import org.eclipse.viatra2.visualisation.common.extensions.VisualisationPreset;
+import org.eclipse.viatra2.visualisation.layouts.IViatraLayoutAlgorithm;
+import org.eclipse.viatra2.visualisation.modelspace.actions.groups.FilterGroup;
+import org.eclipse.viatra2.visualisation.modelspace.actions.groups.ModelSpaceProviderGroup;
+import org.eclipse.viatra2.visualisation.modelspace.datasource.AbstractModelSpaceProvider;
+import org.eclipse.viatra2.visualisation.modelspace.datasource.filter.PostFilter;
+import org.eclipse.viatra2.visualisation.modelspace.datasource.filter.PreFilter;
+import org.eclipse.zest.core.widgets.ZestStyles;
+import org.eclipse.zest.layouts.LayoutStyles;
+import org.eclipse.zest.layouts.algorithms.RadialLayoutAlgorithm;
+
+/**
+ * Describes the contributions of the visualisation descriptor
+ * 
+ * @author Zoltan Ujhelyi
+ */
+public class ModelSpaceVisualisationDescriptor implements
+		IVisualisationDescriptor {
+
+	// View elements
+	ModelSpaceGraphViewer gv;
+	PreFilter preFilter = new PreFilter();
+	PostFilter postFilter = new PostFilter();
+	// Viatra source elements
+	IModelManager modelManager;
+	IFramework framework;
+	ViatraTreeEditor editor;
+	// Actions and action groups
+	ModelSpaceProviderGroup providerGroup = new ModelSpaceProviderGroup();
+	// Old layout filters
+	List<ViewerFilter> filters = new ArrayList<ViewerFilter>();
+	// Event Listeners
+	private IFrameworkListChangedListener frameworkListener = new IFrameworkListChangedListener() {
+
+		public void frameworkRemoved(IFramework f) {
+			if (f.equals(framework)) {
+				setFramework(null);
+				setModelManager(null);
+				clearGraphModel();
+			}
+		}
+
+		public void frameworkAdded(IFramework f) {
+		}
+	};
+
+	/**
+	 * Stored previous selections to avoid infinite selection changes
+	 * LocalSelection is only used to represent the remote selection, while the
+	 * remoteSelection stores the values from local selection.
+	 */
+	private ISelection localSelection, remoteSelection;
+	private ISelectionChangedListener selectionListener = new ISelectionChangedListener() {
+
+		public void selectionChanged(SelectionChangedEvent event) {
+			// XXX this code needs revision
+			if (framework != null) {
+				ISelection selection = event.getSelection();
+				if (event.getSource().equals(gv)) {
+					// graph viewer selection control
+					if (localSelection != null
+							&& localSelection.equals(selection))
+						return;
+					ViatraTreeEditor editor = getEditorPart(framework);
+					remoteSelection = selection;
+					if (editor != null) {
+						editor.getTreeViewer().setSelection(selection);
+					}
+				} else {
+					// remote selection changed
+					if (remoteSelection != null
+							&& remoteSelection.equals(selection))
+						return;
+					gv.setSelection(selection);
+					localSelection = selection;
+				}
+			}
+		}
+	};
+
+	private ICoreNotificationListener modelSpaceListener = new ICoreNotificationListener() {
+
+		Stack<ModelspaceTransactionChanges> transactions = new Stack<ModelspaceTransactionChanges>();
+		ModelspaceTransactionChanges actual = new ModelspaceTransactionChanges();
+
+		private void updateGraph() {
+			preFilter.removeDeletedElements(actual.getDeletedElements());
+			actual.handleLooseEdges(preFilter);
+			Collection<IModelElement> newElements = actual.getNewElements();
+			Collection<IModelElement> deletedElements = actual
+					.getDeletedElements();
+			if (newElements.isEmpty() && deletedElements.isEmpty()) {
+				return;
+			}
+			if (newElements.isEmpty()) {
+				refreshGraph();
+				return;
+			}
+
+			for (IModelElement element : newElements) {
+				if (!preFilter.isFiltered(element)) {
+					redrawGraph(); // if a new element is added the graph layout
+					// shall be updated as well
+					return;
+				}
+			}
+		}
+
+		public int getListenerCategory() {
+			// TODO what is listener category
+			return 0;
+		}
+
+		private ICoreNotificationObject notificationObject;
+
+		public void actionPerformed(ICoreNotificationObject notification) {
+			this.notificationObject = notification;
+
+			NotificationType action = notificationObject.getActionTypeEnum();
+
+			switch (action) {
+
+			case TA_TRANSACTION_END:
+			case TA_UNDO_END:
+			case TA_SUBTRANSACTION_END:
+				Display.getDefault().asyncExec(new Runnable() {
+
+					public void run() {
+						updateGraph();
+						transactions.pop();
+					}
+				});
+				break;
+
+			case TA_TRANSACTION_BEGIN:
+			case TA_UNDO_BEGIN:
+			case TA_SUBTRANSACTION_BEGIN:
+			case TA_UNDOABLE_TRANSACTION_BEGIN:
+				actual = new ModelspaceTransactionChanges();
+				transactions.push(actual);
+				break;
+			case ACTION_CREATE_ENTITY:
+			case ACTION_CREATE_RELATION:
+				/*
+				 * this is intentionally commented out - it introduces new,
+				 * unwanted metamodel nodes in the graph
+				 */
+				//case ICoreNotificationObject.ACTION_CREATE_INSTANCEOF:
+				//case ICoreNotificationObject.ACTION_CREATE_SUPERTYPEOF:
+			case ACTION_SET_ISANY:
+			case ACTION_SET_NAME:
+			case ACTION_SET_RELATION_FROM:
+			case ACTION_SET_RELATION_TO:
+				actual.addNewElements(notificationObject.getNotifiedObjects());
+				break;
+			case ACTION_DELETE_ENTITY:
+			case ACTION_DELETE_RELATION:
+			case ACTION_DELETE_INSTANCEOF:
+			case ACTION_DELETE_SUPERTYPEOF:
+				actual.addRemovedElements(notificationObject
+						.getNotifiedObjects());
+				break;
+			}
+		}
+	};
+
+	/**
+	 * Initializes the descriptor.
+	 */
+	public ModelSpaceVisualisationDescriptor() {
+		FrameworkManager.getInstance().addFrameworkListChangedListener(
+				frameworkListener);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.eclipse.viatra2.visualisation.IVisualisationDescriptor#
+	 * addMenuContributions(org.eclipse.jface.action.IMenuManager)
+	 */
+	public void addMenuContributions(IMenuManager manager) {
+		providerGroup.fillContextMenu(manager);
+		FilterGroup filters = new FilterGroup();
+		filters.setFilter(postFilter);
+		filters.fillContextMenu(manager);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.eclipse.viatra2.visualisation.IVisualisationDescriptor#
+	 * addToolbarContributions(org.eclipse.jface.action.IToolBarManager)
+	 */
+	public void addToolbarContributions(IToolBarManager manager) {
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.viatra2.visualisation.IVisualisationDescriptor#getViewer()
+	 */
+	public ViatraGraphViewer getViewer() {
+		return gv;
+	}
+
+	private ViatraGraphViewer initializeViewer(Composite parent) {
+		gv = new ModelSpaceGraphViewer(parent, SWT.NONE);
+		gv.setConnectionStyle(ZestStyles.CONNECTIONS_DIRECTED);
+		gv.setLayoutAlgorithm(new RadialLayoutAlgorithm(
+				LayoutStyles.NO_LAYOUT_NODE_RESIZING
+						| ZestStyles.IGNORE_INVISIBLE_LAYOUT), true);
+		gv.setContentProvider(providerGroup.getDefaultProvider());
+		gv.addFilter(postFilter);
+		gv.setDescriptor(this);
+		gv.addSelectionChangedListener(selectionListener);
+		// TODO this is required for selection synchronizing - not sure why
+		gv.setUseHashlookup(false);
+		return gv;
+	}
+
+	public void clearGraphModel() {
+		preFilter = new PreFilter();
+		for (AbstractModelSpaceProvider provider : providerGroup.getProviders()) {
+			provider.setFilter(preFilter);
+		}
+		gv.setInput(new Object());
+	}
+
+	@SuppressWarnings("unchecked")
+	public void removeSelection() {
+		ISelection selection = gv.getSelection();
+		if (!selection.isEmpty()) {
+			excludeItems(((StructuredSelection) selection).toList());
+			// refresh();
+		}
+	}
+
+	/**
+	 * Sets the filter to allow the selected model element and it's contained
+	 * elements to appear in the graph.
+	 * 
+	 * @param modelElement
+	 *            a model element
+	 */
+	public void includeItem(IModelElement modelElement) {
+		preFilter.includeSubtree(modelElement);
+	}
+
+	/**
+	 * Sets the filter to allow the selected model elements (and only those
+	 * elements) to appear in the graph.
+	 * 
+	 * @param elements
+	 *            the list of model elements
+	 */
+	public void includeItems(List<IModelElement> elements) {
+		for (IModelElement element : elements)
+			preFilter.includeElement(element);
+	}
+
+	/**
+	 * Sets the filter to disallow the selected model element and it's contained
+	 * elements to appear in the graph.
+	 * 
+	 * @param modelElement
+	 *            a model element
+	 */
+	public void excludeItem(IModelElement modelElement) {
+		preFilter.excludeSubtree(modelElement);
+	}
+
+	/**
+	 * Sets the filter to disallow the selected model elements (and only those
+	 * elements) to appear in the graph.
+	 * 
+	 * @param elements
+	 *            the list of model elements
+	 */
+	public void excludeItems(List<IModelElement> elements) {
+		for (IModelElement element : elements)
+			preFilter.excludeElement(element);
+	}
+
+	/**
+	 * @return the modelManager
+	 */
+	public IModelManager getModelManager() {
+		return modelManager;
+	}
+
+	/**
+	 * @return the framework
+	 */
+	public IFramework getFramework() {
+		return framework;
+	}
+
+	/**
+	 * Sets the Viatra framework associated with the graph viewer
+	 * 
+	 * @param framework
+	 *            the framework to set
+	 */
+	public void setFramework(IFramework framework) {
+		if (this.framework != null) {
+			this.framework.getTopmodel().getNotificationManager()
+					.removeAllListener(modelSpaceListener);
+		}
+		this.framework = framework;
+		if (editor != null) {
+			editor.getTreeViewer().removeSelectionChangedListener(
+					selectionListener);
+		}
+		if (framework != null) {
+			framework.getTopmodel().getNotificationManager()
+					.addAllListener(modelSpaceListener);
+			editor = getEditorPart(framework);
+			assert editor != null : "An editor should be open now";
+			editor.getTreeViewer().addSelectionChangedListener(
+					selectionListener);
+		}
+		clearGraphModel();
+	}
+
+	/**
+	 * Adds a model manager component to the visualisation descriptor. The Model
+	 * Manager contains the elements to visualised.
+	 * 
+	 * @param manager
+	 */
+	public void setModelManager(IModelManager manager) {
+		this.modelManager = manager;
+		for (AbstractModelSpaceProvider provider : providerGroup.getProviders()) {
+			provider.setModelManager(modelManager);
+		}
+		gv.setInput(new Object());
+	}
+
+	/**
+	 * Searches for the open ViatraTreeEditor for a framework object.
+	 * 
+	 * @param framework
+	 *            the framework to search for
+	 * @return the found editor, or null if none is found
+	 */
+	public ViatraTreeEditor getEditorPart(IFramework framework) {
+		if (editor == null) {
+			IWorkbenchPage page = PlatformUI.getWorkbench()
+					.getActiveWorkbenchWindow().getActivePage();
+
+			String filename = framework.getCurrentFilename();
+			IWorkspaceRoot ws = ResourcesPlugin.getWorkspace().getRoot();
+			IPath path = ws.getFullPath().append(filename.replace("\\", "/"));
+			if (Platform.getOS().equals(Platform.OS_WIN32)) {
+				path = path.setDevice(filename.substring(0, 2));
+			}
+			IEditorPart editor = page.findEditor(new FileEditorInput(ws
+					.getFileForLocation(path)));
+			if (editor instanceof ViatraTreeEditor)
+				return (ViatraTreeEditor) editor;
+		}
+		return null;
+	}
+
+	public void dispose() {
+		FrameworkManager.getInstance().removeFrameworkListChangedListener(
+				frameworkListener);
+		if (framework != null) {
+			framework.getTopmodel().getNotificationManager()
+					.removeAllListener(modelSpaceListener);
+		}
+	}
+
+	@Override
+	public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+		if (adapter == org.eclipse.ui.views.properties.IPropertySheetPage.class
+				&& framework != null) {
+			ViatraTreeEditor editor = getEditorPart(framework);
+			if (editor != null) {
+				return editor.getAdapter(adapter);
+			}
+		}
+		return null;
+	}
+
+	@Override
+	public void redrawGraph() {
+		gv.setInput(new Object());
+	}
+
+	@Override
+	public void refreshGraph() {
+		gv.refresh();
+		if (framework != null && modelManager != null && localSelection != null)
+			gv.setSelection(localSelection);
+	}
+
+	public void createFormContributions(Composite parent) {
+		initializeViewer(parent);
+
+	}
+
+	public void setLayoutAlgorithm(IViatraLayoutAlgorithm algorithm) {
+		gv.setLayoutAlgorithm(algorithm.getAlgorithm(), true);
+		gv.applyLayout();
+	}
+
+	public void setVisualisationPreset(VisualisationPreset vp) {
+		setFilterConfiguration(vp.filters, false);
+		gv.setLayoutAlgorithm(vp.layout.element.getAlgorithm(), false);
+		// also set labelprovider
+		setLabelProvider(vp.labelprovider.element, false);
+		gv.applyLayout();
+	}
+
+	public void setLabelProvider(ViatraColoredLabelProvider provider) {
+		setLabelProvider(provider, true);
+	}
+
+	public void setLabelProvider(ViatraColoredLabelProvider provider,
+			boolean doRefresh) {
+		gv.setLabelProvider(provider);
+		if (doRefresh) {
+			gv.refresh();
+		}
+	}
+
+	public void setFilterConfiguration(FilterConfiguration fc) {
+		setFilterConfiguration(fc, true);
+	}
+
+	public void setFilterConfiguration(FilterConfiguration fc, boolean doRefresh) {
+
+		List<ViewerFilter> filtersToBeRemoved = new ArrayList<ViewerFilter>(
+				filters);
+		List<ViewerFilter> filtersToBeAdded = new ArrayList<ViewerFilter>();
+		for (NamedElement<ViewerFilter> _filter : fc.filters) {
+			filtersToBeRemoved.remove(_filter.element);
+			if (!filters.contains(_filter.element))
+				filtersToBeAdded.add(_filter.element);
+		}
+
+		for (ViewerFilter filter : filtersToBeRemoved) {
+			gv.removeFilter(filter);
+			filters.remove(filter);
+		}
+
+		for (ViewerFilter filter : filtersToBeAdded) {
+			gv.addFilter(filter);
+			filters.add(filter);
+		}
+
+		if (doRefresh) {
+			gv.refresh();
+		}
+	}
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/ModelspaceTransactionChanges.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/ModelspaceTransactionChanges.java
new file mode 100644
index 0000000..7f6f774
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/ModelspaceTransactionChanges.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.visualisation.modelspace.datasource.filter.PreFilter;
+
+/**
+ * A class for storing a set of changes in the model space, allowing the
+ * filtering the elements to be done in batches.
+ * @author Zoltan Ujhelyi
+ */
+public class ModelspaceTransactionChanges {
+
+	/**
+	 * This list stores the elements created during the last transaction for
+	 * calculating whether a redraw is needed.
+	 */
+	private Set<IModelElement> newElements = new HashSet<IModelElement>();
+	/**
+	 * This list stores the elements deleted during the last transaction for
+	 * calculating whether a redraw is needed.
+	 */
+	private Set<IModelElement> deletedElements = new HashSet<IModelElement>();
+
+	/**
+	 * @return the newElements
+	 */
+	public Collection<IModelElement> getNewElements() {
+		return newElements;
+	}
+
+	/**
+	 * Lists a newly created element
+	 * @param element
+	 */
+	public void addNewElement(IModelElement element) {
+		newElements.add(element);
+	}
+
+	/**
+	 * Lists a collection of newly created elements
+	 * @param elements
+	 */
+	public void addNewElements(Collection<IModelElement> elements) {
+		newElements.addAll(elements);
+	}
+
+	/**
+	 * @return the deletedElements
+	 */
+	public Collection<IModelElement> getDeletedElements() {
+		return deletedElements;
+	}
+
+	/**
+	 * Adds a removed element to the transaction change log
+	 * @param element
+	 */
+	public void addRemovedElement(IModelElement element) {
+		deletedElements.add(element);
+		for (IRelation rel : element.getRelations())
+			addRemovedElement(rel);
+	}
+
+	/**
+	 * Adds a collection of removed elements to the transaction change log
+	 * @param elements
+	 */
+	public void addRemovedElements(Collection<IModelElement> elements) {
+		deletedElements.addAll(elements);
+	}
+
+	/**
+	 * The transaction could provide loose edges: deletion could leave arcs
+	 * without their endpoints; while the addition of arcs does not provide its
+	 * endpoints. This call allows the handling of these problems in a batched
+	 * way.
+	 * @param filter
+	 */
+	public void handleLooseEdges(PreFilter filter) {
+		HashSet<IModelElement> deletes = new HashSet<IModelElement>();
+		newElements.removeAll(deletedElements);
+		for (IModelElement element : deletedElements) {
+			for (IRelation rel : element.getRelations())
+				deletes.add(rel);
+		}
+		addRemovedElements(deletes);
+		HashSet<IModelElement> news = new HashSet<IModelElement>();
+		for (IModelElement element : newElements) {
+			if (element instanceof IRelation && !filter.isFiltered(element)) {
+				IRelation rel = (IRelation) element;
+				news.add(rel.getFrom());
+				filter.includeElement(rel.getFrom());
+				news.add(rel.getTo());
+				filter.includeElement(rel.getTo());
+			}
+		}
+		addNewElements(news);
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/AddSelectedElementsAction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/AddSelectedElementsAction.java
new file mode 100644
index 0000000..6ad7ad4
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/AddSelectedElementsAction.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.actions;
+
+import java.util.List;
+
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.visualisation.view.ViatraVisualisationView;
+
+/**
+ * This action is used to remove a list of selected elements from the graph viewer
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class AddSelectedElementsAction extends VisualiseSelectedElementAction {
+
+	/**
+	 * Stores the string ID of the Action
+	 */
+	public static final String ID = "org.eclipse.viatra2.visualisation.addSelectedElements";
+	/**
+	 * 
+	 */
+	public AddSelectedElementsAction() {
+		super();
+		setId(ID);
+		setText("Add Selected Elements to the Graph View");
+	}
+
+	/**
+	 * @param part
+	 */
+	public AddSelectedElementsAction(IWorkbenchPart part) {
+		super();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.visualisation.actions.VisualiseSelectedElementAction#loadFilterData(org.eclipse.viatra2.visualisation.view.ModelSpaceVisualisationView, java.util.List)
+	 */
+	@Override
+	void loadFilterData(ViatraVisualisationView view,
+			List<IModelElement> elements) {
+		descriptor.includeItems(elements);
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.visualisation.actions.VisualiseSelectedElementAction#updateSelf()
+	 */
+	@Override
+	public void updateSelf() {
+		if (getSelectedObjects().size()<1) setEnabled(false);
+		else setEnabled(true);
+	}
+
+	
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/AddSelectedSubtreeAction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/AddSelectedSubtreeAction.java
new file mode 100644
index 0000000..59c97b7
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/AddSelectedSubtreeAction.java
@@ -0,0 +1,55 @@
+/*******************************************************************************

+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *    Zoltan Ujhelyi - initial API and implementation

+ *******************************************************************************/

+package org.eclipse.viatra2.visualisation.modelspace.actions;

+

+

+import java.util.List;

+

+import org.eclipse.ui.IWorkbenchPart;

+import org.eclipse.viatra2.core.IModelElement;

+import org.eclipse.viatra2.visualisation.view.ViatraVisualisationView;

+

+/**

+ * @author Zoltan Ujhelyi

+ *

+ */

+public class AddSelectedSubtreeAction extends

+		VisualiseSelectedElementAction {

+

+	/**

+	 * Stores the string ID of the Action

+	 */

+	public static final String ID = "org.eclipse.viatra2.visualisation.addSelectedElementAction";

+	/**

+	 * 

+	 */

+	public AddSelectedSubtreeAction() {

+		super();

+		setId(ID);

+		setText("Add Selected Subtree to the Graph View");

+	}

+

+	/**

+	 * @param part

+	 */

+	public AddSelectedSubtreeAction(IWorkbenchPart part) {

+		this();

+	}

+

+	@Override

+	void loadFilterData(ViatraVisualisationView view,

+			List<IModelElement> elements) {

+		descriptor.includeItem(elements.get(0));

+		

+	}

+	

+

+}

diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/IFilterManipulator.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/IFilterManipulator.java
new file mode 100644
index 0000000..d618b4b
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/IFilterManipulator.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.actions;
+
+/**
+ * The interface defines a method to set a parameter in a Filter object.
+ * @author Zoltan Ujhelyi
+ *
+ */
+public interface IFilterManipulator {
+	
+	/**
+	 * Sets the related boolean property in the filter
+	 * @param newValue
+	 */
+	public void setFilterProperty(boolean newValue);
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/RemoveSelectedElementsAction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/RemoveSelectedElementsAction.java
new file mode 100644
index 0000000..23fb38b
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/RemoveSelectedElementsAction.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.actions;
+
+import java.util.List;
+
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.visualisation.view.ViatraVisualisationView;
+
+/**
+ * This action is used to remove a list of selected elements from the graph viewer
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class RemoveSelectedElementsAction extends VisualiseSelectedElementAction {
+
+	/**
+	 * Stores the string ID of the Action
+	 */
+	public static final String ID = "org.eclipse.viatra2.visualisation.removeSelectedElements";
+	/**
+	 * 
+	 */
+	public RemoveSelectedElementsAction() {
+		super();
+		setId(ID);
+		setText("Remove Selected Elements to the Graph View");
+	}
+
+	/**
+	 * @param part
+	 */
+	public RemoveSelectedElementsAction(IWorkbenchPart part) {
+		super();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.visualisation.actions.VisualiseSelectedElementAction#loadFilterData(org.eclipse.viatra2.visualisation.view.ModelSpaceVisualisationView, java.util.List)
+	 */
+	@Override
+	void loadFilterData(ViatraVisualisationView view,
+			List<IModelElement> elements) {
+		if (descriptor != null)
+			descriptor.excludeItems(elements);
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.visualisation.actions.VisualiseSelectedElementAction#updateSelf()
+	 */
+	@Override
+	public void updateSelf() {
+		if (getSelectedObjects().size()<1) setEnabled(false);
+		else setEnabled(true);
+	}
+
+	
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/RemoveSelectedSubtreeAction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/RemoveSelectedSubtreeAction.java
new file mode 100644
index 0000000..9d09f9c
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/RemoveSelectedSubtreeAction.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.actions;
+
+
+import java.util.List;
+
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.visualisation.view.ViatraVisualisationView;
+
+/**
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class RemoveSelectedSubtreeAction extends VisualiseSelectedElementAction {
+
+	/**
+	 * Stores the string ID of the Action
+	 */
+	public static final String ID = "org.eclipse.viatra2.visualisation.removeSelectedSubtreeAction";
+	/**
+	 * 
+	 */
+	public RemoveSelectedSubtreeAction() {
+		super();
+		setId(ID);
+		setText("Remove Selected Subtree from the Graph View");
+	}
+
+	/**
+	 * @param part
+	 */
+	public RemoveSelectedSubtreeAction(IWorkbenchPart part) {
+		this();
+	}
+
+	@Override
+	void loadFilterData(ViatraVisualisationView view,
+			List<IModelElement> elements) {
+		if (descriptor != null)
+			descriptor.excludeItem(elements.get(0));
+		
+	}
+
+	
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/SelectFilterConfigurationAction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/SelectFilterConfigurationAction.java
new file mode 100644
index 0000000..0a2c9cb
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/SelectFilterConfigurationAction.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.viatra2.visualisation.common.extensions.FilterConfiguration;
+import org.eclipse.viatra2.visualisation.view.ViatraVisualisationView;
+
+/**
+ * Selects and applies a filter configuration to the visualisation.
+ * @author Istvan Rath
+ *
+ */
+public class SelectFilterConfigurationAction extends Action {
+	
+	FilterConfiguration fc;
+
+	/**
+	 * Initializes a new select filter configuration action with a given name and configuration
+	 * @param name the configuration identifier
+	 * @param _fc the configuration to se.
+	 */
+	public SelectFilterConfigurationAction(String name, FilterConfiguration _fc) {
+		super(name);
+		this.fc = _fc;
+		setToolTipText("Selects the " + name + " filter configuration for the current graph.");
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		String viewId = "org.eclipse.viatra2.visualisation.view";
+		ViatraVisualisationView view = (ViatraVisualisationView) PlatformUI
+		.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+			.findViewReference(viewId).getView(false);
+		view.setFilterConfiguration(fc);
+	}
+	
+	
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/SelectLabelProviderAction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/SelectLabelProviderAction.java
new file mode 100644
index 0000000..23fa90e
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/SelectLabelProviderAction.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.viatra2.visualisation.ViatraColoredLabelProvider;
+import org.eclipse.viatra2.visualisation.view.ViatraVisualisationView;
+
+/**
+ * Selects and applies a new label provider to the visualisation.
+ * @author Istvan Rath
+ *
+ */
+public class SelectLabelProviderAction extends Action {
+	
+	ViatraColoredLabelProvider lp;
+
+	/**
+	 * Initializes a new select label provider action with a given name and label provider.
+	 * @param name the name to set.
+	 * @param lp the label provider to set.
+	 */
+	public SelectLabelProviderAction(String name, ViatraColoredLabelProvider lp) {
+		super(name);
+		this.lp = lp;
+		setToolTipText("Selects the " + name + " label provider for the current graph.");
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		String viewId = "org.eclipse.viatra2.visualisation.view";
+		ViatraVisualisationView view = (ViatraVisualisationView) PlatformUI
+		.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+			.findViewReference(viewId).getView(false);
+		view.setLabelProvider(lp);
+	}
+	
+	
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/SelectLayoutAction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/SelectLayoutAction.java
new file mode 100644
index 0000000..64055a4
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/SelectLayoutAction.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.viatra2.visualisation.layouts.IViatraLayoutAlgorithm;
+import org.eclipse.viatra2.visualisation.view.ViatraVisualisationView;
+
+/**
+ * Selects and applies a new layout algorithm to the visualisation.
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class SelectLayoutAction extends Action {
+	
+	IViatraLayoutAlgorithm algorithm;
+
+	/**
+	 * Initializes a new select layout action with a given name and layout algorithm.
+	 * @param name the name to set.
+	 * @param algorithm the algorithm to set.
+	 */
+	public SelectLayoutAction(String name, IViatraLayoutAlgorithm algorithm) {
+		super(name);
+		this.algorithm = algorithm;
+		setToolTipText("Selects the " + name + " layout algorithm for the current graph.");
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		String viewId = "org.eclipse.viatra2.visualisation.view";
+		ViatraVisualisationView view = (ViatraVisualisationView) PlatformUI
+		.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+			.findViewReference(viewId).getView(false);
+		view.setLayoutAlgorithm(algorithm);
+	}
+	
+	
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/SelectPresetAction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/SelectPresetAction.java
new file mode 100644
index 0000000..4d33e55
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/SelectPresetAction.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.viatra2.visualisation.common.extensions.VisualisationPreset;
+import org.eclipse.viatra2.visualisation.view.ViatraVisualisationView;
+
+/**
+ * Selects and applies a new visualisation preset to the visualisation.
+ * @author Istvan Rath
+ *
+ */
+public class SelectPresetAction extends Action {
+	
+	VisualisationPreset preset;
+
+	/**
+	 * Initializes a new select layout action with a given name and layout algorithm.
+	 * @param name the name to set.
+	 * @param vp the visualization preset to use.
+	 */
+	public SelectPresetAction(String name, VisualisationPreset vp) {
+		super(name);
+		this.preset = vp;
+		setToolTipText("Selects the " + name + " preset for the current graph.");
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		String viewId = "org.eclipse.viatra2.visualisation.view";
+		ViatraVisualisationView view = (ViatraVisualisationView) PlatformUI
+		.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+			.findViewReference(viewId).getView(false);
+		view.setVisualisationPreset(preset);
+	}
+	
+	
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/ToggleFilterAction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/ToggleFilterAction.java
new file mode 100644
index 0000000..910ed87
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/ToggleFilterAction.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.viatra2.visualisation.modelspace.ModelSpaceVisualisationDescriptor;
+import org.eclipse.viatra2.visualisation.view.ViatraVisualisationView;
+
+/**
+ * This Action allows the selection of a filter
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class ToggleFilterAction extends Action {
+	
+	private IFilterManipulator manipulator;
+
+	/**
+	 * Initializes a Toggle Filter Action
+	 * @param name the name of the action in the user interface
+	 */
+	public ToggleFilterAction(String name) {
+		super(name,AS_CHECK_BOX);
+		setToolTipText("Toggles the " + name + " filter");
+		addPropertyChangeListener(new IPropertyChangeListener() {
+			
+			public void propertyChange(PropertyChangeEvent event) {
+				// listening for changes in the property named "checked"
+				if (event.getProperty().equals("checked") && manipulator != null) {
+					manipulator.setFilterProperty((Boolean)event.getNewValue());
+				}
+					
+			}
+		});
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		String viewId = "org.eclipse.viatra2.visualisation.view";
+		ViatraVisualisationView view = (ViatraVisualisationView) PlatformUI
+		.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+			.findViewReference(viewId).getView(false);
+		((ModelSpaceVisualisationDescriptor)view.getDescriptor()).redrawGraph();
+	}
+
+	/**
+	 * @param manipulator the manipulator to set
+	 */
+	public void setManipulator(IFilterManipulator manipulator) {
+		this.manipulator = manipulator;
+	}
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/VisualiseModelSpaceAction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/VisualiseModelSpaceAction.java
new file mode 100644
index 0000000..97af363
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/VisualiseModelSpaceAction.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.actions;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.frameworkgui.actions.AbstractFrameworkGUIAction;
+import org.eclipse.viatra2.frameworkgui.content.FrameworkContainer;
+import org.eclipse.viatra2.frameworkgui.views.FrameworkTreeView;
+import org.eclipse.viatra2.logger.Logger;
+import org.eclipse.viatra2.visualisation.IVisualisationDescriptor;
+import org.eclipse.viatra2.visualisation.modelspace.ModelSpaceVisualisationDescriptor;
+import org.eclipse.viatra2.visualisation.view.ViatraVisualisationView;
+
+/**
+ * @author Zoltan Ujhelyi
+ */
+public class VisualiseModelSpaceAction extends AbstractFrameworkGUIAction {
+	
+	ModelSpaceVisualisationDescriptor descriptor;
+
+	/**
+	 * Initializes the model space visualisation action
+	 */
+	public VisualiseModelSpaceAction() {
+		super();
+		setText("Visualise Model Space");
+		setToolTipText("Graph Visualisation for the Model Space");
+		setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()
+				.getImageDescriptor(ISharedImages.IMG_OBJ_ELEMENT));
+	}
+
+	/**
+	 * Initializes the model space visualisation action
+	 * @param part
+	 */
+	public VisualiseModelSpaceAction(FrameworkTreeView part) {
+		this();
+		setupInternals(part);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.viatra2.frameworkgui.actions.AbstractFrameworkGUIAction#isEnabled
+	 * ()
+	 */
+	@Override
+	public boolean isEnabled() {
+		return true;
+	}
+	
+
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		refreshSelection();
+		Object c = getFirstSelected();
+		Logger log = iViatraFramework.getLogger();
+		if (c instanceof FrameworkContainer) {
+			IFramework framework = ((FrameworkContainer) c).getFramework();
+			IModelSpace modelSpace = (framework.getTopmodel());
+			IModelManager manager = modelSpace.getModelManager();
+			if (manager == null) {
+				log
+						.error("***The machine is not connected to a Model Space***");
+				return;
+			}
+			// open view
+			ViatraVisualisationView view = ViatraVisualisationView.openView();
+			IVisualisationDescriptor newDescriptor = view.getDescriptor(framework);
+			if (newDescriptor == null || !(newDescriptor instanceof ModelSpaceVisualisationDescriptor)) {
+				descriptor = new ModelSpaceVisualisationDescriptor();
+				view.setDescriptor(framework, descriptor);
+			} else {
+				descriptor = (ModelSpaceVisualisationDescriptor) newDescriptor;
+				IModelManager oldManager = descriptor.getModelManager();
+				if (oldManager != null && !manager.equals(oldManager)) {
+					if (!MessageDialog.openConfirm(PlatformUI.getWorkbench().getDisplay()
+							.getActiveShell(), "Graph overwrite", "Another model space is already visualised. Do you want to overwrite it?")) {
+						return;
+					}
+				}
+			}
+			
+			descriptor.setFramework(framework);
+			descriptor.includeItem(manager.getRoot());
+			descriptor.setModelManager(manager);
+		}
+	}
+
+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/VisualiseSelectedElementAction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/VisualiseSelectedElementAction.java
new file mode 100644
index 0000000..402cc4a
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/VisualiseSelectedElementAction.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.actions;
+
+import java.util.List;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.logger.Logger;
+import org.eclipse.viatra2.treeeditor.actions.ViatraTreeEditorSelectionAction;
+import org.eclipse.viatra2.visualisation.IVisualisationDescriptor;
+import org.eclipse.viatra2.visualisation.modelspace.ModelSpaceVisualisationDescriptor;
+import org.eclipse.viatra2.visualisation.view.ViatraVisualisationView;
+
+/**
+ * Describes an abstract element visualisation action.
+ * @author Zoltan Ujhelyi
+ */
+public abstract class VisualiseSelectedElementAction extends
+		ViatraTreeEditorSelectionAction {
+
+	/**
+	 * Contains the ID of the graph visualiser view
+	 */
+	public static final String ID_VIEW = "org.eclipse.viatra2.visualisation.view";
+	ViatraVisualisationView view;
+	ModelSpaceVisualisationDescriptor descriptor;
+
+	/**
+	 * Initializes the abstract action
+	 */
+	public VisualiseSelectedElementAction() {
+		super();
+		setText("Graph Visualisation");
+		setToolTipText("");
+		setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()
+				.getImageDescriptor(ISharedImages.IMG_OBJ_ELEMENT));
+	}
+
+	/**
+	 * Initializes the abstract action
+	 * @param part
+	 */
+	public VisualiseSelectedElementAction(IWorkbenchPart part) {
+		super(part);
+	}
+
+	@Override
+	public void run() {
+		@SuppressWarnings("unchecked")
+		List<IModelElement> selectedObjects = getSelectedObjects().toList();
+
+		IModelElement element = selectedObjects.get(0);
+
+		IFramework framework = element.getModelSpace().getFramework();
+		Logger log = framework.getLogger();
+		IModelManager manager = framework.getTopmodel().getModelManager();
+		if (manager == null) {
+			log.error("***The machine is not connected to a Model Space***");
+			return;
+		}
+		
+		view = ViatraVisualisationView.openView();
+		IVisualisationDescriptor newDescriptor = view.getDescriptor(framework);
+		if (newDescriptor == null || !(newDescriptor instanceof ModelSpaceVisualisationDescriptor)) {
+			descriptor = new ModelSpaceVisualisationDescriptor();
+			view.setDescriptor(framework, descriptor);
+			descriptor.setFramework(framework);
+			descriptor.setModelManager(manager);
+		} else {
+			descriptor = (ModelSpaceVisualisationDescriptor) newDescriptor;
+			IModelManager oldManager = descriptor.getModelManager();
+			if (oldManager != null && !manager.equals(oldManager)) {
+				if (!MessageDialog.openConfirm(PlatformUI.getWorkbench().getDisplay()
+						.getActiveShell(), "Graph overwrite", "Another model space is already visualised. Do you want to overwrite it?")) {
+					return;
+				}
+				descriptor.setFramework(framework);
+				descriptor.setModelManager(manager);
+			} else if (oldManager == null) {
+				descriptor.setFramework(framework);
+				descriptor.setModelManager(manager);
+			}
+		}
+		
+		loadFilterData(view, selectedObjects);
+		descriptor.redrawGraph();
+	}
+	
+	@Override
+	public void updateSelf() {
+		if (getSelectedObjects().size()!=1) setEnabled(false);
+		else setEnabled(true);
+	}
+	
+	/**
+	 * Loads a filter of a list of elements
+	 * @param view the view to load the information
+	 * @param elements the list of elements to be loaded
+	 */
+	abstract void loadFilterData(ViatraVisualisationView view, List<IModelElement>elements);
+
+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/CustomFilterGroup.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/CustomFilterGroup.java
new file mode 100644
index 0000000..b327e63
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/CustomFilterGroup.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.actions.groups;
+
+import java.util.HashSet;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.ui.actions.ActionGroup;
+import org.eclipse.viatra2.visualisation.common.extensions.Category;
+import org.eclipse.viatra2.visualisation.common.extensions.FilterConfiguration;
+import org.eclipse.viatra2.visualisation.common.extensions.NamedElement;
+import org.eclipse.viatra2.visualisation.common.extensions.internal.ExtensionAccess;
+import org.eclipse.viatra2.visualisation.modelspace.actions.SelectFilterConfigurationAction;
+
+/**
+ * @author Istvan Rath
+ */
+public class CustomFilterGroup extends ActionGroup {
+
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.actions.ActionGroup#fillContextMenu(org.eclipse.jface.
+	 * action.IMenuManager)
+	 */
+	@Override
+	public void fillContextMenu(IMenuManager manager) {
+
+		IMenuManager menu = new MenuManager("Custom filter configurations");
+		manager.add(menu);
+		HashSet<NamedElement<FilterConfiguration>> addedFilterConfigs = new HashSet<NamedElement<FilterConfiguration>>();
+//		ExtensionAccess.reInit();
+		for (Category c : ExtensionAccess.getAllCategories()) {
+			IMenuManager cateroryMenu = new MenuManager(c.name);
+			for (NamedElement<FilterConfiguration> fc_named : c.filterConfigurations.values()) {
+				SelectFilterConfigurationAction action = new SelectFilterConfigurationAction(fc_named.name, fc_named.element);
+				cateroryMenu.add(action);
+				addedFilterConfigs.add(fc_named);
+			}
+			menu.add(cateroryMenu);
+		}
+		// category specification is optional for filterconfigs -> 
+		// check whether there are any that we missed
+		HashSet<NamedElement<FilterConfiguration>> remaining = new HashSet<NamedElement<FilterConfiguration>>();
+		remaining.addAll( ExtensionAccess.getAllFilterConfigurations() );
+		remaining.removeAll(addedFilterConfigs);
+		if (!remaining.isEmpty()) {
+			IMenuManager unknowns = new MenuManager("Unspecified");
+		//	for (Object o : ExtensionAccess.get)
+			for (NamedElement<FilterConfiguration> fc_n : remaining) {
+				SelectFilterConfigurationAction action = new SelectFilterConfigurationAction(fc_n.name, fc_n.element);
+				unknowns.add(action);
+			}
+			menu.add(unknowns);	
+		}
+
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/FilterGroup.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/FilterGroup.java
new file mode 100644
index 0000000..73c04b2
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/FilterGroup.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.actions.groups;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.ui.actions.ActionGroup;
+import org.eclipse.viatra2.visualisation.modelspace.actions.IFilterManipulator;
+import org.eclipse.viatra2.visualisation.modelspace.actions.ToggleFilterAction;
+import org.eclipse.viatra2.visualisation.modelspace.datasource.filter.PostFilter;
+
+/**
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class FilterGroup extends ActionGroup {
+
+	private PostFilter filter;
+
+	/**
+	 * @return the filter
+	 */
+	public PostFilter getFilter() {
+		return filter;
+	}
+
+	/**
+	 * @param filter the filter to set
+	 */
+	public void setFilter(PostFilter filter) {
+		this.filter = filter;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.actions.ActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager)
+	 */
+	@Override
+	public void fillContextMenu(IMenuManager manager) {
+		//Creating items
+		IMenuManager menu = new MenuManager("Generic Filters");
+		manager.add(menu);
+		ToggleFilterAction containmentFilter = new ToggleFilterAction("Hide Containment Relations");
+		containmentFilter.setManipulator(new IFilterManipulator() {
+		
+			public void setFilterProperty(boolean newValue) {
+				filter.setHideContainment(newValue);
+		
+			}
+		});
+		containmentFilter.setChecked(true);
+		menu.add(containmentFilter);
+		ToggleFilterAction inheritanceFilter = new ToggleFilterAction("Hide Inheritance Relations");
+		inheritanceFilter.setManipulator(new IFilterManipulator() {
+			
+			public void setFilterProperty(boolean newValue) {
+				filter.setHideInheritance(newValue);
+		
+			}
+		});
+		menu.add(inheritanceFilter);
+		inheritanceFilter.setChecked(true);
+		ToggleFilterAction instanceFilter = new ToggleFilterAction("Hide Instance Relations");
+		instanceFilter.setManipulator(new IFilterManipulator() {
+			
+			public void setFilterProperty(boolean newValue) {
+				filter.setHideInstantiation(newValue);
+				
+			}
+		});
+		menu.add(instanceFilter);
+		instanceFilter.setChecked(true);
+	}
+	
+	
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/LabelProviderGroup.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/LabelProviderGroup.java
new file mode 100644
index 0000000..7e78fcb
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/LabelProviderGroup.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Istvan Rath - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.actions.groups;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.ui.actions.ActionGroup;
+import org.eclipse.viatra2.visualisation.ViatraColoredLabelProvider;
+import org.eclipse.viatra2.visualisation.common.extensions.Category;
+import org.eclipse.viatra2.visualisation.common.extensions.NamedElement;
+import org.eclipse.viatra2.visualisation.common.extensions.internal.ExtensionAccess;
+import org.eclipse.viatra2.visualisation.modelspace.actions.SelectLabelProviderAction;
+
+/**
+ * @author Istvan Rath
+ */
+public class LabelProviderGroup extends ActionGroup {
+
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.actions.ActionGroup#fillContextMenu(org.eclipse.jface.
+	 * action.IMenuManager)
+	 */
+	@Override
+	public void fillContextMenu(IMenuManager manager) {
+
+		IMenuManager menu = new MenuManager("Label providers");
+		manager.add(menu);
+//		ExtensionAccess.reInit();
+		for (Category c : ExtensionAccess.getAllCategories()) {
+			IMenuManager cateroryMenu = new MenuManager(c.name);
+			for (NamedElement<ViatraColoredLabelProvider> lp_named : c.labelproviders.values()) {
+				SelectLabelProviderAction action = new SelectLabelProviderAction(lp_named.name, lp_named.element);
+				cateroryMenu.add(action);
+			}
+			menu.add(cateroryMenu);
+		}
+
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/LayoutGroup.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/LayoutGroup.java
new file mode 100644
index 0000000..845755a
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/LayoutGroup.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2009-2010 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *    Istvan Rath - adapt API to new extension schema
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.actions.groups;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.ui.actions.ActionGroup;
+import org.eclipse.viatra2.visualisation.common.extensions.Category;
+import org.eclipse.viatra2.visualisation.common.extensions.NamedElement;
+import org.eclipse.viatra2.visualisation.common.extensions.internal.ExtensionAccess;
+import org.eclipse.viatra2.visualisation.layouts.IViatraLayoutAlgorithm;
+import org.eclipse.viatra2.visualisation.modelspace.actions.SelectLayoutAction;
+
+/**
+ * Menu group responsible for rendering the "layouts" submenu.
+ * @author Zoltan Ujhelyi, Istvan Rath
+ */
+public class LayoutGroup extends ActionGroup {
+
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.actions.ActionGroup#fillContextMenu(org.eclipse.jface.
+	 * action.IMenuManager)
+	 */
+	@Override
+	public void fillContextMenu(IMenuManager manager) {
+		IMenuManager menu = new MenuManager("Layouts");
+		manager.add(menu);
+//		ExtensionAccess.reInit();
+		for (Category c: ExtensionAccess.getAllCategories()) {
+			IMenuManager categoryMenu = new MenuManager(c.name);
+			for (NamedElement<IViatraLayoutAlgorithm> _alg: c.layouts.values()) {
+				SelectLayoutAction action = new SelectLayoutAction(_alg.name, _alg.element);
+				categoryMenu.add(action);
+			}
+			menu.add(categoryMenu);
+		}
+	}
+	
+	
+		/*
+		 * int layoutStyle = LayoutStyles.NO_LAYOUT_NODE_RESIZING |
+		 * LayoutStyles.ENFORCE_BOUNDS | ZestStyles.IGNORE_INVISIBLE_LAYOUT;
+		 * radialAlgorithm = new RadialLayoutAlgorithm( layoutStyle);
+		 * SelectLayoutAction radial = new SelectLayoutAction("Radial",
+		 * radialAlgorithm); menu.add(radial); algorithms.add(radialAlgorithm);
+		 * springAlgorithm = new SpringLayoutAlgorithm(layoutStyle);
+		 * springAlgorithm.setRandom(true); SelectLayoutAction spring = new
+		 * SelectLayoutAction("Spring", springAlgorithm); menu.add(spring);
+		 * algorithms.add(springAlgorithm); GridLayoutAlgorithm gridAlgorithm =
+		 * new GridLayoutAlgorithm(layoutStyle); SelectLayoutAction grid = new
+		 * SelectLayoutAction("Grid", gridAlgorithm); menu.add(grid);
+		 * algorithms.add(gridAlgorithm); CompositeLayoutAlgorithm
+		 * compositeAlgorithm = new CompositeLayoutAlgorithm( layoutStyle, new
+		 * LayoutAlgorithm[] { new DirectedGraphLayoutAlgorithm(layoutStyle),
+		 * new HorizontalShift(layoutStyle) }); SelectLayoutAction composite =
+		 * new SelectLayoutAction("Hierarchy", compositeAlgorithm);
+		 * menu.add(composite); algorithms.add(compositeAlgorithm);
+		 * SimulatedCooling coolingAlgorithm = new SimulatedCooling(
+		 * layoutStyle, new ICriteria[] { new InBounds(), /*new
+		 * PointDistribution(10),
+		 */
+		/*
+		 * new ArcAngleDistribution(1000), new EdgeLength(0.0001), new
+		 * EdgeIntersection(1000), new DistinctNodes(1000000) }, 15);
+		 * SelectLayoutAction cooling = new SelectLayoutAction(
+		 * "Simulated Cooling (Slow)", coolingAlgorithm); menu.add(cooling);
+		 */
+		/*
+		 * CompositeLayoutAlgorithm compositeCooling = new
+		 * CompositeLayoutAlgorithm( layoutStyle, new LayoutAlgorithm[] {
+		 * gridAlgorithm, coolingAlgorithm }); SelectLayoutAction compCooling =
+		 * new SelectLayoutAction("New Cooling", compositeCooling);
+		 * menu.add(compCooling); algorithms.add(compositeCooling);
+		 */
+	
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/ModelSpaceProviderGroup.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/ModelSpaceProviderGroup.java
new file mode 100644
index 0000000..f1b55d8
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/ModelSpaceProviderGroup.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.actions.groups;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.ui.actions.ActionGroup;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.visualisation.common.action.SelectProviderAction;
+import org.eclipse.viatra2.visualisation.modelspace.datasource.AbstractModelSpaceProvider;
+import org.eclipse.viatra2.visualisation.modelspace.datasource.FullModelSpaceProvider;
+import org.eclipse.viatra2.visualisation.modelspace.datasource.ReducedModelSpaceProvider;
+import org.eclipse.viatra2.visualisation.modelspace.datasource.filter.PreFilter;
+
+/**
+ * A group of content providers for the model space visualisation. The group
+ * manages the list of providers and their graphical display.
+ * @author Zoltan Ujhelyi
+ */
+public class ModelSpaceProviderGroup extends ActionGroup {
+
+	ReducedModelSpaceProvider reducedProvider = new ReducedModelSpaceProvider();
+	FullModelSpaceProvider fullProvider = new FullModelSpaceProvider();
+	List<AbstractModelSpaceProvider> providers;
+
+	/**
+	 * Initializes a model space provider group used in the GUI
+	 */
+	public ModelSpaceProviderGroup() {
+		providers = new ArrayList<AbstractModelSpaceProvider>();
+		providers.add(reducedProvider);
+		providers.add(fullProvider);
+	}
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.actions.ActionGroup#fillContextMenu(org.eclipse.jface.
+	 * action.IMenuManager)
+	 */
+	@Override
+	public void fillContextMenu(IMenuManager manager) {
+		IMenuManager menu = new MenuManager("Display Relations");
+		manager.add(menu);
+		SelectProviderAction reducedAction = new SelectProviderAction(
+				"As Arcs", reducedProvider);
+		menu.add(reducedAction);
+		SelectProviderAction fullAction = new SelectProviderAction(
+				"As Nodes", fullProvider);
+		reducedAction.setChecked(true);
+		menu.add(fullAction);
+	}
+
+	/**
+	 * Returns the list of content providers managed by the group.
+	 * @return the providers
+	 */
+	public List<? extends AbstractModelSpaceProvider> getProviders() {
+		return providers;
+	}
+	
+	/**
+	 * Returns the default content provider from the group.
+	 * @return the default content provider
+	 */
+	public AbstractModelSpaceProvider getDefaultProvider() {
+		return reducedProvider;
+	}
+
+	/**
+	 * Sets the viatra model manager from which the content provider extracts
+	 * the graph data
+	 * @param modelManager
+	 *            the modelManager to set
+	 */
+	public void setModelManager(IModelManager modelManager) {
+		for (AbstractModelSpaceProvider provider : providers)
+			provider.setModelManager(modelManager);
+	}
+
+	/**
+	 * Sets a filter to reduce the number of graph elements to generate
+	 * @param filter
+	 *            the filter to set
+	 */
+	public void setFilter(PreFilter filter) {
+		for (AbstractModelSpaceProvider provider : providers)
+			provider.setFilter(filter);
+	}
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/PresetGroup.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/PresetGroup.java
new file mode 100644
index 0000000..c86d56f
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/PresetGroup.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *    Istvan Rath - modification to new extension point schema
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.actions.groups;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.ui.actions.ActionGroup;
+import org.eclipse.viatra2.visualisation.common.extensions.Category;
+import org.eclipse.viatra2.visualisation.common.extensions.NamedElement;
+import org.eclipse.viatra2.visualisation.common.extensions.VisualisationPreset;
+import org.eclipse.viatra2.visualisation.common.extensions.internal.ExtensionAccess;
+import org.eclipse.viatra2.visualisation.modelspace.actions.SelectPresetAction;
+
+/**
+ * @author Istvan Rath
+ */
+public class PresetGroup extends ActionGroup {
+
+	
+	/**
+	 * default preset to use.
+	 */
+	VisualisationPreset defaultPreset;
+	
+	public VisualisationPreset getDefaultPreset() {
+		return defaultPreset;
+	}
+
+	public PresetGroup() {
+//		ExtensionAccess.reInit();
+		for (Category c : ExtensionAccess.getAllCategories()) {
+			for (NamedElement<VisualisationPreset> vp_named : c.presets.values()) {
+				if (vp_named.element.id.equals("org.eclipse.viatra2.visualisation.preset.default")) {
+					defaultPreset = vp_named.element;
+				}
+			}
+		}
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.actions.ActionGroup#fillContextMenu(org.eclipse.jface.
+	 * action.IMenuManager)
+	 */
+	@Override
+	public void fillContextMenu(IMenuManager manager) {
+
+		IMenuManager menu = new MenuManager("Presets");
+		manager.add(menu);
+//		ExtensionAccess.reInit();
+		for (Category c : ExtensionAccess.getAllCategories()) {
+			IMenuManager cateroryMenu = new MenuManager(c.name);
+			for (NamedElement<VisualisationPreset> vp_named : c.presets.values()) {
+				SelectPresetAction action = new SelectPresetAction(vp_named.name, vp_named.element);
+				cateroryMenu.add(action);
+				
+				if (vp_named.element.id.equals("org.eclipse.viatra2.visualisation.preset.default")) {
+					defaultPreset = vp_named.element;
+				}
+			}
+			menu.add(cateroryMenu);
+		}
+
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/package-info.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/package-info.java
new file mode 100644
index 0000000..6f742eb
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/groups/package-info.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011, Istvan Rath and Zoltan Ujhelyi
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+/**
+ * This package contains classes representing Action groups.
+ * @author Zoltan Ujhelyi 
+ */
+package org.eclipse.viatra2.visualisation.modelspace.actions.groups;
+
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/package-info.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/package-info.java
new file mode 100644
index 0000000..26bc860
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/actions/package-info.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011, Istvan Rath and Zoltan Ujhelyi
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+/**
+ * This package contains the action classes used by the
+ * model space visualisation.
+ * @author Zoltan Ujhelyi 
+ */
+package org.eclipse.viatra2.visualisation.modelspace.actions;
+
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/AbstractModelSpaceProvider.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/AbstractModelSpaceProvider.java
new file mode 100644
index 0000000..523bad5
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/AbstractModelSpaceProvider.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.datasource;
+
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.visualisation.modelspace.datasource.filter.PreFilter;
+
+/**
+ * This class represents an abstract content provider for the graph viewer.
+ * It is possible to use any of the possible Graph Content Providers from Zest,
+ * but all the descendants should provide the same IContentProvider descendant interface
+ * (otherwise a Zest runtime exception is thrown).
+ * @author Zoltan Ujhelyi
+ *
+ */
+public abstract class AbstractModelSpaceProvider implements IContentProvider{
+
+	protected IModelManager modelManager;
+	protected PreFilter filter; 
+
+	/**
+	 * Sets the viatra model manager from which the content provider extracts the graph data
+	 * @param modelManager the modelManager to set
+	 */
+	public void setModelManager(IModelManager modelManager) {
+		this.modelManager = modelManager;
+	}
+
+	/**
+	 * Sets a filter to reduce the number of constraints to generate
+	 * @param filter the filter to set
+	 */
+	public void setFilter(PreFilter filter) {
+		this.filter = filter;
+	}
+
+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/FullModelSpaceProvider.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/FullModelSpaceProvider.java
new file mode 100644
index 0000000..945abff
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/FullModelSpaceProvider.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.datasource;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.zest.core.viewers.IGraphEntityRelationshipContentProvider;
+
+/**
+ * Acts as a Model Space Provider for the Graph Viewer,
+ * represents the Relations as Nodes.
+ * 
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class FullModelSpaceProvider extends AbstractModelSpaceProvider implements IGraphEntityRelationshipContentProvider{
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.zest.core.viewers.IGraphEntityRelationshipContentProvider#getRelationships(java.lang.Object, java.lang.Object)
+	 */
+	public Object[] getRelationships(Object source, Object dest) {
+		if (modelManager==null) return new Object[0];
+		Assert.isTrue(source instanceof IModelElement && dest instanceof IModelElement);
+		ArrayList<GraphArc> relations = new ArrayList<GraphArc>();
+		if (source instanceof IRelation) {
+			IRelation src = (IRelation) source;
+			IModelElement dst = (IModelElement)dest;
+			if (src.getTo().compareTo(dst)==0) {
+				GraphArc relation = new GraphArc();
+				relation.setEntity1(src);
+				relation.setEntity2(dst);
+				relation.setMultiplicity(1);
+				relations.add(relation);
+			}
+		}
+		if (dest instanceof IRelation) {
+			IRelation dst = (IRelation) dest;
+			IModelElement src = (IModelElement)source;
+			if (dst.getFrom().compareTo(src)==0) {
+				GraphArc relation = new GraphArc();
+				relation.setEntity1(src);
+				relation.setEntity2(dst);
+				relation.setMultiplicity(1);
+				relations.add(relation);
+			}
+		}
+		IModelElement src = (IModelElement) source;
+		IModelElement dst = (IModelElement) dest;
+		if (src.compareTo(dst) != 0 && dst.isDirectSupertypeOf(src)) {
+			GraphArc relation = new GraphArc();
+			relation.setEntity1(src);
+			relation.setEntity2(dst);
+			relation.setMultiplicity(1);
+			relation.setName("supertypeOf");
+			relations.add(relation);
+		}
+		if (src.compareTo(dst) != 0 && dst.isDirectTypeOf(src)) {
+			GraphArc relation = new GraphArc();
+			relation.setEntity1(src);
+			relation.setEntity2(dst);
+			relation.setMultiplicity(1);
+			relation.setName("typeOf");
+			relations.add(relation);
+		}
+		if (src instanceof IEntity && ((IEntity)src).getContents().contains(dst) && src.compareTo(dst) != 0) {
+			GraphArc relation = new GraphArc();
+			relation.setEntity1(src);
+			relation.setEntity2(dst);
+			relation.setMultiplicity(1);
+			relation.setName("contains");
+			relations.add(relation);
+		}
+		return relations.toArray();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+	 */
+	public Object[] getElements(Object inputElement) {
+		if (modelManager != null) {
+			ArrayList<IModelElement> elements = new ArrayList<IModelElement>();
+			for (IModelElement element : modelManager.getElements()) {
+				if (!filter.isFiltered(element))
+					elements.add(element);
+			}
+			return elements.toArray();
+		} else return new ArrayList<Object>().toArray();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+	 */
+	public void dispose() {
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+	 */
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+	}
+
+	/**
+	 * Used to return the child elements - required for nested elements using INestedContentProvider (Zest Galileo)
+	 * @param element the object to check
+	 * @return the array of children
+	 */
+	public Object[] getChildren(Object element) {
+		if (element instanceof IEntity) {
+			return ((IEntity) element).getContents().toArray();
+		}
+		return null;
+	}
+
+	/**
+	 * Used to check whether a node has child nodes - required for nested elements using INestedContentProvider (Zest Galileo) 
+	 * @param element the object to check
+	 * @return true if there are subnodes
+	 */
+	public boolean hasChildren(Object element) {
+		if (element instanceof IEntity) {
+			return !((IEntity) element).getContents().isEmpty();
+			//.getAllElementsInNamespace().isEmpty();
+		}
+		return false;
+	}
+
+/*
+ * Used in IGraphEntityContentProvider - not a full provider!
+ * 	public Object[] getConnectedTo(Object entity) {
+		if (entity instanceof IEntity) {
+			return ((IEntity) entity).getRelationsFrom().toArray();
+		}
+		if (entity instanceof IRelation) {
+			return new Object[] {((IRelation) entity).getTo()};
+		}
+		return null;
+	}*/
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/GraphArc.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/GraphArc.java
new file mode 100644
index 0000000..b8b75d7
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/GraphArc.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.datasource;
+
+import org.eclipse.viatra2.core.IModelElement;
+
+/**
+ * A Graph Arc object represents a graph arc. It is used in order to assign arcs
+ * to such components that are not directly present in the Viatra model space.
+ * @author Zoltan Ujhelyi
+ */
+public class GraphArc {
+
+	private IModelElement entity1, entity2;
+	private Integer multiplicity;
+	private String name;
+
+	/**
+	 * Initializes a Graph Arc
+	 */
+	public GraphArc() {
+
+	}
+
+	/**
+	 * Initializes a directed Graph Arc between the two elements, and assigns
+	 * the name to it
+	 * @param source
+	 *            the source model element
+	 * @param destination
+	 *            the destination model element
+	 * @param name
+	 *            the label of the arc
+	 */
+	public GraphArc(IModelElement source, IModelElement destination, String name) {
+		this.entity1 = source;
+		this.entity2 = destination;
+		multiplicity = 1;
+		this.name = name;
+	}
+
+	/**
+	 * @return the entity1
+	 */
+	public IModelElement getEntity1() {
+		return entity1;
+	}
+
+	/**
+	 * @param entity1
+	 *            the entity1 to set
+	 */
+	public void setEntity1(IModelElement entity1) {
+		this.entity1 = entity1;
+	}
+
+	/**
+	 * @return the entity2
+	 */
+	public IModelElement getEntity2() {
+		return entity2;
+	}
+
+	/**
+	 * @param entity2
+	 *            the entity2 to set
+	 */
+	public void setEntity2(IModelElement entity2) {
+		this.entity2 = entity2;
+	}
+
+	/**
+	 * @return the multiplicity
+	 */
+	public Integer getMultiplicity() {
+		return multiplicity;
+	}
+
+	/**
+	 * @param multiplicity
+	 *            the multiplicity to set
+	 */
+	public void setMultiplicity(Integer multiplicity) {
+		this.multiplicity = multiplicity;
+	}
+
+	/**
+	 * @return the name
+	 */
+	public String getName() {
+		return name;
+	}
+
+	/**
+	 * @param name
+	 *            the name to set
+	 */
+	public void setName(String name) {
+		this.name = name;
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/GraphRelationArc.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/GraphRelationArc.java
new file mode 100644
index 0000000..f338166
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/GraphRelationArc.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.datasource;
+
+import org.eclipse.viatra2.core.IRelation;
+
+/**
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class GraphRelationArc extends GraphArc {
+
+	private IRelation relation;
+	
+	/**
+	 * Initializes a graph arc representation from a relation element
+	 * @param relation the relation to use
+	 */
+	public GraphRelationArc(IRelation relation) {
+		this.relation = relation;
+		setEntity1(relation.getFrom());
+		setEntity2(relation.getTo());
+		setMultiplicity(1);
+	}
+
+	/**
+	 * @return the relation
+	 */
+	public IRelation getRelation() {
+		return relation;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.visualisation.view.GraphArc#getName()
+	 */
+	@Override
+	public String getName() {
+		if (relation != null) return relation.getName();
+		else return super.getName();
+	}
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/ModelSpaceLabelProvider.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/ModelSpaceLabelProvider.java
new file mode 100644
index 0000000..1b1dacb
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/ModelSpaceLabelProvider.java
@@ -0,0 +1,149 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.datasource;
+
+import java.util.Set;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelSpace;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.viatra2.framework.IFramework;
+import org.eclipse.viatra2.tags.ITag;
+import org.eclipse.viatra2.visualisation.ViatraColoredLabelProvider;
+import org.eclipse.zest.core.viewers.IConnectionStyleProvider;
+import org.eclipse.zest.core.viewers.IEntityStyleProvider;
+import org.eclipse.zest.core.widgets.ZestStyles;
+
+/**
+ * This class is used as a label provider for the graph viewer. It defines node
+ * and arc labels and style.
+ * @author Zoltan Ujhelyi
+ */
+public class ModelSpaceLabelProvider extends ViatraColoredLabelProvider
+		implements IEntityStyleProvider, IConnectionStyleProvider {
+
+	protected static String getShortText(String originalText) {
+		int length = originalText.length();
+		if (length>15) {
+			String text = originalText.substring(0,6) + "..." + originalText.substring(length - 6, length - 1);
+			return text;
+		}
+		return originalText;
+	}
+	
+	protected static String getTypeAsString(IModelElement modelElement) {
+		String name = "";
+		if (!modelElement.getTypes().isEmpty()) {
+			name += modelElement.getTypes().iterator().next()
+					.getName();
+		}
+		return name;
+	}
+	
+	@Override
+	public String getText(Object element) {
+		String name;
+		if (element instanceof IModelElement) {
+			IModelElement modelElement = (IModelElement) element;
+			name = modelElement.getName()+" : "+getShortText( getTypeAsString(modelElement) );
+		} else if (element instanceof GraphArc) {
+			GraphArc arc = (GraphArc) element;
+			name = arc.getName();
+		}  else
+			return null;
+		return name;
+	}
+
+	public boolean fisheyeNode(Object entity) {
+		return true;// entity instanceof IRelation;
+	}
+
+	public Color getBackgroundColour(Object entity) {
+		// Istvan: add support for recognizing tag color information
+		IModelSpace modelSpace = ((IModelElement) entity).getModelSpace();
+		// The model space might be null, because the Property page uses a dummy entity implementation
+		if (modelSpace != null) {
+			IFramework fw = modelSpace.getFramework();
+			if (fw != null) {
+				Set<ITag> tags = fw.getTagManager().getTagsForModelElement(
+						(IModelElement) entity);
+				if (tags != null && !tags.isEmpty()) {
+					return Display.getDefault().getSystemColor(
+							tags.iterator().next().getBackgroundColor());
+				}
+			}
+		}
+		if (entity instanceof IRelation) {
+			return RELATION_BG;
+		}
+		return ENTITY_BG;
+	}
+
+	public Color getBorderColor(Object entity) {
+		if (entity instanceof IRelation) {
+			return RELATION_BO;
+		}
+		return ENTITY_BO;
+	}
+
+	public Color getBorderHighlightColor(Object entity) {
+		if (entity instanceof IRelation) {
+			return RELATION_BOHL;
+		}
+		return ENTITY_BOHL;
+	}
+
+	public int getBorderWidth(Object entity) {
+		return 1;
+	}
+
+	public Color getForegroundColour(Object entity) {
+		if (entity instanceof IRelation) {
+			return RELATION_FG;
+		}
+		return ENTITY_FG;
+	}
+
+	public Color getNodeHighlightColor(Object entity) {
+		if (entity instanceof IRelation) {
+			return RELATION_HL;
+		}
+		return ENTITY_HL;
+	}
+
+	public IFigure getTooltip(Object entity) {
+		// return new TextFlow("Hello");
+		return null;
+	}
+
+	public Color getColor(Object rel) {
+		return ARC;
+	}
+
+	public int getConnectionStyle(Object rel) {
+		if (rel instanceof GraphArc && !(rel instanceof GraphRelationArc)) {
+			return ZestStyles.CONNECTIONS_DOT;
+		}
+		return 0;
+	}
+
+	public Color getHighlightColor(Object rel) {
+		return ARC_HL;
+	}
+
+	public int getLineWidth(Object rel) {
+		return 1;
+	}
+
+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/ReducedModelSpaceProvider.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/ReducedModelSpaceProvider.java
new file mode 100644
index 0000000..afe2c02
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/ReducedModelSpaceProvider.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.datasource;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IModelManager;
+import org.eclipse.viatra2.core.IRelation;
+import org.eclipse.zest.core.viewers.IGraphEntityRelationshipContentProvider;
+
+/**
+ * @author Zoltan Ujhelyi
+ */
+public class ReducedModelSpaceProvider extends AbstractModelSpaceProvider
+		implements IGraphEntityRelationshipContentProvider {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.zest.core.viewers.IGraphEntityRelationshipContentProvider
+	 * #getRelationships(java.lang.Object, java.lang.Object)
+	 */
+	public Object[] getRelationships(Object source, Object dest) {
+		if (modelManager == null) return new Object[0];
+		IEntity src = (IEntity) source;
+		IEntity dst = (IEntity) dest;
+		ArrayList<Object> relations = new ArrayList<Object>();
+		
+		Collection<IRelation> relationsFrom = new ArrayList<IRelation>(src.getRelationsFrom());
+		relationsFrom.retainAll(dst.getRelationsTo());
+		for (IRelation relation : relationsFrom) {
+			if (!filter.isFiltered(relation)){
+				relations.add(relation);
+			}
+		}
+		if (dst.compareTo(src) != 0 && src.isDirectSubtypeOf(dst)) {
+			GraphArc arc = new GraphArc();
+			arc.setEntity1(src);
+			arc.setEntity2(dst);
+			arc.setMultiplicity(1);
+			arc.setName("supertypeOf");
+			relations.add(arc);
+		}
+		if (dst.getContents().contains(src)) {
+			GraphArc arc = new GraphArc();
+			arc.setEntity1(src);
+			arc.setEntity2(dst);
+			arc.setMultiplicity(1);
+			arc.setName("contains");
+			relations.add(arc);
+		}
+		if (src.isInstanceOf(dst)) {
+			GraphArc arc = new GraphArc();
+			arc.setEntity1(src);
+			arc.setEntity2(dst);
+			arc.setMultiplicity(1);
+			arc.setName("typeOf");
+			relations.add(arc);
+		}
+		return relations.toArray();
+	}
+
+	/**
+	 * @param modelManager
+	 *            the modelManager to set
+	 */
+	public void setModelManager(IModelManager modelManager) {
+		this.modelManager = modelManager;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java
+	 * .lang.Object)
+	 */
+	public Object[] getElements(Object inputElement) {
+		if (modelManager != null) {
+			ArrayList<IModelElement> elements = new ArrayList<IModelElement>();
+			for (IModelElement element : modelManager.getEntities()) {
+				if (!filter.isFiltered(element)) elements.add(element);
+			}
+			return elements.toArray();
+		} else
+			return new ArrayList<Object>().toArray();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+	 */
+	public void dispose() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface
+	 * .viewers.Viewer, java.lang.Object, java.lang.Object)
+	 */
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/filter/FilterCondition.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/filter/FilterCondition.java
new file mode 100644
index 0000000..78ef397
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/filter/FilterCondition.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.datasource.filter;
+
+import java.util.Iterator;
+import java.util.TreeSet;
+
+/**
+ * Represents a filter condition
+ * @author Zoltan Ujhelyi
+ *
+ */
+class FilterCondition {
+	
+	protected TreeSet<String> subtreeFilters = new TreeSet<String>();
+	protected TreeSet<String> elementFilters = new TreeSet<String>();
+
+	/**
+	 * Add an element to the filter
+	 * @param id the id string of the selected item
+	 */
+	void addSubtreeFilterCondition(String id) {
+		if (!subtreeFilters.contains(id)) subtreeFilters.add(id);
+		
+	}
+	
+	void addElementFilterCondition(String id) {
+		if (!elementFilters.contains(id)) elementFilters.add(id);
+	}
+	
+	boolean containsID(String id) {
+		return elementFilters.contains(id) || subtreeFilters.contains(id);
+	}
+	
+	boolean elementContainsID(String id) {
+		return elementFilters.contains(id);
+	}
+	void removeFilter(String id, boolean isSubTree) {
+		if (id.equals("")) {
+			subtreeFilters.clear();
+			return;
+		}
+		Iterator<String> it;
+		if (isSubTree) {
+			it = subtreeFilters.iterator();
+			while (it.hasNext()) {
+				if (it.next().startsWith(id)) it.remove();
+			}
+		}
+		it = elementFilters.iterator();
+		while (it.hasNext()) {
+			if (it.next().startsWith(id)) it.remove();
+		}
+	}
+	/**
+	 * Decides whether a selected item is filtered or not
+	 * @param id  the id string of the selected item
+	 * @return true, if the selected item is filtered
+	 */
+	boolean isMatched(String id) {
+		if (id == null || id.equals("")) return subtreeFilters.contains("");
+		for (String filter : elementFilters) {
+			if (id.equals(filter)) return true;
+		}
+		for (String filter : subtreeFilters) {
+			if (id.startsWith(filter)) return true;
+		}
+		return false;
+	};
+	
+	/**
+	 * Collects the most specific condition of the variable
+	 * @param id the id string of the selected item
+	 * @return the id of the most specific condition stored in this object
+	 */
+	String getMostSpecificMatch(String id) {
+		if (subtreeFilters.contains(id) || id.equals("")) return id;
+		if (elementFilters.contains(id)) return id;
+		String[] elements = id.split("\\.");
+		String newId = "";
+		for (int i=0; i<elements.length-1; i++) {
+			newId=newId.concat(elements[i]);
+			if (i != elements.length-2) newId = newId.concat(".");
+		}
+		return getMostSpecificMatch(newId);
+	}
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/filter/PostFilter.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/filter/PostFilter.java
new file mode 100644
index 0000000..290e4d4
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/filter/PostFilter.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.datasource.filter;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.visualisation.modelspace.datasource.GraphArc;
+
+/**
+ * This class contains filters usable after the graph contents have been generated.
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class PostFilter extends ViewerFilter {
+	
+	private boolean hideContainment = false;
+	private boolean hideInheritance = false;
+	private boolean hideInstantiation = false;
+	
+	/**
+	 * @return the hideContainment
+	 */
+	public boolean isHideContainment() {
+		return hideContainment;
+	}
+	/**
+	 * @param hideContainment the hideContainment to set
+	 */
+	public void setHideContainment(boolean hideContainment) {
+		this.hideContainment = hideContainment;
+	}
+	/**
+	 * @return the hideInheritance
+	 */
+	public boolean isHideInheritance() {
+		return hideInheritance;
+	}
+	/**
+	 * @param hideInheritance the hideInheritance to set
+	 */
+	public void setHideInheritance(boolean hideInheritance) {
+		this.hideInheritance = hideInheritance;
+	}
+	/**
+	 * @return the hideInstantiation
+	 */
+	public boolean isHideInstantiation() {
+		return hideInstantiation;
+	}
+	/**
+	 * @param hideInstantiation the hideInstantiation to set
+	 */
+	public void setHideInstantiation(boolean hideInstantiation) {
+		this.hideInstantiation = hideInstantiation;
+	}
+
+	@Override
+	public boolean select(Viewer viewer, Object parentElement, Object element) {
+		if (element instanceof IModelElement){
+			IModelElement modelElement = (IModelElement) element;
+			//hide the root element
+			if (modelElement.getName().equals("root") && 
+					modelElement.getFullyQualifiedName().equals("")) 
+				return false;
+			/*XXX this code should hide nodes not connected to other nodes but does not work because of a Zest bug
+			 * GraphViewer view = (GraphViewer) viewer;
+			try {
+				//XXX this try block is needed because findGraphItem is buggy; see Bug 237489 in Zest Bugzilla 
+				GraphItem findGraphItem = view.findGraphItem(element);
+				GraphNode node = (GraphNode)findGraphItem;
+				if (node.getSourceConnections().size()+node.getTargetConnections().size()==0) return true;
+			}catch(ArrayIndexOutOfBoundsException e) {}*/
+		}
+		if (element instanceof GraphArc) {
+			//hide the containment relations
+			if (hideContainment) {
+				String name = ((GraphArc) element).getName();
+				if (name != null && name.equals("contains")) return false;
+			}
+			if (hideInheritance) {
+				String name = ((GraphArc) element).getName();
+				if (name != null && name.equals("supertypeOf")) return false;
+			}
+			if (hideInstantiation) {
+				String name = ((GraphArc) element).getName();
+				if (name != null && name.equals("instanceOf")) return false;
+			}
+		}
+		return true;
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/filter/PreFilter.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/filter/PreFilter.java
new file mode 100644
index 0000000..8b4ca1d
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/filter/PreFilter.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.modelspace.datasource.filter;
+
+import java.util.Collection;
+
+import org.eclipse.viatra2.core.IEntity;
+import org.eclipse.viatra2.core.IModelElement;
+import org.eclipse.viatra2.core.IRelation;
+
+/**
+ * This class contains filters usable during the generation of the graph
+ * contents.
+ * @author Zoltan Ujhelyi
+ */
+public class PreFilter {
+
+	private FilterCondition positiveConditions = new FilterCondition();
+	private FilterCondition negativeConditions = new FilterCondition();
+
+	/**
+	 * Makes sure that both ends of the relation are included
+	 * @param relation
+	 *            the relation to watch
+	 */
+	private void includeRelationEnds(IRelation relation) {
+		includeElement(relation.getFrom());
+		includeElement(relation.getTo());
+	}
+	
+	private void removeLinkedRelations(IModelElement element) {
+		for (IModelElement relatedElement : element.getRelations()) {
+			if (relatedElement instanceof IRelation && !isFiltered(relatedElement)) {
+				IRelation relation = (IRelation)relatedElement;
+				IModelElement from = relation.getFrom();
+				IModelElement to = relation.getTo();
+				if (isFiltered(from) || isFiltered(to)) excludeElement(relation);				
+			}
+		}
+	}
+
+	/**
+	 * Stores a condition to include a single model element
+	 * @param element
+	 *            the element to include
+	 */
+	public void includeElement(IModelElement element) {
+		if (isFiltered(element)) {
+			String name = element.getFullyQualifiedName();
+			positiveConditions.addElementFilterCondition(name);
+			negativeConditions.removeFilter(name, false);
+			/*if (element instanceof IEntity) 
+				for (IModelElement subElement : ((IEntity)element).getContents()) {
+					if (!isFiltered(subElement)) excludeSubtree(subElement);
+				}*/
+		}
+		if (element instanceof IRelation)
+			includeRelationEnds((IRelation) element);
+	}
+
+	/**
+	 * Stores a condition to exlude a single model element
+	 * @param element
+	 *            the model element to exclude
+	 */
+	public void excludeElement(IModelElement element) {
+		if (!isFiltered(element)) {
+			String name = element.getFullyQualifiedName();
+			if (element instanceof IEntity) 
+				for (IModelElement subElement : ((IEntity)element).getContents()) {
+					if (!isFiltered(subElement)) includeSubtree(subElement);
+				}
+			negativeConditions.addElementFilterCondition(name);
+			positiveConditions.removeFilter(name, false);
+			removeLinkedRelations(element);
+		}
+	}
+
+	/**
+	 * Stores a condition to include a selected model element (and it's
+	 * descendants) in the view
+	 * @param element
+	 *            the element to include
+	 */
+	public void includeSubtree(IModelElement element) {
+		String name = element.getFullyQualifiedName();
+		negativeConditions.removeFilter(name, true);
+		positiveConditions.addSubtreeFilterCondition(name);
+		if (element instanceof IRelation)
+			includeRelationEnds((IRelation) element);
+		for (IModelElement subElement : element.getAllElementsInNamespace()) {
+			if (subElement instanceof IRelation) {
+				includeRelationEnds((IRelation) subElement);
+			}
+		}
+	}
+
+	/**
+	 * Stores a condition to exclude a selected model element (and it's
+	 * descendants) in the view
+	 * @param element
+	 *            the element to exclude
+	 */
+	public void excludeSubtree(IModelElement element) {
+		String name = element.getFullyQualifiedName();
+		positiveConditions.removeFilter(name, true);
+		negativeConditions.addSubtreeFilterCondition(name);
+		removeLinkedRelations(element);
+		for (IModelElement subElement : element.getAllElementsInNamespace()) {
+			removeLinkedRelations(subElement);
+		}
+	}
+
+	/**
+	 * Decides whether the given model element should be filtered or not.
+	 * @param element
+	 *            the model element to check
+	 * @return true, if the element should be filtered from the view (hidden)
+	 */
+	public boolean isFiltered(IModelElement element) {
+		String name = element.getFullyQualifiedName();
+		boolean negative = negativeConditions.isMatched(name);
+		boolean positive = positiveConditions.isMatched(name);
+		if (negative && positive) {
+			boolean negElement = negativeConditions.elementContainsID(name);
+			boolean posElement = positiveConditions.elementContainsID(name);
+			if (negElement && posElement) {
+				String posMatch = positiveConditions.getMostSpecificMatch(name);
+				String negMatch = negativeConditions.getMostSpecificMatch(name);
+				return posMatch.length() < negMatch.length();
+			} else return !posElement || negElement;
+		}
+		return !positive || negative;
+	}
+
+	/**
+	 * Updates the filter by removing an elements. For this both the positive and negative conditions are matched.
+	 * @param elements the elements to clear from the filter
+	 */
+	public void removeDeletedElements(Collection<IModelElement> elements) {
+		for (IModelElement element : elements) {
+			String name = element.getFullyQualifiedName();
+			if (name != null && positiveConditions.elementContainsID(name)){
+				positiveConditions.removeFilter(name, false);
+			}
+			if (name != null && negativeConditions.elementContainsID(name)){
+				negativeConditions.removeFilter(name, false);
+			}
+		}
+	}
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/filter/package-info.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/filter/package-info.java
new file mode 100644
index 0000000..9bdbfb3
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/filter/package-info.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011, Istvan Rath and Zoltan Ujhelyi
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+/**
+ * This package contains classes which allow filtering
+ * the graph elements.
+ * @author Zoltan Ujhelyi 
+ */
+package org.eclipse.viatra2.visualisation.modelspace.datasource.filter;
+
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/package-info.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/package-info.java
new file mode 100644
index 0000000..16df7b8
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/modelspace/datasource/package-info.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011, Istvan Rath and Zoltan Ujhelyi
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+/**
+ * This package contains classes used to generate data
+ * from the model space to the JFace-like Graph Viewer.
+ * @author Zoltan Ujhelyi 
+ */
+package org.eclipse.viatra2.visualisation.modelspace.datasource;
+
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/LocationElement.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/LocationElement.java
new file mode 100644
index 0000000..34f6f64
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/LocationElement.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.patterns;
+
+/**
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class LocationElement {
+
+	Object inputElement;
+
+	/**
+	 * @return the inputElement
+	 */
+	public Object getInputElement() {
+		return inputElement;
+	}
+
+	/**
+	 * @param inputElement the inputElement to set
+	 */
+	public void setInputElement(Object inputElement) {
+		this.inputElement = inputElement;
+	}
+	
+	
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/PatternGraphDescriptor.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/PatternGraphDescriptor.java
new file mode 100644
index 0000000..63753ad
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/PatternGraphDescriptor.java
@@ -0,0 +1,433 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.patterns;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.visualisation.IVisualisationDescriptor;
+import org.eclipse.viatra2.visualisation.ViatraColoredLabelProvider;
+import org.eclipse.viatra2.visualisation.ViatraGraphViewer;
+import org.eclipse.viatra2.visualisation.VisualisationPlugin;
+import org.eclipse.viatra2.visualisation.common.extensions.FilterConfiguration;
+import org.eclipse.viatra2.visualisation.common.extensions.NamedElement;
+import org.eclipse.viatra2.visualisation.common.extensions.VisualisationPreset;
+import org.eclipse.viatra2.visualisation.layouts.IViatraLayoutAlgorithm;
+import org.eclipse.viatra2.visualisation.patterns.actions.PatternProviderGroup;
+import org.eclipse.viatra2.visualisation.patterns.sources.PatternContentProvider;
+import org.eclipse.viatra2.visualisation.patterns.sources.PatternLabelProvider;
+import org.eclipse.viatra2.visualisation.view.ViatraVisualisationView;
+import org.eclipse.zest.core.widgets.ZestStyles;
+import org.eclipse.zest.layouts.LayoutAlgorithm;
+import org.eclipse.zest.layouts.LayoutStyles;
+import org.eclipse.zest.layouts.algorithms.CompositeLayoutAlgorithm;
+import org.eclipse.zest.layouts.algorithms.GridLayoutAlgorithm;
+import org.eclipse.zest.layouts.algorithms.HorizontalShift;
+
+/**
+ * <p>
+ * Describes a pattern graph visualisation task. The data model of the
+ * visualisation is a {@link Machine}, and basically its patterns are displayed
+ * as graphs.
+ * </p>
+ * <p>
+ * The descriptor allows the storage of several different views of a single
+ * machine in a path (stored as a stack), and allows basic back-navigation using
+ * it.
+ * </p>
+ * @author Zoltan Ujhelyi
+ */
+public class PatternGraphDescriptor implements IVisualisationDescriptor,
+		ITabbedPropertySheetPageContributor {
+
+	PatternGraphViewer gv;
+	PatternProviderGroup providers = new PatternProviderGroup();
+	PatternContentProvider contentProvider = providers.getDefaultProvider();
+	PatternLabelProvider labelProvider = new PatternLabelProvider();
+	Machine machine;
+	String machineName;
+	Hashtable<String, GTPattern> patternStorage;
+	Combo list;
+	LayoutAlgorithm layout;
+
+	ArrayList<LocationElement> locationStack = new ArrayList<LocationElement>();
+	int locationID = 0;
+
+	// Actions
+	Action previousViewerAction = new Action() {
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.jface.action.Action#run()
+		 */
+		@Override
+		public void run() {
+			if (locationID > 0) popItem();
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.jface.action.Action#isEnabled()
+		 */
+		@Override
+		public boolean isEnabled() {
+			return locationID > 1;
+		}
+
+	};
+	private List<ViewerFilter> filters = new ArrayList<ViewerFilter>();
+
+	/**
+	 * Initializes the pattern graph descriptor.
+	 */
+	public PatternGraphDescriptor() {
+		previousViewerAction.setText("Back");
+		previousViewerAction.setToolTipText("Displays the previous view");
+		previousViewerAction.setImageDescriptor(VisualisationPlugin
+				.imageDescriptorFromPlugin(VisualisationPlugin.PLUGIN_ID,
+						"icons/nav_backward.gif"));
+		previousViewerAction.setEnabled(false);
+	}
+
+	/**
+	 * Sets the machine connected to the descriptor. The machine contains a list
+	 * of all elements to visualise.
+	 * @param machine
+	 *            the {@link Machine} machine to set
+	 */
+	public void setMachine(Machine machine) {
+		this.machine = machine;
+		patternStorage = new Hashtable<String, GTPattern>();
+		for (GTPattern pattern : machine.getGtPatternDefinitions()) {
+			patternStorage.put(pattern.getName(), pattern);
+		}
+		machineName = machine.getName();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.eclipse.viatra2.visualisation.IVisualisationDescriptor#
+	 * addMenuContributions(org.eclipse.jface.action.IMenuManager)
+	 */
+	public void addMenuContributions(IMenuManager manager) {
+		providers.fillContextMenu(manager);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.eclipse.viatra2.visualisation.IVisualisationDescriptor#
+	 * addToolbarContributions(org.eclipse.jface.action.IToolBarManager)
+	 */
+	public void addToolbarContributions(IToolBarManager manager) {
+		manager.add(previousViewerAction);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.viatra2.visualisation.IVisualisationDescriptor#clearGraphModel
+	 * ()
+	 */
+	public void clearGraphModel() {
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.viatra2.visualisation.IVisualisationDescriptor#getAdapter
+	 * (java.lang.Class)
+	 */
+	public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+		if (adapter == IPropertySheetPage.class)
+			return new TabbedPropertySheetPage(this);
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.viatra2.visualisation.IVisualisationDescriptor#getViewer()
+	 */
+	public ViatraGraphViewer getViewer() {
+		return gv;
+	}
+
+	private ViatraGraphViewer initializeViewer(Composite parent) {
+		gv = new PatternGraphViewer(parent, SWT.NONE);
+		GridLayoutAlgorithm gridLayout = new GridLayoutAlgorithm(
+				LayoutStyles.NO_LAYOUT_NODE_RESIZING
+						| LayoutStyles.ENFORCE_BOUNDS);
+		layout = new CompositeLayoutAlgorithm(
+				LayoutStyles.NO_LAYOUT_NODE_RESIZING, 
+				new LayoutAlgorithm[] {
+						new GridLayoutAlgorithm(
+								LayoutStyles.NO_LAYOUT_NODE_RESIZING),
+						new HorizontalShift(
+								LayoutStyles.NO_LAYOUT_NODE_RESIZING) });
+		gv.setCompoundLayout(layout);
+		gv.setLayoutAlgorithm(gridLayout);
+		gv.setContentProvider(contentProvider);
+		gv.setLabelProvider(labelProvider);
+		gv.setNodeStyle(ZestStyles.NODES_NO_LAYOUT_RESIZE);
+		gv.setDescriptor(this);
+		//TODO this is needed for findGraphNode to work in doubleclicklistener
+		gv.setUseHashlookup(false);
+		pushItem(machine);
+		return gv;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.viatra2.visualisation.IVisualisationDescriptor#removeSelection
+	 * ()
+	 */
+	public void removeSelection() {
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.services.IDisposable#dispose()
+	 */
+	public void dispose() {
+
+	}
+
+	/**
+	 * Explicitly sets the previousViewerAction item's enabled property. This
+	 * call is required (it is not enough to rely on the isEnabled() method of
+	 * the Action).
+	 */
+	private void setViewerActionEnabled() {
+		if (locationStack.size() > 1) {
+			previousViewerAction.setEnabled(true);
+		} else {
+			previousViewerAction.setEnabled(false);
+		}
+	}
+
+	/**
+	 * Increases the location stack of the descriptor by adding a new item to it
+	 * and updates the graph viewer to represent this new location. The new item
+	 * can be an item already present in the stack.
+	 * @param location
+	 *            the new location item
+	 */
+	public void pushItem(Object location) {
+		if (locationStack.isEmpty()
+				|| !locationStack.get(locationID - 1).getInputElement().equals(
+						location)) {
+			LocationElement element = new LocationElement();
+			element.setInputElement(location);
+			locationStack.add(locationID, element);
+			locationID++;
+		}
+		gv.setInput(location);
+		gv.refresh();
+		if (location instanceof Machine) {
+			list.setText(((Machine) location).getName());
+		} else if (location instanceof GTPattern) {
+			list.setText(((GTPattern) location).getName());
+		}
+		setViewerActionEnabled();
+	}
+
+	/**
+	 * Selects the top location from the location stack and removes it. It also
+	 * updates the graph viewer to represent the selected location.
+	 */
+	public void popItem() {
+		locationID--;
+		LocationElement element = locationStack.get(locationID);
+		Object location = element.getInputElement();
+		locationStack.remove(locationID);
+		gv.setInput(location);
+		gv.refresh();
+		if (location instanceof Machine) {
+			list.setText(((Machine) location).getName());
+		} else if (location instanceof GTPattern) {
+			list.setText(((GTPattern) location).getName());
+		}
+		setViewerActionEnabled();
+	}
+
+	public String getContributorId() {
+		return ViatraVisualisationView.viewId;
+	}
+
+	public void createFormContributions(Composite parent) {
+		FormToolkit toolkit = new FormToolkit(parent.getDisplay());
+		ScrolledForm form = toolkit.createScrolledForm(parent);
+		createHeaderRegion(form, toolkit);
+		FillLayout layout = new FillLayout();
+		layout.marginHeight = 10;
+		layout.marginWidth = 4;
+		form.getBody().setLayout(layout);
+		Section section = toolkit.createSection(form.getBody(),
+				Section.NO_TITLE);
+		initializeViewer(section);
+		section.setClient(gv.getGraphControl());
+	}
+
+	private void createHeaderRegion(ScrolledForm form, FormToolkit toolkit) {
+		form.setText(machineName);
+
+		Composite header = new Composite(form.getForm().getHead(), SWT.NONE);
+		GridLayout glayout = new GridLayout();
+		glayout.marginWidth = glayout.marginHeight = 0;
+		glayout.numColumns = 2;
+		header.setLayout(glayout);
+		header.setBackgroundMode(SWT.INHERIT_DEFAULT);
+		form.setHeadClient(header);
+
+		Label label = new Label(header, SWT.NONE);
+		label.setText("Element to visualise");
+		list = new Combo(header, SWT.DROP_DOWN | SWT.READ_ONLY);
+		toolkit.adapt(list);
+		list.add(machineName);
+		for (GTPattern pattern : patternStorage.values()) {
+			list.add(pattern.getName());
+		}
+		list.setText(machineName);
+		list.addSelectionListener(new SelectionAdapter() {
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see
+			 * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse
+			 * .swt.events.SelectionEvent)
+			 */
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				String text = list.getText();
+				if (text == null) return;
+				if (text.equals(machineName)) {
+					if (!gv.getInput().equals(machine)) {
+						pushItem(machine);
+					}
+					return;
+				}
+				if (patternStorage.containsKey(text)) {
+					GTPattern pattern = patternStorage.get(text);
+					if (!gv.getInput().equals(pattern)) {
+						pushItem(pattern);
+					}
+					return;
+				}
+			}
+
+		});
+		GridData data = new GridData();
+		data.widthHint = 200;
+		list.setLayoutData(data);
+		toolkit.adapt(header);
+		toolkit.decorateFormHeading(form.getForm());
+	}
+	
+	public void setLayoutAlgorithm(IViatraLayoutAlgorithm algorithm) {
+		for (ViewerFilter filter : filters) {
+			gv.removeFilter(filter);
+		}
+		gv.setCompoundLayout(algorithm.getAlgorithm());
+//		filters = algorithm.getFilters();
+		for (ViewerFilter filter : filters) {
+			gv.addFilter(filter);
+		}
+		gv.applyLayout();
+	}
+
+	public void setVisualisationPreset(VisualisationPreset vp) {
+		for (ViewerFilter filter : filters) {
+			gv.removeFilter(filter);
+		}
+		gv.setCompoundLayout(vp.layout.element.getAlgorithm());
+		filters.clear();
+		for (NamedElement<ViewerFilter> _filter : vp.filters.filters) {
+			gv.addFilter(_filter.element);
+			filters.add(_filter.element);
+		}
+	//	gv.setLabelProvider(vp.labelprovider.element);
+		gv.applyLayout();
+		gv.refresh();
+	}
+
+	public void setLabelProvider(ViatraColoredLabelProvider provider) {
+		setLabelProvider(provider, true);
+	}
+
+	public void setLabelProvider(ViatraColoredLabelProvider provider, boolean doRefresh) {
+		// FIXME Istvan: ignore this call for now,
+		// in order to avoid using incompatible label providers for pattern graph visualization
+		//gv.setLabelProvider(provider);
+		//gv.refresh();
+	}
+
+	public void setFilterConfiguration(FilterConfiguration fc) {
+		setFilterConfiguration(fc, true);
+	}
+
+	public void setFilterConfiguration(FilterConfiguration fc, boolean doRefresh) {
+		for (ViewerFilter filter : filters) {
+			gv.removeFilter(filter);
+		}
+		filters.clear();
+		for (NamedElement<ViewerFilter> _filter : fc.filters) {
+			gv.addFilter(_filter.element);
+			filters.add(_filter.element); 
+		}
+		gv.refresh();
+		
+	}
+
+	@Override
+	public void refreshGraph() {
+		gv.refresh();
+	}
+
+	@Override
+	public void redrawGraph() {
+		gv.applyLayout();
+	}
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/PatternGraphViewer.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/PatternGraphViewer.java
new file mode 100644
index 0000000..7fcb51a
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/PatternGraphViewer.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.patterns;
+
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.viatra2.visualisation.ViatraGraphViewer;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.ViewPattern;
+import org.eclipse.zest.core.viewers.GraphViewer;
+import org.eclipse.zest.core.widgets.Graph;
+import org.eclipse.zest.core.widgets.GraphContainer;
+import org.eclipse.zest.core.widgets.GraphItem;
+import org.eclipse.zest.core.widgets.GraphNode;
+import org.eclipse.zest.layouts.LayoutAlgorithm;
+
+/**
+ * A Graph Viewer component for Pattern Graph Visualisation. In order to operate
+ * with container nodes it is possible to set the layout of subgraphs inside
+ * compound elements using the setCompoundLayout() method.
+ * @author Zoltan Ujhelyi
+ */
+public class PatternGraphViewer extends ViatraGraphViewer {
+
+	LayoutAlgorithm compoundLayout;
+
+	/**
+	 * Sets the layout algorithm to use inside of container nodes.
+	 * @param compoundLayout
+	 *            the compoundLayout to set
+	 */
+	public void setCompoundLayout(LayoutAlgorithm compoundLayout) {
+		this.compoundLayout = compoundLayout;
+	}
+
+	/**
+	 * Initializes the pattern graph viewer
+	 * @param composite
+	 *            an SWT composite to store the created graph viewer
+	 * @param style
+	 *            an SWT style mask
+	 */
+	public PatternGraphViewer(Composite composite, int style) {
+		super(composite, style);
+		// double click on nodes
+		final Graph g = getGraphControl();
+		final GraphViewer gv = this;
+		g.addMouseListener(new MouseAdapter() {
+
+			@Override
+			public void mouseDoubleClick(MouseEvent e) {
+				// Get the figure at the current mouse location
+				Object o = g.getFigureAt(e.x, e.y);
+				if (o != null) {
+
+					for (Object selected : ((StructuredSelection) gv
+							.getSelection()).toList()) {
+						GraphItem foundItem = gv.findGraphItem(selected);
+						if (foundItem instanceof GraphNode
+								&& ((GraphNode) foundItem).getNodeFigure()
+										.equals(o)) {
+							nodeDoubleClicked(selected);
+						}
+					}
+
+				}
+			}
+
+		});
+	}
+
+	/**
+	 * Event handler for a node double click
+	 * @param o
+	 *            the model object represented by the node double clicked
+	 */
+	private void nodeDoubleClicked(Object o) {
+		if (o instanceof ViewPattern) {
+			((PatternGraphDescriptor) descriptor).pushItem(((ViewPattern)o).getPattern());
+		}
+	}
+
+	@Override
+	public void refresh() {
+		super.refresh();
+		if (compoundLayout == null) return;
+		for (Object _node : getGraphControl().getNodes()) {
+			GraphNode node = (GraphNode) _node;
+			if (node instanceof GraphContainer) {
+				GraphContainer graphContainer = (GraphContainer) node;
+				graphContainer.setSize(-1, -1);
+				graphContainer.setLayoutAlgorithm(compoundLayout, true);
+			}
+		}
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/actions/PatternProviderGroup.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/actions/PatternProviderGroup.java
new file mode 100644
index 0000000..e4bfa0a
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/actions/PatternProviderGroup.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.patterns.actions;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.ui.actions.ActionGroup;
+import org.eclipse.viatra2.visualisation.common.action.SelectProviderAction;
+import org.eclipse.viatra2.visualisation.patterns.sources.PatternContentProvider;
+import org.eclipse.viatra2.visualisation.patterns.sources.PatternFullProvider;
+import org.eclipse.viatra2.visualisation.patterns.sources.PatternReducedProvider;
+
+/**
+ * A group of content providers for the model space visualisation. The group
+ * manages the list of providers and their graphical display.
+ * @author Zoltan Ujhelyi
+ */
+public class PatternProviderGroup extends ActionGroup {
+
+	PatternReducedProvider reducedProvider = new PatternReducedProvider();
+	PatternFullProvider fullProvider = new PatternFullProvider();
+	List<? extends PatternContentProvider> providers = Arrays.asList(reducedProvider, fullProvider);
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.actions.ActionGroup#fillContextMenu(org.eclipse.jface.
+	 * action.IMenuManager)
+	 */
+	@Override
+	public void fillContextMenu(IMenuManager manager) {
+		IMenuManager menu = new MenuManager("Display Relations");
+		manager.add(menu);
+		SelectProviderAction reducedAction = new SelectProviderAction(
+				"As Arcs", reducedProvider);
+		menu.add(reducedAction);
+		SelectProviderAction fullAction = new SelectProviderAction(
+				"As Nodes", fullProvider);
+		fullAction.setChecked(true);
+		menu.add(fullAction);
+	}
+
+	/**
+	 * Returns the list of content providers managed by the group.
+	 * @return the providers
+	 */
+	public List<? extends PatternContentProvider> getProviders() {
+		return providers;
+	}
+	
+	/**
+	 * Returns the default content provider from the group.
+	 * @return the default content provider
+	 */
+	public PatternContentProvider getDefaultProvider() {
+		return reducedProvider;
+	}
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/actions/VisualisePatternGraphAction.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/actions/VisualisePatternGraphAction.java
new file mode 100644
index 0000000..e4c9a3f
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/actions/VisualisePatternGraphAction.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.patterns.actions;
+
+import org.eclipse.viatra2.frameworkgui.actions.AbstractFrameworkGUIAction;
+import org.eclipse.viatra2.frameworkgui.content.transformation.TransformationContent.MachineDummy;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.visualisation.IVisualisationDescriptor;
+import org.eclipse.viatra2.visualisation.patterns.PatternGraphDescriptor;
+import org.eclipse.viatra2.visualisation.view.ViatraVisualisationView;
+
+/**
+ * This action is used to display a pattern graph in the graph viewer
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class VisualisePatternGraphAction extends AbstractFrameworkGUIAction {
+
+	/**
+	 * Initializes a pattern graph visualisation action.
+	 */
+	public VisualisePatternGraphAction() {
+		setText("Visualise Pattern Graph");
+		setToolTipText("Displays patterns from this machine visually.");
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.viatra2.frameworkgui.actions.AbstractFrameworkGUIAction#isEnabled()
+	 */
+	@Override
+	public boolean isEnabled() {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	@Override
+	public void run() {
+		super.run();
+		refreshSelection();
+		Object c = getFirstSelected();
+		if (c instanceof MachineDummy) {
+			Machine machine = ((MachineDummy) c).getMachine();
+			ViatraVisualisationView view = ViatraVisualisationView.openView();
+			IVisualisationDescriptor newDescriptor = view.getDescriptor(machine);
+			PatternGraphDescriptor descriptor;
+			if (newDescriptor == null || !(newDescriptor instanceof PatternGraphDescriptor)) {
+				descriptor = new PatternGraphDescriptor();
+				descriptor.setMachine(machine);
+			} else {
+				descriptor = (PatternGraphDescriptor) newDescriptor;
+			}
+			view.setDescriptor(machine, descriptor);
+		}
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/properties/NamePropertySection.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/properties/NamePropertySection.java
new file mode 100644
index 0000000..eb5f0bc
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/properties/NamePropertySection.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.patterns.properties;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.forms.widgets.ColumnLayout;
+import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.AbstractViewModelElement;
+
+/**
+ * A Property Page Section capable of describing the identification parameters
+ * (most typically name) of the visualised elements.
+ * @author Zoltan Ujhelyi
+ */
+public class NamePropertySection extends AbstractPropertySection {
+	private Text name, fqName;
+
+	// private Label parametersLabel;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls
+	 * (org.eclipse.swt.widgets.Composite,
+	 * org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+	 */
+	@Override
+	public void createControls(Composite parent,
+			TabbedPropertySheetPage aTabbedPropertySheetPage) {
+		super.createControls(parent, aTabbedPropertySheetPage);
+		parent.setLayout(new ColumnLayout());
+		Composite nameComposite = getWidgetFactory().createFlatFormComposite(
+				parent);
+		FormData data;
+		name = getWidgetFactory().createText(nameComposite, "");
+		name.setEditable(false);
+		data = new FormData();
+		data.left = new FormAttachment(0, STANDARD_LABEL_WIDTH);
+		data.right = new FormAttachment(100, 0);
+		data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
+		name.setLayoutData(data);
+		CLabel label = getWidgetFactory().createCLabel(nameComposite,
+				"Name:");
+		data = new FormData();
+		data.left = new FormAttachment(0, 0);
+		data.right = new FormAttachment(name, -ITabbedPropertyConstants.HSPACE);
+		data.top = new FormAttachment(name, 0, SWT.CENTER);
+		label.setLayoutData(data);
+		
+		fqName = getWidgetFactory().createText(nameComposite, "");
+		data = new FormData();
+		data.left = new FormAttachment(0, STANDARD_LABEL_WIDTH);
+		data.right = new FormAttachment(100, 0);
+		data.top = new FormAttachment(name, ITabbedPropertyConstants.VMARGIN, ITabbedPropertyConstants.VSPACE);
+		fqName.setLayoutData(data);
+		label = getWidgetFactory().createCLabel(nameComposite,
+		"FQ Name:");
+		data = new FormData();
+		data.left = new FormAttachment(0, 0);
+		data.right = new FormAttachment(fqName, -ITabbedPropertyConstants.HSPACE);
+		data.top = new FormAttachment(fqName, 0, SWT.CENTER);
+		label.setLayoutData(data);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput
+	 * (org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+	 */
+	@Override
+	public void setInput(IWorkbenchPart part, ISelection selection) {
+		super.setInput(part, selection);
+		Assert.isTrue(selection instanceof IStructuredSelection);
+		Object input = ((IStructuredSelection) selection).getFirstElement();
+		Assert.isTrue(input instanceof AbstractViewModelElement);
+		AbstractViewModelElement element = (AbstractViewModelElement) input;
+		name.setText(element.getName());
+		fqName.setText(element.getFQName());
+
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/properties/ParametersPropertySection.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/properties/ParametersPropertySection.java
new file mode 100644
index 0000000..55a6f6d
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/properties/ParametersPropertySection.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.patterns.properties;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.ViewPattern;
+
+/**
+ * A Property Page Section describing the list of potential parameters of a
+ * visualised call.
+ * @author Zoltan Ujhelyi
+ */
+public class ParametersPropertySection extends AbstractPropertySection {
+	// private List parameterList;
+	private TableViewer parameterList;
+	IStructuredContentProvider contentProvider = new IStructuredContentProvider() {
+
+		GTPattern input;
+
+		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+			input = (GTPattern) newInput;
+
+		}
+
+		public void dispose() {
+		}
+
+		public Object[] getElements(Object inputElement) {
+			return input.getSymParameters().toArray();
+		}
+	};
+	ILabelProvider labelProvider = new ILabelProvider() {
+
+		public void removeListener(ILabelProviderListener listener) {
+		}
+
+		public boolean isLabelProperty(Object element, String property) {
+			return false;
+		}
+
+		public void dispose() {
+		}
+
+		public void addListener(ILabelProviderListener listener) {
+		}
+
+		public String getText(Object element) {
+			if (element instanceof PatternVariable)
+				return ((PatternVariable) element).getName();
+			return null;
+		}
+
+		public Image getImage(Object element) {
+			return null;
+		}
+	};
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls
+	 * (org.eclipse.swt.widgets.Composite,
+	 * org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+	 */
+	@Override
+	public void createControls(Composite parent,
+			TabbedPropertySheetPage aTabbedPropertySheetPage) {
+		super.createControls(parent, aTabbedPropertySheetPage);
+		Composite composite = getWidgetFactory()
+				.createFlatFormComposite(parent);
+		composite.setLayout(new RowLayout());
+		getWidgetFactory().createCLabel(composite, "Parameters:");
+		Table t = getWidgetFactory().createTable(composite, SWT.NONE);
+		// TODO more dynamic sizing of the table needed
+		t.setSize(400, 300);
+		parameterList = new TableViewer(t);
+		parameterList.setContentProvider(contentProvider);
+		parameterList.setLabelProvider(labelProvider);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput
+	 * (org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+	 */
+	@Override
+	public void setInput(IWorkbenchPart part, ISelection selection) {
+		super.setInput(part, selection);
+		Object input = ((IStructuredSelection) selection).getFirstElement();
+		GTPattern pattern = ((ViewPattern) input).getPattern();
+		parameterList.setInput(pattern);
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/properties/TypePropertySection.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/properties/TypePropertySection.java
new file mode 100644
index 0000000..54dd4ca
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/properties/TypePropertySection.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.patterns.properties;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.forms.widgets.ColumnLayout;
+import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.AbstractViewModelElement;
+
+/**
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class TypePropertySection extends AbstractPropertySection {
+	
+	AbstractViewModelElement element;
+	Text type;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+	 */
+	@Override
+	public void createControls(Composite parent,
+			TabbedPropertySheetPage aTabbedPropertySheetPage) {
+		super.createControls(parent, aTabbedPropertySheetPage);
+		super.createControls(parent, aTabbedPropertySheetPage);
+		parent.setLayout(new ColumnLayout());
+		Composite nameComposite = getWidgetFactory().createFlatFormComposite(
+				parent);
+		FormData data;
+		type = getWidgetFactory().createText(nameComposite, "");
+		type.setEditable(false);
+		data = new FormData();
+		data.left = new FormAttachment(0, STANDARD_LABEL_WIDTH);
+		data.right = new FormAttachment(100, 0);
+		data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
+		type.setLayoutData(data);
+		CLabel label = getWidgetFactory().createCLabel(nameComposite,
+				"Graph Element Type:");
+		data = new FormData();
+		data.left = new FormAttachment(0, 0);
+		data.right = new FormAttachment(type, -ITabbedPropertyConstants.HSPACE);
+		data.top = new FormAttachment(type, 0, SWT.CENTER);
+		label.setLayoutData(data);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+	 */
+	@Override
+	public void refresh() {
+		super.refresh();
+		type.setText(element.getTypeString());
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+	 */
+	@Override
+	public void setInput(IWorkbenchPart part, ISelection selection) {
+		super.setInput(part, selection);
+		Object input = ((IStructuredSelection) selection).getFirstElement();
+		element = (AbstractViewModelElement) input;
+	}
+ 
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/sources/PatternContentProvider.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/sources/PatternContentProvider.java
new file mode 100644
index 0000000..88b43a7
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/sources/PatternContentProvider.java
@@ -0,0 +1,181 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.patterns.sources;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.definitions.Machine;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.GTPatternCall;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.PatternVariable;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.AbstractViewModelElement;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.PatternTypes;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.ViewParameterAssignment;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.ViewPattern;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.ViewPatternBody;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.ViewPatternModelElement;
+import org.eclipse.zest.core.viewers.IGraphEntityRelationshipContentProvider;
+import org.eclipse.zest.core.viewers.INestedContentProvider;
+
+/**
+ * Content provider for pattern visualisation.
+ * @author Zoltan Ujhelyi
+ */
+public abstract class PatternContentProvider implements
+		IGraphEntityRelationshipContentProvider, INestedContentProvider {
+
+	Machine machine;
+	GTPattern pattern;
+	protected Hashtable<String, ViewPatternModelElement> viewItems = new Hashtable<String, ViewPatternModelElement>();
+
+	List<ViewParameterAssignment> loadPatternParameters(ViewPattern pattern,
+			ViewPatternModelElement element) {
+		ArrayList<ViewParameterAssignment> relations = new ArrayList<ViewParameterAssignment>();
+		for (String result : pattern.getParametersName(element)) {
+			ViewParameterAssignment assignment = new ViewParameterAssignment();
+			assignment.setParamName(result);
+			assignment.setParameter(element);
+			assignment.setPattern(pattern);
+			relations.add(assignment);
+		}
+		return relations;
+	}
+
+	List<AbstractViewModelElement> loadRelationsBetween(
+			ViewPatternModelElement element1, ViewPatternModelElement element2) {
+		ArrayList<AbstractViewModelElement> relations = new ArrayList<AbstractViewModelElement>();
+		Entity entity1 = (Entity) element1.getModelElement();
+		Entity entity2 = (Entity) element2.getModelElement();
+
+		for (Relation relation : entity1.getRelationsFrom()) {
+			if (relation.getTo().equals(entity2)) {
+				ViewPatternModelElement viewRelation = new ViewPatternModelElement();
+				viewRelation.setModelElement(relation);
+				relations.add(viewRelation);
+			}
+
+		}
+		return relations;
+	}
+
+	public Object[] getElements(Object inputElement) {
+		if (machine != null && pattern == null) {
+			// Building pattern list
+			ArrayList<ViewPattern> patternList = new ArrayList<ViewPattern>();
+			for (GTPattern pattern : machine.getGtPatternDefinitions()) {
+				patternList.add(new ViewPattern(pattern,
+						PatternTypes.CALLEDPATTERN));
+			}
+			return patternList.toArray();
+		} else if (pattern != null) {
+			// Building pattern bodies
+			ArrayList<Object> elements = new ArrayList<Object>();
+			int id = 1;
+			for (GTPatternBody body : pattern.getPatternBodies()) {
+				fillBody(body, id, elements);
+				id++;
+			}
+			return elements.toArray();
+		} else
+			return null;
+	}
+
+	private void fillBody(GTPatternBody body, int id, List<Object> elements) {
+		// viewItems = new Hashtable<String, ViewPatternModelElement>();
+		ViewPatternBody viewModel = new ViewPatternBody();
+		viewModel.setBody(body);
+		viewModel.setId(id);
+		elements.add(viewModel);
+		fillPatternGraph(body.getPatternGraph(), viewModel, elements);
+		fillPatternCalls(viewModel, body.getCalledPatterns(), elements,
+				PatternTypes.CALLEDPATTERN);
+		fillPatterns(viewModel, body.getGtPatternDefinitions(), elements,
+				PatternTypes.LOCALPATTERN);
+		fillPatternCalls(viewModel, body.getNegativePatterns(), elements,
+				PatternTypes.NEGATIVEPATTERN);
+	}
+
+	abstract void fillPatternGraph(Entity patternGraph, ViewPatternBody body,
+			List<Object> elements);
+
+	void fillPatternCalls(ViewPatternBody body,
+			EList<GTPatternCall> patternCalls, List<Object> elements,
+			PatternTypes type) {
+		for (GTPatternCall call : patternCalls) {
+			fillPattern(body, elements, type, call.getCalledPattern());
+		}
+	}
+
+	void fillPatterns(ViewPatternBody body, EList<GTPattern> patterns,
+			List<Object> elements, PatternTypes type) {
+		for (GTPattern pattern : patterns) {
+			fillPattern(body, elements, type, pattern);
+		}
+	}
+
+	/**
+	 * @param body
+	 * @param elements
+	 * @param type
+	 * @param pattern
+	 */
+	private void fillPattern(ViewPatternBody body, List<Object> elements,
+			PatternTypes type, GTPattern pattern) {
+		ViewPattern viewPattern = new ViewPattern(pattern, type);
+		// Adding parameters
+		for (PatternVariable symParam : pattern.getSymParameters()) {
+			EList<ModelElement> patternElements = symParam
+					.getElementInPattern();
+			if (!patternElements.isEmpty()) { //If pattern graph is filled
+				ViewPatternModelElement viewElement = viewItems
+						.get((patternElements.get(0)).getName());
+				if (viewElement != null) {
+					viewPattern.addParameter(symParam.getName(), viewElement);
+				}
+			}
+		}
+		body.addCalledPattern(viewPattern);
+		elements.add(viewPattern);
+	}
+
+	public void dispose() {
+	}
+
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+		if (newInput instanceof Machine) {
+			this.machine = (Machine) newInput;
+			this.pattern = null;
+		} else if (newInput instanceof GTPattern) {
+			this.pattern = (GTPattern) newInput;
+		}
+
+	}
+
+	public Object[] getChildren(Object arg) {
+		if (arg instanceof ViewPatternBody) {
+			return ((ViewPatternBody) arg).getChildren();
+		}
+		return null;
+	}
+
+	public boolean hasChildren(Object arg) {
+		return arg instanceof ViewPatternBody;
+	}
+
+}
\ No newline at end of file
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/sources/PatternFullProvider.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/sources/PatternFullProvider.java
new file mode 100644
index 0000000..08341d3
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/sources/PatternFullProvider.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.patterns.sources;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.AbstractViewModelElement;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.PatternGraphArc;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.ViewPattern;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.ViewPatternBody;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.ViewPatternModelElement;
+
+/**
+ * A content provider for Pattern Graph visualisation. It displays relations as
+ * nodes, thus capable of displaying relations of relations as well, but the
+ * resulting graph size could be large.
+ * @author Zoltan Ujhelyi
+ */
+public class PatternFullProvider extends PatternContentProvider {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.viatra2.visualisation.patterns.sources.PatternContentProvider
+	 * #fillPatternGraph(org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity,
+	 * org.eclipse.viatra2.visualisation.patterns.viewmodel.ViewPatternBody,
+	 * java.util.List)
+	 */
+	@Override
+	void fillPatternGraph(Entity patternGraph, ViewPatternBody body,
+			List<Object> elements) {
+		for (Entity entity : patternGraph.getComponents()) {
+			ViewPatternModelElement element = new ViewPatternModelElement();
+			element.setModelElement(entity);
+			element.setBody(body);
+			elements.add(element);
+			body.addEntity(element);
+			viewItems.put(entity.getName(), element);
+			for (Relation relation : entity.getRelationsFrom()) {
+				ViewPatternModelElement relationElement = new ViewPatternModelElement();
+				relationElement.setModelElement(relation);
+				relationElement.setBody(body);
+				elements.add(relationElement);
+				body.addEntity(relationElement);
+				viewItems.put(relation.getName(), relationElement);
+			}
+		}
+		System.out.println();
+	}
+
+	public Object[] getRelationships(Object source, Object dest) {
+		ArrayList<AbstractViewModelElement> arcs = new ArrayList<AbstractViewModelElement>();
+		if (source instanceof ViewPatternModelElement
+				&& dest instanceof ViewPatternModelElement) {
+			ViewPatternModelElement src = (ViewPatternModelElement) source;
+			ViewPatternModelElement dst = (ViewPatternModelElement) dest;
+			if (src.isEntity() && dst.isRelation()) {
+				if (src.getNumberOfRelationsFrom(dst) > 0) {
+					PatternGraphArc arc = new PatternGraphArc(src, dst);
+					arcs.add(arc);
+				}
+			} else if (src.isRelation() && dst.isEntity()) {
+				if (dst.getNumberOfRelationsTo(src) > 0) {
+					PatternGraphArc arc = new PatternGraphArc(src, dst);
+					arcs.add(arc);
+				}
+			}
+		} else if (source instanceof ViewPatternModelElement
+				&& dest instanceof ViewPattern) {
+			arcs.addAll(loadPatternParameters((ViewPattern) dest,
+					(ViewPatternModelElement) source));
+
+		}
+		return arcs.toArray();
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/sources/PatternLabelProvider.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/sources/PatternLabelProvider.java
new file mode 100644
index 0000000..153f751
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/sources/PatternLabelProvider.java
@@ -0,0 +1,194 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.patterns.sources;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.TypeOf;
+import org.eclipse.viatra2.visualisation.ViatraColoredLabelProvider;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.AbstractViewModelElement;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.ViewParameterAssignment;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.ViewPattern;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.ViewPatternModelElement;
+import org.eclipse.zest.core.viewers.IConnectionStyleProvider;
+import org.eclipse.zest.core.viewers.IEntityStyleProvider;
+import org.eclipse.zest.core.viewers.IFigureProvider;
+import org.eclipse.zest.core.widgets.ZestStyles;
+
+/**
+ * A Label Provider for the Pattern Visualisation. It uses the color scheme
+ * defined in the color registry.
+ * @author Zoltan Ujhelyi
+ */
+public class PatternLabelProvider extends ViatraColoredLabelProvider implements
+		IConnectionStyleProvider, IFigureProvider, IEntityStyleProvider {
+
+	
+	private String getTypeString(ModelElement element){
+		for (Relationship rel : element.getSuperRelationships()) {
+			if (rel instanceof TypeOf) {
+				return rel.getSupplierStr();
+			}
+		}
+		return "";
+	}
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+	 */
+	@Override
+	public String getText(Object element) {
+		if (element instanceof GTPattern) {
+			return null;// "<<Pattern>>\n" + ((GTPattern) element).getName();
+		} else if (element instanceof Relation) {
+			Relation relation = (Relation) element;
+			//return relation.getName();
+			
+			return relation.getName() + ":" + getTypeString(relation);//relation.getType().toString();
+			
+		} else if (element instanceof AbstractViewModelElement) {
+			String prefix = "";
+			if (element instanceof ViewPattern) {
+				prefix = "<<Pattern>>\n";
+				// return null;
+			}
+			return prefix + ((AbstractViewModelElement) element).getName() + ":" + ((AbstractViewModelElement) element).getTypeString();
+		}
+		return super.getText(element);
+	}
+
+	public Color getColor(Object rel) {
+		if (rel instanceof ViewParameterAssignment) {
+			return PARAM;
+		} else {
+			return ARC;
+		}
+	}
+
+	public int getConnectionStyle(Object rel) {
+		if (rel instanceof ViewParameterAssignment) {
+			return ZestStyles.CONNECTIONS_DASH_DOT
+					| ZestStyles.CONNECTIONS_DIRECTED;
+		}
+		return ZestStyles.CONNECTIONS_SOLID | ZestStyles.CONNECTIONS_DIRECTED;
+	}
+
+	public Color getHighlightColor(Object rel) {
+		if (rel instanceof ViewParameterAssignment) {
+			return PARAM_HL;
+		} else {
+			return ARC_HL;
+		}
+	}
+
+	public int getLineWidth(Object rel) {
+		return 1;
+	}
+
+	public IFigure getTooltip(Object entity) {
+		return null;
+	}
+
+	public IFigure getFigure(Object element) {
+		// TODO it is not called until the fix of bug #282728 is not present in
+		// Zest
+		// it is already available in CVS
+		/*
+		 * if (element instanceof ViewPattern) { RectangleFigure rec = new
+		 * RectangleFigure(); rec.setSize(100, 100); return rec; }
+		 */
+		return null;
+	}
+
+	public boolean fisheyeNode(Object entity) {
+		return false;
+	}
+
+	public Color getBackgroundColour(Object entity) {
+		if (entity instanceof ViewPatternModelElement) {
+			ViewPatternModelElement modelElement = (ViewPatternModelElement) entity;
+			if (modelElement.isEntity()) {
+				return ENTITY_BG;
+			} else if (modelElement.isRelation()) {
+				return RELATION_BG;
+			}
+		} else if (entity instanceof ViewPattern) {
+			return PATTERN_BG;
+		}
+		return null;
+	}
+
+	public Color getBorderColor(Object entity) {
+		if (entity instanceof ViewPatternModelElement) {
+			ViewPatternModelElement modelElement = (ViewPatternModelElement) entity;
+			if (modelElement.isEntity()) {
+				return ENTITY_BO;
+			} else if (modelElement.isRelation()) {
+				return RELATION_BO;
+			}
+		} else if (entity instanceof ViewPattern) {
+			return PATTERN_BO;
+		}
+		return null;
+	}
+
+	public Color getBorderHighlightColor(Object entity) {
+		if (entity instanceof ViewPatternModelElement) {
+			ViewPatternModelElement modelElement = (ViewPatternModelElement) entity;
+			if (modelElement.isEntity()) {
+				return ENTITY_BOHL;
+			} else if (modelElement.isRelation()) {
+				return RELATION_BOHL;
+			}
+		} else if (entity instanceof ViewPattern) {
+			return PATTERN_BOHL;
+		}
+		return null;
+	}
+
+	public int getBorderWidth(Object entity) {
+		return 1;
+	}
+
+	public Color getForegroundColour(Object entity) {
+		if (entity instanceof ViewPatternModelElement) {
+			ViewPatternModelElement modelElement = (ViewPatternModelElement) entity;
+			if (modelElement.isEntity()) {
+				return ENTITY_FG;
+			} else if (modelElement.isRelation()) {
+				return RELATION_FG;
+			}
+		} else if (entity instanceof ViewPattern) {
+			return PATTERN_FG;
+		}
+		return null;
+	}
+
+	public Color getNodeHighlightColor(Object entity) {
+		if (entity instanceof ViewPatternModelElement) {
+			ViewPatternModelElement modelElement = (ViewPatternModelElement) entity;
+			if (modelElement.isEntity()) {
+				return ENTITY_HL;
+			} else if (modelElement.isRelation()) {
+				return RELATION_HL;
+			}
+		} else if (entity instanceof ViewPattern) {
+			return PATTERN_HL;
+		}
+		return null;
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/sources/PatternReducedProvider.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/sources/PatternReducedProvider.java
new file mode 100644
index 0000000..0fc288f
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/sources/PatternReducedProvider.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.patterns.sources;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.AbstractViewModelElement;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.ViewPattern;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.ViewPatternBody;
+import org.eclipse.viatra2.visualisation.patterns.viewmodel.ViewPatternModelElement;
+
+/**
+ * A content provider for creating a reduced graph. The reduced graph displays
+ * relations as arcs. This way the resulting graphs are smaller, but it cannot
+ * display relations of relations.
+ * @author Zoltan Ujhelyi
+ */
+public class PatternReducedProvider extends PatternContentProvider {
+
+	public Object[] getRelationships(Object arg0, Object arg1) {
+		ArrayList<AbstractViewModelElement> relations = new ArrayList<AbstractViewModelElement>();
+		if (machine != null && pattern != null) {
+			if (arg0 instanceof ViewPatternModelElement
+					&& arg1 instanceof ViewPatternModelElement) {
+				ViewPatternModelElement element1 = (ViewPatternModelElement) arg0;
+				ViewPatternModelElement element2 = (ViewPatternModelElement) arg1;
+				if (element1.getBody().equals(element2.getBody())) {
+					relations.addAll(loadRelationsBetween(element1, element2));
+				}
+			}
+			if (arg0 instanceof ViewPatternModelElement
+					&& arg1 instanceof ViewPattern) {
+				relations.addAll(loadPatternParameters((ViewPattern) arg1,
+						(ViewPatternModelElement) arg0));
+
+			}
+		}
+		return relations.toArray();
+	}
+
+	void fillPatternGraph(Entity patternGraph, ViewPatternBody body,
+			List<Object> elements) {
+
+		for (Entity element : patternGraph.getComponents()) {
+			ViewPatternModelElement entity = new ViewPatternModelElement();
+			entity.setModelElement(element);
+			entity.setBody(body);
+			elements.add(entity);
+			body.addEntity(entity);
+			viewItems.put(element.getName(), entity);
+		}
+	}
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/AbstractViewModelElement.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/AbstractViewModelElement.java
new file mode 100644
index 0000000..8222406
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/AbstractViewModelElement.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.patterns.viewmodel;
+
+/**
+ * Represent the parent of all view model items.
+ * @author Zoltan Ujhelyi
+ *
+ */
+public abstract class AbstractViewModelElement {
+	
+	/**
+	 * Returns the name of the view model element
+	 * @return the name
+	 */
+	public abstract String getName();
+	/**
+	 * Returns the fully qualified name of the view model element
+	 * @return the fully qualified name
+	 */
+	public String getFQName() {
+		return getName();
+	}
+	/**
+	 * Returns the type of the view model element
+	 * @return a string describing the type of the view model element  
+	 */
+	public abstract String getTypeString();
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/PatternGraphArc.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/PatternGraphArc.java
new file mode 100644
index 0000000..8c48008
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/PatternGraphArc.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.patterns.viewmodel;
+
+/**
+ * Describes a graph arc between two model elements. These arcs are only used
+ * when relations are described as nodes.
+ * @author Zoltan Ujhelyi
+ */
+public class PatternGraphArc extends AbstractViewModelElement {
+
+	ViewPatternModelElement source, destination;
+
+	/**
+	 * Initializes a pattern graph arc
+	 */
+	public PatternGraphArc() {
+
+	}
+
+	/**
+	 * Initializes a pattern graph arc between two pattern model elements.
+	 * @param source
+	 *            the source of the arc
+	 * @param destination
+	 *            the destination of the arc
+	 */
+	public PatternGraphArc(ViewPatternModelElement source,
+			ViewPatternModelElement destination) {
+		this.source = source;
+		this.destination = destination;
+	}
+
+	/**
+	 * @return the source
+	 */
+	public ViewPatternModelElement getSource() {
+		return source;
+	}
+
+	/**
+	 * @param source
+	 *            the source to set
+	 */
+	public void setSource(ViewPatternModelElement source) {
+		this.source = source;
+	}
+
+	/**
+	 * @return the destination
+	 */
+	public ViewPatternModelElement getDestination() {
+		return destination;
+	}
+
+	/**
+	 * @param destination
+	 *            the destination to set
+	 */
+	public void setDestination(ViewPatternModelElement destination) {
+		this.destination = destination;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.viatra2.visualisation.patterns.viewmodel.AbstractViewModelElement
+	 * #getName()
+	 */
+	@Override
+	public String getName() {
+		return "";
+	}
+
+	@Override
+	public String getTypeString() {
+		return "";
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/PatternTypes.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/PatternTypes.java
new file mode 100644
index 0000000..9ea394c
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/PatternTypes.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.patterns.viewmodel;
+
+/**
+ * An enumeration showing the possible types of patterns.
+ * @author Zoltan Ujhelyi
+ *
+ */
+public enum PatternTypes {
+	/**
+	 * Represents a called pattern 
+	 */
+	CALLEDPATTERN,
+	/**
+	 * Represents a called negative pattern 
+	 */
+	NEGATIVEPATTERN,
+	/**
+	 * Represents a local pattern type
+	 */
+	LOCALPATTERN
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/ViewParameterAssignment.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/ViewParameterAssignment.java
new file mode 100644
index 0000000..c3916f1
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/ViewParameterAssignment.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.patterns.viewmodel;
+
+
+/**
+ * Represents a parameter assignment in the view model.
+ * @author Zoltan Ujhelyi
+ *
+ */
+public class ViewParameterAssignment extends AbstractViewModelElement{
+
+	ViewPatternModelElement parameter;
+	ViewPattern pattern;
+	String paramName;
+	/**
+	 * @return the paramName
+	 */
+	public String getParamName() {
+		return paramName;
+	}
+	/**
+	 * @param paramName the paramName to set
+	 */
+	public void setParamName(String paramName) {
+		this.paramName = paramName;
+	}
+	/**
+	 * @return the parameter
+	 */
+	public ViewPatternModelElement getParameter() {
+		return parameter;
+	}
+	/**
+	 * @param parameter the parameter to set
+	 */
+	public void setParameter(ViewPatternModelElement parameter) {
+		this.parameter = parameter;
+	}
+	/**
+	 * @return the pattern
+	 */
+	public ViewPattern getPattern() {
+		return pattern;
+	}
+	/**
+	 * @param pattern the pattern to set
+	 */
+	public void setPattern(ViewPattern pattern) {
+		this.pattern = pattern;
+	}
+	@Override
+	public String getName() {
+		return getParamName();
+	}
+	@Override
+	public String getTypeString() {
+		return "Parameter Assignment";
+	}
+	
+	
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/ViewPattern.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/ViewPattern.java
new file mode 100644
index 0000000..c9467dc
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/ViewPattern.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.patterns.viewmodel;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPattern;
+
+/**
+ * A view model element representing a GT Pattern from the model space.
+ * @author Zoltan Ujhelyi
+ */
+public class ViewPattern extends AbstractViewModelElement{
+
+	/**
+	 * @return the pattern
+	 */
+	public GTPattern getPattern() {
+		return pattern;
+	}
+
+	private PatternTypes type;
+	private GTPattern pattern;
+	private ArrayList<ViewPatternBody> bodies = new ArrayList<ViewPatternBody>();
+	private Hashtable<String, ViewPatternModelElement> callParameters = new Hashtable<String, ViewPatternModelElement>();
+	
+	/**
+	 * Initializes a GT Pattern in the view model.
+	 * @param pattern the pattern to initialize.
+	 * @param type the type of pattern to call.
+	 */
+	public ViewPattern(GTPattern pattern, PatternTypes type) {
+		this.type = type;
+		this.pattern = pattern;
+	}
+
+	/**
+	 * Decides whether the pattern represents a positive or a negative pattern
+	 * call.
+	 * @return true if the pattern is a negative call.
+	 */
+	public PatternTypes getType() {
+		return type;
+	}
+	
+	/**
+	 * Adds a pattern body to the view model.
+	 * @param body
+	 */
+	public void addBody(ViewPatternBody body) {
+		if (!bodies.contains(body)) {
+			bodies.add(body);
+		}
+	}
+
+	/**
+	 * Return the bodies of the graph pattern
+	 * @return the bodies
+	 */
+	public ArrayList<ViewPatternBody> getBodies() {
+		return bodies;
+	}
+
+	@Override
+	public String getName() {
+		return pattern.getName();
+	}
+
+	@Override
+	public String getFQName() {
+		return pattern.getFqn();
+	}
+	
+	/**
+	 * Adds a parameter to the pattern with a name
+	 * @param name the symbolic name of the parameter 
+	 * @param parameter the parameter variable
+	 */
+	public void addParameter(String name, ViewPatternModelElement parameter) {
+		callParameters.put(name, parameter);
+	}
+	
+	/**
+	 * Returns the list of symbolic names related to a parameter variable
+	 * @param parameter the parameter variable
+	 * @return the list of symbolic names
+	 */
+	public List<String> getParametersName(ViewPatternModelElement parameter) {
+		ArrayList<String> foundParams = new ArrayList<String>();
+		for (String key : callParameters.keySet()) {
+			if (callParameters.get(key).equals(parameter)) {
+				foundParams.add(key);
+			}
+		}
+		return foundParams;
+	}
+
+	@Override
+	public String getTypeString() {
+		return "Pattern";
+	}
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/ViewPatternBody.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/ViewPatternBody.java
new file mode 100644
index 0000000..defb11f
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/ViewPatternBody.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.patterns.viewmodel;
+
+import java.util.ArrayList;
+
+import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.gt.GTPatternBody;
+
+/**
+ * View model element representing a pattern body. A pattern body consists of a
+ * pattern graph represented by a list of view model elements (instead the root
+ * of the model as in {link {@link GTPatternBody}, and called positive and
+ * negative patterns.
+ * @author Zoltan Ujhelyi
+ */
+public class ViewPatternBody extends AbstractViewModelElement{
+
+	// GTPatternBody body;
+	ArrayList<ViewPattern> calledPatterns = new ArrayList<ViewPattern>();
+	ArrayList<ViewPatternModelElement> elements = new ArrayList<ViewPatternModelElement>();
+	int id;
+
+	/**
+	 * Adds a pattern model element to the pattern body model.
+	 * @param entity
+	 */
+	public void addEntity(ViewPatternModelElement entity) {
+		elements.add(entity);
+	}
+
+	/**
+	 * Adds a called pattern to the pattern body.
+	 * @param pattern
+	 */
+	public void addCalledPattern(ViewPattern pattern) {
+		calledPatterns.add(pattern);
+	}
+
+	/**
+	 * @param body
+	 *            the body to set
+	 */
+	public void setBody(GTPatternBody body) {
+		// this.body = body;
+	}
+
+	/**
+	 * @param id
+	 *            the id to set
+	 */
+	public void setId(int id) {
+		this.id = id;
+	}
+
+	/**
+	 * Return the children of the body node. The children are the elements of
+	 * the pattern graph and the called positive and negative patterns.
+	 * @return the children of the body node
+	 */
+	public Object[] getChildren() {
+		ArrayList<Object> children = new ArrayList<Object>();
+		children.addAll(elements);
+		children.addAll(calledPatterns);
+		return children.toArray();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString() {
+		return "Body #" + Integer.toString(id);
+	}
+
+	@Override
+	public String getName() {
+		return toString();
+	}
+
+	@Override
+	public String getTypeString() {
+		return "Pattern Body";
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/ViewPatternModelElement.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/ViewPatternModelElement.java
new file mode 100644
index 0000000..06411d9
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/patterns/viewmodel/ViewPatternModelElement.java
@@ -0,0 +1,154 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.patterns.viewmodel;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Entity;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.ModelElement;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relation;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.Relationship;
+import org.eclipse.viatra2.gtasmmodel.vpm.editmodel.TypeOf;
+
+/**
+ * Represents a model element in the view model. There is a one-to-one
+ * connection between ViewPatternModelElements and {@link ModelElement}
+ * objects.q
+ * @author Zoltan Ujhelyi
+ */
+public class ViewPatternModelElement extends AbstractViewModelElement {
+
+	ModelElement element;
+	ViewPatternBody body;
+
+	/**
+	 * @return the entity
+	 */
+	public ModelElement getModelElement() {
+		return element;
+	}
+
+	/**
+	 * @param entity
+	 *            the entity to set
+	 */
+	public void setModelElement(ModelElement entity) {
+		this.element = entity;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString() {
+		String name = element.getName();
+		/*
+		 * if (!element.getType().isEmpty()) { name = name.concat(" : "); name =
+		 * name.concat(((ModelElement) element.getType().iterator()
+		 * .next()).getTypeStr()); }
+		 */
+		return name;
+	}
+
+	/**
+	 * Sets the pattern body that acts as a container of the model element.
+	 * @param body
+	 */
+	public void setBody(ViewPatternBody body) {
+		this.body = body;
+
+	}
+
+	/**
+	 * Returns the pattern body that is the container of the model element.
+	 * @return the body
+	 */
+	public ViewPatternBody getBody() {
+		return body;
+	}
+
+	@Override
+	public String getName() {
+		return toString();
+	}
+
+	/**
+	 * Decides whether the model element is a relation
+	 * @return true if it is a relation
+	 */
+	public boolean isRelation() {
+		return element instanceof Relation;
+	}
+
+	/**
+	 * Decides whether the model element is an entity
+	 * @return true if it is an entity
+	 */
+	public boolean isEntity() {
+		return element instanceof Entity;
+	}
+
+	/**
+	 * Returns the number of relations going from the current model element to a
+	 * selected model element.
+	 * @param target a target model element where the relations are calculated
+	 * @return the number of outgoing relations
+	 */
+	public int getNumberOfRelationsFrom(ViewPatternModelElement target) {
+		if (isEntity() && target.isRelation()) {
+			EList<Relation> relationsFrom = ((Entity) element).getRelationsFrom();
+			if (relationsFrom.contains(target.element)) {
+				return 1;
+			}
+		}
+		return 0;
+	}
+
+	/**
+	 * The number of incoming relations from a selected source model element.
+	 * @param source the source model element
+	 * @return the number of incoming relations
+	 */
+	public int getNumberOfRelationsTo(ViewPatternModelElement source) {
+		if (isEntity() && source.isRelation()) {
+			EList<Relation> relationsFrom = ((Entity) element).getRelationsTo();
+			if (relationsFrom.contains(source.element)) {
+				return 1;
+			}
+		}
+		return 0;
+	}
+	
+	private String getTypeString(ModelElement element){
+		for (Relationship rel : element.getSuperRelationships()) {
+			if (rel instanceof TypeOf) {
+				return rel.getSupplierStr();
+			}
+		}
+		return "";
+	}
+
+	@Override
+	public String getTypeString() {
+		String string = getTypeString(element);
+		if (string != "") {
+			int pos = string.lastIndexOf(".");
+			string = string.substring(pos + 1);
+			return string;
+		}
+		if (isEntity())
+			return "Entity";
+		else if (isRelation()) return "Relation";
+		return "Model Element";
+	}
+
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/view/ViatraVisualisationView.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/view/ViatraVisualisationView.java
new file mode 100644
index 0000000..35f569d
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/view/ViatraVisualisationView.java
@@ -0,0 +1,430 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Zoltan Ujhelyi and Istvan Rath and Daniel Varro.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Zoltan Ujhelyi - initial API and implementation
+ *    Istvan Rath - add support for labelprovider override
+ *******************************************************************************/
+package org.eclipse.viatra2.visualisation.view;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.ControlListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.ViewPart;
+import org.eclipse.viatra2.visualisation.IVisualisationDescriptor;
+import org.eclipse.viatra2.visualisation.ViatraColoredLabelProvider;
+import org.eclipse.viatra2.visualisation.ViatraGraphViewer;
+import org.eclipse.viatra2.visualisation.VisualisationManager;
+import org.eclipse.viatra2.visualisation.VisualisationPlugin;
+import org.eclipse.viatra2.visualisation.common.action.SetAutoLayoutAction;
+import org.eclipse.viatra2.visualisation.common.extensions.FilterConfiguration;
+import org.eclipse.viatra2.visualisation.common.extensions.VisualisationPreset;
+import org.eclipse.viatra2.visualisation.common.extensions.internal.ExtensionAccess;
+import org.eclipse.viatra2.visualisation.layouts.IViatraLayoutAlgorithm;
+import org.eclipse.viatra2.visualisation.modelspace.actions.groups.CustomFilterGroup;
+import org.eclipse.viatra2.visualisation.modelspace.actions.groups.LabelProviderGroup;
+import org.eclipse.viatra2.visualisation.modelspace.actions.groups.LayoutGroup;
+import org.eclipse.viatra2.visualisation.modelspace.actions.groups.PresetGroup;
+import org.eclipse.zest.core.viewers.AbstractZoomableViewer;
+import org.eclipse.zest.core.viewers.IZoomableWorkbenchPart;
+import org.eclipse.zest.core.viewers.ZoomContributionViewItem;
+
+/**
+ * This class acts as the common entry point of the visualisation, it handles
+ * the user commands from the UI and alters the graph model respectively.
+ * <b>WARNING</b> Only calls from the Display thread are supported except when stated otherwise.
+ * 
+ * @author Zoltan Ujhelyi, Istvan Rath
+ */
+public class ViatraVisualisationView extends ViewPart implements
+		IZoomableWorkbenchPart {
+
+	private static final class OpenViewRunner implements Runnable {
+		IViewPart form = null;
+		
+		@Override
+		public void run() {
+			IWorkbenchPage page = PlatformUI.getWorkbench()
+					.getActiveWorkbenchWindow().getActivePage();
+			form = page.findView(viewId);
+			if (form == null) {
+				try {
+					form = page.showView(viewId);
+				} catch (PartInitException e) {
+				}
+			} else {
+				page.bringToTop(form);
+			}
+		}
+
+		public IViewPart getForm() {
+			return form;
+		}
+		
+		
+	}
+
+	/**
+	 * The ID of the visualisation view
+	 */
+	public final static String viewId = "org.eclipse.viatra2.visualisation.view";
+	ViatraGraphViewer gv;
+	Composite parent;
+	Object descriptorSource;
+	IVisualisationDescriptor descriptor;
+	protected Point gvSize;
+	boolean autoLayout = true;
+
+	// Action definitions
+	private ZoomContributionViewItem zoom;
+	private Action clearGraph = new Action("Clear Graph") {
+
+		@Override
+		public void run() {
+			descriptor.clearGraphModel();
+		}
+	};
+	private Action refreshGraph = new Action("Refresh Graph") {
+
+		@Override
+		public void run() {
+			if (descriptor != null)
+				gv.applyLayout();
+		}
+
+	};
+	private Action saveFile = new Action("Save Graph as Image") {
+		@Override
+		public void run() {
+			FileDialog save = new FileDialog(PlatformUI.getWorkbench()
+					.getDisplay().getActiveShell(), SWT.SAVE);
+			save.setFilterExtensions(new String[] { "*.png" });
+			save.setFilterNames(new String[] { "PNG File" });
+			save.setFileName("modelspace.png");
+			String filename = save.open();
+			gv.saveImage(filename, SWT.IMAGE_PNG);
+		}
+	};
+	private SetAutoLayoutAction autoLayoutAction;
+
+	/**
+	 * If the view is resized refresh the graph
+	 */
+	private ControlListener resizeListener = new ControlAdapter() {
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.swt.events.ControlAdapter#controlResized(org.eclipse.
+		 * swt.events.ControlEvent)
+		 */
+		@Override
+		public void controlResized(ControlEvent e) {
+			if (descriptor != null && autoLayout)
+				redraw();
+		}
+	};
+
+	/**
+	 * @param autoLayout
+	 *            the autoLayout to set
+	 */
+	public void setAutoLayout(boolean autoLayout) {
+		this.autoLayout = autoLayout;
+	}
+
+	/**
+	 * Searches and returns the descriptor related to its source. If no such
+	 * descriptor is available, the return value is null.
+	 * 
+	 * @param descriptorSource
+	 *            the source object of the visualisation descriptor
+	 * @return the related descriptor, or null if none is available
+	 */
+	public IVisualisationDescriptor getDescriptor(Object descriptorSource) {
+		return VisualisationPlugin.getVisualisationManager().getVisualisation(
+				descriptorSource);
+	}
+
+	/**
+	 * Searches and returns the default descriptor.
+	 * 
+	 * @return the default visualisation descriptor, or null if none is set.
+	 */
+	public IVisualisationDescriptor getDescriptor() {
+		return descriptor;
+	}
+
+	/**
+	 * Adds a descriptorSource-descriptor pair to the view.
+	 * 
+	 * @param descriptorSource
+	 *            the source object
+	 * @param descriptor
+	 *            the visualisation descriptor
+	 */
+	public void setDescriptor(Object descriptorSource,
+			IVisualisationDescriptor descriptor) {
+		VisualisationManager manager = VisualisationPlugin
+				.getVisualisationManager();
+		if (this.descriptor != null) {
+			this.descriptor.dispose();
+			manager.unloadDescriptor(this.descriptorSource);
+		}
+		this.descriptorSource = descriptorSource;
+		this.descriptor = descriptor;
+		manager.loadDescriptor(descriptorSource, descriptor);
+		loadVisualisationDescriptor(descriptor);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.part.WorkbenchPart#dispose()
+	 */
+	@Override
+	public void dispose() {
+		if (descriptor != null) {
+			descriptor.dispose();
+			descriptor = null;
+		}
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets
+	 * .Composite)
+	 */
+	@Override
+	public void createPartControl(Composite parent) {
+		this.parent = parent;
+		if (descriptor != null)
+			loadVisualisationDescriptor(descriptor);
+		parent.addControlListener(resizeListener);
+	}
+
+	private void loadVisualisationDescriptor(IVisualisationDescriptor descriptor) {
+		// removing old controls
+		for (Control control : parent.getChildren()) {
+			control.dispose();
+		}
+		if (zoom != null)
+			zoom.dispose();
+		this.descriptor = descriptor;
+		initializeGraphViewer(parent);
+		initializeActions();
+		createMenu();
+		createToolbar();
+		parent.layout();
+	}
+
+	private void initializeActions() {
+		clearGraph.setImageDescriptor(VisualisationPlugin
+				.imageDescriptorFromPlugin(VisualisationPlugin.PLUGIN_ID,
+						"icons/clear.gif"));
+		refreshGraph.setImageDescriptor(VisualisationPlugin
+				.imageDescriptorFromPlugin(VisualisationPlugin.PLUGIN_ID,
+						"icons/refresh.gif"));
+		saveFile.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()
+				.getImageDescriptor(ISharedImages.IMG_ETOOL_SAVE_EDIT));
+		zoom = new ZoomContributionViewItem(this);
+		autoLayoutAction = new SetAutoLayoutAction("Layout on resize");
+		autoLayoutAction.setChecked(autoLayout);
+	}
+
+	/**
+	 * Initializes the graph viewer component
+	 * 
+	 * @param parent
+	 */
+	private void initializeGraphViewer(Composite parent) {
+		descriptor.createFormContributions(parent);
+		gv = descriptor.getViewer();
+		// descriptor.clearGraphModel();
+		getSite().setSelectionProvider(gv);
+		gvSize = gv.getControl().getSize();
+	}
+
+	private void createToolbar() {
+		IToolBarManager mgr = getViewSite().getActionBars().getToolBarManager();
+		mgr.removeAll();
+		descriptor.addToolbarContributions(mgr);
+		mgr.add(refreshGraph);
+		mgr.add(clearGraph);
+		mgr.update(true);
+	}
+
+	/**
+	 * Creates the menu of the view.
+	 */
+	private void createMenu() {
+		IMenuManager mgr = getViewSite().getActionBars().getMenuManager();
+		mgr.removeAll();
+		descriptor.addMenuContributions(mgr);
+
+		// read data from the extension point
+		ExtensionAccess.reInit();
+
+		// add atomic contributions
+		LayoutGroup layoutItems = new LayoutGroup();
+		layoutItems.fillContextMenu(mgr);
+		LabelProviderGroup lpg = new LabelProviderGroup();
+		lpg.fillContextMenu(mgr);
+		CustomFilterGroup cfg = new CustomFilterGroup();
+		cfg.fillContextMenu(mgr);
+
+		// add presets
+		mgr.add(new Separator());
+		PresetGroup presetItems = new PresetGroup();
+		presetItems.fillContextMenu(mgr);
+		setVisualisationPreset(presetItems.getDefaultPreset());
+
+		// Adding common elements
+		mgr.add(new Separator());
+		mgr.add(saveFile);
+		mgr.add(refreshGraph);
+		mgr.add(autoLayoutAction);
+		mgr.add(clearGraph);
+		mgr.add(new Separator());
+
+		mgr.add(zoom);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+	 */
+	@Override
+	public void setFocus() {
+
+	}
+
+	/**
+	 * Sets the model space provider for the graph visualisation
+	 * 
+	 * @param provider
+	 */
+	public void setProvider(IContentProvider provider) {
+		gv.setContentProvider(provider);
+		// triggering a restructuration of the graph
+		gv.setInput(new Object());
+		gv.applyLayout();
+		// refresh();
+	}
+
+	/**
+	 * Sets the layout algorithm
+	 * 
+	 * @param algorithm
+	 */
+	public void setLayoutAlgorithm(IViatraLayoutAlgorithm algorithm) {
+		descriptor.setLayoutAlgorithm(algorithm);
+	}
+
+	/**
+	 * Sets the preset for graph visualisation
+	 * 
+	 * @param vp
+	 */
+	public void setVisualisationPreset(VisualisationPreset vp) {
+		descriptor.setVisualisationPreset(vp);
+	}
+
+	/**
+	 * Sets the label provider for the visualisation
+	 * 
+	 * @param lp
+	 */
+	public void setLabelProvider(ViatraColoredLabelProvider lp) {
+		descriptor.setLabelProvider(lp, true);
+	}
+
+	/**
+	 * Sets a filter configuration for the visualisation
+	 * 
+	 * @param fc
+	 */
+	public void setFilterConfiguration(FilterConfiguration fc) {
+		descriptor.setFilterConfiguration(fc, true);
+	}
+
+	/**
+	 * Triggers a refresh of the visualisation with the currently set parameters
+	 * - no relayouting.
+	 * 
+	 * @see #redraw() for relayouting
+	 */
+	public void refresh() {
+		if (gv != null) {
+			// gv.applyLayout();
+			gv.refresh();
+		}
+	}
+
+	/**
+	 * Triggers a relayouting of the visualisation with the currently set
+	 * parameters.
+	 * 
+	 * @see #refresh() can be used if only the labels have to be updated
+	 */
+	public void redraw() {
+		if (gv != null) {
+			gv.applyLayout();
+		}
+	}
+
+	public AbstractZoomableViewer getZoomableViewer() {
+		return gv;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.part.WorkbenchPart#getAdapter(java.lang.Class)
+	 */
+	@Override
+	public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+		if (descriptor != null) {
+			Object descriptorAdapter = descriptor.getAdapter(adapter);
+			if (descriptorAdapter != null)
+				return descriptorAdapter;
+		}
+		return super.getAdapter(adapter);
+	}
+
+	/**
+	 * Opens or shows the instance of the Viatra Visualisation view. This method is safe to call from background threads.
+	 * 
+	 * @return a reference to the opened view allowing the caller to reach it.
+	 */
+	public static ViatraVisualisationView openView() {
+		OpenViewRunner runner = new OpenViewRunner();
+		Display.getDefault().syncExec(runner);
+		return (ViatraVisualisationView) runner.getForm();
+	}
+}
diff --git a/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/view/package-info.java b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/view/package-info.java
new file mode 100644
index 0000000..f77bfc4
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/src/org/eclipse/viatra2/visualisation/view/package-info.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011, Istvan Rath and Zoltan Ujhelyi
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Istvan Rath - initial API and implementation
+ *******************************************************************************/
+
+/**
+ * This package contains classes directly related
+ * to the displayed view.
+ * @author Zoltan Ujhelyi 
+ */
+package org.eclipse.viatra2.visualisation.view;
+
diff --git a/org.eclipse.viatra2.visualisation/toc.xml b/org.eclipse.viatra2.visualisation/toc.xml
new file mode 100644
index 0000000..59d4194
--- /dev/null
+++ b/org.eclipse.viatra2.visualisation/toc.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="Viatra2 Visualisation" link_to="../org.eclipse.viatra2.help/toc.xml#contribution" topic="html/visualisation.html">
+	<topic label="Model Space Visualisation"  href="html/visualisation.html"> 
+		<topic label="Getting Started" href="html/started.html"/>
+  <topic href="html/handling.html" label="Using the Graph View">
+  </topic>
+  <topic href="html/configuration.html" label="Configuration">
+  </topic> 
+	</topic>
+</toc>